feat: 延迟弹窗控制可选择数量
This commit is contained in:
+27
-1
@@ -137,6 +137,7 @@
|
||||
:order-no="state.orderInfo.no || ''"
|
||||
:order-time="formatCreateTime(state.orderInfo.createTime) || ''"
|
||||
:order-data="state.orderInfo"
|
||||
:delay-records="state.delayRecords"
|
||||
@close="closeDelayShipmentPopup"
|
||||
@submit="handleDelayShipmentSubmit"
|
||||
/>
|
||||
@@ -248,7 +249,28 @@
|
||||
const closeDelayShipmentPopup = () => {};
|
||||
const closeNowShipmentPopup = () => {};
|
||||
|
||||
const openDelayShipmentPopup = () => {
|
||||
const reloadDelayRecords = async () => {
|
||||
if (!isAiStoreOrder.value) {
|
||||
state.delayRecords = [];
|
||||
return;
|
||||
}
|
||||
const orderId = resolveAiOrderId(state.orderInfo);
|
||||
if (!orderId) {
|
||||
state.delayRecords = [];
|
||||
return;
|
||||
}
|
||||
try {
|
||||
const delayRes = await getAiOrderDelayRecords({ orderId });
|
||||
if (delayRes.code === 0 && Array.isArray(delayRes.data)) {
|
||||
state.delayRecords = delayRes.data;
|
||||
return;
|
||||
}
|
||||
} catch (e) {
|
||||
}
|
||||
state.delayRecords = [];
|
||||
};
|
||||
|
||||
const openDelayShipmentPopup = async () => {
|
||||
const id = resolveAiOrderId(state.orderInfo);
|
||||
if (!id) {
|
||||
uni.showToast({
|
||||
@@ -257,6 +279,10 @@
|
||||
});
|
||||
return;
|
||||
}
|
||||
try {
|
||||
await reloadDelayRecords();
|
||||
} catch (e) {
|
||||
}
|
||||
delayShipmentPopupRef.value?.open();
|
||||
};
|
||||
const openNowShipmentPopup = () => {
|
||||
|
||||
Reference in New Issue
Block a user