|
@ -1,24 +1,25 @@ |
|
|
<!-- 基于z-paging封装个性化分页组件演示(vue) --> |
|
|
<!-- 基于z-paging封装个性化分页组件演示(vue) --> |
|
|
<template> |
|
|
<template> |
|
|
<view class=""> |
|
|
<view class="uni-flex" style="flex-direction: column"> |
|
|
|
|
|
<itemFilter ref="filter" @onConfirmClick="confirm"> </itemFilter> |
|
|
|
|
|
<view class="top" style=""> |
|
|
<com-blank-view @goScan="openScanPopup" v-if="itemCode == ''"></com-blank-view> |
|
|
<com-blank-view @goScan="openScanPopup" v-if="itemCode == ''"></com-blank-view> |
|
|
<!-- 这里就很整洁了,只要设置ref,绑定query事件,绑定list就可以了 --> |
|
|
<item-info v-if="itemDetail" :itemdetail="itemDetail"></item-info> |
|
|
<my-paging v-show="itemCode != ''" ref="paging" v-model="dataList" @query="queryList"> |
|
|
<z-tabs v-if="itemCode" :list="tabList" @change="tabChange" /> |
|
|
<!-- 需要固定在顶部不滚动的view放在slot="top"的view中,如果需要跟着滚动,则不要设置slot="top" --> |
|
|
|
|
|
<template #top> |
|
|
|
|
|
<view v-if="itemDetail != undefined"> |
|
|
|
|
|
<item-info :itemdetail="itemDetail"></item-info> |
|
|
|
|
|
<view class="split_line"></view> |
|
|
|
|
|
<z-tabs :list="tabList" @change="tabChange" /> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
|
|
|
<view class="" style="padding-bottom: 50rpx"> |
|
|
<view style="padding-top: 230rpx; width: 100%"> |
|
|
<comItemDetailCard v-if="tabIndex == 0" :itemList="dataList" :isShowPack="false" style="margin: 20rpx"> </comItemDetailCard> |
|
|
<view v-if="totalCount > 0" style="margin: 10rpx; font-size: 35rpx; font-weight: bold">总数 : {{ totalCount }} |
|
|
<comItemDetailCard v-if="tabIndex == 1" :itemList="dataList" style="margin: 20rpx"> </comItemDetailCard> |
|
|
</view> |
|
|
<comItemDetailCard v-if="tabIndex == 2" :itemList="dataList" :isShowLocation="false" :isShowBusiness="true" style="margin: 20rpx"></comItemDetailCard> |
|
|
<view v-for="(item, index) in dataList" style="width: 100%" :key="index"> |
|
|
<comItemDetailCard v-if="tabIndex == 3" :itemList="dataList" :isShowLocation="false" :isShowBusiness="true" style="margin: 20rpx"> </comItemDetailCard> |
|
|
<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> |
|
|
|
|
|
<comItemDetailCard :isShowPack="false" :dataContent="item" style="margin: 10rpx"> </comItemDetailCard> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<uni-load-more :status="loadingType" v-if="dataList.length > 0" /> |
|
|
</view> |
|
|
</view> |
|
|
</my-paging> |
|
|
|
|
|
<win-scan-button @goScan="openScanPopup" v-if="itemCode != ''"></win-scan-button> |
|
|
<win-scan-button @goScan="openScanPopup" v-if="itemCode != ''"></win-scan-button> |
|
|
<win-scan-item ref="scanPopup" title="物料代码" @getScanResult="getScanCode"> </win-scan-item> |
|
|
<win-scan-item ref="scanPopup" title="物料代码" @getScanResult="getScanCode"> </win-scan-item> |
|
|
<com-message ref="comMessageRef" /> |
|
|
<com-message ref="comMessageRef" /> |
|
@ -26,50 +27,72 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
<script setup lang="ts"> |
|
|
import { ref, getCurrentInstance, nextTick, onMounted, watch } from 'vue' |
|
|
import { ref, getCurrentInstance, nextTick, onMounted, watch } from 'vue' |
|
|
import { onLoad, onShow, onNavigationBarButtonTap, onReady, onBackPress, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app' |
|
|
import { onLoad, onShow, onNavigationBarButtonTap, onReady, onBackPress, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app' |
|
|
import { getExpectoutByItemcode, getExpectinByItemcode, getBalanceByItemCode, getBasicItemByCode, getBalanceSummary } from '@/api/request2.js' |
|
|
import { getExpectoutByItemcode, getExpectinByItemcode, getBalanceByItemCode, getBasicItemByCode, getBalanceSummary } from '@/api/request2.js' |
|
|
import { goHome } from '@/common/basic.js' |
|
|
import { goHome } from '@/common/basic.js' |
|
|
import itemInfo from '@/mycomponents/item/itemInfo.vue' |
|
|
import itemInfo from '@/mycomponents/item/itemInfo.vue' |
|
|
import comBlankView from '@/mycomponents/common/comBlankView.vue' |
|
|
import comBlankView from '@/mycomponents/common/comBlankView.vue' |
|
|
import winScanItem from '@/mycomponents/scan/winScanItem.vue' |
|
|
import winScanItem from '@/mycomponents/scan/winScanItem.vue' |
|
|
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
|
|
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
|
|
import comItemDetailCard from '@/pages/query/coms/comItemDetailCard.vue' |
|
|
import comItemDetailCard from '@/pages/query/coms/comItemDetailCard.vue' |
|
|
|
|
|
import itemFilter from '@/mycomponents/item/itemFilter.vue' |
|
|
const { proxy } = getCurrentInstance() |
|
|
import comEmptyView from '@/mycomponents/common/comEmptyView.vue' |
|
|
|
|
|
|
|
|
const dataList = ref([]) |
|
|
const { proxy } = getCurrentInstance() |
|
|
const tabList = ref(['汇总', '明细', '预计入', '预计出']) |
|
|
|
|
|
const tabIndex = ref(0) |
|
|
const dataList = ref([]) |
|
|
const itemDetail = ref(undefined) |
|
|
const tabList = ref(['汇总', '明细', '预计入', '预计出']) |
|
|
const itemCode = ref('') |
|
|
const tabIndex = ref(0) |
|
|
const balances = ref([]) |
|
|
const itemDetail = ref(undefined) |
|
|
const scanPopup = ref() |
|
|
const itemCode = ref('') |
|
|
const paging = ref() |
|
|
const balances = ref([]) |
|
|
const comMessageRef = ref() |
|
|
const loadingType = ref('nomore') |
|
|
onNavigationBarButtonTap((e) => { |
|
|
const totalCount = ref(0) |
|
|
|
|
|
const locationCode = ref('') |
|
|
|
|
|
const inventoryStatus = ref('') |
|
|
|
|
|
const pageSize = ref(10) |
|
|
|
|
|
const pageNo = ref(1) |
|
|
|
|
|
const scanPopup = ref() |
|
|
|
|
|
const paging = ref() |
|
|
|
|
|
const comMessageRef = ref() |
|
|
|
|
|
const filter = ref() |
|
|
|
|
|
onNavigationBarButtonTap((e) => { |
|
|
if (e.index === 0) { |
|
|
if (e.index === 0) { |
|
|
goHome() |
|
|
goHome() |
|
|
|
|
|
} else if (e.index == 1) { |
|
|
|
|
|
filter.value.openFilter() |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
onMounted(() => { |
|
|
onMounted(() => { |
|
|
openScanPopup() |
|
|
openScanPopup() |
|
|
}) |
|
|
}) |
|
|
const openScanPopup = (val) => { |
|
|
onReachBottom(() => { |
|
|
|
|
|
console.log('底部') |
|
|
|
|
|
// 避免多次触发 |
|
|
|
|
|
if (loadingType.value == 'loading' || loadingType.value == 'nomore') { |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
getContentByTab(tabIndex.value, pageNo.value, pageSize.value, 'more') |
|
|
|
|
|
}) |
|
|
|
|
|
onPullDownRefresh(() => { |
|
|
|
|
|
getContentByTab(tabIndex.value, pageNo.value, pageSize.value, 'refresh') |
|
|
|
|
|
}) |
|
|
|
|
|
const openScanPopup = (val) => { |
|
|
scanPopup.value.openScanPopup() |
|
|
scanPopup.value.openScanPopup() |
|
|
} |
|
|
} |
|
|
const closeScanPopup = () => { |
|
|
const closeScanPopup = () => { |
|
|
scanPopup.value.closeScanPopup() |
|
|
scanPopup.value.closeScanPopup() |
|
|
} |
|
|
} |
|
|
const getScanCode = (code) => { |
|
|
const getScanCode = (code) => { |
|
|
if (code == '') { |
|
|
if (code == '') { |
|
|
showMessage('物料号不能为空') |
|
|
showMessage('物料号不能为空') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
itemCode.value = '' |
|
|
itemCode.value = '' |
|
|
getItemInfo(code) |
|
|
getItemInfo(code) |
|
|
} |
|
|
} |
|
|
const getItemInfo = (code) => { |
|
|
const getItemInfo = (code) => { |
|
|
proxy.$modal.loading('正在查询物料信息....') |
|
|
proxy.$modal.loading('正在查询物料信息....') |
|
|
|
|
|
|
|
|
getBasicItemByCode(code) |
|
|
getBasicItemByCode(code) |
|
@ -89,182 +112,311 @@ const getItemInfo = (code) => { |
|
|
itemCode.value = '' |
|
|
itemCode.value = '' |
|
|
showMessage(error) |
|
|
showMessage(error) |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 汇总 |
|
|
const getSummary = (pageNo, pageSize, type) => { |
|
|
const getSummary = (pageNo, pageSize) => { |
|
|
uni.showLoading({ |
|
|
proxy.$modal.loading('加载中....') |
|
|
title: "加载中...", |
|
|
const params = { |
|
|
mask: true |
|
|
itemCode: itemCode.value, |
|
|
}); |
|
|
pageNo, |
|
|
loadingType.value = "loading"; |
|
|
pageSize |
|
|
if (type === "refresh") { |
|
|
|
|
|
pageNo.value = 1; |
|
|
|
|
|
dataList.value = []; |
|
|
} |
|
|
} |
|
|
getBalanceSummary(params) |
|
|
|
|
|
.then((res) => { |
|
|
var filters = []; |
|
|
uni.hideLoading() |
|
|
filters.push({ |
|
|
if (res.data.list.length > 0) { |
|
|
column: "itemCode", |
|
|
paging.value.complete(res.data.list) |
|
|
action: "==", |
|
|
} else { |
|
|
value: itemCode.value |
|
|
paging.value.complete(false) |
|
|
}) |
|
|
showMessage(`未查找到物料【${itemCode.value}】`) |
|
|
if (locationCode.value) { |
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "locationCode", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: locationCode.value |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (inventoryStatus.value) { |
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "inventoryStatus", |
|
|
|
|
|
action: "in", |
|
|
|
|
|
value: inventoryStatus.value |
|
|
}) |
|
|
}) |
|
|
.catch((error) => { |
|
|
} |
|
|
paging.value.complete(false) |
|
|
|
|
|
uni.hideLoading() |
|
|
var params = { |
|
|
showMessage(error) |
|
|
filters: filters, |
|
|
|
|
|
pageNo: pageNo.value, |
|
|
|
|
|
pageSize: pageSize |
|
|
|
|
|
} |
|
|
|
|
|
getBalanceByItemCode(params).then(res => { |
|
|
|
|
|
uni.hideLoading(); |
|
|
|
|
|
|
|
|
|
|
|
if (type === "refresh") { |
|
|
|
|
|
uni.stopPullDownRefresh(); |
|
|
|
|
|
} |
|
|
|
|
|
var list = res.data.list; |
|
|
|
|
|
totalCount.value = res.data.total |
|
|
|
|
|
loadingType.value = "loadmore"; |
|
|
|
|
|
if (list == null || list.length == 0) { |
|
|
|
|
|
loadingType.value = "nomore"; |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
list.forEach(item => { |
|
|
|
|
|
item.packingNumber = "" |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
dataList.value = type === "refresh" ? list : dataList.value..valueconcat(list); |
|
|
|
|
|
pageNo.value++; |
|
|
|
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
paging.value.complete(false); |
|
|
|
|
|
uni.hideLoading(); |
|
|
|
|
|
showMessage(error); |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
//明细 |
|
|
|
|
|
const getDetailList = (pageNo, pageSize, type) => { |
|
|
|
|
|
uni.showLoading({ |
|
|
|
|
|
title: "加载中...", |
|
|
|
|
|
mask: true |
|
|
|
|
|
}); |
|
|
|
|
|
loadingType.value = "loading"; |
|
|
|
|
|
if (type === "refresh") { |
|
|
|
|
|
pageNo.value = 1; |
|
|
|
|
|
dataList.value = []; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var filters = []; |
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "itemCode", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: itemCode.value |
|
|
|
|
|
}) |
|
|
|
|
|
if (locationCode.value) { |
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "locationCode", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: locationCode.value |
|
|
}) |
|
|
}) |
|
|
} |
|
|
|
|
|
// 明细 |
|
|
|
|
|
const getDetailList = (pageNo, pageSize) => { |
|
|
|
|
|
proxy.$modal.loading('加载中....') |
|
|
|
|
|
const params = { |
|
|
|
|
|
itemCode: itemCode.value, |
|
|
|
|
|
pageNo, |
|
|
|
|
|
pageSize |
|
|
|
|
|
} |
|
|
|
|
|
getBalanceByItemCode(params) |
|
|
|
|
|
.then((res) => { |
|
|
|
|
|
uni.hideLoading() |
|
|
|
|
|
if (res.data.list.length > 0) { |
|
|
|
|
|
paging.value.complete(res.data.list) |
|
|
|
|
|
} else { |
|
|
|
|
|
paging.value.complete(false) |
|
|
|
|
|
showMessage(`未查找到物料【${itemCode.value}】`) |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (inventoryStatus.value) { |
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "inventoryStatus", |
|
|
|
|
|
action: "in", |
|
|
|
|
|
value: inventoryStatus.value |
|
|
}) |
|
|
}) |
|
|
.catch((error) => { |
|
|
} |
|
|
paging.value.complete(false) |
|
|
|
|
|
uni.hideLoading() |
|
|
var params = { |
|
|
showMessage(error) |
|
|
filters: filters, |
|
|
|
|
|
pageNo: pageNo.value, |
|
|
|
|
|
pageSize: pageSize |
|
|
|
|
|
} |
|
|
|
|
|
getBalanceByItemCode(params).then(res => { |
|
|
|
|
|
uni.hideLoading(); |
|
|
|
|
|
|
|
|
|
|
|
if (type === "refresh") { |
|
|
|
|
|
uni.stopPullDownRefresh(); |
|
|
|
|
|
} |
|
|
|
|
|
var list = res.data.list; |
|
|
|
|
|
totalCount.value = res.data.total |
|
|
|
|
|
loadingType.value = "loadmore"; |
|
|
|
|
|
if (list == null || list.length == 0) { |
|
|
|
|
|
loadingType.value = "nomore"; |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
dataList.value = type === "refresh" ? list : dataList.value.concat(list); |
|
|
|
|
|
pageNo.value++; |
|
|
|
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
uni.hideLoading(); |
|
|
|
|
|
showMessage(error); |
|
|
}) |
|
|
}) |
|
|
} |
|
|
|
|
|
const ontabtap = (e) => { |
|
|
} |
|
|
const index = e.target.dataset.current || e.currentTarget.dataset.current |
|
|
|
|
|
tabIndex.value = index |
|
|
const getContentByTab = (index, pageNo, pageSize, type) => { |
|
|
getContentByTab(index) |
|
|
if (index === 0) getSummary(pageNo, pageSize, type); |
|
|
} |
|
|
else if (index === 1) getDetailList(pageNo, pageSize, type); |
|
|
|
|
|
|
|
|
const getContentByTab = (index, pageNo, pageSize) => { |
|
|
|
|
|
if (index === 0) getSummary(pageNo, pageSize) |
|
|
|
|
|
else if (index === 1) getDetailList(pageNo, pageSize) |
|
|
|
|
|
else if (index === 2) { |
|
|
else if (index === 2) { |
|
|
getExpectin(pageNo, pageSize) |
|
|
getExpectin(pageNo, pageSize, type); |
|
|
} else if (index == 3) { |
|
|
} else if (index == 3) { |
|
|
getExpectout(pageNo, pageSize) |
|
|
getExpectout(pageNo, pageSize, type); |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
// 预计入 |
|
|
|
|
|
const getExpectin = (pageNo, pageSize) => { |
|
|
|
|
|
proxy.$modal.loading('加载中....') |
|
|
|
|
|
const params = { |
|
|
|
|
|
itemCode: itemCode.value, |
|
|
|
|
|
pageNo, |
|
|
|
|
|
pageSize |
|
|
|
|
|
} |
|
|
|
|
|
getExpectinByItemcode(params) |
|
|
|
|
|
.then((res) => { |
|
|
|
|
|
uni.hideLoading() |
|
|
|
|
|
if (res.data.total > 0) { |
|
|
|
|
|
paging.value.complete(res.data.list) |
|
|
|
|
|
} else { |
|
|
|
|
|
paging.value.complete(false) |
|
|
|
|
|
showMessage(`未查找到物料【${itemCode.value}】`) |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
//预计入 |
|
|
|
|
|
const getExpectin = (pageNo, pageSize, type) { |
|
|
|
|
|
uni.showLoading({ |
|
|
|
|
|
title: "加载中...", |
|
|
|
|
|
mask: true |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
loadingType.value = "loading"; |
|
|
|
|
|
if (type === "refresh") { |
|
|
|
|
|
pageNo.value = 1; |
|
|
|
|
|
dataList.value = []; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var filters = []; |
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "itemCode", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: itemCode.value |
|
|
}) |
|
|
}) |
|
|
.catch((error) => { |
|
|
if (locationCode.value) { |
|
|
paging.value.complete(false) |
|
|
filters.push({ |
|
|
uni.hideLoading() |
|
|
column: "locationCode", |
|
|
showMessage(error) |
|
|
action: "==", |
|
|
|
|
|
value: locationCode.value |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 预计出 |
|
|
if (inventoryStatus.value) { |
|
|
const getExpectout = (pageNo, pageSize) => { |
|
|
filters.push({ |
|
|
proxy.$modal.loading('加载中....') |
|
|
column: "inventoryStatus", |
|
|
const params = { |
|
|
action: "in", |
|
|
itemCode: itemCode.value, |
|
|
value: inventoryStatus.value |
|
|
pageNo, |
|
|
}) |
|
|
pageSize |
|
|
|
|
|
} |
|
|
} |
|
|
getExpectoutByItemcode(params) |
|
|
|
|
|
.then((res) => { |
|
|
var params = { |
|
|
uni.hideLoading() |
|
|
filters: filters, |
|
|
console.log(res) |
|
|
pageNo: pageNo.value, |
|
|
if (res.data.total > 0) { |
|
|
pageSize: pageSize |
|
|
paging.value.complete(res.data.list) |
|
|
} |
|
|
} else { |
|
|
getExpectinByItemcode(params).then(res => { |
|
|
paging.value.complete(false) |
|
|
uni.hideLoading(); |
|
|
showMessage(`未查找到物料【${itemCode.value}】`) |
|
|
|
|
|
|
|
|
if (type === "refresh") { |
|
|
|
|
|
uni.stopPullDownRefresh(); |
|
|
|
|
|
} |
|
|
|
|
|
var list = res.data.list; |
|
|
|
|
|
totalCount.value = res.data.total |
|
|
|
|
|
loadingType.value = "loadmore"; |
|
|
|
|
|
if (list == null || list.length == 0) { |
|
|
|
|
|
loadingType.value = "nomore"; |
|
|
|
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
dataList.value = type === "refresh" ? list : dataList.value.concat(list); |
|
|
|
|
|
pageNo.value++; |
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
uni.hideLoading(); |
|
|
|
|
|
showMessage(error); |
|
|
}) |
|
|
}) |
|
|
.catch((error) => { |
|
|
|
|
|
paging.value.complete(false) |
|
|
} |
|
|
uni.hideLoading() |
|
|
|
|
|
showMessage(error) |
|
|
//预计出 |
|
|
|
|
|
const getExpectout = (pageNo, pageSize, type) => { |
|
|
|
|
|
uni.showLoading({ |
|
|
|
|
|
title: "加载中...", |
|
|
|
|
|
mask: true |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
loadingType.value = "loading"; |
|
|
|
|
|
if (type === "refresh") { |
|
|
|
|
|
pageNo.value = 1; |
|
|
|
|
|
dataList.value = []; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var filters = []; |
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "itemCode", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: itemCode.value |
|
|
}) |
|
|
}) |
|
|
} |
|
|
if (locationCode.value) { |
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "locationCode", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: locationCode.value |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
const showMessage = (message) => { |
|
|
if (inventoryStatus.value) { |
|
|
comMessageRef.value.showErrorMessage(message, (res) => { |
|
|
filters.push({ |
|
|
if (res) { |
|
|
column: "inventoryStatus", |
|
|
afterCloseMessage() |
|
|
action: "in", |
|
|
|
|
|
value: inventoryStatus.value |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var params = { |
|
|
|
|
|
filters: filters, |
|
|
|
|
|
pageNo: pageNo.value, |
|
|
|
|
|
pageSize: pageSize |
|
|
} |
|
|
} |
|
|
|
|
|
getExpectoutByItemcode(params).then(res => { |
|
|
|
|
|
uni.hideLoading(); |
|
|
|
|
|
if (type === "refresh") { |
|
|
|
|
|
uni.stopPullDownRefresh(); |
|
|
|
|
|
} |
|
|
|
|
|
var list = res.data.list; |
|
|
|
|
|
totalCount.value = res.data.total |
|
|
|
|
|
loadingType.value = "loadmore"; |
|
|
|
|
|
if (list == null || list.length == 0) { |
|
|
|
|
|
loadingType.value = "nomore"; |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
dataList.value = type === "refresh" ? list : dataList.value.concat(list); |
|
|
|
|
|
pageNo.value++; |
|
|
|
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
uni.hideLoading(); |
|
|
|
|
|
showMessage(error); |
|
|
}) |
|
|
}) |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const afterCloseMessage = () => { |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const showMessage = (message) => { |
|
|
|
|
|
comMessageRef.value.showErrorMessage(message, res => { |
|
|
|
|
|
if (res) { |
|
|
|
|
|
afterCloseMessage() |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
const afterCloseMessage = () => { |
|
|
if (scanPopup.value != undefined) { |
|
|
if (scanPopup.value != undefined) { |
|
|
scanPopup.value.getfocus() |
|
|
scanPopup.value.getfocus(); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
const tabChange = (index) => { |
|
|
const tabChange = (index) => { |
|
|
tabIndex.value = index; |
|
|
console.log(index) |
|
|
getContentByTab(index, pageNo.value, pageSize.value, "refresh") |
|
|
tabIndex.value = index |
|
|
|
|
|
paging.value.reload(true) |
|
|
|
|
|
} |
|
|
|
|
|
const queryList = (pageNo, pageSize) => { |
|
|
|
|
|
if (itemCode.value != '') { |
|
|
|
|
|
getContentByTab(tabIndex.value, pageNo, pageSize) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const itemClick = (item) => {} |
|
|
const confirm = (locationCodeParams, status) => { |
|
|
|
|
|
locationCode.value = locationCodeParams; |
|
|
|
|
|
if (status.length > 0) { |
|
|
|
|
|
var arrayItems = status.join(',') |
|
|
|
|
|
inventoryStatus.value = arrayItems |
|
|
|
|
|
} else { |
|
|
|
|
|
inventoryStatus.value = "" |
|
|
|
|
|
} |
|
|
|
|
|
tabChange(tabIndex.value) |
|
|
|
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style> |
|
|
<style> |
|
|
.notice { |
|
|
page { |
|
|
background-color: red; |
|
|
height: 100%; |
|
|
color: white; |
|
|
} |
|
|
display: flex; |
|
|
.top{ |
|
|
flex-direction: column; |
|
|
|
|
|
padding: 12rpx 20rpx; |
|
|
|
|
|
font-size: 24rpx; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.item { |
|
|
|
|
|
position: relative; |
|
|
|
|
|
height: 150rpx; |
|
|
|
|
|
display: flex; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
justify-content: space-between; |
|
|
|
|
|
padding: 0rpx 30rpx; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.item-detail { |
|
|
|
|
|
padding: 5rpx 15rpx; |
|
|
|
|
|
border-radius: 10rpx; |
|
|
|
|
|
font-size: 28rpx; |
|
|
|
|
|
color: white; |
|
|
|
|
|
background-color: #007aff; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.item-line { |
|
|
|
|
|
position: absolute; |
|
|
|
|
|
bottom: 0rpx; |
|
|
|
|
|
left: 0rpx; |
|
|
|
|
|
height: 1px; |
|
|
|
|
|
width: 100%; |
|
|
width: 100%; |
|
|
background-color: #eeeeee; |
|
|
position: fixed; |
|
|
} |
|
|
/* #ifdef APP */ |
|
|
|
|
|
top: 0rpx; |
|
|
|
|
|
/* #endif */ |
|
|
|
|
|
|
|
|
|
|
|
/* #ifdef H5 */ |
|
|
|
|
|
top: 80rpx; |
|
|
|
|
|
/* #endif */ |
|
|
|
|
|
|
|
|
|
|
|
right: 0; |
|
|
</style> |
|
|
</style> |