Commit 5e0417a2 by wusiyi

feat: 修改驳回请求参数和结果展示

parent b13e7dea
......@@ -512,7 +512,7 @@
@click="rejectOrder('TO_BE_CONFIRMED')"
>待确认</ElDropdownItem
>
<ElDropdownItem
<!-- <ElDropdownItem
v-if="status !== 'STOCK_OUT'"
:disabled="
selection.length === 0 ||
......@@ -520,7 +520,7 @@
"
@click="rejectOrder('STOCK_OUT')"
>缺货</ElDropdownItem
>
> -->
<ElDropdownItem
v-if="status !== 'STOCK_OUT' && status !== 'TO_BE_ARRANGE'"
:disabled="
......@@ -3668,14 +3668,23 @@ const rejectOrder = async (type: string) => {
try {
const res = await rejectToApi({
orderStatus: type,
productList: selection.value.map(
(item: PodUsOrderListData) => item.productList as ProductList[],
productList: selection.value.flatMap(
(item: PodUsOrderListData) => item.productList,
),
})
if (res.code !== 200) return
ElMessage.success('操作成功')
search()
loadTabData()
await ElMessageBox.alert(
res.data.map((i) => i.message).join('<br>'),
'操作成功',
{
confirmButtonText: '确定',
dangerouslyUseHTMLString: true,
},
).then(() => {
search()
loadTabData()
})
} 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