| | |
| | | export function generateSaleOrder(id: number) { |
| | | return requestClient.post<number>('/crm/contract/generate-sale-order', null, { params: { id } }); |
| | | } |
| | | |
| | | /** 合同导入结果 */ |
| | | export interface ImportResult { |
| | | /** 创建成功的合同编号 */ |
| | | createList?: string[]; |
| | | /** 更新成功的合同编号 */ |
| | | updateList?: string[]; |
| | | /** 导入失败集合,key 为合同编号或行号,value 为失败原因 */ |
| | | failureList?: Record<string, string>; |
| | | } |
| | | |
| | | /** 下载合同导入模板 */ |
| | | export function importContractTemplate() { |
| | | return requestClient.download('/crm/contract/get-import-template'); |
| | | } |
| | | |
| | | /** 导入合同 */ |
| | | export function importContract(file: File) { |
| | | return requestClient.upload<ImportResult>('/crm/contract/import', { file }); |
| | | } |