|
@@ -73,7 +73,8 @@
|
|
|
placeTab: [],
|
|
|
curTab: '',
|
|
|
cartNotEmpty: false,
|
|
|
- isLoad: false
|
|
|
+ isLoad: false,
|
|
|
+ webView: null
|
|
|
}
|
|
|
},
|
|
|
onLoad(option) {
|
|
@@ -83,7 +84,7 @@
|
|
|
// 获取货物
|
|
|
this.getShelfPlace()
|
|
|
this.isLoad = true
|
|
|
-
|
|
|
+ this.webView = this.$mp.page.$getAppWebview();
|
|
|
uni.$on("editCustome",(data)=>{
|
|
|
this.saveShelf(data,0)
|
|
|
})
|
|
@@ -118,7 +119,7 @@
|
|
|
// 批量上架
|
|
|
toPlRacking(){
|
|
|
const url = this.cartNotEmpty ? '/pages/batchShelves/cartList' : '/pages/batchShelves/index'
|
|
|
- uni.navigateTo({
|
|
|
+ uni.redirectTo({
|
|
|
url: url+"?shelfSn="+this.shelfSn+'&shelfName='+this.detailData.shelfName+'&customerSn='+this.detailData.customerSn
|
|
|
})
|
|
|
},
|
|
@@ -275,7 +276,6 @@
|
|
|
},
|
|
|
getShelfDetal(){
|
|
|
shelfDetail({ sn: this.shelfSn }).then(res => {
|
|
|
- console.log(res)
|
|
|
if (res.status == 200) {
|
|
|
this.detailData = res.data
|
|
|
this.switchVal = res.data.finishFlag == 1
|
|
@@ -291,7 +291,6 @@
|
|
|
})
|
|
|
getProductPlace({ shelfSn: this.shelfSn }).then(res => {
|
|
|
uni.hideLoading()
|
|
|
- console.log(res.data)
|
|
|
if (res.status == 200 && res.data) {
|
|
|
this.shelfPlaceList = res.data
|
|
|
for(let a in res.data){
|
|
@@ -316,16 +315,16 @@
|
|
|
this.curTab = item
|
|
|
},
|
|
|
getHasCartNotEmpty(){
|
|
|
- var webView = this.$mp.page.$getAppWebview();
|
|
|
- console.log(this.placeTab.length)
|
|
|
- webView.setTitleNViewButtonStyle(0, {
|
|
|
+ this.webView.setTitleNViewButtonStyle(0, {
|
|
|
"text":this.placeTab.length?"\ue67a 批量上架 ":'',
|
|
|
"color": "#00aaff"
|
|
|
});
|
|
|
shelfCartNotEmpty({ shelfSn: this.shelfSn }).then(res => {
|
|
|
this.cartNotEmpty = res.data == 1
|
|
|
- webView.setTitleNViewButtonStyle(1, {
|
|
|
- "redDot": this.placeTab.length && this.cartNotEmpty
|
|
|
+ console.log(this.placeTab.length && this.cartNotEmpty)
|
|
|
+ const showDot = this.placeTab.length && this.cartNotEmpty
|
|
|
+ this.webView.setTitleNViewButtonStyle(1, {
|
|
|
+ "redDot": showDot
|
|
|
});
|
|
|
})
|
|
|
}
|