|
@@ -1,5 +1,12 @@
|
|
|
<template>
|
|
|
<view class="content">
|
|
|
+ <u-navbar back-text="货架设置">
|
|
|
+ <view slot='right' style="padding: 0 30upx;color: #00aaff;" @click="toPlRacking">
|
|
|
+ <u-icon name="piliangshangjia" custom-prefix="iscm-icon"></u-icon>
|
|
|
+ <text style="margin-left: 6rpx;">批量上架</text>
|
|
|
+ <u-badge v-if="showDot" :is-dot="true" size="mini" type="error"></u-badge>
|
|
|
+ </view>
|
|
|
+ </u-navbar>
|
|
|
<view class="card-box" v-if="detailData">
|
|
|
<view class="card-row flex align_center justify_between">
|
|
|
<view class="label">货架名称</view>
|
|
@@ -72,9 +79,9 @@
|
|
|
shelfPlaceList: null,
|
|
|
placeTab: [],
|
|
|
curTab: '',
|
|
|
- cartNotEmpty: false,
|
|
|
isLoad: false,
|
|
|
- webView: null
|
|
|
+ webView: null,
|
|
|
+ showDot: false
|
|
|
}
|
|
|
},
|
|
|
onLoad(option) {
|
|
@@ -102,9 +109,6 @@
|
|
|
uni.$off("editCustome")
|
|
|
uni.$off("editShelfName")
|
|
|
},
|
|
|
- onNavigationBarButtonTap(e) {
|
|
|
- this.toPlRacking()
|
|
|
- },
|
|
|
onShow() {
|
|
|
if(!this.isLoad){
|
|
|
this.updateHw()
|
|
@@ -118,8 +122,8 @@
|
|
|
},
|
|
|
// 批量上架
|
|
|
toPlRacking(){
|
|
|
- const url = this.cartNotEmpty ? '/pages/batchShelves/cartList' : '/pages/batchShelves/index'
|
|
|
- uni.redirectTo({
|
|
|
+ const url = this.showDot ? '/pages/batchShelves/cartList' : '/pages/batchShelves/index'
|
|
|
+ uni.navigateTo({
|
|
|
url: url+"?shelfSn="+this.shelfSn+'&shelfName='+this.detailData.shelfName+'&customerSn='+this.detailData.customerSn
|
|
|
})
|
|
|
},
|
|
@@ -319,17 +323,8 @@
|
|
|
this.curTab = item
|
|
|
},
|
|
|
getHasCartNotEmpty(){
|
|
|
- this.webView.setTitleNViewButtonStyle(0, {
|
|
|
- "text":this.placeTab.length?"\ue67a 批量上架 ":'',
|
|
|
- "color": "#00aaff"
|
|
|
- });
|
|
|
shelfCartNotEmpty({ shelfSn: this.shelfSn }).then(res => {
|
|
|
- this.cartNotEmpty = res.data == 1
|
|
|
- console.log(this.placeTab.length && this.cartNotEmpty)
|
|
|
- const showDot = this.placeTab.length && this.cartNotEmpty
|
|
|
- this.webView.setTitleNViewButtonStyle(1, {
|
|
|
- "redDot": showDot
|
|
|
- });
|
|
|
+ this.showDot = this.placeTab.length && res.data == 1
|
|
|
})
|
|
|
}
|
|
|
}
|