Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
Merge pull request #112 from Jzow/master
Browse files Browse the repository at this point in the history
Fix typescript syntax errors
  • Loading branch information
Jzow authored Oct 25, 2023
2 parents 13a7d84 + 8043204 commit eeaf335
Show file tree
Hide file tree
Showing 9 changed files with 396 additions and 309 deletions.
4 changes: 3 additions & 1 deletion src/api/product/model/productAttributeModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,7 @@ export interface AddOrUpdateProductAttributeReq {
}

export interface ProductAttributeListReq {
attributeName: string;
attributeName: string | undefined;
page: number;
pageSize: number;
}
53 changes: 29 additions & 24 deletions src/api/product/model/productModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[];
Expand All @@ -67,6 +67,8 @@ export interface QueryProductReq {
export interface ProductInfoDetailResp {
productId: string;
productCategoryId: string;
productUnitId: string;
productUnit: string;
productName: string;
productStandard: string;
productModel: string;
Expand All @@ -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;
Expand All @@ -102,7 +107,7 @@ export interface ProductPriceResp {
}

export interface ProductStockResp {
id: number | string;
productStockId: number | string;
warehouseId: number | string;
warehouseName: string;
initStockQuantity: number;
Expand Down
2 changes: 1 addition & 1 deletion src/api/product/model/productUnitModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export interface AddOrUpdateProductUnitReq {
}

export interface ProductUnitQueryReq {
computeUnit: string;
computeUnit: string | undefined;
page: number;
pageSize: number;
}
8 changes: 2 additions & 6 deletions src/api/product/productAttribute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<BaseDataResp<ProductAttributeResp>>(
{
url: Api.List,
params,
},
{
errorMessageMode: mode,
successMessageMode: mode,
},
}
);
}

Expand Down
7 changes: 2 additions & 5 deletions src/api/product/productCategory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,11 @@ enum Api {
deleteBatch = '/product/category/deleteBatch',
}

export function getCategoryList(mode: ErrorMessageMode = 'notice') {
export function getCategoryList() {
return defHttp.get<BaseDataResp<ProductCategoryResp>>(
{
url: Api.List,
},
{
errorMessageMode: mode,
},
}
);
}

Expand Down
8 changes: 2 additions & 6 deletions src/api/product/productUnit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<BaseDataResp<ProductUnitResp>>(
{
url: Api.List,
params,
},
{
errorMessageMode: mode,
successMessageMode: mode,
},
}
);
}

Expand Down
Loading

0 comments on commit eeaf335

Please sign in to comment.