import { GenericApi, DwLayout, FileApi, Basicinfo, Mattress } from "@/api/interface/index"; import { PORT1, PORT_DL } from "@/api/config/servicePort"; import http from "@/api"; /** * @name 获取 通用接口:查询 * @param params 请求参数 * @param dwname 布局名称 */ export const CommonDynamicSelect = (params: GenericApi.ReqCommonDynamicSelect, dwname?: string) => { return http.postCommonDynamic(PORT1 + `/CommonDynamicSelect`, params, dwname); }; /** * @name 数据交互 通用调用uo */ export const CommonBill = (params: GenericApi.CommonClass) => { return http.postCommonBill(PORT1 + `/CommonBill`, params); }; /** * @name 获取 用户布局习惯 */ export const GetDwLyoutApi = (params: DwLayout.ReqGetDwLayout) => { return http.post(PORT1 + `/GetSysUserFileString`, params); }; /** * @name 提交 用户布局习惯 */ export const SetDwLyoutApi = (params: DwLayout.ReqSetDwLayout) => { return http.post(PORT1 + `/SetSysUserFileString`, params); }; /** * @name 获取 文件分类 */ export const GetFileClass = (params: FileApi.ReqFileClass) => { return http.post(PORT1 + `/GetFileClass`, params); }; /** * @name 获取 附件数据 */ export const GetFjFile = (params: FileApi.ReqFileData) => { return http.post(PORT1 + `/GetFjFile`, params); }; /** * @name 获取 md5转换附件 */ export const GetCacheFile = (params: FileApi.ReqCacheFile) => { return http.post(PORT1 + `/GetCacheFile`, params); }; /** * @name 下载 md5转换附件 */ export const DownloadCacheFile = (params: FileApi.ReqCacheFile) => { return http.get(PORT_DL + `/GetCacheFile`, params, { responseType: "blob" }); }; /** * @name 上传 附件 */ export const UploadFile = (params: FileApi.ReqUploadFile) => { return http.post(PORT1 + `/UploadL1File`, params); }; export const GetFormulaCompute = (params: GenericApi.ReqFormulaCompute) => { return http.post(PORT1 + `/GetFormulaCompute`, params); }; export const GetERPMtrldefList = (params?: GenericApi.ReqGetERPMtrldefList) => { return http.post(PORT1 + `/GetERPMtrldefList`, params); }; export const GetERPConfigureList = (params?: GenericApi.ReqGetERPConfigureList) => { return http.post(PORT1 + `/GetERPConfigureList`, params); }; export const GetERPWrkGrpList = (params?: GenericApi.ReqGetERPWrkGrpList) => { return http.post(PORT1 + `/GetERPWrkGrpList`, params); }; export const GetERPWrkGrpList2 = () => { let newParams: any = {}; newParams.dsname = "_Mapper_wrkgrpcode2"; newParams.queryparams = {}; newParams.pageindex = 0; newParams.pagesize = 0; return CommonDynamicSelect(newParams); }; export const GetERPMtrlTypeList = () => { return http.post(PORT1 + `/GetERPMtrlTypeList`); }; /** * @description 生成L1物料 * @param params * @returns */ export const CreatMtrlPf = (params?: Mattress.ReqRefreshMattressInterface) => { return http.post(PORT1 + `/CreatMtrldef`, params); }; /** * @description 生成L1清单 * @param params * @returns */ export const CreatPrdPf = (params?: Mattress.ReqRefreshMattressInterface) => { return http.post(PORT1 + `/CreatPrdPf`, params); }; /** * @description 删除L1清单 * @param params * @returns */ export const DelMtrlPf = (params?: Mattress.ReqRefreshMattressInterface) => { return http.post(PORT1 + `/DelMtrlPf`, params); };