|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <el-card class="box-card">
|
|
|
+ <el-card class="box-card" v-loading="loading">
|
|
|
<div style="padding: 8px; text-align: center" v-if="orderDetail.code || orderDetail.wlnCode">
|
|
|
<span style="font-size: 18px; font-weight: 700">{{ orderDetail.code }} </span>
|
|
|
<span style="font-size: 18px; font-weight: 700" v-if="orderDetail.wlnCode"> ({{ orderDetail.wlnCode }})</span>
|
|
@@ -219,6 +219,7 @@ const clickCancel = () => {
|
|
|
});
|
|
|
}
|
|
|
};
|
|
|
+const loading = ref(false);
|
|
|
const submitForm = () => {
|
|
|
proxy.$refs.submit.handleSubmit(() => {
|
|
|
if (formData.data.orderExchangeDetailList && formData.data.orderExchangeDetailList.length > 0) {
|
|
@@ -233,10 +234,17 @@ const submitForm = () => {
|
|
|
} else {
|
|
|
formData.data.fileList = [];
|
|
|
}
|
|
|
- proxy.post("/orderExchange/add", formData.data).then(() => {
|
|
|
- ElMessage({ message: "提交成功", type: "success" });
|
|
|
- clickCancel();
|
|
|
- });
|
|
|
+ loading.value = true;
|
|
|
+ proxy.post("/orderExchange/add", formData.data).then(
|
|
|
+ () => {
|
|
|
+ ElMessage({ message: "提交成功", type: "success" });
|
|
|
+ clickCancel();
|
|
|
+ },
|
|
|
+ (err) => {
|
|
|
+ console.log(err);
|
|
|
+ loading.value = false;
|
|
|
+ }
|
|
|
+ );
|
|
|
} else {
|
|
|
return ElMessage("请添加售后商品");
|
|
|
}
|