Bläddra i källkod

采购需求单修改部门不生效问题

黄梓星 1 år sedan
förälder
incheckning
5713c9e69e
1 ändrade filer med 6 tillägg och 2 borttagningar
  1. 6 2
      src/views/purchase/PurchaseDemandList/add.vue

+ 6 - 2
src/views/purchase/PurchaseDemandList/add.vue

@@ -558,8 +558,9 @@ export default {
         customerName: '',
         customerCode: '',
         customerPrincipal: '',
-        demandPersonal: this.$store.state.user.name,
-        demandDept: this.$store.state.user.deptId,
+        demandPersonal: '',
+        demandDept: '',
+        demandDeptName: '',
         planType: '1',
         demandDate: '',
         createTime: '',
@@ -632,6 +633,8 @@ export default {
       this.getDetails(this.row)
     } else if (this.pageStu == 'add') {
       this.loading = false
+      this.basicForm.demandPersonal = this.$store.state.user.name
+      this.basicForm.demandDept = this.$store.state.user.deptId
       if (this.basicForm.demandPersonal) { this.reBackRefer('CONTACTS_PARAM', this.basicForm.demandPersonal, '需求人员') }
       if (this.basicForm.demandDept) { this.reBackRefer('DEPT_PARAM', this.basicForm.demandDept) }
     }
@@ -1133,6 +1136,7 @@ export default {
       if(this.referCondition.type == 'DEPT_PARAM') {
         this.deptOptions = selection
         this.basicForm.demandDept = selection[0].id
+        this.basicForm.demandDeptName = selection[0].name
       }
       if(this.referCondition.title == '选择收货仓库') {
         this.basicForm.puDemandItemList[this.tableIndex].deliveryWarehouse = selection[0].id