合同打印增加

pull/781/head
quu 2025-05-04 14:46:05 +09:00
parent 98e410e169
commit 08179a9f7f
2 changed files with 23 additions and 1 deletions

View File

@ -145,6 +145,11 @@ export const getOrgInfo = async (params) => {
return await request.get({ url: '/system/organizations/get?id=' + 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 合同产品关联) ====================
// 获得CRM 合同产品关联列表 // 获得CRM 合同产品关联列表

View File

@ -277,6 +277,12 @@
> >
合同变更 合同变更
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item
command="handlePrint"
v-if="checkPermi(['crm:contract:update']) && scope.row.auditStatus === 0"
>
打印合同
</el-dropdown-item>
<el-dropdown-item <el-dropdown-item
command="handleDelete" command="handleDelete"
v-if="checkPermi(['crm:contract:delete']) && scope.row.auditStatus === 0" 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 } }) router.push({ name: 'CrmContractChange', query: { id: row.id } })
} }
/** 操作分发 */ /** 操作分发 */
const handleCommand = (command: string, row: UserApi.UserVO) => { const handleCommand = (command: string, row: UserApi.UserVO) => {
switch (command) { switch (command) {
@ -391,7 +398,10 @@ const handleCommand = (command: string, row: UserApi.UserVO) => {
case 'handleChange': case 'handleChange':
handleChange(row) handleChange(row)
break break
case 'handleDelete': case 'handlePrint':
onPrintContract(row)
break
case 'handleDelete':
handleDelete(row.id) handleDelete(row.id)
break break
default: default:
@ -435,6 +445,13 @@ const handleSubmit = async (row: ContractApi.ContractVO) => {
await getList() 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) => { const handleProcessDetail = (row) => {
router.push({ name: 'BpmProcessInstanceDetail', query: { id: row.processInstanceId } }) router.push({ name: 'BpmProcessInstanceDetail', query: { id: row.processInstanceId } })