|
@@ -20,8 +20,8 @@
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="合同状态" prop="type">
|
|
|
- <el-select v-model="searchForm.type" placeholder="请选择" style="width:100%;">
|
|
|
+ <el-form-item label="合同状态" prop="status">
|
|
|
+ <el-select v-model="searchForm.status" placeholder="请选择" style="width:100%;">
|
|
|
<el-option
|
|
|
v-for="item in $dictUtils.getDictList('approval_type')"
|
|
|
:key="item.value"
|
|
@@ -120,9 +120,9 @@
|
|
|
<vxe-column width="100px" title="合同金额(元)" field="contractAmount"></vxe-column>
|
|
|
<vxe-column width="100px" title="创建人" field="createBy"></vxe-column>
|
|
|
<vxe-column width="150px" title="签订日期" field="contractDate"></vxe-column>
|
|
|
- <vxe-column width="100px" title="状态" field="type" >
|
|
|
+ <vxe-column width="100px" title="状态" field="status" >
|
|
|
<template slot-scope="scope">
|
|
|
- {{ $dictUtils.getDictLabel("approval_type", scope.row.type, '-') }}
|
|
|
+ {{ $dictUtils.getDictLabel("approval_type", scope.row.status, '-') }}
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
<!-- <vxe-column width="100px" title="归档状态" field="filedType" >-->
|
|
@@ -139,8 +139,9 @@
|
|
|
<vxe-column title="操作" width="200px" fixed="right" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button v-if="hasPermission('sys:workContract:view')" type="text" icon="el-icon-view" size="small" @click="view(scope.row.id)">查看</el-button>
|
|
|
- <el-button v-if="hasPermission('sys:workContract:edit') " type="text" icon="el-icon-edit" size="small" @click="edit(scope.row.id)">修改</el-button>
|
|
|
- <el-button v-if="hasPermission('sys:workContract:del') " type="text" icon="el-icon-delete" size="small" @click="del(scope.row.id)">删除</el-button>
|
|
|
+ <el-button v-if="hasPermission('sys:workContract:edit') && scope.row.status === '1'" type="text" icon="el-icon-edit" size="small" @click="edit(scope.row)">修改</el-button>
|
|
|
+ <el-button v-if="hasPermission('sys:workContract:del') && scope.row.status === '1'" type="text" icon="el-icon-delete" size="small" @click="del(scope.row.id)">删除</el-button>
|
|
|
+ <el-button v-if="hasPermission('sys:workContract:back') && scope.row.status === '2'" type="text" icon="el-icon-back" size="small" @click="del(scope.row.id)">撤回</el-button>
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
</vxe-table>
|
|
@@ -246,16 +247,15 @@
|
|
|
},
|
|
|
// 新增
|
|
|
add () {
|
|
|
- // this.$refs.workContractForm.init('add', '')
|
|
|
this.start()
|
|
|
},
|
|
|
// 修改
|
|
|
- edit (id) {
|
|
|
- id = id || this.$refs.workContractTable.getCheckboxRecords().map(item => {
|
|
|
- return item.id
|
|
|
- })[0]
|
|
|
+ edit (row) {
|
|
|
+ // row.id || this.$refs.workContractTable.getCheckboxRecords().map(item => {
|
|
|
+ // return item.id
|
|
|
+ // })[0]
|
|
|
// this.$refs.workContractForm2.init('edit', id)
|
|
|
- this.start(id)
|
|
|
+ this.start1(row)
|
|
|
},
|
|
|
// 查看
|
|
|
view (id) {
|
|
@@ -306,6 +306,30 @@
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
+ },
|
|
|
+ start1 (row) {
|
|
|
+ // 读取流程表单
|
|
|
+ let tabTitle = `发起流程【合同登记新建】`
|
|
|
+ let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [合同登记新建]`
|
|
|
+ this.taskService.getTaskDef({ procDefId: 'Process_1662628133027:6:582ad0be-3329-11ed-bee1-b40ede887c28',
|
|
|
+ businessId: row.id,
|
|
|
+ businessTable: 'work_contract_info',
|
|
|
+ status: 'startAndHold'}).then((data) => {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/flowable/task/TaskForm',
|
|
|
+ query: {
|
|
|
+ procDefId: 'Process_1662628133027:6:582ad0be-3329-11ed-bee1-b40ede887c28',
|
|
|
+ procDefKey: 'Process_1662628133027',
|
|
|
+ status: 'startAndHold',
|
|
|
+ title: tabTitle,
|
|
|
+ formType: data.data.formType,
|
|
|
+ formUrl: data.data.formUrl,
|
|
|
+ formTitle: processTitle,
|
|
|
+ businessTable: 'work_contract_info',
|
|
|
+ businessId: row.id
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|