|
@@ -40,6 +40,7 @@ export default {
|
|
},
|
|
},
|
|
tabColumns: NewTabColumns,
|
|
tabColumns: NewTabColumns,
|
|
tabName: "puOrderItemList",
|
|
tabName: "puOrderItemList",
|
|
|
|
+ isCopy:false,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {},
|
|
computed: {},
|
|
@@ -64,46 +65,56 @@ export default {
|
|
},
|
|
},
|
|
deep: true,
|
|
deep: true,
|
|
},
|
|
},
|
|
- params: {
|
|
|
|
- handler(nVal, oVal) {
|
|
|
|
- // 组织变化
|
|
|
|
- if (this.visible && nVal.puOrg != oVal.puOrg) {
|
|
|
|
- for (const key in this.params) {
|
|
|
|
- if (Array.isArray(this.params[key])) {
|
|
|
|
- this.params[key] = [];
|
|
|
|
- } else if (
|
|
|
|
- key != "puOrg" &&
|
|
|
|
- key != "puOrgName" &&
|
|
|
|
- key != "buyer" &&
|
|
|
|
- key != "buyerName" &&
|
|
|
|
- key != "puDept" &&
|
|
|
|
- key != "puDeptName" &&
|
|
|
|
- key != "status"
|
|
|
|
- ) {
|
|
|
|
- this.params[key] = "";
|
|
|
|
- } else {
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- deep: true,
|
|
|
|
- },
|
|
|
|
|
|
+ // "params.puOrg": {
|
|
|
|
+ // handler(nVal, oVal) {
|
|
|
|
+ // console.log('nVal', nVal, 'oVal',oVal);
|
|
|
|
+ // console.log(this.isCopy, 'this.isCopy');
|
|
|
|
+ // // 组织变化
|
|
|
|
+ // // if (this.visible && nVal.puOrg != oVal.puOrg) {
|
|
|
|
+ // if (this.visible && oVal && nVal != oVal) {
|
|
|
|
+ // for (const key in this.params) {
|
|
|
|
+ // if (Array.isArray(this.params[key])) {
|
|
|
|
+ // this.params[key] = [];
|
|
|
|
+ // } else if (
|
|
|
|
+ // key != "puOrg" &&
|
|
|
|
+ // key != "puOrgName" &&
|
|
|
|
+ // key != "buyer" &&
|
|
|
|
+ // key != "buyerName" &&
|
|
|
|
+ // key != "puDept" &&
|
|
|
|
+ // key != "puDeptName" &&
|
|
|
|
+ // key != "status"
|
|
|
|
+ // ) {
|
|
|
|
+ // this.params[key] = "";
|
|
|
|
+ // } else {
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // },
|
|
|
|
+ // deep: true,
|
|
|
|
+ // },
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
beforeOpen() {
|
|
beforeOpen() {
|
|
- const { deptName, deptId, name, nickName, orgName, orgId } = this.$store.state.user;
|
|
|
|
- this.params.puOrg = orgId;
|
|
|
|
- this.params.puOrgName = orgName;
|
|
|
|
- this.params.buyer = name;
|
|
|
|
- this.params.buyerName = nickName;
|
|
|
|
- this.params.puDept = deptId;
|
|
|
|
- this.params.puDeptName = deptName;
|
|
|
|
- this.params.billDate = new Date().Format('yyyy-MM-dd');
|
|
|
|
- this.addTableRow();
|
|
|
|
|
|
+
|
|
|
|
+ if(!this.isCopy){
|
|
|
|
+
|
|
|
|
+ const { deptName, deptId, name, nickName, orgName, orgId } = this.$store.state.user;
|
|
|
|
+ this.params.puOrg = orgId;
|
|
|
|
+ this.params.puOrgName = orgName;
|
|
|
|
+ this.params.buyer = name;
|
|
|
|
+ this.params.buyerName = nickName;
|
|
|
|
+ this.params.puDept = deptId;
|
|
|
|
+ this.params.puDeptName = deptName;
|
|
|
|
+ this.params.billDate = new Date().Format('yyyy-MM-dd');
|
|
|
|
+ console.log(this.params,'this.params');
|
|
|
|
+ this.addTableRow();
|
|
|
|
+ }
|
|
},
|
|
},
|
|
- setVisible(prop) {
|
|
|
|
|
|
+ setVisible(prop,iscopy) {
|
|
this.visible = prop;
|
|
this.visible = prop;
|
|
|
|
|
|
|
|
+ this.isCopy = iscopy;
|
|
|
|
+
|
|
if(!this.visible){
|
|
if(!this.visible){
|
|
this.$refs['orderAddForm'].clearValidate();
|
|
this.$refs['orderAddForm'].clearValidate();
|
|
}
|
|
}
|
|
@@ -372,6 +383,37 @@ export default {
|
|
})
|
|
})
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ // 组织
|
|
|
|
+ if(type === 'ORG_PARAM'){
|
|
|
|
+
|
|
|
|
+ for (const key in this.params) {
|
|
|
|
+
|
|
|
|
+ // if (Array.isArray(this.params[key])) {
|
|
|
|
+ if (key === 'puOrderItemList' || key === 'puOrderExecuteList') {
|
|
|
|
+
|
|
|
|
+ this.params[key] = [];
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ else if(key === 'sysFileRecordList'){
|
|
|
|
+ this.params[key] = [];
|
|
|
|
+ }
|
|
|
|
+ else if (
|
|
|
|
+ key != "puOrg" &&
|
|
|
|
+ key != "puOrgName" &&
|
|
|
|
+ key != "buyer" &&
|
|
|
|
+ key != "buyerName" &&
|
|
|
|
+ key != "puDept" &&
|
|
|
|
+ key != "puDeptName" &&
|
|
|
|
+ key != "status"
|
|
|
|
+ ) {
|
|
|
|
+ this.params[key] = "";
|
|
|
|
+ } else {
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
},
|
|
},
|
|
|
|
|
|
// 下拉框选择改变
|
|
// 下拉框选择改变
|