门店管理中心 - 订单、库存、财务管理
<template>
<!--门店管理中心-->
<view class="store-manager">
<uni-list>
<uni-list-item clickable title='提现账户' v-if="mdMy.level != 3" class="bold"
@click="goUrl('/pages/store/manager/cashOut')" thumb="../../../static/imgs/md-kucun.png" />
<uni-list-item clickable title='商品库存' class="bold" @click="goUrl('/pages/store/manager/stock')"
thumb="../../../static/imgs/md-kucun.png" />
<uni-list-item clickable title='配送管理' class="bold" @click="goUrl('/pages/store/manager/deliveryUser')"
thumb="../../../static/imgs/md-kucun.png" />
<uni-list-item clickable title='提现管理' class="bold" @click="goUrl('/pages/store/manager/deliveryRecord')"
thumb="../../../static/imgs/md-kucun.png" />
<view class="orders-title" v-if="mdMy.level != 3">
<img src="../../../static/imgs/md-order.png" style="width: 25px;margin-right: 10rpx" />
<span>订单中心</span>
</view>
<uni-list-item v-if="mdMy.level != 3" title='同城配送订单' class="bold"
@click="goUrl('/pages/store/manager/ordersGive')" thumb="../../../static/imgs/md-ps.png" />
<view class="orders" v-if="mdMy.level != 3">
<view class="item" @click="goUrl('/pages/store/manager/ordersGive?isSysFlag=1')">
<view class="num">{{mdMy.sysOrderNum}}</view>
<view class="text">系统配单</view>
</view>
<view class="item" @click="goUrl('/pages/store/manager/ordersQuick')">
<view class="num">{{mdMy.shortcutOrderNum}}</view>
<view class="text">快捷买单</view>
</view>
<view class="item" @click="goUrl('/pages/store/manager/ordersActivity')">
<view class="num">{{mdMy.storeOrderNum}}</view>
<view class="text">店内活动</view>
</view>
<view class="item" @click="goUrl('/pages/store/manager/ordersSelf')">
<view class="num">{{mdMy.pickOrderNum}}</view>
<view class="text">到店自提</view>
</view>
<!-- <view class="item" @click="goUrl('/pages/store/manager/ordersShare')">
<view class="num">{{mdMy.serviceOrderNum}}</view>
<view class="text">共享理疗</view>
</view> -->
</view>
<uni-list-item clickable title='财务中心' v-if="mdMy.level != 3" class="bold" :rightText="mdMy.amountAccount.toString()"
@click="goUrl('/pages/store/manager/finance')" thumb="../../../static/imgs/md-finance.png" />
<view class="orders" v-if="mdMy.level != 3">
<view class="item">
<view class="num">{{mdMy.turnoverAccount}}</view>
<view class="text">周转券</view>
</view>
<view class="item" @click="goUrl('/pages/store/manager/financeSys?money='+mdMy.sysAccount)">
<view class="num">{{mdMy.sysAccount}}</view>
<view class="text">系统配单</view>
</view>
<view class="item" @click="goUrl('/pages/store/manager/financeQuick?money='+mdMy.shortcutAccount)">
<view class="num">{{mdMy.shortcutAccount}}</view>
<view class="text">快捷买单</view>
</view>
<view class="item" @click="goUrl('/pages/store/manager/financeSale?money='+mdMy.storeAccount)">
<view class="num">{{mdMy.storeAccount}}</view>
<view class="text">店内促销</view>
</view>
<view class="item" @click="goUrl('/pages/store/manager/financeSelf?money='+mdMy.pickAccount)">
<view class="num">{{mdMy.pickAccount}}</view>
<view class="text">到店自提</view>
</view>
<!-- <view class="item" @click="goUrl('/pages/store/manager/financeShare?money='+mdMy.serviceAccount)">
<view class="num">{{mdMy.serviceAccount}}</view>
<view class="text">共享服务</view>
</view> -->
</view>
<!-- <view class="form-row-between">
<view class="form-row-tt">
<img src="../../../static/imgs/md-liliao.png" style="width: 25px;margin-right: 10rpx" />
<span>共享理疗</span>
</view>
<view class="form-row-dd">
<span @click="onLlScan">扫一扫</span>
</view>
</view> -->
<view class="form-row-between" v-if="mdMy.level != 3">
<view class="form-row-tt">
<img src="../../../static/imgs/md-zt.png" style="width: 25px;margin-right: 10rpx" />
<span>自提订单处理</span>
</view>
<view class="form-row-dd">
<span @click="onZtScan">扫一扫</span>
</view>
</view>
<view class="form-row-between" @click="onCode('center')" v-if="mdMy.level != 3">
<view class="form-row-tt">
<img src="../../../static/imgs/md-code.png" style="width: 25px;margin-right: 10rpx" />
<span>店铺二维码</span>
</view>
</view>
</uni-list>
<pre><code> <!-- 店铺二维码图片-->
<uni-popup ref="popup" type="center" v-if="mdMy.level != 3">
<view class="img-modal">
<img :src="mdMy.storeQr" @longtap="onLongTapCode" class="img" />
<view>长按图片 保存二维码</view>
</view>
</uni-popup>
</view>
</code></pre>
</template>
<script>
export default {
name: "index",
data() {
return {
mdMy: {},
}
},
onLoad() {
},
onShow() {
this.ajax.get(this.jk.mdMy).then(res => {
this.mdMy = res.data;
})
},
methods: {
// 店铺二维码
onCode(type) {
// open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
this.$refs.popup.open(type)
},
//长按保存二维码
onLongTapCode() {
//保存图片
uni.saveImageToPhotosAlbum({
filePath: "",
success: function() {
this.common.UshowToast('保存成功');
}
});
},
//共享理疗扫一扫
onLlScan() {
let that = this;
uni.scanCode({
success: function(res) {
that.ajax.post(that.jk.llScan, {
payCode: res.result
}).then(res => {
that.common.UshowToast("支付成功");
})
},
fail: function(fail) {
that.common.UshowToast("扫码失败");
}
});
},
//自提订单扫一扫
onZtScan() {
let that = this;
uni.scanCode({
success: function(res) {
that.common.UnavigateTo('/pages/store/manager/ztOrder?orderNumber=' + res.result);
},
fail: function(fail) {
that.common.UshowToast("扫码失败");
}
});
},
goUrl(url) {
this.common.UnavigateTo(url);
}
}
}
</script>
<style lang="less">
.store-manager {
background-color: #FFFFFF;
.form-row-tt {
display: flex;
align-items: center;
}
.orders {
display: flex;
justify-content: space-around;
.item {
text-align: center;
.num {
width: 100rpx;
height: 100rpx;
line-height: 100rpx;
border: 1px solid #0E7519;
border-radius: 100%;
text-align: center;
}
.text {
margin: 10rpx 0 30rpx 0;
}
}
}
.orders-title {
font-weight: bold;
margin: 0 20rpx;
padding: 20rpx 0;
border-top: 1px solid #EEEEEE;
display: flex;
align-items: center;
}
.form-row-between {
padding: 15px 10px;
.form-row-tt {
span {
font-weight: bold;
}
}
.form-row-dd {
span {
font-size: 24rpx;
color: #101010;
}
}
}
.bold {
font-weight: bold;
}
.img-modal {
background-color: #FFFFFF;
padding: 20rpx;
border-radius: 10rpx;
width: 80%;
margin: 0 auto;
text-align: center;
.img {
width: 100%;
}
}
}
</styl
原文地址: https://www.cveoy.top/t/topic/qEd8 著作权归作者所有。请勿转载和采集!