Commit 9a50b196 by zhuzhequan

podcn 流程修改

parent 786c61ea
......@@ -287,6 +287,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
......
......@@ -50,7 +50,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()
......@@ -298,14 +310,21 @@ const podOrderDetailsColumns = computed(() => [
// width: 140,
// 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',
},
......@@ -313,18 +332,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
......@@ -473,12 +495,10 @@ const renderItemBox = (bool: boolean) => {
parts.length > 3 && parts[3].startsWith('CNPSC')
? parts[3]
: parts.length > 1
? parts[1]
: parts[0]
? parts[1]
: 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,17 +766,13 @@ 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 || ''
if (
podOrderDetailsData.value &&
podOrderDetailsData.value.pickingNumber ===
podOrderDetailsData.value.purchaseNumber
podOrderDetailsData.value.purchaseNumber
) {
podOrderDetailsData.value.printResult = 'notPrintSuccess'
}
......@@ -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) => {
......@@ -977,52 +1028,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;
......@@ -1035,6 +1096,7 @@ const handleWarehouseChange = (value: string | number) => {
}
}
}
.box-top {
position: relative;
border: 1px solid #ddd;
......@@ -1046,10 +1108,12 @@ const handleWarehouseChange = (value: string | number) => {
color: #fff;
overflow: hidden;
}
.multiple-title {
position: absolute;
top: 0;
right: 0;
&::after {
position: absolute;
top: -31px;
......@@ -1060,6 +1124,7 @@ const handleWarehouseChange = (value: string | number) => {
border-color: transparent transparent red transparent;
transform: rotate(45deg);
}
.multiple-title-text {
position: absolute;
z-index: 2;
......@@ -1067,12 +1132,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;
......@@ -1080,10 +1147,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;
......@@ -1092,21 +1161,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;
......@@ -1117,10 +1190,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;
......@@ -1136,6 +1211,7 @@ const handleWarehouseChange = (value: string | number) => {
border-radius: 50%;
background-color: red;
}
.number {
position: absolute;
bottom: 3px;
......@@ -1155,6 +1231,7 @@ const handleWarehouseChange = (value: string | number) => {
flex-direction: column;
height: calc(100% - 60px);
}
.el-dialog__body {
flex: 1;
overflow: hidden;
......
......@@ -129,14 +129,14 @@
</ElFormItem>
<ElFormItem label="类型">
<el-radio-group v-model="searchForm.customizedQuantity" @click.stop="(e: Event) => handleRadioGroupClick(e)">
<el-radio-button label="single">单面</el-radio-button>
<el-radio-button label="multiple">多面</el-radio-button>
<el-radio-button value="single">单面</el-radio-button>
<el-radio-button value="multiple">多面</el-radio-button>
</el-radio-group>
</ElFormItem>
<ElFormItem label="数量">
<el-radio-group v-model="searchForm.multi" @click.stop="(e: Event) => handleMultiRadioGroupClick(e)">
<el-radio-button :label="false">单件</el-radio-button>
<el-radio-button :label="true">多件</el-radio-button>
<el-radio-button :value="false">单件</el-radio-button>
<el-radio-button :value="true">多件</el-radio-button>
</el-radio-group>
</ElFormItem>
<ElFormItem>
......@@ -321,6 +321,25 @@
></ElOption>
</ElSelect>
</ElFormItem>
<ElFormItem label="商品类型">
<ElSelect
v-model="searchForm.productMark"
placeholder="请选择商品类型"
clearable
filterable
collapse-tags
collapse-tags-tooltip
:teleported="false"
style="width: 150px"
>
<ElOption
v-for="(item, index) in productMarkList"
:key="index"
:value="item.value"
:label="item.label"
></ElOption>
</ElSelect>
</ElFormItem>
</ElForm>
<template #reference>
<el-button type="warning" @click="searchVisible = !searchVisible">
......@@ -336,8 +355,8 @@
</ElFormItem>
<ElFormItem>
<span>
<ElButton link @click="resetSearchForm" style="font-size: 12px"
><span title="重置查询条件">重置</span></ElButton
<ElButton link style="font-size: 12px" @click="resetSearchForm"
><span title="重置查询条件">重置</span></ElButton
>
</span>
</ElFormItem>
......@@ -355,32 +374,41 @@
>
<ElDropdown>
<el-button type="primary">
DTF排版<el-icon class="el-icon--right"><ArrowDown /></el-icon>
DTF排版
<el-icon class="el-icon--right">
<ArrowDown />
</el-icon>
</el-button>
<template #dropdown>
<ElDropdownMenu>
<ElDropdownItem
:loading="tifDownloadLoading"
@click="downloadTif('tiff', 42)"
>TIF(40+2cm)</ElDropdownItem
>TIF(40+2cm)
</ElDropdownItem
>
<ElDropdownItem
:loading="tifDownloadLoading"
@click="downloadTif('tiff', 60)"
>TIF(60cm)</ElDropdownItem
>TIF(60cm)
</ElDropdownItem
>
<ElDropdownItem
:loading="pngDownloadLoading"
@click="downloadTif('png', 42)"
>PNG(40+2cm)</ElDropdownItem
>PNG(40+2cm)
</ElDropdownItem
>
<ElDropdownItem
:loading="pngDownloadLoading"
@click="downloadTif('png', 60)"
>PNG(60cm)</ElDropdownItem
>PNG(60cm)
</ElDropdownItem
>
</ElDropdownMenu></template
></ElDropdown
</ElDropdownMenu>
</template
>
</ElDropdown
>
</ElFormItem>
<ElFormItem>
......@@ -516,7 +544,7 @@
</span>
<span v-if="status === 'WAIT_SHIPMENT'" class="item">
<ElButton type="primary" @click="completeDelivery()"
>完成发货</ElButton
>完成发货</ElButton
>
</span>
<span
......@@ -554,7 +582,7 @@
selection.some((item) => item.shipmentType !== 1)
"
@click="getOrderByIdApi('createLogisticsOrder')"
>创建物流订单</ElDropdownItem
>创建物流订单</ElDropdownItem
>
<ElDropdownItem
:disabled="
......@@ -562,7 +590,7 @@
selection.some((item) => item.shipmentType !== 1)
"
@click="getOrderByIdApi('getTrackingNumber')"
>获取跟踪号</ElDropdownItem
>获取跟踪号</ElDropdownItem
>
<ElDropdownItem
:disabled="
......@@ -570,7 +598,7 @@
selection.some((item) => item.shipmentType !== 1)
"
@click="getOrderByIdApi('getPrintOrder')"
>获取打印面单</ElDropdownItem
>获取打印面单</ElDropdownItem
>
<ElDropdownItem
:disabled="
......@@ -578,7 +606,7 @@
selection.some((item) => item.shipmentType !== 1)
"
@click="getOrderByIdApi('cancelLogisticsOrder')"
>取消物流订单</ElDropdownItem
>取消物流订单</ElDropdownItem
>
</ElDropdownMenu>
</template>
......@@ -600,7 +628,7 @@
class="item"
>
<ElButton type="primary" @click="downloadMaterial"
>下载素材</ElButton
>下载素材</ElButton
>
</span>
<span
......@@ -660,6 +688,18 @@
</span>
<span
v-if="
[
'WAIT_SHIPMENT',
].includes(status)
"
class="item"
>
<ElButton type="primary" @click="printNormal">
普货拣货
</ElButton>
</span>
<span
v-if="
status === 'STOCK_OUT' ||
status === 'CREATE_LOGISTICS' ||
status === 'TO_BE_ARRANGE' ||
......@@ -679,7 +719,7 @@
selection.length === 0 && cardSelection.length === 0
"
@click="rejectOrder('TO_BE_CONFIRMED')"
>待确认</ElDropdownItem
>待确认</ElDropdownItem
>
<ElDropdownItem
v-if="
......@@ -691,7 +731,7 @@
selection.length === 0 && cardSelection.length === 0
"
@click="rejectOrder('CREATE_LOGISTICS')"
>待创建物流</ElDropdownItem
>待创建物流</ElDropdownItem
>
<ElDropdownItem
v-if="status === 'PICKING' || status === 'IN_PRODUCTION'"
......@@ -699,7 +739,7 @@
selection.length === 0 && cardSelection.length === 0
"
@click="rejectOrder('TO_BE_ARRANGE')"
>待排单</ElDropdownItem
>待排单</ElDropdownItem
>
<ElDropdownItem
v-if="status === 'IN_PRODUCTION'"
......@@ -707,7 +747,7 @@
selection.length === 0 && cardSelection.length === 0
"
@click="rejectOrder('PICKING')"
>待拣胚</ElDropdownItem
>待拣胚</ElDropdownItem
>
</ElDropdownMenu>
</template>
......@@ -724,12 +764,12 @@
:loading="exportLoading"
type="success"
@click="exportData"
>导出</ElButton
>导出</ElButton
>
</span>
<span v-if="status === 'BATCH_DOWNLOAD'" class="item">
<ElButton type="danger" @click="handleBatchDelete('batch')"
>批量删除</ElButton
>批量删除</ElButton
>
</span>
</ElFormItem>
......@@ -750,7 +790,7 @@
:class="{
blue: true,
}"
>{{ item.quantity && item.quantity > 0 ? item.quantity : 0 }}</span
>{{ item.quantity && item.quantity > 0 ? item.quantity : 0 }}</span
>
</div>
</div>
......@@ -805,7 +845,7 @@
<span
v-if="interceptionStatus.production['0']"
class="tabs-node_count blue"
>{{ interceptionStatus.production['0'] }}</span
>{{ interceptionStatus.production['0'] }}</span
>
</div>
<div
......@@ -817,7 +857,7 @@
<span
v-if="interceptionStatus.production['1']"
class="tabs-node_count blue"
>{{ interceptionStatus.production['1'] }}</span
>{{ interceptionStatus.production['1'] }}</span
>
</div>
<div
......@@ -829,7 +869,7 @@
<span
v-if="interceptionStatus.production['2']"
class="tabs-node_count red"
>{{ interceptionStatus.production['2'] }}</span
>{{ interceptionStatus.production['2'] }}</span
>
</div>
<div
......@@ -841,7 +881,7 @@
<span
v-if="interceptionStatus.shipment['0']"
class="tabs-node_count blue"
>{{ interceptionStatus.shipment['0'] }}</span
>{{ interceptionStatus.shipment['0'] }}</span
>
</div>
<div
......@@ -853,7 +893,7 @@
<span
v-if="interceptionStatus.shipment['1']"
class="tabs-node_count blue"
>{{ interceptionStatus.shipment['1'] }}</span
>{{ interceptionStatus.shipment['1'] }}</span
>
</div>
<div
......@@ -865,7 +905,7 @@
<span
v-if="interceptionStatus.shipment['2']"
class="tabs-node_count red"
>{{ interceptionStatus.shipment['2'] }}</span
>{{ interceptionStatus.shipment['2'] }}</span
>
</div>
</div>
......@@ -905,7 +945,9 @@
"
placement="bottom"
>
<el-icon color="#E6A23C"><InfoFilled /></el-icon>
<el-icon color="#E6A23C">
<InfoFilled />
</el-icon>
</el-tooltip>
<span class="serial-number">{{ index + 1 }}</span>
</div>
......@@ -923,7 +965,7 @@
style="display: flex; flex-direction: column"
>
<div
v-for="img in item.previewImgs"
v-for="img in item.productMark!=='normal' ?item.previewImgs:[{url:item.variantImage}]"
:key="img"
style="text-align: center"
>
......@@ -1040,7 +1082,7 @@
</div>
<div class="goods-item-info-item">
<span class="goods-item-info-item-label"
>第三方生产单号:</span
>第三方生产单号:</span
>
<span
class="goods-item-info-item-value"
......@@ -1082,7 +1124,7 @@
>
<!-- <span class="goods-item-info-item-label">补胚状态:</span> -->
<el-tag size="small" effect="dark" type="danger"
>补胚中
>补胚中
</el-tag>
</div>
</div>
......@@ -1095,7 +1137,7 @@
</div> -->
<div class="goods-item-info-item">
<span class="goods-item-info-item-label"
>模板单价¥:</span
>模板单价¥:</span
>
<span class="goods-item-info-item-value">
{{ item.templatePrice }}
......@@ -1103,7 +1145,7 @@
</div>
<div class="goods-item-info-item">
<span class="goods-item-info-item-label"
>工艺单价¥:</span
>工艺单价¥:</span
>
<span class="goods-item-info-item-value">
{{ item.craftPrice }}
......@@ -1111,7 +1153,7 @@
</div>
<div class="goods-item-info-item">
<span class="goods-item-info-item-label"
>单件价格¥:</span
>单件价格¥:</span
>
<span class="goods-item-info-item-value">
{{ calculatedPrice(item) }}
......@@ -1120,13 +1162,13 @@
<div class="goods-item-info-item">
<span class="goods-item-info-item-label">{{
status === 'PICKING' ||
status === 'TO_BE_CONFIRMED' ||
status === 'STOCK_OUT' ||
status === 'CREATE_LOGISTICS'
? '数量:'
: '已生产数量:'
}}</span>
status === 'PICKING' ||
status === 'TO_BE_CONFIRMED' ||
status === 'STOCK_OUT' ||
status === 'CREATE_LOGISTICS'
? '数量:'
: '已生产数量:'
}}</span>
<span class="goods-item-info-item-value">
{{
status === 'PICKING' ||
......@@ -1150,12 +1192,12 @@
{{ item.replenishmentSumNum || 0 }}
</span>
<el-button
v-if="status === 'WAIT_SHIPMENT'"
v-if="status === 'WAIT_SHIPMENT' && item.productMark!=='normal'"
link
size="small"
type="success"
@click="applyForReplenishment(item)"
>申请补胚
>申请补胚
</el-button>
<!-- f -->
</div>
......@@ -1168,13 +1210,13 @@
{{ item.weight }}g
</span>
<el-button
v-if="status === 'WAIT_SHIPMENT'"
v-if="status === 'WAIT_SHIPMENT' && item.productMark!=='normal'"
link
size="small"
type="warning"
style="height: 23px; margin: 0"
@click="showArrange(3, item)"
>排版
>排版
</el-button>
</div>
</div>
......@@ -1396,17 +1438,17 @@
<el-timeline-item
:color="row.createTime ? '#409EFF' : ''"
:timestamp="row.createTime"
>创建时间
>创建时间
</el-timeline-item>
<el-timeline-item
:color="row.startStockingTime ? '#E6A23C' : ''"
:timestamp="row.startStockingTime"
>确认时间
>确认时间
</el-timeline-item>
<el-timeline-item
:color="row.finishTime ? '#67C23A' : ''"
:timestamp="row.finishTime"
>完成时间
>完成时间
</el-timeline-item>
</el-timeline>
<!-- <div class="order-time-box">
......@@ -1478,7 +1520,7 @@
</div>
</template>
<template #failReason="{ row }">
<span v-html="row.failReason" style="white-space: pre-line"></span>
<span style="white-space: pre-line" v-html="row.failReason"></span>
</template>
<template #operate="{ row }">
<div
......@@ -1645,7 +1687,9 @@
"
placement="bottom"
>
<el-icon color="#E6A23C"><InfoFilled /></el-icon>
<el-icon color="#E6A23C">
<InfoFilled />
</el-icon>
</el-tooltip>
<el-tooltip
v-if="cardItem.customTagList"
......@@ -1664,26 +1708,27 @@
type="primary"
:title="item.name || ''"
style="margin-bottom: 2px"
>{{ item.name || '' }}</el-tag
>{{ item.name || '' }}
</el-tag
>
</div>
</template>
<div
class="flex"
v-if="cardItem.customTagList?.length"
ref="tagRefs"
class="flex"
style="gap: 5px; overflow: hidden"
v-if="cardItem.customTagList?.length"
>
<el-tag
size="small"
type="primary"
v-for="(item, index) in cardItem.customTagList.slice(
0,
3,
)"
:key="index"
><span
style="
size="small"
type="primary"
><span
style="
width: 50px;
text-align: center;
overflow: hidden;
......@@ -1691,22 +1736,23 @@
text-overflow: ellipsis;
display: inline-block;
"
:title="item.name || ''"
>{{ item.name || '' }}</span
></el-tag
:title="item.name || ''"
>{{ item.name || '' }}</span
></el-tag
>
<el-tag
v-if="cardItem.customTagList?.slice(3)?.length"
size="small"
type="primary"
v-if="cardItem.customTagList?.slice(3)?.length"
>+{{ cardItem.customTagList.slice(3).length }}</el-tag
>+{{ cardItem.customTagList.slice(3).length }}
</el-tag
>
</div>
</el-tooltip>
</template>
<template
#top_right
v-if="['ZPZY', 'CXZY', 'THZY'].includes(cardItem.craftCode as string)"
#top_right
>
<img
:src="`/images/pic/${cardItem.craftCode}.png`"
......@@ -1739,8 +1785,8 @@
</div>
<Icon
name="caozuorizhi"
@click="(e: MouseEvent) => operationLog(cardItem.podJomallOrderCnId, e)"
style="width: 28px; height: 28px"
@click="(e: MouseEvent) => operationLog(cardItem.podJomallOrderCnId, e)"
>
<template #title>
<title>操作日志</title>
......@@ -1754,7 +1800,7 @@
</template>
<template #images>
<div class="flex-between">
<div v-if="cardItem.imageAry" class="images-position">
<div v-if="cardItem.imageAry " class="images-position">
<div
v-for="(item, index) in JSON.parse(
cardItem.imageAry || '',
......@@ -1806,7 +1852,7 @@
:title="`商品名称:${cardItem?.productName || ''}`"
>
<span class="grid-item-value"
>{{ cardItem?.productName }}
>{{ cardItem?.productName }}
</span>
</div>
<div
......@@ -1940,7 +1986,7 @@
</div>
<div v-if="cardItem.isReplenishment" class="grid-item">
<el-tag size="small" type="danger" effect="dark"
>补胚中
>补胚中
</el-tag>
</div>
</div>
......@@ -1953,10 +1999,10 @@
<div class="pagination">
<div class="total">
<span
>已选择
>已选择
<span style="color: red">{{
selection.length || cardSelection.length
}}</span>
selection.length || cardSelection.length
}}</span>
条数据</span
>
</div>
......@@ -1973,15 +2019,15 @@
></ElPagination>
<div class="pageSize">
<span
>自定义条数
>自定义条数
<span
><el-input
v-model="pageSize"
type="number"
style="width: 100px"
clearable
@blur="inputBlur"
></el-input
><el-input
v-model="pageSize"
type="number"
style="width: 100px"
clearable
@blur="inputBlur"
></el-input
></span>
/</span
>
......@@ -2376,7 +2422,8 @@
typesettingVisible = false
}
"
>取消</el-button
>取消
</el-button
>
<el-button type="primary" @click="submitTypesetting">确认</el-button>
</template>
......@@ -2387,6 +2434,7 @@ import { getUserMarkList } from '@/api/common'
// import { AnyObject } from '@/types/api/warehouse'
import {
InfoFilled,
Close,
CaretBottom,
CaretTop,
ArrowDown,
......@@ -2442,7 +2490,7 @@ import {
printPickPdfByBatchNumberApi,
printProductionPdfByBatchNumberApi,
batchDownloadRecomposingApi,
getCustomTagListCnApi,
getCustomTagListCnApi, printNormalPdf,
} from '@/api/podCnOrder'
import { BaseRespData } from '@/types/api'
......@@ -2471,7 +2519,7 @@ import usePageList from '@/utils/hooks/usePageList'
import { useValue } from '@/utils/hooks/useValue'
import { showConfirm } from '@/utils/ui'
import { DocumentCopy, EditPen } from '@element-plus/icons-vue'
import { Column, ElFormItem } from 'element-plus'
import { Column, ElFormItem, ElMessage } from 'element-plus'
import { computed, onMounted, ref, nextTick, reactive } from 'vue'
import FastProduction from './FastProduction.vue'
import { filePath } from '@/api/axios'
......@@ -2491,10 +2539,11 @@ import {
type NavigationGuardNext,
type RouteLocationNormalized,
} from 'vue-router'
declare global {
interface Window {
ActiveXObject: {
new (type: string): XMLHttpRequest
new(type: string): XMLHttpRequest
}
VBS_BinaryToArray: {
(data: unknown): { toArray(): number[] }
......@@ -2612,6 +2661,21 @@ const confirmDialogShow = ref(false)
const tifDownloadLoading = ref(false)
const pngDownloadLoading = ref(false)
const confirmData = ref([])
const productMarkList = [
{
label: '普通商品',
value: 'normal',
}, {
label: 'pod商品',
value: 'pod',
}, {
label: '一件定制局部印',
value: 'custom_part',
}, {
label: '一件定制满印',
value: 'custom_full',
},
]
const searchVisible = ref(false)
const confirmSelectionData = ref<LogisticsData[]>([])
const confirmRowData = ref<ProductList | null>(null)
......@@ -2622,6 +2686,7 @@ const [searchForm, resetSearchForm] = useValue<SearchForm>({
timeType: 1,
shopNumber: '',
replaceShipment: '',
productMark: '',
shipmentType: '',
userMark: '',
processNumber: '',
......@@ -2797,6 +2862,29 @@ const handleExceptionConfirm = async () => {
loading.close()
}
}
const printNormal = async () => {
await showConfirm('确定普货拣货吗?', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
})
const arr: (number | undefined)[] = []
if (!selection.value.length) {
return ElMessage.warning('请选择订单')
}
selection.value.forEach(s => {
const f = s.productList && s.productList.find(p => p.productMark === 'normal')
if (f) arr.push(s.id)
})
if (!arr.length) {
ElMessage.warning('暂无可打印的普货拣货单')
return
}
const res = await printNormalPdf(arr.join())
ElMessage.success('操作成功')
window.open(filePath + res.message)
}
const completeDelivery = async () => {
if (selection.value.length === 0) {
return ElMessage.warning('请选择订单')
......@@ -2962,8 +3050,8 @@ const interceptChange = async (status: boolean) => {
? 1
: 3
: interceptCurrent.value === 1
? 2
: 4
? 2
: 4
try {
const res = await interceptUpdateApi({
orderIds: selection.value.map((item) => item.id),
......@@ -3004,8 +3092,8 @@ const rejectOrder = async (type: string) => {
orderStatus: type,
productList: selection.value.length
? selection.value.flatMap(
(item: PodCnOrderListData) => item.productList || [],
)
(item: PodCnOrderListData) => item.productList || [],
)
: cardSelection.value,
reasonStr: value,
})
......@@ -3557,6 +3645,7 @@ const confirmRules = reactive({
},
],
})
//确认生产
function confirmProduct() {
if (selection.value.length === 0) {
......@@ -3565,6 +3654,7 @@ function confirmProduct() {
confirmManuShow.value = true
confirmFormRef.value.resetFields()
}
async function confirmSubmit() {
try {
await confirmFormRef.value.validate()
......@@ -3603,6 +3693,7 @@ async function confirmSubmit() {
ElMessage.success('操作成功')
confirmManuShow.value = false
}
const handleConfirm = async () => {
if (!productionClientValue.value) {
return ElMessage.warning('请选择生产端')
......@@ -3713,8 +3804,8 @@ const downloadTif = async (type: string, templateWidth: number) => {
a.href = window.URL.createObjectURL(blob)
a.target = '_blank'
a.download = (res.message as string).split('/')[
(res.message as string).split('/').length - 1
]
(res.message as string).split('/').length - 1
]
a.click()
pngDownloadLoading.value = false
})
......@@ -3796,7 +3887,7 @@ const downloadSingleType = async (
const handleRadioGroupClick = (event: Event) => {
const target = event.target as HTMLElement
const radioButton = target.closest('.el-radio-button')
if (radioButton) {
const input = radioButton.querySelector('input[type="radio"]') as HTMLInputElement
if (input) {
......@@ -3813,7 +3904,7 @@ const handleRadioGroupClick = (event: Event) => {
const handleMultiRadioGroupClick = (event: Event) => {
const target = event.target as HTMLElement
const radioButton = target.closest('.el-radio-button')
if (radioButton) {
const input = radioButton.querySelector('input[type="radio"]') as HTMLInputElement
if (input) {
......@@ -4837,6 +4928,7 @@ const getCustomTagList = async () => {
function tooltipContent(arr: { name: string }[]) {
return arr.map((tag) => tag.name).join('、')
}
const expressSheetUpload = async (file: File) => {
const fm = new FormData()
fm.append('file', file)
......@@ -5154,6 +5246,7 @@ useRouter().beforeEach((to, from, next) => {
// width: 100px;
// height: 100px;
position: relative;
img {
width: 65%;
}
......@@ -5200,6 +5293,7 @@ useRouter().beforeEach((to, from, next) => {
height: 100%;
overflow-y: auto;
}
.tabs-node_count {
display: inline-block;
min-width: 20px;
......@@ -5234,19 +5328,23 @@ useRouter().beforeEach((to, from, next) => {
.card-list-item {
cursor: pointer;
.flex-between {
display: flex;
justify-content: space-between;
align-items: center;
.images-position {
display: flex;
height: 30px;
gap: 10px;
.item-image {
width: 30px;
height: 30px;
border: 1px solid #909399;
cursor: pointer;
img {
width: 100%;
height: 100%;
......@@ -5254,11 +5352,13 @@ useRouter().beforeEach((to, from, next) => {
}
}
}
b {
margin-right: 5px;
font-size: 15px;
}
}
.flex-row {
display: flex;
flex-direction: row;
......@@ -5415,11 +5515,13 @@ useRouter().beforeEach((to, from, next) => {
font-size: 15px;
}
}
.orderNumber {
display: flex;
align-items: center;
justify-content: flex-start;
}
.customizedQuantity {
height: 28px;
width: 28px;
......@@ -5433,6 +5535,7 @@ useRouter().beforeEach((to, from, next) => {
font-weight: 700;
box-sizing: border-box;
}
.triangle-box {
position: absolute;
top: 0;
......
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