feat: 延迟弹窗控制可选择数量
This commit is contained in:
@@ -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 }) => {
|
||||
|
||||
Reference in New Issue
Block a user