|
@@ -782,6 +782,7 @@ const importXML = (() => {
|
|
|
if (!sourceCode) {
|
|
|
sourceCode = code;
|
|
|
}
|
|
|
+
|
|
|
// 人材机的真正原始编号应按规矩处理,不能直接读取编码。
|
|
|
// 应取sourceCode,qtf文件中原始代码的最后一个“-”前面的文本;如果没有“-”则直接取原始代码
|
|
|
const orgCodeReg = /.*(?=-\d+$)/;
|
|
@@ -1544,14 +1545,15 @@ const importXML = (() => {
|
|
|
let tempV = ration.quantity / bills.quantity;
|
|
|
ration.contain = isFinite(tempV) ? scMathUtil.roundForObj(tempV, 6) : '0';
|
|
|
}
|
|
|
-
|
|
|
//如果之前处理是量价,但是又有定额工料机,而且只有一条名称,编号,单位又完全匹配,说明是工料机类型的定额,修改定额类型,去掉定额工料机
|
|
|
if(ration.type===rationType.volumePrice && ration.rationGljs.length==1 ){
|
|
|
let matchGLJ = getGLJByMap(ration.rationGljs[0].code);
|
|
|
- if(matchGLJ && ration.code===matchGLJ.code && ration.name===matchGLJ.name&& ration.unit===matchGLJ.unit){
|
|
|
+ if(matchGLJ && matchGLJ.code.includes(ration.code) && ration.name===matchGLJ.name&& ration.unit===matchGLJ.unit){
|
|
|
ration.type=rationType.gljRation
|
|
|
ration.subType=matchGLJ.type;
|
|
|
ration.projectGLJID = matchGLJ.id;
|
|
|
+ //这样覆盖是因为如导出的工料机类型的定额编码是LC00010001 但是对应的项目工料机,经过处理后编码变成了 LC00010001_1 这里要反向一下
|
|
|
+ if(ration.code !== matchGLJ.code) ration.code = matchGLJ.code;
|
|
|
ration.rationGljs = [];
|
|
|
|
|
|
}
|