gaoluyang
2 天以前 787ccc59ba89bacc075562a161ecf02bc76ebadc
src/api/erp/sale/order/index.ts
@@ -1,4 +1,4 @@
import type { PageParam, PageResult } from '..\..\..\..\packages\effects\request\src';
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
@@ -8,6 +8,7 @@
    id?: number; // 订单工单编号
    no: string; // 销售订单号
    customerId: number; // 客户编号
    customerName?: string; // 客户名称
    accountId?: number; // 收款账户编号
    orderTime: Date; // 订单时间
    totalCount: number; // 合计数量
@@ -15,13 +16,21 @@
    status: number; // 状态
    remark: string; // 备注
    outCount: number; // 销售出库数量
    fileUrl?: string; // 附件地址
    outStatus?: number; // 出库状态:0-未出库,1-部分出库,2-全部出库
    attachmentList?: { id: number; name?: string; url?: string }[]; // 附件列表
    inCount?: number; // 采购入库数量
    returnCount: number; // 销售退货数量
    totalProductPrice?: number; // 产品金额,单位:元
    discountPercent?: number; // 优惠率,百分比
    discountPrice?: number; // 优惠金额,单位:元
    depositPrice?: number; // 定金金额,单位:元
    contractId?: number; // 关联 CRM 合同编号
    contractNo?: string; // CRM 合同单号
    needProduction?: number; // 是否需要生产:0-不需要,1-需要
    productionStatus?: number; // 生产状态:0-未完成,1-已完成
    productionFinishTime?: Date; // 生产完成时间
    hasSalesNotice?: boolean; // 是否已生成发货通知单
    canCreateSalesNotice?: boolean; // 是否可以生成发货通知单
    items?: SaleOrderItem[]; // 销售订单产品明细列表
  }
@@ -44,6 +53,8 @@
    totalTaxPrice?: number; // 含税总价,单位:元
    remark?: string; // 备注
    stockCount?: number; // 库存数量(显示字段)
    needProduction?: number; // 是否需要生产:0-不需要,1-需要
    mpsId?: number; // MPS编号
  }
}
@@ -97,3 +108,17 @@
export function exportSaleOrder(params: any) {
  return requestClient.download('/erp/sale-order/export-excel', { params });
}
/** 作废销售订单 */
export function cancelSaleOrder(id: number) {
  return requestClient.put('/erp/sale-order/cancel', null, {
    params: { id },
  });
}
/** 启用销售订单(恢复已作废订单) */
export function enableSaleOrder(id: number) {
  return requestClient.put('/erp/sale-order/enable', null, {
    params: { id },
  });
}