lizhenhao 2 роки тому
батько
коміт
fda3fad8b4

+ 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 === '0' || scope.row.filedPaperType === undefined || scope.row.filedPaperType === '1' || scope.row.filedPaperType === '3')" 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