💊 fix: 【后台】作废key,兑换码时,有待领取/待发放订单时,提示增加一个待发放订单状态。
This commit is contained in:
parent
349cd527b2
commit
9fca5fad96
|
@ -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 }
|
||||
|
|
Loading…
Reference in New Issue