Commit f3c2325d authored by Facius's avatar Facius

feat: 9、功能优化:如果师傅没有入驻,就看不到仓配功能(即点击物料订单、物料库、返件信息、出库流水 这4个图标时均弹出toast提示“请先在首页入驻”,提示1.5s后自动消失。)

parent aa731373
......@@ -30,7 +30,7 @@
<view class="ware-house-view">
<view class="ware-house-title">仓配功能</view>
<view class="ware-house-content">
<view v-for="(item, index) in warehouseItems" :key="index" class="ware-house-content-item" @click="handleClick(item.pathName)" hover-class="u-hover-class">
<view v-for="(item, index) in warehouseItems" :key="index" class="ware-house-content-item" @click="handleClick(item.pathName, true)" hover-class="u-hover-class">
<view class="ware-house-image">
<image :src="item.icon" :style="item.imageStyle"></image>
</view>
......@@ -43,7 +43,7 @@
<view v-for="(group, ind) in items" :key="ind" class="group-view">
<u-cell-group :border="false">
<view v-for="(item, index) in group" :key="index">
<u-cell-item :value="item.value" :border-bottom="false" @click="handleClick(item.pathName)">
<u-cell-item :value="item.value" :border-bottom="false" @click="handleClick(item.pathName, false)">
<image slot="icon" :src="qnFile(item.icon)" :style="item.imageStyle"></image>
<view slot="title" class="item-title">{{item.title}}</view>
<view slot="value" class="item-value">{{value}}</view>
......@@ -54,6 +54,9 @@
</view>
</view>
<u-modal v-model="show" :content="content" show-cancel-button @confirm="logout"></u-modal>
<view>
<u-toast ref="uToast" />
</view>
</view>
</template>
......@@ -68,7 +71,8 @@
show: false,
content: '是否确认退出该账户?',
wodebeijingImage: '',
placeholderImage: ''
placeholderImage: '',
needSettled: true, // 需要入驻
}
},
computed: {
......@@ -209,6 +213,13 @@
this.wodebeijingImage = this.qnFile('wodebeijing-jb.png')
this.placeholderImage = this.qnFile('touxiang.png')
},
onShow() {
// 更新是否需要入住
if (!this.needSettled) return
this.$u.api.getSettleBaseInfo().then((res) => {
this.needSettled = res.data?.needSettled
})
},
methods: {
qnFile(src) {
return process.uniEnv.qn_base_url + src
......@@ -217,8 +228,17 @@
let self = this
app.getBaseInfo(self);
},
handleClick(path) {
handleClick(path, isWarehouse) {
if(this.vuex_token) {
// 没入驻不能进入仓配相关页面
if (isWarehouse && this.needSettled) {
this.$refs.uToast.show({
title: '请先在首页入驻',
type: 'warning',
duration: 1500,
})
return
}
this.$u.route({
url: 'pages/mine/' + path
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment