| | |
| | | import { buildUUID } from '../../../utils/uuid'; |
| | | import { ApiActionPage } from '../../model/baseModel'; |
| | | import { |
| | | RegionListItem, |
| | | RegionPageParams, |
| | | RegionPageListGetResultModel, |
| | | } from '../model/warehoueseModel'; |
| | | import { genAction, Api, genActionPage } from '../system'; |
| | | import { RegionListItem } from '../model/warehoueseModel'; |
| | | import { genAction, Api } from '../system'; |
| | | import { defHttp } from '/@/utils/http/axios'; |
| | | |
| | | /* |
| | | * 获取区域分页列表 |
| | | */ |
| | | export const getRegionListByPage = async (params: RegionPageParams) => { |
| | | let sqlcmd = ''; |
| | | if (params?.REGION_CODE != undefined && params?.REGION_CODE != '') { |
| | | sqlcmd += "And REGION_CODE like '%" + params?.REGION_CODE + "%'"; |
| | | } |
| | | if (params?.REGION_NAME != undefined && params?.REGION_NAME != '') { |
| | | sqlcmd += "And REGION_NAME = '" + params?.REGION_NAME + "'"; |
| | | } |
| | | const rParams = genActionPage('WMS_REGION', sqlcmd, params.page, params.pageSize); |
| | | return getRegionListByPageAsync(rParams); |
| | | }; |
| | | async function getRegionListByPageAsync(params: ApiActionPage) { |
| | | const data = await defHttp.post<ApiActionPage>( |
| | | { url: Api.EntityPageList, params }, |
| | | { |
| | | isTransformResponse: false, |
| | | }, |
| | | ); |
| | | const model: RegionPageListGetResultModel = { |
| | | items: data.Data.data, |
| | | total: data.Data.totals, |
| | | }; |
| | | return model; |
| | | } |
| | | |
| | | export const SaveRegion = async (params: RegionListItem, isUpdate: boolean) => { |
| | | let data; |
| | |
| | | isTransformResponse: false, |
| | | }, |
| | | ); |
| | | }; |
| | | }; |