| | |
| | | totalProductPrice: number; |
| | | discountPercent: number; |
| | | totalPrice: number; |
| | | depositPrice?: number; // 定金金额,单位:元 |
| | | totalReceivablePrice: number; |
| | | signContactId: number; |
| | | signContactName?: string; |
| | |
| | | updateTime?: Date; |
| | | products?: ContractProduct[]; |
| | | contactName?: string; |
| | | orderId?: number; // 关联 ERP 销售订单编号 |
| | | orderNo?: string; // ERP 销售订单单号 |
| | | } |
| | | |
| | | /** 合同产品信息 */ |
| | | export interface ContractProduct { |
| | | id: number; |
| | | productId: number; |
| | | productName: string; |
| | | productNo: string; |
| | | productUnit: number; |
| | | productPrice: number; |
| | | itemId: number; |
| | | itemName: string; |
| | | itemCode: string; |
| | | itemBarCode: string; |
| | | itemSpecification?: string; |
| | | itemUnitName: string; |
| | | itemUnitName2?: string; |
| | | itemUnitName3?: string; |
| | | itemPrice: number; |
| | | contractPrice: number; |
| | | count: number; |
| | | totalPrice: number; |
| | | } |
| | | |
| | | /** 审批流程 */ |
| | | export interface ApproveProcess { |
| | | key: string; |
| | | name: string; |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | /** 提交审核 */ |
| | | export function submitContract(id: number) { |
| | | return requestClient.put(`/crm/contract/submit?id=${id}`); |
| | | export function submitContract(id: number, processDefinitionKey: string) { |
| | | return requestClient.put('/crm/contract/submit', null, { |
| | | params: { id, processDefinitionKey }, |
| | | }); |
| | | } |
| | | |
| | | /** 获取合同审批流程列表 */ |
| | | export function getContractApproveProcessList() { |
| | | return requestClient.get<CrmContractApi.ApproveProcess[]>( |
| | | '/crm/contract/approve-process-list', |
| | | ); |
| | | } |
| | | |
| | | /** 合同转移 */ |
| | |
| | | export function getRemindContractCount() { |
| | | return requestClient.get<number>('/crm/contract/remind-count'); |
| | | } |
| | | |
| | | /** 根据合同生成销售订单 */ |
| | | export function generateSaleOrder(id: number) { |
| | | return requestClient.post<number>('/crm/contract/generate-sale-order', null, { params: { id } }); |
| | | } |