Commit b076c559 by wusiyi

fix: 分拣配置编辑bug修复

parent 68607402
...@@ -168,7 +168,7 @@ export function getLogisticsWayListByCompanyId(companyId: number) { ...@@ -168,7 +168,7 @@ export function getLogisticsWayListByCompanyId(companyId: number) {
} }
// 获取tictok物流承运商 // 获取tictok物流承运商
export function getTiktokCarrier() { export function getTiktokCarrier() {
return axios.get<never, BaseRespData<{ name: string; id: string,typeCode:string,label:string }[]>>( return axios.get<never, BaseRespData<{ name: string; id: string, typeCode: string, label: string }[]>>(
'logisticsWay/getTiktokShippingProvider', 'logisticsWay/getTiktokShippingProvider',
) )
} }
...@@ -461,6 +461,9 @@ export function logisticsCompanyAllCodelist() { ...@@ -461,6 +461,9 @@ export function logisticsCompanyAllCodelist() {
'/logisticsCompany/allCodelist', '/logisticsCompany/allCodelist',
) )
} }
/**
分拣配置
*/
export function getsortingConfigListApi( export function getsortingConfigListApi(
data: IsortingInfo, data: IsortingInfo,
currentPage: number, currentPage: number,
...@@ -475,6 +478,13 @@ export function getsortingConfigListApi( ...@@ -475,6 +478,13 @@ export function getsortingConfigListApi(
}, },
) )
} }
// 详情
export function getSortingConfig(params: { id: number | string }) {
return axios.get<never, BaseRespData<IsortingInfo>>(
'logistics/sortingConfig/get',
{ params },
)
}
export function createSortingApi(data: IsortingInfo) { export function createSortingApi(data: IsortingInfo) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
'logistics/sortingConfig/add', 'logistics/sortingConfig/add',
......
...@@ -16,6 +16,7 @@ import { ...@@ -16,6 +16,7 @@ import {
createSortingApi, createSortingApi,
updateSortingApi, updateSortingApi,
deleteSortingApi, deleteSortingApi,
getSortingConfig,
} from '@/api/logistics' } from '@/api/logistics'
import { allErpCodeListApi } from '@/api/podCnOrder' import { allErpCodeListApi } from '@/api/podCnOrder'
import { nextTick, ref } from 'vue' import { nextTick, ref } from 'vue'
...@@ -244,16 +245,17 @@ const createWarehouse = () => { ...@@ -244,16 +245,17 @@ const createWarehouse = () => {
formRef.value?.clearValidate() formRef.value?.clearValidate()
}) })
} }
const updateSorting = (item: IsortingInfo) => { const updateSorting = async (item: IsortingInfo) => {
if (!item) return
createData.value.show = true createData.value.show = true
createData.value.isEdit = true createData.value.isEdit = true
createData.value.title = '修改' createData.value.title = '修改'
const res = await getSortingConfig({ id: item.id as number | string })
if (res.code !== 200) return
const { serviceCode, ...rest } = res.data
form.value = { form.value = {
id: item.id, ...rest,
sortingFacility: item.sortingFacility, serviceCode: serviceCode ? serviceCode.split(',') : [],
sortingArea: item.sortingArea,
sortingAreaName: item.sortingAreaName,
serviceCode: item.serviceCode ? item.serviceCode.split(',') : [],
} }
nextTick(() => { nextTick(() => {
formRef.value?.clearValidate() formRef.value?.clearValidate()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment