|
|
@@ -44,12 +44,13 @@ export function useUpload() {
|
|
|
showModal({
|
|
|
title: '删除图片',
|
|
|
content: `你确定要删除第${idx + 1}张图片吗?`,
|
|
|
- success() {
|
|
|
- setFiles(function (prev) {
|
|
|
- const next = [...prev];
|
|
|
- next.splice(idx, 1);
|
|
|
- return next;
|
|
|
- });
|
|
|
+ success({confirm}) {
|
|
|
+ confirm &&
|
|
|
+ setFiles(function (prev) {
|
|
|
+ const next = [...prev];
|
|
|
+ next.splice(idx, 1);
|
|
|
+ return next;
|
|
|
+ });
|
|
|
},
|
|
|
});
|
|
|
};
|
|
|
@@ -103,14 +104,15 @@ export function useSubmit({customerNo, truckNo, anomaly, note, imgs}) {
|
|
|
showModal({
|
|
|
title: '确认收货',
|
|
|
content: `你确认要对${truckNo}${customerNo}进行确认收货吗?`,
|
|
|
- success() {
|
|
|
- mutate({
|
|
|
- customer: customerNo,
|
|
|
- truckNo,
|
|
|
- anomaly: anomaly ? '1' : '0',
|
|
|
- note,
|
|
|
- imgs: imgUrls,
|
|
|
- });
|
|
|
+ success({confirm}) {
|
|
|
+ confirm &&
|
|
|
+ mutate({
|
|
|
+ customer: customerNo,
|
|
|
+ truckNo,
|
|
|
+ anomaly: anomaly ? '1' : '0',
|
|
|
+ note,
|
|
|
+ imgs: imgUrls,
|
|
|
+ });
|
|
|
},
|
|
|
});
|
|
|
}
|