|
|
@ -17,28 +17,27 @@ |
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
<view class="page-main" style="margin-bottom: 100rpx;background-color: #F3F4F5"> |
|
|
|
<scroll-view scroll-y="true" class="page-main-scroll"> |
|
|
|
<view class="" style="background-color: #F3F4F5" v-for="(item, index) in dataList" :key="item.id"> |
|
|
|
<view class="page-main" style="padding-bottom: 100rpx;background-color: #F3F4F5"> |
|
|
|
<!-- <scroll-view scroll-y="true" class="page-main-scroll" @scrolltolower="scrolltolower"> --> |
|
|
|
<view class="" style="background-color: #F3F4F5" v-for="(item, index) in showTableData" :key="item.id"> |
|
|
|
<uni-swipe-action ref="swipeAction"> |
|
|
|
<uni-swipe-action-item> |
|
|
|
<view class="uni-flex uni-row " |
|
|
|
style="align-items: center; margin: 10rpx; border-radius: 10rpx ;"> |
|
|
|
<comCountDetailcards :ref="'countDetail_'+index" :dataContent="item" :index="index" |
|
|
|
@editItem="editItem" :settingParam="jobContent" @remove="updateData" |
|
|
|
@summCount="summCount" @currentCount="currentCount" @updateData="updateData"> |
|
|
|
<view class="uni-flex uni-row " style="align-items: center; margin: 10rpx; border-radius: 10rpx ;"> |
|
|
|
<comCountDetailcards :ref="'countDetail_'+index" :dataContent="item" :index="index" @editItem="editItem" |
|
|
|
:settingParam="jobContent" @remove="updateData" @summCount="summCount" @currentCount="currentCount" |
|
|
|
@updateData="updateData"> |
|
|
|
</comCountDetailcards> |
|
|
|
</view> |
|
|
|
</uni-swipe-action-item> |
|
|
|
</uni-swipe-action> |
|
|
|
</view> |
|
|
|
</scroll-view> |
|
|
|
<!-- </scroll-view> --> |
|
|
|
<uni-load-more :status="loadingType" /> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="page-footer"> |
|
|
|
<view class="uni-flex u-col-center space-between padding_10" |
|
|
|
style="background-color:ghostwhite; width: 100%; "> |
|
|
|
<view class="uni-flex u-col-center space-between padding_10" style="background-color:ghostwhite; width: 100%; "> |
|
|
|
<view class=""> |
|
|
|
</view> |
|
|
|
<view class=" uni-flex uni-row"> |
|
|
@ -49,12 +48,12 @@ |
|
|
|
|
|
|
|
<win-scan-button @goScan='openScanPopup'></win-scan-button> |
|
|
|
<win-scan-pack-and-location :allowModifyLocation="false" ref="scanPopup" :noShowBalanceMessage="true" |
|
|
|
:isHavePackNumber="true" |
|
|
|
:pdaCountBalanceQuery="true" :isShowHistory="false" @getCountScanResult='getCountScanResult'> |
|
|
|
:isHavePackNumber="true" :pdaCountBalanceQuery="true" :isShowHistory="false" |
|
|
|
@getCountScanResult='getCountScanResult'> |
|
|
|
</win-scan-pack-and-location> |
|
|
|
<detail-info-popup ref="detailInfoPopup"></detail-info-popup> |
|
|
|
<count-qty-edit ref="countQtyEdit" @confirm="editConfirm" @close="editClose" :isShowStatus="true" |
|
|
|
:allowEditStatus="false" :isShowBalance="true"> |
|
|
|
:allowEditStatus="false" :isShowBalance="true" > |
|
|
|
</count-qty-edit> |
|
|
|
<comwinHint ref="comHint"></comwinHint> |
|
|
|
<comMessage ref="comMessage"></comMessage> |
|
|
@ -125,6 +124,7 @@ |
|
|
|
jobContent: {}, //任务内容 |
|
|
|
subList: [], //接口返回的任务subList |
|
|
|
detailSource: [], //绑定在页面上的数据源 |
|
|
|
showDataList: [], |
|
|
|
balance: {}, //库存余额 |
|
|
|
currentEditItem: {}, |
|
|
|
mainItem: {}, |
|
|
@ -134,14 +134,27 @@ |
|
|
|
dataList: [], |
|
|
|
managementList: [], |
|
|
|
isOpen: false, |
|
|
|
manageMode: "" |
|
|
|
|
|
|
|
manageMode: "", |
|
|
|
pageSize: 10, |
|
|
|
currentPage: 1, |
|
|
|
timer:null, |
|
|
|
loadingType:'loading' |
|
|
|
}; |
|
|
|
}, |
|
|
|
onLoad(option) { |
|
|
|
async onLoad(option) { |
|
|
|
this.id = option.id; |
|
|
|
if (this.id) { |
|
|
|
this.getDetail(); |
|
|
|
await this.getDetail(); |
|
|
|
this.timer = setInterval(()=>{ |
|
|
|
if (this.showDataList.length == this.dataList.length) { |
|
|
|
|
|
|
|
this.loadingType='loadingType' |
|
|
|
return |
|
|
|
} |
|
|
|
console.log(22) |
|
|
|
this.currentPage += 1; |
|
|
|
},1000) |
|
|
|
|
|
|
|
} |
|
|
|
uni.$on('refreshData', (data) => { |
|
|
|
// 调用刷新数据的方法 |
|
|
@ -154,6 +167,11 @@ |
|
|
|
goHome(); |
|
|
|
} |
|
|
|
}, |
|
|
|
onUnload(){ |
|
|
|
if(this.timer){ |
|
|
|
clearInterval(this.timer) |
|
|
|
} |
|
|
|
}, |
|
|
|
//拦截返回按钮事件 |
|
|
|
onBackPress(e) { |
|
|
|
//已经接收但是没提交任务 |
|
|
@ -162,13 +180,29 @@ |
|
|
|
return true; |
|
|
|
} |
|
|
|
}, |
|
|
|
onReachBottom() { |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
mounted() { |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
computed() {}, |
|
|
|
computed: { |
|
|
|
showTableData() { |
|
|
|
if (this.dataList.length > this.pageSize) { |
|
|
|
const array = this.dataList.slice( |
|
|
|
(this.currentPage - 1) * this.pageSize, |
|
|
|
this.currentPage * this.pageSize |
|
|
|
) |
|
|
|
this.showDataList = this.showDataList.concat(array) |
|
|
|
return this.showDataList |
|
|
|
} else { |
|
|
|
clearInterval(this.timer) |
|
|
|
return this.dataList |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
filterList(originalList) { |
|
|
|
var resultList = [] |
|
|
@ -200,13 +234,13 @@ |
|
|
|
} |
|
|
|
return manageMode |
|
|
|
}, |
|
|
|
getDetail() { |
|
|
|
async getDetail() { |
|
|
|
var that = this; |
|
|
|
uni.showLoading({ |
|
|
|
title: "加载中....", |
|
|
|
mask: true |
|
|
|
}); |
|
|
|
getCountJobDetail(that.id).then(async res => { |
|
|
|
await getCountJobDetail(that.id).then(async res => { |
|
|
|
uni.hideLoading(); |
|
|
|
if (res.data == null) { |
|
|
|
that.showMessage('未获取到详情'); |
|
|
@ -229,7 +263,16 @@ |
|
|
|
this.showErrorMessage(error) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 用假分页处理渲染卡顿问题 |
|
|
|
// showTableData (){ |
|
|
|
|
|
|
|
// }, |
|
|
|
scrolltolower() { |
|
|
|
this.currentPage += 1; |
|
|
|
console.log(this.currentPage) |
|
|
|
console.log(this.showTableData) |
|
|
|
|
|
|
|
}, |
|
|
|
refreshData(returnData) { |
|
|
|
if (returnData.recordList.length == 0) { |
|
|
|
if (this.manageMode == "BY_BATCH") { |
|
|
|