Forráskód Böngészése

合同相关页面调整

user5 2 éve
szülő
commit
de3fe61635

+ 5 - 5
src/components/userSelect/UserSelectDialog.vue

@@ -37,7 +37,7 @@
           </el-tree>
         </el-card>
       </el-aside>
-  
+
     <el-container>
       <el-header style="text-align: left; font-size: 12px;height:30px">
         <el-form size="small" :inline="true" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
@@ -51,7 +51,7 @@
             </el-form-item>
           </el-form>
       </el-header>
-      
+
       <el-main>
         <el-table
           :data="dataList"
@@ -143,7 +143,7 @@
         </el-pagination>
       </el-main>
     </el-container>
-    
+
     <el-aside width="200px">
       <el-tag
         :key="tag.id"
@@ -160,7 +160,7 @@
       <el-button size="small" type="primary" icon="el-icon-circle-check" @click="doSubmit()">确定</el-button>
     </span>
     </el-dialog>
-  
+
   </div>
 </template>
 
@@ -435,4 +435,4 @@
     }
   }
 }
-</style>
+</style>

+ 9 - 7
src/views/modules/sys/workContract/WorkContractBorrowForm.vue

@@ -28,11 +28,13 @@
       </el-col>
 
       <el-col :span="12">
-        <el-form-item label="借用日期" prop="borrowData">
+        <el-form-item label="借用日期" prop="borrowData" :rules="[
+                  {required: true, message:'请填写借用日期', trigger:'blur'}
+               ]">
           <el-date-picker
             :disabled="this.inputForm.borrowType === '2'"
             v-model="inputForm.borrowData"
-            type="date"
+            value-format="yyyy-MM-dd"
             placeholder="选择日期">
           </el-date-picker>
         </el-form-item>
@@ -45,7 +47,7 @@
           <el-date-picker
             :disabled="this.inputForm.borrowType === '2'"
             v-model="inputForm.borrowRetData"
-            type="date"
+            value-format="yyyy-MM-dd"
             placeholder="选择日期">
           </el-date-picker>
         </el-form-item>
@@ -198,19 +200,19 @@
       updateStatusById (type) {
         console.log('updateStatusById', this.inputForm)
         if (type === 'agree') {
-          this.inputForm.borrowType = '6'
+          this.inputForm.borrowType = '5'
           this.workContractBorrowService.updateStatusById(this.inputForm)
         }
         if (type === 'reject') {
-          this.inputForm.borrowType = '1'
+          this.inputForm.borrowType = '0'
           this.workContractBorrowService.updateStatusById(this.inputForm).then(() => {
-            this.inputForm.borrowType = '4'
+            this.inputForm.borrowType = '3'
             this.inputForm.type = 'reject'
             this.workContractBorrowService.updateMessageStatusById(this.inputForm)
           })
         }
         if (type === 'reback') {
-          this.inputForm.borrowType = '1'
+          this.inputForm.borrowType = '0'
           this.workContractBorrowService.updateStatusById(this.inputForm)
         }
       }

+ 11 - 1
src/views/modules/sys/workContract/WorkContractBorrowMessageForm.vue

@@ -35,7 +35,11 @@
                 </vxe-column>
                 <vxe-column width="200px" title="借用时间" field="borrowData" ></vxe-column>
                 <vxe-column width="200px" title="大概归还时间" field="borrowRetData" ></vxe-column>
-                <vxe-column width="200px" title="实际归还时间" field="retData"></vxe-column>
+                <vxe-column width="200px" title="实际归还时间" field="retData">
+                  <template slot-scope="scope">
+                    {{getRetData(scope.row.retData)}}
+                  </template>
+                </vxe-column>
 
             </vxe-table>
         </div>
@@ -73,6 +77,12 @@
       close () {
         this.visible = false
         this.dataList = []
+      },
+      getRetData (value) {
+        if (value) {
+          return value
+        }
+        return '--'
       }
     }
   }

+ 10 - 11
src/views/modules/sys/workContract/WorkContractFileForm.vue

@@ -38,8 +38,8 @@
                ]">
             <el-date-picker
               placement="bottom-start"
+              value-format="yyyy-MM-dd"
               v-model="inputForm.contractDate"
-              type="date"
               style="width: 100%"
               placeholder="选择日期">
             </el-date-picker>
@@ -50,8 +50,8 @@
           <el-form-item label="合同生效日期" prop="effectiveDate">
             <el-date-picker
               placement="bottom-start"
+              value-format="yyyy-MM-dd"
               v-model="inputForm.effectiveDate"
-              type="date"
               style="width: 100%"
               placeholder="选择日期">
             </el-date-picker>
@@ -63,8 +63,8 @@
             <el-date-picker
               @change="checkData"
               placement="bottom-start"
+              value-format="yyyy-MM-dd"
               v-model="inputForm.closingDate"
-              type="date"
               style="width: 100%"
               placeholder="选择日期">
             </el-date-picker>
@@ -183,7 +183,7 @@
         </el-col>
       </el-row>
 
-      <el-row v-if="this.inputForm.filedType === '3'">
+      <el-row v-if="this.inputForm.filedType === '2'">
         <el-col :span="12">
           <el-form-item label="案卷号" prop="filedNo" :rules="[
                   {required: true, message:'请输入案卷号', trigger:'blur'}
@@ -447,7 +447,6 @@
               } else {
                 this.inputForm = this.recover(this.inputForm, data)
               }
-              console.log('125798459398', this.inputForm)
               const f = []
               if (data.fees !== null && data.fees !== undefined && data.fees !== '') {
                 data.fees.split(',').forEach(item => {
@@ -481,7 +480,7 @@
         }
         // 合同登记归档暂存
         if (this.status === 'startAndHoldFiled') {
-          this.inputForm.filedType = '2'
+          this.inputForm.filedType = '1'
           this.inputForm.contractInfoId = this.businessId
           this.workContractFileService.save(this.inputForm)
         }
@@ -502,7 +501,7 @@
         }
         this.workContractService.save(this.inputForm)
         console.log('inputForm', this.inputForm)
-        this.inputForm.filedType = '3'
+        this.inputForm.filedType = '2'
         this.inputForm.contractInfoId = id
         this.workContractFileService.save(this.inputForm).then(({data}) => {
           console.log('data', data)
@@ -523,7 +522,7 @@
         }
         this.workContractService.save(this.inputForm)
         console.log('inputForm', this.inputForm)
-        this.inputForm.filedType = '3'
+        this.inputForm.filedType = '2'
         this.inputForm.contractInfoId = id
         this.workContractFileService.save(this.inputForm).then(({data}) => {
           callback(data.businessTable, data.businessId, this.inputForm)
@@ -682,15 +681,15 @@
       updateStatusById (type) {
         console.log('updateStatusById', this.inputForm)
         if (type === 'agree') {
-          this.inputForm.filedType = '6'
+          this.inputForm.filedType = '5'
           this.workContractFileService.updateStatusById(this.inputForm)
         }
         if (type === 'reject') {
-          this.inputForm.filedType = '5'
+          this.inputForm.filedType = '4'
           this.workContractFileService.updateStatusById(this.inputForm)
         }
         if (type === 'reback') {
-          this.inputForm.filedType = '4'
+          this.inputForm.filedType = '3'
           this.workContractFileService.updateStatusById(this.inputForm)
         }
       },

+ 3 - 3
src/views/modules/sys/workContract/WorkContractForm.vue

@@ -38,8 +38,8 @@
                ]">
             <el-date-picker
               placement="bottom-start"
+              value-format="yyyy-MM-dd"
               v-model="inputForm.contractDate"
-              type="date"
               style="width: 100%"
               placeholder="选择日期">
             </el-date-picker>
@@ -50,8 +50,8 @@
           <el-form-item label="合同生效日期" prop="effectiveDate">
             <el-date-picker
               placement="bottom-start"
+              value-format="yyyy-MM-dd"
               v-model="inputForm.effectiveDate"
-              type="date"
               style="width: 100%"
               placeholder="选择日期">
             </el-date-picker>
@@ -63,8 +63,8 @@
             <el-date-picker
               @change="checkData"
               placement="bottom-start"
+              value-format="yyyy-MM-dd"
               v-model="inputForm.closingDate"
-              type="date"
               style="width: 100%"
               placeholder="选择日期">
             </el-date-picker>

+ 3 - 3
src/views/modules/sys/workContract/WorkContractForm2.vue

@@ -47,7 +47,7 @@
                    ]">
                 <el-date-picker
                   v-model="inputForm.contractDate"
-                  type="date"
+                  value-format="yyyy-MM-dd"
                   style="width: 418px"
                   placeholder="选择日期">
                 </el-date-picker>
@@ -58,7 +58,7 @@
               <el-form-item label="合同生效日期" prop="effectiveDate">
                 <el-date-picker
                   v-model="inputForm.effectiveDate"
-                  type="date"
+                  value-format="yyyy-MM-dd"
                   style="width: 418px"
                   placeholder="选择日期">
                 </el-date-picker>
@@ -69,8 +69,8 @@
               <el-form-item label="合同终止日期" prop="closingDate">
                 <el-date-picker
                   @change="checkData"
+                  value-format="yyyy-MM-dd"
                   v-model="inputForm.closingDate"
-                  type="date"
                   style="width: 418px"
                   placeholder="选择日期">
                 </el-date-picker>

+ 42 - 29
src/views/modules/sys/workContract/WorkContractList.vue

@@ -142,15 +142,21 @@
                       <el-button v-if="hasPermission('sys:workContract:view')" type="text" size="small" @click="view(scope.row.id)">查看</el-button>
                       <el-button v-if="hasPermission('sys:workContract:edit') && scope.row.status !== '2' && scope.row.status !== '5' && scope.row.createId === create" type="text" size="small" @click="edit(scope.row)">修改</el-button>
                       <el-button v-if="hasPermission('sys:workContract:edit') && scope.row.status === '5' && isAdmin" type="text" size="small" @click="editForm(scope.row.id)">修改</el-button>
-                      <el-button v-if="hasPermission('sys:workContract:del') && (scope.row.status === '1' || scope.row.status === '3')  && scope.row.createId === create" type="text" size="small" @click="del(scope.row.id)">删除</el-button>
+                      <el-button v-if="hasPermission('sys:workContract:del') && (scope.row.status === '1' || scope.row.status === '3' || scope.row.status === '4')  && scope.row.createId === create" type="text" size="small" @click="del(scope.row.id)">删除</el-button>
                       <el-button v-if="hasPermission('sys:workContract:back') && scope.row.status === '2'" type="text" size="small" @click="reback(scope.row)">撤回</el-button>
-                      <el-button v-if="hasPermission('sys:workContract:filed') && scope.row.status === '5' && scope.row.createId === create && (scope.row.filedType === '1' || scope.row.filedType === '4' || scope.row.filedType === undefined)" type="text" size="small" @click="filed(scope.row.id)">归档</el-button>
-                      <el-button v-if="hasPermission('sys:workContract:filed') && scope.row.status === '5' && scope.row.createId === create && scope.row.filedType === '2'" type="text" size="small" @click="filed(scope.row.id)">修改</el-button>
-                      <el-button v-if="hasPermission('sys:workContract:filed') && scope.row.status === '5' && scope.row.createId === create && scope.row.filedType === '5'" type="text" size="small" @click="filedAndClose(scope.row.id)">修改</el-button>
-                      <el-button v-if="hasPermission('sys:workContract:back') && scope.row.status === '5' && scope.row.filedType === '3'" type="text"  size="small" @click="rebackFiled(scope.row)">撤回</el-button>
-                      <el-button v-if="hasPermission('sys:workContract:borrow') && scope.row.status === '5' && scope.row.filedType === '6' && (scope.row.borrowType === undefined || scope.row.borrowType === '1')" type="text" size="small" @click="borrow(scope.row.id)">借用</el-button>
-                      <el-button v-if="hasPermission('sys:workContract:back') && scope.row.status === '5' && scope.row.filedType === '6' && scope.row.borrowType === '2'" type="text" size="small" @click="rebackBorrow(scope.row)">撤回</el-button>
-                      <el-button v-if="hasPermission('sys:workContract:reture') && scope.row.status === '5' && scope.row.filedType === '6' && scope.row.borrowType === '6'" type="text" size="small" @click="retureBorrow(scope.row)">归还合同</el-button>
+                      <el-button v-if="hasPermission('sys:workContract:filed') && scope.row.status === '5' && scope.row.createId === create && (scope.row.filedType === '0' || scope.row.filedType === undefined)" type="text" size="small" @click="filed(scope.row.id)">归档</el-button>
+                      <!--归档暂存修改-->
+                      <el-button v-if="hasPermission('sys:workContract:filed') && scope.row.status === '5' && scope.row.createId === create && scope.row.filedType === '1'" type="text" size="small" @click="filed(scope.row.id)">修改</el-button>
+                      <!--归档撤回驳回修改-->
+                      <el-button v-if="hasPermission('sys:workContract:filed') && scope.row.status === '5' && scope.row.createId === create && (scope.row.filedType === '3' || scope.row.filedType === '4')" type="text" size="small" @click="filedAndClose(scope.row.id)">修改</el-button>
+                      <!--归档撤回-->
+                      <el-button v-if="hasPermission('sys:workContract:back') && scope.row.status === '5' && scope.row.filedType === '2'" type="text"  size="small" @click="rebackFiled(scope.row)">撤回</el-button>
+                      <!--合同借用-->
+                      <el-button v-if="hasPermission('sys:workContract:borrow') && scope.row.status === '5' && scope.row.filedType === '5' && (scope.row.borrowType === undefined || scope.row.borrowType === '1')" type="text" size="small" @click="borrow(scope.row.id)">借用</el-button>
+                      <!--借用撤回-->
+                      <el-button v-if="hasPermission('sys:workContract:back') && scope.row.status === '5' && scope.row.filedType === '5' && scope.row.borrowType === '2'" type="text" size="small" @click="rebackBorrow(scope.row)">撤回</el-button>
+                      <!--借用归还-->
+                      <el-button v-if="hasPermission('sys:workContract:reture') && scope.row.status === '5' && scope.row.filedType === '5' && scope.row.borrowType === '5'" type="text" size="small" @click="retureBorrow(scope.row)">归还合同</el-button>
                     </template>
                 </vxe-column>
             </vxe-table>
@@ -497,11 +503,12 @@
           this.workContractService.updateStatusById(row)
         }
         if (type === 'rebackFiled') {
-          row.filedType = '4'
+          row.filedType = '3'
           this.workContractFileService.updateStatusById(row)
         }
         if (type === 'rebackBorrow') {
-          row.borrowType = '1'
+          console.log('借用撤回')
+          row.borrowType = '0'
           this.workContractBorrowService.updateStatusByContractInfoId(row).then(() => {
             this.workContractBorrowService.deleteById(row.id)
           })
@@ -510,7 +517,7 @@
           row.borrowType = '1'
           this.workContractBorrowService.updateStatusByContractInfoId(row).then(() => {
             row.type = 'reture'
-            row.borrowType = '6'
+            row.borrowType = '5'
             this.workContractBorrowService.updateMessageStatusById(row)
           })
         }
@@ -564,23 +571,23 @@
               businessId: id,
               businessTable: 'work_contract_file',
               status: 'startAndCloseFiled'}).then((reture) => {
-              this.$router.push({
-                path: '/flowable/task/TaskForm',
-                query: {
-                  procDefId: data.id,
-                  procDefKey: data.key,
-                  status: 'startAndCloseFiled',
-                  title: tabTitle,
-                  formType: reture.data.formType,
-                  formUrl: reture.data.formUrl,
-                  formTitle: processTitle,
-                  businessTable: 'work_contract_file',
-                  businessId: id,
-                  isShow: false,
-                  routePath: '/sys/workContract/WorkContractList'
-                }
+                this.$router.push({
+                  path: '/flowable/task/TaskForm',
+                  query: {
+                    procDefId: data.id,
+                    procDefKey: data.key,
+                    status: 'startAndCloseFiled',
+                    title: tabTitle,
+                    formType: reture.data.formType,
+                    formUrl: reture.data.formUrl,
+                    formTitle: processTitle,
+                    businessTable: 'work_contract_file',
+                    businessId: id,
+                    isShow: false,
+                    routePath: '/sys/workContract/WorkContractList'
+                  }
+                })
               })
-            })
           }
         })
       },
@@ -672,8 +679,14 @@
       },
       // 归还合同
       retureBorrow (row) {
-        this.updateStatusById(row, 'retureBorrow')
-        this.refreshList()
+        this.$confirm(`确定归还合同吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.updateStatusById(row, 'retureBorrow')
+          this.refreshList()
+        })
       }
     }
   }