---初始化后台管理web页面项目
This commit is contained in:
168
src/api/erp/material/category/index.ts
Normal file
168
src/api/erp/material/category/index.ts
Normal file
@ -0,0 +1,168 @@
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
|
||||
import { ErrorMessageMode } from '/#/axios';
|
||||
import {
|
||||
CategoryPageListSearchModel,
|
||||
CategoryAddParamsModel,
|
||||
CategoryUpdateParamsModel,
|
||||
CategoryPageListResultModel,
|
||||
} from './model';
|
||||
|
||||
enum Api {
|
||||
Page = '/caseErpMaterial/caseErpMaterialClasses/page',
|
||||
List = '/caseErpMaterial/caseErpMaterialClasses/list',
|
||||
Category = '/caseErpMaterial/caseErpMaterialClasses',
|
||||
Info = '/caseErpMaterial/caseErpMaterialClasses/info',
|
||||
Export = '/caseErpMaterial/caseErpMaterialClasses/export',
|
||||
Import = '/caseErpMaterial/caseErpMaterialClasses/import',
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询物料类别(分页)
|
||||
*/
|
||||
export async function getCategoryPageList(
|
||||
params?: CategoryPageListSearchModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.get<CategoryPageListResultModel>(
|
||||
{
|
||||
url: Api.Page,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询物料类别(不分页)
|
||||
*/
|
||||
export async function getCategoryList(
|
||||
params?: CategoryPageListSearchModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.get<CategoryPageListResultModel>(
|
||||
{
|
||||
url: Api.List,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 新增物料类别
|
||||
*/
|
||||
export async function addCategoryList(
|
||||
type: CategoryAddParamsModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.post<number>(
|
||||
{
|
||||
url: Api.Category,
|
||||
params: type,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 修改物料类别
|
||||
*/
|
||||
export async function updateCategoryList(
|
||||
type: CategoryUpdateParamsModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.put<number>(
|
||||
{
|
||||
url: Api.Category,
|
||||
params: type,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 删除物料类别
|
||||
*/
|
||||
export async function deleteCategoryList(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.delete<number>(
|
||||
{
|
||||
url: Api.Category,
|
||||
data: id,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询物料类别详情
|
||||
*/
|
||||
export async function getCategoryListInfo(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<CategoryAddParamsModel>(
|
||||
{
|
||||
url: Api.Info,
|
||||
params: { id },
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 导出
|
||||
*/
|
||||
export async function exportInfo(ids: string[], mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.download(
|
||||
{
|
||||
url: Api.Export,
|
||||
method: 'POST',
|
||||
params: ids,
|
||||
responseType: 'blob',
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 下载模板
|
||||
*/
|
||||
export async function downloadTemplate(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.download(
|
||||
{
|
||||
url: Api.Export,
|
||||
method: 'GET',
|
||||
responseType: 'blob',
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 导入
|
||||
*/
|
||||
export async function importInfo(params, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.post(
|
||||
{
|
||||
url: Api.Import,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
31
src/api/erp/material/category/model/index.ts
Normal file
31
src/api/erp/material/category/model/index.ts
Normal file
@ -0,0 +1,31 @@
|
||||
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
|
||||
|
||||
export interface CategoryPageListParams {
|
||||
typeName?: string; //物料类别
|
||||
createDate?: string; //创建时间
|
||||
}
|
||||
|
||||
export interface CategoryAddParamsModel {
|
||||
typeName: string; //物料类别
|
||||
state: number; //状态 0-关闭 1-开启
|
||||
remark: string; //备注
|
||||
}
|
||||
|
||||
export interface CategoryUpdateParamsModel {
|
||||
id: string; //详情id
|
||||
typeName: string; //物料类别
|
||||
state: number; //状态 0-关闭 1-开启
|
||||
remark: string; //备注
|
||||
}
|
||||
|
||||
export interface CategoryListModel {
|
||||
id: string; //详情id
|
||||
typeName: string; //物料类别
|
||||
createUserName: string; //创建人
|
||||
createDate: string; //创建时间
|
||||
state: number; //状态 0-关闭 1-开启
|
||||
remark: string; //备注
|
||||
}
|
||||
|
||||
export type CategoryPageListSearchModel = BasicPageParams & CategoryPageListParams;
|
||||
export type CategoryPageListResultModel = BasicFetchResult<CategoryListModel>;
|
||||
299
src/api/erp/material/list/index.ts
Normal file
299
src/api/erp/material/list/index.ts
Normal file
@ -0,0 +1,299 @@
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
|
||||
import { ErrorMessageMode } from '/#/axios';
|
||||
import {
|
||||
MaterialPageListSearchModel,
|
||||
MaterialAddParamsModel,
|
||||
MaterialUpdateParamsModel,
|
||||
MaterialPageListResultModel,
|
||||
MaterialInfoParams,
|
||||
PurchaseModel,
|
||||
InStoreModel,
|
||||
OutStoreModel,
|
||||
LogModel,
|
||||
MaterialStockParamsModel,
|
||||
MaterialHistoryPageListSearchModel,
|
||||
MaterialHistoryPageListResultModel,
|
||||
} from './model';
|
||||
|
||||
enum Api {
|
||||
Page = '/caseErpMaterial/caseErpMaterial/page',
|
||||
List = '/caseErpMaterial/caseErpMaterial/list',
|
||||
Material = '/caseErpMaterial/caseErpMaterial',
|
||||
Info = '/caseErpMaterial/caseErpMaterial/info',
|
||||
Export = '/caseErpMaterial/caseErpMaterial/export',
|
||||
Import = '/caseErpMaterial/caseErpMaterial/import',
|
||||
Code = '/caseErpMaterial/caseErpMaterial/codeNumber',
|
||||
Purchase = '/caseErpMaterial/caseErpMaterial/purchase',
|
||||
InStore = '/caseErpMaterial/caseErpMaterial/in-store',
|
||||
OutStore = '/caseErpMaterial/caseErpMaterial/out-store',
|
||||
Log = '/caseErpMaterial/caseErpMaterial/log',
|
||||
Stock = '/caseErpMaterial/caseErpMaterial/stock-count',
|
||||
History = '/caseErpMaterial/caseErpMaterial/material-history-page',
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询物料清单(分页)
|
||||
*/
|
||||
export async function getMaterialPageList(
|
||||
params?: MaterialPageListSearchModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.get<MaterialPageListResultModel>(
|
||||
{
|
||||
url: Api.Page,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询物料清单(不分页)
|
||||
*/
|
||||
export async function getMaterialList(
|
||||
params?: MaterialPageListSearchModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.get<MaterialPageListResultModel>(
|
||||
{
|
||||
url: Api.List,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 新增物料信息
|
||||
*/
|
||||
export async function addMaterialList(
|
||||
type: MaterialAddParamsModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.post<number>(
|
||||
{
|
||||
url: Api.Material,
|
||||
params: type,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 修改物料信息
|
||||
*/
|
||||
export async function updateMaterialList(
|
||||
type: MaterialUpdateParamsModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.put<number>(
|
||||
{
|
||||
url: Api.Material,
|
||||
params: type,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 删除物料信息
|
||||
*/
|
||||
export async function deleteMaterialList(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.delete<number>(
|
||||
{
|
||||
url: Api.Material,
|
||||
data: id,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询物料信息详情
|
||||
*/
|
||||
export async function getMaterialListInfo(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<MaterialAddParamsModel>(
|
||||
{
|
||||
url: Api.Info,
|
||||
params: { id },
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询采购记录详情
|
||||
*/
|
||||
export async function getPurchaseInfo(
|
||||
params: MaterialInfoParams,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.get<PurchaseModel[]>(
|
||||
{
|
||||
url: Api.Purchase,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询入库记录详情
|
||||
*/
|
||||
export async function getInStoreInfo(params: MaterialInfoParams, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<InStoreModel[]>(
|
||||
{
|
||||
url: Api.InStore,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询出库记录详情
|
||||
*/
|
||||
export async function getOutStoreInfo(
|
||||
params: MaterialInfoParams,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.get<OutStoreModel[]>(
|
||||
{
|
||||
url: Api.OutStore,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询操作记录详情
|
||||
*/
|
||||
export async function getLogInfo(params: MaterialInfoParams, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<LogModel[]>(
|
||||
{
|
||||
url: Api.Log,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 导出
|
||||
*/
|
||||
export async function exportInfo(ids: string[], mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.download(
|
||||
{
|
||||
url: Api.Export,
|
||||
method: 'POST',
|
||||
params: ids,
|
||||
responseType: 'blob',
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 下载模板
|
||||
*/
|
||||
export async function downloadTemplate(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.download(
|
||||
{
|
||||
url: Api.Export,
|
||||
method: 'GET',
|
||||
responseType: 'blob',
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 导入
|
||||
*/
|
||||
export async function importInfo(params, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.post(
|
||||
{
|
||||
url: Api.Import,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 获取物料编码
|
||||
*/
|
||||
export async function getMaterialCode(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<string>(
|
||||
{
|
||||
url: Api.Code,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 修改库存盘点、报废
|
||||
*/
|
||||
export async function updateMaterialStock(
|
||||
params: MaterialStockParamsModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.put<number>(
|
||||
{
|
||||
url: Api.Stock,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询历史记录明细(分页)
|
||||
*/
|
||||
export async function getMaterialHistoryPageList(
|
||||
params?: MaterialHistoryPageListSearchModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.get<MaterialHistoryPageListResultModel>(
|
||||
{
|
||||
url: Api.History,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
119
src/api/erp/material/list/model/index.ts
Normal file
119
src/api/erp/material/list/model/index.ts
Normal file
@ -0,0 +1,119 @@
|
||||
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
|
||||
|
||||
export interface MaterialPageListParams {
|
||||
name?: string; //物料名称
|
||||
typeName?: string; //物料类别
|
||||
propertyName?: string; //物料属性
|
||||
state: number; //状态 0-关闭 1-开启
|
||||
}
|
||||
|
||||
export interface MaterialAddParamsModel {
|
||||
classesId: string; //物料类别id
|
||||
code: string; //物料编码
|
||||
fileId: string; //图片路径
|
||||
isSysCodeBoolean: number; //是否系统编码
|
||||
model: string; //规格型号
|
||||
name: string; //物料名称
|
||||
propertyId: string; //物料属性id
|
||||
unitId: string; //单位id
|
||||
createUserName: string; //创建人
|
||||
createDate: string; //创建时间
|
||||
modifyDate: string; //修改时间
|
||||
modifyUserName: string; //修改人
|
||||
unitName: string; //单位名称
|
||||
typeName: string; //物料类别名称
|
||||
propertyName: string; //物料属性名称
|
||||
}
|
||||
|
||||
export interface MaterialUpdateParamsModel {
|
||||
id: string; //详情id
|
||||
classesId: string; //物料类别id
|
||||
code: string; //物料编码
|
||||
fileId: string; //图片路径
|
||||
isSysCodeBoolean: number; //是否系统编码
|
||||
model: string; //规格型号
|
||||
name: string; //物料名称
|
||||
propertyId: string; //物料属性id
|
||||
unitId: string; //单位id
|
||||
}
|
||||
|
||||
export interface MaterialListModel {
|
||||
id: string; //详情id
|
||||
code: string; //物料编码
|
||||
name: string; //物料名称
|
||||
model: string; //规格型号
|
||||
inventory: number; //当前库存
|
||||
unitName: string; //单位
|
||||
typeName: string; //物料类别
|
||||
propertyName: string; //物料属性
|
||||
state: number; //状态 0-关闭 1-开启
|
||||
}
|
||||
|
||||
export interface PurchaseModel {
|
||||
number: string; //采购单号
|
||||
theme: string; //采购主题
|
||||
purchaseDate: string; //采购日期
|
||||
purchasePersonName: string; //采购人员
|
||||
purchaseDept: number; //采购部门
|
||||
supplierName: string; //供应商
|
||||
count: number; //采购数量
|
||||
accountSum: number; //采购金额
|
||||
}
|
||||
|
||||
export interface InStoreModel {
|
||||
number: string; //入库单号
|
||||
theme: string; //入库主题
|
||||
date: string; //入库日期
|
||||
insertType: string; //入库类型
|
||||
count: number; //数量
|
||||
person: string; //入库人员
|
||||
store: number; //入库仓库
|
||||
}
|
||||
|
||||
export interface OutStoreModel {
|
||||
number: string; //出库单号
|
||||
theme: string; //出库主题
|
||||
date: string; //出库日期
|
||||
outType: string; //出库类型
|
||||
count: number; //数量
|
||||
person: string; //出库人员
|
||||
store: number; //出库仓库
|
||||
}
|
||||
|
||||
export interface LogModel {
|
||||
operateUserAccount: string; //操作人
|
||||
operateTime: string; //操作时间
|
||||
executeResultJson: string; //操作内容
|
||||
}
|
||||
|
||||
export interface MaterialInfoParams {
|
||||
id: string; //id
|
||||
keyword?: string; //关键字
|
||||
}
|
||||
|
||||
export interface MaterialStockParamsModel {
|
||||
id: string;
|
||||
count: number; //数量
|
||||
type: number; //-1:减少、1:增加、0:报废
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
export interface MaterialHistoryPageListParams {
|
||||
id: string; //详情id
|
||||
type?: string; //类型
|
||||
}
|
||||
|
||||
export interface MaterialHistoryListModel {
|
||||
id: string; //详情id
|
||||
typeName: string; //库存类别
|
||||
name: string; //产品名称
|
||||
operateTypeName: string; //操作类型
|
||||
createDate: number; //操作时间
|
||||
count: number; //数量
|
||||
localInventory?: number; //库存结余
|
||||
}
|
||||
|
||||
export type MaterialPageListSearchModel = BasicPageParams & MaterialPageListParams;
|
||||
export type MaterialPageListResultModel = BasicFetchResult<MaterialListModel>;
|
||||
export type MaterialHistoryPageListSearchModel = BasicPageParams & MaterialHistoryPageListParams;
|
||||
export type MaterialHistoryPageListResultModel = BasicFetchResult<MaterialHistoryListModel>;
|
||||
168
src/api/erp/material/property/index.ts
Normal file
168
src/api/erp/material/property/index.ts
Normal file
@ -0,0 +1,168 @@
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
|
||||
import { ErrorMessageMode } from '/#/axios';
|
||||
import {
|
||||
PropertyPageListSearchModel,
|
||||
PropertyAddParamsModel,
|
||||
PropertyUpdateParamsModel,
|
||||
PropertyPageListResultModel,
|
||||
} from './model';
|
||||
|
||||
enum Api {
|
||||
Page = '/caseErpMaterial/caseErpMaterialProperty/page',
|
||||
List = '/caseErpMaterial/caseErpMaterialProperty/list',
|
||||
Property = '/caseErpMaterial/caseErpMaterialProperty',
|
||||
Info = '/caseErpMaterial/caseErpMaterialProperty/info',
|
||||
Export = '/caseErpMaterial/caseErpMaterialProperty/export',
|
||||
Import = '/caseErpMaterial/caseErpMaterialProperty/import',
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询物料属性(分页)
|
||||
*/
|
||||
export async function getPropertylPageList(
|
||||
params?: PropertyPageListSearchModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.get<PropertyPageListResultModel>(
|
||||
{
|
||||
url: Api.Page,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询物料属性(不分页)
|
||||
*/
|
||||
export async function getPropertylList(
|
||||
params?: PropertyPageListSearchModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.get<PropertyPageListResultModel>(
|
||||
{
|
||||
url: Api.List,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 新增物料属性
|
||||
*/
|
||||
export async function addPropertyList(
|
||||
type: PropertyAddParamsModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.post<number>(
|
||||
{
|
||||
url: Api.Property,
|
||||
params: type,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 修改物料属性
|
||||
*/
|
||||
export async function updatePropertyList(
|
||||
type: PropertyUpdateParamsModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.put<number>(
|
||||
{
|
||||
url: Api.Property,
|
||||
params: type,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 删除物料属性
|
||||
*/
|
||||
export async function deletePropertyList(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.delete<number>(
|
||||
{
|
||||
url: Api.Property,
|
||||
data: id,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询物料属性
|
||||
*/
|
||||
export async function getPropertyListInfo(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<PropertyAddParamsModel>(
|
||||
{
|
||||
url: Api.Info,
|
||||
params: { id },
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 导出
|
||||
*/
|
||||
export async function exportInfo(ids: string[], mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.download(
|
||||
{
|
||||
url: Api.Export,
|
||||
method: 'POST',
|
||||
params: ids,
|
||||
responseType: 'blob',
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 下载模板
|
||||
*/
|
||||
export async function downloadTemplate(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.download(
|
||||
{
|
||||
url: Api.Export,
|
||||
method: 'GET',
|
||||
responseType: 'blob',
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 导入
|
||||
*/
|
||||
export async function importInfo(params, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.post(
|
||||
{
|
||||
url: Api.Import,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
31
src/api/erp/material/property/model/index.ts
Normal file
31
src/api/erp/material/property/model/index.ts
Normal file
@ -0,0 +1,31 @@
|
||||
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
|
||||
|
||||
export interface PropertyPageListParams {
|
||||
propertyName?: string; //物料属性
|
||||
createDate?: string; //创建时间
|
||||
}
|
||||
|
||||
export interface PropertyAddParamsModel {
|
||||
propertyName: string; //物料属性
|
||||
state: number; //状态 0-关闭 1-开启
|
||||
remark: string; //备注
|
||||
}
|
||||
|
||||
export interface PropertyUpdateParamsModel {
|
||||
id: string; //详情id
|
||||
propertyName: string; //物料属性
|
||||
state: number; //状态 0-关闭 1-开启
|
||||
remark: string; //备注
|
||||
}
|
||||
|
||||
export interface PropertyListModel {
|
||||
id: string; //详情id
|
||||
propertyName: string; //物料属性
|
||||
createUserName: string; //创建人
|
||||
createDate: string; //创建时间
|
||||
state: number; //状态 0-关闭 1-开启
|
||||
remark: string; //备注
|
||||
}
|
||||
|
||||
export type PropertyPageListSearchModel = BasicPageParams & PropertyPageListParams;
|
||||
export type PropertyPageListResultModel = BasicFetchResult<PropertyListModel>;
|
||||
Reference in New Issue
Block a user