Browse Source

森语-报销单-保存后生成单号

jbb 2 years ago
parent
commit
c99dcb0d1e
1 changed files with 21 additions and 9 deletions
  1. 21 9
      src/views/activiti/form/demoForm2.vue

+ 21 - 9
src/views/activiti/form/demoForm2.vue

@@ -771,13 +771,13 @@ export default {
                                 //     //   }) 
                                 //     // }
                                 //   }else 
-                                  if(that.processData.businessTable == 'expense_account'){//报销单-自动生成单号
-                                    if( that.processData.tableId==''|| !that.processData.tableId){
-                                       that.getAction('/sys/user/getNextNo',{name:'BXDCode'}).then(res => {
-                                            that.$refs.KFB.setData({reimbursement_no:res})
-                                      }) 
-                                    }
-                                  }
+                                //   if(that.processData.businessTable == 'expense_account'){//报销单-自动生成单号
+                                //     if( that.processData.tableId==''|| !that.processData.tableId){
+                                //        that.getAction('/sys/user/getNextNo',{name:'BXDCode'}).then(res => {
+                                //             that.$refs.KFB.setData({reimbursement_no:res})
+                                //       }) 
+                                //     }
+                                //   }
                               },200)
                               
                            }
@@ -942,6 +942,7 @@ export default {
          },
         // 表单字段数值发生改变事件
         handleChange (value, key) {
+            // debugger
           if(key == 'proposer' && this.processData.businessTable == 'regular_employee_apply'){//员工转正申请:申请人部门
             this.$refs.KFB.setData({apply_department:this.deptInfo[value]})   
           }
@@ -1352,12 +1353,19 @@ export default {
                     // 非我的待办节点打卡表单界面
                     if(addForm=='no'){
                         if(this.processData.businessTable == 'incident_ticket'){ // 森语-质量事故单-自动生成事故单号
-                                    if( this.processData.tableId==''|| !this.processData.tableId){
-                                     await  this.getAction('/sys/user/getNextNo',{name:'accidentCode'}).then(res => {
+                            if( this.processData.tableId==''|| !this.processData.tableId){
+                                await  this.getAction('/sys/user/getNextNo',{name:'accidentCode'}).then(res => {
                                         formData.accident_number = res
                                       }) 
                                     }
                                   }
+                        if(this.processData.businessTable == 'expense_account'){//报销单-自动生成单号
+                            if( this.processData.tableId==''|| !this.processData.tableId){
+                                await  this.getAction('/sys/user/getNextNo',{name:'BXDCode'}).then(res => {
+                                    formData.reimbursement_no=res
+                                      }) 
+                                    }
+                                  }
                     this.btndisabled = true
                    await postFormDataAction(url, formData, { jsonContent: jsonPamats })
                         .then(res => {
@@ -1974,4 +1982,8 @@ function updateModel (object, childIndex) {
     border: 1px solid red;
 }
 
+/deep/ .ant-modal {
+    width: 57% !important;
+}
+
 </style>