|
@@ -180,7 +180,8 @@
|
|
|
</template>
|
|
</template>
|
|
|
<script setup>
|
|
<script setup>
|
|
|
import { listApi } from "@/plugins/api/shopping/logistics";
|
|
import { listApi } from "@/plugins/api/shopping/logistics";
|
|
|
-import { auditApi, refundApi, redoApi } from "@/plugins/api/shopping/sales";
|
|
|
|
|
|
|
+import { auditApi, refundApi, redoApi,detailRefundApi } from "@/plugins/api/shopping/sales";
|
|
|
|
|
+import {ElMessage} from "element-plus";
|
|
|
|
|
|
|
|
let ruleForm = ref({});
|
|
let ruleForm = ref({});
|
|
|
let ruleForm2 = ref({});
|
|
let ruleForm2 = ref({});
|
|
@@ -227,13 +228,15 @@ function initFun(row) {
|
|
|
if (typeof variable === 'string') {
|
|
if (typeof variable === 'string') {
|
|
|
// 变量是字符串
|
|
// 变量是字符串
|
|
|
if (row.refund_info.refund_img) {
|
|
if (row.refund_info.refund_img) {
|
|
|
- imgList.value = JSON.parse(row.refund_info.refund_img);
|
|
|
|
|
|
|
+ imgList.value = JSON.parse(row.refund_info.refund_img)||[];
|
|
|
}
|
|
}
|
|
|
}else{
|
|
}else{
|
|
|
- imgList.value=row.refund_info.refund_img
|
|
|
|
|
|
|
+ imgList.value=row.refund_info.refund_img||[];
|
|
|
}
|
|
}
|
|
|
ruleForm.value.order_no = row.order_no;
|
|
ruleForm.value.order_no = row.order_no;
|
|
|
ruleForm2.value.order_no = row.order_no;
|
|
ruleForm2.value.order_no = row.order_no;
|
|
|
|
|
+ console.log(ruleForm.value,"ruleForm.value=>>>>>>>>>>>.")
|
|
|
|
|
+ ruleForm2.value.refund_price = showForm.value.amount_total||"";
|
|
|
dialogVisible.value = true;
|
|
dialogVisible.value = true;
|
|
|
|
|
|
|
|
getData();
|
|
getData();
|
|
@@ -247,7 +250,7 @@ function changeType(data) {
|
|
|
if (data === 1) {
|
|
if (data === 1) {
|
|
|
ruleForm2.value.company_code = "";
|
|
ruleForm2.value.company_code = "";
|
|
|
} else {
|
|
} else {
|
|
|
- ruleForm2.value.refund_price = "";
|
|
|
|
|
|
|
+ ruleForm2.value.refund_price = showForm.value.amount_total||"";
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
const emit = defineEmits(["refreshList"]);
|
|
const emit = defineEmits(["refreshList"]);
|
|
@@ -257,6 +260,9 @@ function submit() {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
auditApi(ruleForm.value).then((data) => {
|
|
auditApi(ruleForm.value).then((data) => {
|
|
|
ElMessage.success("操作成功!");
|
|
ElMessage.success("操作成功!");
|
|
|
|
|
+ detailRefundApi({id: showForm.value.id}).then((data) => {
|
|
|
|
|
+ showForm.value = {...data};
|
|
|
|
|
+ })
|
|
|
// dialogVisible.value = false;
|
|
// dialogVisible.value = false;
|
|
|
emit("refreshList");
|
|
emit("refreshList");
|
|
|
if (ruleForm.value.status == 1) {
|
|
if (ruleForm.value.status == 1) {
|
|
@@ -275,6 +281,9 @@ function submit2() {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
refundApi(ruleForm2.value).then((data) => {
|
|
refundApi(ruleForm2.value).then((data) => {
|
|
|
ElMessage.success("操作成功!");
|
|
ElMessage.success("操作成功!");
|
|
|
|
|
+ detailRefundApi({id: showForm.value.id}).then((data) => {
|
|
|
|
|
+ showForm.value = {...data};
|
|
|
|
|
+ })
|
|
|
// dialogVisible.value = false;
|
|
// dialogVisible.value = false;
|
|
|
emit("refreshList");
|
|
emit("refreshList");
|
|
|
showForm.value.refund_status = 4;
|
|
showForm.value.refund_status = 4;
|
|
@@ -308,6 +317,10 @@ function redoFun() {
|
|
|
type: "success",
|
|
type: "success",
|
|
|
message: "操作成功!",
|
|
message: "操作成功!",
|
|
|
});
|
|
});
|
|
|
|
|
+ detailRefundApi({id: showForm.value.id}).then((data) => {
|
|
|
|
|
+ showForm.value = {...data};
|
|
|
|
|
+ })
|
|
|
|
|
+ emit("refreshList");
|
|
|
showForm.value.refund_status = 4;
|
|
showForm.value.refund_status = 4;
|
|
|
showForm.value.refund_log.unshift(data);
|
|
showForm.value.refund_log.unshift(data);
|
|
|
});
|
|
});
|