【调整】移除后台设置是否会员绑定手机号码的设置。

【新增】新增商城小程序前端商家管理员功能,商家管理员可以通过商家中心查看所有信息。
【调整】商家中心按门店进行过滤,提货单,服务券,订单等,本门店只能处理本门店业务及查看相应数据。
【调整】后台商城配置移除【会员设置】tab,增加【商家设置】tab,将商家相关设置归集到一起。
This commit is contained in:
大灰灰
2022-12-03 01:44:19 +08:00
parent 201586ab4f
commit 0422df5552
24 changed files with 471 additions and 184 deletions

View File

@@ -204,6 +204,8 @@ const install = (Vue, vm) => {
let storeList = (params, config = {}) => http.post('/Api/Store/GetStoreList', params, { custom: { methodName: 'store.getstorelist', needToken: false } });
//根据用户序列获取门店数据
let getStoreByUserId = (params, config = {}) => http.post('/Api/Store/GetStoreByUserId', params, { custom: { methodName: 'store.getStoreByUserId', needToken: true } });
//获取单个用户能管理的门店列表
let getStoreListForUser = (params, config = {}) => http.post('/Api/Store/GetStoreListForUser', params, { custom: { methodName: 'store.GetStoreListForUser', needToken: true } });
//根据序列获取门店数据
let getStoreById = (params, config = {}) => http.post('/Api/Store/GetStoreById', params, { custom: { methodName: 'store.getStoreByUserId', needToken: false } });
//获取门店订单列表
@@ -500,6 +502,7 @@ const install = (Vue, vm) => {
storeList,
getStoreByUserId,
getStoreListForUser,
getStoreById,
getOrderPageByMerchant,
getOrderPageByMerchantSearch,

View File

@@ -149,7 +149,7 @@
</view>
<view class="coreshop-tools-list-box">
<u-grid :col="4" :border="false">
<u-grid-item @click="navigateToHandle('/pages/member/merchant/index/index')" v-if="isClerk">
<u-grid-item @click="goMerchant" v-if="isClerk">
<u-icon name="calendar" :size="25" color="#666" label="商家管理" labelPos="bottom" labelSize="13" space="25" top="15"></u-icon>
</u-grid-item>
<u-grid-item @tap="goDistributionPanel" v-if="isDistribution">
@@ -227,7 +227,10 @@
data() {
return {
afterSaleNums: 0, //售后数量
isClerk: false,//显示商家管理
isClerk: false,//是否门店人员
isShopManager: false,//是否商家管理员
storeId: 0,//关联门店
isDistribution: false,//显示分销中心
isAgent: false,//显示代理中心
@@ -532,7 +535,9 @@
})
//判断是否是店员
_this.$u.api.isStoreUser().then(res => {
this.isClerk = res.data
this.isClerk = res.data.isClerk;
this.isShopManager = res.data.isShopManager
this.storeId = res.data.storeId;
})
}
})
@@ -540,13 +545,31 @@
this.hasLogin = false
}
},
goMerchant() {
uni.showLoading({
title: '跳转中...'
});
if (!this.hasLogin) {
console.log('未登录');
this.$store.commit('showLoginTip', true);
uni.hideLoading();
return false;
}
uni.hideLoading();
this.$u.route({
url: '/pages/member/merchant/index/index',
params: {
storeId: this.storeId,
isShopManager: this.isShopManager
}
})
},
navigateToHandle(pageUrl) {
uni.showLoading({
title: '跳转中...'
});
if (!this.hasLogin) {
console.log('未登录');
//getApp().globalData.showLoginTip = true;
this.$store.commit('showLoginTip', true);
uni.hideLoading();
return false;

View File

@@ -351,11 +351,10 @@
<!--底部-->
<view class="coreshop-foot-hight-view" />
<!--<view class="coreshop-foot-hight-view" />
<view class="coreshop-bg-white coreshop-footer-fixed coreshop-foot-padding-bottom" v-if="orderInfo.status == 1 && !isDelivery">
<u-button class='coreshop-bg-red' type="success" size="default" @click="tackDeliery(orderInfo.orderId)">立即发货</u-button>
</view>
</view>-->
</view>
</template>
<script>

View File

@@ -20,7 +20,7 @@
</view>
</view>
<view class="coreshop-padding-top-5 coreshop-padding-right-10">
<u-button :plain="true" size="mini" icon="share-square" text="切换个人" @click="goUserCenter()"></u-button>
<u-button :plain="true" size="mini" icon="share-square" text="切换个人中心" @click="goUserCenter()"></u-button>
</view>
</view>
</view>
@@ -29,13 +29,13 @@
<!--业务列表-->
<view class="coreshop-tools-list-box coreshop-bg-white coreshop-padding-bottom-10 coreshop-solid-bottom">
<u-row>
<u-col span="3" @click="goRoute('/pages/member/merchant/takeDelivery/list')">
<u-col span="3" @click="goTakeDelivery">
<u-icon name="order" :size="23" color="#666" label="提货单列表" labelPos="bottom" labelSize="13" space="25" top="15"></u-icon>
</u-col>
<u-col span="3" @click="goRoute('/pages/member/merchant/takeDelivery/index')">
<u-icon name="fingerprint" :size="23" color="#666" label="提货单核销" labelPos="bottom" labelSize="13" space="25" top="15"></u-icon>
</u-col>
<u-col span="3" @click="goRoute('/pages/member/merchant/serviceVerification/list')">
<u-col span="3" @click="goServiceVerification">
<u-icon name="coupon" :size="23" color="#666" label="服务券列表" labelPos="bottom" labelSize="13" space="25" top="15"></u-icon>
</u-col>
<u-col span="3" @click="goRoute('/pages/member/merchant/serviceVerification/index')">
@@ -257,7 +257,13 @@
methods: {
goSearch() {
if (this.keyword) {
this.$u.route('/pages/member/merchant/search/index?keyword=' + this.keyword);
this.$u.route({
url: '/pages/member/merchant/search/index',
params: {
keyword: this.keyword,
storeId: this.storeId
}
})
} else {
this.$refs.uToast.show({ message: '请输订单号、收货人手机号、收货人姓名', type: 'warning', })
}
@@ -275,29 +281,37 @@
}
});
},
// 服务器核销列表
goServiceVerification() {
this.$u.route({
url: '/pages/member/merchant/serviceVerification/list',
params: {
storeId: this.storeId
}
});
},
// 提货单列表
goTakeDelivery() {
this.$u.route({
url: '/pages/member/merchant/takeDelivery/list',
params: {
storeId: this.storeId
}
});
},
// 获取门店信息
getStoreDetail() {
let that = this;
let data = {
id: this.storeId
}
if (this.storeId > 0) {
this.$u.api.getStoreById(data).then(e => {
if (e.status) {
that.storeDetail = e.data;
} else {
that.$refs.uToast.show({ message: e.msg, type: 'error', })
}
});
} else {
this.$u.api.getStoreByUserId(data).then(e => {
if (e.status) {
that.storeDetail = e.data;
} else {
that.$refs.uToast.show({ message: e.msg, type: 'error', })
}
});
}
this.$u.api.getStoreByUserId(data).then(e => {
if (e.status) {
that.storeDetail = e.data;
} else {
that.$refs.uToast.show({ message: e.msg, type: 'error', })
}
});
},
// 门店订单列表
getStoreOrder() {

View File

@@ -98,10 +98,12 @@
loadStatus: this.$globalConstVars.loadStatus.loadMore, //loadmore-加载前的状态loading-加载中的状态nomore-没有更多的状态
currentPage: 1,
lastPage: 1,
storeId: 0,
}
},
onLoad(options) {
this.keyword = options.keyword
this.keyword = options.keyword;
this.storeId = options.storeId;
if (this.keyword) {
this.getStoreOrder();
}

View File

@@ -65,10 +65,12 @@
loadmore: '轻轻上拉',
loading: '努力加载中',
nomore: '实在没有了'
}
},
storeId: 0,
}
},
onShow() {
onLoad(option) {
this.storeId = option.storeId;
this.getlogs();
},
methods: {
@@ -77,7 +79,8 @@
let _this = this
let data = {
page: _this.page,
limit: _this.limit
limit: _this.limit,
id: _this.storeId
}
_this.status = 'loading';
this.$u.api.getverificationPageList(data).then(res => {

View File

@@ -29,8 +29,9 @@
<!--底部-->
<view class="coreshop-foot-hight-view" />
<view class="coreshop-bg-white coreshop-footer-fixed coreshop-foot-padding-bottom coreshop-text-center coreshop-padding-10">
<u-button class='coreshop-bg-red' type="success" size="default" @click="saveStore">确认</u-button>
<view class="coreshop-bottomBox">
<button class="coreshop-btn coreshop-btn-square coreshop-btn-w" @click="saveAllStore" v-if="isShopManager">查看所有数据</button>
<button class="coreshop-btn coreshop-btn-square coreshop-btn-b" @click="saveStore">选择门店数据</button>
</view>
</view>
@@ -42,12 +43,17 @@
data() {
return {
storeList: [],
storeId: uni.getStorageSync('storeId')
storeId: 0,
isShopManager: false
};
},
computed: {},
onLoad() {
this.getStoreAddress();
//判断是否是店员
this.$u.api.isStoreUser().then(res => {
this.isShopManager = res.data.isShopManager
})
},
methods: {
// 选择门店
@@ -56,9 +62,20 @@
},
// 确认门店
saveStore() {
//uni.setStorageSync('storeId', this.storeId);
if (this.storeId == 0) {
this.$u.toast("请选择门店")
return false;
}
this.$u.route('/pages/member/merchant/index/index', {
storeId: this.storeId
storeId: this.storeId,
isShopManager: this.isShopManager,
});
},
// 确认门店
saveAllStore() {
this.$u.route('/pages/member/merchant/index/index', {
storeId: this.storeId,
isShopManager: this.isShopManager,
});
},
//获取门店列表
@@ -70,7 +87,7 @@
success(res) {
_this.latitude = res.latitude
_this.longitude = res.longitude
console.log('当前位置的经度1' + res);
//console.log('当前位置的经度1' + res);
},
fail: function () {
_this.$u.toast("获取您的经纬度坐标失败")
@@ -87,7 +104,7 @@
'page': _this.page,
'limit': _this.limit,
}
_this.$u.api.storeList(data).then(e => {
_this.$u.api.getStoreListForUser(data).then(e => {
if (e.status) {
console.log(e);
_this.storeList = [..._this.storeList, ...e.data]
@@ -104,7 +121,7 @@
success: function (res) {
_this.longitude = res.longitude;
_this.latitude = res.latitude;
console.log('当前位置的经度2' + res);
//console.log('当前位置的经度2' + res);
},
fail: function () {
_this.latitude = 0;
@@ -119,7 +136,7 @@
'page': _this.page,
'limit': _this.limit,
}
_this.$u.api.storeList(data).then(e => {
_this.$u.api.getStoreListForUser(data).then(e => {
if (e.status) {
console.log(e);
_this.storeList = [..._this.storeList, ...e.data]

View File

@@ -70,12 +70,12 @@
loadmore: '轻轻上拉',
loading: '努力加载中',
nomore: '实在没有了'
}
},
storeId: 0,
}
},
onShow() {
this.page = 1;
this.ladingList = [];
onLoad(option) {
this.storeId = option.storeId;
this.getLadingList();
},
methods: {
@@ -84,7 +84,8 @@
let _this = this
let data = {
page: _this.page,
limit: _this.limit
limit: _this.limit,
id: _this.storeId
}
_this.status = 'loading';
this.$u.api.storeLadingList(data).then(res => {