Commit bce38132 by wusiyi

feat: 修改操作成功提示

parent 71042b4c
......@@ -3645,8 +3645,9 @@ const getOrderByIdApi = async (type: string) => {
}
}
// 驳回
const rejectOrder = async (type: string) => {
if (selection.value.length === 0) {
if (selection.value.length === 0 && cardSelection.value.length === 0) {
return ElMessage.warning('请选择数据')
}
const loading = ElLoading.service({
......@@ -3657,14 +3658,22 @@ const rejectOrder = async (type: string) => {
try {
const res = await rejectToApi({
orderStatus: type,
productList: selection.value.flatMap(
(item: PodUsOrderListData) => item.productList || [],
),
productList: selection.value.length
? selection.value.flatMap(
(item: PodUsOrderListData) => item.productList || [],
)
: cardSelection.value,
})
if (res.code !== 200) return
resultInfo.value = res.data
resultRefs.value?.showDialog()
if (resultInfo.value.length) {
resultRefs.value?.showDialog()
} else {
ElMessage.success('操作成功')
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