|
@@ -76,8 +76,8 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
// 判断属性是否禁用
|
|
|
- async handleIsForbidden(status) {
|
|
|
- let { updateColumns, updateTabColumns } = await forbidden(status != '2');
|
|
|
+ async handleIsForbidden(status,source) {
|
|
|
+ let { updateColumns, updateTabColumns } = await forbidden(status != '2',source);
|
|
|
this.columns = updateColumns;
|
|
|
this.tabColumns = updateTabColumns;
|
|
|
this.count++;
|
|
@@ -89,7 +89,7 @@ export default {
|
|
|
const { code, msg, data } = await orderApi.details(prop);
|
|
|
if (code === 200) {
|
|
|
this.params = { ...this.params, ...data };
|
|
|
- this.handleIsForbidden(this.params.status);
|
|
|
+ this.handleIsForbidden(this.params.status,this.params.source);
|
|
|
}
|
|
|
} catch (err) {
|
|
|
//
|
|
@@ -131,6 +131,7 @@ export default {
|
|
|
}
|
|
|
// 是否完成询价,新增明细行需默认明细为false
|
|
|
rowData['whetherCompleteInquiry'] = false;
|
|
|
+ rowData['delFlag'] = '0';
|
|
|
|
|
|
this.params[key].push(rowData);
|
|
|
}
|
|
@@ -146,8 +147,11 @@ export default {
|
|
|
// prop.splice(index, 1);
|
|
|
for (const key in this.params) {
|
|
|
|
|
|
- if (Array.isArray(this.params[key])) {
|
|
|
- this.params[key].splice(index, 1);
|
|
|
+ // if (Array.isArray(this.params[key])) {
|
|
|
+ if (key === 'puOrderItemList' || key === 'puOrderExecuteList') {
|
|
|
+
|
|
|
+ this.params[key][index].id ? (this.params[key][index]['delFlag'] = '2') :this.params[key].splice(index, 1);
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -184,6 +188,7 @@ export default {
|
|
|
cb();
|
|
|
|
|
|
} else {
|
|
|
+ this.$message.error('存在必填项未填写');
|
|
|
console.log('error submit!!');
|
|
|
return false;
|
|
|
}
|
|
@@ -191,6 +196,7 @@ export default {
|
|
|
},
|
|
|
// 保存
|
|
|
handleSava() {
|
|
|
+ console.log(this.params,'this.params---------');
|
|
|
this.judgeSaveCondition(async()=>{
|
|
|
try {
|
|
|
this.loading = true;
|
|
@@ -211,17 +217,32 @@ export default {
|
|
|
beforeOpen() {
|
|
|
},
|
|
|
// 子表参照改变之后
|
|
|
- handleReferChange(val, source, type) {
|
|
|
+ async handleTabReferChange(val, source, type) {
|
|
|
// 触发物料参照
|
|
|
- if (type == 'MATERIAL_PARAM' && source.qty && source.qty != '') {
|
|
|
+ if (type == "MATERIAL_PARAM") {
|
|
|
|
|
|
- this.handleGetPrice();
|
|
|
- }
|
|
|
+ source['qty'] = 0;
|
|
|
+
|
|
|
+ source['whetherCompleteInquiry'] = false;
|
|
|
+
|
|
|
+ source['taxPrice'] = 0;
|
|
|
+
|
|
|
+ source['money'] = 0;
|
|
|
+
|
|
|
+ source['taxDeductMoneya'] = 0;
|
|
|
+
|
|
|
+ source['price'] = 0;
|
|
|
+
|
|
|
+ source['notaxMoney'] = 0;
|
|
|
+
|
|
|
+ source['tax'] = 0;
|
|
|
|
|
|
- if(type == "MATERIAL_PARAM"){
|
|
|
source.isDrug = val.materialMedcine.isDrug == '0' ? 'Y' : 'N';
|
|
|
- // return source;
|
|
|
+
|
|
|
+ await this.handleGetPrice();
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
},
|
|
|
|
|
|
// 子表Select改变之后
|
|
@@ -239,15 +260,24 @@ export default {
|
|
|
handleTabSelectChange(type,row){
|
|
|
|
|
|
if(type == 'priceType' && row.material && row.qty && row.qty != ""){
|
|
|
+
|
|
|
+ row['whetherCompleteInquiry'] = false;
|
|
|
+
|
|
|
this.handleGetPrice();
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
// 子表inputNumber
|
|
|
handleInputChange(row, type) {
|
|
|
// 物料数量变化----询价
|
|
|
if (type == 'qty' && row.material) {
|
|
|
+
|
|
|
+ row['whetherCompleteInquiry'] = false;
|
|
|
+
|
|
|
this.handleGetPrice();
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
},
|
|
|
// 子表多选框改变
|
|
|
handleTabCheckbox(type,source){
|
|
@@ -438,7 +468,7 @@ export default {
|
|
|
:label="column.title"
|
|
|
:name="column.key"
|
|
|
>
|
|
|
- <el-table :data="params[column.key]" style="width: 100%">
|
|
|
+ <el-table :data="params[column.key].filter(item => item.delFlag === '0')" style="width: 100%">
|
|
|
<el-table-column label="序号">
|
|
|
<template slot-scope="scope">
|
|
|
{{ scope.$index + 1 }}
|
|
@@ -484,7 +514,7 @@ export default {
|
|
|
:data-mapping="cColumn.dataMapping"
|
|
|
:query-params="cColumn.queryParams"
|
|
|
size="mini"
|
|
|
- @change="handleReferChange"
|
|
|
+ @change="handleTabReferChange"
|
|
|
></dr-popover-select>
|
|
|
|
|
|
<el-select v-if="cColumn.inputType === 'Select'"
|