Commit 71d29a4a by zhuzhequan

Merge branch 'dev' into 'master'

Dev

See merge request !88
parents ae73ff91 9bbaad08
......@@ -311,6 +311,14 @@ export function getSuperPodBoxListApi(factoryNo: number | string) {
)
}
// 超级播种墙配货 获取pod订单拣货箱子详情
export function printNormalPdf(ids: string) {
return axios.get<never, BaseRespData<string>>(
'factory/podJomallOrderCn/printPickPdf',
{ params: { ids } },
)
}
// 播种墙配货 打单完成
export function submitInspectionApi(
data: { id: number; version?: number }[],
......
<template>
<template v-if="col.subs?.length">
<ElTableColumn
show-overflow-tooltip
header-align="center"
:label="col.label"
:align="col.align"
......@@ -31,7 +32,7 @@
</template>
</ElTableColumn>
</template>
<ElTableColumn v-else header-align="center" v-bind="col">
<ElTableColumn show-overflow-tooltip v-else header-align="center" v-bind="col">
<template #header="{ column, $index }">
<component
:is="() => col.headerRender(column, $index)"
......
......@@ -32,6 +32,7 @@
></ElTableColumn>
<template v-for="column in columns" :key="column.key">
<ElTableColumn
show-overflow-tooltip
v-if="column.type === 'expand'"
v-bind="column"
header-align="center"
......
......@@ -15,6 +15,7 @@ export interface ExportParams extends SearchForm {
export interface SearchForm {
timeType?: number | null
shopNumber?: string
productMark?: string
shipmentType?: string | number
replaceShipment?: string | number
userMark?: string
......@@ -97,6 +98,7 @@ export interface PodCnOrderListData {
export interface ProductList {
id: number
podJomallOrderCnId: number
productMark?: string
thirdSubOrderNumber?: string
thirdStockSku?: string
factorySubOrderNumber?: string
......
......@@ -51,7 +51,7 @@ export interface ProductList {
variantImage?: string
podJomallUsNo?: string
podJomallCnNo?: string
previewImgs?: { sort: string | number; title: string; url: string }[]
previewImgs?: { sort?: string | number; title?: string; url: string }[]
}
export interface LogisticBill {
......
......@@ -114,24 +114,26 @@
<template #image="{ row }">
<div
style="display: flex; flex-wrap: nowrap"
v-if="row.previewImgs?.length"
>
<div
v-for="img in row.previewImgs"
v-for="img in row.productMark!=='normal'?row.previewImgs:[{url:row.variantImage}]"
:key="img"
@click.stop="handleCurrentChange(img.url)"
style="cursor: pointer; margin-right: 5px; flex: 1"
@click.stop="handleCurrentChange(img.url)"
>
<img v-if="img.url" :src="img.url" alt="" />
</div>
</div>
</template>
<template #verifyResult="{ row }">
<el-icon
v-if="row.power"
style="color: #00cc00; font-size: 24px; font-weight: 900"
><Check
/></el-icon>
>
<Check
/>
</el-icon>
</template>
</TableView>
</div>
......@@ -185,10 +187,18 @@
<ElButton
type="primary"
@click="podOrderDetailsData && print(podOrderDetailsData, true)"
>手动打印</ElButton
>手动打印
</ElButton
>
<ElButton
type="primary"
@click="printNormal"
>普货拣货
</ElButton
>
<ElButton type="success" @click="handlePrintFinish"
>打单完成</ElButton
>打单完成
</ElButton
>
<ElButton type="danger" @click="handleClearBox">清空箱子</ElButton>
</div>
......@@ -249,12 +259,14 @@ import {
getPackingCnDataApi,
clearBoxApi,
getPodBoxListApi,
submitInspectionApi,
submitInspectionApi, printNormalPdf,
} from '@/api/podCnOrder'
import useUserStore from '@/store/user'
import { Check } from '@element-plus/icons-vue'
import socket from '@/utils/cnWebsocket'
import { WarehouseListData } from '@/types/api/podUsOrder'
import { ElMessage } from 'element-plus'
import { filePath } from '@/api/axios.ts'
const { getCLodop } = useLodop()
......@@ -304,13 +316,20 @@ const podOrderDetailsColumns = computed(() => [
// align: 'center',
// },
{
label: '库存SKU',
prop: 'thirdSkuCode',
width: 180,
align: 'center',
},
{
label: 'variant SKU',
prop: 'variantSku',
width: 140,
width: 150,
align: 'center',
},
{
label: '商品名称',
width: 200,
prop: 'productName',
},
......@@ -318,18 +337,21 @@ const podOrderDetailsColumns = computed(() => [
label: '购买数量',
prop: 'purchaseNumber',
width: 90,
fixed: 'right',
align: 'center',
},
{
label: '拣货数量',
prop: 'count',
width: 90,
fixed: 'right',
align: 'center',
},
{
label: '验证结果',
slot: 'verifyResult',
width: 90,
fixed: 'right',
align: 'center',
},
])
......@@ -418,7 +440,7 @@ watch(
(val) => {
if (val && val.productList?.length)
val.productList.forEach((el) => {
if (!el.previewImgs) el.previewImgs = JSON.parse(el.imageAry)
if (!el.previewImgs) el.previewImgs = JSON.parse(el.imageAry || '[]')
})
},
{ deep: true },
......@@ -447,7 +469,7 @@ const renderItemBox = (bool: boolean) => {
if (!boxItem) boxItem = { data: { productList: [] } }
const { data } = boxItem
data?.productList?.forEach((el) => {
if (!el.previewImgs) el.previewImgs = JSON.parse(el.imageAry)
if (!el.previewImgs) el.previewImgs = JSON.parse(el.imageAry || '[]')
})
if (!data) {
renderLock = false
......@@ -477,8 +499,6 @@ const renderItemBox = (bool: boolean) => {
: parts[0]
for (const product of productList) {
if (product.podJomallCnNo === currentCode) {
coverImage.value = product.previewImgs?.[0]?.url || ''
nextTick(() => {
tableRef.value?.setCurrentRow(product)
})
......@@ -523,6 +543,29 @@ const setPodBoxList = (data: WebSocketMessage) => {
orderStore.setPodBoxList(parsedData)
}
}
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 initPrintDevice = () => {
const lodop = getCLodop(null, null)
if (!lodop) return
......@@ -682,6 +725,17 @@ const initOrderDetailBox = async () => {
ElMessage.warning(res.message)
return
}
console.log(res.data)
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 || '[]')
}
})
})
console.log(res.data)
orderStore.setPodBoxList({
boxList: res.data,
factoryNo,
......@@ -712,10 +766,6 @@ const initOrderDetailBox = async () => {
podOrderDetailsData.value =
boxList.find((item) => item.data)?.data || undefined
boxIndex.value = boxList.find((item) => item.data)?.box || null
podOrderDetailsData.value?.productList?.forEach((el) => {
if (!el.previewImgs) el.previewImgs = JSON.parse(el.imageAry)
})
coverImage.value =
podOrderDetailsData.value?.productList?.[0]?.previewImgs?.[0].url || ''
......@@ -941,7 +991,8 @@ const print = (data: OrderData, forcePrint = false, callback?: () => void) => {
// }
const handleRowClick = (row: ProductList) => {
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()
}
const handleCurrentChange = (url: string) => {
......@@ -978,52 +1029,62 @@ const handleWarehouseChange = (value: string | number) => {
align-items: center;
gap: 10px;
}
.online {
color: green;
font-size: 14px;
font-weight: 600;
}
.offline {
color: red;
font-size: 14px;
font-weight: 600;
}
.pod-make-order-content {
display: flex;
height: 100%;
overflow: hidden;
gap: 10px;
}
.left-content {
display: flex;
flex-direction: column;
gap: 10px;
width: calc(100% - 900px - 20px);
}
.head-form {
display: flex;
align-items: center;
gap: 10px;
}
.table-content {
flex: 1;
overflow: hidden;
}
.middle-content {
width: 500px;
display: flex;
flex-direction: column;
gap: 5px;
}
.right-content {
width: 400px;
overflow-y: auto;
overflow-x: hidden;
}
.basic-info {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 10px;
.basic-info-item {
display: flex;
align-items: center;
......@@ -1036,6 +1097,7 @@ const handleWarehouseChange = (value: string | number) => {
}
}
}
.box-top {
position: relative;
border: 1px solid #ddd;
......@@ -1047,10 +1109,12 @@ const handleWarehouseChange = (value: string | number) => {
color: #fff;
overflow: hidden;
}
.multiple-title {
position: absolute;
top: 0;
right: 0;
&::after {
position: absolute;
top: -31px;
......@@ -1061,6 +1125,7 @@ const handleWarehouseChange = (value: string | number) => {
border-color: transparent transparent red transparent;
transform: rotate(45deg);
}
.multiple-title-text {
position: absolute;
z-index: 2;
......@@ -1068,12 +1133,14 @@ const handleWarehouseChange = (value: string | number) => {
left: -20px;
}
}
.box-top-item {
display: flex;
height: 80px;
align-items: center;
margin-bottom: 10px;
}
.box-top-item-box-index {
font-size: 60px;
color: red;
......@@ -1081,10 +1148,12 @@ const handleWarehouseChange = (value: string | number) => {
width: 120px;
font-weight: 600;
}
.box-top-item-box-index-text {
margin-right: 15px;
font-size: 30px;
}
.box-top-item-box-index-number {
font-size: 60px;
color: red;
......@@ -1093,21 +1162,25 @@ const handleWarehouseChange = (value: string | number) => {
width: 90px;
font-weight: 600;
}
.box-top-item-status {
margin-bottom: 15px;
}
.order-image {
flex: 1;
overflow: hidden;
border: 1px solid #ddd;
background: #eee;
}
.box-list {
display: grid;
grid-template-columns: repeat(7, 50px);
gap: 8px;
position: relative;
}
.box-list-item {
position: relative;
border: 1px solid #ddd;
......@@ -1118,10 +1191,12 @@ const handleWarehouseChange = (value: string | number) => {
text-align: center;
box-sizing: border-box;
border-radius: 5px;
&:not(.isNull) {
background: #819aff;
color: #fff;
}
&.active {
background: #ff9900;
color: #fff;
......@@ -1137,6 +1212,7 @@ const handleWarehouseChange = (value: string | number) => {
border-radius: 50%;
background-color: red;
}
.number {
position: absolute;
bottom: 3px;
......@@ -1156,6 +1232,7 @@ const handleWarehouseChange = (value: string | number) => {
flex-direction: column;
height: calc(100% - 60px);
}
.el-dialog__body {
flex: 1;
overflow: hidden;
......
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