---初始化后台管理web页面项目
This commit is contained in:
152
src/api/erp/bom/product/index.ts
Normal file
152
src/api/erp/bom/product/index.ts
Normal file
@ -0,0 +1,152 @@
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
|
||||
import { ErrorMessageMode } from '/#/axios';
|
||||
import { BomInfoResultModel, BomAddParamsModel, BomTreeModel, BomUpdateParamsModel } from './model';
|
||||
|
||||
enum Api {
|
||||
Tree = '/caseErpBom/caseErpBom/tree',
|
||||
Bom = '/caseErpBom/caseErpBom',
|
||||
Info = '/caseErpBom/caseErpBom/info',
|
||||
Verification = '/caseErpBom/caseErpBom/verification',
|
||||
Export = '/caseErpBom/caseErpBom/export',
|
||||
Import = '/caseErpBom/caseErpBom/import',
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询BOM树
|
||||
*/
|
||||
export async function getBomTree(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<BomTreeModel>(
|
||||
{
|
||||
url: Api.Tree,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 新增BOM物料
|
||||
*/
|
||||
export async function addBomMaterial(type: BomAddParamsModel, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.post<number>(
|
||||
{
|
||||
url: Api.Bom,
|
||||
params: type,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 修改BOM物料
|
||||
*/
|
||||
export async function updateBomMaterial(
|
||||
type: BomUpdateParamsModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.put<number>(
|
||||
{
|
||||
url: Api.Bom,
|
||||
params: type,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 删除BOM物料
|
||||
*/
|
||||
export async function deleteBomMaterial(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.delete<number>(
|
||||
{
|
||||
url: Api.Bom,
|
||||
data: id,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 系统验证
|
||||
*/
|
||||
export async function getVerification(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<number>(
|
||||
{
|
||||
url: Api.Verification,
|
||||
params: { id },
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 根据id查询物料信息(当前以及子级信息)
|
||||
*/
|
||||
export async function getBomInfo(params, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<BomInfoResultModel>(
|
||||
{
|
||||
url: Api.Info,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 导出
|
||||
*/
|
||||
export async function exportInfo(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.download(
|
||||
{
|
||||
url: Api.Export,
|
||||
method: 'POST',
|
||||
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,
|
||||
},
|
||||
);
|
||||
}
|
||||
34
src/api/erp/bom/product/model/index.ts
Normal file
34
src/api/erp/bom/product/model/index.ts
Normal file
@ -0,0 +1,34 @@
|
||||
export interface BomAddParamsModel {
|
||||
parentId?: string; //父级Id
|
||||
code: string; //物料编号
|
||||
name: string; //物料名称
|
||||
model: string; //规格型号
|
||||
typeName: string; //物料类别
|
||||
count?: string; //数量
|
||||
unitName: string; //单位
|
||||
propertyName: string; //物料属性
|
||||
}
|
||||
|
||||
export interface BomInfoModel {
|
||||
childList?: BomAddParamsModel[];
|
||||
}
|
||||
|
||||
export interface BomTreeModel {
|
||||
id: string; //id
|
||||
name: string; //物料名称
|
||||
children: BomTreeModel[];
|
||||
}
|
||||
|
||||
export interface BomUpdateParamsModel {
|
||||
id: string; //id
|
||||
parentId?: string; //父级Id
|
||||
code: string; //物料编号
|
||||
name: string; //物料名称
|
||||
model: string; //规格型号
|
||||
typeName: string; //物料类别
|
||||
count?: string; //数量
|
||||
unitName: string; //单位
|
||||
propertyName: string; //物料属性
|
||||
}
|
||||
|
||||
export type BomInfoResultModel = BomAddParamsModel & BomInfoModel;
|
||||
186
src/api/erp/customer/collection/index.ts
Normal file
186
src/api/erp/customer/collection/index.ts
Normal file
@ -0,0 +1,186 @@
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
|
||||
import { ErrorMessageMode } from '/#/axios';
|
||||
import {
|
||||
CollectionPageListSearchModel,
|
||||
CollectionPageListResultModel,
|
||||
CollectionAddParamsModel,
|
||||
CollectionUpdateParamsModel,
|
||||
CollectionDetailAddParamsModel,
|
||||
CollectionDetailUpdateParamsModel,
|
||||
CollectionDetailInfoModel,
|
||||
} from './model';
|
||||
|
||||
enum Api {
|
||||
Page = '/caseErpCustomer/caseErpCustomerGather/page',
|
||||
Info = '/caseErpCustomer/caseErpCustomerGather/info',
|
||||
Collection = '/caseErpCustomer/caseErpCustomerGather',
|
||||
CollectionDetail = '/caseErpCustomer/caseErpCustomerGatherDetail',
|
||||
DetailInfo = '/caseErpCustomer/caseErpCustomerGather/gather-detail-info',
|
||||
CollectionDetailInfo = '/caseErpCustomer/caseErpCustomerGatherDetail/info',
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询回款列表(分页)
|
||||
*/
|
||||
export async function getCollectionPageList(
|
||||
params: CollectionPageListSearchModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.get<CollectionPageListResultModel>(
|
||||
{
|
||||
url: Api.Page,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 新增回款
|
||||
*/
|
||||
export async function addCollection(
|
||||
params: CollectionAddParamsModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.post<number>(
|
||||
{
|
||||
url: Api.Collection,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 修改回款
|
||||
*/
|
||||
export async function updateCollection(
|
||||
params: CollectionUpdateParamsModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.put<number>(
|
||||
{
|
||||
url: Api.Collection,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 删除回款
|
||||
*/
|
||||
export async function deleteCollection(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.delete<number>(
|
||||
{
|
||||
url: Api.Collection,
|
||||
data: id,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询回款详情
|
||||
*/
|
||||
export async function getCollectionInfo(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<CollectionAddParamsModel>(
|
||||
{
|
||||
url: Api.Info,
|
||||
params: { id },
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 新增回款记录详情
|
||||
*/
|
||||
export async function addCollectionDetail(
|
||||
params: CollectionDetailAddParamsModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.post<number>(
|
||||
{
|
||||
url: Api.CollectionDetail,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 修改回款记录详情
|
||||
*/
|
||||
export async function updateCollectionDetail(
|
||||
params: CollectionDetailUpdateParamsModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.put<number>(
|
||||
{
|
||||
url: Api.CollectionDetail,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 删除回款记录详情
|
||||
*/
|
||||
export async function deleteCollectionDetail(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.delete<number>(
|
||||
{
|
||||
url: Api.CollectionDetail,
|
||||
data: id,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查看回款记录列表详情
|
||||
*/
|
||||
export async function getDetailInfo(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<CollectionDetailInfoModel>(
|
||||
{
|
||||
url: Api.DetailInfo,
|
||||
params: { id },
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查看回款记录单条详情
|
||||
*/
|
||||
export async function getCollectionDetailInfo(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<CollectionDetailAddParamsModel>(
|
||||
{
|
||||
url: Api.CollectionDetailInfo,
|
||||
params: { id },
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
86
src/api/erp/customer/collection/model/index.ts
Normal file
86
src/api/erp/customer/collection/model/index.ts
Normal file
@ -0,0 +1,86 @@
|
||||
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
|
||||
|
||||
export interface CollectionPageListParams {
|
||||
keyword?: string; //关键字
|
||||
receivedStartTime?: string; //计划回款开始时间
|
||||
receivedEndTime?: string; //计划回款结束时间
|
||||
finallyStartTime?: string; //最迟回款开始时间
|
||||
finallyEndTime?: string; //最迟回款结束时间
|
||||
}
|
||||
|
||||
export interface CollectionAddParamsModel {
|
||||
customerId?: string; //客户名称
|
||||
waitAmount?: string; //计划回款金额
|
||||
receivedDate?: string; //计划回款日期
|
||||
finallyDate?: string; //最迟回款日期
|
||||
title?: string; //合同标题
|
||||
principalIds?: string; //合同负责人
|
||||
filePath?: string; //合同附件
|
||||
}
|
||||
|
||||
export interface CollectionUpdateParamsModel {
|
||||
id: string; //详情id
|
||||
customerId?: string; //客户名称
|
||||
waitAmount?: string; //计划回款金额
|
||||
receivedDate?: string; //计划回款日期
|
||||
finallyDate?: string; //最迟回款日期
|
||||
title?: string; //合同标题
|
||||
principalIds?: string; //合同负责人
|
||||
filePath?: string; //合同附件
|
||||
}
|
||||
|
||||
export interface CollectionListModel {
|
||||
id: string; //详情id
|
||||
name?: string; //客户名称
|
||||
waitAmount?: string; //计划回款金额
|
||||
alreadyAmount?: string; //已回款金额
|
||||
unpaidAmount?: string; //未回款金额
|
||||
receivedDate?: string; //计划回款日期
|
||||
finallyDate?: string; //最迟回款日期
|
||||
overDay?: string; //逾期天数
|
||||
title?: string; //合同标题
|
||||
principalNames?: string; //合同负责人
|
||||
createUserName: string; //添加人
|
||||
createDate: string; //创建日期
|
||||
state: number; //状态
|
||||
}
|
||||
|
||||
export interface CollectionDetailAddParamsModel {
|
||||
gatherId?: string; //id
|
||||
amountCollect: string; //回款金额
|
||||
date: string; //回款时间
|
||||
remark?: string; //备注
|
||||
filePath?: string; //附件
|
||||
}
|
||||
|
||||
export interface CollectionDetailUpdateParamsModel {
|
||||
id: string; //详情id
|
||||
gatherId: string; //id
|
||||
amountCollect: string; //回款金额
|
||||
date: string; //回款时间
|
||||
remark?: string; //备注
|
||||
filePath?: string; //附件
|
||||
}
|
||||
|
||||
export interface CollectionDetailInfoModel {
|
||||
id: string; //详情id
|
||||
name: string; //名称
|
||||
waitAmount: string; //计划回款金额
|
||||
receivedDate: string; //计划回款日期
|
||||
finallyDate?: string; //最迟回款日期
|
||||
title?: string; //合同标题
|
||||
principalNames?: string; //合同负责人
|
||||
caseErpCustomerGatherDetailVoList: CollectionDetailInfo[];
|
||||
}
|
||||
|
||||
export interface CollectionDetailInfo {
|
||||
id: string; //详情id
|
||||
amountCollect: string; //回款金额
|
||||
date: string; //回款时间
|
||||
remark?: string; //备注
|
||||
createDate?: string; //创建时间
|
||||
createUserName?: string; //创建人
|
||||
}
|
||||
|
||||
export type CollectionPageListSearchModel = BasicPageParams & CollectionPageListParams;
|
||||
export type CollectionPageListResultModel = BasicFetchResult<CollectionListModel>;
|
||||
71
src/api/erp/customer/common/index.ts
Normal file
71
src/api/erp/customer/common/index.ts
Normal file
@ -0,0 +1,71 @@
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
|
||||
import { ErrorMessageMode } from '/#/axios';
|
||||
|
||||
enum Api {
|
||||
Common = '/caseErpCustomer/caseErpCustomer/common',
|
||||
Export = '/caseErpCustomer/caseErpCustomer/export-common',
|
||||
Get = '/caseErpCustomer/caseErpCustomer/get-from-common',
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 领取客户
|
||||
*/
|
||||
export async function getFromCommon(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.put<number>(
|
||||
{
|
||||
url: Api.Get,
|
||||
params: { id },
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 移入公海
|
||||
*/
|
||||
export async function transferCommon(ids: string[], mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.put<number>(
|
||||
{
|
||||
url: Api.Common,
|
||||
params: ids,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 导出
|
||||
*/
|
||||
export async function exportInfo(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.download(
|
||||
{
|
||||
url: Api.Export,
|
||||
method: 'POST',
|
||||
responseType: 'blob',
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 下载模板
|
||||
*/
|
||||
export async function downloadTemplate(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.download(
|
||||
{
|
||||
url: Api.Export,
|
||||
method: 'GET',
|
||||
responseType: 'blob',
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
340
src/api/erp/customer/list/index.ts
Normal file
340
src/api/erp/customer/list/index.ts
Normal file
@ -0,0 +1,340 @@
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
|
||||
import { ErrorMessageMode } from '/#/axios';
|
||||
import {
|
||||
CustomerPageListSearchModel,
|
||||
CustomerPageListResultModel,
|
||||
CustomerListModel,
|
||||
CustomerAddParamsModel,
|
||||
CustomerUpdateParamsModel,
|
||||
CustomerDetailInfoModel,
|
||||
FollowAddParamsModel,
|
||||
FollowUpdateParamsModel,
|
||||
ContactsAddParamsModel,
|
||||
ContactsUpdateParamsModel,
|
||||
TransferParamsModel,
|
||||
CustomerInfoModel,
|
||||
} from './model';
|
||||
|
||||
enum Api {
|
||||
List = '/caseErpCustomer/caseErpCustomer/list',
|
||||
Page = '/caseErpCustomer/caseErpCustomer/page',
|
||||
Info = '/caseErpCustomer/caseErpCustomer/info',
|
||||
Customer = '/caseErpCustomer/caseErpCustomer',
|
||||
Follow = '/caseErpCustomer/caseErpCustomerFollow',
|
||||
Contacts = '/caseErpCustomer/caseErpCustomerContacts',
|
||||
ContactsInfo = '/caseErpCustomer/caseErpCustomerContacts/info',
|
||||
DetailInfo = '/caseErpCustomer/caseErpCustomer/detail-info',
|
||||
FollowInfo = '/caseErpCustomer/caseErpCustomerFollow/info',
|
||||
TransferUser = '/caseErpCustomer/caseErpCustomer/transfer',
|
||||
Common = '/caseErpCustomer/caseErpCustomer/common',
|
||||
Export = '/caseErpCustomer/caseErpCustomer/export',
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询客户列表(不分页)
|
||||
*/
|
||||
export async function getCustomerList(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<CustomerListModel>(
|
||||
{
|
||||
url: Api.List,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询客户列表(分页)
|
||||
*/
|
||||
export async function getCustomerPageList(
|
||||
params: CustomerPageListSearchModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.get<CustomerPageListResultModel>(
|
||||
{
|
||||
url: Api.Page,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 新增客户
|
||||
*/
|
||||
export async function addCustomer(
|
||||
params: CustomerAddParamsModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.post<number>(
|
||||
{
|
||||
url: Api.Customer,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 修改客户
|
||||
*/
|
||||
export async function updateCustomer(
|
||||
params: CustomerUpdateParamsModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.put<number>(
|
||||
{
|
||||
url: Api.Customer,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 删除客户
|
||||
*/
|
||||
export async function deleteCustomer(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.delete<number>(
|
||||
{
|
||||
url: Api.Customer,
|
||||
data: id,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询客户详情
|
||||
*/
|
||||
export async function getCustomerInfo(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<CustomerInfoModel>(
|
||||
{
|
||||
url: Api.Info,
|
||||
params: { id },
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询客户列表详情
|
||||
*/
|
||||
export async function getDetailInfo(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<CustomerDetailInfoModel>(
|
||||
{
|
||||
url: Api.DetailInfo,
|
||||
params: { id },
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 新增跟进客户
|
||||
*/
|
||||
export async function addFollowCustomer(
|
||||
params: FollowAddParamsModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.post<number>(
|
||||
{
|
||||
url: Api.Follow,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 编辑跟进客户
|
||||
*/
|
||||
export async function updateFollowCustomer(
|
||||
params: FollowUpdateParamsModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.put<number>(
|
||||
{
|
||||
url: Api.Follow,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 删除跟进客户
|
||||
*/
|
||||
export async function deleteFollowCustomer(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.delete<number>(
|
||||
{
|
||||
url: Api.Follow,
|
||||
data: id,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询跟进客户列表详情
|
||||
*/
|
||||
export async function getFollowInfo(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<FollowAddParamsModel>(
|
||||
{
|
||||
url: Api.FollowInfo,
|
||||
params: { id },
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 新增联系人
|
||||
*/
|
||||
export async function addContacts(
|
||||
params: ContactsAddParamsModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.post<number>(
|
||||
{
|
||||
url: Api.Contacts,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 编辑联系人
|
||||
*/
|
||||
export async function updateContacts(
|
||||
params: ContactsUpdateParamsModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.put<number>(
|
||||
{
|
||||
url: Api.Contacts,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 删除联系人
|
||||
*/
|
||||
export async function deleteContacts(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.delete<number>(
|
||||
{
|
||||
url: Api.Contacts,
|
||||
data: id,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询联系人详情
|
||||
*/
|
||||
export async function getContactsInfo(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<ContactsUpdateParamsModel>(
|
||||
{
|
||||
url: Api.ContactsInfo,
|
||||
params: { id },
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 转移客户
|
||||
*/
|
||||
export async function transferUser(params: TransferParamsModel, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.put<number>(
|
||||
{
|
||||
url: Api.TransferUser,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 移入公海
|
||||
*/
|
||||
export async function transferCommon(ids: string[], mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.put<number>(
|
||||
{
|
||||
url: Api.Common,
|
||||
params: ids,
|
||||
},
|
||||
{
|
||||
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,
|
||||
},
|
||||
);
|
||||
}
|
||||
147
src/api/erp/customer/list/model/index.ts
Normal file
147
src/api/erp/customer/list/model/index.ts
Normal file
@ -0,0 +1,147 @@
|
||||
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
|
||||
|
||||
export interface CustomerPageListParams {
|
||||
name?: string; //客户名称
|
||||
sourceId?: string; //来源
|
||||
typeId?: string; //客户类型
|
||||
startTime?: string; //添加开始时间
|
||||
endTime?: string; //添加结束时间
|
||||
}
|
||||
|
||||
export interface CustomerAddParamsModel {
|
||||
name: string; //客户名称
|
||||
typeId: string; //客户类型
|
||||
industry: string; //所在行业
|
||||
sourceId: string; //来源
|
||||
scaleId?: string; //归属
|
||||
natureId?: string; //公司性质
|
||||
address: string; //地址
|
||||
filePath?: string; //图片地址
|
||||
caseErpCustomerContactsDtoList: CustomerContactsModel[]; //联系人
|
||||
}
|
||||
|
||||
export interface CustomerUpdateParamsModel {
|
||||
id: string; //详情id
|
||||
name: string; //客户名称
|
||||
typeId: string; //客户类型
|
||||
industry: string; //所在行业
|
||||
sourceId: string; //来源
|
||||
scaleId?: string; //归属
|
||||
natureId?: string; //公司性质
|
||||
address: string; //地址
|
||||
filePath?: string; //图片地址
|
||||
caseErpCustomerContactsDtoList: CustomerContactsModel[]; //联系人
|
||||
}
|
||||
|
||||
export interface CustomerInfoModel {
|
||||
name: string; //客户名称
|
||||
typeId: string; //客户类型
|
||||
industry: string; //所在行业
|
||||
sourceId: string; //来源
|
||||
scaleId?: string; //归属
|
||||
natureId?: string; //公司性质
|
||||
address: string; //地址
|
||||
filePath?: string; //图片地址
|
||||
caseErpCustomerContacts: CustomerContactsModel[]; //联系人
|
||||
}
|
||||
|
||||
export interface CustomerDetailInfoModel {
|
||||
id: string; //详情id
|
||||
caseErpCustomerFollowInfoVoList: CustomerFollowModel[]; //跟进人
|
||||
caseErpCustomerContactsInfoVoList: CustomerContactsModel[]; //联系人
|
||||
caseErpLogList: CustomerLogModel[]; //操作信息
|
||||
caseErpCustomerVo: CustomerInfo; //客户基本信息
|
||||
}
|
||||
|
||||
export interface CustomerListModel {
|
||||
id: string; //详情id
|
||||
name: string; //客户名称
|
||||
typeName: string; //客户类型
|
||||
defaultName: string; //联系人
|
||||
defaultPhone: string; //手机号码
|
||||
industry: string; //所在行业
|
||||
sourceName: string; //来源
|
||||
saleName: string; //归属
|
||||
createDate: string; //创建日期
|
||||
createUserName: string; //创建人
|
||||
}
|
||||
|
||||
export interface FollowAddParamsModel {
|
||||
customerId: string; //客户id
|
||||
followTime?: string; //跟进时间
|
||||
nextFollowTime?: string; //下次跟进时间
|
||||
followTypeId?: string; //跟进方式
|
||||
content?: string; //说明
|
||||
filePath?: string; //图片上传
|
||||
}
|
||||
|
||||
export interface FollowUpdateParamsModel {
|
||||
id: string; //详情id
|
||||
customerId: string; //客户id
|
||||
followTime?: string; //跟进时间
|
||||
nextFollowTime?: string; //下次跟进时间
|
||||
followTypeId?: string; //跟进方式
|
||||
content?: string; //说明
|
||||
filePath?: string; //图片上传
|
||||
}
|
||||
|
||||
export interface ContactsAddParamsModel {
|
||||
customerId: string; //客户id
|
||||
caseErpCustomerContactsDtoList: CustomerContactsModel[];
|
||||
}
|
||||
|
||||
export interface ContactsUpdateParamsModel {
|
||||
customerId: string; //客户id
|
||||
id: string; //详情id
|
||||
name: string; //名称
|
||||
phone?: string; //手机号
|
||||
post?: string; //岗位
|
||||
dept?: string; //部门
|
||||
isDefault: number; //是否默认 1-是 2-否
|
||||
}
|
||||
|
||||
export interface TransferParamsModel {
|
||||
id: string; //详情id
|
||||
saleIds: string; //转移人员Id
|
||||
}
|
||||
|
||||
export interface CustomerLogModel {
|
||||
operateUserAccount: string; //操作人
|
||||
createDate: string; //操作时间
|
||||
executeResultJson?: string; //操作内容
|
||||
}
|
||||
|
||||
export interface CustomerContactsModel {
|
||||
name: string; //名称
|
||||
phone?: string; //手机号
|
||||
post?: string; //岗位
|
||||
dept?: string; //部门
|
||||
isDefault: number; //是否默认 1-是 2-否
|
||||
createDate?: string; //创建日期
|
||||
createUserName?: string; //创建人
|
||||
}
|
||||
|
||||
export interface CustomerFollowModel {
|
||||
followTime?: string; //跟进时间
|
||||
nextFollowTime?: string; //下次跟进时间
|
||||
followTypeName?: string; //跟进方式
|
||||
content?: string; //说明
|
||||
createUserName?: string; //跟进人
|
||||
}
|
||||
|
||||
export interface CustomerInfo {
|
||||
name: string; //名称
|
||||
typeName?: string; //客户类型
|
||||
industry?: string; //行业
|
||||
sourceName?: string; //来源
|
||||
scaleName?: string; //规模
|
||||
natureName?: string; //公司性质
|
||||
address?: string; //地址
|
||||
saleName?: string; //归属
|
||||
filePath?: string; //图片地址
|
||||
createDate: string; //创建日期
|
||||
createUserName: string; //创建人
|
||||
}
|
||||
|
||||
export type CustomerPageListSearchModel = BasicPageParams & CustomerPageListParams;
|
||||
export type CustomerPageListResultModel = BasicFetchResult<CustomerListModel>;
|
||||
65
src/api/erp/customer/workbench/index.ts
Normal file
65
src/api/erp/customer/workbench/index.ts
Normal file
@ -0,0 +1,65 @@
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
|
||||
import { ErrorMessageMode } from '/#/axios';
|
||||
enum Api {
|
||||
Source = '/caseErpCustomer/caseErpCustomer/customer-source',
|
||||
Type = '/caseErpCustomer/caseErpCustomer/customer-type',
|
||||
Gather = '/caseErpCustomer/caseErpCustomer/customer-gather',
|
||||
Customer = '/caseErpCustomer/caseErpCustomer/customer-statistics',
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 客户来源统计
|
||||
*/
|
||||
export async function getSourceInfo(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get(
|
||||
{
|
||||
url: Api.Source,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询客户类型分布
|
||||
*/
|
||||
export async function getTypeInfo(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get(
|
||||
{
|
||||
url: Api.Type,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询客户回款
|
||||
*/
|
||||
export async function getGatherInfo(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get(
|
||||
{
|
||||
url: Api.Gather,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 统计今日客户
|
||||
*/
|
||||
export async function getCustomerInfo(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get(
|
||||
{
|
||||
url: Api.Customer,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
115
src/api/erp/device/alarm/index.ts
Normal file
115
src/api/erp/device/alarm/index.ts
Normal file
@ -0,0 +1,115 @@
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
|
||||
import { ErrorMessageMode } from '/#/axios';
|
||||
import {
|
||||
AlarmPageListSearchModel,
|
||||
AlarmPageListResultModel,
|
||||
AlarmUpdateParamsModel,
|
||||
AlarmCheckModel,
|
||||
AlarmInfoModel,
|
||||
} from './model';
|
||||
|
||||
enum Api {
|
||||
Page = '/caseErpDevice/caseErpDeviceWarn/page',
|
||||
Alarm = '/caseErpDevice/caseErpDeviceWarn',
|
||||
Info = '/caseErpDevice/caseErpDeviceWarn/info',
|
||||
Check = '/caseErpDevice/caseErpDeviceWarn/check',
|
||||
Export = '/caseErpDevice/caseErpDeviceWarn/export',
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询设备告警(分页)
|
||||
*/
|
||||
export async function getDeviceAlarmPageList(
|
||||
params?: AlarmPageListSearchModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.get<AlarmPageListResultModel>(
|
||||
{
|
||||
url: Api.Page,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 修改设备告警
|
||||
*/
|
||||
export async function updateDeviceAlarm(
|
||||
params: AlarmUpdateParamsModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.put<number>(
|
||||
{
|
||||
url: Api.Alarm,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 删除设备告警
|
||||
*/
|
||||
export async function deleteDeviceAlarm(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.delete<number>(
|
||||
{
|
||||
url: Api.Alarm,
|
||||
data: id,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询设备告警详情
|
||||
*/
|
||||
export async function getDeviceAlarmInfo(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<AlarmInfoModel>(
|
||||
{
|
||||
url: Api.Info,
|
||||
params: { id },
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查看设备告警详情
|
||||
*/
|
||||
export async function getDeviceAlarmCheck(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<AlarmCheckModel>(
|
||||
{
|
||||
url: Api.Check,
|
||||
params: { id },
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 导出
|
||||
*/
|
||||
export async function exportInfo(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.download(
|
||||
{
|
||||
url: Api.Export,
|
||||
method: 'POST',
|
||||
responseType: 'blob',
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
52
src/api/erp/device/alarm/model/index.ts
Normal file
52
src/api/erp/device/alarm/model/index.ts
Normal file
@ -0,0 +1,52 @@
|
||||
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
|
||||
|
||||
export interface AlarmPageListParams {
|
||||
typeId?: string; //设备类型id
|
||||
state?: string; //状态 1-已处理 2-待处理
|
||||
startTime?: string; //开始时间
|
||||
endTime?: string; //结束时间
|
||||
}
|
||||
|
||||
export interface AlarmUpdateParamsModel {
|
||||
id: string; //id
|
||||
dealWay: string; //处理方法
|
||||
dealUserIds: string; //处理人
|
||||
filePath?: string; //上传附件
|
||||
state?: string; //状态
|
||||
}
|
||||
|
||||
export interface AlarmInfoModel {
|
||||
dealWay: string; //处理方法
|
||||
dealUserIds: string; //处理人
|
||||
filePath?: string; //上传附件
|
||||
state?: string; //状态
|
||||
level?: string; //故障等级
|
||||
remark?: string; //故障描述
|
||||
}
|
||||
|
||||
export interface AlarmCheckModel {
|
||||
dealWay?: string; //处理方法
|
||||
dealUserNames?: string; //处理人
|
||||
filePath?: string; //上传附件
|
||||
state?: string; //状态
|
||||
levelName?: string; //故障等级
|
||||
remark?: string; //故障描述
|
||||
}
|
||||
|
||||
export interface AlarmListModel {
|
||||
id: string; //详情id
|
||||
number: string; //设备编号
|
||||
name: string; //设备名称
|
||||
typeName: string; //设备类型
|
||||
address: string; //设备位置
|
||||
model: string; //规格型号
|
||||
level: string; //故障等级
|
||||
remark: number; //故障描述
|
||||
principalNames: string; //负责人
|
||||
buyDate: string; //购买日期
|
||||
maintianDate: string; //维保日期0
|
||||
state: number; //状态 0-异常 1-正常
|
||||
}
|
||||
|
||||
export type AlarmPageListSearchModel = BasicPageParams & AlarmPageListParams;
|
||||
export type AlarmPageListResultModel = BasicFetchResult<AlarmListModel>;
|
||||
147
src/api/erp/device/info/index.ts
Normal file
147
src/api/erp/device/info/index.ts
Normal file
@ -0,0 +1,147 @@
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
|
||||
import { ErrorMessageMode } from '/#/axios';
|
||||
import {
|
||||
DevicePageListSearchModel,
|
||||
DeviceAddParamsModel,
|
||||
DeviceUpdateParamsModel,
|
||||
DevicePageListResultModel,
|
||||
DeviceListModel,
|
||||
} from './model';
|
||||
|
||||
enum Api {
|
||||
Page = '/caseErpDevice/caseErpDeviceInfo/page',
|
||||
Device = '/caseErpDevice/caseErpDeviceInfo',
|
||||
Info = '/caseErpDevice/caseErpDeviceInfo/info',
|
||||
Export = '/caseErpDevice/caseErpDeviceInfo/export',
|
||||
Check = '/caseErpDevice/caseErpDeviceInfo/check',
|
||||
ByTypeId = '/caseErpDevice/caseErpDeviceInfo/get-by-type-id',
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询设备信息(分页)
|
||||
*/
|
||||
export async function getDeviceInfoPageList(
|
||||
params?: DevicePageListSearchModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.get<DevicePageListResultModel>(
|
||||
{
|
||||
url: Api.Page,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 新增设备信息
|
||||
*/
|
||||
export async function addDeviceInfo(type: DeviceAddParamsModel, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.post<number>(
|
||||
{
|
||||
url: Api.Device,
|
||||
params: type,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 修改设备信息
|
||||
*/
|
||||
export async function updateDeviceInfo(
|
||||
params: DeviceUpdateParamsModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.put<number>(
|
||||
{
|
||||
url: Api.Device,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 删除设备信息
|
||||
*/
|
||||
export async function deleteDeviceInfo(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.delete<number>(
|
||||
{
|
||||
url: Api.Device,
|
||||
data: id,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询设备信息详情
|
||||
*/
|
||||
export async function getDeviceInfo(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<DeviceAddParamsModel>(
|
||||
{
|
||||
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 checkDeviceInfo(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<DeviceListModel>(
|
||||
{
|
||||
url: Api.Check,
|
||||
params: { id },
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 根据设备类型查询设备信息
|
||||
*/
|
||||
export async function getDeviceInfoByTypeId(typeId: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<DeviceListModel[]>(
|
||||
{
|
||||
url: Api.ByTypeId,
|
||||
params: { typeId },
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
52
src/api/erp/device/info/model/index.ts
Normal file
52
src/api/erp/device/info/model/index.ts
Normal file
@ -0,0 +1,52 @@
|
||||
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
|
||||
|
||||
export interface DevicePageListParams {
|
||||
typeId?: string; //设备类型id
|
||||
name?: string; //设备名称
|
||||
address?: string; //设备位置
|
||||
}
|
||||
|
||||
export interface DeviceAddParamsModel {
|
||||
typeId: string; //设备类型id
|
||||
number: string; //设备编号
|
||||
name: string; //设备名称
|
||||
model: string; //规格型号
|
||||
supplierId?: string; //供应商
|
||||
buyDate?: string; //购买日期
|
||||
maintainDate: string; //维保日期
|
||||
scrapDate: string; //报废日期
|
||||
principalIds: string; //负责人id
|
||||
address?: string; //设备位置
|
||||
}
|
||||
|
||||
export interface DeviceUpdateParamsModel {
|
||||
id: string; //详情id
|
||||
typeId: string; //设备类型id
|
||||
number: string; //设备编号
|
||||
name: string; //设备名称
|
||||
model: string; //规格型号
|
||||
supplierId?: string; //供应商
|
||||
buyDate?: string; //购买日期
|
||||
maintainDate: string; //维保日期
|
||||
scrapDate: string; //报废日期
|
||||
principalIds: string; //负责人id
|
||||
address?: string; //设备位置
|
||||
}
|
||||
|
||||
export interface DeviceListModel {
|
||||
id: string; //详情id
|
||||
number: string; //设备编号
|
||||
name: string; //设备名称
|
||||
typeName: string; //设备类型
|
||||
supplierName: number; //供应商
|
||||
address: string; //设备位置
|
||||
model: string; //规格型号
|
||||
principalNames: string; //负责人
|
||||
buyDate: string; //购买日期
|
||||
maintianDate: string; //维保日期0
|
||||
scrapDate: string; //报废日期
|
||||
state: number; //状态 0-异常 1-正常
|
||||
}
|
||||
|
||||
export type DevicePageListSearchModel = BasicPageParams & DevicePageListParams;
|
||||
export type DevicePageListResultModel = BasicFetchResult<DeviceListModel>;
|
||||
117
src/api/erp/device/inspect/index.ts
Normal file
117
src/api/erp/device/inspect/index.ts
Normal file
@ -0,0 +1,117 @@
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
|
||||
import { ErrorMessageMode } from '/#/axios';
|
||||
import {
|
||||
InspectPageListSearchModel,
|
||||
InspectAddParamsModel,
|
||||
InspectUpdateParamsModel,
|
||||
InspectPageListResultModel,
|
||||
InspectInfoModel,
|
||||
} from './model';
|
||||
|
||||
enum Api {
|
||||
Page = '/caseErpDevice/caseErpDeviceInspect/page',
|
||||
Inspect = '/caseErpDevice/caseErpDeviceInspect',
|
||||
Info = '/caseErpDevice/caseErpDeviceInspect/info',
|
||||
Export = '/caseErpDevice/caseErpDeviceInspect/export',
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询设备巡检(分页)
|
||||
*/
|
||||
export async function getDeviceInspectPageList(
|
||||
params?: InspectPageListSearchModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.get<InspectPageListResultModel>(
|
||||
{
|
||||
url: Api.Page,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 新增设备巡检
|
||||
*/
|
||||
export async function addDeviceInspect(
|
||||
type: InspectAddParamsModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.post<number>(
|
||||
{
|
||||
url: Api.Inspect,
|
||||
params: type,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 修改设备巡检
|
||||
*/
|
||||
export async function updateDeviceInspect(
|
||||
params: InspectUpdateParamsModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.put<number>(
|
||||
{
|
||||
url: Api.Inspect,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 删除设备巡检
|
||||
*/
|
||||
export async function deleteDeviceInspect(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.delete<number>(
|
||||
{
|
||||
url: Api.Inspect,
|
||||
data: id,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询设备巡检详情
|
||||
*/
|
||||
export async function getDeviceInspectInfo(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<InspectInfoModel>(
|
||||
{
|
||||
url: Api.Info,
|
||||
params: { id },
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 导出
|
||||
*/
|
||||
export async function exportInfo(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.download(
|
||||
{
|
||||
url: Api.Export,
|
||||
method: 'POST',
|
||||
responseType: 'blob',
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
69
src/api/erp/device/inspect/model/index.ts
Normal file
69
src/api/erp/device/inspect/model/index.ts
Normal file
@ -0,0 +1,69 @@
|
||||
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
|
||||
|
||||
export interface InspectPageListParams {
|
||||
typeId?: string; //设备类型id
|
||||
name?: string; //设备名称
|
||||
state?: string; //状态 1-已完成 2-未维修
|
||||
}
|
||||
|
||||
export interface InspectAddParamsModel {
|
||||
typeId: string; //设备类型id
|
||||
number?: string; //设备编号
|
||||
deviceId: string; //设备名称
|
||||
model: string; //规格型号
|
||||
checkedUserIds: string; //巡检人
|
||||
date: string; //巡检时间
|
||||
natureId: string; //检查性质
|
||||
result?: string; //检查结果
|
||||
filePath?: string; //上传附件
|
||||
state?: string; //状态
|
||||
}
|
||||
|
||||
export interface InspectUpdateParamsModel {
|
||||
id: string; //详情id
|
||||
typeId: string; //设备类型id
|
||||
number?: string; //设备编号
|
||||
deviceId: string; //设备名称
|
||||
model: string; //规格型号
|
||||
checkedUserIds: string; //巡检人
|
||||
date: string; //巡检时间
|
||||
nature: string; //检查性质
|
||||
result?: string; //检查结果
|
||||
filePath?: string; //上传附件
|
||||
state?: string; //状态
|
||||
}
|
||||
|
||||
export interface InspectInfoModel {
|
||||
typeId: string; //设备类型id
|
||||
number?: string; //设备编号
|
||||
deviceId: string; //设备id
|
||||
name: string; //设备名称
|
||||
model: string; //规格型号
|
||||
checkedUserIds: string; //巡检人Id
|
||||
checkedUserNames: string; //巡检人
|
||||
date: string; //巡检时间
|
||||
natureId: string; //检查性质id
|
||||
natureName: string; //检查性质
|
||||
result?: string; //检查结果
|
||||
filePath?: string; //上传附件
|
||||
state?: string; //状态
|
||||
address: string; //设备位置
|
||||
}
|
||||
|
||||
export interface InspectListModel {
|
||||
id: string; //详情id
|
||||
number: string; //设备编号
|
||||
deviceId: string; //设备名称
|
||||
typeName: string; //设备类型
|
||||
model: string; //规格型号
|
||||
supplierName: number; //供应商
|
||||
address: string; //设备位置
|
||||
principalNames: string; //负责人
|
||||
buyDate: string; //购买日期
|
||||
maintianDate: string; //维保日期0
|
||||
scrapDate: string; //报废日期
|
||||
state: number; //状态 0-异常 1-正常
|
||||
}
|
||||
|
||||
export type InspectPageListSearchModel = BasicPageParams & InspectPageListParams;
|
||||
export type InspectPageListResultModel = BasicFetchResult<InspectListModel>;
|
||||
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>;
|
||||
131
src/api/erp/purchase/apply/index.ts
Normal file
131
src/api/erp/purchase/apply/index.ts
Normal file
@ -0,0 +1,131 @@
|
||||
import {
|
||||
CaseErpApplyModel,
|
||||
CaseErpApplyPageParams,
|
||||
CaseErpApplyPageResult,
|
||||
} from './model/PurchasingApplyModel';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { ErrorMessageMode } from '/#/axios';
|
||||
|
||||
enum Api {
|
||||
Page = '/caseErpPurchaseApply/caseErpPurchaseApply/page',
|
||||
List = '/caseErpPurchaseApply/caseErpPurchaseApply/list',
|
||||
Info = '/caseErpPurchaseApply/caseErpPurchaseApply/info',
|
||||
CaseErpApply = '/caseErpPurchaseApply/caseErpPurchaseApply',
|
||||
Export = '/caseErpPurchaseApply/caseErpPurchaseApply/export',
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询CaseErpApply分页列表
|
||||
*/
|
||||
export async function getCaseErpApplyPage(
|
||||
params: CaseErpApplyPageParams,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.get<CaseErpApplyPageResult>(
|
||||
{
|
||||
url: Api.Page,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询CaseErpApply列表
|
||||
*/
|
||||
export async function getCaseErpApplyList(
|
||||
params: CaseErpApplyPageParams,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.get<CaseErpApplyPageResult>(
|
||||
{
|
||||
url: Api.List,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 获取CaseErpApply信息
|
||||
*/
|
||||
export async function getCaseErpApply(id: String, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<CaseErpApplyModel>(
|
||||
{
|
||||
url: Api.Info,
|
||||
params: { id },
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 新增CaseErpApply
|
||||
*/
|
||||
export async function addCaseErpApply(caseErpApply: Recordable, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.post<boolean>(
|
||||
{
|
||||
url: Api.CaseErpApply,
|
||||
params: caseErpApply,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 更新CaseErpApply
|
||||
*/
|
||||
export async function updateCaseErpApply(
|
||||
caseErpApply: Recordable,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.put<boolean>(
|
||||
{
|
||||
url: Api.CaseErpApply,
|
||||
params: caseErpApply,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 删除CaseErpApply(批量删除)
|
||||
*/
|
||||
export async function deleteCaseErpApply(ids: string[], mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.delete<boolean>(
|
||||
{
|
||||
url: Api.CaseErpApply,
|
||||
data: ids,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 导出CaseErpApply
|
||||
*/
|
||||
export async function exportCaseErpApply(params?: object, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.download(
|
||||
{
|
||||
url: Api.Export,
|
||||
method: 'GET',
|
||||
params,
|
||||
responseType: 'blob',
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
139
src/api/erp/purchase/apply/model/PurchasingApplyModel.ts
Normal file
139
src/api/erp/purchase/apply/model/PurchasingApplyModel.ts
Normal file
@ -0,0 +1,139 @@
|
||||
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
|
||||
|
||||
/**
|
||||
* @description: CaseErpApply分页参数 模型
|
||||
*/
|
||||
export interface CaseErpApplyPageParams extends BasicPageParams {
|
||||
applyNumber: string;
|
||||
|
||||
isSysNum: string;
|
||||
|
||||
theme: string;
|
||||
|
||||
applyDateStart: string;
|
||||
applyDateEnd: string;
|
||||
|
||||
applyUserIds: string;
|
||||
|
||||
applyDepId: string;
|
||||
|
||||
relatedProject: string;
|
||||
|
||||
remark: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: CaseErpApply分页返回值模型
|
||||
*/
|
||||
export interface CaseErpApplyPageModel {
|
||||
id: string;
|
||||
|
||||
applyNumber: string;
|
||||
|
||||
isSysNum: string;
|
||||
|
||||
theme: string;
|
||||
|
||||
applyDate: string;
|
||||
|
||||
applyUserIds: string;
|
||||
|
||||
applyDepId: string;
|
||||
|
||||
relatedProject: string;
|
||||
|
||||
remark: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: CaseErpApply表类型
|
||||
*/
|
||||
export interface CaseErpApplyModel {
|
||||
id: number;
|
||||
|
||||
applyNumber: string;
|
||||
|
||||
theme: string;
|
||||
|
||||
applyDate: string;
|
||||
|
||||
applyDepId: number;
|
||||
|
||||
applyDepName: string;
|
||||
|
||||
applyUserIds: string;
|
||||
|
||||
applyUserNames: string;
|
||||
|
||||
relatedProject: number;
|
||||
|
||||
remark: string;
|
||||
|
||||
countSum: number;
|
||||
|
||||
amountSum: number;
|
||||
|
||||
filePath: string;
|
||||
|
||||
isSysNum: number;
|
||||
|
||||
createUserId: number;
|
||||
|
||||
createDate: string;
|
||||
|
||||
modifyUserId: number;
|
||||
|
||||
modifyDate: string;
|
||||
|
||||
deleteMark: number;
|
||||
|
||||
enabledMark: number;
|
||||
|
||||
caseErpApplyDetailList?: CaseErpApplyDetailModel[];
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: CaseErpApplyDetail表类型
|
||||
*/
|
||||
export interface CaseErpApplyDetailModel {
|
||||
id: number;
|
||||
|
||||
applyId: number;
|
||||
|
||||
code: string;
|
||||
|
||||
name: string;
|
||||
|
||||
model: string;
|
||||
|
||||
unitName: string;
|
||||
|
||||
price: number;
|
||||
|
||||
count: number;
|
||||
|
||||
amount: number;
|
||||
|
||||
payDate: string;
|
||||
|
||||
purpose: string;
|
||||
|
||||
remark: string;
|
||||
|
||||
createUserId: number;
|
||||
|
||||
createDate: string;
|
||||
|
||||
modifyUserId: number;
|
||||
|
||||
modifyDate: string;
|
||||
|
||||
deleteMark: number;
|
||||
|
||||
enabledMark: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: CaseErpApply分页返回值结构
|
||||
*/
|
||||
export type CaseErpApplyPageResult = BasicFetchResult<CaseErpApplyPageModel>;
|
||||
271
src/api/erp/purchase/order/index.ts
Normal file
271
src/api/erp/purchase/order/index.ts
Normal file
@ -0,0 +1,271 @@
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
|
||||
import { ErrorMessageMode } from '/#/axios';
|
||||
import {
|
||||
PurchaseOrderPageListSearchModel,
|
||||
PurchaseOrderPageListResultModel,
|
||||
PurchaseOrderListModel,
|
||||
PurchaseOrderAddParamsModel,
|
||||
PurchaseOrderUpdateParamsModel,
|
||||
PurchaseOrderCheckInfoModel,
|
||||
} from './model';
|
||||
|
||||
enum Api {
|
||||
Page = '/caseErpPurchase/caseErpPurchase/page',
|
||||
List = '/caseErpPurchase/caseErpPurchase/list',
|
||||
Purchase = '/caseErpPurchase/caseErpPurchase',
|
||||
Info = '/caseErpPurchase/caseErpPurchase/info',
|
||||
Check = '/caseErpPurchase/caseErpPurchase/check-info',
|
||||
Code = '/caseErpSale/caseErpSale/code',
|
||||
Record = '/workflow/execute/process/all-record',
|
||||
Export = '/caseErpPurchase/caseErpPurchase/export',
|
||||
PurchaseExport = '/caseErpPurchase/caseErpPurchase/export-purchase-detail',
|
||||
TicketExport = '/caseErpPurchase/caseErpPurchase/export-purchase-ticket',
|
||||
LogExport = '/caseErpPurchase/caseErpPurchase/export-purchase-log',
|
||||
InExport = '/caseErpPurchase/caseErpPurchase/export-purchase-in',
|
||||
PayExport = '/caseErpPurchase/caseErpPurchase/export-purchase-pay',
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询采购订单(分页)
|
||||
*/
|
||||
export async function getPurchasePageList(
|
||||
params?: PurchaseOrderPageListSearchModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.get<PurchaseOrderPageListResultModel>(
|
||||
{
|
||||
url: Api.Page,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询采购订单(不分页)
|
||||
*/
|
||||
export async function getPurchaseList(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<PurchaseOrderListModel[]>(
|
||||
{
|
||||
url: Api.List,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 新增采购订单
|
||||
*/
|
||||
export async function addPurchase(
|
||||
params: PurchaseOrderAddParamsModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.post<number>(
|
||||
{
|
||||
url: Api.Purchase,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 修改采购订单
|
||||
*/
|
||||
export async function updatePurchase(
|
||||
params: PurchaseOrderUpdateParamsModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.put<number>(
|
||||
{
|
||||
url: Api.Purchase,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 删除采购订单
|
||||
*/
|
||||
export async function deletePurchase(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.delete<number>(
|
||||
{
|
||||
url: Api.Purchase,
|
||||
data: id,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询采购订单详情
|
||||
*/
|
||||
export async function getPurchaseInfo(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<PurchaseOrderrUpdateParamsModel>(
|
||||
{
|
||||
url: Api.Info,
|
||||
params: { id },
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查看采购订单详情
|
||||
*/
|
||||
export async function getPurchaseCheckInfo(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<PurchaseOrderCheckInfoModel>(
|
||||
{
|
||||
url: Api.Check,
|
||||
params: { id },
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 获取销售订单编码
|
||||
*/
|
||||
export async function getSaleCode(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<string>(
|
||||
{
|
||||
url: Api.Code,
|
||||
},
|
||||
{
|
||||
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 exportPurchaseInfo(params, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.download(
|
||||
{
|
||||
url: Api.PurchaseExport,
|
||||
method: 'POST',
|
||||
params,
|
||||
responseType: 'blob',
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 导出入库记录
|
||||
*/
|
||||
export async function exportInstoreInfo(params, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.download(
|
||||
{
|
||||
url: Api.InExport,
|
||||
method: 'POST',
|
||||
params,
|
||||
responseType: 'blob',
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 导出到票记录
|
||||
*/
|
||||
export async function exportTicketInfo(params, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.download(
|
||||
{
|
||||
url: Api.TicketExport,
|
||||
method: 'POST',
|
||||
params,
|
||||
responseType: 'blob',
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 导出付款记录
|
||||
*/
|
||||
export async function exportPayInfo(params, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.download(
|
||||
{
|
||||
url: Api.PayExport,
|
||||
method: 'POST',
|
||||
params,
|
||||
responseType: 'blob',
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 导出操作记录
|
||||
*/
|
||||
export async function exportLogInfo(params, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.download(
|
||||
{
|
||||
url: Api.LogExport,
|
||||
method: 'POST',
|
||||
params,
|
||||
responseType: 'blob',
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询审批记录
|
||||
*/
|
||||
export async function getRecordList(processId: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get(
|
||||
{
|
||||
url: Api.Record,
|
||||
params: { processId },
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
176
src/api/erp/purchase/order/model/index.ts
Normal file
176
src/api/erp/purchase/order/model/index.ts
Normal file
@ -0,0 +1,176 @@
|
||||
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
|
||||
|
||||
export interface PurchaseOrderPageListParams {
|
||||
theme?: string; //订单名称
|
||||
}
|
||||
|
||||
export interface OrderDetailParamsModel {
|
||||
code: string; //物料编码
|
||||
name: string; //物料名称
|
||||
model: string; //规格型号
|
||||
unitName: string; //单位
|
||||
price?: number; //单价
|
||||
count?: number; //数量
|
||||
discount?: number; //折扣
|
||||
taxRate?: string; //税率
|
||||
taxBreak?: string; //税费
|
||||
afterTaxAmount?: string; //税后金额
|
||||
deliveryDate?: string; //交付日期
|
||||
}
|
||||
|
||||
export interface PurchaseOrderAddParamsModel {
|
||||
purchaseNumber: string; //采购单号
|
||||
isSysNumBoolean?: boolean; //是否使用系统编号
|
||||
applyId?: string; //关联申请单
|
||||
isRelationApplyBoolean?: boolean; //是否不关联申请单
|
||||
theme: string; //订单主题
|
||||
purchaseDate: string; //采购日期
|
||||
supplierId?: string; //供应商名称
|
||||
supplierPerson?: string; //联系人
|
||||
supplierWay?: string; //联系方式
|
||||
purchaseDeptId?: string; //采购部门
|
||||
purchasePersonId?: string; //采购人员
|
||||
purchasePhone?: string; //联系电话
|
||||
relatedProject?: string; //关联项目
|
||||
payType?: string; //结算方式
|
||||
payAddress?: string; //交付地址
|
||||
remark?: string; //备注
|
||||
filePath?: string; //附件地址
|
||||
countSum: string | number; //总数量
|
||||
amountSum: string | number; //总金额
|
||||
addCaseErpPurchaseDetailDtoList: OrderDetailParamsModel[];
|
||||
}
|
||||
|
||||
export interface PurchaseOrderUpdateParamsModel {
|
||||
id: string; //详情id
|
||||
purchaseNumber: string; //采购单号
|
||||
isSysNumBoolean?: boolean; //是否使用系统编号
|
||||
applyId?: string; //关联申请单
|
||||
isRelationApplyBoolean?: boolean; //是否不关联申请单
|
||||
theme: string; //订单主题
|
||||
purchaseDate: string; //采购日期
|
||||
supplierId?: string; //供应商名称
|
||||
supplierPerson?: string; //联系人
|
||||
supplierWay?: string; //联系方式
|
||||
purchaseDeptId?: string; //采购部门
|
||||
purchasePersonId?: string; //采购人员
|
||||
purchasePhone?: string; //联系电话
|
||||
relatedProject?: string; //关联项目
|
||||
payType?: string; //结算方式
|
||||
payAddress?: string; //交付地址
|
||||
remark?: string; //备注
|
||||
filePath?: string; //附件地址
|
||||
countSum: string | number; //总数量
|
||||
amountSum: string | number; //总金额
|
||||
addCaseErpPurchaseDetailDtoList: OrderDetailParamsModel[];
|
||||
}
|
||||
|
||||
export interface PurchaseOrderrUpdateParamsModel {
|
||||
id: string; //详情id
|
||||
purchaseNumber: string; //采购单号
|
||||
isSysNumBoolean?: boolean; //是否使用系统编号
|
||||
applyId?: string; //关联申请单
|
||||
isRelationApplyBoolean?: boolean; //是否不关联申请单
|
||||
theme: string; //订单主题
|
||||
purchaseDate: string; //采购日期
|
||||
supplierId?: string; //供应商名称
|
||||
supplierPerson?: string; //联系人
|
||||
supplierWay?: string; //联系方式
|
||||
purchaseDeptId?: string; //采购部门
|
||||
purchasePersonId?: string; //采购人员
|
||||
purchasePhone?: string; //联系电话
|
||||
relatedProject?: string; //关联项目
|
||||
payType?: string; //结算方式
|
||||
payAddress?: string; //交付地址
|
||||
remark?: string; //备注
|
||||
filePath?: string; //附件地址
|
||||
countSum: string | number; //总数量
|
||||
amountSum: string | number; //总金额
|
||||
addCaseErpPurchaseDetailDtoList: OrderDetailParamsModel[];
|
||||
}
|
||||
|
||||
export interface PurchaseOrderCheckInfoModel {
|
||||
id: string; //详情id
|
||||
theme: string; //订单主题
|
||||
createUserName: string; //创建人
|
||||
createDate: string; //创建时间
|
||||
modifyUserName: string; //最后修改人
|
||||
modifyDate: string; //修改时间
|
||||
purchaseNumber: string; //采购单号
|
||||
purchaseDate: string; //采购日期
|
||||
supplierName: string; //供应商名称
|
||||
supplierPerson: string; //联系人
|
||||
supplierWay: string; //联系方式
|
||||
purchaseDeptName: string; //采购部门
|
||||
purchasePersonName: string; //采购人员
|
||||
purchasePhone: string; //联系电话
|
||||
relatedProjectName: string; //关联项目
|
||||
payTypeName: string; //结算方式
|
||||
payAddress: string; //交货地址
|
||||
remark: string; //备注
|
||||
countSum: number; //总量
|
||||
amountSum: number; //总金额
|
||||
filePath: string; //附件
|
||||
inStoreState: number; //入库
|
||||
ticketState: number; //到票
|
||||
payState: number; //收款
|
||||
caseErpPurchaseDetailList: OrderDetailParamsModel[];
|
||||
inStoreLogVoList: InstoreInfoModel[];
|
||||
ticketLogVoList: TicketInfoModel[];
|
||||
payLogVoList: PayInfoModel[];
|
||||
logList: LogInfoModel[];
|
||||
}
|
||||
|
||||
export interface InstoreInfoModel {
|
||||
code: string; //入库单号
|
||||
theme: string; //入库订单主题
|
||||
date: string; //入库日期
|
||||
name: string; //供应商名称
|
||||
count: number; //入库总量
|
||||
person: string; //入库人员
|
||||
store: string; //入库仓库
|
||||
}
|
||||
|
||||
export interface TicketInfoModel {
|
||||
code: string; //到票编号
|
||||
theme: string; //到票主题
|
||||
date: string; //到票日期
|
||||
name: string; //开票方
|
||||
ticketNum: string; //发票号码
|
||||
ticketAmout: string; //到票金额
|
||||
}
|
||||
|
||||
export interface PayInfoModel {
|
||||
code: string; //付款编号
|
||||
theme: string; //付款主题
|
||||
date: string; //付款日期
|
||||
amount: string; //付款总额
|
||||
payer: string; //收款方
|
||||
account: string; //银行账号
|
||||
}
|
||||
|
||||
export interface LogInfoModel {
|
||||
operateUserAccount: string; //操作人
|
||||
createDate: string; //操作时间
|
||||
executeResultJson: string; //操作类型
|
||||
}
|
||||
|
||||
export interface PurchaseOrderListModel {
|
||||
id: string; //详情id
|
||||
purchaseNumber: string; //采购编码
|
||||
theme: string; //采购订单名称
|
||||
supplierName: string; //供应商
|
||||
purchaseDate: string; //采购日期
|
||||
purchaseDeptName: string; //采购部门
|
||||
purchasePersonName: string; //采购人员
|
||||
purchaseDetail: string; //采购物品
|
||||
amountSum: number; //总金额
|
||||
alreadyAmount: number; //已收金额
|
||||
alreadyTicket: number; //已到票金额
|
||||
inStoreState: number; //入库
|
||||
ticketState: number; //到票
|
||||
payState: number; //付款
|
||||
}
|
||||
|
||||
export type PurchaseOrderPageListSearchModel = BasicPageParams & PurchaseOrderPageListParams;
|
||||
export type PurchaseOrderPageListResultModel = BasicFetchResult<PurchaseOrderListModel>;
|
||||
110
src/api/erp/report/inventory/index.ts
Normal file
110
src/api/erp/report/inventory/index.ts
Normal file
@ -0,0 +1,110 @@
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
|
||||
import { ErrorMessageMode } from '/#/axios';
|
||||
enum Api {
|
||||
Data = '/caseErpStock/caseErpInstoreLog/statistical-data',
|
||||
Doc = '/caseErpStock/caseErpInstoreLog/doc-analysis',
|
||||
DocOut = '/caseErpStock/caseErpInstoreLog/doc-analysis-out',
|
||||
Trend = '/caseErpStock/caseErpInstoreLog/trend',
|
||||
TrendOut = '/caseErpStock/caseErpInstoreLog/trend-out',
|
||||
Warn = '/caseErpStock/caseErpInstoreLog/warn',
|
||||
Materials = '/caseErpStock/caseErpInstoreLog/materials',
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 基础数据
|
||||
*/
|
||||
export async function getDataInfo(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get(
|
||||
{
|
||||
url: Api.Data,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询月入库分析
|
||||
*/
|
||||
export async function getDocInfo(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get(
|
||||
{
|
||||
url: Api.Doc,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询月出库分析
|
||||
*/
|
||||
export async function getDocOutInfo(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get(
|
||||
{
|
||||
url: Api.DocOut,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询入库数量增长趋势
|
||||
*/
|
||||
export async function getTrendInfo(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get(
|
||||
{
|
||||
url: Api.Trend,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询出库数量增长趋势
|
||||
*/
|
||||
export async function getTrendOutInfo(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get(
|
||||
{
|
||||
url: Api.TrendOut,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询预警类型占比
|
||||
*/
|
||||
export async function getWarnInfo(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get(
|
||||
{
|
||||
url: Api.Warn,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询在库原材料占比
|
||||
*/
|
||||
export async function getMaterialsInfo(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get(
|
||||
{
|
||||
url: Api.Materials,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
110
src/api/erp/report/purchase/index.ts
Normal file
110
src/api/erp/report/purchase/index.ts
Normal file
@ -0,0 +1,110 @@
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
|
||||
import { ErrorMessageMode } from '/#/axios';
|
||||
enum Api {
|
||||
Data = '/caseErpStock/caseErpInstoreLog/purchase-data',
|
||||
Price = '/caseErpStock/caseErpInstoreLog/purchase-price',
|
||||
Type = '/caseErpStock/caseErpInstoreLog/contract-types',
|
||||
Trend = '/caseErpStock/caseErpInstoreLog/supply-trends',
|
||||
Cost = '/caseErpStock/caseErpInstoreLog/cost-analysis-data',
|
||||
Deviation = '/caseErpStock/caseErpInstoreLog/deviation-analysis',
|
||||
Contract = '/caseErpStock/caseErpInstoreLog/contract-management',
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 基础数据
|
||||
*/
|
||||
export async function getDataInfo(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get(
|
||||
{
|
||||
url: Api.Data,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询原材料采购价格环比
|
||||
*/
|
||||
export async function getPriceInfo(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get(
|
||||
{
|
||||
url: Api.Price,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询供应链趋势
|
||||
*/
|
||||
export async function getTrendInfo(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get(
|
||||
{
|
||||
url: Api.Trend,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询采购合同类型占比
|
||||
*/
|
||||
export async function getTypeInfo(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get(
|
||||
{
|
||||
url: Api.Type,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询采购成本分析
|
||||
*/
|
||||
export async function getCostInfo(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get(
|
||||
{
|
||||
url: Api.Cost,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询本年采购价格偏差分析
|
||||
*/
|
||||
export async function getDeviationInfo(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get(
|
||||
{
|
||||
url: Api.Deviation,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询采购合同管理
|
||||
*/
|
||||
export async function getContractInfo(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get(
|
||||
{
|
||||
url: Api.Contract,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
95
src/api/erp/report/sales/index.ts
Normal file
95
src/api/erp/report/sales/index.ts
Normal file
@ -0,0 +1,95 @@
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
|
||||
import { ErrorMessageMode } from '/#/axios';
|
||||
enum Api {
|
||||
Data = '/caseErpStock/caseErpInstoreLog/sales-statistics',
|
||||
Sale = '/caseErpStock/caseErpInstoreLog/proportion-sale',
|
||||
Income = '/caseErpStock/caseErpInstoreLog/proportion-income',
|
||||
SaleAnalysis = '/caseErpStock/caseErpInstoreLog/sale-analysis',
|
||||
ProductAnalysis = '/caseErpStock/caseErpInstoreLog/product-analysis',
|
||||
Profit = '/caseErpStock/caseErpInstoreLog/profit-analysis',
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 基础数据
|
||||
*/
|
||||
export async function getSaleDataInfo(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get(
|
||||
{
|
||||
url: Api.Data,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询本月销售占比
|
||||
*/
|
||||
export async function getProportionSaleInfo(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get(
|
||||
{
|
||||
url: Api.Sale,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询销售分析
|
||||
*/
|
||||
export async function getSaleAnalysisInfo(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get(
|
||||
{
|
||||
url: Api.SaleAnalysis,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询本月收入占比
|
||||
*/
|
||||
export async function getProportionIncomeInfo(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get(
|
||||
{
|
||||
url: Api.Income,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询出库产品分析
|
||||
*/
|
||||
export async function getProductAnalysisInfo(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get(
|
||||
{
|
||||
url: Api.ProductAnalysis,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询本年利润偏差分析
|
||||
*/
|
||||
export async function getProfitInfo(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get(
|
||||
{
|
||||
url: Api.Profit,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
268
src/api/erp/sale/order/index.ts
Normal file
268
src/api/erp/sale/order/index.ts
Normal file
@ -0,0 +1,268 @@
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
|
||||
import { ErrorMessageMode } from '/#/axios';
|
||||
import {
|
||||
SalePageListParams,
|
||||
SalePageListModel,
|
||||
SalePageListResultModel,
|
||||
SaleAddParamsModel,
|
||||
SaleUpdateParamsModel,
|
||||
SaleInfoModel,
|
||||
SaleCheckInfoModel,
|
||||
} from './model';
|
||||
|
||||
enum Api {
|
||||
Page = '/caseErpSale/caseErpSale/page',
|
||||
List = '/caseErpSale/caseErpSale/list',
|
||||
Sale = '/caseErpSale/caseErpSale',
|
||||
Info = '/caseErpSale/caseErpSale/info',
|
||||
Check = '/caseErpSale/caseErpSale/check-info',
|
||||
Code = '/caseErpSale/caseErpSale/code',
|
||||
Export = '/caseErpSale/caseErpSale/export',
|
||||
SaleExport = '/caseErpSale/caseErpSale/export-sale-detail',
|
||||
InvoiceExport = '/caseErpSale/caseErpSale/export-sale-invoice',
|
||||
LogExport = '/caseErpSale/caseErpSale/export-sale-log',
|
||||
OutExport = '/caseErpSale/caseErpSale/export-sale-out',
|
||||
ProductExport = '/caseErpSale/caseErpSale/export-sale-product',
|
||||
CollectionExport = '/caseErpSale/caseErpSale/export-sale-collection',
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询销售订单(分页)
|
||||
*/
|
||||
export async function getSalePageList(
|
||||
params?: SalePageListParams,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.get<SalePageListResultModel>(
|
||||
{
|
||||
url: Api.Page,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询销售订单(不分页)
|
||||
*/
|
||||
export async function getSaleList(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<SalePageListModel>(
|
||||
{
|
||||
url: Api.List,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 新增销售订单
|
||||
*/
|
||||
export async function addSale(params: SaleAddParamsModel, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.post<number>(
|
||||
{
|
||||
url: Api.Sale,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 修改销售订单
|
||||
*/
|
||||
export async function updateSale(params: SaleUpdateParamsModel, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.put<number>(
|
||||
{
|
||||
url: Api.Sale,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 删除销售订单
|
||||
*/
|
||||
export async function deleteSale(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.delete<number>(
|
||||
{
|
||||
url: Api.Sale,
|
||||
data: id,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询销售订单详情
|
||||
*/
|
||||
export async function getSaleInfo(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<SaleInfoModel>(
|
||||
{
|
||||
url: Api.Info,
|
||||
params: { id },
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查看销售订单详情
|
||||
*/
|
||||
export async function getSaleCheckInfo(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<SaleCheckInfoModel>(
|
||||
{
|
||||
url: Api.Check,
|
||||
params: { id },
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 获取销售订单编码
|
||||
*/
|
||||
export async function getSaleCode(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<string>(
|
||||
{
|
||||
url: Api.Code,
|
||||
},
|
||||
{
|
||||
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 exportSaleInfo(params, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.download(
|
||||
{
|
||||
url: Api.SaleExport,
|
||||
method: 'POST',
|
||||
params,
|
||||
responseType: 'blob',
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 导出出库记录
|
||||
*/
|
||||
export async function exportOutstoreInfo(params, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.download(
|
||||
{
|
||||
url: Api.OutExport,
|
||||
method: 'POST',
|
||||
params,
|
||||
responseType: 'blob',
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 导出开票记录
|
||||
*/
|
||||
export async function exportInvoiceInfo(params, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.download(
|
||||
{
|
||||
url: Api.InvoiceExport,
|
||||
method: 'POST',
|
||||
params,
|
||||
responseType: 'blob',
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 导出生产记录
|
||||
*/
|
||||
export async function exportProductInfo(params, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.download(
|
||||
{
|
||||
url: Api.ProductExport,
|
||||
method: 'POST',
|
||||
params,
|
||||
responseType: 'blob',
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 导出收款记录
|
||||
*/
|
||||
export async function exportCollectionInfo(params, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.download(
|
||||
{
|
||||
url: Api.CollectionExport,
|
||||
method: 'POST',
|
||||
params,
|
||||
responseType: 'blob',
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 导出操作记录
|
||||
*/
|
||||
export async function exportLogInfo(params, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.download(
|
||||
{
|
||||
url: Api.LogExport,
|
||||
method: 'POST',
|
||||
params,
|
||||
responseType: 'blob',
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
183
src/api/erp/sale/order/model/index.ts
Normal file
183
src/api/erp/sale/order/model/index.ts
Normal file
@ -0,0 +1,183 @@
|
||||
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
|
||||
|
||||
export interface SalePageListParams {
|
||||
theme?: string; //订单主题
|
||||
}
|
||||
|
||||
export interface SalePageListModel {
|
||||
id: string; //详情id
|
||||
saleNumber: string; //销售单号
|
||||
theme: string; //销售订单主题
|
||||
customerName: string; //客户名称
|
||||
saleDate: string; //销售日期
|
||||
saleDetail: string; //产品概要
|
||||
amountSum: number; //总金额
|
||||
discount: number; //优惠后金额
|
||||
alreadyAmount: number; //已收金额
|
||||
alreadyTicket: number; //已到票金额
|
||||
outStoreState: number; //出库
|
||||
ticketState: number; //开票
|
||||
payState: number; //收款
|
||||
}
|
||||
|
||||
export interface SaleAddParamsModel {
|
||||
saleNumber: string; //销售单号
|
||||
isSysNumBoolean: boolean; //是否使用系统编号
|
||||
theme: string; //订单主题
|
||||
saleDate?: string; //销售日期
|
||||
customerId?: string; //客户名称
|
||||
clientPerson?: string; //联系人
|
||||
clientWay?: string; //联系方式
|
||||
manager?: string; //客户经理
|
||||
depName?: string; //所属部门
|
||||
phone?: string; //联系电话
|
||||
relatedProject?: string; //关联项目
|
||||
payType?: string; //结算方式
|
||||
clientNumber?: string; //客户订单号
|
||||
payAddress?: string; //交货地址
|
||||
remark?: string; //备注
|
||||
filePath?: string; //图片地址
|
||||
addCaseErpSaleDetailDtoList?: SaleDetailParamsModel[];
|
||||
}
|
||||
export interface SaleDetailParamsModel {
|
||||
code: string; //产品编码
|
||||
name: string; //产品名称
|
||||
model: string; //规格型号
|
||||
unitName: string; //单位
|
||||
price?: number; //单价
|
||||
count?: number; //销售数量
|
||||
discount?: number; //折扣
|
||||
taxRate?: string; //税率
|
||||
taxBreak?: string; //税费
|
||||
afterTaxAmount?: string; //税后金额
|
||||
deliveryDate?: string; //交付日期
|
||||
remark?: string; //备注
|
||||
}
|
||||
|
||||
export interface SaleUpdateParamsModel {
|
||||
id: string; //详情id
|
||||
saleNumber: string; //销售单号
|
||||
isSysNumBoolean: boolean; //是否使用系统编号
|
||||
theme: string; //订单主题
|
||||
saleDate?: string; //销售日期
|
||||
customerId?: string; //客户名称
|
||||
clientPerson?: string; //联系人
|
||||
clientWay?: string; //联系方式
|
||||
manager?: string; //客户经理
|
||||
depName?: string; //所属部门
|
||||
phone?: string; //联系电话
|
||||
relatedProject?: string; //关联项目
|
||||
payType?: string; //结算方式
|
||||
clientNumber?: string; //客户订单号
|
||||
payAddress?: string; //交货地址
|
||||
remark?: string; //备注
|
||||
filePath?: string; //图片地址
|
||||
addCaseErpSaleDetailDtoList?: SaleDetailParamsModel[];
|
||||
}
|
||||
|
||||
export interface SaleInfoModel {
|
||||
id: string; //详情id
|
||||
saleNumber: string; //销售单号
|
||||
isSysNumBoolean: boolean; //是否使用系统编号
|
||||
theme: string; //订单主题
|
||||
saleDate?: string; //销售日期
|
||||
customerId?: string; //客户名称
|
||||
clientPerson?: string; //联系人
|
||||
clientWay?: string; //联系方式
|
||||
manager?: string; //客户经理
|
||||
depName?: string; //所属部门
|
||||
phone?: string; //联系电话
|
||||
relatedProject?: string; //关联项目
|
||||
payType?: string; //结算方式
|
||||
clientNumber?: string; //客户订单号
|
||||
payAddress?: string; //交货地址
|
||||
remark?: string; //备注
|
||||
filePath?: string; //图片地址
|
||||
countSum: number; //总量
|
||||
amountSum: number; //总金额
|
||||
discount: number; //优惠金额
|
||||
caseErpSaleDetailList?: SaleDetailParamsModel[];
|
||||
}
|
||||
|
||||
export interface SaleCheckInfoModel {
|
||||
id: string; //详情id
|
||||
theme: string; //销售订单主题
|
||||
createUserName: string; //创建人
|
||||
createDate: string; //创建时间
|
||||
modifyUserName: string; //最后修改人
|
||||
modifyDate: string; //修改时间
|
||||
saleNumber: string; //销售单号
|
||||
saleDate: string; //销售日期
|
||||
customerName: string; //客户名称
|
||||
clientPerson: string; //联系人
|
||||
clientWay: string; //联系方式
|
||||
manager: string; //客户经理
|
||||
depName: string; //所属部门
|
||||
phone: string; //联系电话
|
||||
relatedProjectName: string; //关联项目
|
||||
payTypeName: string; //结算方式
|
||||
clientNumber: string; //客户订单号
|
||||
payAddress: string; //交货地址
|
||||
remark: string; //备注
|
||||
countSum: number; //总量
|
||||
amountSum: number; //总金额
|
||||
discount: number; //优惠金额
|
||||
filePath: string; //附件
|
||||
outStoreState: number; //出库
|
||||
ticketState: number; //开票
|
||||
payState: number; //收款
|
||||
caseErpSaleDetailList: SaleDetailParamsModel[];
|
||||
outstoreList: SaleOutstoreInfoModel[];
|
||||
invoiceList: SaleInvoiceInfoModel[];
|
||||
collectionList: SaleCollectionInfoModel[];
|
||||
productList: SaleProductInfoModel[];
|
||||
logList: SaleLogInfoModel[];
|
||||
}
|
||||
|
||||
export interface SaleOutstoreInfoModel {
|
||||
code: string; //出库单号
|
||||
theme: string; //出库订单主题
|
||||
date: string; //出库日期
|
||||
name: string; //客户名称
|
||||
count: number; //出库总量
|
||||
person: string; //出库人员
|
||||
store: string; //出库仓库
|
||||
}
|
||||
|
||||
export interface SaleInvoiceInfoModel {
|
||||
code: string; //开票编号
|
||||
theme: string; //开票主题
|
||||
date: string; //开票日期
|
||||
invoiceName: string; //发票类型
|
||||
ticketNum: string; //发票号码
|
||||
ticketAmout: number; //发票金额
|
||||
ticketName: string; //收款方
|
||||
}
|
||||
|
||||
export interface SaleCollectionInfoModel {
|
||||
code: string; //收款编号
|
||||
theme: string; //收入主题
|
||||
date: string; //收入日期
|
||||
amount: string; //收款总额
|
||||
payer: string; //付款方
|
||||
account: string; //银行账号
|
||||
}
|
||||
|
||||
export interface SaleProductInfoModel {
|
||||
code: string; //生产编号
|
||||
theme: string; //生产主题
|
||||
type: string; //生产类型
|
||||
date: string; //单据日期
|
||||
person: string; //负责人
|
||||
dep: string; //生产部门
|
||||
state: number; //状态
|
||||
}
|
||||
|
||||
export interface SaleLogInfoModel {
|
||||
operateUserAccount: string; //操作人
|
||||
createDate: string; //操作时间
|
||||
executeResultJson: string; //操作类型
|
||||
}
|
||||
|
||||
export type SalePageListSearchModel = BasicPageParams & SalePageListParams;
|
||||
export type SalePageListResultModel = BasicFetchResult<SalePageListModel>;
|
||||
99
src/api/erp/store/management/index.ts
Normal file
99
src/api/erp/store/management/index.ts
Normal file
@ -0,0 +1,99 @@
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
|
||||
import { ErrorMessageMode } from '/#/axios';
|
||||
import {
|
||||
ManagementPageListSearchModel,
|
||||
ManagementPageListResultModel,
|
||||
ManagementAddParamsModel,
|
||||
ManagementUpdateParamsModel,
|
||||
} from './model';
|
||||
|
||||
enum Api {
|
||||
Page = '/caseErpStoreReceipt/caseErpStoreReceipt/page',
|
||||
Management = '/caseErpStoreReceipt/caseErpStoreReceipt',
|
||||
Info = '/caseErpStoreReceipt/caseErpStoreReceipt/info',
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询仓库管理(分页)
|
||||
*/
|
||||
export async function getStoreManagementPageList(
|
||||
params: ManagementPageListSearchModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.get<ManagementPageListResultModel>(
|
||||
{
|
||||
url: Api.Page,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 新增仓库管理
|
||||
*/
|
||||
export async function addStoreManagement(
|
||||
params: ManagementAddParamsModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.post<number>(
|
||||
{
|
||||
url: Api.Management,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 修改仓库管理
|
||||
*/
|
||||
export async function updateStoreManagement(
|
||||
params: ManagementUpdateParamsModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.put<number>(
|
||||
{
|
||||
url: Api.Management,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 删除仓库管理
|
||||
*/
|
||||
export async function deleteStoreManagement(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.delete<number>(
|
||||
{
|
||||
url: Api.Management,
|
||||
data: id,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询仓库管理详情
|
||||
*/
|
||||
export async function getStoreManagementInfo(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get(
|
||||
{
|
||||
url: Api.Info,
|
||||
params: { id },
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
37
src/api/erp/store/management/model/index.ts
Normal file
37
src/api/erp/store/management/model/index.ts
Normal file
@ -0,0 +1,37 @@
|
||||
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
|
||||
|
||||
export interface ManagementPageListParams {
|
||||
keyword?: string; //关键字
|
||||
}
|
||||
|
||||
export interface ManagementAddParamsModel {
|
||||
name: string; //单据名称
|
||||
code: string; //单据编号
|
||||
type: number; //单据类型
|
||||
relationKeyId: string; //关联单据
|
||||
personIds: string; //经手人员
|
||||
remark: string; //备注
|
||||
}
|
||||
|
||||
export interface ManagementUpdateParamsModel {
|
||||
id: string; //详情id
|
||||
name: string; //单据名称
|
||||
code: string; //单据编号
|
||||
type: number; //单据类型
|
||||
relationKeyId: string; //关联单据
|
||||
personIds: string; //经手人员
|
||||
remark: string; //备注
|
||||
}
|
||||
|
||||
export interface ManagementPageListModel {
|
||||
id: string; //详情id
|
||||
name: string; //单据名称
|
||||
code: string; //单据编号
|
||||
type: string; //单据类型
|
||||
createDate: string; //时间
|
||||
personNames: string; //经手人员
|
||||
remark: string; //备注
|
||||
}
|
||||
|
||||
export type ManagementPageListSearchModel = BasicPageParams & ManagementPageListParams;
|
||||
export type ManagementPageListResultModel = BasicFetchResult<ManagementPageListModel>;
|
||||
268
src/api/erp/supplier/list/index.ts
Normal file
268
src/api/erp/supplier/list/index.ts
Normal file
@ -0,0 +1,268 @@
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
|
||||
import { ErrorMessageMode } from '/#/axios';
|
||||
import {
|
||||
SupplierPageListSearchModel,
|
||||
SupplierPageListResultModel,
|
||||
SupplierAddParamsModel,
|
||||
SupplierUpdateParamsModel,
|
||||
SupplierInfoModel,
|
||||
ApplicationAddParamsModel,
|
||||
} from './model';
|
||||
|
||||
enum Api {
|
||||
Info = '/caseErpSupplier/caseErpSupplier/info',
|
||||
List = '/caseErpSupplier/caseErpSupplier/list',
|
||||
Page = '/caseErpSupplier/caseErpSupplier/page',
|
||||
Supplier = '/caseErpSupplier/caseErpSupplier',
|
||||
RiskInfo = '/caseErpSupplier/caseErpSupplier/risk-info',
|
||||
AnnualInfo = '/caseErpSupplier/caseErpSupplier/year-info',
|
||||
DetailAnnualInfo = '/caseErpSupplier/caseErpSupplier/detail-year-info',
|
||||
TimeInfo = '/caseErpSupplier/caseErpSupplier/confirmation-info',
|
||||
AddRisk = '/caseErpSupplier/caseErpSupplier/add-risk',
|
||||
Code = '/caseErpSupplier/caseErpSupplier/codeNumber',
|
||||
Confirmation = '/caseErpSupplier/caseErpSupplier/confirmation',
|
||||
Regain = '/caseErpSupplier/caseErpSupplier/supplier-recover',
|
||||
Eliminate = '/caseErpSupplier/caseErpSupplier/supplier-out',
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询供应商(不分页)
|
||||
*/
|
||||
export async function getSupplierList(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<SupplierPageListResultModel>(
|
||||
{
|
||||
url: Api.List,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询供应商(分页)
|
||||
*/
|
||||
export async function getSupplierPageList(
|
||||
params: SupplierPageListSearchModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.get<SupplierPageListResultModel>(
|
||||
{
|
||||
url: Api.Page,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 新增供应商
|
||||
*/
|
||||
export async function addSupplier(
|
||||
params: SupplierAddParamsModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.post<number>(
|
||||
{
|
||||
url: Api.Supplier,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 修改供应商
|
||||
*/
|
||||
export async function updateSupplier(
|
||||
params: SupplierUpdateParamsModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.put<number>(
|
||||
{
|
||||
url: Api.Supplier,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 删除供应商
|
||||
*/
|
||||
export async function deleteSupplier(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.delete<number>(
|
||||
{
|
||||
url: Api.Supplier,
|
||||
data: id,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询供应商详情
|
||||
*/
|
||||
export async function getSupplierInfo(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<SupplierInfoModel>(
|
||||
{
|
||||
url: Api.Info,
|
||||
params: { id },
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询风险评估详情
|
||||
*/
|
||||
export async function getRiskInfo(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get(
|
||||
{
|
||||
url: Api.RiskInfo,
|
||||
params: { id },
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询年审详情
|
||||
*/
|
||||
export async function getAnnualInfo(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get(
|
||||
{
|
||||
url: Api.AnnualInfo,
|
||||
params: { id },
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 根据formalId查询年审详情
|
||||
*/
|
||||
export async function getDetailAnnualInfo(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get(
|
||||
{
|
||||
url: Api.DetailAnnualInfo,
|
||||
params: { id },
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 新增风险评估
|
||||
*/
|
||||
export async function addRisk(params: SupplierAddParamsModel, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.post<number>(
|
||||
{
|
||||
url: Api.AddRisk,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 获取供应商编码
|
||||
*/
|
||||
export async function getSupplierCode(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<string>(
|
||||
{
|
||||
url: Api.Code,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 转正申请
|
||||
*/
|
||||
export async function addApplication(
|
||||
params: ApplicationAddParamsModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.post<number>(
|
||||
{
|
||||
url: Api.Confirmation,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询供应商详情(转正说明及时间轴)
|
||||
*/
|
||||
export async function getSupplierTimeInfo(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<SupplierInfoModel>(
|
||||
{
|
||||
url: Api.TimeInfo,
|
||||
params: { id },
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 恢复供应商
|
||||
*/
|
||||
export async function regainSupplier(
|
||||
params: SupplierAddParamsModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.put<number>(
|
||||
{
|
||||
url: Api.Regain,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 淘汰供应商
|
||||
*/
|
||||
export async function eliminateSupplier(
|
||||
params: SupplierAddParamsModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.put<number>(
|
||||
{
|
||||
url: Api.Eliminate,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
85
src/api/erp/supplier/list/model/index.ts
Normal file
85
src/api/erp/supplier/list/model/index.ts
Normal file
@ -0,0 +1,85 @@
|
||||
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
|
||||
|
||||
export interface SupplierPageListParams {
|
||||
state: number; //供应商类型 0-潜在 1-正式 2-淘汰
|
||||
name?: string; //供应商名称
|
||||
finalState?: string; //风险评估
|
||||
type?: string; //供应商类型
|
||||
startTime?: string; //添加开始时间
|
||||
endTime?: string; //添加结束时间
|
||||
}
|
||||
|
||||
export interface SupplierAddParamsModel {
|
||||
number: string; //供应商编码
|
||||
name: string; //供应商名称
|
||||
isSysNumBoolean: number; //是否使用系统供应商
|
||||
scope: string; //经营范围
|
||||
person: string; //负责人
|
||||
phone: string; //手机号
|
||||
type: string; //供应商类别
|
||||
}
|
||||
|
||||
export interface SupplierUpdateParamsModel {
|
||||
id: string; //详情id
|
||||
number: string; //供应商编码
|
||||
name: string; //供应商名称
|
||||
isSysNumBoolean: number; //是否使用系统供应商
|
||||
scope: string; //经营范围
|
||||
person: string; //负责人
|
||||
phone: string; //手机号
|
||||
type: string; //供应商类别
|
||||
}
|
||||
|
||||
export interface SupplierInfoModel {
|
||||
id: string; //详情id
|
||||
number: string; //供应商编码
|
||||
name: string; //供应商名称
|
||||
isSysNumBoolean: number; //是否使用系统供应商
|
||||
scope: string; //经营范围
|
||||
person: string; //负责人
|
||||
phone: string; //手机号
|
||||
type: string; //供应商类别
|
||||
typeName: string; //供应商类型名称
|
||||
createUserName: string; //添加人
|
||||
}
|
||||
|
||||
export interface SupplierListModel {
|
||||
id: string; //详情id
|
||||
name: string; //供应商名称
|
||||
symbol: string; //单位符号
|
||||
createUserName: string; //创建人
|
||||
createDate: string; //添加时间
|
||||
state: number; //状态 0-潜在 1-正式 2-淘汰
|
||||
number: string; //供应商编码
|
||||
phone: string; //手机号
|
||||
assessStateName: string; //风险评估
|
||||
assessState: number; //风险评估id
|
||||
scope: string; //经营范围
|
||||
type: string; //供应商类型
|
||||
typeName: string; //供应商类型名称
|
||||
}
|
||||
|
||||
export interface RiskAddParamsModel {
|
||||
capacityFilePath?: string; //供货能力附件
|
||||
capacityLevel: number; //供货能力等级
|
||||
capacityReason: string; //供货能力评估理由
|
||||
finalReason: string; //最终结果理由
|
||||
finalState: number; //最终结果等级
|
||||
qualityFilePath?: string; //供货质量附件
|
||||
qualityLevel: number; //供货质量等级
|
||||
qualityReason: string; //供货质量评估理由
|
||||
safetyFilePath?: string; //环境与安全附件
|
||||
safetyLevel: number; //环境与安全等级
|
||||
safetyReason: string; //环境与安全评估理由
|
||||
supplierId: string; //id
|
||||
type: number;
|
||||
}
|
||||
|
||||
export interface ApplicationAddParamsModel {
|
||||
supplierId: string; //id
|
||||
reason: string; //理由
|
||||
filePath?: string; //附件
|
||||
}
|
||||
|
||||
export type SupplierPageListSearchModel = BasicPageParams & SupplierPageListParams;
|
||||
export type SupplierPageListResultModel = BasicFetchResult<SupplierListModel>;
|
||||
149
src/api/erp/supplier/material/index.ts
Normal file
149
src/api/erp/supplier/material/index.ts
Normal file
@ -0,0 +1,149 @@
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
|
||||
import { ErrorMessageMode } from '/#/axios';
|
||||
import {
|
||||
MaterialListSearchModel,
|
||||
MaterialAddParamsModel,
|
||||
MaterialUpdateParamsModel,
|
||||
MaterialListResultModel,
|
||||
} from './model';
|
||||
|
||||
enum Api {
|
||||
Page = '/caseErpSupplier/caseErpSupplyMaterial/page',
|
||||
Material = '/caseErpSupplier/caseErpSupplyMaterial',
|
||||
Info = '/caseErpSupplier/caseErpSupplyMaterial/info',
|
||||
Export = '/caseErpSupplier/caseErpSupplyMaterial/export',
|
||||
Import = '/caseErpSupplier/caseErpSupplyMaterial/import',
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询供货清单(分页)
|
||||
*/
|
||||
export async function getSupplyMaterialPageList(
|
||||
params?: MaterialListSearchModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.get<MaterialListResultModel>(
|
||||
{
|
||||
url: Api.Page,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 新增供货清单
|
||||
*/
|
||||
export async function addSupplyMaterial(
|
||||
type: MaterialAddParamsModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.post<number>(
|
||||
{
|
||||
url: Api.Material,
|
||||
params: type,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 修改供货清单
|
||||
*/
|
||||
export async function updateSupplyMaterial(
|
||||
type: MaterialUpdateParamsModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.put<number>(
|
||||
{
|
||||
url: Api.Material,
|
||||
params: type,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 删除供货清单
|
||||
*/
|
||||
export async function deleteSupplyMaterial(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.delete<number>(
|
||||
{
|
||||
url: Api.Material,
|
||||
data: id,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询单位详情
|
||||
*/
|
||||
export async function getSupplyMaterialInfo(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<MaterialAddParamsModel>(
|
||||
{
|
||||
url: Api.Info,
|
||||
params: { id },
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 导出
|
||||
*/
|
||||
export async function exportInfo(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.download(
|
||||
{
|
||||
url: Api.Export,
|
||||
method: 'POST',
|
||||
params: { id },
|
||||
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,
|
||||
},
|
||||
);
|
||||
}
|
||||
40
src/api/erp/supplier/material/model/index.ts
Normal file
40
src/api/erp/supplier/material/model/index.ts
Normal file
@ -0,0 +1,40 @@
|
||||
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
|
||||
|
||||
export interface MaterialPageListParams {
|
||||
name?: string; //物料名称
|
||||
state?: number; //状态
|
||||
startTime?: string; //开始时间
|
||||
endTime?: string; //结束时间
|
||||
}
|
||||
|
||||
export interface MaterialAddParamsModel {
|
||||
code: string; //物料编号
|
||||
name: string; //物料名称
|
||||
unitName: string; //单位
|
||||
price: number; //采购单价
|
||||
state?: number; //状态
|
||||
}
|
||||
|
||||
export interface MaterialUpdateParamsModel {
|
||||
id: string; //详情id
|
||||
code: string; //物料编号
|
||||
name: string; //物料名称
|
||||
unitName: string; //单位
|
||||
price: number; //采购单价
|
||||
state?: number; //状态
|
||||
}
|
||||
|
||||
export interface MaterialListModel {
|
||||
id: string; //详情id
|
||||
code: string; //物料编号
|
||||
name: number; //物料名称
|
||||
model: string; //规格类型
|
||||
price: number; //采购单价
|
||||
unitName: string; //单位
|
||||
createDate: string; //添加时间
|
||||
state: number; //状态
|
||||
createUserName: string; //操作人
|
||||
}
|
||||
|
||||
export type MaterialListSearchModel = BasicPageParams & MaterialPageListParams;
|
||||
export type MaterialListResultModel = BasicFetchResult<MaterialListModel>;
|
||||
50
src/api/erp/supplier/workbench/index.ts
Normal file
50
src/api/erp/supplier/workbench/index.ts
Normal file
@ -0,0 +1,50 @@
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
|
||||
import { ErrorMessageMode } from '/#/axios';
|
||||
enum Api {
|
||||
Risk = '/caseErpSupplier/caseErpSupplier/risk',
|
||||
Type = '/caseErpSupplier/caseErpSupplier/type',
|
||||
History = '/caseErpSupplier/caseErpSupplier/history',
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询潜在供应商风险评估统计
|
||||
*/
|
||||
export async function getRiskInfo(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get(
|
||||
{
|
||||
url: Api.Risk,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询供应商类型分布
|
||||
*/
|
||||
export async function getTypeInfo(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get(
|
||||
{
|
||||
url: Api.Type,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询历史价格对比
|
||||
*/
|
||||
export async function getHistoryInfo(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get(
|
||||
{
|
||||
url: Api.History,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
115
src/api/erp/unit/conversion/index.ts
Normal file
115
src/api/erp/unit/conversion/index.ts
Normal file
@ -0,0 +1,115 @@
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
|
||||
import { ErrorMessageMode } from '/#/axios';
|
||||
import {
|
||||
ConversionPageListSearchModel,
|
||||
ConversionAddParamsModel,
|
||||
ConversionUpdateParamsModel,
|
||||
ConversionPageListResultModel,
|
||||
ConversionListAllModel,
|
||||
} from './model';
|
||||
|
||||
enum Api {
|
||||
Page = '/caseErpUnit/caseErpUnitConvert/page',
|
||||
Conversion = '/caseErpUnit/caseErpUnitConvert',
|
||||
Info = '/caseErpUnit/caseErpUnitConvert/info',
|
||||
All = '/caseErpUnit/caseErpUnitConvert/list-all',
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询单位换算列表(分页)
|
||||
*/
|
||||
export async function getConversionPageList(
|
||||
params?: ConversionPageListSearchModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.get<ConversionPageListResultModel>(
|
||||
{
|
||||
url: Api.Page,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 新增单位换算配置
|
||||
*/
|
||||
export async function addConversionList(
|
||||
type: ConversionAddParamsModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.post<number>(
|
||||
{
|
||||
url: Api.Conversion,
|
||||
params: type,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 修改单位换算配置
|
||||
*/
|
||||
export async function updateConversionList(
|
||||
type: ConversionUpdateParamsModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.put<number>(
|
||||
{
|
||||
url: Api.Conversion,
|
||||
params: type,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 删除单位换算
|
||||
*/
|
||||
export async function deleteConversionList(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.delete<number>(
|
||||
{
|
||||
url: Api.Conversion,
|
||||
data: id,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询单位换算详情
|
||||
*/
|
||||
export async function getConversionInfo(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<ConversionAddParamsModel>(
|
||||
{
|
||||
url: Api.Info,
|
||||
params: { id },
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询所有单位换算及单位换算详情
|
||||
*/
|
||||
export async function getConversionAll(mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<ConversionListAllModel[]>(
|
||||
{
|
||||
url: Api.All,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
49
src/api/erp/unit/conversion/model/index.ts
Normal file
49
src/api/erp/unit/conversion/model/index.ts
Normal file
@ -0,0 +1,49 @@
|
||||
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
|
||||
|
||||
export interface ConversionPageListParams {
|
||||
unitTypeId?: string; //单位类型
|
||||
}
|
||||
export interface ConversionDetailParamsModel {
|
||||
shiftUnitId: string; //单位Id
|
||||
baseUnitId: any;
|
||||
number: number; //数值
|
||||
}
|
||||
|
||||
export interface ConversionAddParamsModel {
|
||||
addCaseErpUnitConvertDetailDtoList: ConversionDetailParamsModel[]; //单位换算配置
|
||||
baseUnitId?: string; //基准单位id
|
||||
unitTypeId?: string; //单位类型id
|
||||
}
|
||||
|
||||
export interface ConversionUpdateParamsModel {
|
||||
id: string; //详情id
|
||||
addCaseErpUnitConvertDetailDtoList: ConversionDetailParamsModel[]; //单位换算配置
|
||||
baseUnitId?: string; //基准单位id
|
||||
unitTypeId?: string; //单位类型id
|
||||
}
|
||||
|
||||
export interface ConversionListModel {
|
||||
id: string; //详情id
|
||||
unitTypeName: string; //单位类型
|
||||
unitTypeId: string; //单位类型id
|
||||
standardName: string; //基准单位
|
||||
quantity: string; //换算关系
|
||||
state: number; //状态 0-关闭 1-开启
|
||||
}
|
||||
|
||||
export interface unitVoModel {
|
||||
isStandard: number; //是否是基准单位
|
||||
number: number; //换算值
|
||||
unitName: string; //单位名称
|
||||
symbol: string; //单位符号
|
||||
}
|
||||
|
||||
export interface ConversionListAllModel {
|
||||
id: string; //详情id
|
||||
typeName: string; //单位类型名称
|
||||
state: number; //状态 0-关闭 1-开启
|
||||
unitVo: unitVoModel[]; //换算关系
|
||||
}
|
||||
|
||||
export type ConversionPageListSearchModel = BasicPageParams & ConversionPageListParams;
|
||||
export type ConversionPageListResultModel = BasicFetchResult<ConversionListModel>;
|
||||
181
src/api/erp/unit/list/index.ts
Normal file
181
src/api/erp/unit/list/index.ts
Normal file
@ -0,0 +1,181 @@
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
|
||||
import { ErrorMessageMode } from '/#/axios';
|
||||
import {
|
||||
UnitPageListSearchModel,
|
||||
UnitAddParamsModel,
|
||||
UnitUpdateParamsModel,
|
||||
UnitPageListResultModel,
|
||||
} from './model';
|
||||
|
||||
enum Api {
|
||||
Page = '/caseErpUnit/caseErpUnit/page',
|
||||
List = '/caseErpUnit/caseErpUnit/list',
|
||||
Unit = '/caseErpUnit/caseErpUnit',
|
||||
Info = '/caseErpUnit/caseErpUnit/info',
|
||||
Export = '/caseErpUnit/caseErpUnit/export',
|
||||
Import = '/caseErpUnit/caseErpUnit/import',
|
||||
TypeList = '/caseErpUnit/caseErpUnit/unit-list-by-unit-type',
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询单位列表(分页)
|
||||
*/
|
||||
export async function getUnitPageList(
|
||||
params?: UnitPageListSearchModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.get<UnitPageListResultModel>(
|
||||
{
|
||||
url: Api.Page,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询单位列表(不分页)
|
||||
*/
|
||||
export async function getUnitList(
|
||||
params?: UnitPageListSearchModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.get<UnitPageListResultModel>(
|
||||
{
|
||||
url: Api.List,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 新增单位
|
||||
*/
|
||||
export async function addUnitList(type: UnitAddParamsModel, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.post<number>(
|
||||
{
|
||||
url: Api.Unit,
|
||||
params: type,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 修改单位
|
||||
*/
|
||||
export async function updateUnitList(
|
||||
type: UnitUpdateParamsModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.put<number>(
|
||||
{
|
||||
url: Api.Unit,
|
||||
params: type,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 删除单位(批量删除)
|
||||
*/
|
||||
export async function deleteUnitList(ids: string[], mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.delete<number>(
|
||||
{
|
||||
url: Api.Unit,
|
||||
data: ids,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询单位详情
|
||||
*/
|
||||
export async function getUnitListInfo(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<UnitAddParamsModel>(
|
||||
{
|
||||
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,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 根据单位类型id查询所有单位信息
|
||||
*/
|
||||
export async function getUnitListByTypeId(unitTypeId: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<UnitUpdateParamsModel[]>(
|
||||
{
|
||||
url: Api.TypeList,
|
||||
params: { unitTypeId },
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
37
src/api/erp/unit/list/model/index.ts
Normal file
37
src/api/erp/unit/list/model/index.ts
Normal file
@ -0,0 +1,37 @@
|
||||
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
|
||||
|
||||
export interface UnitPageListParams {
|
||||
name?: string; //单位名称
|
||||
isStandard?: number; //是否基准单位
|
||||
}
|
||||
|
||||
export interface UnitAddParamsModel {
|
||||
name?: string; //单位名称
|
||||
isStandard?: number; //是否基准单位
|
||||
state?: number; //状态 0-关闭 1-开启
|
||||
symbol?: string; //单位符号
|
||||
unitTypeId?: string; //单位类型id
|
||||
}
|
||||
|
||||
export interface UnitUpdateParamsModel {
|
||||
id: string; //详情id
|
||||
name?: string; //单位名称
|
||||
isStandard?: number; //是否基准单位
|
||||
state?: number; //状态 0-关闭 1-开启
|
||||
symbol?: string; //单位符号
|
||||
unitTypeId?: string; //单位类型id
|
||||
}
|
||||
|
||||
export interface UnitListModel {
|
||||
id: string; //详情id
|
||||
name: string; //单位名称
|
||||
unitTypeName: string; //单位类型
|
||||
symbol: string; //单位符号
|
||||
isStandard: number; //是否基准单位
|
||||
createUserName: string; //创建人
|
||||
createDate: string; //创建时间
|
||||
state: number; //状态 0-关闭 1-开启
|
||||
}
|
||||
|
||||
export type UnitPageListSearchModel = BasicPageParams & UnitPageListParams;
|
||||
export type UnitPageListResultModel = BasicFetchResult<UnitListModel>;
|
||||
167
src/api/erp/unit/type/index.ts
Normal file
167
src/api/erp/unit/type/index.ts
Normal file
@ -0,0 +1,167 @@
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
|
||||
import { ErrorMessageMode } from '/#/axios';
|
||||
import {
|
||||
TypePageListParams,
|
||||
TypePageListSearchModel,
|
||||
TypeAddParamsModel,
|
||||
TypeUpdateParamsModel,
|
||||
TypePageListResultModel,
|
||||
TypeListModel,
|
||||
} from './model';
|
||||
|
||||
enum Api {
|
||||
Page = '/caseErpUnit/caseErpUnitType/page',
|
||||
List = '/caseErpUnit/caseErpUnitType/list',
|
||||
Type = '/caseErpUnit/caseErpUnitType',
|
||||
Info = '/caseErpUnit/caseErpUnitType/info',
|
||||
Export = '/caseErpUnit/caseErpUnitType/export',
|
||||
Import = '/caseErpUnit/caseErpUnitType/import',
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询单位类型列表(分页)
|
||||
*/
|
||||
export async function getUnitTypePageList(
|
||||
params?: TypePageListParams,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.get<TypePageListResultModel>(
|
||||
{
|
||||
url: Api.Page,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询单位类型列表(不分页)
|
||||
*/
|
||||
export async function getUnitTypeList(
|
||||
params?: TypePageListSearchModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.get<TypeListModel[]>(
|
||||
{
|
||||
url: Api.List,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 新增单位类型
|
||||
*/
|
||||
export async function addUnitType(type: TypeAddParamsModel, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.post<number>(
|
||||
{
|
||||
url: Api.Type,
|
||||
params: type,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 修改单位类型
|
||||
*/
|
||||
export async function updateUnitType(
|
||||
type: TypeUpdateParamsModel,
|
||||
mode: ErrorMessageMode = 'modal',
|
||||
) {
|
||||
return defHttp.put<number>(
|
||||
{
|
||||
url: Api.Type,
|
||||
params: type,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 删除单位类型(批量删除)
|
||||
*/
|
||||
export async function deleteUnitType(ids: string[], mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.delete<number>(
|
||||
{
|
||||
url: Api.Type,
|
||||
data: ids,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询单位类型详情
|
||||
*/
|
||||
export async function getUnitTypeInfo(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<TypeAddParamsModel>(
|
||||
{
|
||||
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,
|
||||
},
|
||||
);
|
||||
}
|
||||
33
src/api/erp/unit/type/model/index.ts
Normal file
33
src/api/erp/unit/type/model/index.ts
Normal file
@ -0,0 +1,33 @@
|
||||
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
|
||||
|
||||
export interface TypePageListParams {
|
||||
name?: string; //单位类型
|
||||
startTime?: string; //创建时间开始时间
|
||||
endTime?: string; //创建时间结束时间
|
||||
}
|
||||
|
||||
export interface TypeAddParamsModel {
|
||||
name?: string; //单位类型
|
||||
remark?: string; //备注
|
||||
state?: number; //状态 0-关闭 1-开启
|
||||
}
|
||||
|
||||
export interface TypeUpdateParamsModel {
|
||||
id: string; //详情id
|
||||
name?: string; //单位类型
|
||||
remark?: string; //备注
|
||||
state?: number; //状态 0-关闭 1-开启
|
||||
}
|
||||
|
||||
export interface TypeListModel {
|
||||
id: string; //详情id
|
||||
name: string; //单位类型
|
||||
remark: string; //备注
|
||||
createUserName: string; //创建人
|
||||
createDate: string; //创建时间
|
||||
state: number; //状态 0-关闭 1-开启
|
||||
isHaveStandard: number; //是否有基准单位
|
||||
}
|
||||
|
||||
export type TypePageListSearchModel = BasicPageParams & TypePageListParams;
|
||||
export type TypePageListResultModel = BasicFetchResult<TypeListModel>;
|
||||
Reference in New Issue
Block a user