Commit bce38132 by wusiyi

feat: 修改操作成功提示

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