Commit 6d69dfe7 by linjinhong

Merge remote-tracking branch 'origin/linjinhong' into dev

parents ed2f87d9 27bd0959
...@@ -11,7 +11,18 @@ import { ...@@ -11,7 +11,18 @@ import {
} from '@/types/api/podUsOrder' } from '@/types/api/podUsOrder'
import axios from './axios' import axios from './axios'
import { PodMakeOrderData } from '@/types/api/podMakeOrder' import { PodMakeOrderData } from '@/types/api/podMakeOrder'
export interface AddressInfo {
id?: string
receiverName: string
receiverPhone: string
receiverCountry: string
receiverProvince: string
receiverCity: string
receiverDistrict: string
receiverAddress1: string
receiverAddress2: string
receiverPostCode: string
}
// 同步收货地址 // 同步收货地址
export function syncReceiverAddress(data: number[]) { export function syncReceiverAddress(data: number[]) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
...@@ -37,6 +48,7 @@ export function getOrderTabData() { ...@@ -37,6 +48,7 @@ export function getOrderTabData() {
'/factory/podJomallOrderUs/findStateGroupList', '/factory/podJomallOrderUs/findStateGroupList',
) )
} }
export function getOrderList( export function getOrderList(
params: SearchForm, params: SearchForm,
currentPage: number, currentPage: number,
...@@ -51,12 +63,14 @@ export function getOrderList( ...@@ -51,12 +63,14 @@ export function getOrderList(
}, },
) )
} }
export function handleExceptionOrderApi(orderIds: number[]) { export function handleExceptionOrderApi(orderIds: number[]) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderUs/processExceptionOrders', 'factory/podJomallOrderUs/processExceptionOrders',
orderIds, orderIds,
) )
} }
export function getCardOrderList( export function getCardOrderList(
params: SearchForm, params: SearchForm,
currentPage: number, currentPage: number,
...@@ -71,6 +85,7 @@ export function getCardOrderList( ...@@ -71,6 +85,7 @@ export function getCardOrderList(
}, },
) )
} }
export function confirmOrderApi( export function confirmOrderApi(
data: number[], data: number[],
productionClient: string, productionClient: string,
...@@ -87,11 +102,13 @@ export function confirmOrderApi( ...@@ -87,11 +102,13 @@ export function confirmOrderApi(
}, },
) )
} }
export function getProductionClientApi() { export function getProductionClientApi() {
return axios.get<never, BaseRespData<ProductionClient[]>>( return axios.get<never, BaseRespData<ProductionClient[]>>(
'factory/podJomallOrderUs/getProductionClientList', 'factory/podJomallOrderUs/getProductionClientList',
) )
} }
export function updateExceptionOrderApi(data: number[]) { export function updateExceptionOrderApi(data: number[]) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderUs/updateExceptionOrders', 'factory/podJomallOrderUs/updateExceptionOrders',
...@@ -100,6 +117,15 @@ export function updateExceptionOrderApi(data: number[]) { ...@@ -100,6 +117,15 @@ export function updateExceptionOrderApi(data: number[]) {
}, },
) )
} }
// // 同步收货地址
// export function syncReceiverAddress(data: number[]) {
// return axios.post<never, BaseRespData<never>>(
// 'factory/podJomallOrderUs/syncReceiverAddress',
// data,
// )
// }
export function changeExceptionOrderApi( export function changeExceptionOrderApi(
url: string, url: string,
ids: number[], ids: number[],
...@@ -112,6 +138,7 @@ export function changeExceptionOrderApi( ...@@ -112,6 +138,7 @@ export function changeExceptionOrderApi(
exceptionReason: value, exceptionReason: value,
}) })
} }
export function cancelOrderApi(ids: number[], value: string) { export function cancelOrderApi(ids: number[], value: string) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderUs/cancelOrders', 'factory/podJomallOrderUs/cancelOrders',
...@@ -121,11 +148,13 @@ export function cancelOrderApi(ids: number[], value: string) { ...@@ -121,11 +148,13 @@ export function cancelOrderApi(ids: number[], value: string) {
}, },
) )
} }
export function getOperationLogApi(id: number) { export function getOperationLogApi(id: number) {
return axios.get<never, BaseRespData<LogListData[]>>( return axios.get<never, BaseRespData<LogListData[]>>(
`factory/podJomallOrderUsLog/getPodJomallOrderUsLog?id=${id}`, `factory/podJomallOrderUsLog/getPodJomallOrderUsLog?id=${id}`,
) )
} }
export function getSubOrderBySubOrderNumber(factorySubOrderNumber: string) { export function getSubOrderBySubOrderNumber(factorySubOrderNumber: string) {
return axios.get<never, BaseRespData<ProductList>>( return axios.get<never, BaseRespData<ProductList>>(
'factory/podJomallOrderProductUs/getProductUsByFactorySubOrderNumber', 'factory/podJomallOrderProductUs/getProductUsByFactorySubOrderNumber',
...@@ -136,12 +165,14 @@ export function getSubOrderBySubOrderNumber(factorySubOrderNumber: string) { ...@@ -136,12 +165,14 @@ export function getSubOrderBySubOrderNumber(factorySubOrderNumber: string) {
}, },
) )
} }
export function downloadMaterialApi(id: number[]) { export function downloadMaterialApi(id: number[]) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderProductUs/downloadDesignImages', 'factory/podJomallOrderProductUs/downloadDesignImages',
id, id,
) )
} }
export function productionQueryApi(id: number, podJomallOrderUsId: number) { export function productionQueryApi(id: number, podJomallOrderUsId: number) {
return axios.post<never, BasePaginationData<never>>( return axios.post<never, BasePaginationData<never>>(
'factory/podJomallOrderProductUs/completeDelivery', 'factory/podJomallOrderProductUs/completeDelivery',
...@@ -151,12 +182,14 @@ export function productionQueryApi(id: number, podJomallOrderUsId: number) { ...@@ -151,12 +182,14 @@ export function productionQueryApi(id: number, podJomallOrderUsId: number) {
}, },
) )
} }
export function printProductionOrderApi(orderIds: number[]) { export function printProductionOrderApi(orderIds: number[]) {
return axios.post<never, BaseRespData<string>>( return axios.post<never, BaseRespData<string>>(
'factory/podJomallOrderUs/printProducePdf', 'factory/podJomallOrderUs/printProducePdf',
orderIds, orderIds,
) )
} }
export function printPrintOrderApi(orderIds: number[]) { export function printPrintOrderApi(orderIds: number[]) {
return axios.post<never, BaseRespData<string>>( return axios.post<never, BaseRespData<string>>(
'factory/podJomallOrderUs/printPickPdf', 'factory/podJomallOrderUs/printPickPdf',
...@@ -165,6 +198,7 @@ export function printPrintOrderApi(orderIds: number[]) { ...@@ -165,6 +198,7 @@ export function printPrintOrderApi(orderIds: number[]) {
}, },
) )
} }
export function printPickingOrderApi(orderIds: number[]) { export function printPickingOrderApi(orderIds: number[]) {
return axios.post<never, BaseRespData<string>>( return axios.post<never, BaseRespData<string>>(
'factory/podJomallOrderUs/pickingComplete', 'factory/podJomallOrderUs/pickingComplete',
...@@ -173,11 +207,13 @@ export function printPickingOrderApi(orderIds: number[]) { ...@@ -173,11 +207,13 @@ export function printPickingOrderApi(orderIds: number[]) {
}, },
) )
} }
export function stockOutCheckApi(orderIds: number[]) { export function stockOutCheckApi(orderIds: number[]) {
return axios.get<never, BaseRespData<number[]>>( return axios.get<never, BaseRespData<number[]>>(
`factory/podJomallOrderUs/replenishVerify?ids=${orderIds.join(',')}`, `factory/podJomallOrderUs/replenishVerify?ids=${orderIds.join(',')}`,
) )
} }
export function toBePickingApi(orderIds: number[]) { export function toBePickingApi(orderIds: number[]) {
return axios.get<never, BaseRespData<never>>( return axios.get<never, BaseRespData<never>>(
`factory/podJomallOrderUs/updateStockOutOrderToPicking?ids=${orderIds.join( `factory/podJomallOrderUs/updateStockOutOrderToPicking?ids=${orderIds.join(
...@@ -185,11 +221,13 @@ export function toBePickingApi(orderIds: number[]) { ...@@ -185,11 +221,13 @@ export function toBePickingApi(orderIds: number[]) {
)}`, )}`,
) )
} }
export function getOrderDetailById(id: number) { export function getOrderDetailById(id: number) {
return axios.get<never, BaseRespData<ProductList>>( return axios.get<never, BaseRespData<ProductList>>(
`factory/podJomallOrderProductUs/getProductUsById?id=${id}`, `factory/podJomallOrderProductUs/getProductUsById?id=${id}`,
) )
} }
export function getPackingDataApi( export function getPackingDataApi(
code: string, code: string,
factoryNo: number, factoryNo: number,
...@@ -208,6 +246,7 @@ export function getPackingDataApi( ...@@ -208,6 +246,7 @@ export function getPackingDataApi(
}, },
) )
} }
export function getPodBoxListApi( export function getPodBoxListApi(
factoryNo: number | string, factoryNo: number | string,
warehouseId: number | string, warehouseId: number | string,
...@@ -232,6 +271,7 @@ export function submitInspectionApi( ...@@ -232,6 +271,7 @@ export function submitInspectionApi(
}, },
) )
} }
export function clearBoxApi( export function clearBoxApi(
factoryNo: number, factoryNo: number,
box: number | null, box: number | null,
...@@ -244,11 +284,13 @@ export function clearBoxApi( ...@@ -244,11 +284,13 @@ export function clearBoxApi(
}, },
) )
} }
export function clearAllBoxApi() { export function clearAllBoxApi() {
return axios.get<never, BaseRespData<never>>( return axios.get<never, BaseRespData<never>>(
'factory/podJomallOrderUs/delPodBoxOrderDetails', 'factory/podJomallOrderUs/delPodBoxOrderDetails',
) )
} }
export function updateRemarkApi(id: number, content: string) { export function updateRemarkApi(id: number, content: string) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderUs/addRemark', 'factory/podJomallOrderUs/addRemark',
...@@ -256,23 +298,40 @@ export function updateRemarkApi(id: number, content: string) { ...@@ -256,23 +298,40 @@ export function updateRemarkApi(id: number, content: string) {
) )
} }
// export function refreshAddressApi(idList: number[]) {
// return axios.post<never, BaseRespData<never>>(
// 'factory/podJomallOrderUs/syncReceiverAddress',
// idList,
// )
// }
// export function updateAddressApi(data: PodUsOrderListData) {
// return axios.post<never, BaseRespData<never>>(
// 'factory/podJomallOrderUs/updateReceiverAddress',
// data,
// )
// }
export function getLogisticsCalculation(id: number) { export function getLogisticsCalculation(id: number) {
return axios.get<never, BaseRespData<never>>( return axios.get<never, BaseRespData<never>>(
'factory/podJomallOrderUs/getLogisticsCalculation', 'factory/podJomallOrderUs/getLogisticsCalculation',
{ params: { id } }, { params: { id } },
) )
} }
export function loadWarehouseListApi() { export function loadWarehouseListApi() {
return axios.get<never, BaseRespData<WarehouseListData[]>>( return axios.get<never, BaseRespData<WarehouseListData[]>>(
'factoryWarehouseInfo/getAll', 'factoryWarehouseInfo/getAll',
) )
} }
export function refreshMaterialApi(orderIds: string) { export function refreshMaterialApi(orderIds: string) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderProductUs/refreshDesignImages ', 'factory/podJomallOrderProductUs/refreshDesignImages ',
{ orderIds }, { orderIds },
) )
} }
// 获取跟踪号 // 获取跟踪号
export function getTrackingNumberApi(orderIds: (string | number)[]) { export function getTrackingNumberApi(orderIds: (string | number)[]) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
...@@ -280,6 +339,7 @@ export function getTrackingNumberApi(orderIds: (string | number)[]) { ...@@ -280,6 +339,7 @@ export function getTrackingNumberApi(orderIds: (string | number)[]) {
orderIds, orderIds,
) )
} }
// 获取打印面单 // 获取打印面单
export function getfaceSimplexFileApi(orderIds: (string | number)[]) { export function getfaceSimplexFileApi(orderIds: (string | number)[]) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
...@@ -287,6 +347,7 @@ export function getfaceSimplexFileApi(orderIds: (string | number)[]) { ...@@ -287,6 +347,7 @@ export function getfaceSimplexFileApi(orderIds: (string | number)[]) {
orderIds, orderIds,
) )
} }
// 取消物流订单 // 取消物流订单
export function cancelLogisticsOrderApi(orderIds: (string | number)[]) { export function cancelLogisticsOrderApi(orderIds: (string | number)[]) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
...@@ -294,6 +355,7 @@ export function cancelLogisticsOrderApi(orderIds: (string | number)[]) { ...@@ -294,6 +355,7 @@ export function cancelLogisticsOrderApi(orderIds: (string | number)[]) {
orderIds, orderIds,
) )
} }
// 更改物流 // 更改物流
export function changeLogisticsApi(params: { export function changeLogisticsApi(params: {
updateByIdParam: { updateByIdParam: {
...@@ -307,6 +369,7 @@ export function changeLogisticsApi(params: { ...@@ -307,6 +369,7 @@ export function changeLogisticsApi(params: {
params, params,
) )
} }
// 创建物流 // 创建物流
export function createLogisticsOrderApi(params: { export function createLogisticsOrderApi(params: {
updateByIdParam: { updateByIdParam: {
...@@ -322,12 +385,13 @@ export function createLogisticsOrderApi(params: { ...@@ -322,12 +385,13 @@ export function createLogisticsOrderApi(params: {
} }
// 更改物流 // 更改物流
export function composingDesignImages(data:number[]) { export function composingDesignImages(data: number[]) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderUs/composingDesignImages', 'factory/podJomallOrderUs/composingDesignImages',
data data,
) )
} }
// 转至待拣胚 // 转至待拣胚
export function updateLogisticsToPickingApi(params: { ids: string }) { export function updateLogisticsToPickingApi(params: { ids: string }) {
return axios.get<never, BaseRespData<never>>( return axios.get<never, BaseRespData<never>>(
...@@ -337,6 +401,7 @@ export function updateLogisticsToPickingApi(params: { ids: string }) { ...@@ -337,6 +401,7 @@ export function updateLogisticsToPickingApi(params: { ids: string }) {
}, },
) )
} }
//创建物流订单 //创建物流订单
export function createLogisticsOrdersApi(orderIds: (string | number)[]) { export function createLogisticsOrdersApi(orderIds: (string | number)[]) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
...@@ -344,3 +409,17 @@ export function createLogisticsOrdersApi(orderIds: (string | number)[]) { ...@@ -344,3 +409,17 @@ export function createLogisticsOrdersApi(orderIds: (string | number)[]) {
orderIds, orderIds,
) )
} }
//确认生产
export function confirmProductApi(orderIds: (string | number)[]) {
return axios.post<never, BaseRespData<never>>(
`factory/podJomallOrderUs/confirmProduct`,
orderIds,
)
}
//转至锐印
export function confirmProductToRiinApi(orderIds: (string | number)[]) {
return axios.post<never, BaseRespData<never>>(
`factory/podJomallOrderUs/confirmProductToRiin`,
orderIds,
)
}
...@@ -19,7 +19,7 @@ export interface SearchForm { ...@@ -19,7 +19,7 @@ export interface SearchForm {
endTime: string | null endTime: string | null
exceptionHandling: number | undefined exceptionHandling: number | undefined
platform: string platform: string
productionClient: string productionClient:string
} }
export interface PodUsOrderListData { export interface PodUsOrderListData {
id: number id: number
...@@ -93,7 +93,6 @@ export interface ProductList { ...@@ -93,7 +93,6 @@ export interface ProductList {
tagIds?: string tagIds?: string
isProduction?: boolean isProduction?: boolean
createTime?: string createTime?: string
startStockingTime?: string | null
updateTime?: string updateTime?: string
remark?: string | null remark?: string | null
version?: number version?: number
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
> >
<template #ontherBtn> <template #ontherBtn>
<div style="margin-left: 10px; display: flex; gap: 10px"> <div style="margin-left: 10px; display: flex; gap: 10px">
<ElButton @click="downloadExcel" type="info" plain <ElButton @click="downloadExcel" type="primary" plain
>下载模版</ElButton >下载模版</ElButton
> >
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
> >
<template #ontherBtn> <template #ontherBtn>
<div style="margin-left: 10px; display: flex; gap: 10px"> <div style="margin-left: 10px; display: flex; gap: 10px">
<ElButton @click="downloadExcel" type="info" plain <ElButton @click="downloadExcel" type="primary" plain
>下载模版</ElButton >下载模版</ElButton
> >
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
v-model="resultDialog" v-model="resultDialog"
width="600px" width="600px"
:close-on-click-modal="false" :close-on-click-modal="false"
@closed="closedFn"
> >
<div style="display: flex"> <div style="display: flex">
<el-checkbox <el-checkbox
...@@ -24,16 +25,16 @@ ...@@ -24,16 +25,16 @@
<el-button type="danger" @click="resultfilter(false)"> <el-button type="danger" @click="resultfilter(false)">
{{ '选择异常' }} {{ '选择异常' }}
</el-button> </el-button>
<el-button type="success" @click="copyAllCode(list, 'shopNumber')"> <el-button type="success" @click="copyAllCode('factoryOrderNumber')">
{{ '复制店铺单号' }} {{ '复制工厂订单号' }}
</el-button> </el-button>
</div> </div>
<div style="height: 50vh; overflow: auto"> <div style="height: 50vh; overflow: auto">
<div style="margin: 15px 0"></div> <div style="margin: 15px 0"></div>
<el-checkbox-group v-model="selectedList" @change="checkChange"> <el-checkbox-group v-model="selectedList" @change="checkChange">
<div style="display: block" v-for="(item, index) in list" :key="index"> <div style="display: block" v-for="(item, index) in list" :key="index">
<el-checkbox :value="item.id"> <el-checkbox :value="item">
{{ '店铺编号:' + item.shopNumber + ' ' + item.message }} {{ '工厂订单号:' + item.factoryOrderNumber + ' ' + item.message }}
</el-checkbox> </el-checkbox>
</div> </div>
</el-checkbox-group> </el-checkbox-group>
...@@ -55,7 +56,8 @@ import { copyText } from '@/utils/index' ...@@ -55,7 +56,8 @@ import { copyText } from '@/utils/index'
interface IList { interface IList {
id: string | number id: string | number
shopNumber: string shopNumber?: string
factoryOrderNumber?: string
message: string message: string
status: boolean status: boolean
} }
...@@ -71,7 +73,7 @@ const props = withDefaults( ...@@ -71,7 +73,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<(string | number)[]>([]) const selectedList = ref<IList[]>([])
// 显示弹窗 // 显示弹窗
const showDialog = (type?: string) => { const showDialog = (type?: string) => {
...@@ -84,7 +86,7 @@ const showDialog = (type?: string) => { ...@@ -84,7 +86,7 @@ const showDialog = (type?: string) => {
// 全选状态改变 // 全选状态改变
const checkAllChange = (value: boolean) => { const checkAllChange = (value: boolean) => {
selectedList.value = value ? props.list.map((v) => v.id) : [] selectedList.value = value ? props.list : []
isIndeterminate.value = false isIndeterminate.value = false
} }
...@@ -98,36 +100,52 @@ const checkChange = () => { ...@@ -98,36 +100,52 @@ const checkChange = () => {
// 确认选择 // 确认选择
const confirm = () => { const confirm = () => {
resultDialog.value = false resultDialog.value = false
emits('confirm', selectedList.value) // emits('confirm', selectedList.value)
} }
// 结果过滤 // 结果过滤
const resultfilter = (bool: boolean) => { const resultfilter = (bool: boolean) => {
const arr = props.list const arr = props.list.filter((item) => item.status === bool)
.filter((item) => item.status === bool)
.map((item) => item.id)
selectedList.value = arr selectedList.value = arr
const checkedCount = arr.length const checkedCount = arr.length
console.log(112, checkedCount)
console.log(113, props.list)
checkAll.value = checkedCount === props.list.length checkAll.value = checkedCount === props.list.length
isIndeterminate.value = checkedCount > 0 && checkedCount < props.list.length isIndeterminate.value = checkedCount > 0 && checkedCount < props.list.length
} }
// 复制店铺单号 // 复制店铺单号
const copyAllCode = (list: IList[], field: string) => { const copyAllCode = (field: string) => {
const str = list.map((el) => el[field as keyof IList]).join(',') if (!selectedList.value.length) {
return ElMessage.warning('请先选择数据')
}
const str = selectedList.value.map((el) => el[field as keyof IList]).join(',')
console.log('复制店铺单号', str) console.log('复制店铺单号', str)
copyText(str) copyText(str)
} }
function closedFn() {
emits('confirm', selectedList.value)
}
// 监听弹窗状态 // 监听弹窗状态
// watch(
// () => resultDialog.value,
// (v) => {
// if (v) {
// console.log(127, props.list)
// resultfilter(true)
// }
// },
// )
watch( watch(
() => resultDialog.value, () => props.list,
(v) => { (v) => {
if (v) { if (v.length) {
console.log(127) console.log(127, v)
resultfilter(true) resultfilter(true)
} }
}, },
...@@ -137,7 +155,7 @@ defineExpose({ ...@@ -137,7 +155,7 @@ defineExpose({
showDialog, showDialog,
}) })
const emits = defineEmits<{ const emits = defineEmits<{
(e: 'confirm', data: (string | number)[]): void (e: 'confirm', data: IList[]): void
}>() }>()
</script> </script>
......
<script setup lang="ts"> <script setup lang="ts">
import { defineModel } from 'vue' import { defineModel } from 'vue'
import { updateAddressApi,AddressInfo } from '@/api/podUsOrder.ts' import { updateAddressApi, AddressInfo } from '@/api/podUsOrder.ts'
const emits = defineEmits(['success']) const emits = defineEmits(['success'])
defineProps<{ defineProps<{
countryList: { countryCode: string }[] countryList: { countryCode: string }[]
...@@ -24,10 +24,16 @@ const rules = { ...@@ -24,10 +24,16 @@ const rules = {
receiverName: [{ required: true, message: '请输入姓名', trigger: 'blur' }], receiverName: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
receiverPhone: [{ required: true, message: '请输入电话', trigger: 'blur' }], receiverPhone: [{ required: true, message: '请输入电话', trigger: 'blur' }],
receiverCountry: [{ required: true, message: '请输入国家', trigger: 'blur' }], receiverCountry: [{ required: true, message: '请输入国家', trigger: 'blur' }],
receiverProvince: [{ required: true, message: '请输入省/州', trigger: 'blur' }], receiverProvince: [
{ required: true, message: '请输入省/州', trigger: 'blur' },
],
receiverCity: [{ required: true, message: '请输入市', trigger: 'blur' }], receiverCity: [{ required: true, message: '请输入市', trigger: 'blur' }],
receiverAddress1: [{ required: true, message: '请输入地址1', trigger: 'blur' }], receiverAddress1: [
receiverPostCode: [{ required: true, message: '请输入邮政编码', trigger: 'blur' }], { required: true, message: '请输入地址1', trigger: 'blur' },
],
receiverPostCode: [
{ required: true, message: '请输入邮政编码', trigger: 'blur' },
],
} }
const submitForm = async () => { const submitForm = async () => {
...@@ -36,12 +42,16 @@ const submitForm = async () => { ...@@ -36,12 +42,16 @@ const submitForm = async () => {
await updateAddressApi(form.value as never) await updateAddressApi(form.value as never)
visible.value = false visible.value = false
emits('success') emits('success')
await ElMessageBox.alert('请修改/刷新地址后取消物流重新创建物流订单、获取跟踪号、获取打印面单。', '提示', { await ElMessageBox.alert(
type: 'warning', '请修改/刷新地址后取消物流重新创建物流订单、获取跟踪号、获取打印面单。',
confirmButtonText:'确定', '提示',
cancelButtonText:'取消', {
showCancelButton: true, type: 'warning',
}) confirmButtonText: '确定',
cancelButtonText: '取消',
showCancelButton: true,
},
)
} }
}) })
} }
...@@ -56,45 +66,78 @@ const submitForm = async () => { ...@@ -56,45 +66,78 @@ const submitForm = async () => {
> >
<el-form ref="formRef" :model="form" :rules="rules" label-width="120px"> <el-form ref="formRef" :model="form" :rules="rules" label-width="120px">
<el-form-item label="姓名" prop="receiverName"> <el-form-item label="姓名" prop="receiverName">
<el-input v-model="form.receiverName" clearable placeholder="请输入姓名" /> <el-input
v-model="form.receiverName"
clearable
placeholder="请输入姓名"
/>
</el-form-item> </el-form-item>
<el-form-item label="电话" prop="receiverPhone"> <el-form-item label="电话" prop="receiverPhone">
<el-input v-model="form.receiverPhone" clearable placeholder="请输入电话" /> <el-input
v-model="form.receiverPhone"
clearable
placeholder="请输入电话"
/>
</el-form-item> </el-form-item>
<el-form-item label="国家" prop="receiverCountry"> <el-form-item label="国家" prop="receiverCountry">
<el-select v-model="form.receiverCountry" clearable filterable> <el-select v-model="form.receiverCountry" clearable filterable>
<el-option <el-option
v-for="it in countryList" :key="it.countryCode" :label="it.countryCode" v-for="it in countryList"
:value="it.countryCode"></el-option> :key="it.countryCode"
:label="it.countryCode"
:value="it.countryCode"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="省/州" prop="receiverProvince"> <el-form-item label="省/州" prop="receiverProvince">
<el-input v-model="form.receiverProvince" clearable placeholder="请输入省/州" /> <el-input
v-model="form.receiverProvince"
clearable
placeholder="请输入省/州"
/>
</el-form-item> </el-form-item>
<el-form-item label="市" prop="receiverCity"> <el-form-item label="市" prop="receiverCity">
<el-input v-model="form.receiverCity" clearable placeholder="请输入市" /> <el-input
v-model="form.receiverCity"
clearable
placeholder="请输入市"
/>
</el-form-item> </el-form-item>
<el-form-item label="区/县" prop="receiverDistrict"> <el-form-item label="区/县" prop="receiverDistrict">
<el-input v-model="form.receiverDistrict" clearable placeholder="请输入区/县" /> <el-input
v-model="form.receiverDistrict"
clearable
placeholder="请输入区/县"
/>
</el-form-item> </el-form-item>
<el-form-item label="地址1" prop="receiverAddress1"> <el-form-item label="地址1" prop="receiverAddress1">
<el-input v-model="form.receiverAddress1" clearable placeholder="请输入地址1" /> <el-input
v-model="form.receiverAddress1"
clearable
placeholder="请输入地址1"
/>
</el-form-item> </el-form-item>
<el-form-item label="地址2" prop="receiverAddress2"> <el-form-item label="地址2" prop="receiverAddress2">
<el-input v-model="form.receiverAddress2" clearable placeholder="请输入地址2" /> <el-input
v-model="form.receiverAddress2"
clearable
placeholder="请输入地址2"
/>
</el-form-item> </el-form-item>
<el-form-item label="邮政编码" prop="receiverPostCode"> <el-form-item label="邮政编码" prop="receiverPostCode">
<el-input v-model="form.receiverPostCode" clearable placeholder="请输入邮政编码" /> <el-input
v-model="form.receiverPostCode"
clearable
placeholder="请输入邮政编码"
/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<template #footer> <template #footer>
<el-button @click="visible=false">取消</el-button> <el-button @click="visible = false">取消</el-button>
<el-button type="primary" @click="submitForm">提交</el-button> <el-button type="primary" @click="submitForm">提交</el-button>
</template> </template>
</el-dialog> </el-dialog>
</template> </template>
<style scoped lang="scss"> <style scoped lang="scss"></style>
</style>
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
</ElButton> </ElButton>
</span> </span>
<span v-if="status === 'TO_BE_CONFIRMED'" class="item"> <span v-if="status === 'TO_BE_CONFIRMED'" class="item">
<ElButton type="success" @click="confirmOrder"> 确认 </ElButton> <ElButton type="success" @click="confirmProduct"> 确认生产 </ElButton>
</span> </span>
<span v-if="status === 'EXCEPTION_ORDER'" class="item"> <span v-if="status === 'EXCEPTION_ORDER'" class="item">
<ElButton type="success" @click="updateOrder"> 转至待确认 </ElButton> <ElButton type="success" @click="updateOrder"> 转至待确认 </ElButton>
...@@ -301,6 +301,11 @@ ...@@ -301,6 +301,11 @@
转为异常单 转为异常单
</ElButton> </ElButton>
</span> </span>
<span v-if="status === 'TO_BE_CONFIRMED'" class="item">
<ElButton type="warning" @click="confirmProductToRiin">
转至锐印生产
</ElButton>
</span>
<span <span
v-if="status === 'TO_BE_CONFIRMED' || status === 'EXCEPTION_ORDER'" v-if="status === 'TO_BE_CONFIRMED' || status === 'EXCEPTION_ORDER'"
class="item" class="item"
...@@ -721,15 +726,6 @@ ...@@ -721,15 +726,6 @@
{{ row.lanshouAddress }} {{ row.lanshouAddress }}
</span> </span>
</div> </div>
<div
v-if="['TO_BE_CONFIRMED', 'STOCK_OUT'].includes(status)"
class="order-detail-item"
>
<span class="order-detail-item-label">订单延期时间:</span>
<span class="order-detail-item-value red-time">
{{ calculateDelayTime(row) }}
</span>
</div>
</div> </div>
</template> </template>
<template #price="{ row }"> <template #price="{ row }">
...@@ -819,23 +815,23 @@ ...@@ -819,23 +815,23 @@
> >
操作日志 操作日志
</ElButton> </ElButton>
</span> <!-- <ElButton
<span v-if="!row.expressSheet && row.status === 'TO_BE_CONFIRMED'"
v-if="!row.expressSheet && row.status === 'TO_BE_CONFIRMED'" link
class="operate-item" type="primary"
> @click="confirm(row)"
<ElButton link type="primary" @click="confirm(row)"> >
确认 确认
</ElButton> </ElButton> -->
</span> <ElButton
<span v-if="
v-if=" row.shipmentType === 1 &&
row.shipmentType === 1 && ['CREATE_LOGISTICS', 'WAIT_SHIPMENT'].includes(status)
['CREATE_LOGISTICS', 'WAIT_SHIPMENT'].includes(status) "
" link
class="operate-item" type="primary"
> @click="handleUpdateAddress(row)"
<ElButton link type="primary" @click="handleUpdateAddress(row)"> >
修改地址 修改地址
</ElButton> </ElButton>
</span> </span>
...@@ -959,7 +955,7 @@ ...@@ -959,7 +955,7 @@
{{ cardItem?.supplierProductNo }} {{ cardItem?.supplierProductNo }}
</span> </span>
</div> </div>
<div class="grid-item" title="店铺单号"> <div class="grid-item" title="店铺单号">
<span class="grid-item-value"> <span class="grid-item-value">
{{ cardItem?.shopNumber }} {{ cardItem?.shopNumber }}
...@@ -1292,7 +1288,6 @@ ...@@ -1292,7 +1288,6 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { getUserMarkList } from '@/api/common' import { getUserMarkList } from '@/api/common'
import { ArrowDown, WarningFilled } from '@element-plus/icons-vue' import { ArrowDown, WarningFilled } from '@element-plus/icons-vue'
import { import {
getCardOrderList, getCardOrderList,
...@@ -1325,11 +1320,12 @@ import { ...@@ -1325,11 +1320,12 @@ import {
createLogisticsOrdersApi, createLogisticsOrdersApi,
syncReceiverAddress, syncReceiverAddress,
refreshAddressApi, refreshAddressApi,
confirmProductApi,
confirmProductToRiinApi,
// handleExceptionOrderApi, // handleExceptionOrderApi,
} from '@/api/podUsOrder' } from '@/api/podUsOrder'
import UpdateAddress from './components/updateAddress.vue'
import { BaseRespData } from '@/types/api' import { BaseRespData } from '@/types/api'
import { getAllCountryApi } from '@/api/logistics.ts' import UpdateAddress from './components/updateAddress.vue'
import TableView from '@/components/TableView.vue' import TableView from '@/components/TableView.vue'
import { import {
LogListData, LogListData,
...@@ -1348,7 +1344,7 @@ import { useValue } from '@/utils/hooks/useValue' ...@@ -1348,7 +1344,7 @@ import { useValue } from '@/utils/hooks/useValue'
import { showConfirm } from '@/utils/ui' import { showConfirm } from '@/utils/ui'
import { DocumentCopy, EditPen } from '@element-plus/icons-vue' import { DocumentCopy, EditPen } from '@element-plus/icons-vue'
import { Column, ElFormItem } from 'element-plus' import { Column, ElFormItem } from 'element-plus'
import { computed, onMounted, ref, nextTick, onBeforeUnmount } from 'vue' import { computed, onMounted, ref, nextTick } from 'vue'
import FastProduction from './FastProduction.vue' import FastProduction from './FastProduction.vue'
import { filePath } from '@/api/axios' import { filePath } from '@/api/axios'
import PodMakeOrder from './PodMakeOrder.vue' import PodMakeOrder from './PodMakeOrder.vue'
...@@ -1359,6 +1355,7 @@ import RightClickMenu from '@/components/RightClickMenu.vue' ...@@ -1359,6 +1355,7 @@ import RightClickMenu from '@/components/RightClickMenu.vue'
import ResultInfo from './components/ResultInfo.vue' import ResultInfo from './components/ResultInfo.vue'
import { isArray, isString } from '@/utils/validate' import { isArray, isString } from '@/utils/validate'
import platformJson from '../../../json/platform.json' import platformJson from '../../../json/platform.json'
import { getAllCountryApi } from '@/api/logistics.ts'
declare global { declare global {
interface Window { interface Window {
ActiveXObject: { ActiveXObject: {
...@@ -1373,14 +1370,26 @@ declare global { ...@@ -1373,14 +1370,26 @@ declare global {
responseBody?: unknown responseBody?: unknown
} }
} }
const tabsNav = ref<Tab[]>()
const updateAddVisible = ref(false) const updateAddVisible = ref(false)
const tabsNav = ref<Tab[]>()
const countryList = ref([])
const resultRefs = ref<InstanceType<typeof ResultInfo> | null>(null) const resultRefs = ref<InstanceType<typeof ResultInfo> | null>(null)
const confirmDialogShow = ref(false) const confirmDialogShow = ref(false)
const downloadLoading = ref(false) const downloadLoading = ref(false)
const isChangeWay = ref(false) const isChangeWay = ref(false)
const confirmData = ref([]) const confirmData = ref([])
const logisticsWayData = ref([]) const logisticsWayData = ref([])
const currentRow = ref<AddressInfo>({
receiverName: '',
receiverPhone: '',
receiverCountry: '',
receiverProvince: '',
receiverCity: '',
receiverDistrict: '',
receiverAddress1: '',
receiverAddress2: '',
receiverPostCode: '',
})
const confirmSelectionData = ref<LogisticsData[]>([]) const confirmSelectionData = ref<LogisticsData[]>([])
const confirmRowData = ref<ProductList | null>(null) const confirmRowData = ref<ProductList | null>(null)
const status = ref('TO_BE_CONFIRMED') const status = ref('TO_BE_CONFIRMED')
...@@ -1403,18 +1412,6 @@ const [searchForm] = useValue<SearchForm>({ ...@@ -1403,18 +1412,6 @@ const [searchForm] = useValue<SearchForm>({
platform: '', platform: '',
productionClient: '', productionClient: '',
}) })
const countryList = ref([])
const currentRow = ref<AddressInfo>({
receiverName: '',
receiverPhone: '',
receiverCountry: '',
receiverProvince: '',
receiverCity: '',
receiverDistrict: '',
receiverAddress1: '',
receiverAddress2: '',
receiverPostCode: '',
})
const exceptionStatus = ref(1) const exceptionStatus = ref(1)
const userMarkList = ref<string[]>([]) const userMarkList = ref<string[]>([])
const selection = ref<PodUsOrderListData[]>([]) const selection = ref<PodUsOrderListData[]>([])
...@@ -1473,6 +1470,20 @@ const getDateRange = (days = 0, type: 'past' | 'future' = 'past') => { ...@@ -1473,6 +1470,20 @@ const getDateRange = (days = 0, type: 'past' | 'future' = 'past') => {
type === 'past' ? end.subtract(days, 'day') : end.add(days, 'day') type === 'past' ? end.subtract(days, 'day') : end.add(days, 'day')
return [start.startOf('day').toDate(), end.endOf('day').toDate()] return [start.startOf('day').toDate(), end.endOf('day').toDate()]
} }
const getMonthRange = (months = 0, type: 'past' | 'future' = 'past') => {
const now = dayjs()
const start =
type === 'past' ? now.subtract(months, 'month') : now.add(months, 'month')
return [start.startOf('month').toDate(), start.endOf('month').toDate()]
}
const getWeekRange = (weeks = 0, type: 'past' | 'future' = 'past') => {
const now = dayjs()
const start =
type === 'past' ? now.subtract(weeks, 'week') : now.add(weeks, 'week')
return [start.startOf('week').toDate(), start.endOf('week').toDate()]
}
const handleRefreshAddress = async (row: PodUsOrderListData) => { const handleRefreshAddress = async (row: PodUsOrderListData) => {
try { try {
await showConfirm('确定刷新地址吗?', { await showConfirm('确定刷新地址吗?', {
...@@ -1501,19 +1512,6 @@ const handleUpdateAddress = async (row: PodUsOrderListData) => { ...@@ -1501,19 +1512,6 @@ const handleUpdateAddress = async (row: PodUsOrderListData) => {
currentRow.value = JSON.parse(JSON.stringify(row)) currentRow.value = JSON.parse(JSON.stringify(row))
updateAddVisible.value = true updateAddVisible.value = true
} }
const getMonthRange = (months = 0, type: 'past' | 'future' = 'past') => {
const now = dayjs()
const start =
type === 'past' ? now.subtract(months, 'month') : now.add(months, 'month')
return [start.startOf('month').toDate(), start.endOf('month').toDate()]
}
const getWeekRange = (weeks = 0, type: 'past' | 'future' = 'past') => {
const now = dayjs()
const start =
type === 'past' ? now.subtract(weeks, 'week') : now.add(weeks, 'week')
return [start.startOf('week').toDate(), start.endOf('week').toDate()]
}
const tableColumns = computed(() => [ const tableColumns = computed(() => [
{ {
label: '商品', label: '商品',
...@@ -1726,12 +1724,66 @@ const handleProductionClientChange = async (v: string) => { ...@@ -1726,12 +1724,66 @@ const handleProductionClientChange = async (v: string) => {
const downloadFacebook = async (row: string) => { const downloadFacebook = async (row: string) => {
window.open(filePath + row, '_blank') window.open(filePath + row, '_blank')
} }
const confirm = async (row: ProductList) => { // const confirm = async (row: ProductList) => {
confirmDialogShow.value = true // confirmDialogShow.value = true
productionClientValue.value = '' // productionClientValue.value = ''
confirmRowData.value = row // confirmRowData.value = row
confirmData.value = [] // confirmData.value = []
confirmSelectionData.value = [] // confirmSelectionData.value = []
// }
//确认生产
async function confirmProduct() {
if (selection.value.length === 0) {
return ElMessage.warning('请选择数据')
}
try {
await showConfirm('确定生产吗?', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
})
const ids = selection.value.map((el) => el.id)
const { code, data } = await confirmProductApi([...ids])
if (code === 200) {
resultInfo.value = data || []
resultRefs.value?.showDialog()
}
ElMessage.success('操作成功')
// search()
// await loadTabData()
} catch {
resultInfo.value = []
return
}
}
//转至锐印
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 || []
resultRefs.value?.showDialog()
}
ElMessage.success('操作成功')
// search()
// await loadTabData()
} catch {
resultInfo.value = []
return
}
} }
const handleConfirm = async () => { const handleConfirm = async () => {
if (!productionClientValue.value) { if (!productionClientValue.value) {
...@@ -1790,13 +1842,13 @@ const handleUpdateRemark = async (item: ProductList) => { ...@@ -1790,13 +1842,13 @@ const handleUpdateRemark = async (item: ProductList) => {
const productionClientValue = ref('') const productionClientValue = ref('')
const productionClient = ref<ProductionClient[]>() const productionClient = ref<ProductionClient[]>()
const productionClientVisible = ref(false) const productionClientVisible = ref(false)
const confirmOrder = async () => { // const confirmOrder = async () => {
if (selection.value.length === 0) { // if (selection.value.length === 0) {
return ElMessage.warning('请选择数据') // return ElMessage.warning('请选择数据')
} // }
productionClientValue.value = '' // productionClientValue.value = ''
productionClientVisible.value = true // productionClientVisible.value = true
} // }
const downloadTif = async () => { const downloadTif = async () => {
if (!selection.value.length) { if (!selection.value.length) {
...@@ -1876,6 +1928,7 @@ const updateOrder = async () => { ...@@ -1876,6 +1928,7 @@ const updateOrder = async () => {
loading.close() loading.close()
} }
} }
const assignOrder = async () => { const assignOrder = async () => {
if (selection.value.length === 0) { if (selection.value.length === 0) {
return ElMessage.warning('请选择数据') return ElMessage.warning('请选择数据')
...@@ -2280,6 +2333,7 @@ const getOrderByIdApi = async (type: string) => { ...@@ -2280,6 +2333,7 @@ const getOrderByIdApi = async (type: string) => {
const resultInfo = ref([]) const resultInfo = ref([])
const resultConfim = () => { const resultConfim = () => {
search() search()
loadTabData()
} }
/** /**
...@@ -2453,6 +2507,14 @@ const logisticsToPicking = async () => { ...@@ -2453,6 +2507,14 @@ const logisticsToPicking = async () => {
if (selection.value.length === 0) { if (selection.value.length === 0) {
return ElMessage.warning('请选择数据') return ElMessage.warning('请选择数据')
} }
if (
selection.value.some(
(el) =>
el.trackingNumber == null || String(el.trackingNumber).trim() === '',
)
) {
return ElMessage.warning('选中数据中有未创建物流的订单,请先创建物流')
}
try { try {
await ElMessageBox.confirm('确定转至待拣胚吗?', '提示', { await ElMessageBox.confirm('确定转至待拣胚吗?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
...@@ -2475,8 +2537,8 @@ const logisticsToPicking = async () => { ...@@ -2475,8 +2537,8 @@ const logisticsToPicking = async () => {
resultInfo.value = res.data || [] resultInfo.value = res.data || []
resultRefs.value?.showDialog() resultRefs.value?.showDialog()
ElMessage.success('操作成功') ElMessage.success('操作成功')
search() // search()
loadTabData() // loadTabData()
} catch (e) { } catch (e) {
resultInfo.value = [] resultInfo.value = []
console.error(e) console.error(e)
...@@ -2719,56 +2781,13 @@ const refreshMaterial = async () => { ...@@ -2719,56 +2781,13 @@ const refreshMaterial = async () => {
loading.close() loading.close()
} }
} }
// 当前时间响应式变量(每60秒更新一次)
const currentTime = ref(new Date())
// 定时器实例
let timer: number | null = null
onMounted(() => { onMounted(() => {
loadTabData() loadTabData()
getUserMark() getUserMark()
loadProductionClient() loadProductionClient()
loadWarehouseList() loadWarehouseList()
// 每60秒更新一次当前时间
timer = window.setInterval(() => {
currentTime.value = new Date()
}, 60000)
}) })
// 计算时间差(小时数)并向上取整
const calculateHoursDifference = (startDateString?: string): string => {
if (!startDateString) return '--'
try {
const startTime = new Date(startDateString)
const diffInMs = currentTime.value.getTime() - startTime.getTime()
// 转换为小时并取整:ceil向上或者round:四舍五入
const hours = Math.round(diffInMs / (1000 * 60 * 60))
return `${hours}小时`
} catch (error) {
console.error('日期解析错误:', error)
return '--'
}
}
// 根据订单状态计算延期时间
const calculateDelayTime = computed(() => (row: ProductList) => {
switch (status.value) {
case 'TO_BE_CONFIRMED':
return row.createTime ? calculateHoursDifference(row.createTime) : '--'
case 'STOCK_OUT':
return row.startStockingTime
? calculateHoursDifference(row.startStockingTime)
: '--'
default:
return '--'
}
})
onBeforeUnmount(() => {
// 组件卸载时清除定时器
if (timer) {
clearInterval(timer)
timer = null
}
})
const handleExceptionCommand = (command: number) => { const handleExceptionCommand = (command: number) => {
exceptionStatus.value = command exceptionStatus.value = command
search() search()
...@@ -2860,10 +2879,6 @@ const handleExceptionCommand = (command: number) => { ...@@ -2860,10 +2879,6 @@ const handleExceptionCommand = (command: number) => {
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.red-time {
color: red;
font-weight: bold;
}
} }
.card-list { .card-list {
...@@ -2874,6 +2889,12 @@ const handleExceptionCommand = (command: number) => { ...@@ -2874,6 +2889,12 @@ const handleExceptionCommand = (command: number) => {
height: 100%; height: 100%;
overflow-y: auto; overflow-y: auto;
} }
.operate-item {
.el-button {
margin-left: 0 !important;
margin-top: 20px !important;
}
}
.tabs-node_count { .tabs-node_count {
display: inline-block; display: inline-block;
min-width: 20px; min-width: 20px;
......
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
> >
删除 删除
</el-button> </el-button>
<el-button type="success" @click="handleExport"> 导出 </el-button> <el-button type="success" @click="handleExport"> 导出</el-button>
<el-button type="primary" @click="printProductTag"> <el-button type="primary" @click="printProductTag">
打印库存SKU标签 打印库存SKU标签
</el-button> </el-button>
...@@ -609,7 +609,7 @@ ...@@ -609,7 +609,7 @@
></el-input> ></el-input>
<el-popover placement="top-start" width="1000" trigger="click"> <el-popover placement="top-start" width="1000" trigger="click">
<div v-if="skuData.length > 0" style="height: 50vh"> <div v-if="skuData.length > 0" style="height: 50vh">
<ElTable size="small" :data="skuData" height="100%" border> <ElTable size="small" :data="filterSkuData" height="100%" border>
<ElTableColumn <ElTableColumn
show-overflow-tooltip show-overflow-tooltip
width="60" width="60"
...@@ -669,9 +669,9 @@ ...@@ -669,9 +669,9 @@
label="操作" label="操作"
> >
<template #default="{ row }"> <template #default="{ row }">
<el-icon :size="32" color="#67C23A" class="cursor-pointer" <el-icon :size="32" color="#67C23A" class="cursor-pointer">
><CirclePlusFilled @click="skudblclick(row)" <CirclePlusFilled @click="skudblclick(row)" />
/></el-icon> </el-icon>
</template> </template>
</ElTableColumn> </ElTableColumn>
</ElTable> </ElTable>
...@@ -742,7 +742,7 @@ ...@@ -742,7 +742,7 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label=""> <el-form-item label="">
<el-checkbox v-model="exportForm.delivery"> 包含详情 </el-checkbox> <el-checkbox v-model="exportForm.delivery"> 包含详情</el-checkbox>
</el-form-item> </el-form-item>
</el-form> </el-form>
<template #footer> <template #footer>
...@@ -827,7 +827,7 @@ ...@@ -827,7 +827,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { ElMessage, ElRadioGroup, ElTree } from 'element-plus' import { ElMessage, ElRadioGroup, ElTree } from 'element-plus'
import { CirclePlusFilled,Download } from '@element-plus/icons-vue' import { CirclePlusFilled, Download } from '@element-plus/icons-vue'
import splitDiv from '@/components/splitDiv/splitDiv.vue' import splitDiv from '@/components/splitDiv/splitDiv.vue'
import { ElTable } from 'element-plus' import { ElTable } from 'element-plus'
import usePageList from '@/utils/hooks/usePageList' import usePageList from '@/utils/hooks/usePageList'
...@@ -979,6 +979,7 @@ const pickerOptions = { ...@@ -979,6 +979,7 @@ const pickerOptions = {
}, },
], ],
} }
function getStartTime() { function getStartTime() {
const date = new Date() const date = new Date()
const year = date.getFullYear() const year = date.getFullYear()
...@@ -1083,6 +1084,7 @@ const printProductTag = async () => { ...@@ -1083,6 +1084,7 @@ const printProductTag = async () => {
console.error(e) console.error(e)
} }
} }
async function handlePrintProductTag() { async function handlePrintProductTag() {
const flag = printData.value.every( const flag = printData.value.every(
(el: InterWarehousePage) => el.number && el.number != '0', (el: InterWarehousePage) => el.number && el.number != '0',
...@@ -1112,6 +1114,7 @@ async function handlePrintProductTag() { ...@@ -1112,6 +1114,7 @@ async function handlePrintProductTag() {
showPrintDialog.value = false showPrintDialog.value = false
window.open(filePath + res.message, '_blank') window.open(filePath + res.message, '_blank')
} }
const batchAddCommodity = async (sku: string): Promise<InterskuList[]> => { const batchAddCommodity = async (sku: string): Promise<InterskuList[]> => {
if (!editForm.value.warehouseId) { if (!editForm.value.warehouseId) {
ElMessage.error('请选择仓库') ElMessage.error('请选择仓库')
...@@ -1137,11 +1140,14 @@ const batchAddCommodity = async (sku: string): Promise<InterskuList[]> => { ...@@ -1137,11 +1140,14 @@ const batchAddCommodity = async (sku: string): Promise<InterskuList[]> => {
return [] return []
} }
} }
interface InterImportData { interface InterImportData {
warehouseSku: string warehouseSku: string
remark?: string | null remark?: string | null
[key: string]: unknown [key: string]: unknown
} }
// 前端导入Excel // 前端导入Excel
const excelFieldMap: Record<string, keyof InterProductList> = { const excelFieldMap: Record<string, keyof InterProductList> = {
// SKU图片: 'skuImage', // SKU图片: 'skuImage',
...@@ -1545,6 +1551,12 @@ const addOtherCurrency = async () => { ...@@ -1545,6 +1551,12 @@ const addOtherCurrency = async () => {
upSection() upSection()
} }
} }
const filterSkuData = computed(() => {
const skuList = otherPurchaseData.value.map((el) => el.warehouseSku)
console.log(skuList, skuData.value)
return skuData.value.filter((el) => !skuList.includes(el.sku))
})
const addSection = async () => { const addSection = async () => {
const params = { ...editForm.value } const params = { ...editForm.value }
params.productList = otherPurchaseData.value params.productList = otherPurchaseData.value
...@@ -1607,9 +1619,10 @@ const upSection = async () => { ...@@ -1607,9 +1619,10 @@ const upSection = async () => {
} }
} }
const addPurchaseVisible = ref(false) const addPurchaseVisible = ref(false)
const purchaseTextarea = ref(null) const purchaseTextarea = ref('')
const addPurchase = async () => { const addPurchase = async () => {
addPurchaseVisible.value = true addPurchaseVisible.value = true
purchaseTextarea.value = ''
} }
const submitPurchase = async () => { const submitPurchase = async () => {
if (!purchaseTextarea.value) { if (!purchaseTextarea.value) {
...@@ -1744,20 +1757,24 @@ onMounted(() => { ...@@ -1744,20 +1757,24 @@ onMounted(() => {
width: 500px; width: 500px;
text-align: center; text-align: center;
} }
.cursor-pointer { .cursor-pointer {
cursor: pointer; cursor: pointer;
} }
.header-filter-form { .header-filter-form {
:deep(.el-form-item) { :deep(.el-form-item) {
margin-right: 14px; margin-right: 14px;
margin-bottom: 10px; margin-bottom: 10px;
} }
} }
.product-dialog-footer { .product-dialog-footer {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin: 8px 0; margin: 8px 0;
} }
$border: solid 1px #ddd; $border: solid 1px #ddd;
.send-order-list { .send-order-list {
...@@ -1805,10 +1822,12 @@ $border: solid 1px #ddd; ...@@ -1805,10 +1822,12 @@ $border: solid 1px #ddd;
.left { .left {
width: 160px; width: 160px;
:deep(.el-tree-node__content) { :deep(.el-tree-node__content) {
height: 30px; height: 30px;
line-height: 30px; line-height: 30px;
} }
:deep(.el-tree-node__label) { :deep(.el-tree-node__label) {
font-size: 13px; font-size: 13px;
cursor: pointer; cursor: pointer;
...@@ -1900,6 +1919,7 @@ $border: solid 1px #ddd; ...@@ -1900,6 +1919,7 @@ $border: solid 1px #ddd;
height: 5px; height: 5px;
background: #eff3f6; background: #eff3f6;
} }
.btn-list { .btn-list {
margin-bottom: 10px; margin-bottom: 10px;
} }
...@@ -1931,6 +1951,7 @@ $border: solid 1px #ddd; ...@@ -1931,6 +1951,7 @@ $border: solid 1px #ddd;
} }
} }
} }
.delivery-note-page { .delivery-note-page {
:deep(#top) { :deep(#top) {
height: 100%; height: 100%;
......
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