Commit 5e0417a2 by wusiyi

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

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