|
|
@@ -8,6 +8,13 @@
|
|
|
</view>
|
|
|
<view class="top-bar">
|
|
|
<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
|
|
|
+
|
|
|
+ <button class="admin-button-com middle blue" style="position: absolute;right:320upx;top:-8upx;" @click="selGhs()">{{ ghsName==''?'选供货商':ghsName }}</button>
|
|
|
+
|
|
|
+ <button class="admin-button-com middle blue" style="position: absolute;right:130upx;top:-8upx;" @click="showGhsName()">显供货商名</button>
|
|
|
+
|
|
|
+ <button class="admin-button-com middle blue" style="position: absolute;right:20upx;top:-8upx;" @click="resetSearch()">重置</button>
|
|
|
+
|
|
|
</view>
|
|
|
<scroll-view scroll-y scroll-with-animation class="main-view">
|
|
|
<view class="space-view ex-table">
|
|
|
@@ -49,40 +56,55 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
isShow:false,
|
|
|
- customizationTime:'',
|
|
|
shopId:'',
|
|
|
itemId:'',
|
|
|
- nowTime: "",
|
|
|
- showTimeDropdown: false,
|
|
|
- nowShop: "",
|
|
|
- showShopDropdown: false,
|
|
|
- dataList: [],
|
|
|
- params:{
|
|
|
- itemId: '',
|
|
|
- searchTime:'',
|
|
|
- startTime: "",
|
|
|
- endTime: "",
|
|
|
- shopId: "",
|
|
|
- },
|
|
|
profile:[],
|
|
|
storageData:[],
|
|
|
searchContent:'',
|
|
|
- info:{}
|
|
|
+ info:{},
|
|
|
+ ghsId:0,
|
|
|
+ ghsName:'',
|
|
|
+ searchTime:'',
|
|
|
+ startTime:'',
|
|
|
+ endTime:'',
|
|
|
+ showGhsParam:0
|
|
|
};
|
|
|
},
|
|
|
onPullDownRefresh() {
|
|
|
this.resetList();
|
|
|
- this.getStatList().then(res => {
|
|
|
+ this.getMyStatList().then(res => {
|
|
|
uni.stopPullDownRefresh();
|
|
|
});
|
|
|
},
|
|
|
onLoad(e) {
|
|
|
this.itemId = e.id;
|
|
|
- this.params.itemId = e.id;
|
|
|
+ this.itemId = e.id;
|
|
|
this.shopId = this.getLoginInfo.shopId;
|
|
|
},
|
|
|
+ onShow(){
|
|
|
+ this.resetList()
|
|
|
+ this.getMyStatList()
|
|
|
+ },
|
|
|
methods: {
|
|
|
...mapActions(['setUserShopAll']),
|
|
|
+ selGhs(){
|
|
|
+ this.$util.pageTo({ url: "/pagesPurchase/selectGhs"})
|
|
|
+ },
|
|
|
+ showGhsName(){
|
|
|
+ this.showGhsParam = 1
|
|
|
+ this.resetList()
|
|
|
+ this.getMyStatList()
|
|
|
+ },
|
|
|
+ resetSearch(){
|
|
|
+ this.ghsId = 0
|
|
|
+ this.ghsName=''
|
|
|
+ this.searchTime = ''
|
|
|
+ this.startTime = ''
|
|
|
+ this.endTime = ''
|
|
|
+ this.showGhsParam = 0
|
|
|
+ this.resetList()
|
|
|
+ this.getMyStatList()
|
|
|
+ },
|
|
|
searchFn(e){
|
|
|
this.searchContent = e;
|
|
|
this.filterStat()
|
|
|
@@ -103,30 +125,27 @@ export default {
|
|
|
that.profile = that.storageData
|
|
|
}
|
|
|
},
|
|
|
- //选择分店
|
|
|
- selectShopFn(val){
|
|
|
- this.params.shopId = val.id;
|
|
|
- this.init();
|
|
|
- },
|
|
|
- //选择时间
|
|
|
selectDateFn(val) {
|
|
|
- this.params = {...this.params,...val}
|
|
|
- this.init();
|
|
|
+ this.searchTime = val.searchTime
|
|
|
+ this.startTime = val.startTime
|
|
|
+ this.endTime = val.endTime
|
|
|
+ this.resetList()
|
|
|
+ this.getMyStatList()
|
|
|
},
|
|
|
async init() {
|
|
|
- this.getStatList();
|
|
|
+ this.getMyStatList();
|
|
|
},
|
|
|
- getStatList() {
|
|
|
+ getMyStatList() {
|
|
|
let that = this
|
|
|
uni.showLoading()
|
|
|
- getStatCgItem(this.params).then(res => {
|
|
|
+ getStatCgItem({itemId: this.itemId, searchTime:this.searchTime, startTime:this.startTime, endTime: this.endTime,shopId:this.shopId,ghsId:this.ghsId,showGhsParam:this.showGhsParam}).then(res => {
|
|
|
uni.hideLoading()
|
|
|
if (!this.$util.isEmpty(res.data.list)) {
|
|
|
that.storageData = res.data.list
|
|
|
that.info = res.data ? res.data : []
|
|
|
that.filterStat()
|
|
|
}else{
|
|
|
- that.storageData=[]
|
|
|
+ that.profile = []
|
|
|
}
|
|
|
});
|
|
|
}
|