|
|
@ -4,14 +4,26 @@ |
|
|
|
<view class="" style="width: 100%; position: fixed; top: 0; right: 0"> |
|
|
|
<com-blank-view @goScan="openScanPopup" v-if="locationCode == ''"></com-blank-view> |
|
|
|
<location-info :locationDetail="locationDetail" v-if="locationCode"></location-info> |
|
|
|
<z-tabs v-if="locationCode" :list="tabList" @change="tabChange" /> |
|
|
|
<z-tabs v-if="locationCode" :current="tabIndex" :list="tabList" @change="tabChange" /> |
|
|
|
</view> |
|
|
|
<view style="padding-top: 200rpx; width: 100%"> |
|
|
|
<view v-if="totalCount > 0" style="margin: 10rpx; font-size: 35rpx; font-weight: bold">总数 : {{ totalCount }} </view> |
|
|
|
<view v-for="(item, index) in dataList" style="width: 100%"> |
|
|
|
<view style="padding-top: 280rpx; width: 100%"> |
|
|
|
<view v-if="totalCount > 0" style="margin-left: 10rpx;margin-bottom: 10rpx; font-size:35rpx; font-weight:bold">总数 : {{ totalCount }} </view> |
|
|
|
<view v-for="(item, index) in dataList" :key="index" style="width: 100%"> |
|
|
|
<view class="uni-flex uni-row" style="align-items: center; background-color: #fff; border-radius: 10rpx; margin: 10rpx"> |
|
|
|
<view class="" style="font-size: 35rpx"> ({{ index + 1 }}) </view> |
|
|
|
<comLocationDetailCard :isShowPack="false" :dataContent="item" style="margin: 10rpx"> </comLocationDetailCard> |
|
|
|
<comLocationDetailCard |
|
|
|
:isShowPack="item.isShowPack" |
|
|
|
:isShowWarehouseCode="item.isShowWarehouseCode" |
|
|
|
:isShowJobNumber="item.isShowJobNumber" |
|
|
|
:isShowBusinessType="item.isShowBusinessType" |
|
|
|
:isShowTransactionType="item.isShowTransactionType" |
|
|
|
:isShowInventoryAction="item.isShowInventoryAction" |
|
|
|
:isShowRecordNumber="item.isShowRecordNumber" |
|
|
|
:isShowNumber="item.isShowNumber" |
|
|
|
:isShowWorker="item.isShowWorker" |
|
|
|
:dataContent="item" |
|
|
|
style='margin: 10rpx;'> |
|
|
|
</comLocationDetailCard> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<uni-load-more :status="loadingType" v-if="dataList.length > 0" /> |
|
|
@ -28,7 +40,7 @@ |
|
|
|
<script setup lang="ts"> |
|
|
|
import { ref, getCurrentInstance, nextTick, onMounted, watch } from 'vue' |
|
|
|
import { onLoad, onShow, onNavigationBarButtonTap, onReady, onBackPress, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app' |
|
|
|
import { getBalanceByLocationcode, getBalanceByLocationcodeGroup, getExpectInByLocationCode, getExpectOutByLocationCode } from '@/api/request2.js' |
|
|
|
import { getBalanceByLocationcode, getTransaction, getExpectInByLocationCode, getExpectOutByLocationCode } from '@/api/request2.js' |
|
|
|
|
|
|
|
import { maxPageSize, goHome } from '@/common/basic.js' |
|
|
|
|
|
|
@ -54,7 +66,7 @@ const pageSize = ref(10) |
|
|
|
const pageCurrent = ref(1) |
|
|
|
// 数据总量 |
|
|
|
const dataList = ref([]) |
|
|
|
const tabList = ref(['汇总', '明细', '预计入', '预计出']) |
|
|
|
const tabList = ref(['库存余额', '预计入', '预计出', '库存事务']) |
|
|
|
const tabIndex = ref(0) |
|
|
|
const loadingType = ref('nomore') |
|
|
|
const totalCount = ref(0) |
|
|
@ -108,7 +120,7 @@ const getScanCode = (location, code) => { |
|
|
|
// this.getContentByTab(this.tabIndex); |
|
|
|
} |
|
|
|
|
|
|
|
const getSummary = (pageNo, pageSize, type) => { |
|
|
|
const getBalance = (pageNo, pageSize, type) => { |
|
|
|
proxy.$modal.loading('加载中....') |
|
|
|
loadingType.value = 'loading' |
|
|
|
if (type === 'refresh') { |
|
|
@ -117,18 +129,26 @@ const getSummary = (pageNo, pageSize, type) => { |
|
|
|
} |
|
|
|
|
|
|
|
const params = { |
|
|
|
locationCode: locationCode.value, |
|
|
|
pageNo: pageNo.value, |
|
|
|
pageSize |
|
|
|
pageSize, |
|
|
|
filters: [{ |
|
|
|
column: "locationCode", |
|
|
|
action: "==", |
|
|
|
value: locationCode.value |
|
|
|
}], |
|
|
|
sorts:[{sort:"createTime",by:"ASC"},{sort:"locationCode",by:"ASC"} ,{sort:"id",by:"DESC"}], |
|
|
|
} |
|
|
|
|
|
|
|
getBalanceByLocationcodeGroup(params) |
|
|
|
getBalanceByLocationcode(params) |
|
|
|
.then((res) => { |
|
|
|
uni.hideLoading() |
|
|
|
if (type === 'refresh') { |
|
|
|
uni.stopPullDownRefresh() |
|
|
|
} |
|
|
|
const { list } = res.data |
|
|
|
list.forEach(item => { |
|
|
|
item.isShowPack = true |
|
|
|
}) |
|
|
|
totalCount.value = res.data.total |
|
|
|
loadingType.value = 'loadmore' |
|
|
|
if (list == null || list.length == 0) { |
|
|
@ -145,7 +165,7 @@ const getSummary = (pageNo, pageSize, type) => { |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
const getDetailList = (pageNo, pageSize, type) => { |
|
|
|
const getTransactionFun = (pageNo, pageSize, type) => { |
|
|
|
proxy.$modal.loading('加载中....') |
|
|
|
loadingType.value = 'loading' |
|
|
|
if (type === 'refresh') { |
|
|
@ -154,17 +174,32 @@ const getDetailList = (pageNo, pageSize, type) => { |
|
|
|
} |
|
|
|
|
|
|
|
const params = { |
|
|
|
locationCode: locationCode.value, |
|
|
|
pageNo: pageNo.value, |
|
|
|
pageSize |
|
|
|
pageSize, |
|
|
|
filters: [{ |
|
|
|
column: "locationCode", |
|
|
|
action: "==", |
|
|
|
value: locationCode.value |
|
|
|
}], |
|
|
|
sorts:[{sort:"createTime",by:"DESC"},{sort:"locationCode",by:"ASC"} ,{sort:"id",by:"DESC"}] |
|
|
|
} |
|
|
|
getBalanceByLocationcode(params) |
|
|
|
getTransaction(params) |
|
|
|
.then((res) => { |
|
|
|
uni.hideLoading() |
|
|
|
if (type === 'refresh') { |
|
|
|
uni.stopPullDownRefresh() |
|
|
|
} |
|
|
|
const { list } = res.data |
|
|
|
list.forEach(item => { |
|
|
|
item.isShowPack = true |
|
|
|
item.isShowWarehouseCode = true |
|
|
|
item.isShowBusinessType = true |
|
|
|
item.isShowTransactionType = true |
|
|
|
item.isShowInventoryAction = true |
|
|
|
item.isShowRecordNumber = true |
|
|
|
item.isShowNumber = true |
|
|
|
item.isShowWorker = true |
|
|
|
}) |
|
|
|
totalCount.value = res.data.total |
|
|
|
loadingType.value = 'loadmore' |
|
|
|
if (list == null || list.length == 0) { |
|
|
@ -200,7 +235,8 @@ const getExpectin = (pageNo, pageSize, type) => { |
|
|
|
action: '==', |
|
|
|
value: locationCode.value |
|
|
|
} |
|
|
|
] |
|
|
|
], |
|
|
|
sorts:[{sort:"createTime",by:"ASC"},{sort:"locationCode",by:"ASC"} ,{sort:"id",by:"DESC"}] |
|
|
|
} |
|
|
|
|
|
|
|
getExpectInByLocationCode(params) |
|
|
@ -210,6 +246,11 @@ const getExpectin = (pageNo, pageSize, type) => { |
|
|
|
uni.stopPullDownRefresh() |
|
|
|
} |
|
|
|
const { list } = res.data |
|
|
|
list.forEach(item => { |
|
|
|
item.isShowPack = false |
|
|
|
item.isShowJobNumber = true |
|
|
|
item.isShowBusinessType = true |
|
|
|
}) |
|
|
|
totalCount.value = res.data.total |
|
|
|
loadingType.value = 'loadmore' |
|
|
|
if (list == null || list.length == 0) { |
|
|
@ -271,13 +312,13 @@ const getExpectOut = (pageNo, pageSize, type) => { |
|
|
|
|
|
|
|
const getContentByTab = (index, pageNo, pageSize, type) => { |
|
|
|
if (index === 0) { |
|
|
|
getSummary(pageNo, pageSize, type) |
|
|
|
getBalance(pageNo, pageSize, type) |
|
|
|
} else if (index === 1) { |
|
|
|
getDetailList(pageNo, pageSize, type) |
|
|
|
} else if (index === 2) { |
|
|
|
getExpectin(pageNo, pageSize, type) |
|
|
|
} else if (index === 2) { |
|
|
|
getExpectOut(pageNo, pageSize, type) |
|
|
|
} else if (index == 3) { |
|
|
|
getExpectin(pageNo, pageSize, type) |
|
|
|
getTransactionFun(pageNo, pageSize, type) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|