|
@ -3,7 +3,7 @@ |
|
|
<view class=""> |
|
|
<view class=""> |
|
|
<win-blank-view @goScan='openScanPopup' v-if="allDataList.length==0"></win-blank-view> |
|
|
<win-blank-view @goScan='openScanPopup' v-if="allDataList.length==0"></win-blank-view> |
|
|
<scroll-view scroll-y class="scroll-detail" style="margin-top: 10rpx;padding-bottom:100px" > |
|
|
<scroll-view scroll-y class="scroll-detail" style="margin-top: 10rpx;padding-bottom:100px" > |
|
|
<view class="detail-list " v-for="(item, index) in showList" :key="index"> |
|
|
<view class="detail-list " v-for="(item, index) in allDataList" :key="index"> |
|
|
<view class="detail-content"> |
|
|
<view class="detail-content"> |
|
|
<view class="" style=""> |
|
|
<view class="" style=""> |
|
|
<view class="uni-flex uni-row u-col-center"> |
|
|
<view class="uni-flex uni-row u-col-center"> |
|
@ -53,8 +53,7 @@ |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
</scroll-view> |
|
|
</scroll-view> |
|
|
<uni-load-more :status="loadingType" v-if="showList.length>0" /> |
|
|
<div class="new_bot_box" v-show="allDataList.length>0"> |
|
|
<div class="new_bot_box" v-show="showList.length>0"> |
|
|
|
|
|
<win-collapse-location scanTitle='扫描目标库位' ref='comCollapseLocation' @getLocationCode='getDefaultToLocation' |
|
|
<win-collapse-location scanTitle='扫描目标库位' ref='comCollapseLocation' @getLocationCode='getDefaultToLocation' |
|
|
@clear='clearDefaultLocation'> |
|
|
@clear='clearDefaultLocation'> |
|
|
</win-collapse-location> |
|
|
</win-collapse-location> |
|
@ -63,7 +62,7 @@ |
|
|
<button class="new_save_btn btn_double" @click="submit()">提交</button> |
|
|
<button class="new_save_btn btn_double" @click="submit()">提交</button> |
|
|
</view> |
|
|
</view> |
|
|
</div> |
|
|
</div> |
|
|
<win-scan-button @goScan='openScanPopup' v-if="showList.length>0"></win-scan-button> |
|
|
<win-scan-button @goScan='openScanPopup' v-if="allDataList.length>0"></win-scan-button> |
|
|
<winScanByProductCode ref="scanPackPopup" title="单件码" @getScanResult='getScanResult'></winScanByProductCode> |
|
|
<winScanByProductCode ref="scanPackPopup" title="单件码" @getScanResult='getScanResult'></winScanByProductCode> |
|
|
<com-message ref="comMessage" @afterCloseScanMessage='closeScanMessage' @afterRescanMessage='afterRescan' |
|
|
<com-message ref="comMessage" @afterCloseScanMessage='closeScanMessage' @afterRescanMessage='afterRescan' |
|
|
@afterCloseCommitMessage='closeCommitMessage'> |
|
|
@afterCloseCommitMessage='closeCommitMessage'> |
|
@ -120,14 +119,11 @@ |
|
|
return { |
|
|
return { |
|
|
options: [], |
|
|
options: [], |
|
|
currentItem: {}, |
|
|
currentItem: {}, |
|
|
showList: [], |
|
|
|
|
|
toLocationInfo:{}, |
|
|
toLocationInfo:{}, |
|
|
toLocationCode: "", |
|
|
toLocationCode: "", |
|
|
allCount: 0, |
|
|
allCount: 0, |
|
|
allDataList: [], |
|
|
allDataList: [], |
|
|
loadingType: "", |
|
|
loadingType: "", |
|
|
pageNo: 0, |
|
|
|
|
|
pageSize: 5, |
|
|
|
|
|
scrollTop: 60, |
|
|
scrollTop: 60, |
|
|
old: { |
|
|
old: { |
|
|
scrollTop: 0 |
|
|
scrollTop: 0 |
|
@ -143,29 +139,8 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
onPullDownRefresh() { |
|
|
onPullDownRefresh() { |
|
|
this.pageNo = 1; |
|
|
|
|
|
this.showList=[] |
|
|
|
|
|
this.loadingType = ""; |
|
|
|
|
|
this.showList = this.getDataPage(this.pageNo, this.pageSize) |
|
|
|
|
|
uni.stopPullDownRefresh() |
|
|
uni.stopPullDownRefresh() |
|
|
}, |
|
|
}, |
|
|
onReachBottom() { |
|
|
|
|
|
console.log("底部") |
|
|
|
|
|
if (this.loadingType == 'nomore') { |
|
|
|
|
|
console.log("没有更多了") |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
this.pageNo++; |
|
|
|
|
|
var list = this.getDataPage(this.pageNo, this.pageSize) |
|
|
|
|
|
if (list.length > 0) { |
|
|
|
|
|
console.log("加载更多了") |
|
|
|
|
|
// this.showList=list |
|
|
|
|
|
this.showList = this.showList.concat(list) |
|
|
|
|
|
} else { |
|
|
|
|
|
//没有更多了 |
|
|
|
|
|
this.loadingType = "nomore"; |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onNavigationBarButtonTap(e) { |
|
|
onNavigationBarButtonTap(e) { |
|
@ -181,15 +156,6 @@ |
|
|
|
|
|
|
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
|
|
|
getDataPage(pageNo, pageSize) { |
|
|
|
|
|
//计算总页数 |
|
|
|
|
|
var totalPages = Math.ceil(this.allCount / pageSize); |
|
|
|
|
|
//当前页起始索引 |
|
|
|
|
|
const start = (pageNo - 1) * pageSize; |
|
|
|
|
|
const end = start + pageSize; //当前页结束索引 |
|
|
|
|
|
return this.allDataList.slice(start, end) |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
qtyChanged(value, item, index) { |
|
|
qtyChanged(value, item, index) { |
|
|
if (value <= 0) { |
|
|
if (value <= 0) { |
|
|
this.showMessage('退货数量必须大于0') |
|
|
this.showMessage('退货数量必须大于0') |
|
@ -202,8 +168,9 @@ |
|
|
if (res) { |
|
|
if (res) { |
|
|
this.allDataList.splice(index, 1); |
|
|
this.allDataList.splice(index, 1); |
|
|
this.allCount = this.allDataList.length; |
|
|
this.allCount = this.allDataList.length; |
|
|
|
|
|
var title =this.allCount>0?"客户退货"+"("+this.allCount+")":"客户退货" |
|
|
uni.setNavigationBarTitle({ |
|
|
uni.setNavigationBarTitle({ |
|
|
title: "客户退货"+"("+this.allCount+")" |
|
|
title: title |
|
|
}) |
|
|
}) |
|
|
this.$forceUpdate() |
|
|
this.$forceUpdate() |
|
|
} |
|
|
} |
|
@ -232,10 +199,6 @@ |
|
|
} |
|
|
} |
|
|
this.allDataList.unshift(item) |
|
|
this.allDataList.unshift(item) |
|
|
this.allCount = this.allDataList.length; |
|
|
this.allCount = this.allDataList.length; |
|
|
this.pageNo = 1; |
|
|
|
|
|
this.showList = [] |
|
|
|
|
|
this.loadingType = ""; |
|
|
|
|
|
this.showList = this.getDataPage(this.pageNo, this.pageSize) |
|
|
|
|
|
uni.setNavigationBarTitle({ |
|
|
uni.setNavigationBarTitle({ |
|
|
title: "客户退货"+"("+this.allCount+")" |
|
|
title: "客户退货"+"("+this.allCount+")" |
|
|
}) |
|
|
}) |
|
@ -356,7 +319,7 @@ |
|
|
details: [] |
|
|
details: [] |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
that.showList.forEach(i => { |
|
|
that.allDataList.forEach(i => { |
|
|
let balanceItem = i.balanceItem; |
|
|
let balanceItem = i.balanceItem; |
|
|
i.labelList.forEach(l => { |
|
|
i.labelList.forEach(l => { |
|
|
let detail = {}; |
|
|
let detail = {}; |
|
@ -441,15 +404,14 @@ |
|
|
|
|
|
|
|
|
clearInfo() { |
|
|
clearInfo() { |
|
|
this.allDataList = []; |
|
|
this.allDataList = []; |
|
|
this.showList = []; |
|
|
|
|
|
this.toLocationInfo={} |
|
|
this.toLocationInfo={} |
|
|
this.toLocationCode = ""; |
|
|
this.toLocationCode = ""; |
|
|
this.allCount = 0; |
|
|
this.allCount = 0; |
|
|
this.loadingType = "" |
|
|
this.loadingType = "" |
|
|
this.pageNo = 0 |
|
|
|
|
|
uni.setNavigationBarTitle({ |
|
|
uni.setNavigationBarTitle({ |
|
|
title: "客户退货" |
|
|
title: "客户退货" |
|
|
}) |
|
|
}) |
|
|
|
|
|
this.$refs.comCollapseLocation.clearLocation(); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
openScanPopup() { |
|
|
openScanPopup() { |
|
|