Commit 62deaf48 by qinjianhui

Merge branch 'dev_complete_delivery' into 'dev'

Dev complete delivery

See merge request !252
parents c82edc93 9f46b97f
...@@ -589,6 +589,16 @@ export function orderWeighingPodOrderApi(params: unknown) { ...@@ -589,6 +589,16 @@ export function orderWeighingPodOrderApi(params: unknown) {
) )
} }
// 完成发货
export function finishShipmentPodOrderApi(params: unknown) {
return axios.post<never, BaseRespData<never>>(
'factory/podOrder/finish-shipment',
params as {
podOrderWeighingParams: { id?: string; outWarehouseWeight?: string }[]
},
)
}
// 单件打单:根据 SKU/单号查询明细 // 单件打单:根据 SKU/单号查询明细
export function getSingleQueryPodOrderApi( export function getSingleQueryPodOrderApi(
code: string, code: string,
......
...@@ -636,6 +636,9 @@ ...@@ -636,6 +636,9 @@
<span v-if="status === 'PENDING_DELIVERY'" class="item"> <span v-if="status === 'PENDING_DELIVERY'" class="item">
<ElButton type="primary" @click="handleWeightSort">称重分拣</ElButton> <ElButton type="primary" @click="handleWeightSort">称重分拣</ElButton>
<ElButton type="success" @click="handleCompleteDelivery"
>完成发货</ElButton
>
</span> </span>
<!-- 已完成 --> <!-- 已完成 -->
<template v-if="status === 'COMPLETED'"> <template v-if="status === 'COMPLETED'">
...@@ -1281,6 +1284,7 @@ import { ...@@ -1281,6 +1284,7 @@ import {
getByOperationNoLogApi, getByOperationNoLogApi,
listByNoPodOrderApi, listByNoPodOrderApi,
orderWeighingPodOrderApi, orderWeighingPodOrderApi,
finishShipmentPodOrderApi,
getSingleQueryPodOrderApi, getSingleQueryPodOrderApi,
submitPodPrintOrderCompleteApi, submitPodPrintOrderCompleteApi,
getFactoryOrderNewOperateDetailApi, getFactoryOrderNewOperateDetailApi,
...@@ -3095,6 +3099,44 @@ const handleProductionComplete = async () => { ...@@ -3095,6 +3099,44 @@ const handleProductionComplete = async () => {
const handleWeightSort = () => { const handleWeightSort = () => {
weightDialogRef.value?.open() weightDialogRef.value?.open()
} }
const handleCompleteDelivery = () => {
if (!ensureSelection()) return
ElMessageBox.confirm(
`<div>确定完成发货吗?</div>
<div style="color: #ff2626; margin-top: 8px; font-size: 13px;">注意:完成发货前请先核对商品重量</div>`,
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
dangerouslyUseHTMLString: true,
},
)
.then(async () => {
const params = {
podOrderWeighingParams: selectedRows.value.map((row) => ({
id: String(row.id),
outWarehouseWeight:
row.weight != null ? String(row.weight) : undefined,
})),
}
const loading = ElLoading.service({
fullscreen: true,
text: '操作中...',
background: 'rgba(0, 0, 0, 0.3)',
})
try {
const res = await finishShipmentPodOrderApi(params)
if (res.code !== 200) return
ElMessage.success('操作成功')
} catch (e) {
console.error(e)
} finally {
loading.close()
refreshCurrentView({ isRefreshTree: true })
}
})
.catch(() => {})
}
const handleArchiveOrder = async () => { const handleArchiveOrder = async () => {
await executeBatchAction({ await executeBatchAction({
getIds: getSelectedIds, getIds: getSelectedIds,
......
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