💊 fix: 【后台】作废key,兑换码时,有待领取/待发放订单时,提示增加一个待发放订单状态。

This commit is contained in:
wangsongsole 2023-06-29 13:59:59 +08:00
parent 349cd527b2
commit 9fca5fad96
1 changed files with 19 additions and 17 deletions

View File

@ -1,9 +1,9 @@
import { import {
searchPendingOrderByObject, searchPendingOrderByObject,
searchPendingOrderByHash, searchPendingOrderByHash,
searchPendingOrderByKeys, searchPendingOrderByKeys
} from "@/assets/api.js"; } from "@/assets/api.js"
import { Sweetalert } from "zent"; import { Sweetalert } from "zent"
// === 公用接口函数 === // === 公用接口函数 ===
/** /**
@ -17,13 +17,13 @@ import { Sweetalert } from "zent";
*/ */
const commonSearchOrder = (data, apiType = 3) => { const commonSearchOrder = (data, apiType = 3) => {
return new Promise(async (res, rej) => { return new Promise(async (res, rej) => {
let searchRes = null; let searchRes = null
if (apiType === 1) { if (apiType === 1) {
searchRes = await searchPendingOrderByHash(data); searchRes = await searchPendingOrderByHash(data)
} else if (apiType === 2) { } else if (apiType === 2) {
searchRes = await searchPendingOrderByKeys(data); searchRes = await searchPendingOrderByKeys(data)
} else { } else {
searchRes = await searchPendingOrderByObject(data); searchRes = await searchPendingOrderByObject(data)
} }
if (searchRes.code === 200) { if (searchRes.code === 200) {
if (searchRes.data.have === true) { if (searchRes.data.have === true) {
@ -32,24 +32,26 @@ const commonSearchOrder = (data, apiType = 3) => {
closeBtn: true, closeBtn: true,
title: "确认操作", title: "确认操作",
content: ( content: (
<p>该key批次(key兑换码)下面有待领取订单是否继续作废 </p> <p>
该key批次(key兑换码)下面有{searchRes.data.order.status_text}订单是否继续作废
</p>
), ),
onConfirm() { onConfirm() {
res(2); res(2)
}, },
onCancel() { onCancel() {
res(0); res(0)
}, },
className: "questModal", className: "questModal",
parentComponent: this, parentComponent: this
}); })
} else { } else {
res(1); res(1)
} }
} else { } else {
rej(searchRes); rej(searchRes)
} }
}); })
}; }
export { commonSearchOrder }; export { commonSearchOrder }