diff --git a/src/api/product/model/productAttributeModel.ts b/src/api/product/model/productAttributeModel.ts index 104e790..0a82fac 100644 --- a/src/api/product/model/productAttributeModel.ts +++ b/src/api/product/model/productAttributeModel.ts @@ -24,5 +24,7 @@ export interface AddOrUpdateProductAttributeReq { } export interface ProductAttributeListReq { - attributeName: string; + attributeName: string | undefined; + page: number; + pageSize: number; } \ No newline at end of file diff --git a/src/api/product/model/productModel.ts b/src/api/product/model/productModel.ts index edc7db4..8750fd7 100644 --- a/src/api/product/model/productModel.ts +++ b/src/api/product/model/productModel.ts @@ -19,34 +19,34 @@ export interface AddProductPriceReq { } export interface AddProductImageReq { - productImageId: number | string; - uid: string; - type: string; - status: string; - imageName: string; - imageUrl: string; - imageSize: number; + productImageId: number | string | null; + uid: string | null; + type: string | null | undefined; + status: string | null | undefined; + imageName: string | null; + imageUrl: string | null; + imageSize: number | null | undefined; } export interface AddProductReq { productId: number | string; productName: string; productStandard: string; - productModel: string; - productUnit: string | undefined, - productUnitId: number | string | undefined; - productColor: string; - productWeight: number; - productExpiryNum: number; - productCategoryId: number | string | undefined; - enableSerialNumber: number; - enableBatchNumber: number; - warehouseShelves: string; - remark: string; - productManufacturer: string; - otherFieldOne: string; - otherFieldTwo: string; - otherFieldThree: string; + productModel: string + productUnit: string + productUnitId: number | string; + productColor: string + productWeight: number | string; + productExpiryNum: number | string; + productCategoryId: number | string; + enableSerialNumber: number | string; + enableBatchNumber: number | string; + warehouseShelves: string + remark: string + productManufacturer: string + otherFieldOne: string + otherFieldTwo: string + otherFieldThree: string priceList: AddProductPriceReq[]; stockList: AddProductStockReq[]; imageList: AddProductImageReq[]; @@ -67,6 +67,8 @@ export interface QueryProductReq { export interface ProductInfoDetailResp { productId: string; productCategoryId: string; + productUnitId: string; + productUnit: string; productName: string; productStandard: string; productModel: string; @@ -81,17 +83,20 @@ export interface ProductInfoDetailResp { otherFieldOne: string; otherFieldTwo: string; otherFieldThree: string; + remark: string; priceList: ProductPriceResp[]; stockList: ProductStockResp[]; imageList: ProductImageResp[]; } export interface ProductImageResp { + productImageId: string; imageName: string; - iImageUrl: string; + imageUrl: string; } export interface ProductPriceResp { + productPriceId: string; barCode: number; productUnit: string; multiAttribute: string; @@ -102,7 +107,7 @@ export interface ProductPriceResp { } export interface ProductStockResp { - id: number | string; + productStockId: number | string; warehouseId: number | string; warehouseName: string; initStockQuantity: number; diff --git a/src/api/product/model/productUnitModel.ts b/src/api/product/model/productUnitModel.ts index 9a4065f..f23b9ed 100644 --- a/src/api/product/model/productUnitModel.ts +++ b/src/api/product/model/productUnitModel.ts @@ -22,7 +22,7 @@ export interface AddOrUpdateProductUnitReq { } export interface ProductUnitQueryReq { - computeUnit: string; + computeUnit: string | undefined; page: number; pageSize: number; } \ No newline at end of file diff --git a/src/api/product/productAttribute.ts b/src/api/product/productAttribute.ts index 75949a5..3a89d3a 100644 --- a/src/api/product/productAttribute.ts +++ b/src/api/product/productAttribute.ts @@ -10,16 +10,12 @@ enum Api { GetAttributeById = '/product/attribute/getValuesById', } -export function getAttributeList(params: ProductAttributeListReq ,mode: ErrorMessageMode = 'notice') { +export function getAttributeList(params: ProductAttributeListReq) { return defHttp.post>( { url: Api.List, params, - }, - { - errorMessageMode: mode, - successMessageMode: mode, - }, + } ); } diff --git a/src/api/product/productCategory.ts b/src/api/product/productCategory.ts index 10f3309..6097d0a 100644 --- a/src/api/product/productCategory.ts +++ b/src/api/product/productCategory.ts @@ -9,14 +9,11 @@ enum Api { deleteBatch = '/product/category/deleteBatch', } -export function getCategoryList(mode: ErrorMessageMode = 'notice') { +export function getCategoryList() { return defHttp.get>( { url: Api.List, - }, - { - errorMessageMode: mode, - }, + } ); } diff --git a/src/api/product/productUnit.ts b/src/api/product/productUnit.ts index cad1037..8f69c71 100644 --- a/src/api/product/productUnit.ts +++ b/src/api/product/productUnit.ts @@ -10,16 +10,12 @@ enum Api { UpdateStatus = '/product/unit/updateUnitStatus', } -export function getUnitList(params: ProductUnitQueryReq ,mode: ErrorMessageMode = 'notice') { +export function getUnitList(params: ProductUnitQueryReq) { return defHttp.post>( { url: Api.List, params, - }, - { - errorMessageMode: mode, - successMessageMode: mode, - }, + } ); } diff --git a/src/views/product/info/components/ProductInfoModal.vue b/src/views/product/info/components/ProductInfoModal.vue index 384ac6e..22f4120 100644 --- a/src/views/product/info/components/ProductInfoModal.vue +++ b/src/views/product/info/components/ProductInfoModal.vue @@ -55,7 +55,7 @@ placeholder="选择多单位" v-model:value="formState.productUnitId" :rules="[{ required: true}]" - @change="manyUnitOnChange" + @change="manyUnitOnChange(formState.productUnitId)" showSearch optionFilterProp="children" :dropdownMatchSelectWidth="false" @@ -151,7 +151,7 @@ 需要先录入单位才能激活 - + {{ item.attributeName }} @@ -165,7 +165,7 @@ :wrapperCol="{xs: { span: 24 },sm: { span: 20 }}" :label="skuOneTitle"> - + {{ item.value }} @@ -176,7 +176,7 @@ :wrapperCol="{xs: { span: 24 },sm: { span: 20 }}" :label="skuTwoTitle"> - + {{ item.value }} @@ -187,7 +187,7 @@ :wrapperCol="{xs: { span: 24 },sm: { span: 20 }}" :label="skuThreeTitle"> - + {{ item.value }} @@ -214,7 +214,7 @@ bordered :row-selection="rowSelection" :scroll="{ x: '100%', y: 300 }"> -