diff --git a/src/views/Main.vue b/src/views/Main.vue
index a1559fb..cc10549 100644
--- a/src/views/Main.vue
+++ b/src/views/Main.vue
@@ -136,7 +136,7 @@
>
-
+
@@ -349,8 +349,18 @@ export default {
);
}
},
- handleSubmenuChange(val) {
-
+ handleSubmenuChange(name) {
+ if (name != this.$route.name) {
+ return;
+ }
+ this.$nextTick(() => {
+ const page = Array.isArray(this.$refs.singlePage)
+ ? this.$refs.singlePage[0]
+ : this.$refs.singlePage;
+ if (page && typeof page.refreshOnMenuClick == "function") {
+ page.refreshOnMenuClick();
+ }
+ });
},
beforePush(name) {
return true;
diff --git a/src/views/app/business/lineManage/addEdit.vue b/src/views/app/business/lineManage/addEdit.vue
index e6ed5f4..d4ea288 100644
--- a/src/views/app/business/lineManage/addEdit.vue
+++ b/src/views/app/business/lineManage/addEdit.vue
@@ -23,7 +23,7 @@
@@ -370,19 +370,50 @@
this.form.productList1.productName = v.productName
this.aaVisiable = false
},
+ getCurrentShopOption() {
+ if (!this.form.merchantId) {
+ return null;
+ }
+ let linkParams = {};
+ if (this.form.linkParams) {
+ try {
+ linkParams = JSON.parse(this.form.linkParams);
+ } catch (e) {
+ linkParams = {};
+ }
+ }
+ const shopName = this.form.merchantName || linkParams.shopName;
+ if (!shopName) {
+ return null;
+ }
+ return Object.assign({}, linkParams, {
+ id: this.form.merchantId,
+ shopName,
+ shopIcon: this.form.merchantImage || linkParams.shopIcon,
+ label: shopName,
+ value: this.form.merchantId
+ });
+ },
+ setShopList(list) {
+ const shopList = (list || []).map(item => Object.assign({}, item, {
+ label: item.shopName,
+ value: item.id
+ }));
+ const currentShop = this.getCurrentShopOption();
+ if (currentShop && !shopList.some(item => item.value == currentShop.value)) {
+ shopList.unshift(currentShop);
+ }
+ this.shopList = shopList;
+ },
sreachShop(v) {
this.searchForm.keyWord = v
// 多条件搜索用户列表
- this.loading = true;
+ this.loading1 = true;
getShopData(this.searchForm).then((res) => {
- this.loading = false;
+ this.loading1 = false;
if (res.success) {
- this.shopList = res.result.content;
- for (let i = 0; i < this.shopList.length; i++) {
- this.shopList[i].label = this.shopList[i].shopName
- this.shopList[i].value = this.shopList[i].id
- }
+ this.setShopList(res.result.content);
}
});
},
@@ -464,6 +495,7 @@
this.$refs.form.resetFields();
this.originalPosition = "";
this.form = this.getDefaultForm();
+ this.shopList = [];
this.adList = [{
pic: ''
}];
@@ -493,14 +525,11 @@
pic: adImage.trim()
}];
}
+ this.setShopList([]);
getShopData(this.searchForm).then((res) => {
- this.loading = false;
+ this.loading1 = false;
if (res.success) {
- this.shopList = res.result.content;
- for (let i = 0; i < this.shopList.length; i++) {
- this.shopList[i].label = this.shopList[i].shopName
- this.shopList[i].value = this.shopList[i].id
- }
+ this.setShopList(res.result.content);
}
});
if (data.productList && data.productList.length > 0) {
diff --git a/src/views/app/business/logistics/logistics.vue b/src/views/app/business/logistics/logistics.vue
index af6df3f..10e382b 100644
--- a/src/views/app/business/logistics/logistics.vue
+++ b/src/views/app/business/logistics/logistics.vue
@@ -313,6 +313,7 @@
openSearch: true,
openTip: true,
loading: false,
+ hasActivatedOnce: false,
workerLoading: false,
workerOrderLoading: false,
autoRefreshing: false,
@@ -453,6 +454,22 @@
this.getBaseDeliveryFeeSetting();
this.getDeliverySwitch();
},
+ refreshOnMenuClick() {
+ if (this.isOrderTab) {
+ this.getLogisticsInfo();
+ this.refreshOrderCounts();
+ return;
+ }
+ if (this.tabName === "setting") {
+ this.getSetting();
+ } else if (this.tabName === "service") {
+ this.getCustomerServiceSetting();
+ } else if (this.tabName === "baseDeliveryFee") {
+ this.getBaseDeliveryFeeSetting();
+ } else if (this.tabName === "deliverySwitch") {
+ this.getDeliverySwitch();
+ }
+ },
buildWorkerColumns() {
return [ {
title: "配送人员",
@@ -584,6 +601,8 @@
},
changeOrderTab(v) {
this.tabName = v;
+ this.clearOrderSearchForms();
+ this.syncAreaTreeText();
if (v === "setting") {
this.getSetting();
return;
@@ -602,16 +621,30 @@
}
this.total = 0;
this.data = [];
- const form = v === "hall" ? this.hallSearchForm : this.deliverySearchForm;
- form.pageNum = 1;
- form.getAreaId = "";
- form.putAreaId = "";
- this.syncAreaTreeText();
this.$nextTick(() => {
this.getLogisticsInfo();
this.refreshOrderCounts();
});
},
+ clearOrderSearchForms() {
+ this.hallSearchForm.pageNum = 1;
+ this.hallSearchForm.pageSize = 10;
+ this.hallSearchForm.getAreaId = "";
+ this.hallSearchForm.putAreaId = "";
+ this.hallSearchForm.order = "";
+ this.hallSearchForm.userId = "";
+ this.hallSearchForm.shopName = "";
+ this.hallSearchForm.deliveryType = HALL_TYPE_MAP[this.hallTab];
+ this.deliverySearchForm.pageNum = 1;
+ this.deliverySearchForm.pageSize = 10;
+ this.deliverySearchForm.order = "";
+ this.deliverySearchForm.deliveryType = null;
+ this.deliverySearchForm.getAreaId = "";
+ this.deliverySearchForm.putAreaId = "";
+ this.deliverySearchForm.shopName = "";
+ this.deliverySearchForm.workerName = "";
+ this.deliverySearchForm.status = DELIVERY_STATUS_MAP[this.deliveryTab];
+ },
changeHallTab(v) {
this.hallSearchForm.pageNum = 1;
this.hallSearchForm.deliveryType = HALL_TYPE_MAP[v];
@@ -1406,6 +1439,10 @@
},
activated() {
this.startCountRefreshTimer();
+ if (this.hasActivatedOnce) {
+ this.refreshOnMenuClick();
+ }
+ this.hasActivatedOnce = true;
},
deactivated() {
this.clearCountRefreshTimer();
diff --git a/src/views/app/data-statistics/data-statistics.vue b/src/views/app/data-statistics/data-statistics.vue
index 97e491f..dc0fc8e 100644
--- a/src/views/app/data-statistics/data-statistics.vue
+++ b/src/views/app/data-statistics/data-statistics.vue
@@ -493,6 +493,7 @@
data() {
return {
tabName: "0",
+ hasActivatedOnce: false,
selectDate: [],
statisticsLoading: false,
statistics: this.defaultStatistics(),
@@ -656,6 +657,12 @@
this.getDataList()
this.getIeReportPendingCount()
},
+ activated() {
+ if (this.hasActivatedOnce) {
+ this.refreshOnMenuClick()
+ }
+ this.hasActivatedOnce = true
+ },
methods: {
defaultStatistics() {
return {
@@ -708,6 +715,16 @@
this.handleIeAuditLogSearch()
}
},
+ refreshOnMenuClick() {
+ this.getIeReportPendingCount()
+ if (this.tabName === "3") {
+ this.getIeReports()
+ } else if (this.tabName === "4") {
+ this.getIeAuditLogs()
+ } else {
+ this.getDataList()
+ }
+ },
renderIeReportTabLabel(h) {
return h("Badge", {
props: {
diff --git a/src/views/app/shop/shop.vue b/src/views/app/shop/shop.vue
index 830a9a3..98ae25c 100644
--- a/src/views/app/shop/shop.vue
+++ b/src/views/app/shop/shop.vue
@@ -201,6 +201,7 @@
key: "shoprank",
minWidth: 90,
sortable: true,
+ sortType: "desc",
fixed: "left",
},
{
@@ -254,7 +255,6 @@
title: "入驻时间",
key: "createTime",
sortable: true,
- sortType: "desc",
width: 180,
},
{
diff --git a/src/views/sys/order-manage/orderManage.vue b/src/views/sys/order-manage/orderManage.vue
index c2763ee..486fef3 100644
--- a/src/views/sys/order-manage/orderManage.vue
+++ b/src/views/sys/order-manage/orderManage.vue
@@ -291,6 +291,7 @@
openSearch: true,
openTip: true,
loading: true,
+ hasActivatedOnce: false,
refundTodoCount: 0,
rejectModalVisible: false,
rejectReason: "",
@@ -942,12 +943,21 @@
mounted() {
this.init();
},
+ activated() {
+ if (this.hasActivatedOnce) {
+ this.refreshOnMenuClick();
+ }
+ this.hasActivatedOnce = true;
+ },
methods: {
init() {
this.getRefundTodoCount();
this.getFeedbackTodoCount();
this.getLogisticsInfo()
},
+ refreshOnMenuClick() {
+ this.refreshWholePage();
+ },
closePage(){
this.Visiable = false;
this.getLogisticsInfo()