|
|
@@ -8,8 +8,8 @@
|
|
|
<image src="@/static/icon/dianpu.png" mode=""></image>
|
|
|
</view>
|
|
|
<view class="center margin-left-10">
|
|
|
- <view @click="shopShow=true">
|
|
|
- <text class="name">{{shopLable}}</text>
|
|
|
+ <view @click="showShop">
|
|
|
+ <text class="name">{{shopLable || '去完善商户资料'}}</text>
|
|
|
<u-icon v-if="shopShow" name="arrow-up-fill" style="margin-left: 10rpx;"></u-icon>
|
|
|
<u-icon v-else name="arrow-down-fill" style="margin-left: 10rpx;"></u-icon>
|
|
|
</view>
|
|
|
@@ -38,7 +38,7 @@
|
|
|
</view>
|
|
|
|
|
|
<view class="menu-list">
|
|
|
- <view @click="$jump('/pages/bill/bill')" class="menu menu1">
|
|
|
+ <view @click="jump('/pages/bill/bill')" class="menu menu1">
|
|
|
<view class="menu-top">
|
|
|
<image src="@/static/icon/bill.png"></image>
|
|
|
<view class="center padding-left-20">
|
|
|
@@ -56,7 +56,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="menu menu2" @click="$jump('/pages/member/member')">
|
|
|
+ <view class="menu menu2" @click="jump('/pages/member/member')">
|
|
|
<view class="menu-top">
|
|
|
<image src="@/static/icon/center.png"></image>
|
|
|
<view class="center padding-left-20">
|
|
|
@@ -79,7 +79,7 @@
|
|
|
<view class="market">
|
|
|
<text class="title">营销管理</text>
|
|
|
<view class="cu-list grid col-2 no-border margin-top-30">
|
|
|
- <view class="cu-item" @click="$jump(item.path)" v-for="(item,index) in marketList" :key="index">
|
|
|
+ <view class="cu-item" @click="jump(item.path)" v-for="(item,index) in marketList" :key="index">
|
|
|
<view class="grid-icon">
|
|
|
<image style="width: 120rpx;height: 120rpx;" :src="item.icon" />
|
|
|
</view>
|
|
|
@@ -92,9 +92,9 @@
|
|
|
<view class="system">
|
|
|
<text class="title">数字化系统</text>
|
|
|
<view class="cu-list grid col-4 no-border margin-top-30" style="border-radius:20rpx ;">
|
|
|
- <view class="cu-item" @click="$jump(item.path)" v-for="(item,index) in systemList" :key="index">
|
|
|
+ <view class="cu-item" @click="jump(item.path)" v-for="(item,index) in systemList" :key="index">
|
|
|
<view class="grid-icon">
|
|
|
- <image style="height: 56rpx;width: 56rpx;" :src="item.icon" />
|
|
|
+ <image style="height: 56rpx;width: 56rpx;" :src="item.icon" />
|
|
|
</view>
|
|
|
<text style="color: #222222;font-size: 26rpx;">{{item.name}}</text>
|
|
|
<view class="cu-tag bg-red badge" v-if="item.count>0">{{item.count}}</view>
|
|
|
@@ -102,8 +102,9 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
- <u-modal @confirm="$jump('/pages/member/member')" :show-cancel-button="true" confirm-color="#ff9447" confirm-text="立即开启" cancel-text="暂不开启" v-model="isOpenMemberShow" content="请先创建会员中心"></u-modal>
|
|
|
+
|
|
|
+ <u-modal @confirm="$jump('/pages/member/member')" :show-cancel-button="true" confirm-color="#ff9447"
|
|
|
+ confirm-text="立即开启" cancel-text="暂不开启" v-model="isOpenMemberShow" content="请先创建会员中心"></u-modal>
|
|
|
<u-select @confirm="shopConfirm" v-model="shopShow" value-name="id" label-name="name" :list="shopList">
|
|
|
</u-select>
|
|
|
</view>
|
|
|
@@ -160,12 +161,11 @@
|
|
|
count: 0
|
|
|
},
|
|
|
],
|
|
|
- systemList: [
|
|
|
- {
|
|
|
+ systemList: [{
|
|
|
icon: '/static/icon/system5.png',
|
|
|
name: '添加门店',
|
|
|
- path: '/pages/shop-info/shop-info?phone='+this.$cache.get('phone')
|
|
|
- },{
|
|
|
+ path: '/pages/shop-info/shop-info?phone=' + this.$cache.get('phone')
|
|
|
+ }, {
|
|
|
icon: '/static/icon/system1.png',
|
|
|
name: '外卖平台',
|
|
|
path: ''
|
|
|
@@ -185,7 +185,7 @@
|
|
|
name: '线上商城',
|
|
|
path: ''
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
{
|
|
|
icon: '/static/icon/add.png',
|
|
|
name: '添加服务',
|
|
|
@@ -193,14 +193,27 @@
|
|
|
},
|
|
|
],
|
|
|
//是否开启会员中心
|
|
|
- isOpenMember:false,
|
|
|
- isOpenMemberShow:false,
|
|
|
+ isOpenMember: false,
|
|
|
+ isOpenMemberShow: false,
|
|
|
+
|
|
|
+ //流程节点信息
|
|
|
+ taskDetail: {}
|
|
|
}
|
|
|
},
|
|
|
onShow() {
|
|
|
this.init()
|
|
|
},
|
|
|
methods: {
|
|
|
+ showShop() {
|
|
|
+ if (this.$isEmpty(this.shopLable)) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: "/pages/shop-info/shop-info?phone=" + this.$cache.get('phone')
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.shopShow = !this.shopShow
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
logout() {
|
|
|
this.$dialog.showModal('确定要退出吗?').then(res => {
|
|
|
uni.clearStorage()
|
|
|
@@ -213,16 +226,11 @@
|
|
|
let phone = this.$cache.get('phone')
|
|
|
let params = {
|
|
|
personTel: phone,
|
|
|
- auditStatus: this.$global.SHOP_AUDIT.PASS //审核通过
|
|
|
}
|
|
|
let res = await this.$api.shop.list(params)
|
|
|
if (this.$isEmpty(res.data.records)) {
|
|
|
- this.$dialog.showModal('找不到商户信息',false).then(()=>{
|
|
|
- this.$cache.clear()
|
|
|
- uni.reLaunch({
|
|
|
- url:"/pages/login/account-login"
|
|
|
- })
|
|
|
- })
|
|
|
+ this.$u.vuex('vuex_shopStatus', false)
|
|
|
+ return
|
|
|
}
|
|
|
this.shopList = res.data.records
|
|
|
let item = this.shopList[0]
|
|
|
@@ -232,11 +240,14 @@
|
|
|
this.labelNames = item.labelNames
|
|
|
this.mallId = item.mallId
|
|
|
this.cacheSelectedShop(item)
|
|
|
+ this.handelShopStatus()
|
|
|
//获取统计数据
|
|
|
this.getStatistic()
|
|
|
},
|
|
|
getStatistic() {
|
|
|
- this.$api.shop.statistic({shopId:this.shopId}).then(res => {
|
|
|
+ this.$api.shop.statistic({
|
|
|
+ shopId: this.shopId
|
|
|
+ }).then(res => {
|
|
|
this.statistic = res.data
|
|
|
})
|
|
|
},
|
|
|
@@ -248,9 +259,11 @@
|
|
|
labelNames: this.labelNames
|
|
|
}
|
|
|
this.$cache.put("selectedShop", Object.assign(item, selectedShop))
|
|
|
+ this.$u.vuex('vuex_shopStatus', item.auditStatus)
|
|
|
this.$u.vuex('vuex_shopId', this.shopId)
|
|
|
this.$u.vuex('vuex_mallId', this.mallId)
|
|
|
- this.$u.vuex('vuex_isOpenMember',item.isOpenMember==1?true:false)
|
|
|
+ this.$u.vuex('vuex_isOpenMember', item.isOpenMember == 1 ? true : false)
|
|
|
+ this.getTaskDetail()
|
|
|
},
|
|
|
shopConfirm(e) {
|
|
|
this.shopId = e[0].value
|
|
|
@@ -266,9 +279,20 @@
|
|
|
//获取统计数据
|
|
|
this.getStatistic()
|
|
|
},
|
|
|
+ jump(path){
|
|
|
+ let flag=this.handelShopStatus()
|
|
|
+ if (this.$isNotEmpty(flag)) {
|
|
|
+ this.$jump(path)
|
|
|
+ }
|
|
|
+ },
|
|
|
operate(index) {
|
|
|
- if (!this.vuex_isOpenMember && (index== 0 || index==1)) {
|
|
|
- this.isOpenMemberShow=true
|
|
|
+ let flag=this.handelShopStatus()
|
|
|
+ if (this.$isEmpty(flag)) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ //审核通过,校验是否开启会员中心
|
|
|
+ if (!this.vuex_isOpenMember && (index == 0 || index == 1)) {
|
|
|
+ this.isOpenMemberShow = true
|
|
|
return
|
|
|
}
|
|
|
if (index == 0) {
|
|
|
@@ -279,6 +303,102 @@
|
|
|
this.$jump('/pages/card/card')
|
|
|
}
|
|
|
},
|
|
|
+ handelShopStatus() {
|
|
|
+ //商户审核通过
|
|
|
+ if (this.vuex_shopStatus == this.$global.SHOP_AUDIT.PASS) {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ //未完善商户资料
|
|
|
+ if (!this.vuex_shopStatus) {
|
|
|
+ uni.showModal({
|
|
|
+ cancelText:'暂不完善',
|
|
|
+ confirmText:'去完善',
|
|
|
+ confirmColor:'#FF9447',
|
|
|
+ cancelColor:'#606266',
|
|
|
+ showCancel:true,
|
|
|
+ title:'提示',
|
|
|
+ content:'商户资料未完善',
|
|
|
+ success: (res) => {
|
|
|
+ if (res.confirm) {
|
|
|
+ this.$jump('/pages/shop-info/shop-info?phone'+ this.$cache.get('phone'))
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ //审核失败
|
|
|
+ if (this.vuex_shopStatus == this.$global.SHOP_AUDIT.FAIL) {
|
|
|
+ this.$dialog.showModal('商户资料审核失败,请重新申请', true).then(res => {
|
|
|
+ let params = {
|
|
|
+ isFail: true,
|
|
|
+ shopId: this.vuex_shopId
|
|
|
+ }
|
|
|
+ uni.navigateTo({
|
|
|
+ url: "/pages/shop-info/shop-info" + this.$u.queryParams(params)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ //商户已停用
|
|
|
+ if (this.vuex_shopStatus == this.$global.SHOP_AUDIT.STOP) {
|
|
|
+ this.$dialog.showModal('该商户已停用',false)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ //待审核中
|
|
|
+ if (this.vuex_shopStatus.includes('WAITING')) {
|
|
|
+ if (this.vuex_shopStatus == this.$global.SHOP_AUDIT.WAITING_SIGN) {
|
|
|
+ //待签约状态,去签约
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '商户资料审核通过,请进行签约?',
|
|
|
+ cancelText:'暂不签约',
|
|
|
+ confirmColor:'#FF9447',
|
|
|
+ confirmText:'去签约',
|
|
|
+ success: function (res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ _this.$jump('/pages/webView/webView?url=' + this.taskDetail.variables.signUrl)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.vuex_shopStatus == this.$global.SHOP_AUDIT.WAITING_AUTH) {
|
|
|
+ this.$jump('/pages/webView/webView?url=' + this.taskDetail.variables.qrcodeUrl)
|
|
|
+ //待商户认证状态
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let _this=this
|
|
|
+ //待商场审核,待平台审核,待易宝审核状态下,去审核流程详情页
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '商户资料审核中,查看审核流程?',
|
|
|
+ cancelText:'暂不查看',
|
|
|
+ confirmColor:'#FF9447',
|
|
|
+ confirmText:'查看',
|
|
|
+ success: function (res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ _this.$jump('/pages/flow/flow')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 获取流程节点信息
|
|
|
+ */
|
|
|
+ async getTaskDetail() {
|
|
|
+ let audit = (await this.$api.audit.detail({
|
|
|
+ entityId: this.vuex_shopId
|
|
|
+ })).data
|
|
|
+ let params = {
|
|
|
+ assignee: '$INITIATOR',
|
|
|
+ processInstanceId: audit.processInstanceId
|
|
|
+ }
|
|
|
+ this.$api.flow.getTaskId(params).then(res => {
|
|
|
+ this.taskDetail = res.data.records[0]
|
|
|
+ })
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|