wangfukang 4 days ago
parent
commit
5eacdcf65d
  1. 16
      src/views/Main.vue
  2. 57
      src/views/app/business/lineManage/addEdit.vue
  3. 47
      src/views/app/business/logistics/logistics.vue
  4. 17
      src/views/app/data-statistics/data-statistics.vue
  5. 2
      src/views/app/shop/shop.vue
  6. 10
      src/views/sys/order-manage/orderManage.vue

16
src/views/Main.vue

@ -136,7 +136,7 @@
> >
<div class="single-page"> <div class="single-page">
<keep-alive :include="cachePage"> <keep-alive :include="cachePage">
<router-view /> <router-view ref="singlePage" />
</keep-alive> </keep-alive>
</div> </div>
<!-- 页面页脚 --> <!-- 页面页脚 -->
@ -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) { beforePush(name) {
return true; return true;

57
src/views/app/business/lineManage/addEdit.vue

@ -23,7 +23,7 @@
<FormItem label="商家名" prop="value"> <FormItem label="商家名" prop="value">
<Select v-model="form.merchantId" filterable @on-change="checkShop" <Select v-model="form.merchantId" filterable @on-change="checkShop"
:remote-method="sreachShop" :loading="loading1"> :remote-method="sreachShop" :loading="loading1">
<Option v-for="item in shopList" v-model="item.value" :key="item.value">{{ item.label }} <Option v-for="item in shopList" :value="item.value" :label="item.label" :key="item.value">{{ item.label }}
</Option> </Option>
</Select> </Select>
</FormItem> </FormItem>
@ -370,19 +370,50 @@
this.form.productList1.productName = v.productName this.form.productList1.productName = v.productName
this.aaVisiable = false 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) { sreachShop(v) {
this.searchForm.keyWord = v this.searchForm.keyWord = v
// 多条件搜索用户列表 // 多条件搜索用户列表
this.loading = true; this.loading1 = true;
getShopData(this.searchForm).then((res) => { getShopData(this.searchForm).then((res) => {
this.loading = false; this.loading1 = false;
if (res.success) { if (res.success) {
this.shopList = res.result.content; this.setShopList(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
}
} }
}); });
}, },
@ -464,6 +495,7 @@
this.$refs.form.resetFields(); this.$refs.form.resetFields();
this.originalPosition = ""; this.originalPosition = "";
this.form = this.getDefaultForm(); this.form = this.getDefaultForm();
this.shopList = [];
this.adList = [{ this.adList = [{
pic: '' pic: ''
}]; }];
@ -493,14 +525,11 @@
pic: adImage.trim() pic: adImage.trim()
}]; }];
} }
this.setShopList([]);
getShopData(this.searchForm).then((res) => { getShopData(this.searchForm).then((res) => {
this.loading = false; this.loading1 = false;
if (res.success) { if (res.success) {
this.shopList = res.result.content; this.setShopList(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
}
} }
}); });
if (data.productList && data.productList.length > 0) { if (data.productList && data.productList.length > 0) {

47
src/views/app/business/logistics/logistics.vue

@ -313,6 +313,7 @@
openSearch: true, openSearch: true,
openTip: true, openTip: true,
loading: false, loading: false,
hasActivatedOnce: false,
workerLoading: false, workerLoading: false,
workerOrderLoading: false, workerOrderLoading: false,
autoRefreshing: false, autoRefreshing: false,
@ -453,6 +454,22 @@
this.getBaseDeliveryFeeSetting(); this.getBaseDeliveryFeeSetting();
this.getDeliverySwitch(); 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() { buildWorkerColumns() {
return [ { return [ {
title: "配送人员", title: "配送人员",
@ -584,6 +601,8 @@
}, },
changeOrderTab(v) { changeOrderTab(v) {
this.tabName = v; this.tabName = v;
this.clearOrderSearchForms();
this.syncAreaTreeText();
if (v === "setting") { if (v === "setting") {
this.getSetting(); this.getSetting();
return; return;
@ -602,16 +621,30 @@
} }
this.total = 0; this.total = 0;
this.data = []; this.data = [];
const form = v === "hall" ? this.hallSearchForm : this.deliverySearchForm;
form.pageNum = 1;
form.getAreaId = "";
form.putAreaId = "";
this.syncAreaTreeText();
this.$nextTick(() => { this.$nextTick(() => {
this.getLogisticsInfo(); this.getLogisticsInfo();
this.refreshOrderCounts(); 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) { changeHallTab(v) {
this.hallSearchForm.pageNum = 1; this.hallSearchForm.pageNum = 1;
this.hallSearchForm.deliveryType = HALL_TYPE_MAP[v]; this.hallSearchForm.deliveryType = HALL_TYPE_MAP[v];
@ -1406,6 +1439,10 @@
}, },
activated() { activated() {
this.startCountRefreshTimer(); this.startCountRefreshTimer();
if (this.hasActivatedOnce) {
this.refreshOnMenuClick();
}
this.hasActivatedOnce = true;
}, },
deactivated() { deactivated() {
this.clearCountRefreshTimer(); this.clearCountRefreshTimer();

17
src/views/app/data-statistics/data-statistics.vue

@ -493,6 +493,7 @@
data() { data() {
return { return {
tabName: "0", tabName: "0",
hasActivatedOnce: false,
selectDate: [], selectDate: [],
statisticsLoading: false, statisticsLoading: false,
statistics: this.defaultStatistics(), statistics: this.defaultStatistics(),
@ -656,6 +657,12 @@
this.getDataList() this.getDataList()
this.getIeReportPendingCount() this.getIeReportPendingCount()
}, },
activated() {
if (this.hasActivatedOnce) {
this.refreshOnMenuClick()
}
this.hasActivatedOnce = true
},
methods: { methods: {
defaultStatistics() { defaultStatistics() {
return { return {
@ -708,6 +715,16 @@
this.handleIeAuditLogSearch() this.handleIeAuditLogSearch()
} }
}, },
refreshOnMenuClick() {
this.getIeReportPendingCount()
if (this.tabName === "3") {
this.getIeReports()
} else if (this.tabName === "4") {
this.getIeAuditLogs()
} else {
this.getDataList()
}
},
renderIeReportTabLabel(h) { renderIeReportTabLabel(h) {
return h("Badge", { return h("Badge", {
props: { props: {

2
src/views/app/shop/shop.vue

@ -201,6 +201,7 @@
key: "shoprank", key: "shoprank",
minWidth: 90, minWidth: 90,
sortable: true, sortable: true,
sortType: "desc",
fixed: "left", fixed: "left",
}, },
{ {
@ -254,7 +255,6 @@
title: "入驻时间", title: "入驻时间",
key: "createTime", key: "createTime",
sortable: true, sortable: true,
sortType: "desc",
width: 180, width: 180,
}, },
{ {

10
src/views/sys/order-manage/orderManage.vue

@ -291,6 +291,7 @@
openSearch: true, openSearch: true,
openTip: true, openTip: true,
loading: true, loading: true,
hasActivatedOnce: false,
refundTodoCount: 0, refundTodoCount: 0,
rejectModalVisible: false, rejectModalVisible: false,
rejectReason: "", rejectReason: "",
@ -942,12 +943,21 @@
mounted() { mounted() {
this.init(); this.init();
}, },
activated() {
if (this.hasActivatedOnce) {
this.refreshOnMenuClick();
}
this.hasActivatedOnce = true;
},
methods: { methods: {
init() { init() {
this.getRefundTodoCount(); this.getRefundTodoCount();
this.getFeedbackTodoCount(); this.getFeedbackTodoCount();
this.getLogisticsInfo() this.getLogisticsInfo()
}, },
refreshOnMenuClick() {
this.refreshWholePage();
},
closePage(){ closePage(){
this.Visiable = false; this.Visiable = false;
this.getLogisticsInfo() this.getLogisticsInfo()

Loading…
Cancel
Save