feat: 🚀 订阅功能
This commit is contained in:
25
src/api/modules/antiCode.ts
Normal file
25
src/api/modules/antiCode.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import http from "@/api";
|
||||
import { ResPage } from "@/api/interface/index";
|
||||
/**
|
||||
* @name 防伪码模块
|
||||
*/
|
||||
//防伪码记录列表
|
||||
export const getListApi = (params: Record<string, any>) => {
|
||||
return http.post<ResPage<any>>(`SecurityNumber/GetGenerateRecordList`, params);
|
||||
};
|
||||
//生成防伪码
|
||||
export const getGenerateSecurityNumberApi = (params: Record<string, any>) => {
|
||||
return http.post<ResPage<any>>(`SecurityNumber/Generate`, params);
|
||||
};
|
||||
//防伪码下载列表 getDownListApi
|
||||
export const getDownListApi = (params: Record<string, any>) => {
|
||||
return http.post<ResPage<any>>(`SecurityNumber/GetList`, params);
|
||||
};
|
||||
//下载
|
||||
export const getDownAllApi = (params: Record<string, any>) => {
|
||||
return http.post<ResPage<any>>(`SecurityNumber/Export`, params);
|
||||
};
|
||||
//选择下载
|
||||
export const getDownApi = (params: Record<string, any>) => {
|
||||
return http.post<ResPage<any>>(`SecurityNumber/Export`, params);
|
||||
};
|
||||
110
src/api/modules/barCode.ts
Normal file
110
src/api/modules/barCode.ts
Normal file
@@ -0,0 +1,110 @@
|
||||
import http from "@/api";
|
||||
import { ResPage } from "@/api/interface/index";
|
||||
/**
|
||||
* @name 打印产品条码模块
|
||||
*/
|
||||
//产品条码生成记录列表
|
||||
export const getListApi = (params: Record<string, any>) => {
|
||||
// console.log(params);
|
||||
// return {
|
||||
// isSuccess: true,
|
||||
// message: "Success",
|
||||
// status: 200,
|
||||
// totalCount: 1,
|
||||
// data: [
|
||||
// {
|
||||
// id: 17372,
|
||||
// specifications: "ORICO-H7013-U3-AD-EU-BK-BP",
|
||||
// materialNumber: "G01-43-552867",
|
||||
// materialName: "7口USB3.0集线器",
|
||||
// barCode: "6936761881968",
|
||||
// purchaseBillNo: "ceshi1224",
|
||||
// generateComplete: "已完成",
|
||||
// number: 300,
|
||||
// printNumber: 0,
|
||||
// downLoadNumber: 300,
|
||||
// useNumber: 2,
|
||||
// creator: "admin",
|
||||
// createTime: "2024-12-24 10:27:04",
|
||||
// generateCompleteTime: "2024-12-24 10:27:05",
|
||||
// supplierOrOrg: "深圳市元创时代科技有限公司",
|
||||
// isUpdateMaterial: false,
|
||||
// isTwo: 2
|
||||
// }
|
||||
// ]
|
||||
// };
|
||||
return http.post<ResPage<any>>(`SerialNumber/GetGenerateRecordList`, params);
|
||||
};
|
||||
//产品条码列表
|
||||
export const getCodeListApi = (params: Record<string, any>) => {
|
||||
// console.log(params);
|
||||
// return {
|
||||
// totalCount: 300,
|
||||
// data: [
|
||||
// {
|
||||
// materialNumber: "G01-43-552867",
|
||||
// materialName: "7口USB3.0集线器",
|
||||
// specifications: "ORICO-H7013-U3-AD-EU-BK-BP",
|
||||
// old_Specifications: "",
|
||||
// barCode: "6936761881968",
|
||||
// serialNumber: "10FC-616M3R",
|
||||
// twoSerialNumber: "10FC-616M3R-two",
|
||||
// numberCode: "241224000417",
|
||||
// id: 202593401,
|
||||
// number: 300,
|
||||
// isUse: false,
|
||||
// isUseStr: "否",
|
||||
// box: "",
|
||||
// creator: "admin",
|
||||
// createTime: "2024-12-24 10:27:05",
|
||||
// printNumber: 0,
|
||||
// downLoadNumber: 1,
|
||||
// printTime: "",
|
||||
// downLoadTime: "2025-01-08 16:11:39",
|
||||
// isEnablePrint: true
|
||||
// },
|
||||
// {
|
||||
// materialNumber: "G01-43-552867",
|
||||
// materialName: "7口USB3.0集线器",
|
||||
// specifications: "ORICO-H7013-U3-AD-EU-BK-BP",
|
||||
// old_Specifications: "",
|
||||
// barCode: "6936761881968",
|
||||
// serialNumber: "10FC-616M3Q",
|
||||
// twoSerialNumber: "10FC-616M3R-two",
|
||||
// numberCode: "241224000416",
|
||||
// id: 202593400,
|
||||
// number: 300,
|
||||
// isUse: false,
|
||||
// isUseStr: "否",
|
||||
// box: "",
|
||||
// creator: "admin",
|
||||
// createTime: "2024-12-24 10:27:05",
|
||||
// printNumber: 0,
|
||||
// downLoadNumber: 1,
|
||||
// printTime: "",
|
||||
// downLoadTime: "2025-01-08 16:11:39",
|
||||
// isEnablePrint: true
|
||||
// }
|
||||
// ],
|
||||
// isSuccess: true,
|
||||
// status: 200,
|
||||
// message: "Success"
|
||||
// };
|
||||
return http.post<ResPage<any>>(`SerialNumber/GetList`, params);
|
||||
};
|
||||
//转换规格型号 SerialNumber/UpdateMaterial
|
||||
export const getUpdateMaterialApi = (params: Record<string, any>) => {
|
||||
return http.post<ResPage<any>>(`SerialNumber/UpdateMaterial`, params);
|
||||
};
|
||||
//产品条码列表下载
|
||||
export const getSerialNumberDownLoadApi = (params: Record<string, any>) => {
|
||||
return http.post<ResPage<any>>(`SerialNumber/Export`, params);
|
||||
};
|
||||
//生成条码
|
||||
export const generateBarCodeApi = (params: Record<string, any>) => {
|
||||
return http.post<ResPage<any>>(`SerialNumber/Generate`, params);
|
||||
};
|
||||
//打印
|
||||
export const getPrintListCodeApi = (params: Record<string, any>) => {
|
||||
return http.post<ResPage<any>>(`SerialNumber/Print`, params);
|
||||
};
|
||||
48
src/api/modules/boxCode.ts
Normal file
48
src/api/modules/boxCode.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
import http from "@/api";
|
||||
import { ResPage } from "@/api/interface/index";
|
||||
//箱信息列表
|
||||
export const getListApi = (params: any) => {
|
||||
return http.post<ResPage<any>>(`Box/GetList`, params);
|
||||
};
|
||||
//生成箱碼
|
||||
export const getBoxGenerateApi = (params: any) => {
|
||||
return http.post<ResPage<any>>(`Box/Generate`, params);
|
||||
};
|
||||
//裝箱保存
|
||||
export const getSaveBoxApi = (params: any) => {
|
||||
return http.post<ResPage<any>>(`Box/Save`, params, { noLoading: false });
|
||||
};
|
||||
//打印
|
||||
export const getPrintBoxApi = (params: any) => {
|
||||
return http.post<ResPage<any>>(`Box/Print`, params);
|
||||
};
|
||||
//刪除 /
|
||||
export const getDeleteBoxApi = (params: any) => {
|
||||
return http.post<ResPage<any>>(`Box/Delete`, params);
|
||||
};
|
||||
//清空
|
||||
export const getClearBoxApi = (params: any) => {
|
||||
return http.get<ResPage<any>>(`Box/Clear`, params);
|
||||
};
|
||||
//根据箱号获取箱信息
|
||||
export const getBoxByNoApi = (params: any) => {
|
||||
return http.get<ResPage<any>>(`Box/GetBoxByNo`, params, {
|
||||
noLoading: true
|
||||
});
|
||||
};
|
||||
//根据序列号获取序列号信息
|
||||
export const getSerialNumberApi = (params: any) => {
|
||||
return http.get<ResPage<any>>(`SerialNumber/Get`, params);
|
||||
};
|
||||
//根据箱号去获取序列号
|
||||
export const getSerialNumberByBoxIdApi = (params: any) => {
|
||||
return http.post<ResPage<any>>(`SerialNumber/GetByBoxId`, params, { noLoading: true });
|
||||
};
|
||||
//重新装箱
|
||||
export const getBoxRestartApi = (params: any) => {
|
||||
return http.post<ResPage<any>>(`Box/Restart`, params);
|
||||
};
|
||||
//开始装箱时间接口 Box/BeginCarton
|
||||
export const getBeginCartonApi = (params: any) => {
|
||||
return http.get<ResPage<any>>(`Box/BeginCarton`, params);
|
||||
};
|
||||
14
src/api/modules/boxMark.ts
Normal file
14
src/api/modules/boxMark.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
//箱唛
|
||||
import http from "@/api";
|
||||
import { ResPage } from "@/api/interface/index";
|
||||
|
||||
//箱唛列表
|
||||
export const getBoxMarkListApi = (params: Record<string, any>) => {
|
||||
return http.post<ResPage<any>>(`BoxMark/GetList`, params);
|
||||
};
|
||||
//生成箱唛
|
||||
export const getMaterialListApi = (params: any) => {
|
||||
console.log(params);
|
||||
// return http.get<any>(`SysConfig/GetMaterialList?speci=${encodeURIComponent(speci)}`);
|
||||
return [];
|
||||
};
|
||||
9
src/api/modules/exportList.ts
Normal file
9
src/api/modules/exportList.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import http from "@/api";
|
||||
// 导出列表
|
||||
export const getListApi = (params: Record<string, any>) => {
|
||||
return http.get<any>(`exports`, params);
|
||||
};
|
||||
//状态
|
||||
export const getExportTypesApi = () => {
|
||||
return http.get<any>(`export/types`);
|
||||
};
|
||||
10
src/api/modules/foundationMaterial.ts
Normal file
10
src/api/modules/foundationMaterial.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import http from "@/api";
|
||||
|
||||
/**
|
||||
* @name 全局模块(在公司下面的数据)
|
||||
*/
|
||||
|
||||
//物料分页列表
|
||||
export const getMaterialListApi = (params: any) => {
|
||||
return http.get<any>(`material`, params);
|
||||
};
|
||||
26
src/api/modules/global.ts
Normal file
26
src/api/modules/global.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import http from "@/api";
|
||||
|
||||
/**
|
||||
* @name 全局模块(在公司下面的数据)
|
||||
*/
|
||||
|
||||
//获取供应商
|
||||
export const getSupplierApi = (params: any) => {
|
||||
return http.get<any>(`basicinfo/suppliers`, params);
|
||||
};
|
||||
//組織
|
||||
export const getOrgsApi = () => {
|
||||
return http.get<any>(`basicinfo/orgs`);
|
||||
};
|
||||
//客戶
|
||||
export const getCustomersApi = (params: any) => {
|
||||
return http.get<any>(`basicinfo/customers`, params);
|
||||
};
|
||||
//用户(订阅账号)
|
||||
export const getUsersApi = (params: any) => {
|
||||
return http.get<any>(`user/list`, params);
|
||||
};
|
||||
//品线
|
||||
export const getProductLinesApi = (params: any) => {
|
||||
return http.get<any>(`basicinfo/productlines`, params);
|
||||
};
|
||||
18
src/api/modules/inspection.ts
Normal file
18
src/api/modules/inspection.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import http from "@/api";
|
||||
|
||||
/**
|
||||
* @name 全局模块(在公司下面的数据)
|
||||
*/
|
||||
|
||||
//质检单列表
|
||||
export const getQualityInspectListApi = (params: any) => {
|
||||
return http.get<any>(`quality_inspect`, params);
|
||||
};
|
||||
//刷新 /admapi/quality_inspect/reload
|
||||
export const getQualityInspectReloadApi = (params: any) => {
|
||||
return http.get<any>(`quality_inspect/reload`, params);
|
||||
};
|
||||
//导出
|
||||
export const getQualityInspectExportApi = (params: any) => {
|
||||
return http.get<any>(`quality_inspect/export`, params);
|
||||
};
|
||||
32
src/api/modules/login.ts
Normal file
32
src/api/modules/login.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import { ResultData, Login } from "@/api/interface/index";
|
||||
// import authMenuList from "@/assets/json/authMenuList.json";
|
||||
import http from "@/api";
|
||||
|
||||
/**
|
||||
* @name 登录模块
|
||||
*/
|
||||
// 用户登录
|
||||
export const loginApi = (params: Login.ReqLoginCode) => {
|
||||
return http.get<ResultData<Login.ResLogin>>(`/user/signin/${params}`);
|
||||
// 正常 post json 请求 ==> application/json
|
||||
// return http.post<Login.ResLogin>(PORT1 + `/login`, params, { noLoading: true }); // 控制当前请求不显示 loading
|
||||
// return http.post<Login.ResLogin>(PORT1 + `/login`, {}, { params }); // post 请求携带 query 参数 ==> ?username=admin&password=123456
|
||||
// return http.post<Login.ResLogin>(PORT1 + `/login`, qs.stringify(params)); // post 请求携带表单参数 ==> application/x-www-form-urlencoded
|
||||
// return http.get<Login.ResLogin>(PORT1 + `/login?${qs.stringify(params, { arrayFormat: "repeat" })}`); // get 请求可以携带数组等复杂参数
|
||||
};
|
||||
|
||||
// 获取菜单列表
|
||||
export const getAuthMenuListApi = () => {
|
||||
console.log("触发了吗");
|
||||
return http.get<any>(`/user/permissions`, {}, { noLoading: true });
|
||||
// return authMenuList;
|
||||
};
|
||||
|
||||
// 用户退出登录
|
||||
export const logoutApi = () => {
|
||||
return http.get(`/user/signout`);
|
||||
};
|
||||
|
||||
// export const LoginOutSingleApi = () => {
|
||||
// return http.get(`/Login/LoginOutSingle`);
|
||||
// };
|
||||
5
src/api/modules/operationButtons.ts
Normal file
5
src/api/modules/operationButtons.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import http from "@/api";
|
||||
//按钮提交,通过请求接口来区分就可以了
|
||||
export const operationButtonsApi = (url: string, params: any) => {
|
||||
return http.post<any>(url, params);
|
||||
};
|
||||
23
src/api/modules/subscribe.ts
Normal file
23
src/api/modules/subscribe.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import http from "@/api";
|
||||
|
||||
//订阅信息单列表 /admapi/subscribe
|
||||
export const getSubscribeListApi = (params: any) => {
|
||||
return http.get<any>(`subscribe`, params);
|
||||
};
|
||||
//新增
|
||||
export const getSubscribeAddApi = (params: any) => {
|
||||
return http.post<any>(`subscribe`, params);
|
||||
};
|
||||
//详情
|
||||
export const getSubscribeDetailsApi = (params: any) => {
|
||||
return http.get<any>(`subscribe/${params}`);
|
||||
};
|
||||
//更新
|
||||
export const getSubscribeUpdateApi = (id: any, params: any) => {
|
||||
console.log(params, "=params=");
|
||||
return http.post<any>(`subscribe/${id}`, params);
|
||||
};
|
||||
//删除
|
||||
export const getSubscribeDelApi = (params: any) => {
|
||||
return http.delete<any>(`subscribe/${params}`);
|
||||
};
|
||||
6
src/api/modules/subscription.ts
Normal file
6
src/api/modules/subscription.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import http from "@/api";
|
||||
|
||||
//获取客户下拉列表(纯客户信息 不包含组织信息)
|
||||
export const getCustomersNoOrgApi = (id: any) => {
|
||||
return http.get<any>(`SysConfig/GetCustomersNoOrg/${id}`);
|
||||
};
|
||||
48
src/api/modules/test.ts
Normal file
48
src/api/modules/test.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
//测试
|
||||
// import http from "@/api";
|
||||
// import { ResPage } from "@/api/interface/index";
|
||||
|
||||
//列表
|
||||
export const getBoxMarkListApi = () => {
|
||||
return {
|
||||
totalCount: 1,
|
||||
isSuccess: true,
|
||||
message: "Success",
|
||||
status: 200,
|
||||
data: [
|
||||
{
|
||||
id: 11573,
|
||||
detailsId: 30059,
|
||||
billNo: "RKRW00011573",
|
||||
status: "部分入库",
|
||||
sourceBillNo: "SCHB00054706",
|
||||
type: "生产入库",
|
||||
supplier: "",
|
||||
org: "深圳市元创时代科技有限公司",
|
||||
specifications: "",
|
||||
materialNumber: "G01-11-579493",
|
||||
materialName: "",
|
||||
factoryPrice: 0,
|
||||
stock: "wms仓库02",
|
||||
accruedQty: 50,
|
||||
receiveQty: 20,
|
||||
realityQty: 20,
|
||||
receiver: "尹芳丽wms",
|
||||
receiveTime: "2025-08-13 17:45:39",
|
||||
shelfer: "尹芳丽wms",
|
||||
shelfTime: "2025-08-13 17:46:23",
|
||||
remark: null,
|
||||
createTime: "2025-08-13 15:12:30",
|
||||
isRepeal: "否",
|
||||
saleBillNo: " "
|
||||
}
|
||||
]
|
||||
};
|
||||
//http.post<ResPage<any>>(`BoxMark/GetList`, params);
|
||||
};
|
||||
// //生成箱唛
|
||||
// export const getMaterialListApi = (speci: any) => {
|
||||
// console.log(speci);
|
||||
// // return http.get<any>(`SysConfig/GetMaterialList?speci=${encodeURIComponent(speci)}`);
|
||||
// return [];
|
||||
// };
|
||||
18
src/api/modules/upload.ts
Normal file
18
src/api/modules/upload.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { Upload } from "@/api/interface/index";
|
||||
import { PORT1 } from "@/api/config/servicePort";
|
||||
import http from "@/api";
|
||||
|
||||
/**
|
||||
* @name 文件上传模块
|
||||
*/
|
||||
// 图片上传
|
||||
export const uploadImg = (formData: any) => {
|
||||
//params: FormData
|
||||
let url = import.meta.env.VITE_APP_API_BASEURL + import.meta.env.VITE_APP_API_VERSION + "/Upload?type=material&name=";
|
||||
return http.post<any>(url, formData);
|
||||
};
|
||||
|
||||
// 视频上传
|
||||
export const uploadVideo = (params: FormData) => {
|
||||
return http.post<Upload.ResFileUrl>(PORT1 + `/file/upload/video`, params);
|
||||
};
|
||||
Reference in New Issue
Block a user