From 4ec91760a15063f80485b041c3e4aa97be5e67a0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=BD=99=E5=90=8C=E5=AD=A6?= <2495967527@qq.com>
Date: Tue, 12 Nov 2024 19:52:30 +0800
Subject: [PATCH] =?UTF-8?q?=E8=BF=90=E8=B4=B9=E6=A8=A1=E7=89=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../logistics-template/index.vue | 23 ++++++++++++++++---
.../logistics-template/popup/add-template.vue | 14 ++++-------
2 files changed, 25 insertions(+), 12 deletions(-)
diff --git a/src/views/modules/logistics-fare/logistics-template/index.vue b/src/views/modules/logistics-fare/logistics-template/index.vue
index 6649973..2086987 100644
--- a/src/views/modules/logistics-fare/logistics-template/index.vue
+++ b/src/views/modules/logistics-fare/logistics-template/index.vue
@@ -20,6 +20,19 @@
v-model="searchForm.name"
>
+
+
+
+
+
搜索
@@ -49,19 +62,24 @@ export default {
dataList: [],
searchForm: {
name: "",
+ linkId: "",
},
shopId: "",
+ marketList: "",
};
},
created() {
if (JSON.parse(sessionStorage.getItem("userInfo")).markets.length > 0) {
this.shopId = true;
- this.formInline.marketId = JSON.parse(
+ this.searchForm.linkId = JSON.parse(
sessionStorage.getItem("userInfo")
).markets[0].marketId;
this.marketList = JSON.parse(sessionStorage.getItem("userInfo")).markets;
console.log(this.marketList);
} else if (JSON.parse(sessionStorage.getItem("userInfo")).shopId) {
+ this.searchForm.linkId = JSON.parse(
+ sessionStorage.getItem("userInfo")
+ ).shopId;
this.shopId = true;
} else {
this.shopId = false;
@@ -87,7 +105,7 @@ export default {
});
},
addFareTemplate() {
- this.$refs.addTemplate.toggle().add();
+ this.$refs.addTemplate.toggle().add(this.searchForm.linkId);
},
},
computed: {
@@ -100,7 +118,6 @@ export default {
this.$api.mer_admin.getShippingTemplateInfo(row.id).then((res) => {
console.log(res);
console.log("row.tableData", row.tableData);
-
if (!row.tableData) {
if (res.data.data.shippingTemplatesRegionResultList) {
this.$set(
diff --git a/src/views/modules/logistics-fare/logistics-template/popup/add-template.vue b/src/views/modules/logistics-fare/logistics-template/popup/add-template.vue
index 4a1457a..ed4cc7f 100644
--- a/src/views/modules/logistics-fare/logistics-template/popup/add-template.vue
+++ b/src/views/modules/logistics-fare/logistics-template/popup/add-template.vue
@@ -57,6 +57,7 @@ export default {
},
fileList: [], //回显图片
place: "", //场地
+ linkId: "",
};
},
mounted() {
@@ -141,10 +142,11 @@ export default {
this.modalData = _data;
};
return {
- add: () => {
+ add: (id) => {
this.$nextTick(() => {
this.modalData = cloneDeep(BASE_DATA);
});
+ this.linkId = id;
this.isAdd = true;
this.modalConfig.title = "添加运费模板";
},
@@ -832,10 +834,7 @@ export default {
if (this.isAdd) {
this.$api.mer_admin
.addShippingTemplate({
- linkId: JSON.parse(sessionStorage.getItem("userInfo")).shopId
- ? JSON.parse(sessionStorage.getItem("userInfo")).shopId
- : JSON.parse(sessionStorage.getItem("userInfo")).markets[0]
- .marketId,
+ linkId: this.linkId,
defaults: 0, //默认值,待确认
sort: 0, //默认值,待确认
type: 2, //默认值,待确认
@@ -894,10 +893,7 @@ export default {
this.$api.mer_admin
.updateShippingTemplate({
id: this.modalData.id,
- linkId: JSON.parse(sessionStorage.getItem("userInfo")).shopId
- ? JSON.parse(sessionStorage.getItem("userInfo")).shopId
- : JSON.parse(sessionStorage.getItem("userInfo")).markets[0]
- .marketId,
+ linkId: this.linkId,
defaults: 0, //默认值,待确认
sort: 0, //默认值,待确认
type: 2, //默认值,待确认