退化货管理

This commit is contained in:
唐明明
2021-11-09 17:03:14 +08:00
parent 9749aec218
commit 65f0d0d059
8 changed files with 4476 additions and 4576 deletions

View File

@@ -8,7 +8,7 @@
</scroll-view>
<!-- 订单列表 -->
<store-order :list="returnInfo" listType="deliver" />
<store-order :list="returnInfo" listType="deliver" @navDetail="$Router.push({name: 'goodsDetails', params:{id: $event.id}})" />
<!-- 分页 -->
<uni-load-more :status="pageStatus" :iconSize="16" v-if="returnInfo.length > 0"></uni-load-more>
@@ -26,28 +26,26 @@
return {
returnInfo : [] ,// 列表
navList : [{
name : '待发货',
state : '1'
},{
name : '已发货',
state : '2'
},{
name : '待提货',
state : '3'
},{
name : '已提货',
state : '4'
}
name : '待发货',
state : '1'
},{
name : '已发货',
state : '2'
},{
name : '待提货',
state : '3'
},{
name : '已提货',
state : '4'
}
],
selectNavId : '1',
// 分页
pageStatus : '',
page : 1
pageCurrent : 1
}
},
created() {
},
onShow() {
// 获取退货单列表
this.returnData();
@@ -57,14 +55,14 @@
returnData(){
storeDeliver({
state: this.selectNavId,
page : this.goodsPage
page : this.pageCurrent
}).then(res=>{
if(res.page.current === 1){
this.returnInfo = []
}
this.returnInfo = this.returnInfo.concat(res.data)
this.goodsPage = res.page.current
this.pageStatus = res.page.has_more ? 'more': 'noMore'
this.returnInfo = this.returnInfo.concat(res.data)
this.pageCurrent = res.page.current
this.pageStatus = res.page.has_more ? 'more': 'noMore'
})
},
@@ -72,46 +70,17 @@
selectNav(id) {
if (this.selectNavId !== id) {
this.selectNavId = id
this.pageCurrent = 1
this.returnData()
}
},
// 我要发货
goSend(orderNo) {
console.log(orderNo)
return
uni.showModal({
title: '是否签收此订单?',
success: res => {
if(res.confirm) {
storeSign(orderNo).then(() => {
uni.showToast({
icon: 'none',
title: '签收成功'
})
setTimeout(()=>{
this.returnData()
},3000)
}).catch(err => {
uni.showToast({
icon: 'none',
title: err.message
})
})
}
}
})
},
// 下拉加载
onReachBottom() {
if(this.pageStatus == 'more'){
this.pageStatus = 'loading'
if(this.selectNavId === '1') {
this.goodsPage += 1
// 获取退货单列表
this.returnData();
}
this.pageCurrent += 1
this.returnData();
}
}
}