Commit 1b462820 by sunyang

podcn

parent deebc36e
import { BasePaginationData, BaseRespData } from '@/types/api'
import {
ProductList,
PodCnOrderListData,
SearchForm,
Tab,
LogListData,
WarehouseListData,
LogisticsData,
ExportParams
} from '@/types/api/podCnOrder'
import axios from './axios'
import { PodMakeOrderData } from '@/types/api/podMakeOrder'
export function exportPodCnInfo(data: ExportParams) {
return axios.post<never, BasePaginationData<never>>(
'factory/podJomallOrderCn/exportPodCnOrder',
data,
)
}
// 同步收货地址
export function syncReceiverAddress(data: number[]) {
return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderCn/syncReceiverAddress',
data,
)
}
export function refreshAddressApi(idList: number[]) {
return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderCn/syncReceiverAddress',
idList,
)
}
export function updateAddressApi(data: PodCnOrderListData) {
return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderCn/updateReceiverAddress',
data,
)
}
export function getOrderTabData() {
return axios.get<never, BaseRespData<Tab[]>>(
'/factory/podJomallOrderCn/findStateGroupList',
)
}
export function getOrderList(
params: SearchForm,
currentPage: number,
pageSize: number,
) {
return axios.post<never, BasePaginationData<PodCnOrderListData[]>>(
'/factory/podJomallOrderCn/list_page',
{
...params,
currentPage,
pageSize,
},
)
}
export function getCardOrderList(
params: SearchForm,
currentPage: number,
pageSize: number,
) {
return axios.post<never, BasePaginationData<ProductList[]>>(
'/factory/podJomallOrderProductCn/list_page',
{
...params,
currentPage,
pageSize,
},
)
}
export function confirmOrderApi(
data: number[],
productionClient: string,
type: string,
logisticsTrialCalculation?: LogisticsData | null,
) {
return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderCn/confirmOrders',
{
ids: data.join(','),
type,
logisticsTrialCalculation,
productionClient,
},
)
}
export function updateExceptionOrderApi(data: number[]) {
return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderCn/updateExceptionOrders',
{
orderIds: data,
},
)
}
export function changeExceptionOrderApi(
url: string,
ids: number[],
type: string,
value: string,
) {
return axios.post<never, BaseRespData<never>>(url, {
orderIds: ids,
exceptionType: type,
exceptionReason: value,
})
}
export function cancelOrderApi(ids: number[], value: string) {
return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderCn/cancelOrders',
{
orderIds: ids,
cancelReason: value,
},
)
}
export function getOperationLogApi(id: number) {
return axios.get<never, BaseRespData<LogListData[]>>(
`factory/podJomallOrderCnLog/getPodJomallOrderCnLog?id=${id}`,
)
}
export function getSubOrderBySubOrderNumber(factorySubOrderNumber: string) {
return axios.get<never, BaseRespData<ProductList>>(
'factory/podJomallOrderProductCn/getProductCnByFactorySubOrderNumber',
{
params: {
factorySubOrderNumber,
},
},
)
}
export function downloadMaterialApi(id: number[]) {
return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderProductCn/downloadDesignImages',
id,
)
}
export function productionQueryApi(id: number, podJomallOrderCnId: number) {
return axios.post<never, BasePaginationData<never>>(
'factory/podJomallOrderProductCn/completeDelivery',
{
id,
podJomallOrderCnId,
},
)
}
export function printProductionOrderApi(orderIds: number[]) {
return axios.post<never, BaseRespData<string>>(
'factory/podJomallOrderProductCn/printProducePdf',
orderIds,
)
}
export function printPrintOrderApi(orderIds: number[]) {
return axios.post<never, BaseRespData<string>>(
'factory/podJomallOrderProductCn/printPickPdf',
{
ids: orderIds.join(','),
},
)
}
export function printPickingOrderApi(orderIds: number[]) {
return axios.post<never, BaseRespData<string>>(
'factory/podJomallOrderProductCn/pickingComplete',
{
ids: orderIds.join(','),
},
)
}
export function stockOutCheckApi(orderIds: number[]) {
return axios.get<
never,
BaseRespData<
{
id: number
status: boolean
message?: string
factoryOrderNumber?: string
}[]
>
>(`factory/podJomallOrderCn/replenishVerify?ids=${orderIds.join(',')}`)
}
export function toBePickingApi(orderIds: number[]) {
return axios.get<never, BaseRespData<never>>(
`factory/podJomallOrderCn/updateStockOutOrderToPicking?ids=${orderIds.join(
',',
)}`,
)
}
export function getOrderDetailById(id: number) {
return axios.get<never, BaseRespData<ProductList>>(
`factory/podJomallOrderProductCn/getProductCnById?id=${id}`,
)
}
export function getPackingDataApi(
code: string,
factoryNo: number,
box: number | null,
warehouseId: number | string,
) {
return axios.get<never, BaseRespData<PodMakeOrderData>>(
'/factory/podJomallOrderCn/getPodBoxDetailsBySkuOrNo',
{
params: {
podJomallCnNo: code,
box,
factoryNo,
warehouseId,
},
},
)
}
export function getPodBoxListApi(
factoryNo: number | string,
warehouseId: number | string,
) {
return axios.get<never, BaseRespData<PodMakeOrderData[]>>(
'factory/podJomallOrderCn/getPodBoxOrderDetails',
{
params: { factoryNo, warehouseId },
},
)
}
export function submitInspectionApi(
data: { id: number; version?: number }[],
boxIndex: number | null,
warehouseId: number | string,
) {
return axios.post<never, BaseRespData<never>>(
`factory/podJomallOrderCn/podPrintOrderComplete?box=${boxIndex}&warehouseId=${warehouseId}`,
{
orderParamList: data,
},
)
}
export function clearBoxApi(
factoryNo: number,
box: number | null,
warehouseId: number | string,
) {
return axios.get<never, BaseRespData<never>>(
'factory/podJomallOrderCn/delPodBoxOrderDetailsByBox',
{
params: { factoryNo, box, warehouseId },
},
)
}
export function clearAllBoxApi() {
return axios.get<never, BaseRespData<never>>(
'factory/podJomallOrderCn/delPodBoxOrderDetails',
)
}
export function updateRemarkApi(id: number, content: string) {
return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderCn/addRemark',
{ id, content },
)
}
export function getLogisticsCalculation(id: number) {
return axios.get<never, BaseRespData<never>>(
'factory/podJomallOrderCn/getLogisticsCalculation',
{ params: { id } },
)
}
export function loadWarehouseListApi() {
return axios.get<never, BaseRespData<WarehouseListData[]>>(
'factoryWarehouseInfo/getAll',
)
}
export function refreshMaterialApi(data: {
orderIds?: string
productIds?: string
}) {
return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderProductCn/refreshDesignImages ',
data,
)
}
// 设计图排版
export function composingDesignImages(data: number[], type: string) {
return axios.post<never, BaseRespData<never>>(
`factory/podJomallOrderCn/composingDesignImages?type=${type}`,
data,
)
}
// 转至待拣胚
export function updateLogisticsToPickingApi(params: { ids: string }) {
return axios.get<never, BaseRespData<never>>(
`factory/podJomallOrderCn/updateLogisticsToPicking`,
{
params,
},
)
}
// 转至待排单
export function updateLogisticsToArrangeApi(params: { ids: string }) {
return axios.get<never, BaseRespData<never>>(
`factory/podJomallOrderCn/updateLogisticsToArrange`,
{
params,
},
)
}
export function applyForReplenishmentApi(
data: {
id: number
productId: number
factorySubOrderNumber: string
replenishmentNum: string
podJomallOrderCnStatus: string
}[],
) {
return axios.post<never, BaseRespData<never>>(
`factory/podJomallOrderProductCn/applyForReplenishment`,
data,
)
}
export function replenishmentSuccessApi(data: number[]) {
return axios.post<never, BaseRespData<never>>(
`factory/podJomallOrderProductCn/replenishmentComplete`,
data,
)
}
//确认生产
export function confirmProductApi(orderIds: (string | number)[]) {
return axios.post<never, BaseRespData<never>>(
`factory/podJomallOrderCn/confirmProduct`,
orderIds,
)
}
export function toOutOfStockApi(ids: number[]) {
return axios.post<never, BaseRespData<never>>(
`factory/podJomallOrderCn/pickingToStockOut`,
ids,
)
}
// 排单完成
export function arrangeFinishApi(ids: number[]) {
return axios.post<never, BaseRespData<never>>(
`factory/podJomallOrderProductCn/arrangeFinish`,
ids,
)
}
// 获取工艺
export function getListCraftApi() {
return axios.post<never, BaseRespData<never>>(
`factory/podJomallOrderProductUs/listCraft`,
)
}
// 批量下载 列表
export function batchDownloadApi(currentPage: number, pageSize: number) {
return axios.post<never, BaseRespData<never>>(
`factory/podBatchDownload/cn/list_page`,
{
currentPage,
pageSize,
},
)
}
// 批量下载 下载
export function batchDownloadDownloadApi(params: { id: number; type: string }) {
return axios.get<never, BaseRespData<never>>(
`factory/podBatchDownload/download`,
{
params,
},
)
}
// 批量下载 删除
export function batchDownloadDeleteApi(params: { id: number }) {
return axios.get<never, BaseRespData<never>>(
`factory/podBatchDownload/delete`,
{
params,
},
)
}
// 批量下载 重新排版
export function batchDownloadRecomposingApi(params: { id: number }) {
return axios.get<never, BaseRespData<never>>(
`factory/podBatchDownload/reComposingDesignImages`,
{
params,
},
)
}
// 生产完成
export function updateToWaitShipmentApi(params: {
cnUpdateParams: Array<{
id: number | string
podJomallOrderCnId: number | string
factorySubOrderNumber: number | string
version: number | string
}>
}) {
return axios.post<never, BaseRespData<never>>(
`factory/podJomallOrderCn/updateToWaitShipment`,
params,
)
}
//创建物流订单
export function createLogisticsOrdersApi(orderIds: (string | number)[]) {
return axios.post<never, BaseRespData<never>>(
`factory/podJomallOrderCn/createLogisticsOrders`,
orderIds,
)
}
// 获取跟踪号
export function getTrackingNumberApi(orderIds: (string | number)[]) {
return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderCn/getTrackingNumber',
orderIds,
)
}
// 获取打印面单
export function getfaceSimplexFileApi(orderIds: (string | number)[]) {
return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderCn/getfaceSimplexFile',
orderIds,
)
}
// 取消物流订单
export function cancelLogisticsOrderApi(orderIds: (string | number)[]) {
return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderCn/cancelLogisticsOrder',
orderIds,
)
}
// 更改物流
export function changeLogisticsApi(params: {
updateByIdParam: {
id: string | number
dataVersion: number
}
logisticsTrialCalculation: LogisticsData
}) {
return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderCn/changeLogistics',
params,
)
}
// 修改自有物流信息
export function updateSelfLogistics(params: {
trackingNumber: string
expressSheet: string
processNumber: string
id?: string
}) {
return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderUs/updateSelfLogistics',
params,
)
}
// 上传物流面单
export function uploadExpressSheet(params: {
trackingNumber: string
file: File
}) {
return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderCn/uploadExpressSheet',
params,
)
}
\ No newline at end of file
...@@ -367,15 +367,6 @@ export function composingDesignImages(data: number[], type: string) { ...@@ -367,15 +367,6 @@ export function composingDesignImages(data: number[], type: string) {
data, data,
) )
} }
// 转至待拣胚
export function updateLogisticsToPickingApi(params: { ids: string }) {
return axios.get<never, BaseRespData<never>>(
`factory/podJomallOrderUs/updateLogisticsToPicking`,
{
params,
},
)
}
// 转至待排单 // 转至待排单
export function updateLogisticsToArrangeApi(params: { ids: string }) { export function updateLogisticsToArrangeApi(params: { ids: string }) {
return axios.get<never, BaseRespData<never>>( return axios.get<never, BaseRespData<never>>(
...@@ -453,7 +444,7 @@ export function getListCraftApi() { ...@@ -453,7 +444,7 @@ export function getListCraftApi() {
// 批量下载 列表 // 批量下载 列表
export function batchDownloadApi(currentPage: number, pageSize: number) { export function batchDownloadApi(currentPage: number, pageSize: number) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
`factory/podUsBatchDownload/list_page`, `factory/podBatchDownload/us/list_page`,
{ {
currentPage, currentPage,
pageSize, pageSize,
...@@ -464,7 +455,7 @@ export function batchDownloadApi(currentPage: number, pageSize: number) { ...@@ -464,7 +455,7 @@ export function batchDownloadApi(currentPage: number, pageSize: number) {
// 批量下载 下载 // 批量下载 下载
export function batchDownloadDownloadApi(params: { id: number; type: string }) { export function batchDownloadDownloadApi(params: { id: number; type: string }) {
return axios.get<never, BaseRespData<never>>( return axios.get<never, BaseRespData<never>>(
`factory/podUsBatchDownload/download`, `factory/podBatchDownload/download`,
{ {
params, params,
}, },
...@@ -474,7 +465,7 @@ export function batchDownloadDownloadApi(params: { id: number; type: string }) { ...@@ -474,7 +465,7 @@ export function batchDownloadDownloadApi(params: { id: number; type: string }) {
// 批量下载 删除 // 批量下载 删除
export function batchDownloadDeleteApi(params: { id: number }) { export function batchDownloadDeleteApi(params: { id: number }) {
return axios.get<never, BaseRespData<never>>( return axios.get<never, BaseRespData<never>>(
`factory/podUsBatchDownload/delete`, `factory/podBatchDownload/delete`,
{ {
params, params,
}, },
...@@ -484,7 +475,7 @@ export function batchDownloadDeleteApi(params: { id: number }) { ...@@ -484,7 +475,7 @@ export function batchDownloadDeleteApi(params: { id: number }) {
// 批量下载 重新排版 // 批量下载 重新排版
export function batchDownloadRecomposingApi(params: { id: number }) { export function batchDownloadRecomposingApi(params: { id: number }) {
return axios.get<never, BaseRespData<never>>( return axios.get<never, BaseRespData<never>>(
`factory/podUsBatchDownload/reComposingDesignImages`, `factory/podBatchDownload/reComposingDesignImages`,
{ {
params, params,
}, },
......
export interface Tab {
status?: string
statusName?: string
quantity?: number
}
export interface ExportParams extends SearchForm {
idList?: number[]
exportAll: boolean
}
export interface SearchForm {
timeType?: number | null
shopNumber?: string
shipmentType?: string
userMark?: string
processNumber?: string
trackingNumber?: string
baseSku?: string
factoryOrderNumber?: string
sku?: string
factorySubOrderNumber?: string
status?: string
customizedQuantity?: string
multi?: boolean | null
startTime?: string | null
endTime?: string | null
shipmentArea?: number | undefined
platform?: string
productionClient?: string
warehouseId?: string | number
thirdSkuCode?: string
supplierProductNo?: string
batchArrangeNumber?: string
craftCode?: string
thirdStockSku?: string
}
export interface PodCnOrderListData {
id: number
thirdOrderNumber?: string
factoryOrderNumber?: string
shopNumber?: string
factoryOnlineId?: number | null
factoryNo?: number | null
factoryCode?: string | null
status?: string
weight?: number | null
totalProductAmount?: number | null
productAmount?: number
carriageAmount?: number | null
totalAmount?: number | null
productNum?: number | null
trackStatus?: string | null
receiverName?: string
receiverPhone?: string
receiverCountry?: string
receiverProvince?: string
receiverCity?: string
receiverDistrict?: string
receiverAddress1?: string
receiverAddress2?: string
receiverPostCode?: string
paymentType?: string
paymentTime?: string
startStockingTime?: string
finishTime?: string
shipmentType?: number
expressSheet?: string
trackingNumber?: string
processNumber?: string
createTime?: string
updateTime?: string
remark?: string | null
userMark?: string
version?: number
productList?: ProductList[]
orderNumber?: string
logisticsWayId?: number | null
logisticsWayName?: string
url?: string | null
tiffUrl?: string | null
}
export interface ProductList {
id: number
podJomallOrderCnId: number
thirdSubOrderNumber?: string
thirdStockSku?: string
factorySubOrderNumber?: string
factoryCode?: string
productName?: string
baseSku?: string
variantSku?: string
productPrice?: number
templatePrice?: number
variantImage?: string
craftPrice?: number
craftCode?: string
platform?: string
imageAry?: string
designImages?: string
categoryId?: number
categoryName?: string
num?: number
passNum?: number
notPassNum?: number
payAmount?: number
status?: number
weight?: number | null
diyId?: string
endProductId?: string
customizedQuantity?: number
tagIds?: string
isProduction?: boolean
createTime?: string
updateTime?: string
remark?: string | null
version?: number
subOrderNumber?: string
craftName?: string | null
lanshouAddress?: string | null
shopNumber?: string | null
factoryOrderNumber?: string | null
replenishmentNum?: number | null
isReplenishment?: boolean
thirdSkuCode?: string | null
supplierProductNo?: string | null
replenishmentSumNum?: number | null
batchArrangeNumber?: string | null
}
export interface cardImages {
title: string
url: string
sort: number
id?: number
}
export interface LogListData {
id: number
bizId: number
userId: number
employeeName: string
description: string
deleteContent: string
createTime: string
}
export interface ProductionClient {
code?: string
remark?: string
}
export interface PodOrderRes extends ProductList {
expectDeliveryTime?: string | null
thirdOrderNumber?: string | null
startStockingTime?: string | null
factoryOrderNumber?: string | null
userMark?: string | null
craftName?: string | null
craftId?: string | null
shopNumber?: string | null
color?: string | null
size?: string | null
note?: Array<{ prop: string | number; value: string | number }>
imgList: cardImages[]
}
export interface WarehouseListData {
code?: string
defaulted?: number
factoryCode?: string
factoryId?: number
id: number
name?: string
remarks?: string
sort?: number
}
export interface LogisticsData {
logisticsWayName: string // 物流名称
warehouseName: string // 发货仓库
status: boolean
logisticsWayCode: string // 物流编码
partition: string // 所在分区
logisticsWayId?: number | null
}
export interface AddressInfo {
id?: string
receiverName: string
receiverPhone: string
receiverCountry: string
receiverProvince: string
receiverCity: string
receiverDistrict: string
receiverAddress1: string
receiverAddress2: string
receiverPostCode: string
}
export interface LogisticsFormData {
processNumber: string
trackingNumber: string
expressSheetUrl: string
expressSheet: File | null
}
export interface CraftListData {
craftName: string
craftCode: string
}
...@@ -197,8 +197,8 @@ import { ...@@ -197,8 +197,8 @@ import {
productionQueryApi, productionQueryApi,
getSubOrderBySubOrderNumber, getSubOrderBySubOrderNumber,
downloadMaterialApi, downloadMaterialApi,
} from '@/api/podUsOrder' } from '@/api/podCnOrder'
import { cardImages, PodOrderRes } from '@/types/api/podUsOrder' import { cardImages, PodOrderRes } from '@/types/api/podCnOrder'
import { showConfirm } from '@/utils/ui' import { showConfirm } from '@/utils/ui'
import { filePath } from '@/api/axios' import { filePath } from '@/api/axios'
import { ref, watch, defineProps, defineEmits } from 'vue' import { ref, watch, defineProps, defineEmits } from 'vue'
...@@ -214,7 +214,7 @@ const isDownloadImage = ref(false) ...@@ -214,7 +214,7 @@ const isDownloadImage = ref(false)
const isAutoSure = ref(false) const isAutoSure = ref(false)
const detail = ref<PodOrderRes>({ const detail = ref<PodOrderRes>({
id: -1, id: -1,
podJomallOrderUsId: -1, podJomallOrderCnId: -1,
imgList: [] as cardImages[], imgList: [] as cardImages[],
}) })
const dialogVisible = ref(false) const dialogVisible = ref(false)
...@@ -260,9 +260,9 @@ watch( ...@@ -260,9 +260,9 @@ watch(
() => props.detailVisible, () => props.detailVisible,
(newVal: boolean) => { (newVal: boolean) => {
dialogVisible.value = newVal dialogVisible.value = newVal
detail.value = { id: -1, podJomallOrderUsId: -1, imgList: [] } detail.value = { id: -1, podJomallOrderCnId: -1, imgList: [] }
if (newVal) { if (newVal) {
const history = localStorage.getItem('historyUsData') const history = localStorage.getItem('historyCnData')
historyData.value = history ? JSON.parse(history) : [] historyData.value = history ? JSON.parse(history) : []
const len = historyData.value const len = historyData.value
...@@ -285,7 +285,7 @@ watch( ...@@ -285,7 +285,7 @@ watch(
(newVal) => { (newVal) => {
detail.value = { detail.value = {
id: -1, id: -1,
podJomallOrderUsId: -1, podJomallOrderCnId: -1,
imgList: [], imgList: [],
} }
if (newVal && Object.keys(newVal).length > 0) { if (newVal && Object.keys(newVal).length > 0) {
...@@ -327,7 +327,7 @@ const confirmQuery = (len: HistoryDataItem[], i: number) => { ...@@ -327,7 +327,7 @@ const confirmQuery = (len: HistoryDataItem[], i: number) => {
) )
if (index >= 0) { if (index >= 0) {
historyData.value.splice(index, 1) historyData.value.splice(index, 1)
localStorage.setItem('historyUsData', JSON.stringify(historyData.value)) localStorage.setItem('historyCnData', JSON.stringify(historyData.value))
} }
if (len[i + 1]) { if (len[i + 1]) {
confirmQuery(len, i + 1) confirmQuery(len, i + 1)
...@@ -352,8 +352,8 @@ const setData = async (orderNumber: string) => { ...@@ -352,8 +352,8 @@ const setData = async (orderNumber: string) => {
if (!detail.value || detail.value?.id === -1) return if (!detail.value || detail.value?.id === -1) return
try { try {
const id = detail.value.id const id = detail.value.id
const podJomallOrderUsId = detail.value.podJomallOrderUsId const podJomallOrderCnId = detail.value.podJomallOrderCnId
await productionQueryApi(id, podJomallOrderUsId) await productionQueryApi(id, podJomallOrderCnId)
if (orderNumber) { if (orderNumber) {
const index = historyData.value.findIndex( const index = historyData.value.findIndex(
...@@ -362,14 +362,14 @@ const setData = async (orderNumber: string) => { ...@@ -362,14 +362,14 @@ const setData = async (orderNumber: string) => {
if (index >= 0) { if (index >= 0) {
// 扫单完成删除 // 扫单完成删除
historyData.value.splice(index, 1) historyData.value.splice(index, 1)
localStorage.setItem('historyUsData', JSON.stringify(historyData.value)) localStorage.setItem('historCnData', JSON.stringify(historyData.value))
} }
} }
emit('onSuccess') emit('onSuccess')
playAudio('weight_success') playAudio('weight_success')
detail.value = { detail.value = {
id: -1, id: -1,
podJomallOrderUsId: -1, podJomallOrderCnId: -1,
imgList: [] as cardImages[], imgList: [] as cardImages[],
} }
TrackingNumber.value = '' TrackingNumber.value = ''
...@@ -379,7 +379,7 @@ const setData = async (orderNumber: string) => { ...@@ -379,7 +379,7 @@ const setData = async (orderNumber: string) => {
console.error(e) console.error(e)
detail.value = { detail.value = {
id: -1, id: -1,
podJomallOrderUsId: -1, podJomallOrderCnId: -1,
imgList: [] as cardImages[], imgList: [] as cardImages[],
} }
trackingNumberRef.value && trackingNumberRef.value.focus() trackingNumberRef.value && trackingNumberRef.value.focus()
...@@ -462,7 +462,7 @@ const trackCodeInput = async () => { ...@@ -462,7 +462,7 @@ const trackCodeInput = async () => {
orderNumber: TrackingNumber.value, orderNumber: TrackingNumber.value,
finished: false, finished: false,
}) })
localStorage.setItem('historyUsData', JSON.stringify(historyData.value)) localStorage.setItem('historyCnData', JSON.stringify(historyData.value))
} }
const orderNumber = TrackingNumber.value const orderNumber = TrackingNumber.value
......
...@@ -301,13 +301,8 @@ ...@@ -301,13 +301,8 @@
确认生产 确认生产
</ElButton> </ElButton>
</span> </span>
<span v-if="status === 'EXCEPTION_ORDER'" class="item">
<ElButton type="success" @click="updateOrder">
转至待确认
</ElButton>
</span>
<span <span
v-if="status === 'EXCEPTION_ORDER' && exceptionStatus === 3" v-if="status === 'CREATE_LOGISTICS'"
class="item" class="item"
> >
<ElButton type="warning" @click="asyncOrderAddress"> <ElButton type="warning" @click="asyncOrderAddress">
...@@ -315,20 +310,6 @@ ...@@ -315,20 +310,6 @@
</ElButton> </ElButton>
</span> </span>
<span <span
v-if="status === 'EXCEPTION_ORDER' && exceptionStatus === 1"
class="item"
>
<ElButton type="warning" @click="assignOrder"> 分派 </ElButton>
</span>
<!-- <span
v-if="status === 'EXCEPTION_ORDER' && exceptionStatus === 2"
class="item"
>
<ElButton type="warning" @click="handleExceptionOrder">
处理异常
</ElButton>
</span> -->
<span
v-if="status === 'PICKING' || status === 'TO_BE_REPLENISHMENT'" v-if="status === 'PICKING' || status === 'TO_BE_REPLENISHMENT'"
class="item" class="item"
> >
...@@ -354,23 +335,13 @@ ...@@ -354,23 +335,13 @@
<span v-if="status === 'PICKING'" class="item"> <span v-if="status === 'PICKING'" class="item">
<ElButton type="success" @click="toOutOfStock"> 转至缺货 </ElButton> <ElButton type="success" @click="toOutOfStock"> 转至缺货 </ElButton>
</span> </span>
<!-- <span v-if="status === 'TO_BE_CONFIRMED'" class="item">
<ElButton type="warning" @click="changeExceptionOrder">
转为异常单
</ElButton>
</span> -->
<span <span
v-if="status === 'TO_BE_CONFIRMED' || status === 'EXCEPTION_ORDER'" v-if="status === 'TO_BE_CONFIRMED'"
class="item" class="item"
> >
<ElButton type="danger" @click="cancelOrder">取消</ElButton> <ElButton type="danger" @click="cancelOrder">取消</ElButton>
</span> </span>
<!-- <span v-if="status !== 'IN_PRODUCTION'" class="item">
<ElButton type="success" @click="handleUpdateRemark">
添加内部标签
</ElButton>
</span> -->
<span v-if="status === 'IN_PRODUCTION'" class="item"> <span v-if="status === 'IN_PRODUCTION'" class="item">
<ElButton type="warning" @click="onFastProduction"> <ElButton type="warning" @click="onFastProduction">
快捷生产 快捷生产
...@@ -404,7 +375,20 @@ ...@@ -404,7 +375,20 @@
<el-button type="success"> <el-button type="success">
物流接口<el-icon class="el-icon--right"><ArrowDown /></el-icon> 物流接口<el-icon class="el-icon--right"><ArrowDown /></el-icon>
</el-button> </el-button>
<template #dropdown> <template #dropdown v-if="shipmentArea === 0">
<ElDropdownMenu>
<ElDropdownItem
:disabled="
selection.length === 0 ||
selection.some((item) => item.shipmentType !== 1)
"
@click=""
>待定</ElDropdownItem
>
</ElDropdownMenu>
</template>
<template #dropdown v-if="shipmentArea === 1">
<ElDropdownMenu> <ElDropdownMenu>
<ElDropdownItem <ElDropdownItem
:disabled=" :disabled="
...@@ -438,14 +422,6 @@ ...@@ -438,14 +422,6 @@
@click="getOrderByIdApi('cancelLogisticsOrder')" @click="getOrderByIdApi('cancelLogisticsOrder')"
>取消物流订单</ElDropdownItem >取消物流订单</ElDropdownItem
> >
<!-- <ElDropdownItem
:disabled="
selection.length === 0 ||
selection.some((item) => item.shipmentType !== 1)
"
@click="getOrderByIdApi('batchChangeLogistics')"
>更换物流</ElDropdownItem
> -->
</ElDropdownMenu> </ElDropdownMenu>
</template> </template>
</ElDropdown> </ElDropdown>
...@@ -471,7 +447,6 @@ ...@@ -471,7 +447,6 @@
status === 'TO_BE_CONFIRMED' || status === 'TO_BE_CONFIRMED' ||
status === 'PICKING' || status === 'PICKING' ||
status === 'STOCK_OUT' || status === 'STOCK_OUT' ||
status === 'EXCEPTION_ORDER' ||
status === 'TO_BE_REPLENISHMENT' || status === 'TO_BE_REPLENISHMENT' ||
status === 'IN_PRODUCTION' status === 'IN_PRODUCTION'
" "
...@@ -503,72 +478,30 @@ ...@@ -503,72 +478,30 @@
> >
<span class="tabs-node_label">{{ item.statusName }}</span> <span class="tabs-node_label">{{ item.statusName }}</span>
<span <span
v-if="item.quantity"
class="tabs-node_count" class="tabs-node_count"
:class="{ :class="{
blue: item.quantity && item.quantity > 0, blue: true
red: item.status === 'EXCEPTION_ORDER',
}" }"
>{{ item.quantity }}</span >{{ item.quantity && item.quantity > 0 ? item.quantity : 0 }}</span
> >
</div> </div>
<!-- <div
v-if="item.status === 'EXCEPTION_ORDER'"
:key="item.status"
class="tabs-node"
>
<el-dropdown @command="handleExceptionCommand">
<div>
<span
class="tabs-node_label"
style="color: #000; font-weight: 500"
>
异常单
</span>
<span
class="tabs-node_count"
:class="{
blue: item.quantity && item.quantity > 0,
red: item.status === 'EXCEPTION_ORDER',
}"
>{{ item.quantity }}</span
>
<el-icon class="el-icon--right"><arrow-down /></el-icon>
</div>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item command="1">待分派</el-dropdown-item>
<el-dropdown-item command="2">待处理</el-dropdown-item>
<el-dropdown-item command="3">已处理</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
</div> -->
</div> </div>
</div> </div>
<div class="order-content flex-1 flex-column overflow-hidden mt-10"> <div class="order-content flex-1 flex-column overflow-hidden mt-10">
<div v-if="status === 'EXCEPTION_ORDER'" class="sub-status mb-10"> <div v-if="status === 'CREATE_LOGISTICS'" class="sub-status mb-10">
<div
class="sub-status-item"
:class="exceptionStatus === 1 ? 'sub-active' : ''"
@click="handleExceptionCommand(1)"
>
<span class="sub-status-item-label">待分派</span>
</div>
<div <div
class="sub-status-item" class="sub-status-item"
:class="exceptionStatus === 2 ? 'sub-active' : ''" :class="shipmentArea === 0 ? 'sub-active' : ''"
@click="handleExceptionCommand(2)" @click="handleShipmentAreaCommand(0)"
> >
<span class="sub-status-item-label">待处理</span> <span class="sub-status-item-label">国内</span>
</div> </div>
<div <div
class="sub-status-item" class="sub-status-item"
:class="exceptionStatus === 3 ? 'sub-active' : ''" :class="shipmentArea === 1 ? 'sub-active' : ''"
@click="handleExceptionCommand(3)" @click="handleShipmentAreaCommand(1)"
> >
<span class="sub-status-item-label">待同步</span> <span class="sub-status-item-label">国外</span>
</div> </div>
</div> </div>
<div <div
...@@ -590,7 +523,6 @@ ...@@ -590,7 +523,6 @@
:selectionable="true" :selectionable="true"
:paginated-data="tableData" :paginated-data="tableData"
:cell-style="onCellStyle" :cell-style="onCellStyle"
:cell-class-name="onCellClassName"
:row-style="getRowStyle" :row-style="getRowStyle"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
...@@ -752,31 +684,30 @@ ...@@ -752,31 +684,30 @@
<div class="goods-item-info-item"> <div class="goods-item-info-item">
<span class="goods-item-info-item-label">价格:</span> <span class="goods-item-info-item-label">价格:</span>
<span class="goods-item-info-item-value"> <span class="goods-item-info-item-value">
{{ item.productPrice }}($) {{ item.productPrice }}()
</span> </span>
</div> </div>
<div class="goods-item-info-item"> <div class="goods-item-info-item">
<span class="goods-item-info-item-label">模板金额:</span> <span class="goods-item-info-item-label">模板金额:</span>
<span class="goods-item-info-item-value"> <span class="goods-item-info-item-value">
{{ item.templatePrice }}($) {{ item.templatePrice }}()
</span> </span>
</div> </div>
<div class="goods-item-info-item"> <div class="goods-item-info-item">
<span class="goods-item-info-item-label">工艺金额:</span> <span class="goods-item-info-item-label">工艺金额:</span>
<span class="goods-item-info-item-value"> <span class="goods-item-info-item-value">
{{ item.craftPrice }}($) {{ item.craftPrice }}()
</span> </span>
</div> </div>
<div class="goods-item-info-item"> <div class="goods-item-info-item">
<span class="goods-item-info-item-label">付款金额:</span> <span class="goods-item-info-item-label">付款金额:</span>
<span class="goods-item-info-item-value"> <span class="goods-item-info-item-value">
{{ item.payAmount }}($) {{ item.payAmount }}()
</span> </span>
</div> </div>
<div class="goods-item-info-item"> <div class="goods-item-info-item">
<span class="goods-item-info-item-label">{{ <span class="goods-item-info-item-label">{{
status === 'EXCEPTION_ORDER' ||
status === 'PICKING' || status === 'PICKING' ||
status === 'TO_BE_CONFIRMED' || status === 'TO_BE_CONFIRMED' ||
status === 'STOCK_OUT' || status === 'STOCK_OUT' ||
...@@ -786,7 +717,6 @@ ...@@ -786,7 +717,6 @@
}}</span> }}</span>
<span class="goods-item-info-item-value"> <span class="goods-item-info-item-value">
{{ {{
status === 'EXCEPTION_ORDER' ||
status === 'PICKING' || status === 'PICKING' ||
status === 'TO_BE_CONFIRMED' || status === 'TO_BE_CONFIRMED' ||
status === 'STOCK_OUT' || status === 'STOCK_OUT' ||
...@@ -983,20 +913,19 @@ ...@@ -983,20 +913,19 @@
<div class="order-price-item"> <div class="order-price-item">
<span class="order-price-item-label">商品总价:</span> <span class="order-price-item-label">商品总价:</span>
<span class="order-price-item-value"> <span class="order-price-item-value">
{{ row.totalAmount }}($) {{ row.totalAmount }}()
</span> </span>
</div> </div>
<div <div
v-if=" v-if="
row.status !== 'TO_BE_CONFIRMED' && row.status !== 'TO_BE_CONFIRMED'
row.status !== 'EXCEPTION_ORDER'
" "
class="order-price-item" class="order-price-item"
> >
<span class="order-price-item-label">物流运费:</span> <span class="order-price-item-label">物流运费:</span>
<span class="order-price-item-value"> <span class="order-price-item-value">
{{ row.payFreight }}($) {{ row.payFreight }}()
</span> </span>
</div> </div>
</div> </div>
...@@ -1041,9 +970,6 @@ ...@@ -1041,9 +970,6 @@
</div> </div>
</div> --> </div> -->
</template> </template>
<template #exceptionReason="{ row }">
<div style="white-space: pre-line">{{ row.exceptionReason }}</div>
</template>
<template #innerLabel="{ row }"> <template #innerLabel="{ row }">
<div v-if="row.internalMemoList" class="inner-label-box"> <div v-if="row.internalMemoList" class="inner-label-box">
<div <div
...@@ -1167,18 +1093,6 @@ ...@@ -1167,18 +1093,6 @@
</span> </span>
<span <span
v-if=" v-if="
(status === 'WAIT_SHIPMENT' ||
status === 'CREATE_LOGISTICS') &&
row.shipmentType === 1
"
class="operate-item"
>
<ElButton link type="primary" @click="handleStockOut(row)">
更换物流
</ElButton>
</span>
<span
v-if="
row.shipmentType === 0 && row.shipmentType === 0 &&
['CREATE_LOGISTICS', 'WAIT_SHIPMENT'].includes(status) ['CREATE_LOGISTICS', 'WAIT_SHIPMENT'].includes(status)
" "
...@@ -1270,7 +1184,7 @@ ...@@ -1270,7 +1184,7 @@
</div> </div>
<Icon <Icon
name="caozuorizhi" name="caozuorizhi"
@click="(e: MouseEvent) => operationLog(cardItem.podJomallOrderUsId, e)" @click="(e: MouseEvent) => operationLog(cardItem.podJomallOrderCnId, e)"
style="width: 28px; height: 28px" style="width: 28px; height: 28px"
> >
<template #title> <template #title>
...@@ -1676,70 +1590,6 @@ ...@@ -1676,70 +1590,6 @@
:list="resultInfo" :list="resultInfo"
@confirm="resultConfirm" @confirm="resultConfirm"
></ResultInfo> ></ResultInfo>
<el-dialog
v-model="isChangeWay"
:close-on-click-modal="false"
:title="wayDialogTitle"
>
<el-table
ref="changeWayRef"
v-loading="isChangeWayLoading"
height="400px"
class="production-client-table"
:data="logisticsWayData"
border
highlight-current-row
@row-click="(v:LogisticsData) =>rowClick(v, wayDialogTitle)"
>
<el-table-column
label="序号"
width="60"
align="center"
type="index"
></el-table-column>
<el-table-column
label="物流名称"
align="center"
prop="logisticsWayName"
></el-table-column>
<el-table-column
label="发货仓库"
align="center"
prop="warehouseName"
></el-table-column>
<el-table-column
label="物流编码"
align="center"
prop="logisticsWayCode"
></el-table-column>
<el-table-column
label="所在分区"
align="center"
prop="partition"
></el-table-column>
<el-table-column label="状态" align="center">
<template #default="{ row }">
<b v-if="row.status" style="color: green">成功</b>
<b v-else-if="!row.status" style="color: red">失败</b>
</template>
</el-table-column>
<el-table-column label="预计运费($)" align="center" prop="payFreight">
</el-table-column>
</el-table>
<template #footer>
<el-button :disabled="isChangeWayLoading" @click="cancelWayDialog">
取消
</el-button>
<el-button
:loading="isChangeWayLoading"
type="primary"
@click="changeWaySubmit(wayDialogTitle)"
>
确定
</el-button>
</template>
</el-dialog>
<UpdateAddress <UpdateAddress
v-if="updateAddVisible" v-if="updateAddVisible"
v-model:form="currentRow" v-model:form="currentRow"
...@@ -1747,115 +1597,7 @@ ...@@ -1747,115 +1597,7 @@
:country-list="countryList" :country-list="countryList"
@success="search" @success="search"
></UpdateAddress> ></UpdateAddress>
<ElDialog
v-model="exceptionDialogVisible"
title="转为异常单"
width="500px"
:close-on-click-modal="false"
@open="handleExceptionDialogOpen"
>
<ElForm ref="exceptionFormRef" :model="exceptionForm" label-width="100px">
<ElFormItem
label="异常类型"
prop="exceptionType"
:rules="
status === 'EXCEPTION_ORDER'
? { required: true, message: '请选择异常类型' }
: {}
"
>
<ElSelect
v-model="exceptionForm.exceptionType"
style="width: 100%"
placeholder="请选择异常类型"
clearable
>
<ElOption
v-for="type in exceptionTypes"
:key="type.value"
:label="type.label"
:value="type.value"
/>
</ElSelect>
</ElFormItem>
<ElFormItem
label="异常原因"
prop="exceptionReason"
:rules="
status !== 'EXCEPTION_ORDER'
? { required: true, message: '请输入异常原因' }
: {}
"
>
<ElInput
v-model="exceptionForm.exceptionReason"
style="width: 100%"
type="textarea"
:rows="3"
placeholder="请输入异常原因"
/>
</ElFormItem>
</ElForm>
<template #footer>
<span class="dialog-footer">
<ElButton @click="exceptionDialogVisible = false">取消</ElButton>
<ElButton type="primary" @click="handleExceptionConfirm">
确定
</ElButton>
</span>
</template>
</ElDialog>
<el-dialog
v-model="logisticsVisible"
:close-on-click-modal="false"
width="700px"
title="更新物流信息"
>
<el-form
v-if="logisticsVisible"
ref="logisticsFormRef"
label-width="100px"
label-position="left"
:model="logisticsForm"
>
<el-form-item prop="processNumber" label="物流处理号">
<el-input
v-model="logisticsForm.processNumber"
placeholder="请输入物流处理号"
clearable
></el-input>
</el-form-item>
<el-form-item prop="trackingNumber" label="物流跟踪号">
<el-input
v-model="logisticsForm.trackingNumber"
placeholder="请输入物流跟踪号"
clearable
></el-input>
</el-form-item>
<el-form-item
v-if="logisticsForm.trackingNumber"
prop="expressSheetUrl"
label="物流面单"
>
<el-upload accept=".pdf" action="" :before-upload="expressSheetUpload">
<el-button type="primary">点击上传</el-button>
</el-upload>
<div v-if="logisticsForm.expressSheet" class="file">
<span>{{ logisticsForm.expressSheet.name }}</span>
<el-icon
class="expressSheetClose"
@click="logisticsForm.expressSheet = null"
>
<Close></Close>
</el-icon>
</div>
</el-form-item>
</el-form>
<template #footer>
<el-button @click="logisticsVisible = false">取消</el-button>
<el-button type="primary" @click="logisticsSubmit"> 确定</el-button>
</template>
</el-dialog>
<!-- 导出 --> <!-- 导出 -->
<ElDialog <ElDialog
v-model="exportVisible" v-model="exportVisible"
...@@ -1887,11 +1629,9 @@ ...@@ -1887,11 +1629,9 @@
import { getUserMarkList } from '@/api/common' import { getUserMarkList } from '@/api/common'
// import { AnyObject } from '@/types/api/warehouse' // import { AnyObject } from '@/types/api/warehouse'
import { import {
ArrowDown,
CaretBottom, CaretBottom,
CaretTop, CaretTop,
// Edit, // Edit,
Close,
WarningFilled, WarningFilled,
} from '@element-plus/icons-vue' } from '@element-plus/icons-vue'
import { import {
...@@ -1899,15 +1639,12 @@ import { ...@@ -1899,15 +1639,12 @@ import {
getOrderList, getOrderList,
getOrderTabData, getOrderTabData,
confirmOrderApi, confirmOrderApi,
changeExceptionOrderApi,
cancelOrderApi, cancelOrderApi,
getOperationLogApi, getOperationLogApi,
downloadMaterialApi, downloadMaterialApi,
updateExceptionOrderApi,
printProductionOrderApi, printProductionOrderApi,
getOrderDetailById, getOrderDetailById,
updateRemarkApi, updateRemarkApi,
getProductionClientApi,
printPickingOrderApi, printPickingOrderApi,
printPrintOrderApi, printPrintOrderApi,
stockOutCheckApi, stockOutCheckApi,
...@@ -1915,22 +1652,11 @@ import { ...@@ -1915,22 +1652,11 @@ import {
loadWarehouseListApi, loadWarehouseListApi,
getLogisticsCalculation, getLogisticsCalculation,
refreshMaterialApi, refreshMaterialApi,
getTrackingNumberApi,
getfaceSimplexFileApi,
cancelLogisticsOrderApi,
composingDesignImages, composingDesignImages,
changeLogisticsApi,
createLogisticsOrderApi,
// updateLogisticsToPickingApi,
updateLogisticsToArrangeApi, updateLogisticsToArrangeApi,
createLogisticsOrdersApi,
syncReceiverAddress, syncReceiverAddress,
refreshAddressApi, refreshAddressApi,
confirmProductApi, confirmProductApi,
confirmProductToRiinApi,
updateSelfLogistics,
uploadExpressSheet,
// handleExceptionOrderApi,
applyForReplenishmentApi, applyForReplenishmentApi,
replenishmentSuccessApi, replenishmentSuccessApi,
toOutOfStockApi, toOutOfStockApi,
...@@ -1941,8 +1667,14 @@ import { ...@@ -1941,8 +1667,14 @@ import {
batchDownloadDeleteApi, batchDownloadDeleteApi,
batchDownloadRecomposingApi, batchDownloadRecomposingApi,
updateToWaitShipmentApi, updateToWaitShipmentApi,
exportPodUSInfo, exportPodCnInfo,
} from '@/api/podUsOrder' createLogisticsOrdersApi,
getTrackingNumberApi,
getfaceSimplexFileApi,
cancelLogisticsOrderApi,
changeLogisticsApi,
} from '@/api/podCnOrder'
import { BaseRespData } from '@/types/api' import { BaseRespData } from '@/types/api'
import UpdateAddress from './components/updateAddress.vue' import UpdateAddress from './components/updateAddress.vue'
...@@ -1952,7 +1684,7 @@ import { getAllCountryApi } from '@/api/logistics.ts' ...@@ -1952,7 +1684,7 @@ import { getAllCountryApi } from '@/api/logistics.ts'
import TableView from '@/components/TableView.vue' import TableView from '@/components/TableView.vue'
import { import {
LogListData, LogListData,
PodUsOrderListData, PodCnOrderListData,
ProductList, ProductList,
ProductionClient, ProductionClient,
SearchForm, SearchForm,
...@@ -1964,7 +1696,7 @@ import { ...@@ -1964,7 +1696,7 @@ import {
LogisticsFormData, LogisticsFormData,
CraftListData, CraftListData,
ExportParams, ExportParams,
} from '@/types/api/podUsOrder' } from '@/types/api/podCnOrder'
import usePageList from '@/utils/hooks/usePageList' import usePageList from '@/utils/hooks/usePageList'
import { useValue } from '@/utils/hooks/useValue' import { useValue } from '@/utils/hooks/useValue'
import { showConfirm } from '@/utils/ui' import { showConfirm } from '@/utils/ui'
...@@ -2034,11 +1766,11 @@ const submitExportForm = async () => { ...@@ -2034,11 +1766,11 @@ const submitExportForm = async () => {
idList: [], idList: [],
} }
// 使用函数封装映射逻辑 // 使用函数封装映射逻辑
const mapIds = (items: PodUsOrderListData[]) => const mapIds = (items: PodCnOrderListData[]) =>
items.map((el) => Number(el.id)) items.map((el) => Number(el.id))
switch (resourceType) { switch (resourceType) {
case 0: case 0:
params.idList = mapIds(tableData.value as PodUsOrderListData[]) params.idList = mapIds(tableData.value as PodCnOrderListData[])
break break
case 1: case 1:
params.idList = mapIds(selection.value) params.idList = mapIds(selection.value)
...@@ -2051,7 +1783,7 @@ const submitExportForm = async () => { ...@@ -2051,7 +1783,7 @@ const submitExportForm = async () => {
console.error('未知的资源类型:', resourceType) console.error('未知的资源类型:', resourceType)
} }
try { try {
const res = await exportPodUSInfo({ const res = await exportPodCnInfo({
...params, ...params,
...(resourceType === 2 ? searchForm.value : {}), ...(resourceType === 2 ? searchForm.value : {}),
}) })
...@@ -2066,7 +1798,6 @@ const submitExportForm = async () => { ...@@ -2066,7 +1798,6 @@ const submitExportForm = async () => {
const updateAddVisible = ref(false) const updateAddVisible = ref(false)
const initPageSize = ref(50) const initPageSize = ref(50)
const logisticsVisible = ref(false) const logisticsVisible = ref(false)
const logisticsFormRef = ref()
const logistics = { const logistics = {
processNumber: '', processNumber: '',
trackingNumber: '', trackingNumber: '',
...@@ -2078,13 +1809,11 @@ const resultRefs = ref<InstanceType<typeof ResultInfo> | null>(null) ...@@ -2078,13 +1809,11 @@ const resultRefs = ref<InstanceType<typeof ResultInfo> | null>(null)
const confirmDialogShow = ref(false) const confirmDialogShow = ref(false)
const tifDownloadLoading = ref(false) const tifDownloadLoading = ref(false)
const pngDownloadLoading = ref(false) const pngDownloadLoading = ref(false)
const isChangeWay = ref(false)
const confirmData = ref([]) const confirmData = ref([])
const logisticsWayData = ref([])
const searchVisible = ref(false) const searchVisible = ref(false)
const confirmSelectionData = ref<LogisticsData[]>([]) const confirmSelectionData = ref<LogisticsData[]>([])
const confirmRowData = ref<ProductList | null>(null) const confirmRowData = ref<ProductList | null>(null)
const status = ref(localStorage.getItem('podUsStatus') || 'TO_BE_CONFIRMED') const status = ref(localStorage.getItem('podCnStatus') || 'TO_BE_CONFIRMED')
const detailData = ref({}) const detailData = ref({})
const [searchForm, resetSearchForm] = useValue<SearchForm>({ const [searchForm, resetSearchForm] = useValue<SearchForm>({
...@@ -2102,7 +1831,7 @@ const [searchForm, resetSearchForm] = useValue<SearchForm>({ ...@@ -2102,7 +1831,7 @@ const [searchForm, resetSearchForm] = useValue<SearchForm>({
multi: null, multi: null,
startTime: null, startTime: null,
endTime: null, endTime: null,
exceptionHandling: undefined, shipmentArea: undefined,
platform: '', platform: '',
productionClient: '', productionClient: '',
warehouseId: '', warehouseId: '',
...@@ -2112,9 +1841,9 @@ const [searchForm, resetSearchForm] = useValue<SearchForm>({ ...@@ -2112,9 +1841,9 @@ const [searchForm, resetSearchForm] = useValue<SearchForm>({
craftCode: '', craftCode: '',
thirdStockSku: '', thirdStockSku: '',
}) })
const exceptionStatus = ref(1) const shipmentArea = ref(0)
const userMarkList = ref<string[]>([]) const userMarkList = ref<string[]>([])
const selection = ref<PodUsOrderListData[]>([]) const selection = ref<PodCnOrderListData[]>([])
const pickerOptions = { const pickerOptions = {
shortcuts: [ shortcuts: [
{ {
...@@ -2184,7 +1913,7 @@ const getWeekRange = (weeks = 0, type: 'past' | 'future' = 'past') => { ...@@ -2184,7 +1913,7 @@ const getWeekRange = (weeks = 0, type: 'past' | 'future' = 'past') => {
type === 'past' ? now.subtract(weeks, 'week') : now.add(weeks, 'week') type === 'past' ? now.subtract(weeks, 'week') : now.add(weeks, 'week')
return [start.startOf('week').toDate(), start.endOf('week').toDate()] return [start.startOf('week').toDate(), start.endOf('week').toDate()]
} }
const handleRefreshAddress = async (row: PodUsOrderListData) => { const handleRefreshAddress = async (row: PodCnOrderListData) => {
try { try {
await showConfirm('确定刷新地址吗?', { await showConfirm('确定刷新地址吗?', {
confirmButtonText: '确认', confirmButtonText: '确认',
...@@ -2206,14 +1935,14 @@ const handleRefreshAddress = async (row: PodUsOrderListData) => { ...@@ -2206,14 +1935,14 @@ const handleRefreshAddress = async (row: PodUsOrderListData) => {
}, },
) )
} }
const handleUpdateAddress = async (row: PodUsOrderListData) => { const handleUpdateAddress = async (row: PodCnOrderListData) => {
const { data } = await getAllCountryApi() const { data } = await getAllCountryApi()
countryList.value = data countryList.value = data
currentRow.value = JSON.parse(JSON.stringify(row)) currentRow.value = JSON.parse(JSON.stringify(row))
updateAddVisible.value = true updateAddVisible.value = true
} }
// 批量下载 下载 // 批量下载 下载
const handleDownload = async (row: PodUsOrderListData, type: string) => { const handleDownload = async (row: PodCnOrderListData, type: string) => {
try { try {
await showConfirm('确定下载吗?', { await showConfirm('确定下载吗?', {
confirmButtonText: '确认', confirmButtonText: '确认',
...@@ -2261,7 +1990,7 @@ const handleDownload = async (row: PodUsOrderListData, type: string) => { ...@@ -2261,7 +1990,7 @@ const handleDownload = async (row: PodUsOrderListData, type: string) => {
} }
} }
// 批量下载 删除 // 批量下载 删除
const handleBatchDelete = async (row: PodUsOrderListData) => { const handleBatchDelete = async (row: PodCnOrderListData) => {
try { try {
await showConfirm('确定删除吗?', { await showConfirm('确定删除吗?', {
confirmButtonText: '确认', confirmButtonText: '确认',
...@@ -2288,7 +2017,7 @@ const handleBatchDelete = async (row: PodUsOrderListData) => { ...@@ -2288,7 +2017,7 @@ const handleBatchDelete = async (row: PodUsOrderListData) => {
} }
} }
// 批量下载 重新排版 // 批量下载 重新排版
const handleReComposingDesign = async (row: PodUsOrderListData) => { const handleReComposingDesign = async (row: PodCnOrderListData) => {
try { try {
await showConfirm('确定重新排版吗?', { await showConfirm('确定重新排版吗?', {
confirmButtonText: '确认', confirmButtonText: '确认',
...@@ -2411,19 +2140,6 @@ const tableColumns = computed(() => { ...@@ -2411,19 +2140,6 @@ const tableColumns = computed(() => {
prop: 'time', prop: 'time',
align: 'left', align: 'left',
}, },
// {
// label: '内部便签',
// slot: 'innerLabel',
// width: 300,
// prop: 'innerLabel',
// },
{
label: '异常原因',
width: 300,
prop: 'exceptionReason',
slot: 'exceptionReason',
align: 'left',
},
{ {
label: '操作', label: '操作',
slot: 'operate', slot: 'operate',
...@@ -2441,8 +2157,21 @@ const rightClick = (e: MouseEvent) => { ...@@ -2441,8 +2157,21 @@ const rightClick = (e: MouseEvent) => {
y: e.clientY, y: e.clientY,
}) })
} }
//展示返回结果
const resultInfo = ref<
{
id: string | number
status: boolean
factoryOrderNumber?: string
message: string
}[]
>([])
const resultConfirm = () => {
search()
loadTabData()
}
const handleSelectionChange = (val: PodUsOrderListData[]) => { const handleSelectionChange = (val: PodCnOrderListData[]) => {
selection.value = val selection.value = val
// 当清空选择时,清除补货校验成功的状态 // 当清空选择时,清除补货校验成功的状态
if (val.length === 0) { if (val.length === 0) {
...@@ -2489,7 +2218,7 @@ const asyncOrderAddress = async () => { ...@@ -2489,7 +2218,7 @@ const asyncOrderAddress = async () => {
const changeTab = (item: Tab) => { const changeTab = (item: Tab) => {
status.value = item.status || '' status.value = item.status || ''
localStorage.setItem('podUsStatus', item.status as string) localStorage.setItem('podCnStatus', item.status as string)
selection.value = [] selection.value = []
cardSelection.value = [] cardSelection.value = []
stockOutSuccessIds.value = [] stockOutSuccessIds.value = []
...@@ -2501,24 +2230,15 @@ const onCellStyle = ({ column }: { column: Column }) => { ...@@ -2501,24 +2230,15 @@ const onCellStyle = ({ column }: { column: Column }) => {
column.property === 'price' || column.property === 'price' ||
column.property === 'time' || column.property === 'time' ||
column.property === 'innerLabel' || column.property === 'innerLabel' ||
column.property === 'goods' || column.property === 'goods'
column.property === 'exceptionReason'
) { ) {
return { verticalAlign: 'top' } return { verticalAlign: 'top' }
} }
} }
const onCellClassName = ({ column }: { column: Column }) => {
if (column.property === 'exceptionReason') {
return 'exception-reason'
}
}
const loadTabData = async () => { const loadTabData = async () => {
try { try {
const res = await getOrderTabData() const res = await getOrderTabData()
tabsNav.value = res.data.filter( tabsNav.value = res.data
(el) =>
el.status !== 'EXCEPTION_ORDER' && el.status !== 'CREATE_LOGISTICS',
)
} catch (error) { } catch (error) {
// showError(error) // showError(error)
} }
...@@ -2567,9 +2287,9 @@ const { ...@@ -2567,9 +2287,9 @@ const {
? timeRange.value[1] ? timeRange.value[1]
: null, : null,
status: status.value, status: status.value,
exceptionHandling: shipmentArea:
status.value === 'EXCEPTION_ORDER' status.value === 'CREATE_LOGISTICS'
? exceptionStatus.value || undefined ? shipmentArea.value || undefined
: undefined, : undefined,
}, },
page, page,
...@@ -2661,49 +2381,6 @@ async function confirmProduct() { ...@@ -2661,49 +2381,6 @@ async function confirmProduct() {
} }
} }
//转至锐印
async function confirmProductToRiin() {
if (selection.value.length === 0) {
return ElMessage.warning('请选择数据')
}
try {
await showConfirm('确认转至锐印(Riin)生产吗?', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
})
const ids = selection.value.map((el) => el.id)
const { code, data } = await confirmProductToRiinApi([...ids])
if (code === 200) {
resultInfo.value = data || []
resultInfo.value =
(data as {
id: string | number
status: boolean
factoryOrderNumber?: string
message: string
}[]) || []
if (
Array.isArray(data) &&
(data as { status: boolean }[]).some((item) => !item.status)
) {
resultRefs.value?.showDialog()
} else {
search()
loadTabData()
}
}
ElMessage.success('操作成功')
// search()
// await loadTabData()
} catch {
resultInfo.value = []
return
}
}
const handleConfirm = async () => { const handleConfirm = async () => {
if (!productionClientValue.value) { if (!productionClientValue.value) {
return ElMessage.warning('请选择生产端') return ElMessage.warning('请选择生产端')
...@@ -2825,15 +2502,6 @@ const downloadTif = async (type: string) => { ...@@ -2825,15 +2502,6 @@ const downloadTif = async (type: string) => {
} }
} }
const loadProductionClient = async () => {
try {
const res = await getProductionClientApi()
if (res.code !== 200) return
productionClient.value = res.data
} catch (e) {
console.error(e)
}
}
const submitConfirm = async () => { const submitConfirm = async () => {
const ids = selection.value.map((item) => item.id) const ids = selection.value.map((item) => item.id)
const loading = ElLoading.service({ const loading = ElLoading.service({
...@@ -2858,75 +2526,6 @@ const submitConfirm = async () => { ...@@ -2858,75 +2526,6 @@ const submitConfirm = async () => {
loading.close() loading.close()
} }
} }
const updateOrder = async () => {
if (selection.value.length === 0) {
return ElMessage.warning('请选择数据')
}
try {
await showConfirm('确定转至待确认吗?', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
})
} catch {
return
}
const ids = selection.value.map((item) => item.id)
const loading = ElLoading.service({
fullscreen: true,
text: '操作中...',
background: 'rgba(0, 0, 0, 0.3)',
})
try {
const res = await updateExceptionOrderApi(ids)
if (res.code !== 200) return
ElMessage.success('操作成功')
search()
loadTabData()
} catch (e) {
console.error(e)
} finally {
loading.close()
}
}
const assignOrder = async () => {
if (selection.value.length === 0) {
return ElMessage.warning('请选择数据')
}
currentOrderIds.value = selection.value.map((item) => item.id)
exceptionDialogVisible.value = true
}
// const handleExceptionOrder = async () => {
// if (selection.value.length === 0) {
// return ElMessage.warning('请选择数据')
// }
// try {
// await showConfirm('确定处理异常吗?', {
// confirmButtonText: '确认',
// cancelButtonText: '取消',
// type: 'warning',
// })
// } catch {
// return
// }
// const orderIds = selection.value.map((item) => item.id)
// const loading = ElLoading.service({
// fullscreen: true,
// text: '操作中...',
// background: 'rgba(0, 0, 0, 0.3)',
// })
// try {
// const res = await handleExceptionOrderApi(orderIds)
// if (res.code !== 200) return
// ElMessage.success('操作成功')
// search()
// loadTabData()
// } catch (e) {
// console.error(e)
// } finally {
// loading.close()
// }
// }
const printProductionOrder = async () => { const printProductionOrder = async () => {
if (cardSelection.value.length === 0) { if (cardSelection.value.length === 0) {
return ElMessage.warning('请选择数据') return ElMessage.warning('请选择数据')
...@@ -3005,7 +2604,7 @@ const toOutOfStock = async () => { ...@@ -3005,7 +2604,7 @@ const toOutOfStock = async () => {
if (cardSelection.value.length === 0) { if (cardSelection.value.length === 0) {
return ElMessage.warning('请选择数据') return ElMessage.warning('请选择数据')
} }
const orderIds = cardSelection.value.map((item) => item.podJomallOrderUsId) const orderIds = cardSelection.value.map((item) => item.podJomallOrderCnId)
try { try {
await ElMessageBox.confirm('确定转至缺货吗?', '提示', { await ElMessageBox.confirm('确定转至缺货吗?', '提示', {
cancelButtonText: '取消', cancelButtonText: '取消',
...@@ -3032,67 +2631,12 @@ const toOutOfStock = async () => { ...@@ -3032,67 +2631,12 @@ const toOutOfStock = async () => {
loading.close() loading.close()
} }
} }
const exceptionTypes = [
{ value: '1', label: '客户' },
{ value: '2', label: '工厂' },
]
const exceptionDialogVisible = ref(false)
const currentOrderIds = ref<number[]>([])
const exceptionForm = ref({
exceptionType: '',
exceptionReason: '',
})
const exceptionFormRef = ref()
const changeExceptionOrder = async () => {
if (selection.value.length === 0) {
return ElMessage.warning('请选择数据')
}
currentOrderIds.value = selection.value.map((item) => item.id)
exceptionDialogVisible.value = true
}
const inputBlur = () => { const inputBlur = () => {
if (!pageSize.value || Number(pageSize.value) <= 0) { if (!pageSize.value || Number(pageSize.value) <= 0) {
pageSize.value = initPageSize.value pageSize.value = initPageSize.value
} }
search() search()
} }
const handleExceptionConfirm = async () => {
try {
await exceptionFormRef.value.validate()
} catch {
return
}
const loading = ElLoading.service({
fullscreen: true,
text: '操作中...',
background: 'rgba(0, 0, 0, 0.3)',
})
const url =
status.value === 'EXCEPTION_ORDER'
? 'factory/podJomallOrderUs/distributionExceptionOrders'
: 'factory/podJomallOrderUs/exceptionOrders'
try {
const res = await changeExceptionOrderApi(
url,
currentOrderIds.value,
exceptionForm.value.exceptionType,
exceptionForm.value.exceptionReason,
)
if (res.code !== 200) return
ElMessage.success('操作成功')
search()
loadTabData()
exceptionDialogVisible.value = false
} catch (e) {
console.error(e)
} finally {
loading.close()
}
}
const handleExceptionDialogOpen = () => {
exceptionFormRef.value.resetFields()
}
const cancelOrder = async () => { const cancelOrder = async () => {
if (selection.value.length === 0) { if (selection.value.length === 0) {
return ElMessage.warning('请选择数据') return ElMessage.warning('请选择数据')
...@@ -3159,13 +2703,13 @@ const rightChange = async (code: string) => { ...@@ -3159,13 +2703,13 @@ const rightChange = async (code: string) => {
cardSelection.value = [] cardSelection.value = []
} }
} else if (code === 'copy_shopNumber') { } else if (code === 'copy_shopNumber') {
const str = (tableData.value as ProductList[] | PodUsOrderListData[]) const str = (tableData.value as ProductList[] | PodCnOrderListData[])
.map((item) => item?.shopNumber) .map((item) => item?.shopNumber)
.join() .join()
navigator.clipboard.writeText(str) navigator.clipboard.writeText(str)
ElMessage.success('复制成功') ElMessage.success('复制成功')
} else if (code === 'order-number') { } else if (code === 'order-number') {
const str = (tableData.value as ProductList[] | PodUsOrderListData[]) const str = (tableData.value as ProductList[] | PodCnOrderListData[])
.map((item) => item?.factoryOrderNumber) .map((item) => item?.factoryOrderNumber)
.join() .join()
navigator.clipboard.writeText(str) navigator.clipboard.writeText(str)
...@@ -3197,7 +2741,7 @@ const downloadMaterial = async () => { ...@@ -3197,7 +2741,7 @@ const downloadMaterial = async () => {
.map((item: ProductList) => item.id) .map((item: ProductList) => item.id)
.filter((id): id is number => id !== undefined) .filter((id): id is number => id !== undefined)
} else { } else {
selectedIds = (selection.value as PodUsOrderListData[]) selectedIds = (selection.value as PodCnOrderListData[])
.map((item) => item?.productList) .map((item) => item?.productList)
.flat() .flat()
.map((item) => item?.id) .map((item) => item?.id)
...@@ -3294,6 +2838,7 @@ const printPodOrder = async () => { ...@@ -3294,6 +2838,7 @@ const printPodOrder = async () => {
podOrderVisible.value = true podOrderVisible.value = true
} }
/** /**
* @description: 创建物流、获取跟踪号、获取打印面单、更改物流、取消物流订单 * @description: 创建物流、获取跟踪号、获取打印面单、更改物流、取消物流订单
*/ */
...@@ -3366,107 +2911,6 @@ const getOrderByIdApi = async (type: string) => { ...@@ -3366,107 +2911,6 @@ const getOrderByIdApi = async (type: string) => {
ElMessage.warning('未知操作类型') ElMessage.warning('未知操作类型')
} }
} }
const handleStockOut = async (row: PodUsOrderListData) => {
wayDialogTitle.value = `切换物流(当前物流方式:${row.logisticsWayName})`
isChangeWay.value = true
try {
const { data } = await getLogisticsCalculation(row.id as number)
logisticsWayData.value = data
} catch (error) {
console.error(error)
}
}
//展示返回结果
const resultInfo = ref<
{
id: string | number
status: boolean
factoryOrderNumber?: string
message: string
}[]
>([])
const resultConfirm = () => {
search()
loadTabData()
}
/**
* @description: 更改物流方式
*/
const changeWayRow = ref<LogisticsData>({} as LogisticsData)
const isChangeWayLoading = ref(false)
const changeWayRef = ref()
const wayDialogTitle = ref('')
const rowClick = (row: LogisticsData, title?: string) => {
console.log(title, 'title')
try {
// if (title == '创建物流订单') {
// changeWayRow.value = row
// } else {
if (row.logisticsWayId === selection.value[0]?.logisticsWayId) {
ElMessage.warning('不能选择相同的物流方式')
changeWayRow.value = {} as LogisticsData
changeWayRef.value?.setCurrentRow()
return
}
changeWayRow.value = row
// }
} catch (error) {
console.log(error)
}
}
const cancelWayDialog = () => {
changeWayRow.value = {} as LogisticsData
changeWayRef.value?.setCurrentRow()
isChangeWay.value = false
}
//确认物流
const changeWaySubmit = async (title: string) => {
if (!changeWayRow.value?.logisticsWayId) {
return ElMessage.warning('请选择一条物流方式')
}
if (!changeWayRow.value.status) {
return ElMessage.warning('请选择状态为成功的物流方式')
}
let Fn
if (title !== '创建物流订单') {
if (
changeWayRow.value.logisticsWayId === selection.value[0]?.logisticsWayId
) {
return ElMessage.warning('更改的物流方式不能相同')
}
Fn = changeLogisticsApi
} else {
Fn = createLogisticsOrderApi
}
isChangeWayLoading.value = true
try {
const params = {
updateByIdParam: {
id: selection.value[0]?.id,
dataVersion: selection.value[0]?.version as number,
},
logisticsTrialCalculation: { ...changeWayRow.value },
}
await Fn(params)
isChangeWay.value = false
isChangeWayLoading.value = false
ElMessage.success('操作成功')
search()
loadTabData()
} catch (error) {
console.log(error)
} finally {
isChangeWayLoading.value = false
}
}
// 添加补货成功行的状态 // 添加补货成功行的状态
const stockOutSuccessIds = ref<number[]>([]) const stockOutSuccessIds = ref<number[]>([])
...@@ -3507,7 +2951,7 @@ const stockOutCheck = async () => { ...@@ -3507,7 +2951,7 @@ const stockOutCheck = async () => {
} }
const { success, others } = ( const { success, others } = (
tableData.value as PodUsOrderListData[] tableData.value as PodCnOrderListData[]
).reduce( ).reduce(
(acc, item) => { (acc, item) => {
successIds.includes(item.id) successIds.includes(item.id)
...@@ -3516,8 +2960,8 @@ const stockOutCheck = async () => { ...@@ -3516,8 +2960,8 @@ const stockOutCheck = async () => {
return acc return acc
}, },
{ {
success: [] as PodUsOrderListData[], success: [] as PodCnOrderListData[],
others: [] as PodUsOrderListData[], others: [] as PodCnOrderListData[],
}, },
) )
...@@ -3840,7 +3284,7 @@ const onFastRefresh = () => { ...@@ -3840,7 +3284,7 @@ const onFastRefresh = () => {
search() search()
} }
// // 修改行样式方法 // // 修改行样式方法
const getRowStyle = ({ row }: { row: PodUsOrderListData }) => { const getRowStyle = ({ row }: { row: PodCnOrderListData }) => {
if (stockOutSuccessIds.value.includes(row.id)) { if (stockOutSuccessIds.value.includes(row.id)) {
return { return {
backgroundColor: '#f0f9eb', backgroundColor: '#f0f9eb',
...@@ -3908,7 +3352,7 @@ const refreshMaterial = async () => { ...@@ -3908,7 +3352,7 @@ const refreshMaterial = async () => {
} }
} }
const showLogistics = (item: PodUsOrderListData) => { const showLogistics = (item: PodCnOrderListData) => {
currentRow.value = JSON.parse(JSON.stringify(item)) currentRow.value = JSON.parse(JSON.stringify(item))
logisticsVisible.value = true logisticsVisible.value = true
logisticsForm.value = JSON.parse(JSON.stringify(logistics)) logisticsForm.value = JSON.parse(JSON.stringify(logistics))
...@@ -3928,43 +3372,13 @@ watch( ...@@ -3928,43 +3372,13 @@ watch(
onMounted(() => { onMounted(() => {
loadTabData() loadTabData()
getUserMark() getUserMark()
loadProductionClient()
loadWarehouseList() loadWarehouseList()
loadCraftList() loadCraftList()
}) })
const expressSheetUpload = async (file: File) => {
const fm = new FormData()
fm.append('file', file)
fm.append('trackingNumber', logisticsForm.value.trackingNumber)
const res = await uploadExpressSheet(fm as never)
logisticsForm.value.expressSheetUrl = res.message || ''
logisticsForm.value.expressSheet = file
return false const handleShipmentAreaCommand = (command: number) => {
} shipmentArea.value = command
const logisticsSubmit = () => {
if (!logisticsForm.value.expressSheetUrl) {
return ElMessage.warning('请上传物流面单')
}
logisticsFormRef.value?.validate(async (valid: boolean) => {
if (valid) {
const params = {
trackingNumber: logisticsForm.value.trackingNumber,
expressSheet: logisticsForm.value.expressSheetUrl,
processNumber: logisticsForm.value.processNumber,
id: currentRow.value.id,
}
await updateSelfLogistics(params)
ElMessage.success('操作成功')
logisticsVisible.value = false
search()
}
})
}
const handleExceptionCommand = (command: number) => {
exceptionStatus.value = command
search() search()
} }
const applyForReplenishment = async (row: ProductList | undefined) => { const applyForReplenishment = async (row: ProductList | undefined) => {
...@@ -3986,21 +3400,21 @@ const applyForReplenishment = async (row: ProductList | undefined) => { ...@@ -3986,21 +3400,21 @@ const applyForReplenishment = async (row: ProductList | undefined) => {
if (!row) { if (!row) {
data = cardSelection.value.map((item) => { data = cardSelection.value.map((item) => {
return { return {
id: item.podJomallOrderUsId, id: item.podJomallOrderCnId,
productId: item.id, productId: item.id,
factorySubOrderNumber: item.factorySubOrderNumber || '', factorySubOrderNumber: item.factorySubOrderNumber || '',
replenishmentNum: res.value, replenishmentNum: res.value,
podJomallOrderUsStatus: status.value, podJomallOrderCnStatus: status.value,
} }
}) })
} else { } else {
data = [ data = [
{ {
id: row.podJomallOrderUsId, id: row.podJomallOrderCnId,
productId: row.id, productId: row.id,
factorySubOrderNumber: row.factorySubOrderNumber || '', factorySubOrderNumber: row.factorySubOrderNumber || '',
replenishmentNum: res.value, replenishmentNum: res.value,
podJomallOrderUsStatus: status.value, podJomallOrderCnStatus: status.value,
}, },
] ]
} }
...@@ -4058,14 +3472,14 @@ async function productioncompleted() { ...@@ -4058,14 +3472,14 @@ async function productioncompleted() {
const paramsArr = cardSelection.value.map((el) => { const paramsArr = cardSelection.value.map((el) => {
return { return {
id: el.id ?? '', id: el.id ?? '',
podJomallOrderUsId: el.podJomallOrderUsId ?? '', podJomallOrderCnId: el.podJomallOrderCnId ?? '',
factorySubOrderNumber: el.factorySubOrderNumber ?? '', factorySubOrderNumber: el.factorySubOrderNumber ?? '',
version: el.version ?? '', version: el.version ?? '',
} }
}) })
try { try {
const res = await updateToWaitShipmentApi({ usUpdateParams: paramsArr }) const res = await updateToWaitShipmentApi({ cnUpdateParams: paramsArr })
if (res.code !== 200) return if (res.code !== 200) return
ElMessage.success('操作成功') ElMessage.success('操作成功')
search() search()
...@@ -4145,7 +3559,7 @@ const handleBeforeRouteLeave = ( ...@@ -4145,7 +3559,7 @@ const handleBeforeRouteLeave = (
) => { ) => {
console.log(to, from) console.log(to, from)
localStorage.removeItem('podUsStatus') localStorage.removeItem('podCnStatus')
next() next()
} }
...@@ -4192,13 +3606,6 @@ useRouter().beforeEach((to, from, next) => { ...@@ -4192,13 +3606,6 @@ useRouter().beforeEach((to, from, next) => {
} }
} }
.table-wrapper {
:deep(.exception-reason) {
.cell {
white-space: wrap;
}
}
}
.goods-item { .goods-item {
display: grid; display: grid;
......
...@@ -22,4 +22,18 @@ export default defineConfig({ ...@@ -22,4 +22,18 @@ export default defineConfig({
resolve: { resolve: {
alias: { '@': '/src' }, alias: { '@': '/src' },
}, },
server: {
port: 9803,
host: true,
proxy: {
'/api': {
target: 'http://10.168.31.130:8060',
},
'/ws': {
target: 'ws://wkg.local.cn:8066',
ws: true,
changeOrigin: true,
},
},
},
}) })
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