Browse Source

Merge remote-tracking branch 'origin/master'

user5 2 năm trước cách đây
mục cha
commit
bc3be22076

+ 2 - 2
src/api/centerservice/ccpm/ReimbursementService.js

@@ -8,11 +8,11 @@ export default class ReimbursementService {
       params: {id: id}
     })
   }
-  reimAudit (id, flag) {
+  reimAudit (id, flag, comment) {
     return request({
       url: '/ccpm_reimbursement/reimAudit',
       method: 'get',
-      params: {id: id, flag: flag}
+      params: {id: id, flag: flag, comment: comment}
     })
   }
   reimReapply (id) {

+ 2 - 14
src/views/modules/flowable/task/CenterForm.vue

@@ -53,28 +53,16 @@
         this.$refs.form.close()
       },
       agree () {
-        this.$refs.form.agree()
-        this.$nextTick(() => {
-          this.close()
-        })
+        this.$refs.form.agree(this.$route.query.backPath)
       },
       reject () {
-        this.$refs.form.reject()
-        this.$nextTick(() => {
-          this.close()
-        })
+        this.$refs.form.reject(this.$route.query.backPath)
       },
       reapply () {
         this.$refs.form.reapply()
-        this.$nextTick(() => {
-          this.close()
-        })
       },
       deleteFlow () {
         this.$refs.form.deleteFlow()
-        this.$nextTick(() => {
-          this.close()
-        })
       },
       changeLoading (loading) {
         if (this.commonJS.isNotEmpty(loading)) {

+ 31 - 5
src/views/modules/reimbursement/ReimbursementFormCcpm.vue

@@ -103,6 +103,18 @@
       </el-form>
       <!-- 附件 -->
       <UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+
+      <el-divider content-position="left"><i class="el-icon-document"></i>
+        审批意见
+      </el-divider>
+      <el-input v-model="comment"
+                type="textarea"
+                :rows="6"
+                maxlength="500"
+                placeholder="请输入审批意见:"
+                show-word-limit>
+      </el-input>
+
       <!--审批流程-->
       <FlowHisTableCcpm ref="flowHisTableCcpm"></FlowHisTableCcpm>
 
@@ -215,7 +227,8 @@
         },
         keyWatch: '',
         amountKey: '',
-        flowHisKey: ''
+        flowHisKey: '',
+        comment: ''
       }
     },
     reimbursementApprovalTypeService: null,
@@ -323,6 +336,7 @@
           histoicFlowList: [],
           flowChart: []
         }
+        this.comment = ''
         this.inputForm.id = id
         this.visible = true
         this.loading = false
@@ -373,6 +387,7 @@
           histoicFlowList: [],
           flowChart: []
         }
+        this.comment = ''
         this.$refs.inputForm.resetFields()
         this.$refs.uploadComponent.clearUpload()
         this.visible = false
@@ -979,11 +994,12 @@
         }
       },
       // 同意
-      agree () {
+      agree (backPath) {
         this.loading = true
-        this.reimbursementService.reimAudit(this.businessId, 'yes').then(({data}) => {
+        this.reimbursementService.reimAudit(this.businessId, 'yes', this.comment).then(({data}) => {
           if (data.success) {
             this.$message.success(data.message)
+            this.closeBack(backPath)
           } else {
             this.$message.error(data.message)
           }
@@ -993,16 +1009,17 @@
         })
       },
       // 驳回
-      reject () {
+      reject (backPath) {
         this.$confirm(`确定驳回此报销申请吗?`, '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
           type: 'warning'
         }).then(() => {
           this.loading = true
-          this.reimbursementService.reimAudit(this.businessId, 'no').then(({data}) => {
+          this.reimbursementService.reimAudit(this.businessId, 'no', this.comment).then(({data}) => {
             if (data.success) {
               this.$message.success(data.message)
+              this.closeBack(backPath)
             } else {
               this.$message.error(data.message)
             }
@@ -1011,6 +1028,15 @@
             this.loading = false
           })
         })
+      },
+      closeBack (backPath) {
+        this.$store.dispatch('tagsView/delView', {fullPath: this.$route.fullPath})
+        if (backPath) {
+          this.$router.push(backPath)
+        } else {
+          this.$router.push('/sys/dashboard/workBench/Pending')
+        }
+        this.close()
       }
     }
   }