瀏覽代碼

会计合同登记添加流程

user5 2 年之前
父節點
當前提交
10eb566b12

+ 11 - 2
src/views/modules/cw/projectRecords/WorkContractChooseCom.vue

@@ -19,6 +19,9 @@
           <el-form-item label="合同名称" prop="contractName">
             <el-input size="small" v-model="searchForm.contractName" placeholder="请输入合同名称" clearable></el-input>
           </el-form-item>
+          <el-form-item label="委托方名称" prop="clientContactsName">
+            <el-input size="small" v-model="searchForm.clientContactsName" placeholder="请输入委托方名称" clearable></el-input>
+          </el-form-item>
 
 
           <el-form-item>
@@ -50,7 +53,7 @@
           <vxe-column type="radio" width="40px"></vxe-column>
           <vxe-column width="200px" title="合同编号" field="contractNo"></vxe-column>
           <vxe-column width="200px" title="合同名称" field="contractName"></vxe-column>
-          <vxe-column width="200px" title="委托" field="clientContactsName"></vxe-column>
+          <vxe-column width="200px" title="委托" field="clientContactsName"></vxe-column>
           <vxe-column width="200px" title="签约日期" field="signingDate"></vxe-column>
           <vxe-column width="200px" title="合同金额(元)" field="contractAmount"></vxe-column>
           <vxe-column width="200px" title="所属部门" field="departmentName"></vxe-column>
@@ -98,6 +101,7 @@
         searchForm: {
           contractNo: '',
           contractName: '',
+          clientContactsName: '',
           contractAmount: '',
           contractDates: [],
           type: '',
@@ -130,6 +134,11 @@
         this.rowIndex = rowIndex
         this.list()
       },
+      projectInit (rowIndex) {
+        this.visible = true
+        this.rowIndex = rowIndex
+        this.projectList()
+      },
       // 表单提交
       getContract () {
         let row = this.$refs.workContractTable.getRadioRecord()
@@ -142,7 +151,7 @@
       },
       list () {
         this.loading = true
-        this.searchForm.status = '5'
+        this.searchForm.status = '2,3,4,5'
         this.contractInfoService.list({
           'current': this.tablePage.currentPage,
           'size': this.tablePage.pageSize,

+ 26 - 14
src/views/modules/cw/workContract/ContractFileForm.vue

@@ -137,14 +137,6 @@
           </el-form-item>
         </el-col>
 
-<!--        <el-col :span="12">-->
-<!--          <el-form-item label="案卷号" prop="filedNo"-->
-<!--                        :rules="[{required: true, message: '请输入案卷号', trigger: 'blur'}-->
-<!--                 ]">-->
-<!--            <el-input maxlength="15" v-model="inputForm.filedNo" placeholder="请输入案卷号"-->
-<!--            ></el-input>-->
-<!--          </el-form-item>-->
-<!--        </el-col>-->
 
 <!--        <el-col :span="12">-->
 <!--          <el-form-item label="确认案卷号" prop="confirmFiledNo"-->
@@ -199,6 +191,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"
                         :rules="[{required: true, message: '请填写合同实际金额', trigger: 'blur'}
                  ]">
@@ -228,9 +231,18 @@
           </el-form-item>
         </el-col>
 
-        <el-col :span="12">
+        <el-col :span="24">
           <el-form-item label="付款约定" prop="paymentAgreement">
-            <el-input maxlength="64" :disabled="true" type="textarea" v-model="inputForm.paymentAgreement" placeholder="请输入付款约定"></el-input>
+            <el-input maxlength="1000" :disabled="true" type="textarea" v-model="inputForm.paymentAgreement" placeholder="请输入付款约定"></el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="案卷号" prop="filedNo"
+                        :rules="[{required: true, message: '请输入案卷号', trigger: 'blur'}
+                 ]">
+            <el-input maxlength="15" v-model="inputForm.filedNo" placeholder="请输入案卷号"
+            ></el-input>
           </el-form-item>
         </el-col>
 
@@ -283,10 +295,10 @@
             </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>
 

+ 59 - 54
src/views/modules/cw/workContract/ContractFilePaperForm.vue

@@ -164,27 +164,6 @@
           </el-form-item>
         </el-col>
 
-        <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="status !== 'audit'"
-                 label-width="150px">
-          <el-col :span="12">
-            <el-form-item label="案卷号" prop="filedNo"
-                          :rules="[{required: true, message: '请输入案卷号', trigger: 'blur'}
-                 ]">
-              <el-input maxlength="15" 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-input maxlength="15" @change="checkFiledNo" v-model="inputForm.confirmFiledNo" placeholder="请输入确认案卷号"
-              ></el-input>
-            </el-form-item>
-          </el-col>
-        </el-form>
-
         <el-col :span="12">
           <el-form-item label="创建人" prop="createBy"
                         :rules="[{required: true, message: '创建人', trigger: 'blur'}
@@ -229,6 +208,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" :disabled="true" 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"
                         :rules="[{required: true, message: '请填写合同实际金额', trigger: 'blur'}
                  ]">
@@ -258,12 +248,24 @@
           </el-form-item>
         </el-col>
 
-        <el-col :span="12">
+        <el-col :span="24">
           <el-form-item label="付款约定" prop="paymentAgreement">
-            <el-input maxlength="64" :disabled="true" type="textarea" v-model="inputForm.paymentAgreement" placeholder="请输入付款约定"></el-input>
+            <el-input maxlength="1000" :disabled="true" type="textarea" v-model="inputForm.paymentAgreement" placeholder="请输入付款约定"></el-input>
           </el-form-item>
         </el-col>
 
+        <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="status !== 'audit'"
+                 label-width="150px">
+          <el-col :span="12">
+            <el-form-item label="案卷号" prop="filedNo"
+                          :rules="[{required: true, message: '请输入案卷号', trigger: 'blur'}
+                 ]">
+              <el-input maxlength="15" v-model="inputForm.filedNo" placeholder="请输入案卷号"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+        </el-form>
+
       </el-row>
     </el-form>
       <el-tabs v-model="activeName" type="border-card" @tab-click="tabHandleClick">
@@ -313,10 +315,10 @@
             </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>
 
@@ -379,6 +381,7 @@
           contractType: '',
           contractAmountType: '',
           contractAmount: '',
+          predictAmount: '',
           contractOpposite: '',
           fees: '',
           contractFee: '',
@@ -413,6 +416,7 @@
           contractInfoId: '',
           signingDate: '',
           contractAmount: '',
+          predictAmount: '',
           actualContractAmount: '',
           contractNum: '',
           contractStatus: '',
@@ -430,7 +434,7 @@
           filedNo: '',
           confirmFiledNo: ''
         },
-        activeName: 'archiveFile',
+        activeName: 'uploadFile',
         filesArra2: [],
         fileList: [],
         isFlag: true,
@@ -490,7 +494,7 @@
       },
       bus: {
         get () {
-          this.$refs.archiveFile.setDividerName('附件', false)
+          // this.$refs.archiveFile.setDividerName('附件', false)
           this.$refs.uploadFile.setDividerName('附件', false)
           return this.businessId
         },
@@ -518,14 +522,14 @@
 
         console.log('evemt', event)
       },
-      checkFiledNo () {
-        let filedNo = this.inputForm.filedNo
-        let confirmFiledNo = this.inputForm.confirmFiledNo
-        if (filedNo !== confirmFiledNo) {
-          this.$message.warning(`案卷号和确认案卷号不一致`)
-          this.inputForm.confirmFiledNo = ''
-        }
-      },
+      // checkFiledNo () {
+      //   let filedNo = this.inputForm.filedNo
+      //   let confirmFiledNo = this.inputForm.confirmFiledNo
+      //   if (filedNo !== confirmFiledNo) {
+      //     this.$message.warning(`案卷号和确认案卷号不一致`)
+      //     this.inputForm.confirmFiledNo = ''
+      //   }
+      // },
       getKeyWatch (keyWatch) {
         this.keyWatch = keyWatch
       },
@@ -574,6 +578,7 @@
           paymentDescribe: '',
           signingDate: '',
           contractAmount: '',
+          predictAmount: '',
           actualContractAmount: '',
           contractNum: '',
           contractStatus: '',
@@ -607,7 +612,7 @@
         this.$nextTick(() => {
           this.loading = true
           this.$refs.uploadFile.clearUpload()
-          this.$refs.archiveFile.clearUpload()
+          // this.$refs.archiveFile.clearUpload()
           // 查询合同登记数据
           // console.log('this.inputForm.id', this.inputForm.id)
           this.contractInfoService.findById(this.inputForm.id).then(({data}) => {
@@ -626,8 +631,8 @@
             }
             // console.log('data', data)
             // console.log('this.inputForm.department', this.inputForm.department)
-            this.$refs.uploadFile.newUpload('view', this.inputForm.contractProperList, 'cwWorkContract', null, null, null, null, false)
-            this.$refs.archiveFile.newUpload(method, this.inputForm.contractInfoList, 'cwWorkContract', null, null, null, null, false)
+            this.$refs.uploadFile.newUpload(method, this.inputForm.contractProperList, 'cwWorkContract', null, null, null, null, false)
+            // this.$refs.archiveFile.newUpload(method, this.inputForm.contractInfoList, 'cwWorkContract', null, null, null, null, false)
             this.loading = false
           })
         }
@@ -718,7 +723,7 @@
       // 表单提交
       // 暂存
       saveForm (callback) {
-        if (this.$refs.archiveFile.checkProgress() || this.$refs.uploadFile.checkProgress()) {
+        if (/* this.$refs.archiveFile.checkProgress() || */ this.$refs.uploadFile.checkProgress()) {
           this.loading = false
           throw new Error()
         } else {
@@ -740,9 +745,9 @@
               // 合同登记归档暂存
               _this.inputForm.filedPaperType = '1'
               _this.inputForm.contractInfoId = _this.businessId
-              _this.inputForm.contractInfoList = _this.$refs.archiveFile.getDataList()
+              // _this.inputForm.contractInfoList = _this.$refs.archiveFile.getDataList()
               // console.log('actualContractAmount', _this.inputForm.actualContractAmount)
-              // this.inputForm.contractInfoList = this.$refs.uploadFile.getDataList()
+              _this.inputForm.contractInfoList = _this.$refs.uploadFile.getDataList()
               await _this.contractFilePaperService.save(_this.inputForm)
               await _this.contractInfoService.updatePaperInfo(_this.inputForm)
               resolve()
@@ -764,7 +769,7 @@
         if (this.commonJS.isEmpty(this.inputForm.actualContractAmount)) {
           this.$message.error('请填写合同实际金额')
           throw new Error('请填写合同实际金额')
-        } else if (this.$refs.archiveFile.checkProgress() || this.$refs.uploadFile.checkProgress()) {
+        } else if (/* this.$refs.archiveFile.checkProgress() || */ this.$refs.uploadFile.checkProgress()) {
           this.loading = false
           throw new Error()
         } else {
@@ -778,9 +783,9 @@
           // console.log('inputForm', this.inputForm)
           this.contractInfoService.updatePaperInfo(this.inputForm)
           this.inputForm.contractInfoId = id
-          this.inputForm.contractInfoList = this.$refs.archiveFile.getDataList()
+          // this.inputForm.contractInfoList = this.$refs.archiveFile.getDataList()
           // console.log('this.inputForm', this.inputForm)
-          // this.inputForm.contractProperList = this.$refs.uploadFile.getDataList()
+          this.inputForm.contractProperList = this.$refs.uploadFile.getDataList()
 
           this.contractFilePaperService.save(this.inputForm).then(({data}) => {
             // console.log('data', data)
@@ -799,7 +804,7 @@
       },
       // 通过
       agreeForm (callback) {
-        if (this.$refs.archiveFile.checkProgress() || this.$refs.uploadFile.checkProgress()) {
+        if (/* this.$refs.archiveFile.checkProgress() || */ this.$refs.uploadFile.checkProgress()) {
           this.loading = false
           throw new Error()
         } else {
@@ -817,11 +822,11 @@
             this.$message.error('请填写案卷号')
             throw new Error('请填写案卷号')
           }
-          if (this.inputForm.confirmFiledNo === '' || this.inputForm.confirmFiledNo === undefined) {
-            this.loading = false
-            this.$message.error('请填写确认案卷号')
-            throw new Error('请填写确认案卷号')
-          }
+          // if (this.inputForm.confirmFiledNo === '' || this.inputForm.confirmFiledNo === undefined) {
+          //   this.loading = false
+          //   this.$message.error('请填写确认案卷号')
+          //   throw new Error('请填写确认案卷号')
+          // }
           // this.inputForm.contractInfoList = this.$refs.uploadFile.getDataList()
           this.contractFilePaperService.save(this.inputForm).then(({data}) => {
             callback(data.businessTable, data.businessId, this.inputForm)
@@ -862,7 +867,7 @@
         this.inputForm.clientName = ''
         this.visible = false
         this.showVi = true
-        this.$refs.archiveFile.clearUpload()
+        // this.$refs.archiveFile.clearUpload()
         this.$refs.uploadFile.clearUpload()
       },
       httpRequest (file) {
@@ -968,7 +973,7 @@
         this.visable = false
       },
       updateStatusById (type, callback) {
-        if (this.$refs.archiveFile.checkProgress() || this.$refs.uploadFile.checkProgress()) {
+        if (/* this.$refs.archiveFile.checkProgress() || */ this.$refs.uploadFile.checkProgress()) {
           this.loading = false
           throw new Error()
         } else {

+ 44 - 39
src/views/modules/cw/workContract/ContractNameForm.vue

@@ -223,6 +223,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" ></el-input>
                 </el-form-item>
@@ -250,30 +261,21 @@
                 </el-form-item>
               </el-col>
 
-              <el-col :span="12">
-                <el-form-item label="案卷号" prop="filedNo" v-if="this.inputForm.filedPaperType !== '0' & this.inputForm.filedPaperType !== ''"
-                              :rules="[{required: true, message: '请输入案卷号', trigger: 'blur'}
-                       ]">
-                  <el-input maxlength="15" v-model="inputForm.filedNo" placeholder="请输入案卷号"
-                  ></el-input>
+              <el-col :span="24">
+                <el-form-item label="付款约定" prop="paymentAgreement">
+                  <el-input maxlength="1000" type="textarea" v-model="inputForm.paymentAgreement" placeholder="请输入付款约定"></el-input>
                 </el-form-item>
               </el-col>
 
               <el-col :span="12">
-                <el-form-item label="确认案卷号" prop="confirmFiledNo" v-if="this.inputForm.filedPaperType !== '0' & this.inputForm.filedPaperType !== ''"
-                              :rules="[{required: true, message: '请输入确认案卷号', trigger: 'blur'}
+                <el-form-item label="案卷号" prop="filedNo" v-if="this.inputForm.filedPaperType === '2' & this.inputForm.filedPaperType === '5'"
+                              :rules="[{required: true, message: '请输入案卷号', trigger: 'blur'}
                        ]">
-                  <el-input maxlength="15" @change="checkFiledNo" v-model="inputForm.confirmFiledNo" placeholder="请输入确认案卷号"
+                  <el-input maxlength="15" v-model="inputForm.filedNo" placeholder="请输入案卷号"
                   ></el-input>
                 </el-form-item>
               </el-col>
 
-        <el-col :span="12">
-          <el-form-item label="付款约定" prop="paymentAgreement">
-            <el-input maxlength="64" type="textarea" v-model="inputForm.paymentAgreement" placeholder="请输入付款约定"></el-input>
-          </el-form-item>
-        </el-col>
-
             </el-row>
           </el-form>
           <el-tabs v-model="activeName" type="border-card" @tab-click="tabHandleClick">
@@ -323,10 +325,10 @@
                 </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-tab-pane>
@@ -554,6 +556,7 @@
           contractType: '',
           contractAmountType: '',
           contractAmount: '',
+          predictAmount: '',
           contractOpposite: '',
           fees: '',
           contractFee: '',
@@ -589,6 +592,7 @@
           contractInfoId: '',
           signingDate: '',
           contractAmount: '',
+          predictAmount: '',
           actualContractAmount: '',
           contractNum: '',
           contractStatus: '',
@@ -604,7 +608,7 @@
           contractProperList: [],
           contractInfoList: []
         },
-        activeName: 'archiveFile',
+        activeName: 'uploadFile',
         activeNameTop: 'contract',
         filesArra2: [],
         fileList: [],
@@ -687,7 +691,7 @@
       },
       bus: {
         get () {
-          this.$refs.archiveFile.setDividerName('附件', false)
+          // this.$refs.archiveFile.setDividerName('附件', false)
           return this.businessId
         },
         set (val) {
@@ -709,14 +713,14 @@
       }
     },
     methods: {
-      checkFiledNo () {
-        let filedNo = this.inputForm.filedNo
-        let confirmFiledNo = this.inputForm.confirmFiledNo
-        if (filedNo !== confirmFiledNo) {
-          this.$message.warning(`案卷号和确认案卷号不一致`)
-          this.inputForm.confirmFiledNo = ''
-        }
-      },
+      // checkFiledNo () {
+      //   let filedNo = this.inputForm.filedNo
+      //   let confirmFiledNo = this.inputForm.confirmFiledNo
+      //   if (filedNo !== confirmFiledNo) {
+      //     this.$message.warning(`案卷号和确认案卷号不一致`)
+      //     this.inputForm.confirmFiledNo = ''
+      //   }
+      // },
       getKeyWatch (keyWatch) {
         this.keyWatch = keyWatch
       },
@@ -775,6 +779,7 @@
           paymentDescribe: '',
           signingDate: '',
           contractAmount: '',
+          predictAmount: '',
           actualContractAmount: '',
           contractNum: '',
           contractStatus: '',
@@ -807,7 +812,7 @@
         this.$nextTick(() => {
           this.loading = true
           this.$refs.uploadFile.clearUpload()
-          this.$refs.archiveFile.clearUpload()
+          // this.$refs.archiveFile.clearUpload()
           // if (this.inputForm.filedType !== '0') {
           //   this.$refs.archiveFile.clearUpload()
           // }
@@ -839,8 +844,8 @@
               this.inputForm.contractInfoList = []
             }
             this.$refs.uploadFile.newUpload(method, this.inputForm.contractProperList, 'cwWorkContract', null, null, null, null, false)
-            this.$refs.archiveFile.newUpload('view', this.inputForm.contractInfoList, 'cwWorkContract', null, null, null, null, false)
-            this.$refs.archiveFile.setDividerName('', false)
+            // this.$refs.archiveFile.newUpload('view', this.inputForm.contractInfoList, 'cwWorkContract', null, null, null, null, false)
+            // this.$refs.archiveFile.setDividerName('', false)
             this.loading = false
           })
           // 获取关联项目信息
@@ -890,7 +895,7 @@
       },
       // 表单提交  保存数据
       doSubmit (status, callback) {
-        if (this.$refs.archiveFile.checkProgress() || this.$refs.uploadFile.checkProgress()) {
+        if (/* this.$refs.archiveFile.checkProgress() || */ this.$refs.uploadFile.checkProgress()) {
           this.loading = false
           throw new Error()
         } else {
@@ -904,16 +909,16 @@
                     this.$message.error('请填写案卷号')
                     throw new Error('请填写案卷号')
                   }
-                  if (this.inputForm.confirmFiledNo === '' || this.inputForm.confirmFiledNo === undefined) {
-                    this.loading = false
-                    this.$message.error('请填写确认案卷号')
-                    throw new Error('请填写确认案卷号')
-                  }
+                  // if (this.inputForm.confirmFiledNo === '' || this.inputForm.confirmFiledNo === undefined) {
+                  //   this.loading = false
+                  //   this.$message.error('请填写确认案卷号')
+                  //   throw new Error('请填写确认案卷号')
+                  // }
                 }
                 this.inputForm.status = '5'
                 this.inputForm.filedType = '5'
                 this.inputForm.contractProperList = this.$refs.uploadFile.getDataList()
-                this.inputForm.contractInfoList = this.$refs.archiveFile.getDataList()
+                // this.inputForm.contractInfoList = this.$refs.archiveFile.getDataList()
                 this.inputForm.fees = this.inputForm.contractFees.join(',')
                 this.contractInfoService.save(this.inputForm).then(() => {
                   this.$emit('refreshDataList')

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

@@ -135,11 +135,11 @@
           <vxe-column min-width="150" align="center" title="所属部门" field="departmentName"></vxe-column>
           <vxe-column min-width="150" align="center" title="创建人" field="createBy"></vxe-column>
           <vxe-column min-width="150" align="center" title="创建日期" field="createDate"></vxe-column>
-<!--          <vxe-column width="200px" title="状态" field="status">-->
-<!--            <template slot-scope="scope">-->
-<!--              <el-button  type="text" @click="detail(scope.row)" :type="$dictUtils.getDictLabel('cw_status_flag', scope.row.status, '-')" effect="dark" size="mini">{{$dictUtils.getDictLabel("cw_status", scope.row.status, '-')}} </el-button>-->
-<!--            </template>-->
-<!--          </vxe-column>-->
+          <vxe-column min-width="100px" title="状态" field="status" fixed="right" align="center" >
+            <template slot-scope="scope">
+              <el-button  type="text" @click="detail(scope.row)" :type="$dictUtils.getDictLabel('cw_status_flag', scope.row.status, '-')" effect="dark" size="mini">{{$dictUtils.getDictLabel("cw_status", scope.row.status, '-')}} </el-button>
+            </template>
+          </vxe-column>
 <!--          <vxe-column width="200px" title="电子归档" field="filedType">-->
 <!--            <template slot-scope="scope">-->
 <!--              <el-button  type="text" @click="detailFiled(scope.row)" :type="$dictUtils.getDictLabel('filed_type_status', scope.row.filedType, '-')" effect="dark" size="mini">{{$dictUtils.getDictLabel("filed_type", scope.row.filedType, '未归档')}} </el-button>-->
@@ -160,13 +160,13 @@
           <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 !== '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 !== '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-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-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="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.status === '4')  && 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'" type="text" size="small" @click="reback(scope.row)">撤回</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'" type="text" size="small" @click="reback(scope.row)">撤回</el-button>
 <!--              <el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '5' && scope.row.createId === $store.state.user.id && (scope.row.filedType === '0' || scope.row.filedType === undefined)" type="text" size="small" @click="filed(scope.row.id)">归档</el-button>-->
               <!--归档暂存修改-->
 <!--              <el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '5' && scope.row.createId === $store.state.user.id && scope.row.filedType === '1'" type="text" size="small" @click="filed(scope.row.id)">修改</el-button>-->
@@ -348,8 +348,8 @@
       },
       // 新增
       add () {
-        this.$refs.contractAddForm.init('add', '')
-        // this.start()
+        // this.$refs.contractAddForm.init('add', '')
+        this.start()
       },
       // 详情
       detail (row) {
@@ -425,6 +425,7 @@
             this.$router.push({
               path: '/flowable/task/TaskForm',
               query: {
+                ...pick(data.data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
                 procDefId: this.processDefinitionId,
                 procDefKey: this.procDefKey,
                 status: 'startAndHold',

+ 122 - 39
src/views/modules/cw/workContract/ContractRegistrationForm.vue

@@ -1,9 +1,9 @@
 <template>
   <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'"
              label-width="150px">
 
-      <el-divider v-if="formReadOnly && commonJS.isNotEmpty(inputForm.customerId)" content-position="left">
+      <el-divider v-if="status === 'audit' || status === 'taskFormDetail' && 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>
@@ -65,9 +65,9 @@
         </el-col>
         <el-col :span="12">
           <el-form-item label="合同类型" prop="contractType"
-                        :rules="[
-                 ]">
-            <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"
@@ -218,6 +218,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)"
@@ -241,9 +252,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>
 
@@ -257,7 +268,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'" @click="openWorkClient">
               新增参与签约方
             </el-button>
           </el-row>
@@ -290,17 +301,17 @@
                 </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'" 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>
 
@@ -348,6 +359,7 @@
         isSubmit: false,
         visible: false,
         loading: false,
+        contractNoFlag: false,
         returnForm: {
           customerId: '',  // 客户id
           address: '',
@@ -360,6 +372,7 @@
           contractType: '',
           contractAmountType: '',
           contractAmount: '',
+          predictAmount: '',
           contractOpposite: '',
           contractFees: [],
           fees: '',
@@ -388,6 +401,7 @@
           paymentDescribe: '',
           signingDate: '',
           contractAmount: '',
+          predictAmount: '',
           actualContractAmount: '',
           contractNum: '2',
           contractStatus: '新创建',
@@ -430,6 +444,10 @@
       formReadOnly: {
         type: Boolean,
         default: false
+      },
+      status: {
+        type: String,
+        default: ''
       }
     },
     components: {
@@ -461,7 +479,7 @@
       },
       bus: {
         get () {
-          this.$refs.archiveFile.setDividerName('附件', false)
+          // this.$refs.archiveFile.setDividerName('附件', false)
           this.$refs.uploadComponent.setDividerName('附件', false)
           return this.businessId
         },
@@ -528,6 +546,7 @@
           signingDate: '',
           fees: '',
           contractAmount: '',
+          predictAmount: '',
           actualContractAmount: '',
           contractNum: '',
           contractStatus: '',
@@ -560,9 +579,14 @@
           // 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'
             }
@@ -598,11 +622,11 @@
               })
             }
             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.newUpload('view', [], 'cwWorkContract', null, null, null, null, false)
             this.loading = false
           })
         })
@@ -737,7 +761,7 @@
       // 表单提交
       // 暂存
       async saveForm (callback) {
-        if (this.$refs.archiveFile.checkProgress() || this.$refs.uploadComponent.checkProgress()) {
+        if (/* this.$refs.archiveFile.checkProgress() || */ this.$refs.uploadComponent.checkProgress()) {
           this.loading = false
           throw new Error()
         } else {
@@ -761,7 +785,7 @@
         if (this.commonJS.isEmpty(this.inputForm.cwWorkClientContactDTOList)) {
           this.$message.error('“参与签约方”中至少有一条数据')
           throw new Error('“参与签约方”中至少有一条数据')
-        } else if (this.$refs.archiveFile.checkProgress() || this.$refs.uploadComponent.checkProgress()) {
+        } else if (/* this.$refs.archiveFile.checkProgress() || */ this.$refs.uploadComponent.checkProgress()) {
           this.loading = false
           throw new Error()
         } else {
@@ -772,6 +796,7 @@
               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} [财务-发票申请]`
                 callback(data.businessTable, data.businessId, this.inputForm)
                 this.$refs.inputForm.resetFields()
                 this.loading = false
@@ -785,7 +810,7 @@
       },
       // 通过
       agreeForm (callback) {
-        if (this.$refs.archiveFile.checkProgress() || this.$refs.uploadComponent.checkProgress()) {
+        if (/* this.$refs.archiveFile.checkProgress() || */ this.$refs.uploadComponent.checkProgress()) {
           this.loading = false
           throw new Error()
         } else {
@@ -939,31 +964,89 @@
       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) {
+        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.$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(() => {
+                    callback()
+                  })
+                }
+              }
+            })
+          } else if (type === 'hold') {
+            this.contractInfoService.findById(this.inputForm.id).then(({data}) => {
+              if (data.status !== '4') { // status的值不等于“驳回”就弹出提示
+                this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+                throw new Error()
+              } else {
+                // 终止
+                let param = {status: '1', id: this.inputForm.id}
+                this.contractInfoService.updateStatusById(param).then(() => {
+                  callback()
+                })
+              }
+            })
           }
         }
       },
+      reapplyForm (callback) {
+        this.contractInfoService.findById(this.inputForm.id).then(({data}) => {
+          if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
+            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+          } else {
+            this.startForm(callback)
+          }
+        })
+      },
       checkData () {
         let begin = this.inputForm.effectiveDate
         let close = this.inputForm.closingDate

+ 3 - 1
src/views/modules/flowable/task/TaskForm.vue

@@ -493,6 +493,7 @@
       // Process_1673492595431 物资管理-入库修改
       // Process_1673600899831 物资管理-合同
       // Process_1673924346231 中审-报销审批
+      // Process_1667894339167 会计-合同登记
       // 驳回
       reject (vars) {
         if (this.procDefId.includes('Process_1667978088459') ||
@@ -525,7 +526,8 @@
           this.procDefId.includes('Process_1673332958749') ||
           this.procDefId.includes('Process_1673492595431') ||
           this.procDefId.includes('Process_1673600899831') ||
-          this.procDefId.includes('Process_1673924346231')
+          this.procDefId.includes('Process_1673924346231') ||
+          this.procDefId.includes('Process_1667894339167')
         ) {
           console.log('进入新版驳回')
           this.$confirm(`确定驳回流程吗?`, '提示', {