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