|
@@ -81,9 +81,16 @@
|
|
dataList: [],
|
|
dataList: [],
|
|
pageSize:10,
|
|
pageSize:10,
|
|
currentPage:1,
|
|
currentPage:1,
|
|
|
|
+ cangid:''
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
|
|
+ if(this.cangid){
|
|
|
|
+ uni.setStorageSync("cangid",this.cangid)
|
|
|
|
+ }
|
|
|
|
+ else{
|
|
|
|
+ this.cangid = uni.getStorageSync("cangid")
|
|
|
|
+ }
|
|
this.$api.doRequest('get', '/commonUser/api/checkSession').then(res => {
|
|
this.$api.doRequest('get', '/commonUser/api/checkSession').then(res => {
|
|
if (res.data.data == "INVALID") {
|
|
if (res.data.data == "INVALID") {
|
|
uni.showModal({
|
|
uni.showModal({
|
|
@@ -133,22 +140,31 @@
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
loadData() {
|
|
loadData() {
|
|
|
|
+ var that = this
|
|
this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouseSelf', {
|
|
this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouseSelf', {
|
|
compId: '',
|
|
compId: '',
|
|
personCharge:this.userInfo.phone
|
|
personCharge:this.userInfo.phone
|
|
}).then(res => {
|
|
}).then(res => {
|
|
console.log("warehouseBaseInfo", res)
|
|
console.log("warehouseBaseInfo", res)
|
|
let _resData = res.data.data
|
|
let _resData = res.data.data
|
|
- this.warehouseList = []
|
|
|
|
|
|
+ that.warehouseList = []
|
|
for (let i = 0; i < _resData.length; i++) {
|
|
for (let i = 0; i < _resData.length; i++) {
|
|
let _obj = {
|
|
let _obj = {
|
|
"label": _resData[i].warehouseName,
|
|
"label": _resData[i].warehouseName,
|
|
"value": _resData[i].id,
|
|
"value": _resData[i].id,
|
|
}
|
|
}
|
|
- this.warehouseList.push(_obj)
|
|
|
|
|
|
+ that.warehouseList.push(_obj)
|
|
|
|
+ if (that.cangid&&that.cangid == _resData[i].id) {
|
|
|
|
+ that.warehouseName = _resData[i].warehouseName
|
|
|
|
+ that.warehouseId = _resData[i].id
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(that.warehouseList.length > 0 && !that.cangid){
|
|
|
|
+ that.warehouseName = that.warehouseList[0].label
|
|
|
|
+ that.warehouseId = that.warehouseList[0].value
|
|
|
|
+ that.cangid = that.warehouseList[0].value
|
|
}
|
|
}
|
|
- this.warehouseName = this.warehouseList[0].label
|
|
|
|
- this.warehouseId = this.warehouseList[0].value
|
|
|
|
|
|
+
|
|
this.getList(true)
|
|
this.getList(true)
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -183,6 +199,8 @@
|
|
console.log(e)
|
|
console.log(e)
|
|
this.warehouseName = e[0].label
|
|
this.warehouseName = e[0].label
|
|
this.dataList.warehouseName = e[0].label;
|
|
this.dataList.warehouseName = e[0].label;
|
|
|
|
+ this.cangid=e[0].value
|
|
|
|
+ uni.setStorageSync("cangid",this.cangid)
|
|
this.getList(true)
|
|
this.getList(true)
|
|
},
|
|
},
|
|
//毛重
|
|
//毛重
|