Commit 4dd49110 by zhuzhequan Committed by qinjianhui

feat:podus 添加物流方式,订单来源查询条件 #ID: 1000105

parent aa5ffac2
...@@ -586,6 +586,10 @@ export function getAccountCodeByFactoryIdApi(params: { token: string }) { ...@@ -586,6 +586,10 @@ export function getAccountCodeByFactoryIdApi(params: { token: string }) {
params, params,
}) })
} }
export function getLogisticsWayApi() {
return axios.get(`logisticsWay/usableAllList`)
}
// 打印拣货单item // 打印拣货单item
export function printPickPdfByBatchNumberApi(params: { export function printPickPdfByBatchNumberApi(params: {
batchArrangeNumber: string batchArrangeNumber: string
......
...@@ -12,6 +12,8 @@ export interface ExportParams extends SearchForm { ...@@ -12,6 +12,8 @@ export interface ExportParams extends SearchForm {
export interface SearchForm { export interface SearchForm {
timeType?: number | null timeType?: number | null
shopNumber?: string shopNumber?: string
source?: string
logisticsWayId?: number | null
shipmentType?: string | number | null shipmentType?: string | number | null
userMark?: string userMark?: string
processNumber?: string processNumber?: string
......
...@@ -99,10 +99,9 @@ ...@@ -99,10 +99,9 @@
<template #image="{ row }"> <template #image="{ row }">
<div <div
style="display: flex; flex-wrap: nowrap" style="display: flex; flex-wrap: nowrap"
v-if="row.previewImgs?.length"
> >
<div <div
v-for="img in row.previewImgs" v-for="img in row.productMark!=='normal'?row.previewImgs:[{url:row.variantImage}]"
:key="img" :key="img"
@click.stop="handleCurrentChange(img.url)" @click.stop="handleCurrentChange(img.url)"
style="cursor: pointer; margin-right: 5px; flex: 1" style="cursor: pointer; margin-right: 5px; flex: 1"
...@@ -157,6 +156,12 @@ ...@@ -157,6 +156,12 @@
@click="podOrderDetailsData && print(podOrderDetailsData, true)" @click="podOrderDetailsData && print(podOrderDetailsData, true)"
>手动打印</ElButton >手动打印</ElButton
> >
<ElButton
type="primary"
@click="printNormal"
>普货拣货
</ElButton
>
<ElButton type="success" @click="handlePrintFinish" <ElButton type="success" @click="handlePrintFinish"
>打单完成</ElButton >打单完成</ElButton
> >
...@@ -220,11 +225,13 @@ import { ...@@ -220,11 +225,13 @@ import {
clearSuperAllBoxApi, clearSuperAllBoxApi,
getSuperPodBoxListApi, getSuperPodBoxListApi,
submitSuperInspectionApi, submitSuperInspectionApi,
printNormalPdf,
} from '@/api/podCnOrder' } from '@/api/podCnOrder'
import useUserStore from '@/store/user' import useUserStore from '@/store/user'
import { Check } from '@element-plus/icons-vue' import { Check } from '@element-plus/icons-vue'
import socket from '@/utils/cnSuperWebsocket' import socket from '@/utils/cnSuperWebsocket'
import { ElMessage } from 'element-plus'
import { filePath } from '@/api/axios.ts'
const { getCLodop } = useLodop() const { getCLodop } = useLodop()
const userStore = useUserStore() const userStore = useUserStore()
...@@ -268,31 +275,41 @@ const podOrderDetailsColumns = computed(() => [ ...@@ -268,31 +275,41 @@ const podOrderDetailsColumns = computed(() => [
// align: 'center', // align: 'center',
// }, // },
{ {
label: '库存SKU',
prop: 'thirdSkuCode',
width: 180,
align: 'center',
},
{
label: 'variant SKU', label: 'variant SKU',
prop: 'variantSku', prop: 'variantSku',
width: 140, width: 150,
align: 'center', align: 'center',
}, },
{ {
label: '商品名称', label: '商品名称',
width: 200,
prop: 'productName', prop: 'productName',
}, },
{ {
label: '购买数量', label: '购买数量',
prop: 'purchaseNumber',
width: 90, width: 90,
fixed: 'right',
prop: 'purchaseNumber',
align: 'center', align: 'center',
}, },
{ {
label: '拣货数量', label: '拣货数量',
prop: 'count', prop: 'count',
width: 90, width: 90,
fixed: 'right',
align: 'center', align: 'center',
}, },
{ {
label: '验证结果', label: '验证结果',
slot: 'verifyResult', slot: 'verifyResult',
fixed: 'right',
width: 90, width: 90,
align: 'center', align: 'center',
}, },
...@@ -374,7 +391,7 @@ watch( ...@@ -374,7 +391,7 @@ watch(
(val) => { (val) => {
if (val && val.productList?.length) if (val && val.productList?.length)
val.productList.forEach((el) => { val.productList.forEach((el) => {
if (!el.previewImgs) el.previewImgs = JSON.parse(el.imageAry) if (!el.previewImgs) el.previewImgs = JSON.parse(el.imageAry || '[]')
}) })
}, },
{ deep: true }, { deep: true },
...@@ -398,7 +415,7 @@ const renderItemBox = (bool: boolean) => { ...@@ -398,7 +415,7 @@ const renderItemBox = (bool: boolean) => {
if (!boxItem) boxItem = { data: { productList: [] } } if (!boxItem) boxItem = { data: { productList: [] } }
const { data } = boxItem const { data } = boxItem
data?.productList?.forEach((el) => { data?.productList?.forEach((el) => {
if (!el.previewImgs) el.previewImgs = JSON.parse(el.imageAry) if (!el.previewImgs) el.previewImgs = JSON.parse(el.imageAry || '[]')
}) })
if (!data) { if (!data) {
renderLock = false renderLock = false
...@@ -467,6 +484,30 @@ const messageChange = (data: WebSocketMessage) => { ...@@ -467,6 +484,30 @@ const messageChange = (data: WebSocketMessage) => {
setPodBoxList(more) setPodBoxList(more)
} }
} }
const printNormal = async () => {
const arr: (number | undefined)[] = [];
(podBoxList.value || []).forEach((item: PodMakeOrderData) => {
if (item.data) {
if (item.data.productList && item.data.productList.length > 0) {
const flag = item.data.productList.some((item1) => {
return item1.productMark == 'normal'
})
if (flag) {
arr?.push(item.data?.id)
}
}
}
})
if (!arr.length) {
ElMessage.warning('暂无可打印的普货拣货单')
return
}
const res = await printNormalPdf(arr.join())
ElMessage.success('操作成功')
window.open(filePath + res.message)
}
const setPodBoxList = (data: WebSocketMessage) => { const setPodBoxList = (data: WebSocketMessage) => {
const obj = data.txt const obj = data.txt
if (obj && typeof obj === 'string') { if (obj && typeof obj === 'string') {
...@@ -618,6 +659,16 @@ const initOrderDetailBox = async () => { ...@@ -618,6 +659,16 @@ const initOrderDetailBox = async () => {
ElMessage.warning(res.message) ElMessage.warning(res.message)
return return
} }
res.data.forEach(r=>{
r.data?.productList?.forEach(d=>{
if (d.productMark === 'normal') {
d.previewImgs = [{ url: d.variantImage || '' }]
} else {
if (!d.previewImgs) d.previewImgs = JSON.parse(d.imageAry || '[]')
}
})
})
orderStore.setPodBoxList({ orderStore.setPodBoxList({
boxList: res.data, boxList: res.data,
factoryNo, factoryNo,
...@@ -869,7 +920,8 @@ const clearAllBox = async () => { ...@@ -869,7 +920,8 @@ const clearAllBox = async () => {
} }
const handleRowClick = (row: ProductList) => { const handleRowClick = (row: ProductList) => {
console.log(907, row) console.log(907, row)
coverImage.value = row.previewImgs?.[0]?.url || '' const previewImages = row.productMark!=='normal'?row.previewImgs:[{url:row.variantImage}]
coverImage.value =previewImages?.[0]?.url || ''
productionOrderRef.value.focus() productionOrderRef.value.focus()
} }
const handleCurrentChange = (url: string) => { const handleCurrentChange = (url: string) => {
......
<template> <template>
<div class="card flex-column h-100 overflow-hidden"> <div class="card flex-column h-100 overflow-hidden">
<div class="header-filter-form"> <div class="header-filter-form">
<ElForm :model="searchForm" size="default" inline> <ElForm label-position="left" label-width="70px" :model="searchForm" size="default" inline>
<!-- <div> --> <!-- <div> -->
<ElFormItem label="仓库"> <ElFormItem label="仓库">
<ElSelect <ElSelect
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
collapse-tags collapse-tags
collapse-tags-tooltip collapse-tags-tooltip
placeholder="请输入工艺" placeholder="请输入工艺"
style="width: 230px" style="width: 150px"
> >
<el-option <el-option
v-for="item in craftList" v-for="item in craftList"
...@@ -313,6 +313,38 @@ ...@@ -313,6 +313,38 @@
></ElOption> ></ElOption>
</ElSelect> </ElSelect>
</ElFormItem> </ElFormItem>
<ElFormItem label="物流方式">
<ElSelect
v-model="searchForm.logisticsWayId"
placeholder="请选择"
clearable
:teleported="false"
style="width: 150px"
>
<ElOption
v-for="(item, index) in logisticsWayList "
:key="index"
:value="item.id"
:label="item.name"
></ElOption>
</ElSelect>
</ElFormItem>
<ElFormItem label="订单来源">
<ElSelect
v-model="searchForm.source"
placeholder="请选择"
clearable
:teleported="false"
style="width: 150px"
>
<ElOption
v-for="(item, index) in sourceList "
:key="index"
:value="item.id"
:label="item.name"
></ElOption>
</ElSelect>
</ElFormItem>
</ElForm> </ElForm>
<template #reference> <template #reference>
<el-button type="warning" @click="searchVisible = !searchVisible"> <el-button type="warning" @click="searchVisible = !searchVisible">
...@@ -2867,7 +2899,7 @@ import { ...@@ -2867,7 +2899,7 @@ import {
changeToFinished, changeToFinished,
updateTrackingNumberAndRegister, updateTrackingNumberAndRegister,
countTrackRegisterApi, countTrackRegisterApi,
getCustomTagListApi, getCustomTagListApi, getLogisticsWayApi,
} from '@/api/podUsOrder' } from '@/api/podUsOrder'
import { BaseRespData } from '@/types/api' import { BaseRespData } from '@/types/api'
...@@ -2937,9 +2969,20 @@ declare global { ...@@ -2937,9 +2969,20 @@ declare global {
responseBody?: unknown responseBody?: unknown
} }
} }
const sourceList = [
{
name:'erp推送',
id:'jomall-erp'
},
{
name:'第三方推送',
id:'third-party'
}
]
const tabsNav = ref<Tab[]>() const tabsNav = ref<Tab[]>()
const isAuto = ref(true) const isAuto = ref(true)
const countryList = ref([]) const countryList = ref([])
const logisticsWayList = ref<{name:string,id:number}[]>([])
const currentRow = ref<AddressInfo>({ const currentRow = ref<AddressInfo>({
receiverName: '', receiverName: '',
receiverPhone: '', receiverPhone: '',
...@@ -3087,6 +3130,8 @@ const detailData = ref({}) ...@@ -3087,6 +3130,8 @@ const detailData = ref({})
const [searchForm, resetSearchForm] = useValue<SearchForm>({ const [searchForm, resetSearchForm] = useValue<SearchForm>({
timeType: 1, timeType: 1,
shopNumber: '', shopNumber: '',
source: '',
logisticsWayId: null,
shipmentType: '', shipmentType: '',
userMark: '', userMark: '',
processNumber: '', processNumber: '',
...@@ -6118,7 +6163,14 @@ const getTagName = (row: ProductList) => { ...@@ -6118,7 +6163,14 @@ const getTagName = (row: ProductList) => {
: '' : ''
} }
const getLogisticsWay = async ()=>{
const {data} = await getLogisticsWayApi()
logisticsWayList.value = data
}
getPermission() getPermission()
getLogisticsWay()
const globalProperties = const globalProperties =
getCurrentInstance()?.appContext.config.globalProperties // 获取全局挂载 getCurrentInstance()?.appContext.config.globalProperties // 获取全局挂载
const isPermissionBtn = globalProperties?.$isPermissionBtn const isPermissionBtn = globalProperties?.$isPermissionBtn
......
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