|
@@ -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()
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|