Quellcode durchsuchen

Merge remote-tracking branch 'origin/master'

user5 vor 2 Jahren
Ursprung
Commit
297a9c07ff
22 geänderte Dateien mit 1248 neuen und 288 gelöschten Zeilen
  1. 14 0
      src/api/cw/reportManagement/ReportReviewService.js
  2. 39 0
      src/api/program/ProgramServiceTypeService.js
  3. 53 17
      src/views/modules/cw/invoice/InvoiceForm.vue
  4. 43 1
      src/views/modules/cw/invoice/InvoiceFormTask.vue
  5. 40 4
      src/views/modules/cw/invoice/InvoiceFormTaskInvalid.vue
  6. 118 2
      src/views/modules/cw/invoice/InvoiceList.vue
  7. 7 0
      src/views/modules/cw/projectBusinessType/CwProjectBusinessTypeForm.vue
  8. 58 0
      src/views/modules/cw/reimbursementApproval/info/InfoList.vue
  9. 95 31
      src/views/modules/cw/reimbursementApproval/info/ReimbursementForm.vue
  10. 51 27
      src/views/modules/cw/reportManagement/reportReview/ReportReviewForm.vue
  11. 13 11
      src/views/modules/cw/workContract/ContractRegistration.vue
  12. 268 99
      src/views/modules/cw/workContract/contractRegisitionAddForm/ContractAddForm.vue
  13. 53 17
      src/views/modules/finance/invoice/InvoiceForm.vue
  14. 2 2
      src/views/modules/finance/invoice/InvoiceList.vue
  15. 1 1
      src/views/modules/program/registered/ProjectForm.vue
  16. 1 0
      src/views/modules/program/registered/ProofreadBrowseForm.vue
  17. 1 0
      src/views/modules/program/registered/ProofreadBrowseFormComponent.vue
  18. 1 0
      src/views/modules/program/registered/ProofreadForm.vue
  19. 1 0
      src/views/modules/program/registered/ProofreadFormComponent.vue
  20. 97 76
      src/views/modules/program/registered/ProofreadIssuedForm.vue
  21. 133 0
      src/views/modules/program/serviceType/ProgramServiceTypeForm.vue
  22. 159 0
      src/views/modules/program/serviceType/ProgramServiceTypeList.vue

+ 14 - 0
src/api/cw/reportManagement/ReportReviewService.js

@@ -36,4 +36,18 @@ export default class ReportReviewService {
       params: {procInsId: id}
     })
   }
+  getHaveReportNo (id) {
+    return request({
+      url: '/projectReport/review/getHaveReportNo',
+      method: 'get',
+      params: {reportId: id}
+    })
+  }
+  saveReportNo (id) {
+    return request({
+      url: '/projectReport/review/saveReportNo',
+      method: 'get',
+      params: {reportId: id}
+    })
+  }
 }

+ 39 - 0
src/api/program/ProgramServiceTypeService.js

@@ -0,0 +1,39 @@
+import request from '@/utils/httpRequest'
+
+export default class ProgramServiceTypeService {
+  list (params) {
+    return request({
+      url: '/program/service_type/list',
+      method: 'get',
+      params: params
+    })
+  }
+  queryById (id) {
+    return request({
+      url: '/program/service_type/queryById',
+      method: 'get',
+      params: {id: id}
+    })
+  }
+  save (inputForm) {
+    return request({
+      url: `/program/service_type/save`,
+      method: 'post',
+      data: inputForm
+    })
+  }
+  delete (ids) {
+    return request({
+      url: '/program/service_type/delete',
+      method: 'delete',
+      params: {ids: ids}
+    })
+  }
+  getList () {
+    return request({
+      url: '/program/service_type/getList',
+      method: 'get',
+      params: {}
+    })
+  }
+}

+ 53 - 17
src/views/modules/cw/invoice/InvoiceForm.vue

@@ -637,7 +637,10 @@
           workAttachmentDtoList: [],
           financeInvoiceDetailDTOList: [],
           financeInvoiceReceivablesDTOList: [],
-          financeInvoiceInvalidDTO: {}
+          financeInvoiceInvalidDTO: {},
+          receivablesDate: '',
+          receivablesStatus: '',
+          isReceivables: ''
         },
         programRow: '',
         bankList: [],
@@ -722,7 +725,10 @@
             invalidStatus: '',
             invoiceId: '',
             remarks: ''
-          }
+          },
+          receivablesDate: '',
+          receivablesStatus: '',
+          isReceivables: ''
         }
         this.inputForm.id = id
         this.visible = true
@@ -811,20 +817,48 @@
           return
         }
         if (this.receivablesFlag === true) {
-          this.inputForm.financeInvoiceReceivablesDTOList.forEach((item, index) => {
-            if (this.commonJS.isEmpty(item.remittanceUnit)) {
-              this.$message.warning('收款明细中第 ' + (index + 1) + ' 条数据的 “汇款单位” 为空,请重新输入')
-              throw new Error()
-            }
-            if (this.commonJS.isEmpty(item.remittanceAmount) || item.remittanceAmount === 0 || item.remittanceAmount === '0') {
-              this.$message.warning('收款明细中第 ' + (index + 1) + ' 条数据的 “汇款金额” 为空,请重新输入')
-              throw new Error()
-            }
-            if (this.commonJS.isEmpty(item.remittanceDate)) {
-              this.$message.warning('收款明细中第 ' + (index + 1) + ' 条数据的 “汇款时间” 为空,请重新输入')
-              throw new Error()
+          this.inputForm.isReceivables = '1' // 当前的页面为收款页面时,将isReceivables赋值为:1,后端接收到isReceivables值为1时,则判定当前页面为收款页面
+          if (this.commonJS.isNotEmpty(this.inputForm.financeInvoiceReceivablesDTOList)) {
+            let allNumber = 0 // 获取收款明细中的总金额
+            this.inputForm.financeInvoiceReceivablesDTOList.forEach((item, index) => {
+              if (this.commonJS.isEmpty(item.remittanceUnit)) {
+                this.$message.warning('收款明细中第 ' + (index + 1) + ' 条数据的 “汇款单位” 为空,请重新输入')
+                throw new Error()
+              }
+              if (this.commonJS.isEmpty(item.remittanceAmount) || item.remittanceAmount === 0 || item.remittanceAmount === '0') {
+                this.$message.warning('收款明细中第 ' + (index + 1) + ' 条数据的 “汇款金额” 为空,请重新输入')
+                throw new Error()
+              } else {
+                allNumber = parseFloat(parseFloat(allNumber) + parseFloat(item.remittanceAmount))
+              }
+              if (this.commonJS.isEmpty(item.remittanceDate)) {
+                this.$message.warning('收款明细中第 ' + (index + 1) + ' 条数据的 “汇款时间” 为空,请重新输入')
+                throw new Error()
+              } else {
+                // this.inputForm.receivablesDate 是发票的收款时间
+                if (index === 0) {
+                  this.inputForm.receivablesDate = item.remittanceDate
+                } else {
+                  if (item.remittanceDate > this.inputForm.receivablesDate) {
+                    this.inputForm.receivablesDate = item.remittanceDate
+                  }
+                }
+              }
+            })
+            if (parseFloat(this.inputForm.account) < parseFloat(allNumber)) {
+              this.$message.warning('收款明细的总金额不能超过发票总金额,请重新输入')
+              throw new Error('收款明细的总金额不能超过发票总金额,请重新输入')
             }
-          })
+          }
+          if (this.commonJS.isNotEmpty(this.inputForm.financeInvoiceReceivablesDTOList)) {
+            // 如果收款明细中的数据不是空,则将是否收款的状态改为部分收款
+            this.inputForm.receivablesStatus = '2'
+          } else {
+            // 如果收款明细中的数据是空,则将是否收款的状态改为未收款
+            this.inputForm.receivablesStatus = '0'
+            // 如果收款明细中的数据是空,则将收款日期置空
+            this.inputForm.receivablesDate = ''
+          }
         }
         this.$refs['inputForm'].validate((valid) => {
           if (valid) {
@@ -882,7 +916,10 @@
           workAttachmentDtoList: [],
           financeInvoiceDetailDTOList: [],
           financeInvoiceReceivablesDTOList: [],
-          financeInvoiceInvalidDTO: {}
+          financeInvoiceInvalidDTO: {},
+          receivablesDate: '',
+          receivablesStatus: '',
+          isReceivables: ''
         }
         this.bankList = []
         this.detailFlag = false
@@ -1135,7 +1172,6 @@
         }
       },
       async beforeUploadDetailCode (file) {
-        console.log('110', this.inputForm.taxpayerIdentificationNo)
         await this.checkIdentificationNo()
         const formBody = new FormData()
         formBody.append('file', file.raw)

+ 43 - 1
src/views/modules/cw/invoice/InvoiceFormTask.vue

@@ -723,6 +723,12 @@
             })
           }
         }
+      },
+      'loading': {
+        handler (newVal) {
+          this.$emit('changeLoading', newVal)
+          this.$refs.uploadComponent.changeLoading(newVal)
+        }
       }
     },
     methods: {
@@ -840,11 +846,26 @@
         this.doSubmit('save', callback)
       },
       startForm (callback) {
-        this.doSubmit('start', callback)
+        this.loading = true
+        if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+          this.financeInvoiceService.queryById(this.inputForm.id).then(({data}) => {
+            if (data.status !== '0' && data.status !== '1' && data.status !== '3') { // 审核状态不是“未发起”或“暂存”或“撤回”,就弹出提示
+              this.loading = false
+              this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+              throw new Error()
+            } else {
+              this.doSubmit('start', callback)
+            }
+          })
+        } else {
+          this.doSubmit('start', callback)
+        }
       },
       async agreeForm (callback) {
+        this.loading = true
         await this.financeInvoiceService.queryById(this.inputForm.id).then(({data}) => {
           if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+            this.loading = false
             this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
             throw new Error()
           } else {
@@ -853,8 +874,10 @@
         })
       },
       reapplyForm (callback) {
+        this.loading = true
         this.financeInvoiceService.queryById(this.inputForm.id).then(({data}) => {
           if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
+            this.loading = false
             this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
             throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
           } else {
@@ -864,6 +887,7 @@
       },
       // 表单提交
       async doSubmit (status, callback) {
+        this.loading = true
         if (await this.$refs.uploadComponent.checkProgress()) {
           this.loading = false
           throw new Error()
@@ -890,10 +914,12 @@
           this.inputForm.status = '2'
         }
         if (this.commonJS.isEmpty(this.inputForm.financeInvoiceBaseDTOList)) {
+          this.loading = false
           this.$message.error('至少新增一条基本信息')
           throw new Error()
         } else {
           if (this.inputForm.financeInvoiceBaseDTOList.length === 0) {
+            this.loading = false
             this.$message.error('至少新增一条基本信息')
             throw new Error()
           }
@@ -902,6 +928,7 @@
           let i = this.inputForm.financeInvoiceBaseDTOList.length
           for (let j = 0; j < i; j++) {
             if (this.commonJS.isEmpty(this.inputForm.financeInvoiceBaseDTOList[j].programName)) {
+              this.loading = false
               this.$message.error('第' + (j + 1) + '行的基本信息不能为空')
               throw new Error()
             }
@@ -911,16 +938,19 @@
           let acc = 0
           this.inputForm.financeInvoiceDetailDTOList.forEach((item, index) => {
             if (this.commonJS.isEmpty(item.number)) {
+              this.loading = false
               this.$message.warning('发票明细中第 ' + (index + 1) + ' 条数据的 “发票号” 为空')
               throw new Error()
             }
             if (this.commonJS.isEmpty(item.account)) {
+              this.loading = false
               this.$message.warning('发票明细中第 ' + (index + 1) + ' 条数据的 “开票金额” 为空')
               throw new Error()
             }
             acc = (acc + parseFloat(parseFloat(item.account).toFixed(2)))
           })
           if (acc !== this.inputForm.account) {
+            this.loading = false
             this.$message.warning('发票明细中 “开票金额”总和 与发票详情中 “发票金额” 不等')
             throw new Error()
           }
@@ -928,6 +958,7 @@
             this.inputForm.financeInvoiceDetailDTOList.forEach((item2, index2) => {
               if (index !== index2) {
                 if (item.number === item2.number) {
+                  this.loading = false
                   this.$message.warning('发票明细中第 ' + (index + 1) + ' 条数据的 “发票号” 存在重复')
                   throw new Error()
                 }
@@ -936,17 +967,20 @@
           })
           for await (let [index, item] of this.inputForm.financeInvoiceDetailDTOList.entries()) {
             if (this.commonJS.isEmpty(item.number)) {
+              this.loading = false
               this.$message.warning('发票明细中第 ' + (index + 1) + ' 条数据的 “发票号” 为空')
               this.err = true
             }
             await this.financeInvoiceService.queryByNumber(item.number, item.id).then(({data}) => {
               if (data === true) {
+                this.loading = false
                 this.$message.warning('发票明细中第 ' + (index + 1) + ' 条数据的 “发票号” 存在重复')
                 this.err = data
               }
             })
           }
           if (this.err === true) {
+            this.loading = false
             this.err = ''
             throw new Error()
           }
@@ -966,11 +1000,14 @@
               if (status === 'start' || status === 'reapply') {
                 this.inputForm.title = `${this.$store.state.user.name} 发起了 ${data.no} [财务-发票申请]`
               }
+              this.inputForm.id = data.businessId
               callback(data.businessTable, data.businessId, this.inputForm)
               this.loading = false
             }).catch(() => {
               this.loading = false
             })
+          } else {
+            this.loading = false
           }
         })
       },
@@ -1211,6 +1248,7 @@
         }
       },
       async updateStatusById (type, callback) {
+        this.loading = true
         if (await this.$refs.uploadComponent.checkProgress()) {
           this.loading = false
           throw new Error()
@@ -1218,6 +1256,7 @@
           if (type === 'reject' || type === 'reback') {
             this.financeInvoiceService.queryById(this.inputForm.id).then(({data}) => {
               if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+                this.loading = false
                 this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
                 throw new Error()
               } else {
@@ -1236,6 +1275,7 @@
                 if (type === 'reject' || type === 'reback') {
                   let param = {status: this.inputForm.status, id: this.inputForm.id}
                   this.financeInvoiceService.updateStatusById(param).then(() => {
+                    this.loading = false
                     callback()
                   })
                 }
@@ -1244,12 +1284,14 @@
           } else if (type === 'hold') {
             this.financeInvoiceService.queryById(this.inputForm.id).then(({data}) => {
               if (data.status !== '4') { // status的值不等于“驳回”就弹出提示
+                this.loading = false
                 this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
                 throw new Error()
               } else {
                 // 终止
                 let param = {status: '1', id: this.inputForm.id}
                 this.financeInvoiceService.updateStatusById(param).then(() => {
+                  this.loading = false
                   callback()
                 })
               }

+ 40 - 4
src/views/modules/cw/invoice/InvoiceFormTaskInvalid.vue

@@ -663,6 +663,12 @@
             })
           }
         }
+      },
+      'loading': {
+        handler (newVal) {
+          this.$emit('changeLoading', newVal)
+          this.$refs.uploadComponent.changeLoading(newVal)
+        }
       }
     },
     methods: {
@@ -778,21 +784,34 @@
         this.doSubmit('save', callback)
       },
       startForm (callback) {
-        this.doSubmit('start', callback)
+        this.loading = true
+        this.financeInvoiceService.queryById(this.inputForm.id).then(({data}) => {
+          if (data.status !== '5') { // status的值不等于“审批完成”(发票作废只有发票申请通过后才可以发起),就弹出提示
+            this.loading = false
+            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+          } else {
+            this.doSubmit('start', callback)
+          }
+        })
       },
-      async agreeForm (callback) {
-        await this.financeInvoiceService.queryById(this.inputForm.id).then(({data}) => {
+      agreeForm (callback) {
+        this.loading = true
+        this.financeInvoiceService.queryById(this.inputForm.id).then(({data}) => {
           if (data.status !== '6') { // status的值不等于“审核中”,就弹出提示
+            this.loading = false
             this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-            throw new Error()
+            throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
           } else {
             this.doSubmit('agree', callback)
           }
         })
       },
       reapplyForm (callback) {
+        this.loading = true
         this.financeInvoiceService.queryById(this.inputForm.id).then(({data}) => {
           if (data.status !== '8') { // 审核状态不是“驳回”,就弹出提示
+            this.loading = false
             this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
             throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
           } else {
@@ -802,6 +821,7 @@
       },
       // 表单提交
       async doSubmit (status, callback) {
+        this.loading = true
         if (await this.$refs.uploadComponent.checkProgress()) {
           this.loading = false
           throw new Error()
@@ -841,10 +861,12 @@
           throw new Error('请填写作废原因')
         }
         if (this.commonJS.isEmpty(this.inputForm.financeInvoiceBaseDTOList)) {
+          this.loading = false
           this.$message.error('至少新增一条基本信息')
           return
         } else {
           if (this.inputForm.financeInvoiceBaseDTOList.length === 0) {
+            this.loading = false
             this.$message.error('至少新增一条基本信息')
             return
           }
@@ -853,16 +875,19 @@
           let acc = 0
           this.inputForm.financeInvoiceDetailDTOList.forEach((item, index) => {
             if (this.commonJS.isEmpty(item.number)) {
+              this.loading = false
               this.$message.warning('发票明细中第 ' + (index + 1) + ' 条数据的 “发票号” 为空')
               throw new Error()
             }
             if (this.commonJS.isEmpty(item.account)) {
+              this.loading = false
               this.$message.warning('发票明细中第 ' + (index + 1) + ' 条数据的 “开票金额” 为空')
               throw new Error()
             }
             acc = (acc + parseFloat(parseFloat(item.account).toFixed(2)))
           })
           if (acc !== this.inputForm.account) {
+            this.loading = false
             this.$message.warning('发票明细中 “开票金额”总和 与发票详情中 “发票金额” 不等')
             return
           }
@@ -870,6 +895,7 @@
             this.inputForm.financeInvoiceDetailDTOList.forEach((item2, index2) => {
               if (index !== index2) {
                 if (item.number === item2.number) {
+                  this.loading = false
                   this.$message.warning('发票明细中第 ' + (index + 1) + ' 条数据的 “发票号” 存在重复')
                   throw new Error()
                 }
@@ -878,17 +904,20 @@
           })
           for await (let [index, item] of this.inputForm.financeInvoiceDetailDTOList.entries()) {
             if (this.commonJS.isEmpty(item.number)) {
+              this.loading = false
               this.$message.warning('发票明细中第 ' + (index + 1) + ' 条数据的 “发票号” 为空')
               this.err = true
             }
             await this.financeInvoiceService.queryByNumber(item.number, item.id).then(({data}) => {
               if (data === true) {
+                this.loading = false
                 this.$message.warning('发票明细中第 ' + (index + 1) + ' 条数据的 “发票号” 存在重复')
                 this.err = data
               }
             })
           }
           if (this.err === true) {
+            this.loading = false
             this.err = ''
             return
           }
@@ -903,6 +932,8 @@
             }).catch(() => {
               this.loading = false
             })
+          } else {
+            this.loading = false
           }
         })
       },
@@ -1144,6 +1175,7 @@
         }
       },
       async updateStatusById (type, callback) {
+        this.loading = true
         if (await this.$refs.uploadComponent.checkProgress()) {
           this.loading = false
           throw new Error()
@@ -1151,6 +1183,7 @@
           if (type === 'reject' || type === 'reback') {
             this.financeInvoiceService.queryById(this.inputForm.id).then(({data}) => {
               if (data.status !== '6') { // status的值不等于“审核中”,就弹出提示
+                this.loading = false
                 this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
                 throw new Error()
               } else {
@@ -1171,6 +1204,7 @@
                 if (type === 'reject' || type === 'reback') {
                   let param = {status: this.inputForm.status, id: this.inputForm.id}
                   this.financeInvoiceService.updateStatusById(param).then(() => {
+                    this.loading = false
                     callback()
                   })
                 }
@@ -1179,12 +1213,14 @@
           } else if (type === 'hold') {
             this.financeInvoiceService.queryById(this.inputForm.id).then(({data}) => {
               if (data.status !== '8') { // status的值不等于“驳回”就弹出提示
+                this.loading = false
                 this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
                 throw new Error()
               } else {
                 // 终止
                 let param = {status: '5', id: this.inputForm.id}
                 this.financeInvoiceService.updateStatusById(param).then(() => {
+                  this.loading = false
                   callback()
                 })
               }

+ 118 - 2
src/views/modules/cw/invoice/InvoiceList.vue

@@ -251,6 +251,14 @@
               <el-button v-if="hasPermission('cw_finance:invoice:edit')&&scope.row.createBy.id === $store.state.user.id&&(scope.row.status === '5'||scope.row.status === '7')" type="text"  size="small" @click="invoiceInvalidPush(scope.row)">作废</el-button>
               <el-button v-if="hasPermission('cw_finance:invoice:edit')&&scope.row.createBy.id === $store.state.user.id&&scope.row.status === '6'" type="text"  size="small" @click="invoiceInvalidReBack(scope.row)">作废撤回</el-button>
               <el-button v-if="hasPermission('cw_finance:invoice:edit')&&scope.row.createBy.id === $store.state.user.id&&(scope.row.status === '1'||scope.row.status === '3')" type="text"   size="small" @click="del(scope.row.id)">删除</el-button>
+<!--              审核  发票申请-->
+              <el-button v-if="scope.row.status==='2' && checkIsAudit(scope.row)" type="text"  size="small" @click="examine(scope.row)">审核</el-button>
+<!--              被驳回后当前申请人重新调整  发票申请-->
+              <el-button v-if="scope.row.createBy.id === $store.state.user.id&&scope.row.status === '4'" type="text"  size="small" @click="adjust(scope.row)">驳回调整</el-button>
+<!--              审核  发票作废-->
+              <el-button v-if="scope.row.status==='6' && checkIsAuditInvalid(scope.row)" type="text"  size="small" @click="examineInvalid(scope.row)">作废审核</el-button>
+<!--              被驳回后当前申请人重新调整  发票作废-->
+              <el-button v-if="scope.row.createBy.id === $store.state.user.id&&scope.row.status === '8'" type="text"  size="small" @click="adjustInvalid(scope.row)">驳回调整</el-button>
             </template>
           </vxe-column>
         </vxe-table>
@@ -702,7 +710,7 @@
           cancelButtonText: '取消',
           type: 'warning'
         }).then(() => {
-          let param = {id: row.id, receivablesStatus: '1', receivablesDate: this.moment(new Date()).format('YYYY-MM-DD')}
+          let param = {id: row.id, receivablesStatus: '1'}
           this.financeInvoiceService.isReceivables(param).then(({data}) => {
             this.$message.success(data)
             this.refreshList()
@@ -715,7 +723,7 @@
           cancelButtonText: '取消',
           type: 'warning'
         }).then(() => {
-          let param = {id: row.id, receivablesStatus: '0', receivablesDate: this.moment(new Date()).format('YYYY-MM-DD')}
+          let param = {id: row.id, receivablesStatus: '0'}
           this.financeInvoiceService.isReceivables(param).then(({data}) => {
             this.$message.success(data)
             this.refreshList()
@@ -764,6 +772,114 @@
             console.log(err.response)
           }
         })
+      },
+      // 驳回后调整
+      adjust (row) {
+        this.financeInvoiceService.queryById(row.id).then(({data}) => {
+          if (data.status !== '4') { // status的值不等于“驳回”,就弹出提示
+            this.$message.error('数据已发生改变或不存在,请刷新数据')
+            this.refreshList()
+          } else {
+            this.todo(row)
+          }
+        })
+      },
+      // 审核
+      examine (row) {
+        this.financeInvoiceService.queryById(row.id).then(({data}) => {
+          if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+            this.$message.error('数据已发生改变或不存在,请刷新数据')
+            this.refreshList()
+          } else {
+            this.todo(row)
+          }
+        })
+      },
+      // 审核或重新调整跳转
+      todo (row) {
+        let cUser = false
+        this.taskService.getTaskDefInfo({
+          taskId: row.taskId
+        }).then(({data}) => {
+          this.$router.push({
+            path: '/flowable/task/TaskForm',
+            query: {
+              ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId'),
+              isShow: false,
+              formReadOnly: true,
+              formTitle: `${data.taskName}`,
+              cUser: cUser,
+              title: `审批【${data.taskName || ''}】`,
+              routePath: '/cw/invoice/InvoiceList'   // 数据处理后需要跳转的页面路径
+            }
+          })
+        })
+      },
+      // 查询当前登录人是否是数据的审核人
+      checkIsAudit (row) {
+        let loginUserId = this.$store.state.user.id  // 获取当前登录用户id
+        if (this.commonJS.isNotEmpty(row.auditUserIds)) {
+          for (const userId of row.auditUserIds) {
+            if (userId === loginUserId) {  // 当数据的审核人中包含当前登录人id时,返回true
+              return true
+            }
+          }
+        }
+        return false
+      },
+      // 驳回后调整
+      adjustInvalid (row) {
+        this.financeInvoiceService.queryById(row.id).then(({data}) => {
+          if (data.status !== '8') { // status的值不等于“驳回”,就弹出提示
+            this.$message.error('数据已发生改变或不存在,请刷新数据')
+            this.refreshList()
+          } else {
+            this.todoInvalid(row)
+          }
+        })
+      },
+      // 审核
+      examineInvalid (row) {
+        this.financeInvoiceService.queryById(row.id).then(({data}) => {
+          if (data.status !== '6') { // status的值不等于“审核中”,就弹出提示
+            this.$message.error('数据已发生改变或不存在,请刷新数据')
+            this.refreshList()
+          } else {
+            this.todoInvalid(row)
+          }
+        })
+      },
+      // 审核或重新调整跳转
+      todoInvalid (row) {
+        let cUser = false
+        this.taskService.getTaskDefInfo({
+          taskId: row.invalidTaskId
+        }).then(({data}) => {
+          this.$router.push({
+            path: '/flowable/task/TaskForm',
+            query: {
+              ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId'),
+              isShow: false,
+              formReadOnly: true,
+              formTitle: `${data.taskName}`,
+              cUser: cUser,
+              title: `审批【${data.taskName || ''}】`,
+              routePath: '/cw/invoice/InvoiceList'   // 数据处理后需要跳转的页面路径
+            }
+          })
+        })
+      },
+      // 查询当前登录人是否是数据的审核人
+      checkIsAuditInvalid (row) {
+        let loginUserId = this.$store.state.user.id  // 获取当前登录用户id
+        if (this.commonJS.isNotEmpty(row.auditUserIdsInvalid)) {
+          for (const userId of row.auditUserIdsInvalid) {
+            if (userId === loginUserId) {  // 当数据的审核人中包含当前登录人id时,返回true
+              return true
+            }
+          }
+        }
+        return false
       }
     }
   }

+ 7 - 0
src/views/modules/cw/projectBusinessType/CwProjectBusinessTypeForm.vue

@@ -106,6 +106,13 @@
         this.$refs['inputForm'].validate((valid) => {
           if (valid) {
             this.loading = true
+            let numReg = /^[0-9]*$/
+            let numRe = new RegExp(numReg)
+            if (!numRe.test(this.inputForm.sort)) {
+              this.loading = false
+              this.$message.error('排序请输入数字')
+              return
+            }
             this.cwProjectBusinessTypeService.save(this.inputForm).then(({data}) => {
               this.close()
               this.$message.success(data)

+ 58 - 0
src/views/modules/cw/reimbursementApproval/info/InfoList.vue

@@ -164,6 +164,10 @@
               <el-button v-if="hasPermission('cw:reimbursement:info:edit') && scope.row.createId === $store.state.user.id && (scope.row.type === '1' || scope.row.type === '3' )" type="text"  size="small" @click="edit(scope.row)">修改</el-button>
               <el-button v-if="hasPermission('cw:reimbursement:info:edit') && scope.row.createId === $store.state.user.id && (scope.row.type === '2')" type="text"  size="small" @click="reback(scope.row)">撤回</el-button>
               <el-button v-if="hasPermission('cw:reimbursement:info:del') && scope.row.createId === $store.state.user.id && (scope.row.type === '1')" type="text"  size="small" @click="del(scope.row.id)">删除</el-button>
+<!--              审核-->
+              <el-button v-if="scope.row.type==='2' && checkIsAudit(scope.row)" type="text"  size="small" @click="examine(scope.row)">审核</el-button>
+<!--              被驳回后当前申请人重新调整-->
+              <el-button v-if="scope.row.createId === $store.state.user.id&&scope.row.type === '4'" type="text"  size="small" @click="adjust(scope.row)">驳回调整</el-button>
             </template>
           </vxe-column>
         </vxe-table>
@@ -532,6 +536,60 @@
             console.log(err.response)
           }
         })
+      },
+      // 驳回后调整
+      adjust (row) {
+        this.reimbursementApprovalService.findById(row.id).then(({data}) => {
+          if (data.type !== '4') { // status的值不等于“驳回”,就弹出提示
+            this.$message.error('数据已发生改变或不存在,请刷新数据')
+            this.refreshList()
+          } else {
+            this.todo(row)
+          }
+        })
+      },
+      // 审核
+      examine (row) {
+        this.reimbursementApprovalService.findById(row.id).then(({data}) => {
+          if (data.type !== '2') { // status的值不等于“审核中”,就弹出提示
+            this.$message.error('数据已发生改变或不存在,请刷新数据')
+            this.refreshList()
+          } else {
+            this.todo(row)
+          }
+        })
+      },
+      // 审核或重新调整跳转
+      todo (row) {
+        let cUser = false
+        this.taskService.getTaskDefInfo({
+          taskId: row.taskId
+        }).then(({data}) => {
+          this.$router.push({
+            path: '/flowable/task/TaskForm',
+            query: {
+              ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId'),
+              isShow: false,
+              formReadOnly: true,
+              formTitle: `${data.taskName}`,
+              cUser: cUser,
+              title: `审批【${data.taskName || ''}】`,
+              routePath: '/cw/reimbursementApproval/info/InfoList'   // 数据处理后需要跳转的页面路径
+            }
+          })
+        })
+      },
+      // 查询当前登录人是否是数据的审核人
+      checkIsAudit (row) {
+        let loginUserId = this.$store.state.user.id  // 获取当前登录用户id
+        if (this.commonJS.isNotEmpty(row.auditUserIds)) {
+          for (const userId of row.auditUserIds) {
+            if (userId === loginUserId) {  // 当数据的审核人中包含当前登录人id时,返回true
+              return true
+            }
+          }
+        }
+        return false
       }
     }
   }

+ 95 - 31
src/views/modules/cw/reimbursementApproval/info/ReimbursementForm.vue

@@ -733,6 +733,12 @@
             })
           }
         }
+      },
+      'loading': {
+        handler (newVal) {
+          this.$emit('changeLoading', newVal)
+          this.$refs.uploadComponent.changeLoading(newVal)
+        }
       }
     },
     methods: {
@@ -991,10 +997,35 @@
         // })
       },
       reapplyForm (callback) {
-        this.startForm(callback)
+        this.loading = true
+        this.reimbursementApprovalService.findById(this.inputForm.id).then(({data}) => {
+          if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
+            this.loading = false
+            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+          } else {
+            this.startFormTrue(callback)
+          }
+        })
+      },
+      startForm (callback) {
+        this.loading = true
+        if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+          this.reimbursementApprovalService.findById(this.inputForm.id).then(({data}) => {
+            if (data.type !== '0' && data.type !== '1' && data.type !== '3') { // 审核状态不是“未发起”或“暂存”或“撤回”,就弹出提示
+              this.loading = false
+              this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+              throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            } else {
+              this.startFormTrue(callback)
+            }
+          })
+        } else {
+          this.startFormTrue(callback)
+        }
       },
       // 送审
-      async startForm (callback) {
+      async startFormTrue (callback) {
         this.$refs['inputForm'].validate(async (valid) => {
           if (valid) {
             this.loading = true
@@ -1015,6 +1046,7 @@
             this.inputForm.type = '2'
             this.reimbursementApprovalService.save(this.inputForm).then(({data}) => {
               this.inputForm.title = `${this.$store.state.user.name} 发起了 [${data.no}] - [财务-报销审批]`
+              this.inputForm.id = data.businessId
               callback(data.businessTable, data.businessId, this.inputForm)
               this.$refs.inputForm.resetFields()
               this.loading = false
@@ -1030,35 +1062,48 @@
             //   this.$refs.inputForm.resetFields()
             //   this.loading = false
             // })
+          } else {
+            this.loading = false
           }
         })
       },
       // 通过
       async agreeForm (callback) {
-        this.$refs['inputForm'].validate(async (valid) => {
-          if (valid) {
-            this.loading = true
-            this.submitCheck()
-            if (this.$refs.uploadComponent.checkProgress()) {
-              this.loading = false
-              return
-            }
-            if (this.commonJS.isEmpty(this.inputForm.files)) {
-              this.inputForm.files = []
-            }
-            this.inputForm.files = this.$refs.uploadComponent.getDataList()
-            this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then(({data}) => {
-              if (this.commonJS.isNotEmpty(data)) {
-                if (data === '公司领导审批') {
-                  this.inputForm.type = '5'
+        this.loading = true
+        this.reimbursementApprovalService.findById(this.inputForm.id).then(({data}) => {
+          if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
+            this.loading = false
+            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+          } else {
+            this.$refs['inputForm'].validate(async (valid) => {
+              if (valid) {
+                this.loading = true
+                this.submitCheck()
+                if (this.$refs.uploadComponent.checkProgress()) {
+                  this.loading = false
+                  return
                 }
-              }
-              this.reimbursementApprovalService.save(this.inputForm).then(({data}) => {
-                callback(data.businessTable, data.businessId, this.inputForm)
-                this.loading = false
-              }).catch(() => {
+                if (this.commonJS.isEmpty(this.inputForm.files)) {
+                  this.inputForm.files = []
+                }
+                this.inputForm.files = this.$refs.uploadComponent.getDataList()
+                this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then(({data}) => {
+                  if (this.commonJS.isNotEmpty(data)) {
+                    if (data === '公司领导审批') {
+                      this.inputForm.type = '5'
+                    }
+                  }
+                  this.reimbursementApprovalService.save(this.inputForm).then(({data}) => {
+                    callback(data.businessTable, data.businessId, this.inputForm)
+                    this.loading = false
+                  }).catch(() => {
+                    this.loading = false
+                  })
+                })
+              } else {
                 this.loading = false
-              })
+              }
             })
           }
         })
@@ -1066,15 +1111,34 @@
       // 修改状态
       updateStatusById (type, callback) {
         if (type === 'reject') {
-          this.inputForm.type = '4'
-          this.reimbursementApprovalService.updateStatusById(this.inputForm).then(() => {
-            callback()
+          this.loading = true
+          this.reimbursementApprovalService.findById(this.inputForm.id).then(({data}) => {
+            if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
+              this.loading = false
+              this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+              throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            } else {
+              this.inputForm.type = '4'
+              this.reimbursementApprovalService.updateStatusById(this.inputForm).then(() => {
+                this.loading = false
+                callback()
+              })
+            }
           })
-          // this.reimbursementService.updateStatusById(this.inputForm)
         } else if (type === 'hold') {
-          this.inputForm.type = '1'
-          this.reimbursementApprovalService.updateStatusById(this.inputForm).then(() => {
-            callback()
+          this.loading = true
+          this.reimbursementApprovalService.findById(this.inputForm.id).then(({data}) => {
+            if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
+              this.loading = false
+              this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+              throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            } else {
+              this.inputForm.type = '1'
+              this.reimbursementApprovalService.updateStatusById(this.inputForm).then(() => {
+                this.loading = false
+                callback()
+              })
+            }
           })
         }
       },

+ 51 - 27
src/views/modules/cw/reportManagement/reportReview/ReportReviewForm.vue

@@ -616,6 +616,7 @@
   import ProjectReportService from '@/api/cw/reportManagement/ProjectReportService'
   import EnterpriseSearchService from '@/api/cw/common/EnterpriseSearchService'
   import UserService from '@/api/sys/UserService'
+  import CommonApi from '@/api/cw/common/CommonApi'
   export default {
     props: {
       businessId: {
@@ -714,6 +715,7 @@
     ProjectReportService: null,
     enterpriseSearchService: null,
     userService: null,
+    commonApi: null,
     created () {
       this.enterpriseSearchService = new EnterpriseSearchService()
       // this.projectReportService = new ProjectReportService()
@@ -721,6 +723,7 @@
       this.reportReviewService = new ReportReviewService()
       this.projectReportService = new ProjectReportService()
       this.userService = new UserService()
+      this.commonApi = new CommonApi()
     },
     computed: {
       bus: {
@@ -1059,33 +1062,31 @@
               throw new Error()
             } else {
               if (type === 'reject') {
-                // 驳回
-                let param
-                // this.userService.is().then(({data}) => {
-                //   if (data) {
-                //     this.inputForm.reviewStatus = '2'
-                //     // param = {status: '4', id: this.inputForm.id}
-                //   } else {
-                //     this.inputForm.reviewStatus = '4'
-                //   }
-                // })
-                this.inputForm.reviewStatus = '4'
-                // 列表处理
-                this.inputForm.details = []
-                this.inputForm.detailFor1010.forEach(item => { this.inputForm.details.push(item) })
-                this.inputForm.detailFor1020.forEach(item => { this.inputForm.details.push(item) })
-                this.inputForm.detailFor1030.forEach(item => { this.inputForm.details.push(item) })
-                param = {reviewStatus: this.inputForm.reviewStatus,
-                  id: this.inputForm.id,
-                  needUpdate2: this.inputForm.needUpdate2,
-                  needUpdate3: this.inputForm.needUpdate3,
-                  remark2: this.inputForm.remark2,
-                  remark3: this.inputForm.remark3,
-                  details: this.inputForm.details
-                }
-                this.reportReviewService.updateReviewStatysByReportId(param).then(() => {
-                  this.loading = false
-                  callback()
+                this.reportReviewService.queryByReportId(this.inputForm.id).then((review) => {
+                  this.commonApi.getTaskNameByProcInsId(review.data.procInsId).then(({data}) => {
+                    if (data === '二级复核') { // 二级复核 进入下面操作,不是二级复核 直接驳回
+                      this.reportReviewService.getHaveReportNo(this.inputForm.id).then((haveReportNo) => { // 根据报告id查询是否已经生成报告文号
+                        console.log(haveReportNo)
+                        if (haveReportNo.data === '1' || haveReportNo.data === 1) { // 返回值为 ’1‘,已生成报告文号,直接驳回
+                          this.rejectOn(callback)
+                        } else { // 返回值为 ’0‘,未生成报告文号,询问是否需要生成报告文号?是 则生成后驳回,否 则直接驳回
+                          this.$confirm(`是否需要生成报告文号?`, '提示', {
+                            confirmButtonText: '确定',
+                            cancelButtonText: '取消',
+                            type: 'warning'
+                          }).then(() => { // 是  则生成报告文号后驳回
+                            this.reportReviewService.saveReportNo(this.inputForm.id).then(() => {
+                              this.rejectOn(callback)
+                            })
+                          }).catch(() => { // 否  则直接驳回
+                            this.rejectOn(callback)
+                          })
+                        }
+                      })
+                    } else {
+                      this.rejectOn(callback)
+                    }
+                  })
                 })
               }
               if (type === 'reback') {
@@ -1112,6 +1113,29 @@
           })
         }
       },
+      // 这个方法是这个之前这个页面的驳回方法,现在粘出来复用
+      rejectOn (callback) {
+        // 驳回
+        let param
+        this.inputForm.reviewStatus = '4'
+        // 列表处理
+        this.inputForm.details = []
+        this.inputForm.detailFor1010.forEach(item => { this.inputForm.details.push(item) })
+        this.inputForm.detailFor1020.forEach(item => { this.inputForm.details.push(item) })
+        this.inputForm.detailFor1030.forEach(item => { this.inputForm.details.push(item) })
+        param = {reviewStatus: this.inputForm.reviewStatus,
+          id: this.inputForm.id,
+          needUpdate2: this.inputForm.needUpdate2,
+          needUpdate3: this.inputForm.needUpdate3,
+          remark2: this.inputForm.remark2,
+          remark3: this.inputForm.remark3,
+          details: this.inputForm.details
+        }
+        this.reportReviewService.updateReviewStatysByReportId(param).then(() => {
+          this.loading = false
+          callback()
+        })
+      },
       close () {
         this.inputForm = {
           id: '',

+ 13 - 11
src/views/modules/cw/workContract/ContractRegistration.vue

@@ -172,13 +172,14 @@
           <vxe-column title="操作" min-width="200px" fixed="right" align="center">
             <template  slot-scope="scope">
 <!--              <el-button v-if="hasPermission('cw:workContract:view')" type="text" size="small" @click="view(scope.row.id)">查看</el-button>-->
-              <el-button v-if="hasPermission('cw:workContract:edit') && scope.row.status !== '2' && scope.row.status !== '4' && scope.row.status !== '5' && scope.row.createId === $store.state.user.id" type="text" size="small" @click="edit(scope.row)">修改</el-button>
-              <el-button v-if="hasPermission('cw:workContract:edit') && scope.row.status === '5' && isAdmin && (scope.row.filedPaperType === '0' || scope.row.filedPaperType === '1' || scope.row.filedPaperType === '3')" type="text" size="small" @click="editForm(scope.row.id)">修改</el-button>
+              <el-button v-if="hasPermission('cw:workContract:edit') && (scope.row.createId === $store.state.user.id || isAdmin) &&
+              (scope.row.filedPaperType !== '2' || scope.row.filedPaperType !== '5')" type="text" size="small" @click="edit(scope.row)">修改</el-button>
+<!--              <el-button v-if="hasPermission('cw:workContract:edit') && scope.row.status === '5' && isAdmin && (scope.row.filedPaperType === '0' || scope.row.filedPaperType === '1' || scope.row.filedPaperType === '3')" type="text" size="small" @click="editForm(scope.row.id)">修改</el-button>-->
               <!--<el-button v-else-if="hasPermission('cw:workContract:edit') && scope.row.status === '5' && scope.row.createId === $store.state.user.id && (scope.row.filedPaperType === '0' || scope.row.filedPaperType === '1' || scope.row.filedPaperType === '3' || commonJS.isEmpty(scope.row.filedPaperType))" type="text" size="small" @click="editForm(scope.row.id)">修改</el-button>-->
               <!--              审核-->
-              <el-button v-if="scope.row.status==='2' && checkIsAudit(scope.row)" type="text"  size="small" @click="examine(scope.row)">审核</el-button>
+<!--              <el-button v-if="scope.row.status==='2' && checkIsAudit(scope.row)" type="text"  size="small" @click="examine(scope.row)">审核</el-button>-->
               <!--              被驳回后当前申请人重新调整-->
-              <el-button v-if="hasPermission('cw:workContract:edit')&&scope.row.createId === $store.state.user.id&&scope.row.status === '4'" type="text"  size="small" @click="adjust(scope.row)">驳回调整</el-button>
+<!--              <el-button v-if="hasPermission('cw:workContract:edit')&&scope.row.createId === $store.state.user.id&&scope.row.status === '4'" type="text"  size="small" @click="adjust(scope.row)">驳回调整</el-button>-->
               <!--              <el-button v-if="hasPermission('cw:workContract:edit') && scope.row.status === '5' && scope.row.filedType === '5' && scope.row.filedPaperType === '5' && isAdmin" type="text" size="small" @click="editForm(scope.row.id)">修改</el-button>-->
               <el-button v-if="hasPermission('cw:workContract:del') && (scope.row.status === '1' || scope.row.status === '3')  && scope.row.createId === $store.state.user.id" type="text" size="small" @click="del(scope.row.id)">删除</el-button>
               <el-button v-if="hasPermission('cw:workContract:back') && scope.row.status === '2' && scope.row.createId === $store.state.user.id" type="text" size="small" @click="reback(scope.row)">撤回</el-button>
@@ -368,8 +369,8 @@
       },
       // 新增
       add () {
-        // this.$refs.contractAddForm.init('add', '')
-        this.start()
+        this.$refs.contractAddForm.init('add', '')
+        // this.start()
       },
       // 详情
       detail (row) {
@@ -393,11 +394,12 @@
       },
       // 修改
       edit (row) {
-        if (row.status === '3' || row.status === '4') {
-          this.editWithClose(row)
-        } else {
-          this.editWithHold(row)
-        }
+        this.$refs.contractAddForm.init('edit', row.id)
+        // if (row.status === '3' || row.status === '4') {
+        //   this.editWithClose(row)
+        // } else {
+        //   this.editWithHold(row)
+        // }
       },
       // 管理员修改
       editForm (id) {

+ 268 - 99
src/views/modules/cw/workContract/contractRegisitionAddForm/ContractAddForm.vue

@@ -1,17 +1,19 @@
-<template>
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
   <div>
     <el-dialog
       :title="title"
       :close-on-click-modal="false"
       v-dialogDrag
-      width="1300px"
+      :append-to-body="true"
+      width="1200px"
+      height="500px"
       @close="close"
       @keyup.enter.native=""
       :visible.sync="visible">
-    <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="formReadOnly"
+    <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="status === 'audit' || status === 'taskFormDetail'|| method==='view'"
              label-width="150px">
 
-      <el-divider v-if="formReadOnly && commonJS.isNotEmpty(inputForm.customerId)" content-position="left">
+      <el-divider v-if="(status === 'audit' || status === 'taskFormDetail'|| method==='view') && commonJS.isNotEmpty(inputForm.customerId)" content-position="left">
         <el-link  type="primary" :underline="false" icon="el-icon-document" @click="viewClient(inputForm.customerId)"><b>查看客户详情</b></el-link>
       </el-divider>
       <el-divider v-else content-position="left"><i class="el-icon-document"></i> 客户信息</el-divider>
@@ -63,7 +65,7 @@
           <el-form-item label="合同名称" prop="contractName"
                         :rules="[{required: true, message: '合同名称不能为空', trigger: 'blur'}
                  ]">
-            <el-input v-model="inputForm.contractName" placeholder="请输入合同名称" clearable></el-input>
+            <el-input v-model="inputForm.contractName" placeholder="请输入合同名称"     clearable></el-input>
           </el-form-item>
         </el-col>
         <el-col :span="12">
@@ -73,10 +75,9 @@
         </el-col>
         <el-col :span="12">
           <el-form-item label="合同类型" prop="contractType"
-                        :rules="[
-                        {required: true, message: '合同类型不能为空', trigger: 'change'}
-                 ]">
-            <el-select v-model="inputForm.contractType" placeholder="请选择合同类型" style="width:100%;">
+                        :rules="[{required: true, message: '合同类型不能为空', trigger: 'blur'}
+                 ]" >
+            <el-select v-model="inputForm.contractType" :disabled="contractNoFlag" placeholder="请选择合同类型" style="width:100%;">
               <el-option
                 v-for="item in $dictUtils.getDictList('cw_contract_type')"
                 :key="item.value"
@@ -86,11 +87,6 @@
             </el-select>
           </el-form-item>
         </el-col>
-        <el-col :span="12">
-          <el-form-item label="合同流水号" prop="contractSerialNumber">
-            <el-input maxlength="64" :disabled="true" v-model="inputForm.contractSerialNumber" placeholder="自动生成"></el-input>
-          </el-form-item>
-        </el-col>
         <!--        <el-col :span="12">-->
         <!--          <el-form-item label="合同状态" prop="contractStatus">-->
         <!--            <el-input maxlength="64" v-model="inputForm.contractStatus" :disabled="true" placeholder="请输入合同状态"></el-input>-->
@@ -113,7 +109,6 @@
         <el-col :span="12">
           <el-form-item label="付款方式" prop="paymentMethod"
                         :rules="[
-                          {required: true, message: '付款方式不能为空', trigger: 'change'}
                  ]">
             <el-select v-model="inputForm.paymentMethod" placeholder="请选择付款方式" style="width:100%;">
               <el-option
@@ -233,6 +228,17 @@
         </el-col>
 
         <el-col :span="12">
+          <el-form-item label="预计金额(元)" prop="predictAmount" v-if="inputForm.contractAmountType === '2'"
+                        :rules="[
+                  /*{required: true, message:'请输入预计金额(元)', trigger:'blur'}*/
+               ]">
+            <el-input maxlength="15" v-model="inputForm.predictAmount" placeholder="请输入预计金额(元)"
+                      @keyup.native="inputForm.predictAmount = twoDecimalPlaces(inputForm.predictAmount)"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
           <el-form-item label="合同实际金额" prop="actualContractAmount">
             <el-input maxlength="64" :disabled="true" v-model="inputForm.actualContractAmount"
                       @keyup.native="inputForm.actualContractAmount = twoDecimalPlaces(inputForm.actualContractAmount)"
@@ -256,9 +262,9 @@
           </el-form-item>
         </el-col>
 
-        <el-col>
+        <el-col :span="24">
           <el-form-item label="付款约定" prop="paymentAgreement">
-            <el-input maxlength="64" type="textarea" v-model="inputForm.paymentAgreement" placeholder="请输入付款约定"></el-input>
+            <el-input maxlength="1000" type="textarea" v-model="inputForm.paymentAgreement" placeholder="请输入付款约定"></el-input>
           </el-form-item>
         </el-col>
 
@@ -272,7 +278,7 @@
         <el-tab-pane label="参与签约方" name="contactParty">
           <span slot="label"><span style="color: red;border-top: 20px">*</span> 参与签约方</span>
           <el-row :gutter="15">
-            <el-button type="primary" style="margin-bottom: 15px" size="mini" :disabled="formReadOnly" @click="openWorkClient">
+            <el-button type="primary" style="margin-bottom: 15px" size="mini" :disabled="status === 'audit' || status === 'taskFormDetail'|| method==='view'" @click="openWorkClient">
               新增参与签约方
             </el-button>
           </el-row>
@@ -305,34 +311,34 @@
                 </vxe-table-column>
                 <vxe-table-column align="center" title="操作" width="100">
                   <template v-slot="scope">
-                    <el-button size="mini" :disabled="formReadOnly" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'client')">删除</el-button>
+                    <el-button size="mini" :disabled="status === 'audit' || status === 'taskFormDetail'|| method==='view'" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'client')">删除</el-button>
                   </template>
                 </vxe-table-column>
               </vxe-table>
             </el-form>
           </el-row>
         </el-tab-pane>
-        <el-tab-pane  label="合同归档文件" name="archiveFile">
-          <!--        合同归档文件-->
-          <UpLoadComponent ref="archiveFile"></UpLoadComponent>
-        </el-tab-pane>
+        <!--        <el-tab-pane  label="合同归档文件" name="archiveFile">-->
+        <!--          &lt;!&ndash;        合同归档文件&ndash;&gt;-->
+        <!--          <UpLoadComponent ref="archiveFile"></UpLoadComponent>-->
+        <!--        </el-tab-pane>-->
 
       </el-tabs>
 
     </el-form>
-    <span slot="footer" class="dialog-footer">
-      <el-button size="small" @click="close()" icon="el-icon-circle-close">关闭</el-button>
-      <el-button size="small" v-if="method !== 'view'" type="primary" icon="el-icon-circle-check" @click="doSubmit('save')">确定</el-button>
-    </span>
     <el-image-viewer
       v-if="showViewer"
       :on-close="closeViewer"
       :url-list="[url]"
       zIndex="9999"/>
-    </el-dialog>
     <WorkClientChooseForm ref="workClientChooseForm" @getWorkClientChoose="getWorkClientChoose"></WorkClientChooseForm>
     <WorkClientChooseRadio ref="workClientChooseRadio" @getWorkClientRadioChoose="getWorkClientChoose2"></WorkClientChooseRadio>
     <WorkClientForm ref="workClientForm" @refreshList=""></WorkClientForm>
+      <span slot="footer" class="dialog-footer">
+      <el-button size="small" @click="close()" icon="el-icon-circle-close">关闭</el-button>
+      <el-button size="small" v-if="method !== 'view'" type="primary" icon="el-icon-circle-check" @click="doSubmit()">确定</el-button>
+    </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -368,6 +374,7 @@
         isSubmit: false,
         visible: false,
         loading: false,
+        contractNoFlag: false,
         returnForm: {
           customerId: '',  // 客户id
           address: '',
@@ -380,6 +387,7 @@
           contractType: '',
           contractAmountType: '',
           contractAmount: '',
+          predictAmount: '',
           contractOpposite: '',
           contractFees: [],
           fees: '',
@@ -401,7 +409,6 @@
           contractFees: [],
           contractFee: '',
           contractNo: '',
-          contractSerialNumber: '',
           contractType: '',
           contractName: '',
           payerSubject: '',
@@ -409,6 +416,7 @@
           paymentDescribe: '',
           signingDate: '',
           contractAmount: '',
+          predictAmount: '',
           actualContractAmount: '',
           contractNum: '2',
           contractStatus: '新创建',
@@ -451,6 +459,10 @@
       formReadOnly: {
         type: Boolean,
         default: false
+      },
+      status: {
+        type: String,
+        default: ''
       }
     },
     components: {
@@ -482,7 +494,7 @@
       },
       bus: {
         get () {
-          this.$refs.archiveFile.setDividerName('附件', false)
+          // this.$refs.archiveFile.setDividerName('附件', false)
           this.$refs.uploadComponent.setDividerName('附件', false)
           return this.businessId
         },
@@ -541,7 +553,6 @@
           contractFees: [],
           contractFee: '',
           contractNo: '',
-          contractSerialNumber: '',
           contractType: '',
           contractName: '',
           payerSubject: '',
@@ -550,6 +561,7 @@
           signingDate: '',
           fees: '',
           contractAmount: '',
+          predictAmount: '',
           actualContractAmount: '',
           contractNum: '',
           contractStatus: '',
@@ -568,23 +580,28 @@
         }
         this.inputForm.id = id
         if (method === 'add') {
-          this.title = `合同登记新建`
+          this.inputForm.id = 'add'
+          this.title = `新建合同`
         } else if (method === 'edit') {
-          this.title = '修改合同登记'
+          this.title = '修改合同'
         } else if (method === 'view') {
           this.inputForm.showVi = false
-          this.title = '查看合同登记'
+          this.title = '查看合同详情'
         }
         this.visible = true
         this.loading = false
         this.$nextTick(() => {
           this.$refs.inputForm.resetFields()
-          // if (method === 'edit' || method === 'view') { // 修改或者查看
           this.loading = true
           this.$refs.uploadComponent.clearUpload()
-          this.$refs.archiveFile.clearUpload()
+          // this.$refs.archiveFile.clearUpload()
           this.contractInfoService.findById(this.inputForm.id).then(({data}) => {
             this.inputForm = this.recover(this.inputForm, data)
+            if (this.inputForm.contractNo) {
+              this.contractNoFlag = true
+            } else {
+              this.contractNoFlag = false
+            }
             if (this.commonJS.isEmpty(this.inputForm.contractAmountType)) {
               this.inputForm.contractAmountType = '1'
             }
@@ -620,43 +637,15 @@
               })
             }
             this.inputForm.contractFees = f
-            if (this.formReadOnly) {
+            if (this.status === 'audit' || this.status === 'taskFormDetail') {
               method = 'view'
             }
             this.$refs.uploadComponent.newUpload(method, this.inputForm.contractProperList, 'cwWorkContract', null, null, null, null, false)
-            this.$refs.archiveFile.newUpload('view', [], 'cwWorkContract', null, null, null, null, false)
-            this.$refs.archiveFile.setDividerName('附件', false)
-            this.$refs.uploadComponent.setDividerName('附件', false)
+            // this.$refs.archiveFile.newUpload('view', [], 'cwWorkContract', null, null, null, null, false)
             this.loading = false
           })
         })
       },
-      // 表单提交  保存数据
-      doSubmit (status, callback) {
-        if (this.$refs.uploadComponent.checkProgress()) {
-          this.loading = false
-          throw new Error()
-        } else {
-          this.$refs['inputForm'].validate(async (valid) => {
-            if (valid) {
-              this.loading = true
-              this.inputForm.status = '5'
-              this.inputForm.filedType = '5'
-              this.inputForm.fees = this.inputForm.contractFees.join(',')
-              this.inputForm.contractProperList = this.$refs.uploadComponent.getDataList()
-              // this.inputForm.contractInfoList = this.$refs.archiveFile.getDataList()
-              this.contractInfoService.save(this.inputForm).then(({data}) => {
-                this.loading = false
-                this.$emit('refreshDataList')
-                this.close()
-              }).catch(() => {
-                this.$refs.inputForm.resetFields()
-                this.loading = false
-              })
-            }
-          })
-        }
-      },
       // 查看
       view (id) {
         this.$refs.workClientForm.init('view', id)
@@ -676,6 +665,17 @@
           this.inputForm.cwWorkClientContactDTOList.push(d)
           this.tableKeyClient = Math.random()
         }
+        // if (type === 'client') {
+        //   await this.$refs.contactTable.insert().then((data) => {
+        //     console.log('data', data)
+        //     if (this.commonJS.isEmpty(this.inputForm.cwWorkClientContactDTOList)) {
+        //       this.inputForm.cwWorkClientContactDTOList = []
+        //     }
+        //     this.$nextTick(() => {
+        //       this.inputForm.cwWorkClientContactDTOList.push(data)
+        //     })
+        //   })
+        // }
       },
 
       // 删除
@@ -774,28 +774,131 @@
         })
       },
       // 表单提交
+      // 暂存
+      doSubmit () {
+        this.loading = true
+        if (this.commonJS.isEmpty(this.inputForm.cwWorkClientContactDTOList)) {
+          this.loading = false
+          this.$message.error('“参与签约方”中至少有一条数据')
+          throw new Error('“参与签约方”中至少有一条数据')
+        }
+        if (this.$refs.uploadComponent.checkProgress()) {
+          this.loading = false
+          throw new Error()
+        } else {
+          this.$refs['inputForm'].validate((valid) => {
+            if (valid) {
+              this.loading = true
+              this.inputForm.status = '5'
+              this.inputForm.contractProperList = this.$refs.uploadComponent.getDataList()
+              if (this.commonJS.isEmpty(this.inputForm.contractProperList)) {
+                // 附件至少上传一条
+                this.$message.error('至少上传一条附件数据')
+                this.loading = false
+                throw new Error('至少上传一条附件数据')
+              }
+              this.inputForm.fees = this.inputForm.contractFees.join(',')
+              this.contractInfoService.save(this.inputForm).then(({data}) => {
+                this.$refs.inputForm.resetFields()
+                this.loading = false
+                this.close()
+                this.$emit('refreshDataList')
+              }).catch(() => {
+                this.$refs.inputForm.resetFields()
+                this.loading = false
+              })
+            } else {
+              this.loading = false
+            }
+          })
+        }
+      },
+      // 送审
+      startForm (callback) {
+        this.loading = true
+        if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+          this.contractInfoService.findById(this.inputForm.id).then(({data}) => {
+            if (data.status !== '0' && data.status !== '1' && data.status !== '3') { // // 审核状态不是“未发起”或“暂存”或“撤回”,就弹出提示
+              this.loading = false
+              this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+              throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            } else {
+              this.startFormTrue(callback)
+            }
+          })
+        } else {
+          this.startFormTrue(callback)
+        }
+      },
+      startFormTrue (callback) {
+        this.loading = true
+        if (this.commonJS.isEmpty(this.inputForm.cwWorkClientContactDTOList)) {
+          this.loading = false
+          this.$message.error('“参与签约方”中至少有一条数据')
+          throw new Error('“参与签约方”中至少有一条数据')
+        } else if (/* this.$refs.archiveFile.checkProgress() || */ this.$refs.uploadComponent.checkProgress()) {
+          this.loading = false
+          throw new Error()
+        } else {
+          this.$refs['inputForm'].validate(async (valid) => {
+            if (valid) {
+              this.loading = true
+              this.inputForm.status = '2'
+              this.inputForm.contractProperList = this.$refs.uploadComponent.getDataList()
+              this.inputForm.fees = this.inputForm.contractFees.join(',')
+              await this.contractInfoService.save(this.inputForm).then(({data}) => {
+                // this.inputForm.title = `${this.$store.state.user.name} 发起了 ${data.no} [财务-发票申请]`
+                this.inputForm.id = data.businessId
+                callback(data.businessTable, data.businessId, this.inputForm)
+                this.$refs.inputForm.resetFields()
+                this.loading = false
+              }).catch(() => {
+                this.$refs.inputForm.resetFields()
+                this.loading = false
+              })
+            } else {
+              this.loading = false
+            }
+          })
+        }
+      },
+      // 通过
+      agreeForm (callback) {
+        this.loading = true
+        if (/* this.$refs.archiveFile.checkProgress() || */ this.$refs.uploadComponent.checkProgress()) {
+          this.loading = false
+          throw new Error()
+        } else {
+          this.$refs['inputForm'].validate(async (valid) => {
+            if (valid) {
+              this.loading = true
+              this.inputForm.status = '5'
+              this.inputForm.contractProperList = this.$refs.uploadComponent.getDataList()
+              this.inputForm.fees = this.inputForm.contractFees.join(',')
+              await this.contractInfoService.save(this.inputForm).then(({data}) => {
+                callback(data.businessTable, data.businessId, this.inputForm)
+                this.$refs.inputForm.resetFields()
+                this.loading = false
+              }).catch(() => {
+                this.$refs.inputForm.resetFields()
+                this.loading = false
+              })
+            } else {
+              this.loading = false
+            }
+          })
+        }
+      },
       changeContractFee () {
         let fee = ''
         let fees = this.inputForm.contractFees
         if (fees.length > 0) {
           fees.forEach(i => {
             if (i === '1') {
-              i = '苏会协[2010]52号'
+              i = '发改价格[2009]2914号'
               fee = fee + ';' + i
             }
             if (i === '2') {
-              i = '苏政办发[2010]101号'
-              fee = fee + ';' + i
-            }
-            if (i === '3') {
-              i = '苏价费[2010]284号'
-              fee = fee + ';' + i
-            }
-            if (i === '4') {
-              i = '发改价格[2010]196号'
-              fee = fee + ';' + i
-            }
-            if (i === '5') {
               i = '其他'
               fee = fee + ';' + i
             }
@@ -918,31 +1021,97 @@
       closePop () {
         this.visable = false
       },
-      /* updateStatusById (type) {
-        if (this.$refs.archiveFile.checkProgress() || this.$refs.uploadComponent.checkProgress()) {
+      // updateStatusById (type) {
+      //   if (this.$refs.archiveFile.checkProgress() || this.$refs.uploadComponent.checkProgress()) {
+      //     this.loading = false
+      //     throw new Error()
+      //   } else {
+      //     if (type === 'agree') {
+      //       this.inputForm.status = '5'
+      //       this.contractInfoService.updateStatusById(this.inputForm)
+      //     }
+      //     // 驳回
+      //     if (type === 'reject') {
+      //       this.inputForm.status = '4'
+      //       this.contractInfoService.updateStatusById(this.inputForm)
+      //     }
+      //     if (type === 'reback') {
+      //       this.inputForm.status = '3'
+      //       this.contractInfoService.updateStatusById(this.inputForm)
+      //     }
+      //     // 流程终止,调整为暂存状态
+      //     if (type === 'hold') {
+      //       this.inputForm.status = '1'
+      //       this.contractInfoService.updateStatusById(this.inputForm)
+      //     }
+      //   }
+      // },
+      async updateStatusById (type, callback) {
+        this.loading = true
+        console.log('进入会计-合同登记 updateStatusById 方法')
+        if (await this.$refs.uploadComponent.checkProgress()) {
           this.loading = false
           throw new Error()
         } else {
-          if (type === 'agree') {
-            this.inputForm.status = '5'
-            this.contractInfoService.updateStatusById(this.inputForm)
-          }
-          // 驳回
-          if (type === 'reject') {
-            this.inputForm.status = '4'
-            this.contractInfoService.updateStatusById(this.inputForm)
-          }
-          if (type === 'reback') {
-            this.inputForm.status = '3'
-            this.contractInfoService.updateStatusById(this.inputForm)
-          }
-          // 流程终止,调整为暂存状态
-          if (type === 'hold') {
-            this.inputForm.status = '1'
-            this.contractInfoService.updateStatusById(this.inputForm)
+          if (type === 'reject' || type === 'reback') {
+            this.contractInfoService.findById(this.inputForm.id).then(({data}) => {
+              if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+                this.loading = false
+                this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+                throw new Error()
+              } else {
+                // if (type === 'agree') {
+                //   // 同意
+                //   this.inputForm.status = '5'
+                // }
+                if (type === 'reject') {
+                  // 驳回
+                  this.inputForm.status = '4'
+                }
+                if (type === 'reback') {
+                  // 撤回
+                  this.inputForm.status = '3'
+                }
+                if (type === 'reject' || type === 'reback') {
+                  let param = {status: this.inputForm.status, id: this.inputForm.id}
+                  this.contractInfoService.updateStatusById(param).then(() => {
+                    this.loading = false
+                    callback()
+                  })
+                }
+              }
+            })
+          } else if (type === 'hold') {
+            this.loading = true
+            this.contractInfoService.findById(this.inputForm.id).then(({data}) => {
+              if (data.status !== '4') { // status的值不等于“驳回”就弹出提示
+                this.loading = false
+                this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+                throw new Error()
+              } else {
+                // 终止
+                let param = {status: '1', id: this.inputForm.id}
+                this.contractInfoService.updateStatusById(param).then(() => {
+                  this.loading = false
+                  callback()
+                })
+              }
+            })
           }
         }
-      }, */
+      },
+      reapplyForm (callback) {
+        this.loading = true
+        this.contractInfoService.findById(this.inputForm.id).then(({data}) => {
+          if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
+            this.loading = false
+            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+          } else {
+            this.startFormTrue(callback)
+          }
+        })
+      },
       checkData () {
         let begin = this.inputForm.effectiveDate
         let close = this.inputForm.closingDate

+ 53 - 17
src/views/modules/finance/invoice/InvoiceForm.vue

@@ -635,7 +635,10 @@
           workAttachmentDtoList: [],
           financeInvoiceDetailDTOList: [],
           financeInvoiceReceivablesDTOList: [],
-          financeInvoiceInvalidDTO: {}
+          financeInvoiceInvalidDTO: {},
+          receivablesDate: '',
+          receivablesStatus: '',
+          isReceivables: ''
         },
         programRow: '',
         bankList: [],
@@ -720,7 +723,10 @@
             invalidStatus: '',
             invoiceId: '',
             remarks: ''
-          }
+          },
+          receivablesDate: '',
+          receivablesStatus: '',
+          isReceivables: ''
         }
         this.inputForm.id = id
         this.visible = true
@@ -801,20 +807,48 @@
           return
         }
         if (this.receivablesFlag === true) {
-          this.inputForm.financeInvoiceReceivablesDTOList.forEach((item, index) => {
-            if (this.commonJS.isEmpty(item.remittanceUnit)) {
-              this.$message.warning('收款明细中第 ' + (index + 1) + ' 条数据的 “汇款单位” 为空,请重新输入')
-              throw new Error()
-            }
-            if (this.commonJS.isEmpty(item.remittanceAmount) || item.remittanceAmount === 0 || item.remittanceAmount === '0') {
-              this.$message.warning('收款明细中第 ' + (index + 1) + ' 条数据的 “汇款金额” 为空,请重新输入')
-              throw new Error()
-            }
-            if (this.commonJS.isEmpty(item.remittanceDate)) {
-              this.$message.warning('收款明细中第 ' + (index + 1) + ' 条数据的 “汇款时间” 为空,请重新输入')
-              throw new Error()
+          this.inputForm.isReceivables = '1' // 当前的页面为收款页面时,将isReceivables赋值为:1,后端接收到isReceivables值为1时,则判定当前页面为收款页面
+          if (this.commonJS.isNotEmpty(this.inputForm.financeInvoiceReceivablesDTOList)) {
+            let allNumber = 0 // 获取收款明细中的总金额
+            this.inputForm.financeInvoiceReceivablesDTOList.forEach((item, index) => {
+              if (this.commonJS.isEmpty(item.remittanceUnit)) {
+                this.$message.warning('收款明细中第 ' + (index + 1) + ' 条数据的 “汇款单位” 为空,请重新输入')
+                throw new Error()
+              }
+              if (this.commonJS.isEmpty(item.remittanceAmount) || item.remittanceAmount === 0 || item.remittanceAmount === '0') {
+                this.$message.warning('收款明细中第 ' + (index + 1) + ' 条数据的 “汇款金额” 为空,请重新输入')
+                throw new Error()
+              } else {
+                allNumber = parseFloat(parseFloat(allNumber) + parseFloat(item.remittanceAmount))
+              }
+              if (this.commonJS.isEmpty(item.remittanceDate)) {
+                this.$message.warning('收款明细中第 ' + (index + 1) + ' 条数据的 “汇款时间” 为空,请重新输入')
+                throw new Error()
+              } else {
+                // this.inputForm.receivablesDate 是发票的收款时间
+                if (index === 0) {
+                  this.inputForm.receivablesDate = item.remittanceDate
+                } else {
+                  if (item.remittanceDate > this.inputForm.receivablesDate) {
+                    this.inputForm.receivablesDate = item.remittanceDate
+                  }
+                }
+              }
+            })
+            if (parseFloat(this.inputForm.account) < parseFloat(allNumber)) {
+              this.$message.warning('收款明细的总金额不能超过发票总金额,请重新输入')
+              throw new Error('收款明细的总金额不能超过发票总金额,请重新输入')
             }
-          })
+          }
+          if (this.commonJS.isNotEmpty(this.inputForm.financeInvoiceReceivablesDTOList)) {
+            // 如果收款明细中的数据不是空,则将是否收款的状态改为部分收款
+            this.inputForm.receivablesStatus = '2'
+          } else {
+            // 如果收款明细中的数据是空,则将是否收款的状态改为未收款
+            this.inputForm.receivablesStatus = '0'
+            // 如果收款明细中的数据是空,则将收款日期置空
+            this.inputForm.receivablesDate = ''
+          }
         }
         this.$refs['inputForm'].validate((valid) => {
           if (valid) {
@@ -872,7 +906,10 @@
           workAttachmentDtoList: [],
           financeInvoiceDetailDTOList: [],
           financeInvoiceReceivablesDTOList: [],
-          financeInvoiceInvalidDTO: {}
+          financeInvoiceInvalidDTO: {},
+          receivablesDate: '',
+          receivablesStatus: '',
+          isReceivables: ''
         }
         this.bankList = []
         this.detailFlag = false
@@ -1125,7 +1162,6 @@
         }
       },
       async beforeUploadDetailCode (file) {
-        console.log('110', this.inputForm.taxpayerIdentificationNo)
         await this.checkIdentificationNo()
         const formBody = new FormData()
         formBody.append('file', file.raw)

+ 2 - 2
src/views/modules/finance/invoice/InvoiceList.vue

@@ -702,7 +702,7 @@
           cancelButtonText: '取消',
           type: 'warning'
         }).then(() => {
-          let param = {id: row.id, receivablesStatus: '1', receivablesDate: this.moment(new Date()).format('YYYY-MM-DD')}
+          let param = {id: row.id, receivablesStatus: '1'}
           this.financeInvoiceService.isReceivables(param).then(({data}) => {
             this.$message.success(data)
             this.refreshList()
@@ -758,7 +758,7 @@
           cancelButtonText: '取消',
           type: 'warning'
         }).then(() => {
-          let param = {id: row.id, receivablesStatus: '0', receivablesDate: this.moment(new Date()).format('YYYY-MM-DD')}
+          let param = {id: row.id, receivablesStatus: '0'}
           this.financeInvoiceService.isReceivables(param).then(({data}) => {
             this.$message.success(data)
             this.refreshList()

+ 1 - 1
src/views/modules/program/registered/ProjectForm.vue

@@ -1125,6 +1125,7 @@
         this.inputForm.contactList = []
         this.inputForm.members = []
         this.$refs.uploadComponent.clearUpload()
+        this.$refs.proofreadIssuedForm.closeThis()
         this.$refs.inputForm.resetFields()
         this.activeName = 'programDetail'
         this.visible = false
@@ -1208,7 +1209,6 @@
         return footerData
       },
       tabHandleClick (event) {
-        console.log(event)
         if (event.name === 'firstAudit') {
           if (this.commonJS.isNotEmpty(this.auditIdfirst)) {
             this.$refs.projectThreeAuditForm.init('view', this.auditIdfirst, '一级校审')

+ 1 - 0
src/views/modules/program/registered/ProofreadBrowseForm.vue

@@ -35,6 +35,7 @@
           <el-col :span="12">
             <el-form-item label="审核日期" prop="processDate">
               <el-date-picker
+                placement="bottom-start"
                 v-model="inputForm.processDate"
                 type="date"
                 :disabled="true"

+ 1 - 0
src/views/modules/program/registered/ProofreadBrowseFormComponent.vue

@@ -33,6 +33,7 @@
           <el-col :span="12">
             <el-form-item label="审核日期" prop="processDate">
               <el-date-picker
+                placement="bottom-start"
                 v-model="inputForm.processDate"
                 type="date"
                 :disabled="true"

+ 1 - 0
src/views/modules/program/registered/ProofreadForm.vue

@@ -35,6 +35,7 @@
           <el-col :span="12">
             <el-form-item label="审核日期" prop="processDate">
               <el-date-picker
+                placement="bottom-start"
                 v-model="inputForm.processDate"
                 type="date"
                 :disabled="true"

+ 1 - 0
src/views/modules/program/registered/ProofreadFormComponent.vue

@@ -33,6 +33,7 @@
           <el-col :span="12">
             <el-form-item label="审核日期" prop="processDate">
               <el-date-picker
+                placement="bottom-start"
                 v-model="inputForm.processDate"
                 type="date"
                 :disabled="true"

+ 97 - 76
src/views/modules/program/registered/ProofreadIssuedForm.vue

@@ -6,7 +6,7 @@
       </el-row>
       <el-divider content-position="left"><i class="el-icon-document"></i> 报告签发单</el-divider>
     </div>
-    <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="formReadOnly"
+    <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="status === 'audit' || status === 'taskFormDetail'|| isDisabled === 'view'"
              label-width="150px" @submit.native.prevent>
       <el-row  :gutter="15">
         <el-col :span="24">
@@ -53,65 +53,29 @@
 
        </el-row>
 
-      <el-divider>业务类型</el-divider>
-      <el-divider content-position="left">A类</el-divider>
-      <el-row>
+      <el-divider content-position="left"><span style="font-size: 17px;margin-left: 0px"><b>业务类型</b></span></el-divider>
+      <el-row v-for="(item, index) in typeList">
+      <el-divider content-position="left"><span style="font-size: 17px;margin-left: 10px">{{item.name}}</span></el-divider>
         <vxe-table
-          border
+          border="inner"
           show-overflow
-          ref="details"
+          ref="table"
           class="vxe-table-element"
-          :data="AList"
+          :data="item.childrenList"
           style="margin-left: 5em"
           @cell-click=""
           @edit-closed=""
-          highlight-current-row
-          :edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true}"
+          :show-header="false"
+          :row-config="{isHover: true,keyField: 'id'}"
+          @radio-change="radioChangeEvent($event, index)"
+          :radio-config="{trigger: 'row',labelField: 'name'}"
         >
-          <vxe-table-column field="name" title="名称" :edit-render="{}">
-          </vxe-table-column>
+          <vxe-column type="radio" align="left"></vxe-column>
+<!--          <vxe-column align="left" field="name"></vxe-column>-->
         </vxe-table>
       </el-row>
 
-      <el-divider content-position="left">B类</el-divider>
-      <el-row>
-        <vxe-table
-          border
-          show-overflow
-          ref="details"
-          class="vxe-table-element"
-          :data="BList"
-          style="margin-left: 5em"
-          @cell-click=""
-          @edit-closed=""
-          highlight-current-row
-          :edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true}"
-        >
-          <vxe-table-column field="name" title="名称" :edit-render="{}">
-          </vxe-table-column>
-        </vxe-table>
-      </el-row>
-
-      <el-divider content-position="left">C类</el-divider>
-      <el-row>
-        <vxe-table
-          border
-          show-overflow
-          ref="details"
-          class="vxe-table-element"
-          :data="CList"
-          style="margin-left: 5em"
-          @cell-click=""
-          @edit-closed=""
-          highlight-current-row
-          :edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true}"
-        >
-          <vxe-table-column field="name" title="名称" :edit-render="{}">
-          </vxe-table-column>
-        </vxe-table>
-      </el-row>
-
-      <el-row :gutter="15" style="margin-top: 20px">
+      <el-row :gutter="15" style="margin-top: 40px">
 
         <el-col :span="12">
           <el-form-item label="是否已完善项目信息" prop="isTxtz" :rules="[{required: true, message:'请选择是否已完善项目信息', trigger:'blur'}]">
@@ -198,6 +162,7 @@
   import SelectUserTree from '@/views/modules/utils/treeUserSelect'
   import ProofreadIssuedService from '@/api/sys/ProofreadIssuedService'
   import ProgramProjectListInfoService from '@/api/program/ProgramProjectListInfoService'
+  import ProgramServiceTypeService from '@/api/program/ProgramServiceTypeService'
   export default {
     props: {
       businessId: {
@@ -207,6 +172,10 @@
       formReadOnly: {
         type: Boolean,
         default: false
+      },
+      status: {
+        type: String,
+        default: ''
       }
     },
     data () {
@@ -235,47 +204,32 @@
           status: '',
           agreeTime: '',
           agreeUserId: '',
-          reportType: ''
+          reportType: '',
+          serviceType: ''
         },
         keyWatch: '',
         yesOrNo: [
           {value: 0, label: '否'},
           {value: 1, label: '是'}
         ],
-        AList: [
-          {name: '经济行为涉及上市公司及其子公司的资产组合、无形资产、企业价值(包括业务及资产组)评估业务'},
-          {name: '上市公司及其合并报表范围内的下属公司财务报告目的的评估及咨询业务'},
-          {name: '经济行为涉及上市公司及其合并报表范围内的下属公司的除本条第(一)款规定之外的评估业务'},
-          {name: '经济行为涉及非上市证券公司、非上市期货公司、非上市公众公司、拟上市公司及其合并报表范围内的下属公司的评估业务'},
-          {name: '其中:非国有企业改制设立股份公司评估业务'}
-        ],
-        BList: [
-          {name: '除A类业务以外的无形资产评估业务'},
-          {name: '除A类业务以外的资产组合评估业务'},
-          {name: '除A类业务以外的企业价值评估业务'},
-          {name: '除A类业务以外的报务报告目的评估业务'},
-          {name: '除A类业务以外的抵押担保目的评估业务'},
-          {name: '除A类以外的,涉及上市公司、证券公司、期货公司、非上市公众公司、拟上市公司及其下属公司不用于市场交易的复核评估、追溯评估和咨询评估业务'},
-          {name: '除A类以外的涉及国有企业与非国有企业之间的交易行为的评估业务及相关的复核评估、追溯评估和咨询评估业务'},
-          {name: '金融企业(包括银行、保险公司、信托投资公司、基金管理公司、租赁公司等)的评估业务'},
-          {name: '评估经验较少的新领域评估业务'}
-        ],
-        CList: [
-          {name: '除A、B类业务以外的经济行为涉及单项资产的评估业务'},
-          {name: '除A、B类业务以外的不用于市场交易的复核评估、追溯评估和咨询评估业务'}
-        ],
-        tabName: ''
+        typeList: [],
+        tabName: '',
+        chooseTableIndex: '',
+        isDisabled: ''
       }
     },
     proofreadIssuedService: null,
     programProjectListInfoService: null,
+    programServiceTypeService: null,
     created () {
+      this.programServiceTypeService = new ProgramServiceTypeService()
       this.proofreadIssuedService = new ProofreadIssuedService()
       this.programProjectListInfoService = new ProgramProjectListInfoService()
       this.proofreadIssuedService.findProjectInfoById(this.businessId).then(({data}) => {
         this.inputForm = this.recover(this.inputForm, data)
         this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
       })
+      this.getTypeList() // 获取业务类型数据
     },
     computed: {
       bus: {
@@ -312,6 +266,9 @@
       init (method, id, tabName) {
         this.tabName = tabName
         this.method = method
+        if (method === 'view') {
+          this.isDisabled = 'view'
+        }
         this.inputForm = {
           id: '',
           projectId: '',
@@ -332,11 +289,13 @@
           status: '',
           agreeTime: '',
           agreeUserId: '',
-          reportType: ''
+          reportType: '',
+          serviceType: ''
         }
         this.inputForm.projectId = id
         this.visible = true
         this.loading = false
+        this.getTypeList()  // 获取业务类型数据
         this.$nextTick(() => {
           this.loading = true
           this.proofreadIssuedService.findById(this.inputForm.projectId).then(({data}) => {
@@ -344,17 +303,25 @@
               this.$refs.inputForm.resetFields()
               this.inputForm = this.recover(this.inputForm, data)
               this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+              this.chooseRow() // 选中行
               this.loading = false
             } else {
               this.proofreadIssuedService.findProjectInfoById(this.inputForm.projectId).then(({data}) => {
                 this.inputForm = this.recover(this.inputForm, data)
                 this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+                this.chooseRow() // 选中行
                 this.loading = false
               })
             }
           })
         })
       },
+      // 获取业务类型数据
+      getTypeList () {
+        this.programServiceTypeService.getList().then(({data}) => {
+          this.typeList = data
+        })
+      },
       reapplyForm (callback) {
         this.proofreadIssuedService.findById(this.inputForm.id).then(({data}) => {
           if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
@@ -497,8 +464,11 @@
           status: '',
           agreeTime: '',
           agreeUserId: '',
-          reportType: ''
+          reportType: '',
+          serviceType: ''
         }
+        this.chooseTableIndex = ''
+        this.typeList = []
         this.$refs.inputForm.resetFields()
         this.visible = false
       },
@@ -516,6 +486,57 @@
             console.log(err.response)
           }
         })
+      },
+      // 业务类别表格值改变事件
+      radioChangeEvent (event, tableIndex) {
+        if (this.status === 'audit' || this.status === 'taskFormDetail' || this.isDisabled === 'view') {  // 数据审核页面或详情页面  不允许修改数据时
+          if (this.commonJS.isNotEmpty(this.chooseTableIndex)) { // chooseTableIndex有值,说明数据有默认值
+            if (tableIndex === this.chooseTableIndex) { // 选中行是默认数据所属的表,不允许切换
+              this.$refs.table[tableIndex].setRadioRow(event.oldValue) // 将表中的选择重新赋值上一个选择,达到未切换的目的
+            } else {  // 选中行不是默认数据所属的表,不允许切换
+              this.$refs.table[tableIndex].clearRadioRow() // 清空表中的选项,达到未切换数据的目的
+            }
+          } else {  // chooseTableIndex没有值,说明数据没有默认值,清空表中的选项
+            this.$refs.table[tableIndex].clearRadioRow()
+          }
+        } else {  // 允许修改数据时
+          // 清除其他表格的选择
+          this.typeList.forEach((item, index) => {
+            if (index !== tableIndex) {
+              this.$refs.table[index].clearRadioRow()
+            }
+          })
+          // 绑定表格的选择
+          this.inputForm.serviceType = event.row.id
+        }
+      },
+      // 单选框是否禁用
+      // tableCheckMethod () {
+      //   console.log('禁用')
+      //   if (this.status === 'audit' || this.status === 'taskFormDetail') {
+      //     return false
+      //   }
+      //   return true
+      // },
+      chooseRow () {
+        if (this.commonJS.isNotEmpty(this.inputForm.serviceType)) {
+          if (this.commonJS.isNotEmpty(this.typeList)) {
+            this.typeList.forEach((item, index) => {   // 遍历出表格(A类、B类等表格)
+              if (this.commonJS.isNotEmpty(item.childrenList)) {  // 每个表格中的数据遍历出来(A类表格中的数据、B类表格中的数据等等...)
+                item.childrenList.forEach((child) => {
+                  if (child.id === this.inputForm.serviceType) { // 如果表格中的数据等于查询到的业务类型,说明要将这条数据选中
+                    this.$refs.table[index].setRadioRow(child) // 将数据改为选中状态
+                    this.chooseTableIndex = index // 获取选中数据属于哪个表格
+                  }
+                })
+              }
+            })
+          }
+        }
+      },
+      // 关闭父页面时调用此方法
+      closeThis () {
+        this.close()
       }
     }
   }

+ 133 - 0
src/views/modules/program/serviceType/ProgramServiceTypeForm.vue

@@ -0,0 +1,133 @@
+<template>
+  <div>
+    <el-dialog
+      :title="title"
+      :close-on-click-modal="false"
+      v-dialogDrag
+      width="500px"
+      @close="close"
+      @keyup.enter.native="doSubmit"
+      :visible.sync="visible">
+      <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="method==='view'"
+               label-width="120px" @submit.native.prevent>
+        <el-row  :gutter="15">
+          <el-col :span="21">
+            <el-form-item label="业务类型" prop="name"
+                          :rules="[
+                          {required: true, message:'业务类型不能为空', trigger:'blur'}
+                 ]">
+              <el-input v-model="inputForm.name" placeholder="请填写业务类型"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="21">
+            <el-form-item label="排序" prop="sort"
+                          :rules="[
+                          {required: true, message:'排序不能为空', trigger:'blur'}
+                 ]">
+              <el-input v-model="inputForm.sort" placeholder="请填写排序"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="21">
+            <el-form-item label="备注" prop="remarks"
+                          :rules="[
+                 ]">
+              <el-input type="textarea" maxlength="200" v-model="inputForm.remarks" placeholder="请填写备注"  show-word-limit   ></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+      <el-button size="small" @click="close()" icon="el-icon-circle-close">关闭</el-button>
+      <el-button size="small" type="primary" v-if="method != 'view'" @click="doSubmit()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+    </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import ProgramServiceTypeService from '@/api/program/ProgramServiceTypeService'
+  export default {
+    data () {
+      return {
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        inputForm: {
+          type: '',
+          sort: '',
+          remarks: '',
+          parentId: ''
+        }
+      }
+    },
+    programServiceTypeService: null,
+    created () {
+      this.programServiceTypeService = new ProgramServiceTypeService()
+    },
+    methods: {
+      init (method, id) {
+        this.method = method
+        this.inputForm = {
+          name: '',
+          sort: '',
+          remarks: '',
+          parentId: ''
+        }
+        if (method === 'add') {
+          this.title = `新建业务类型`
+          this.inputForm.parentId = '0'
+        } else if (method === 'edit') {
+          this.inputForm.id = id
+          this.title = '修改业务类型'
+        } else if (method === 'view') {
+          this.inputForm.id = id
+          this.title = '查看业务类型'
+        } else if (method === 'addChild') {
+          this.title = '新建子业务类型'
+          this.inputForm.parentId = id
+        }
+        this.visible = true
+        this.loading = false
+        this.$nextTick(() => {
+          this.$refs.inputForm.resetFields()
+          if (method === 'edit' || method === 'view') { // 修改或者查看
+            this.loading = true
+            this.programServiceTypeService.queryById(this.inputForm.id).then(({data}) => {
+              this.inputForm = this.recover(this.inputForm, data)
+              this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+              this.loading = false
+            })
+          }
+        })
+      },
+      // 表单提交
+      doSubmit () {
+        this.$refs['inputForm'].validate((valid) => {
+          if (valid) {
+            this.loading = true
+            let numReg = /^[0-9]*$/
+            let numRe = new RegExp(numReg)
+            if (!numRe.test(this.inputForm.sort)) {
+              this.loading = false
+              this.$message.error('排序请输入数字')
+              return
+            }
+            this.programServiceTypeService.save(this.inputForm).then(({data}) => {
+              this.close()
+              this.$message.success(data)
+              this.$emit('refreshDataList')
+              this.loading = false
+            }).catch(() => {
+              this.loading = false
+            })
+          }
+        })
+      },
+      close () {
+        this.$refs.inputForm.resetFields()
+        this.visible = false
+      }
+    }
+  }
+</script>

+ 159 - 0
src/views/modules/program/serviceType/ProgramServiceTypeList.vue

@@ -0,0 +1,159 @@
+<template>
+  <div class="page">
+    <el-form size="small" :inline="true" class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+      <!-- 搜索框-->
+      <el-form-item prop="name">
+        <el-input size="small" v-model="searchForm.name" placeholder="请输入业务类型" clearable></el-input>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" @click="refreshList()" size="small" icon="el-icon-search">查询</el-button>
+        <el-button @click="resetSearch()" size="small" icon="el-icon-refresh-right">重置</el-button>
+      </el-form-item>
+    </el-form>
+    <div class="bg-white top" style="">
+      <vxe-toolbar :refresh="{query: refreshList}" custom>
+        <template #buttons>
+          <el-button v-if="hasPermission('program_service_type:add')" type="primary" size="small" icon="el-icon-plus" @click="add()">新建</el-button>
+          <el-button v-if="hasPermission('program_service_type:del')" type="danger"   size="small" icon="el-icon-delete" @click="del()" :disabled="$refs.serviceTypeTable && $refs.serviceTypeTable.getCheckboxRecords().length === 0" plain>删除</el-button>
+        </template>
+      </vxe-toolbar>
+      <div style="height: calc(100% - 50px)">
+        <vxe-table
+          border="inner"
+          auto-resize
+          resizable
+          height="auto"
+          :loading="loading"
+          size="small"
+          ref="serviceTypeTable"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :menu-config="{}"
+          @sort-change="sortChangeHandle"
+          :sort-config="{remote:true}"
+          :data="dataList"
+          :tree-config="{transform: true, rowField: 'id', parentField: 'parentId'}"
+          :checkbox-config="{}">
+          <vxe-column type="seq" width="60" title="序号"></vxe-column>
+          <vxe-column type="checkbox" width="40" ></vxe-column>
+          <vxe-column min-width="350" title="业务类型" field="name" align="left" tree-node></vxe-column>
+          <vxe-column min-width="50" align="center" title="序号" field="sort"></vxe-column>
+          <vxe-column min-width="50" align="center" title="级别" field="level"></vxe-column>
+          <vxe-column min-width="50" align="center" title="备注" field="remarks"></vxe-column>
+          <vxe-column title="操作" width="230px" fixed="right" align="center">
+            <template  slot-scope="scope">
+              <el-button v-if="hasPermission('program_service_type:edit')&&scope.row.level === 1" type="text"  size="small" @click="addChild(scope.row.id)">新建子类型</el-button>
+              <el-button v-if="hasPermission('program_service_type:edit')" type="text"  size="small" @click="edit(scope.row.id)">修改</el-button>
+              <el-button v-if="hasPermission('program_service_type:del')" type="text"   size="small" @click="del(scope.row.id)">删除</el-button>
+            </template>
+          </vxe-column>
+        </vxe-table>
+      </div>
+    </div>
+    <ProgramServiceTypeForm  ref="programServiceTypeForm" @refreshDataList="refreshList"></ProgramServiceTypeForm>
+  </div>
+</template>
+
+<script>
+  import ProgramServiceTypeService from '@/api/program/ProgramServiceTypeService'
+  import ProgramServiceTypeForm from './ProgramServiceTypeForm'
+  export default {
+    data () {
+      return {
+        searchForm: {
+          name: '',
+          sort: ''
+        },
+        dataList: [],
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        loading: false
+      }
+    },
+    programServiceTypeService: null,
+    created () {
+      this.programServiceTypeService = new ProgramServiceTypeService()
+    },
+    components: {
+      ProgramServiceTypeForm
+    },
+    mounted () {
+      this.refreshList()
+    },
+    methods: {
+      // 新增
+      add () {
+        this.$refs.programServiceTypeForm.init('add', '')
+      },
+      addChild (id) {
+        this.$refs.programServiceTypeForm.init('addChild', id)
+      },
+      // 修改
+      edit (id) {
+        id = id || this.$refs.serviceTypeTable.getCheckboxRecords().map(item => {
+          return item.id
+        })[0]
+        this.$refs.programServiceTypeForm.init('edit', id)
+      },
+      // 查看
+      view (id) {
+        this.$refs.programServiceTypeForm.init('view', id)
+      },
+      // 获取数据列表
+      refreshList () {
+        this.loading = true
+        this.programServiceTypeService.list({
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          ...this.searchForm
+        }).then(({data}) => {
+          this.dataList = data.records
+          this.tablePage.total = data.total
+          this.loading = false
+        })
+      },
+      // 当前页
+      currentChangeHandle ({ currentPage, pageSize }) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.refreshList()
+      },
+      // 排序
+      sortChangeHandle (column) {
+        this.tablePage.orders = []
+        if (column.order != null) {
+          this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'asc'})
+        }
+        this.refreshList()
+      },
+      // 删除
+      del (id) {
+        let ids = id || this.$refs.serviceTypeTable.getCheckboxRecords().map(item => {
+          return item.id
+        }).join(',')
+        this.$confirm(`确定删除所选项吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.loading = true
+          this.programServiceTypeService.delete(ids).then(({data}) => {
+            this.$message.success(data)
+            this.refreshList()
+            this.loading = false
+          })
+        })
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.refreshList()
+      }
+    }
+  }
+</script>