|
@@ -28,21 +28,21 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
- import helper from '@/common/helper.js';
|
|
|
|
|
|
+ import helper from '@/common/helper.js';
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
inputKeyword: '',
|
|
inputKeyword: '',
|
|
newList: [],
|
|
newList: [],
|
|
- newSelectList:[],
|
|
|
|
|
|
+ newSelectList: [],
|
|
filterNewList: [],
|
|
filterNewList: [],
|
|
- moreList:[],
|
|
|
|
|
|
+ moreList: [],
|
|
compId: '',
|
|
compId: '',
|
|
- warehouseType:"",
|
|
|
|
|
|
+ warehouseType: "",
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
- this.newSelectList = uni.getStorageSync('theWarehouseList');
|
|
|
|
|
|
+ this.newSelectList = uni.getStorageSync('theWarehouseList');
|
|
},
|
|
},
|
|
onLoad(options) {
|
|
onLoad(options) {
|
|
this.warehouseType = options.warehouseType
|
|
this.warehouseType = options.warehouseType
|
|
@@ -59,19 +59,19 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- confirm(item){
|
|
|
|
|
|
+ confirm(item) {
|
|
let _list = uni.getStorageSync('theWarehouseList');
|
|
let _list = uni.getStorageSync('theWarehouseList');
|
|
- if(_list==''){
|
|
|
|
- _list=[]
|
|
|
|
|
|
+ if (_list == '') {
|
|
|
|
+ _list = []
|
|
}
|
|
}
|
|
- if(_list.length<=20){
|
|
|
|
|
|
+ if (_list.length <= 20) {
|
|
_list = _list.filter(function(val) {
|
|
_list = _list.filter(function(val) {
|
|
- if (val.warehouseName!=item.warehouseName) {
|
|
|
|
|
|
+ if (val.warehouseName != item.warehouseName) {
|
|
return val
|
|
return val
|
|
}
|
|
}
|
|
})
|
|
})
|
|
_list.unshift(item)
|
|
_list.unshift(item)
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
_list.unshift(item).pop(item)
|
|
_list.unshift(item).pop(item)
|
|
}
|
|
}
|
|
uni.setStorageSync('theWarehouseList', _list);
|
|
uni.setStorageSync('theWarehouseList', _list);
|
|
@@ -81,15 +81,20 @@
|
|
})
|
|
})
|
|
},
|
|
},
|
|
getWarehouse() {
|
|
getWarehouse() {
|
|
|
|
+ uni.showLoading({
|
|
|
|
+ title: '查询仓库',
|
|
|
|
+ mask: true
|
|
|
|
+ })
|
|
var that = this
|
|
var that = this
|
|
this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouse', {
|
|
this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouse', {
|
|
compId: uni.getStorageSync("pcUserInfo").compId,
|
|
compId: uni.getStorageSync("pcUserInfo").compId,
|
|
warehouseType: '1'
|
|
warehouseType: '1'
|
|
}).then(res => {
|
|
}).then(res => {
|
|
|
|
+ uni.hideLoading()
|
|
if (res.data.data.length != 0) {
|
|
if (res.data.data.length != 0) {
|
|
that.newList = res.data.data
|
|
that.newList = res.data.data
|
|
that.moreList = res.data.data
|
|
that.moreList = res.data.data
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|