From db0431fbd5f565ab5942a42882241c0f82b88ecc Mon Sep 17 00:00:00 2001 From: Timi Date: Mon, 19 Oct 2026 16:48:59 +0800 Subject: [PATCH] add OrderFulfillmentQuick.vue --- src/api/FulfillmentAPI.ts | 24 +- src/components/CustomerSelector.vue | 1 + .../productSelector/ProductSelectPopup.vue | 212 +++++++- .../productSelector/ProductSkuSelector.vue | 33 +- .../fulfillment/OrderFulfillmentList.vue | 14 + .../fulfillment/OrderFulfillmentQuick.vue | 480 ++++++++++++++++++ .../OrderFulfillmentQuickQuantity.vue | 424 ++++++++++++++++ .../OrderFulfillmentQuickSourceOrders.vue | 436 ++++++++++++++++ .../components/OrderFulfillmentQuickTypes.ts | 21 + src/pages/tabs/HomeTab.vue | 20 +- src/router/routes/fulfillmentRoutes.ts | 27 +- src/types/Fulfillment.ts | 57 +++ src/types/ProductSkuSelection.ts | 2 + 13 files changed, 1716 insertions(+), 35 deletions(-) create mode 100644 src/pages/fulfillment/OrderFulfillmentQuick.vue create mode 100644 src/pages/fulfillment/components/OrderFulfillmentQuickQuantity.vue create mode 100644 src/pages/fulfillment/components/OrderFulfillmentQuickSourceOrders.vue create mode 100644 src/pages/fulfillment/components/OrderFulfillmentQuickTypes.ts diff --git a/src/api/FulfillmentAPI.ts b/src/api/FulfillmentAPI.ts index b7ddded..772d786 100644 --- a/src/api/FulfillmentAPI.ts +++ b/src/api/FulfillmentAPI.ts @@ -1,6 +1,17 @@ import { axios } from "timi-web-api"; import { withCurrentStoreId } from "@/utils/store"; -import type { FulfillmentActionRequest, FulfillmentPage, FulfillmentPageResult, FulfillmentPrepareStockRequest, FulfillmentRevokeRequest, OrderFulfillment, OrderFulfillmentCreateRequest } from "@/types/Fulfillment"; +import type { + FulfillmentActionRequest, + FulfillmentPage, + FulfillmentPageResult, + FulfillmentPrepareStockRequest, + FulfillmentRevokeRequest, + OrderFulfillment, + OrderFulfillmentCreateRequest, + QuickFulfillmentCreateRequest, + QuickFulfillmentSku, + QuickFulfillmentSourceOrder +} from "@/types/Fulfillment"; const URI = "/gao/order/fulfillment"; async function list(page: FulfillmentPage): Promise> { @@ -15,6 +26,15 @@ async function create(request: OrderFulfillmentCreateRequest): Promise { return await axios.post(`${URI}/create-and-verify`, request); } +async function quickSkuList(customerId: string): Promise { + return await axios.post(`${URI}/quick/sku-list`, { customerId }); +} +async function quickSourceOrderList(customerId: string, skuIdList: string[]): Promise { + return await axios.post(`${URI}/quick/source-order-list`, { customerId, skuIdList }); +} +async function quickCreate(request: QuickFulfillmentCreateRequest): Promise { + return await axios.post(`${URI}/quick/create`, request); +} async function prepareStock(request: FulfillmentPrepareStockRequest): Promise { return await axios.post(`${URI}/prepare-stock`, request); } @@ -31,4 +51,4 @@ async function revoke(request: FulfillmentRevokeRequest): Promise diff --git a/src/components/productSelector/ProductSelectPopup.vue b/src/components/productSelector/ProductSelectPopup.vue index 8926210..e5b622d 100644 --- a/src/components/productSelector/ProductSelectPopup.vue +++ b/src/components/productSelector/ProductSelectPopup.vue @@ -3,8 +3,10 @@ v-model="popupVisible" title="选择产品 SKU" height="80vh" - right-button-text="" - @left-button-click="close" + left-button-text="取消" + :right-button-text="props.selectionMode === 'multiple' ? '完成' : ''" + @left-button-click="cancelSelection" + @right-button-click="confirmSelection" >