Commit e4727964 by wusiyi

feat: 驳回成功消息弹窗修改

parent 5e0417a2
......@@ -508,7 +508,7 @@ export function updateToWaitShipmentApi(params: {
// 驳回
export function rejectToApi(params: {
orderStatus: string
productList: ProductList[][]
productList: ProductList[]
}) {
return axios.post<never, BaseRespData<never>>(
`factory/podJomallOrderUs/rejectTo`,
......
......@@ -412,7 +412,7 @@
<ElDropdownMenu>
<ElDropdownItem
:disabled="
selection.length === 0 ||
(selection.length === 0 && cardSelection.length === 0) ||
selection.some((item) => item.shipmentType !== 1)
"
@click="getOrderByIdApi('createLogisticsOrder')"
......@@ -420,7 +420,7 @@
>
<ElDropdownItem
:disabled="
selection.length === 0 ||
(selection.length === 0 && cardSelection.length === 0) ||
selection.some((item) => item.shipmentType !== 1)
"
@click="getOrderByIdApi('getTrackingNumber')"
......@@ -428,7 +428,7 @@
>
<ElDropdownItem
:disabled="
selection.length === 0 ||
(selection.length === 0 && cardSelection.length === 0) ||
selection.some((item) => item.shipmentType !== 1)
"
@click="getOrderByIdApi('getPrintOrder')"
......@@ -436,7 +436,7 @@
>
<ElDropdownItem
:disabled="
selection.length === 0 ||
(selection.length === 0 && cardSelection.length === 0) ||
selection.some((item) => item.shipmentType !== 1)
"
@click="getOrderByIdApi('cancelLogisticsOrder')"
......@@ -505,55 +505,36 @@
<template #dropdown>
<ElDropdownMenu>
<ElDropdownItem
:disabled="
selection.length === 0 ||
selection.some((item) => item.shipmentType !== 1)
v-if="
status === 'STOCK_OUT' ||
status === 'CREATE_LOGISTICS' ||
status === 'TO_BE_ARRANGE' ||
status === 'PICKING' ||
status === 'IN_PRODUCTION'
"
:disabled="selection.length === 0"
@click="rejectOrder('TO_BE_CONFIRMED')"
>待确认</ElDropdownItem
>
<!-- <ElDropdownItem
v-if="status !== 'STOCK_OUT'"
:disabled="
selection.length === 0 ||
selection.some((item) => item.shipmentType !== 1)
"
@click="rejectOrder('STOCK_OUT')"
>缺货</ElDropdownItem
> -->
<ElDropdownItem
v-if="status !== 'STOCK_OUT' && status !== 'TO_BE_ARRANGE'"
:disabled="
selection.length === 0 ||
selection.some((item) => item.shipmentType !== 1)
v-if="
status === 'IN_PRODUCTION' ||
status === 'TO_BE_ARRANGE' ||
status === 'PICKING'
"
:disabled="selection.length === 0"
@click="rejectOrder('CREATE_LOGISTICS')"
>待创建物流</ElDropdownItem
>
<ElDropdownItem
v-if="
status !== 'STOCK_OUT' &&
status !== 'TO_BE_ARRANGE' &&
status !== 'PICKING'
"
:disabled="
selection.length === 0 ||
selection.some((item) => item.shipmentType !== 1)
"
v-if="status === 'PICKING' || status === 'IN_PRODUCTION'"
:disabled="selection.length === 0"
@click="rejectOrder('TO_BE_ARRANGE')"
>待排单</ElDropdownItem
>
<ElDropdownItem
v-if="
status !== 'STOCK_OUT' &&
status !== 'TO_BE_ARRANGE' &&
status !== 'PICKING' &&
status !== 'IN_PRODUCTION'
"
:disabled="
selection.length === 0 ||
selection.some((item) => item.shipmentType !== 1)
"
v-if="status === 'IN_PRODUCTION'"
:disabled="selection.length === 0"
@click="rejectOrder('PICKING')"
>待拣胚</ElDropdownItem
>
......@@ -3669,22 +3650,13 @@ const rejectOrder = async (type: string) => {
const res = await rejectToApi({
orderStatus: type,
productList: selection.value.flatMap(
(item: PodUsOrderListData) => item.productList,
(item: PodUsOrderListData) => item.productList || [],
),
})
if (res.code !== 200) return
await ElMessageBox.alert(
res.data.map((i) => i.message).join('<br>'),
'操作成功',
{
confirmButtonText: '确定',
dangerouslyUseHTMLString: true,
},
).then(() => {
search()
loadTabData()
})
resultInfo.value = res.data
resultRefs.value?.showDialog()
} catch (e) {
console.log(e)
} finally {
......
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