合同打印增加
parent
98e410e169
commit
08179a9f7f
|
|
@ -145,6 +145,11 @@ export const getOrgInfo = async (params) => {
|
|||
return await request.get({ url: '/system/organizations/get?id=' + params })
|
||||
}
|
||||
|
||||
// 打印合同
|
||||
export const printContract = async (id: number) => {
|
||||
return await request.put({ url: `/crm/contract/print?id=${id}` })
|
||||
}
|
||||
|
||||
// ==================== 子表(CRM 合同产品关联) ====================
|
||||
|
||||
// 获得CRM 合同产品关联列表
|
||||
|
|
|
|||
|
|
@ -277,6 +277,12 @@
|
|||
>
|
||||
合同变更
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
command="handlePrint"
|
||||
v-if="checkPermi(['crm:contract:update']) && scope.row.auditStatus === 0"
|
||||
>
|
||||
打印合同
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
command="handleDelete"
|
||||
v-if="checkPermi(['crm:contract:delete']) && scope.row.auditStatus === 0"
|
||||
|
|
@ -382,6 +388,7 @@ const handleChange = (row) => {
|
|||
router.push({ name: 'CrmContractChange', query: { id: row.id } })
|
||||
|
||||
}
|
||||
|
||||
/** 操作分发 */
|
||||
const handleCommand = (command: string, row: UserApi.UserVO) => {
|
||||
switch (command) {
|
||||
|
|
@ -391,7 +398,10 @@ const handleCommand = (command: string, row: UserApi.UserVO) => {
|
|||
case 'handleChange':
|
||||
handleChange(row)
|
||||
break
|
||||
case 'handleDelete':
|
||||
case 'handlePrint':
|
||||
onPrintContract(row)
|
||||
break
|
||||
case 'handleDelete':
|
||||
handleDelete(row.id)
|
||||
break
|
||||
default:
|
||||
|
|
@ -435,6 +445,13 @@ const handleSubmit = async (row: ContractApi.ContractVO) => {
|
|||
await getList()
|
||||
}
|
||||
|
||||
const onPrintContract = async (row: ContractApi.ContractVO) => {
|
||||
await message.confirm(`您确定打印【${row.name}】合同吗?`)
|
||||
await ContractApi.printContract(row.id)
|
||||
message.success('提交审核成功!')
|
||||
await getList()
|
||||
}
|
||||
|
||||
/** 查看审批 */
|
||||
const handleProcessDetail = (row) => {
|
||||
router.push({ name: 'BpmProcessInstanceDetail', query: { id: row.processInstanceId } })
|
||||
|
|
|
|||
Loading…
Reference in New Issue