Commit ec17d100 by linjinhong

批量下载添加打印拣货单

parent c89da26c
...@@ -563,3 +563,14 @@ export function getAccountCodeByFactoryIdApi(params: { token: string }) { ...@@ -563,3 +563,14 @@ export function getAccountCodeByFactoryIdApi(params: { token: string }) {
params, params,
}) })
} }
// 打印拣货单item
export function printPickPdfByBatchNumberApi(params: {
batchArrangeNumber: string
}) {
return axios.get<never, BaseRespData<never>>(
`factory/podJomallOrderProductUs/printPickPdfByBatchNumber`,
{
params,
},
)
}
...@@ -1448,6 +1448,15 @@ ...@@ -1448,6 +1448,15 @@
<span class="operate-item"> <span class="operate-item">
<ElButton <ElButton
link link
type="primary"
@click="printPickingOrderItem(row)"
>
打印拣货单
</ElButton>
</span>
<span class="operate-item">
<ElButton
link
type="warning" type="warning"
:loading="reComposingLoadingMap[row.id]" :loading="reComposingLoadingMap[row.id]"
@click="handleReComposingDesign(row)" @click="handleReComposingDesign(row)"
...@@ -1611,7 +1620,6 @@ ...@@ -1611,7 +1620,6 @@
</span> </span>
</template> </template>
<template #operations> <template #operations>
<div <div
v-if="cardItem?.customizedQuantity" v-if="cardItem?.customizedQuantity"
class="customizedQuantity" class="customizedQuantity"
...@@ -1653,15 +1661,12 @@ ...@@ -1653,15 +1661,12 @@
/> />
</div> </div>
</div> </div>
<div <div v-if="cardItem.platform">
v-if="cardItem.platform" <img
:src="`/images/icon/${getPlatformImg(cardItem.platform)}`"
> style="height: 30px"
<img />
:src="`/images/icon/${getPlatformImg(cardItem.platform)}`" </div>
style="height: 30px"
/>
</div>
</div> </div>
</template> </template>
<template #info> <template #info>
...@@ -1775,7 +1780,6 @@ ...@@ -1775,7 +1780,6 @@
</span> </span>
</div> </div>
<!-- <div class="grid-item" title="订单号"> <!-- <div class="grid-item" title="订单号">
<span <span
class="grid-item-value" class="grid-item-value"
...@@ -1785,7 +1789,6 @@ ...@@ -1785,7 +1789,6 @@
</span> </span>
</div> --> </div> -->
<div <div
v-if="cardItem.batchArrangeNumber" v-if="cardItem.batchArrangeNumber"
class="grid-item" class="grid-item"
...@@ -2338,6 +2341,7 @@ import { ...@@ -2338,6 +2341,7 @@ import {
completeDeliveryApi, completeDeliveryApi,
get17TrackInfoApi, get17TrackInfoApi,
getAccountCodeByFactoryIdApi, getAccountCodeByFactoryIdApi,
printPickPdfByBatchNumberApi,
} from '@/api/podUsOrder' } from '@/api/podUsOrder'
import { BaseRespData } from '@/types/api' import { BaseRespData } from '@/types/api'
...@@ -2822,7 +2826,7 @@ const tableColumns = computed(() => { ...@@ -2822,7 +2826,7 @@ const tableColumns = computed(() => {
{ {
label: '操作', label: '操作',
slot: 'operate', slot: 'operate',
width: 300, width: 350,
align: 'center', align: 'center',
fixed: 'right', fixed: 'right',
prop: 'operate', prop: 'operate',
...@@ -3536,6 +3540,27 @@ const printPickingOrder = async () => { ...@@ -3536,6 +3540,27 @@ const printPickingOrder = async () => {
loading.close() loading.close()
} }
} }
const printPickingOrderItem = async (row: { batchArrangeNum: string }) => {
console.log(333, row)
const loading = ElLoading.service({
fullscreen: true,
text: '操作中...',
background: 'rgba(0, 0, 0, 0.3)',
})
try {
const res = await printPickPdfByBatchNumberApi({
batchArrangeNumber: row.batchArrangeNum,
})
if (res.code !== 200) return
ElMessage.success('操作成功')
window.open(filePath + res.message)
} catch (e) {
console.error(e)
} finally {
loading.close()
}
}
const pickingComplete = async () => { const pickingComplete = async () => {
if (cardSelection.value.length === 0) { if (cardSelection.value.length === 0) {
return ElMessage.warning('请选择数据') return ElMessage.warning('请选择数据')
...@@ -4118,7 +4143,7 @@ const changeWaySubmit = async (title: string) => { ...@@ -4118,7 +4143,7 @@ const changeWaySubmit = async (title: string) => {
try { try {
const params = { const params = {
updateByIdParam: { updateByIdParam: {
id: currentItem.value?.id, id: currentItem.value?.id as number,
dataVersion: currentItem.value?.version as number, dataVersion: currentItem.value?.version as number,
}, },
logisticsTrialCalculation: { ...changeWayRow.value }, logisticsTrialCalculation: { ...changeWayRow.value },
......
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