退化货管理
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,9 +158,9 @@
|
||||
}
|
||||
}
|
||||
.submit {
|
||||
background: #e93340;
|
||||
background: $mian-color;
|
||||
color: white;
|
||||
border-color: #e93340;
|
||||
margin: $margin*4 $margin 0;
|
||||
border-color: $mian-color;
|
||||
margin: $margin;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
height: 100%;
|
||||
}
|
||||
.take-tips {
|
||||
background-color: #e53d4c;
|
||||
background-color: $mian-color;
|
||||
width: $uni-img-size-sm;
|
||||
height: $uni-img-size-sm;
|
||||
border-radius: $uni-border-radius-circle;
|
||||
@@ -123,13 +123,13 @@
|
||||
height: 100%;
|
||||
}
|
||||
&:first-child {
|
||||
color: #e53d4c;
|
||||
color: $mian-color;
|
||||
}
|
||||
&:last-child::before {
|
||||
background-color: $uni-bg-color;
|
||||
}
|
||||
&:first-child::after {
|
||||
background-color: #e53d4c;
|
||||
background-color: $mian-color;
|
||||
}
|
||||
.list-name {
|
||||
margin-bottom: $margin - 10;
|
||||
|
||||
@@ -7,21 +7,15 @@
|
||||
{{item.name}}
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<!-- 订单列表 -->
|
||||
<store-order :list="returnInfo" @goSign="goSign" @goReToken="goReToken" />
|
||||
|
||||
<!-- 分页 -->
|
||||
<uni-load-more :status="pageStatus" :iconSize="16" v-if="returnInfo.length > 0"></uni-load-more>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
storeReturn,
|
||||
storeSign,
|
||||
storeToken
|
||||
} from '@/apis/interfaces/store'
|
||||
import { storeReturn, storeSign, storeToken } from '@/apis/interfaces/store'
|
||||
import storeOrder from '@/components/store-order/store-order'
|
||||
export default {
|
||||
comments: {
|
||||
@@ -42,16 +36,10 @@
|
||||
}, {
|
||||
name: '待签收',
|
||||
id: 'delivered'
|
||||
},
|
||||
// {
|
||||
// name: '已签收',
|
||||
// id: 'signed'
|
||||
// },
|
||||
{
|
||||
}, {
|
||||
name: '待确认退货',
|
||||
id: 'process'
|
||||
},
|
||||
{
|
||||
}, {
|
||||
name: '完成退货',
|
||||
id: 'completed'
|
||||
}
|
||||
@@ -60,7 +48,7 @@
|
||||
|
||||
// 分页
|
||||
pageStatus: '',
|
||||
page: 1
|
||||
goodsPage : 1
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
@@ -94,7 +82,6 @@
|
||||
|
||||
// 签收订单
|
||||
goSign(info) {
|
||||
console.log('goSign',info)
|
||||
let id = info.id
|
||||
let index = info.index
|
||||
uni.showModal({
|
||||
|
||||
Reference in New Issue
Block a user