Преглед на файлове

评估-合同借用修改

lizhenhao преди 2 години
родител
ревизия
bfdec4b034
променени са 2 файла, в които са добавени 17 реда и са изтрити 12 реда
  1. 9 4
      src/views/modules/sys/workContract/WorkContractBorrowForm.vue
  2. 8 8
      src/views/modules/sys/workContract/WorkContractList.vue

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

@@ -183,10 +183,15 @@
       // 同意
       agreeForm (callback) {
         this.inputForm.borrowType = '5'
-        this.workContractBorrowService.updateMessageStatusById(this.inputForm).then(({data}) => {
-          callback(data.businessTable, data.businessId, this.inputForm)
-          this.$refs.inputForm.resetFields()
-          this.loading = false
+        this.workContractBorrowService.updateStatusById(this.inputForm).then(() => {
+          this.workContractBorrowService.updateMessageStatusById(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
+          })
         }).catch(() => {
           this.$refs.inputForm.resetFields()
           this.loading = false

+ 8 - 8
src/views/modules/sys/workContract/WorkContractList.vue

@@ -131,11 +131,11 @@
                     <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>
                   </template>
                 </vxe-column>
-<!--                <vxe-column width="100px"  title="借用状态" field="borrowType" >-->
-<!--                  <template slot-scope="scope">-->
-<!--                    <el-button  type="text" @click="detailBorrow(scope.row)" :type="$dictUtils.getDictLabel('borrow_type_status', scope.row.borrowType, '-')" effect="dark" size="mini">{{$dictUtils.getDictLabel("borrow_type", scope.row.borrowType, '未借用')}} </el-button>-->
-<!--                  </template>-->
-<!--                </vxe-column>-->
+                <vxe-column width="100px"  title="借用状态" field="borrowType" >
+                  <template slot-scope="scope">
+                    <el-button  type="text" @click="detailBorrow(scope.row)" :type="$dictUtils.getDictLabel('borrow_type_status', scope.row.borrowType, '-')" effect="dark" size="mini">{{$dictUtils.getDictLabel("borrow_type", scope.row.borrowType, '未借用')}} </el-button>
+                  </template>
+                </vxe-column>
 
                 <vxe-column title="操作" width="200px" fixed="right" align="center">
                     <template  slot-scope="scope">
@@ -152,11 +152,11 @@
                       <!--归档撤回-->
                       <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 === '0' || scope.row.borrowType === '1')" type="text" size="small" @click="borrow(scope.row.id)">借用</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 === '0' || 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: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>-->
+                      <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>