From 3bf0e1e45acfb85fb6054dc55d1c1204a6750998 Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期二, 24 九月 2024 23:53:53 +0800 Subject: [PATCH] 通用增删改模态窗口更新,工单维护更新 --- src/api/tigerapi/mes/wo.ts | 74 ++++++++++++++++++++++++++++++++++--- 1 files changed, 68 insertions(+), 6 deletions(-) diff --git a/src/api/tigerapi/mes/wo.ts b/src/api/tigerapi/mes/wo.ts index 29dbe90..7a685fe 100644 --- a/src/api/tigerapi/mes/wo.ts +++ b/src/api/tigerapi/mes/wo.ts @@ -4,6 +4,9 @@ MesWolistPageParams, BIZ_MES_WOPageListGetResultModel, BIZ_MES_WO, + SaveWoBatchInput, + BizMesWoInput, + BAS_LABEL_VAR_WO, } from '../model/mesModel'; import { genAction, Api, genActionPage } from '../system'; import { defHttp } from '/@/utils/http/axios'; @@ -45,12 +48,67 @@ return model; } -//淇濆瓨 +/** + * @description: 淇濆瓨宸ュ崟鏅�氭柟娉� + * @param {BIZ_MES_WO} params + * @return {*} + */ export const SaveMesWo = async (params: BIZ_MES_WO) => { params.CREATE_USER = useUserStore().getUserInfo.userId as string; params.UPDATE_USER = useUserStore().getUserInfo.userId as string; const data = await defHttp.post( { url: mesApi.SaveMesWo, params: genAction('BIZ_MES_WO', params) }, + { + errorMessageMode: 'none', + isTransformResponse: false, + }, + ); + return data; +}; + +/** + * @description: 涓嬪彂淇濆瓨鎵规宸ュ崟淇℃伅 + * @param {SaveWoBatchInput} params + * @return {*} + */ +export const SaveMesBatchWo = async (params: SaveWoBatchInput) => { + params.Wo.UPDATE_USER = useUserStore().getUserInfo.userId as string; + params.WoBatch.CREATE_USER = useUserStore().getUserInfo.userId as string; + params.WoBatch.UPDATE_USER = useUserStore().getUserInfo.userId as string; + const data = await defHttp.post( + { url: mesApi.SaveMesBatchWo, params: genAction('BIZ_MES_WO_BATCH', params) }, + { + errorMessageMode: 'none', + isTransformResponse: false, + }, + ); + return data; +}; + +/** + * @description: 宸ュ崟鐘舵�佹洿鏂� + * @param {BizMesWoInput} params + * @return {*} + */ +export const UpdateWoStatus = async (params: BizMesWoInput) => { + const data = await defHttp.post( + { url: mesApi.UpdateWoStatus, params: genAction('', params) }, + { + errorMessageMode: 'none', + isTransformResponse: false, + }, + ); + return data; +}; + +/** + * @description: 宸ュ崟鎵规鐘舵�佹洿鏂� + * @param {BizMesWoInput} params + * @return {*} + */ +export const UpdateWoBatchStatus = async (params: BizMesWoInput) => { + const data = await defHttp.post( + { url: mesApi.UpdateWoBatchStatus, params: genAction('', params) }, { errorMessageMode: 'none', isTransformResponse: false, @@ -73,14 +131,18 @@ ); }; -export const MesWoStatus = async () => { - const usParams = genAction('BIZ_MES_WO+STATUSs', ''); - return await defHttp.post( - { url: Api.urlQueryEnum, params: usParams }, +/** + * @description: 淇敼宸ュ崟妯℃澘鍙橀噺 + * @param {BAS_LABEL_VAR_WO} params + * @return {*} + */ +export const AddOrEditLabelVarByWorkOrder = async (params: BAS_LABEL_VAR_WO) => { + const data = await defHttp.post( + { url: mesApi.AddOrEditLabelVarByWorkOrder, params: genAction('', params) }, { errorMessageMode: 'none', isTransformResponse: false, - //apiUrl: globSetting.taskApiUrl }, ); + return data; }; -- Gitblit v1.9.3