Commit c9cc32d2 by qinjianhui

feat: 调整文件结构

parent d18281a3
...@@ -12,6 +12,7 @@ import type { ...@@ -12,6 +12,7 @@ import type {
SearchForm, SearchForm,
StatusTreeNode, StatusTreeNode,
} from '@/types/api/factoryOrderNew' } from '@/types/api/factoryOrderNew'
import { ResultInfoDataItem } from '@/types/api/order/common'
export function getPodOrderStateGroupListApi() { export function getPodOrderStateGroupListApi() {
return axios.get<never, BaseRespData<StatusTreeNode[]>>( return axios.get<never, BaseRespData<StatusTreeNode[]>>(
'factory/podOrder/findStateGroupList', 'factory/podOrder/findStateGroupList',
...@@ -110,21 +111,14 @@ export function confirmOrderWithWarehouseApi( ...@@ -110,21 +111,14 @@ export function confirmOrderWithWarehouseApi(
warehouseId: number | string, warehouseId: number | string,
warehouseName: string, warehouseName: string,
) { ) {
return axios.post< return axios.post<never, BaseRespData<ResultInfoDataItem[]>>(
never, 'factory/podOrder/ordersAccepted',
BaseRespData<
{ {
factoryOrderNumber?: string
message?: string
id: number | string
status?: boolean
}[]
>
>('factory/podOrder/ordersAccepted', {
podOrderIds: ids, podOrderIds: ids,
warehouseId, warehouseId,
warehouseName, warehouseName,
}) },
)
} }
export function cancelOrderWithReasonApi( export function cancelOrderWithReasonApi(
...@@ -390,15 +384,10 @@ export function applyForReplenishByIdApi( ...@@ -390,15 +384,10 @@ export function applyForReplenishByIdApi(
} }
export function completeDeliveryApi(ids: (number | string)[]) { export function completeDeliveryApi(ids: (number | string)[]) {
return axios.post< return axios.post<never, BaseRespData<ResultInfoDataItem[]>>(
never, 'factory/podOrderOperation/completeDelivery',
BaseRespData<{ ids,
id: number | string )
status: boolean
factoryOrderNumber: string
message: string
}[]>
>('factory/podOrderOperation/completeDelivery', ids)
} }
export function getByOperationNoLogApi(operationNo: string) { export function getByOperationNoLogApi(operationNo: string) {
......
export interface ResultInfoDataItem {
id: string | number
status?: boolean
factoryOrderNumber?: string
message?: string
}
export interface StatusTreeNode {
status: string
statusName: string
quantity: number
children: StatusTreeNode[] | null
}
export interface SearchForm {
platform?: string
craftCode?: string | string[]
thirdSkuCode?: string
supplierProductNo?: string
batchArrangeNumber?: string
orderNumber?: string
customerOrderNumber?: string
shopOrderNumber?: string
productMark?: string | number | (string | number)[]
multi?: boolean | null
timeType?: number | null
startTime?: string | null
endTime?: string | null
logisticsWayCode?: string
receiverCountry?: string | string[]
factoryOrderNumber?: string
userMark?: string
sku?: string
trackingNumber?: string
replaceShipment?: number | string
shipmentType?: number | string
tagsIdArr?: string[]
source?: string
size?: string
logisticsCompanyCode?: string
interceptStatus?: boolean
standardDesignImage?: number
productMarkList?: string[]
}
export interface FactoryOrderNewListData {
id: number
factoryOrderNumber?: string
factoryNo?: number
factoryCode?: string
factoryCountryCode?: string
warehouseId?: number
warehouseName?: string
namespace?: string
status?: string
platform?: string
shopNumber?: string
weight?: number
productAmount?: number
totalAmount?: number
productNum?: number
shipmentType?: number
expressSheet?: string
trackingNumber?: string
processNumber?: string
userMark?: string
receiverName?: string
receiverPhone?: string
receiverCountry?: string
receiverProvince?: string
receiverCity?: string
receiverDistrict?: string
receiverAddress1?: string
receiverAddress2?: string
receiverPostCode?: string
trackStatus?: number
prepaidAmount?: number
pause?: boolean
serviceAmount?: number
mixed?: boolean
tagsId?: string
source?: string
logisticsCompanyName?: string
logisticsCompanyCode?: string
selfOwned?: boolean
createTime?: string
updateTime?: string
version?: number
totalCustomsWeight?: number
totalCustomsValue?: number
statusName?: string
thirdOrderNumber?: string
}
export interface ProductListData {
id: number
podOrderId: number
factoryCode?: string
productName?: string
baseSku?: string
variantSku?: string
variantImage?: string
variant_image?: string
productMark?: string
diyId?: string
templateType?: number
customTemplateItemId?: number
endProductId?: string
craftSource?: number
craftCode?: string
craftName?: string
craftType?: string
customizedQuantity: number
categoryId?: number
categoryName?: string
productPrice?: number
templatePrice?: number
craftPrice?: number
imageAry?: string
designImages?: string
trimDesignImages?: string
sizeType?: number
num?: number
passNum?: number
notPassNum?: number
payAmount?: number
weight?: number
createTime?: string
updateTime?: string
version?: number
remark?: string
}
export interface operateOrderListData {
id: number
operationNo?: string
podOrderId?: number
podOrderNo?: string
podOrderProductId?: number
baseSku?: string
variantSku?: string
variantImage?: string
thirdSpuCode?: string
thirdSkuCode?: string
supplierProductNo?: string
productName?: string
productMark?: string
customizedQuantity?: number
quantity?: number
isReplenishment?: boolean
totalProductionNum?: number
status?: string
outOfStock?: boolean
arrange?: boolean
version?: number
createTime?: string
updateTime?: string
factoryNo?: number
factoryCode?: string
factoryCountryCode?: string
warehouseId?: number
namespace?: string
statusName?: string
[key: string]: unknown
}
export interface LogListData {
id: number
bizId?: number | string
employeeName?: string
description?: string
createTime?: string
}
export interface BatchManageData {
id: number
factoryId?: number
batchArrangeNum?: string
billType?: string
url?: string
tiffUrl?: string
syntheticStatus?: boolean
downloadStatus?: boolean
productNum?: number
materialNum?: number
craftType?: string
employeeAccount?: string
employeeId?: number
createTime?: string
failReason?: string
failTime?: string
automaticComposing?: boolean
composingParam?: string
printProductOrder?: boolean
printPickOrder?: boolean
prnUrl?: string
prnDownloadStatus?: string
enableArrange?: boolean
standardDesignImage?: number
}
export interface RestockData {
id: number
warehouseName?: string
skuImage?: string
productName?: string
styleNo?: string
stockSku?: string
shortageQuantity?: number
availableQuantity?: number
stockQuantity?: number
occupiedQuantity?: number
}
export interface PickCompleteData {
id: number
warehouseName?: string
skuImage?: string
productName?: string
supplierProductNo?: string
thirdSkuCode?: string
selectedQuantity?: number
availableInventory?: number
inventory?: number
producingQuantity?: number
occupyInventory?: number
pickingStatus?: string
availableOrderIds?: number[]
allOrderIds: number[]
}
export interface PickFailData {
id: number
warehouseName?: string
skuImage?: string
productName?: string
styleNo?: string
stockSku?: string
currentStock?: number
occupiedQuantity?: number
currentAvailableStock?: number
producingQuantity?: number
suggestOutQuantity?: number
afterOutStock?: number
afterOutOccupied?: number
afterOutAvailable?: number
}
...@@ -53,17 +53,11 @@ ...@@ -53,17 +53,11 @@
import { ref, watch } from 'vue' import { ref, watch } from 'vue'
import { copyText } from '@/utils/index' import { copyText } from '@/utils/index'
import { ResultInfoDataItem } from '@/types/api/order/common';
interface IList {
id: string | number
shopNumber?: string
factoryOrderNumber?: string
message: string
status: boolean
}
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{
list: IList[] list: ResultInfoDataItem[]
}>(), }>(),
{ {
list: () => [], list: () => [],
...@@ -73,7 +67,7 @@ const props = withDefaults( ...@@ -73,7 +67,7 @@ const props = withDefaults(
const resultDialog = ref(false) const resultDialog = ref(false)
const isIndeterminate = ref(false) const isIndeterminate = ref(false)
const checkAll = ref(false) const checkAll = ref(false)
const selectedList = ref<IList[]>([]) const selectedList = ref<ResultInfoDataItem[]>([])
let key = '' let key = ''
// 显示弹窗 // 显示弹窗
const showDialog = (type?: string) => { const showDialog = (type?: string) => {
...@@ -161,7 +155,7 @@ defineExpose({ ...@@ -161,7 +155,7 @@ defineExpose({
showDialog, showDialog,
}) })
const emits = defineEmits<{ const emits = defineEmits<{
(e: 'confirm', data: IList[]): void (e: 'confirm', data: ResultInfoDataItem[]): void
}>() }>()
</script> </script>
......
...@@ -884,7 +884,7 @@ import type { ...@@ -884,7 +884,7 @@ import type {
ProductListData, ProductListData,
SearchForm, SearchForm,
StatusTreeNode, StatusTreeNode,
} from '@/types/api/factoryOrderNew' } from '@/types/api/order/factoryOrderNew'
import platformJson from '../../../json/platform.json' import platformJson from '../../../json/platform.json'
import { import {
getFactoryOrderNewDetailApi, getFactoryOrderNewDetailApi,
...@@ -944,6 +944,7 @@ import UpdateCustomDeclarationInfoDialog from '@/views/order/components/UpdateCu ...@@ -944,6 +944,7 @@ import UpdateCustomDeclarationInfoDialog from '@/views/order/components/UpdateCu
import WeightDialog from '@/views/order/components/WeightDialog.vue' import WeightDialog from '@/views/order/components/WeightDialog.vue'
import FastProduction from '@/views/order/components/FastProduction.vue' import FastProduction from '@/views/order/components/FastProduction.vue'
import PodMakeOrder from '@/views/order/podUs/PodMakeOrder.vue' import PodMakeOrder from '@/views/order/podUs/PodMakeOrder.vue'
import { ResultInfoDataItem } from '@/types/api/order/common'
const cardLayoutStatuses = [ const cardLayoutStatuses = [
'PENDING_SCHEDULE', 'PENDING_SCHEDULE',
...@@ -981,14 +982,7 @@ const suspendedTabs = [ ...@@ -981,14 +982,7 @@ const suspendedTabs = [
{ label: '其他', value: 'OTHER', count: 0 }, { label: '其他', value: 'OTHER', count: 0 },
] ]
const suspendedSubTab = ref('CUSTOMER_INTERCEPT') const suspendedSubTab = ref('CUSTOMER_INTERCEPT')
const resultInfo = ref< const resultInfo = ref<ResultInfoDataItem[]>([])
{
id: string | number
status: boolean
factoryOrderNumber?: string
message: string
}[]
>([])
const resultRefs = ref() const resultRefs = ref()
const treeRef = ref() const treeRef = ref()
const searchForm = ref<SearchForm>({}) const searchForm = ref<SearchForm>({})
...@@ -1675,25 +1669,11 @@ const handleConfirmOrder = () => { ...@@ -1675,25 +1669,11 @@ const handleConfirmOrder = () => {
if (!ensureSelection()) return if (!ensureSelection()) return
confirmOrderDialogRef.value?.open(getSelectedIds()) confirmOrderDialogRef.value?.open(getSelectedIds())
} }
const openResultInfoDialog = ( const openResultInfoDialog = (data: ResultInfoDataItem[]) => {
data: {
factoryOrderNumber?: string
message?: string
id: number | string
status?: boolean
}[],
) => {
nextTick(() => { nextTick(() => {
const isSuccess = data.every((item) => item.status) const isSuccess = data.every((item) => item.status)
if (!isSuccess) { if (!isSuccess) {
resultInfo.value = data resultInfo.value = data.filter((item) => !item.status)
.filter((item) => !item.status)
.map((item) => ({
id: item.id,
status: item.status ?? false,
factoryOrderNumber: item.factoryOrderNumber ?? '',
message: item.message ?? '',
}))
resultRefs.value?.showDialog() resultRefs.value?.showDialog()
} else { } else {
refreshCurrentView({ isRefreshTree: true }) refreshCurrentView({ isRefreshTree: true })
...@@ -1707,7 +1687,9 @@ const handleCancelOrder = () => { ...@@ -1707,7 +1687,9 @@ const handleCancelOrder = () => {
const handleRefreshProductInfo = async () => { const handleRefreshProductInfo = async () => {
if (!ensureSelection()) return if (!ensureSelection()) return
try { try {
await ElMessageBox.confirm('确定刷新商品信息吗?', '提示', { type: 'warning' }) await ElMessageBox.confirm('确定刷新商品信息吗?', '提示', {
type: 'warning',
})
} catch { } catch {
return return
} }
...@@ -1778,14 +1760,8 @@ const handleLogisticsCommand = async (command: string) => { ...@@ -1778,14 +1760,8 @@ const handleLogisticsCommand = async (command: string) => {
if (Array.isArray(res.data)) { if (Array.isArray(res.data)) {
const isSuccess = res.data.every((item) => item.status) const isSuccess = res.data.every((item) => item.status)
if (!isSuccess) { if (!isSuccess) {
resultInfo.value = res.data resultInfo.value = res.data.filter((item) => !item.status)
.filter((item) => !item.status)
.map((item) => ({
id: item.id,
status: item.status ?? false,
factoryOrderNumber: item.factoryOrderNumber ?? '',
message: item.message ?? '',
}))
resultRefs.value?.showDialog() resultRefs.value?.showDialog()
} else { } else {
refreshCurrentView() refreshCurrentView()
...@@ -2203,24 +2179,10 @@ const getOperationByNo = (operationNo: string) => ...@@ -2203,24 +2179,10 @@ const getOperationByNo = (operationNo: string) =>
const completeOperationById = (ids: number[]) => completeDeliveryApi(ids) const completeOperationById = (ids: number[]) => completeDeliveryApi(ids)
const downloadOperationById = (ids: number[]) => const downloadOperationById = (ids: number[]) =>
downloadOperationMaterialApi(ids) downloadOperationMaterialApi(ids)
const handleFastProductionSuccess = ( const handleFastProductionSuccess = (data: ResultInfoDataItem[]) => {
data: {
factoryOrderNumber?: number
id: number
message?: string
status?: boolean
}[],
) => {
const isSuccess = data.every((item) => item.status) const isSuccess = data.every((item) => item.status)
if (!isSuccess) { if (!isSuccess) {
resultInfo.value = data resultInfo.value = data.filter((item) => !item.status)
.filter((item) => !item.status)
.map((item) => ({
id: item.id,
status: item.status ?? false,
factoryOrderNumber: item.factoryOrderNumber ? String(item.factoryOrderNumber) : '',
message: item.message ?? '',
}))
resultRefs.value?.showDialog() resultRefs.value?.showDialog()
} }
} }
......
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