From 0871aa5078beedbc05121d6c02c607658c6397cf Mon Sep 17 00:00:00 2001 From: jameszow Date: Mon, 23 Oct 2023 23:26:28 +0800 Subject: [PATCH 1/4] Add Batch Edit Modal --- .../info/components/BatchEditModal.vue | 209 ++++++++++++++++++ 1 file changed, 209 insertions(+) create mode 100644 src/views/product/info/components/BatchEditModal.vue diff --git a/src/views/product/info/components/BatchEditModal.vue b/src/views/product/info/components/BatchEditModal.vue new file mode 100644 index 0000000..0acff51 --- /dev/null +++ b/src/views/product/info/components/BatchEditModal.vue @@ -0,0 +1,209 @@ + + + \ No newline at end of file From b6a141f744b58343f12d90fe693c3d79124f9930 Mon Sep 17 00:00:00 2001 From: jameszow Date: Mon, 23 Oct 2023 23:26:55 +0800 Subject: [PATCH 2/4] Add UpdateBatchProductInfo request object and add updateBatchProductInfo api --- src/api/product/model/productModel.ts | 11 +++++++++++ src/api/product/product.ts | 19 ++++++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/src/api/product/model/productModel.ts b/src/api/product/model/productModel.ts index ddbaca5..edc7db4 100644 --- a/src/api/product/model/productModel.ts +++ b/src/api/product/model/productModel.ts @@ -108,4 +108,15 @@ export interface ProductStockResp { initStockQuantity: number; lowStockQuantity: number; highStockQuantity: number; +} + +export interface UpdateBatchProductInfoReq { + productIds: number[]; + productCategoryId: number | string; + productColor: string; + productWeight: number; + productExpiryNum: number; + enableSerialNumber: string; + enableBatchNumber: string; + remark: string; } \ No newline at end of file diff --git a/src/api/product/product.ts b/src/api/product/product.ts index f5b2c27..ff48768 100644 --- a/src/api/product/product.ts +++ b/src/api/product/product.ts @@ -1,6 +1,11 @@ import {defHttp} from '/@/utils/http/axios'; import {BaseDataResp, BaseResp} from "@/api/model/baseModel"; -import {AddProductReq, ProductInfoDetailResp, QueryProductReq} from "@/api/product/model/productModel"; +import { + AddProductReq, + ProductInfoDetailResp, + QueryProductReq, + UpdateBatchProductInfoReq +} from "@/api/product/model/productModel"; import {ErrorMessageMode} from "#/axios"; enum Api { @@ -10,6 +15,7 @@ enum Api { getProductInfoDetail = '/product/getProductInfoDetail', deleteProduct = '/product/deleteProduct', updateProductStatus = '/product/updateProductStatus', + updateBatchProductInfo = '/product/updateBatchProductInfo', } export function getBarCode() { @@ -70,4 +76,15 @@ export function updateProductStatus(productIds: number[], status: number, mode: errorMessageMode: mode, } ); +} + +export function updateBatchProductInfo(params: UpdateBatchProductInfoReq, mode: ErrorMessageMode = 'notice') { + return defHttp.put( + { + url: Api.updateBatchProductInfo, + params + },{ + errorMessageMode: mode, + } + ); } \ No newline at end of file From 0c15fa9ede48e1257ca52ece72d27d2d94cda5c4 Mon Sep 17 00:00:00 2001 From: jameszow Date: Mon, 23 Oct 2023 23:27:21 +0800 Subject: [PATCH 3/4] remove not use UnwrapRef Ref toRaw --- src/views/product/info/components/BatchSetPriceModal.vue | 2 +- src/views/product/info/components/ProductInfoModal.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/product/info/components/BatchSetPriceModal.vue b/src/views/product/info/components/BatchSetPriceModal.vue index c468905..ea8c5dc 100644 --- a/src/views/product/info/components/BatchSetPriceModal.vue +++ b/src/views/product/info/components/BatchSetPriceModal.vue @@ -19,7 +19,7 @@