采购单优化
This commit is contained in:
+12
-12
@@ -32,23 +32,23 @@ export async function exportPurchase(id: number, type: PurchaseExportType, forma
|
||||
);
|
||||
}
|
||||
|
||||
/** C4 门店单元格修改(数量/称重,同步订货明细并重算汇总) */
|
||||
export async function updatePurchaseCell(
|
||||
orderItemId: number,
|
||||
data: { quantity: number; weight?: number },
|
||||
) {
|
||||
return createAxios<{ quantity: number; weight: number; amount: number }>({
|
||||
url: `/purchase/order/cell/${orderItemId}`,
|
||||
method: 'put',
|
||||
data,
|
||||
});
|
||||
/** C4 商品行修改参数(品名/供应商/包规/单位/成本/称重,一键同步该商品全部订货明细;sync_product 追加同步商品档案) */
|
||||
export interface PurchaseRowUpdateParams {
|
||||
product_name?: string;
|
||||
supplier_id?: number;
|
||||
product_spec?: string;
|
||||
unit?: string;
|
||||
cost_price?: number;
|
||||
weight?: number;
|
||||
/** true = 同时同步至商品档案(product 表) */
|
||||
sync_product?: boolean;
|
||||
}
|
||||
|
||||
/** C4 商品行修改(成本/实际称重,同步该商品全部订货明细) */
|
||||
/** C4 商品行修改 */
|
||||
export async function updatePurchaseRow(
|
||||
purchaseId: number,
|
||||
productId: number,
|
||||
data: { cost_price?: number; weight?: number },
|
||||
data: PurchaseRowUpdateParams,
|
||||
) {
|
||||
return createAxios<{ count: number }>({
|
||||
url: `/purchase/order/${purchaseId}/row/${productId}`,
|
||||
|
||||
Reference in New Issue
Block a user