feat: 延迟弹窗控制可选择数量

This commit is contained in:
2026-08-06 14:52:56 +08:00
parent 79f3e63a90
commit 53f0736d29
3 changed files with 326 additions and 59 deletions
+11 -14
View File
@@ -108,6 +108,7 @@
:order-no="props.data.no || ''"
:order-time="formatCreateTime(props.data.createTime) || ''"
:order-data="props.data"
:delay-records="state.delayRecords"
@close="closeDelayShipmentPopup"
@submit="handleDelayShipmentSubmit"
/>
@@ -247,25 +248,13 @@
}
};
watch(
() => resolveAiOrderId(props.data),
(value) => {
if (!value) return;
state.delayRecordsLoaded = false;
loadDelayRecords(true);
},
{ immediate: false },
);
onMounted(() => {
loadDelayRecords();
});
const nowShipmentPopupRef = ref();
const delayShipmentPopupRef = ref();
const closeNowShipmentPopup = () => {};
const closeDelayShipmentPopup = () => {};
const openDelayShipmentPopup = (data) => {
const openDelayShipmentPopup = async (data) => {
const id = resolveAiOrderId(data);
if (!id) {
uni.showToast({
@@ -274,9 +263,13 @@
});
return;
}
try {
await loadDelayRecords(true);
} catch (e) {
}
delayShipmentPopupRef.value?.open();
};
const openNowShipmentPopup = (data) => {
const openNowShipmentPopup = async (data) => {
const id = resolveAiOrderId(data);
if (!id) {
uni.showToast({
@@ -285,6 +278,10 @@
});
return;
}
try {
await loadDelayRecords(true);
} catch (e) {
}
nowShipmentPopupRef.value?.open();
};
const handleDelayShipmentSubmit = async ({ items, close }) => {