|
|
@@ -242,15 +242,27 @@ class GLJListModel extends BaseModel {
|
|
|
if (Object.keys(data).length <= 0) {
|
|
|
throw '新增数据为空';
|
|
|
}
|
|
|
+ //if(data.specs==undefined||data.specs==null||data.specs=="") data.specs = null;
|
|
|
let condition={
|
|
|
code: data.code,
|
|
|
project_id: data.project_id,
|
|
|
name:data.name,
|
|
|
- specs:data.specs,
|
|
|
type:data.type,
|
|
|
unit:data.unit
|
|
|
};
|
|
|
- let projectGljData = await this.findDataByCondition(condition);
|
|
|
+ let projectGljData = null;
|
|
|
+ let projectGLJList = await this.findDataByCondition(condition,null,false);
|
|
|
+ if(projectGLJList.length > 0){//specs有可能为空或"",所以这里做这样处理
|
|
|
+ let p = data.specs;
|
|
|
+ if(p==undefined||p==null||p=="") p = null;
|
|
|
+ for(let g of projectGLJList){
|
|
|
+ let t = g.specs;
|
|
|
+ if(t==undefined||t==null||t=="") t = null;
|
|
|
+ if(p == t) projectGljData = g;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // let projectGljData = await this.findDataByCondition(condition);
|
|
|
let isAddProjectGLJ = false;
|
|
|
|
|
|
// 获取标段对应的单价文件id
|