物料检验项目维护节点选择问题解决

yangwl
wws 11 months ago
parent fc1d71228b
commit af1f34dd5a

@ -2,7 +2,7 @@
<div class="app-container"> <div class="app-container">
<el-row :gutter="20"> <el-row :gutter="20">
<MaterialGroupAdd ref="MaterialGroupAdd" @onNodeClick="onNodeClick" @child-event="getCheckTypeList"></MaterialGroupAdd> <MaterialGroupAdd ref="MaterialGroupAdd" @onNodeClick="onNodeClick" @child-event="getCheckTypeList"></MaterialGroupAdd>
<el-col :span="20" :xs="24"> <el-col :span="20" :xs="24">
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="23" :xs="24"> <el-col :span="23" :xs="24">
<el-tabs v-model="editableTabsValue" type="card" @tab-click="handleClick"> <el-tabs v-model="editableTabsValue" type="card" @tab-click="handleClick">
@ -125,7 +125,7 @@
@change="handleStatusChange(scope.row)" @change="handleStatusChange(scope.row)"
></el-switch> ></el-switch>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="操作" label="操作"
align="center" align="center"
@ -331,7 +331,7 @@ export default {
}); });
}, },
/**初始化表格信息 */ /**初始化表格信息 */
// //
cancel() { cancel() {
this.open = false; this.open = false;
@ -367,6 +367,9 @@ export default {
}, },
/**物料树点击 */ /**物料树点击 */
onNodeClick(obj) { onNodeClick(obj) {
console.log("数据在这里")
console.log(obj)
console.log(12312312312321)
if(obj.level == 1) { if(obj.level == 1) {
this.queryParams.groupId = obj.id; this.queryParams.groupId = obj.id;
this.groupId = obj.id; this.groupId = obj.id;
@ -421,8 +424,8 @@ export default {
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
if(this.groupId==null||this.materialCode){ if(this.groupId==null&&this.materialCode==null){
this.$modal.msgError("请点击左侧节点"); this.$modal.msgError("请点击左侧节点");
return return
}; };
@ -459,7 +462,7 @@ export default {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
}); });
} }
} }
}); });
@ -512,7 +515,7 @@ export default {
} }
}); });
} }
this.editableTabsValue = activeName; this.editableTabsValue = activeName;
this.editableTabs = tabs.filter(tab => tab.name !== targetName); this.editableTabs = tabs.filter(tab => tab.name !== targetName);
} }
@ -541,14 +544,14 @@ export default {
onSelectProjects(objs) { onSelectProjects(objs) {
let _this = this; let _this = this;
objs.forEach(function(item,index,arr){ objs.forEach(function(item,index,arr){
item.projectId = item.id; item.projectId = item.id;
item.projectNo = item.orderNum; item.projectNo = item.orderNum;
item.unit = item.unitCode; item.unit = item.unitCode;
item.standardValue = item.checkStandard; item.standardValue = item.checkStandard;
item.typeId = _this.queryParams.typeId; item.typeId = _this.queryParams.typeId;
item.groupId = _this.groupId; item.groupId = _this.groupId;
item.materialCode = _this.materialCode; item.materialCode = _this.materialCode;
}); });
submitProjects(objs).then(response => { submitProjects(objs).then(response => {
this.$modal.msgSuccess("提交成功"); this.$modal.msgSuccess("提交成功");

Loading…
Cancel
Save