|
@ -1,15 +1,17 @@ |
|
|
<template> |
|
|
<template> |
|
|
<!-- <page-meta root-font-size="18px"></page-meta> --> |
|
|
<!-- <page-meta root-font-size="18px"></page-meta> --> |
|
|
<view class="uni-flex" style="flex-direction: column" > |
|
|
<view class="uni-flex" style="flex-direction: column"> |
|
|
<view class="" style=" width: 100%; position: fixed; top: 0;right: 0;"> |
|
|
<view class="" style=" width: 100%; position: fixed; right: 0;"> |
|
|
<com-blank-view @goScan='openScanPopup' v-if="locationCode==''"></com-blank-view> |
|
|
<com-blank-view @goScan='openScanPopup' v-if="locationCode==''"></com-blank-view> |
|
|
<location-info :locationDetail='locationDetail' v-if="locationCode"></location-info> |
|
|
<location-info :locationDetail='locationDetail' v-if="locationCode"></location-info> |
|
|
<z-tabs v-if="locationCode" :list="tabList" @change="tabChange" /> |
|
|
<z-tabs v-if="locationCode" :list="tabList" @change="tabChange" /> |
|
|
</view> |
|
|
</view> |
|
|
<view style="padding-top: 200rpx;width:100%"> |
|
|
<view style="padding-top: 210rpx;width:100%"> |
|
|
<view v-if="totalCount>0" style="margin:10rpx; font-size:35rpx; font-weight:bold">总数 : {{totalCount}} </view> |
|
|
<view v-if="totalCount>0" style=" margin-left: 10rpx;margin-bottom: 10rpx; font-size:35rpx; font-weight:bold">总数 : {{totalCount}} |
|
|
<view v-for="(item, index) in dataList" style="width:100%"> |
|
|
</view> |
|
|
<view class="uni-flex uni-row" style=" align-items: center; background-color: #fff; border-radius:10rpx;margin:10rpx; " > |
|
|
<view v-for="(item, index) in dataList" style="width:100%" :key="index"> |
|
|
|
|
|
<view class="uni-flex uni-row" |
|
|
|
|
|
style=" align-items: center; background-color: #fff; border-radius:10rpx;margin:10rpx; "> |
|
|
<view class="" style="font-size:35rpx; "> |
|
|
<view class="" style="font-size:35rpx; "> |
|
|
({{index+1}}) |
|
|
({{index+1}}) |
|
|
</view> |
|
|
</view> |
|
@ -22,7 +24,6 @@ |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<win-scan-button @goScan='openScanPopup' v-if="locationCode!=''"></win-scan-button> |
|
|
<win-scan-button @goScan='openScanPopup' v-if="locationCode!=''"></win-scan-button> |
|
|
<winScanLocation ref="scanPopup" title="库位代码" @getLocation='getScanCode'></winScanLocation> |
|
|
<winScanLocation ref="scanPopup" title="库位代码" @getLocation='getScanCode'></winScanLocation> |
|
|
|
|
|
|
|
@ -35,7 +36,7 @@ |
|
|
<script> |
|
|
<script> |
|
|
import { |
|
|
import { |
|
|
getBalanceByLocationcode, |
|
|
getBalanceByLocationcode, |
|
|
getBalanceByLocationcodeGroup, |
|
|
getTransactionByLocationcode, |
|
|
getExpectInByLocationCode, |
|
|
getExpectInByLocationCode, |
|
|
getExpectOutByLocationCode |
|
|
getExpectOutByLocationCode |
|
|
} from '@/api/request2.js'; |
|
|
} from '@/api/request2.js'; |
|
@ -81,13 +82,13 @@ |
|
|
// 数据总量 |
|
|
// 数据总量 |
|
|
|
|
|
|
|
|
dataList: [], |
|
|
dataList: [], |
|
|
tabList: ['汇总', '明细', '预计入', '预计出'], |
|
|
tabList: ['库存余额', '预计入', '预计出', '库存事务'], |
|
|
tabIndex: 0, |
|
|
tabIndex: 0, |
|
|
loadingType: "nomore", |
|
|
loadingType: "nomore", |
|
|
totalCount:0 |
|
|
totalCount: 0 |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
onLoad(option){ |
|
|
onLoad(option) { |
|
|
uni.setNavigationBarTitle({ |
|
|
uni.setNavigationBarTitle({ |
|
|
title: option.title |
|
|
title: option.title |
|
|
}) |
|
|
}) |
|
@ -135,7 +136,7 @@ |
|
|
// this.getContentByTab(this.tabIndex); |
|
|
// this.getContentByTab(this.tabIndex); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
getSummary(pageNo, pageSize, type) { |
|
|
getBalance(pageNo, pageSize, type) { |
|
|
let that = this; |
|
|
let that = this; |
|
|
uni.showLoading({ |
|
|
uni.showLoading({ |
|
|
title: "加载中...", |
|
|
title: "加载中...", |
|
@ -148,12 +149,18 @@ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
var params = { |
|
|
var params = { |
|
|
locationCode: this.locationCode, |
|
|
|
|
|
pageNo: this.pageNo, |
|
|
pageNo: this.pageNo, |
|
|
pageSize: pageSize |
|
|
pageSize: pageSize, |
|
|
|
|
|
filters: [{ |
|
|
|
|
|
column: "locationCode", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: this.locationCode |
|
|
|
|
|
}], |
|
|
|
|
|
sort:"createTime", |
|
|
|
|
|
by: "ASC" |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
getBalanceByLocationcodeGroup(params).then(res => { |
|
|
getBalanceByLocationcode(params).then(res => { |
|
|
uni.hideLoading(); |
|
|
uni.hideLoading(); |
|
|
if (type === "refresh") { |
|
|
if (type === "refresh") { |
|
|
uni.stopPullDownRefresh(); |
|
|
uni.stopPullDownRefresh(); |
|
@ -175,7 +182,7 @@ |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
getDetailList(pageNo, pageSize, type) { |
|
|
getTransaction(pageNo, pageSize, type) { |
|
|
let that = this; |
|
|
let that = this; |
|
|
uni.showLoading({ |
|
|
uni.showLoading({ |
|
|
title: "加载中...", |
|
|
title: "加载中...", |
|
@ -189,11 +196,17 @@ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
var params = { |
|
|
var params = { |
|
|
locationCode: this.locationCode, |
|
|
|
|
|
pageNo: this.pageNo, |
|
|
pageNo: this.pageNo, |
|
|
pageSize: pageSize |
|
|
pageSize: pageSize, |
|
|
|
|
|
filters: [{ |
|
|
|
|
|
column: "locationCode", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: this.locationCode |
|
|
|
|
|
}], |
|
|
|
|
|
sort:"createTime", |
|
|
|
|
|
by: "DESC" |
|
|
} |
|
|
} |
|
|
getBalanceByLocationcode(params).then(res => { |
|
|
getTransactionByLocationcode(params).then(res => { |
|
|
uni.hideLoading(); |
|
|
uni.hideLoading(); |
|
|
if (type === "refresh") { |
|
|
if (type === "refresh") { |
|
|
uni.stopPullDownRefresh(); |
|
|
uni.stopPullDownRefresh(); |
|
@ -233,8 +246,9 @@ |
|
|
column: "locationCode", |
|
|
column: "locationCode", |
|
|
action: "==", |
|
|
action: "==", |
|
|
value: this.locationCode |
|
|
value: this.locationCode |
|
|
|
|
|
}], |
|
|
}] |
|
|
sort:"createTime", |
|
|
|
|
|
by: "ASC" |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
getExpectInByLocationCode(params).then(res => { |
|
|
getExpectInByLocationCode(params).then(res => { |
|
@ -277,8 +291,9 @@ |
|
|
column: "locationCode", |
|
|
column: "locationCode", |
|
|
action: "==", |
|
|
action: "==", |
|
|
value: this.locationCode |
|
|
value: this.locationCode |
|
|
|
|
|
}], |
|
|
}] |
|
|
sort:"createTime", |
|
|
|
|
|
by: "ASC" |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
getExpectOutByLocationCode(params).then(res => { |
|
|
getExpectOutByLocationCode(params).then(res => { |
|
@ -304,12 +319,12 @@ |
|
|
|
|
|
|
|
|
getContentByTab(index, pageNo, pageSize, type) { |
|
|
getContentByTab(index, pageNo, pageSize, type) { |
|
|
if (index === 0) { |
|
|
if (index === 0) { |
|
|
this.getSummary(pageNo, pageSize, type); |
|
|
this.getBalance(pageNo, pageSize, type); |
|
|
} else if (index === 1) this.getDetailList(pageNo, pageSize, type) |
|
|
} else if (index === 1) this.getExpectin(pageNo, pageSize, type) |
|
|
else if (index === 2) { |
|
|
else if (index === 2) { |
|
|
this.getExpectin(pageNo, pageSize, type) |
|
|
|
|
|
} else if (index == 3) { |
|
|
|
|
|
this.getExpectOut(pageNo, pageSize, type) |
|
|
this.getExpectOut(pageNo, pageSize, type) |
|
|
|
|
|
} else if (index == 3) { |
|
|
|
|
|
this.getTransaction(pageNo, pageSize, type) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -327,7 +342,7 @@ |
|
|
}, |
|
|
}, |
|
|
tabChange(index) { |
|
|
tabChange(index) { |
|
|
this.tabIndex = index; |
|
|
this.tabIndex = index; |
|
|
this.getContentByTab(index, this.pageNo, this.pageSize,"refresh") |
|
|
this.getContentByTab(index, this.pageNo, this.pageSize, "refresh") |
|
|
}, |
|
|
}, |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|