Ver código fonte

评估-合同归档审核时的案卷号问题

lizhenhao 2 anos atrás
pai
commit
d3d5823fa1

+ 5 - 12
src/views/modules/flowable/task/TaskForm.vue

@@ -352,17 +352,8 @@
       // 同意
       async agree (vars) {
         vars = {...vars, agree: true}
-        if (this.formType === '2' && this.formUrl !== '/sys/workContract/WorkContractFileForm') {
-          this.commit(vars) // 同意
-          // this.$refs.form.updateStatusById('agree')
-        }
-        if (this.formType === '2' && this.formUrl === '/sys/workContract/WorkContractFileForm') {
-          this.$refs.form.filedNoIsEmpty((item) => {
-            if (item !== 'false') {
-              this.commit(vars) // 同意
-              // this.$refs.form.updateStatusById('agree')
-            }
-          })
+        if (this.formType === '2') {
+          this.commit(vars)
         }
       },
       // 重新申请
@@ -466,6 +457,7 @@
       // Process_1669271524486 报销审批
       // Process_1669275081328 发票申请
       // Process_1669275380218 发票作废
+      // Process_1672738002595 发起通知
       // 驳回
       reject (vars) {
         if (this.procDefId.includes('Process_1667978088459') ||
@@ -480,7 +472,8 @@
           this.procDefId.includes('Process_1669700915383') ||
           this.procDefId.includes('Process_1669271524486') ||
           this.procDefId.includes('Process_1669275081328') ||
-          this.procDefId.includes('Process_1669275380218')
+          this.procDefId.includes('Process_1669275380218') ||
+          this.procDefId.includes('Process_1672738002595')
         ) {
           console.log('进入新版驳回')
           this.$confirm(`确定驳回流程吗?`, '提示', {

+ 42 - 31
src/views/modules/sys/workContract/WorkContractFileForm.vue

@@ -162,25 +162,27 @@
           </el-form-item>
         </el-col>
       </el-row>
+    </el-form>
 
-      <el-row v-if="this.inputForm.filedType === '2'">
-        <el-col :span="12">
-          <el-form-item label="案卷号" prop="filedNo" :rules="[
-                  {required: true, message:'请输入案卷号', trigger:'blur'}
+    <el-form size="middle" :model="inputForm" ref="inputForm2" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="status !== 'audit'"
+             label-width="150px">
+    <el-row v-if="this.inputForm.filedType === '2'">
+      <el-col :span="12">
+        <el-form-item label="案卷号" prop="filedNo" :rules="[
+                  {required: true, message:'请填写案卷号', trigger:'blur'}
                ]">
-            <el-input v-model="inputForm.filedNo"></el-input>
-          </el-form-item>
-        </el-col>
+          <el-input v-model="inputForm.filedNo" placeholder="请填写案卷号"></el-input>
+        </el-form-item>
+      </el-col>
 
-        <el-col :span="12">
-          <el-form-item label="确认案卷号" prop="confirmFiledNo" :rules="[
-                  {required: true, message:'请输入确认案卷号', trigger:'blur'}
+      <el-col :span="12">
+        <el-form-item label="确认案卷号" prop="confirmFiledNo" :rules="[
+                  {required: true, message:'请填写确认案卷号', trigger:'blur'}
                ]">
-            <el-input @change="checkFiledNo" v-model="inputForm.confirmFiledNo"></el-input>
-          </el-form-item>
-        </el-col>
-      </el-row>
-
+          <el-input v-model="inputForm.confirmFiledNo" placeholder="请填写确认案卷号"></el-input>
+        </el-form-item>
+      </el-col>
+    </el-row>
     </el-form>
     <el-image-viewer
       v-if="showViewer"
@@ -508,26 +510,35 @@
       },
       // 通过
       agreeForm (callback) {
-        let id = this.inputForm.id
-        this.loading = true
-        this.inputForm.workAttachmentList = this.$refs.uploadComponent.getDataList()
-        this.inputForm.status = '5'
-        if (this.inputForm.contractFees !== undefined && this.inputForm.contractFees !== null) {
-          this.inputForm.fees = this.inputForm.contractFees.join(',')
-        }
-        this.workContractService.save(this.inputForm)
-        console.log('inputForm', this.inputForm)
-        this.inputForm.filedType = '2'
-        this.inputForm.contractInfoId = id
-        this.workContractFileService.save(this.inputForm).then(({data}) => {
-          callback(data.businessTable, data.businessId, this.inputForm)
-          this.$refs.inputForm.resetFields()
-          this.loading = false
-          this.businessId = ''
+        this.$refs['inputForm2'].validate((valid) => {
+          if (valid) {
+            let id = this.inputForm.id
+            this.loading = true
+            if (this.inputForm.filedNo !== this.inputForm.confirmFiledNo) {
+              this.loading = false
+              this.$message.warning(`案卷号和确认案卷号不一致`)
+              throw new Error('案卷号和确认案卷号不一致')
+            }
+            this.inputForm.workAttachmentList = this.$refs.uploadComponent.getDataList()
+            this.inputForm.status = '5'
+            if (this.inputForm.contractFees !== undefined && this.inputForm.contractFees !== null) {
+              this.inputForm.fees = this.inputForm.contractFees.join(',')
+            }
+            this.workContractService.save(this.inputForm)
+            this.inputForm.filedType = '2'
+            this.inputForm.contractInfoId = id
+            this.workContractFileService.save(this.inputForm).then(({data}) => {
+              callback(data.businessTable, data.businessId, this.inputForm)
+              this.$refs.inputForm.resetFields()
+              this.loading = false
+              this.businessId = ''
+            })
+          }
         })
       },
       close () {
         this.$refs.inputForm.resetFields()
+        this.$refs.inputForm2.resetFields()
         this.inputForm.clientName = ''
         this.visible = false
         this.showVi = true