Преглед изворни кода

报销经办人没有值问题

lizhenhao пре 2 година
родитељ
комит
92fcc3db34
1 измењених фајлова са 16 додато и 19 уклоњено
  1. 16 19
      src/views/modules/cw/reimbursementApproval/info/ReimbursementForm.vue

+ 16 - 19
src/views/modules/cw/reimbursementApproval/info/ReimbursementForm.vue

@@ -773,30 +773,27 @@
         this.visible = true
         this.loading = false
         this.$nextTick(() => {
-          if (this.commonJS.isEmpty(this.inputForm.department)) {
-            this.inputForm.department = JSON.parse(localStorage.getItem('user')).officeDTO.id
-            this.inputForm.departmentName = JSON.parse(localStorage.getItem('user')).officeDTO.name
-          }
-          if (this.commonJS.isEmpty(this.inputForm.userId)) {
-            this.inputForm.userId = JSON.parse(localStorage.getItem('user')).id
-          }
-          if (this.commonJS.isEmpty(this.inputForm.userName)) {
-            this.inputForm.userName = JSON.parse(localStorage.getItem('user')).name
-          }
-          if (this.commonJS.isEmpty(this.inputForm.reimDate)) {
-            this.inputForm.reimDate = new Date()
-          }
-          console.log('this.status1', this.status)
-          console.log('id', this.inputForm.id)
-          if (this.status === 'audit' || this.status === 'taskFormDetail') {
-            console.log('this.status', this.status)
-            method = 'view'
-          }
           this.loading = true
           this.$refs.inputForm.resetFields()
           this.reimbursementApprovalService.findById(this.inputForm.id).then(({data}) => {
+            if (this.status === 'audit' || this.status === 'taskFormDetail') {
+              method = 'view'
+            }
             this.inputForm = this.recover(this.inputForm, data)
             this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+            if (this.commonJS.isEmpty(this.inputForm.department)) {
+              this.inputForm.department = JSON.parse(localStorage.getItem('user')).officeDTO.id
+              this.inputForm.departmentName = JSON.parse(localStorage.getItem('user')).officeDTO.name
+            }
+            if (this.commonJS.isEmpty(this.inputForm.userId)) {
+              this.inputForm.userId = JSON.parse(localStorage.getItem('user')).id
+            }
+            if (this.commonJS.isEmpty(this.inputForm.userName)) {
+              this.inputForm.userName = JSON.parse(localStorage.getItem('user')).name
+            }
+            if (this.commonJS.isEmpty(this.inputForm.reimDate)) {
+              this.inputForm.reimDate = new Date()
+            }
             this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'reimbursement')
             if (this.commonJS.isNotEmpty(this.inputForm.purchaseId)) {
               this.startPur(this.inputForm.purchaseId)