退化货管理

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

@@ -102,12 +102,10 @@ const storeAudit = (refund_id, data) => {
} }
// 提货单列表 // 提货单列表
const storeDeliver = (state) => { const storeDeliver = (data) => {
return request({ return request({
url: 'manages/shipments', url: 'manages/shipments',
data: { data
state
}
}) })
} }

View File

@@ -12,9 +12,9 @@
<view class="no nowrap" v-if="listType == 'deliver'">退货单号 {{item.shipment_no}}</view> <view class="no nowrap" v-if="listType == 'deliver'">退货单号 {{item.shipment_no}}</view>
<view class="no nowrap" v-else>退货单号 {{item.refund_no}}</view> <view class="no nowrap" v-else>退货单号 {{item.refund_no}}</view>
</view> </view>
<view class="status" style="color:#ff5500;" v-if="listType == 'deliver'">{{item.state_text}} <view class="status" style="color:#ee4c47;" v-if="listType == 'deliver'">{{item.state_text}}
</view> </view>
<view class="status" style="color:#ff5500;" v-else>{{item.state.text}}</view> <view class="status" style="color:#ee4c47;" v-else>{{item.state.text}}</view>
</view> </view>
<view class="goods-info" @click="goDetail(item.goods_sku.goods_id)" v-if="item.goods_sku"> <view class="goods-info" @click="goDetail(item.goods_sku.goods_id)" v-if="item.goods_sku">
<image class="goods-img" :src="item.goods_sku.cover" mode="aspectFill" /> <image class="goods-img" :src="item.goods_sku.cover" mode="aspectFill" />
@@ -81,6 +81,9 @@
}, },
goReTokens(id,index){ goReTokens(id,index){
this.$emit('goReToken',{id:id,index:index}); this.$emit('goReToken',{id:id,index:index});
},
goDetail(id){
this.$emit('navDetail', {id: id})
} }
} }
} }

View File

@@ -756,8 +756,7 @@
}] }]
} }
} }
}, },{
{
"path": "pages/store/return", "path": "pages/store/return",
"name": "Return", "name": "Return",
"style": { "style": {

View File

@@ -8,7 +8,7 @@
</scroll-view> </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> <uni-load-more :status="pageStatus" :iconSize="16" v-if="returnInfo.length > 0"></uni-load-more>
@@ -43,11 +43,9 @@
// 分页 // 分页
pageStatus : '', pageStatus : '',
page : 1 pageCurrent : 1
} }
}, },
created() {
},
onShow() { onShow() {
// 获取退货单列表 // 获取退货单列表
this.returnData(); this.returnData();
@@ -57,13 +55,13 @@
returnData(){ returnData(){
storeDeliver({ storeDeliver({
state: this.selectNavId, state: this.selectNavId,
page : this.goodsPage page : this.pageCurrent
}).then(res=>{ }).then(res=>{
if(res.page.current === 1){ if(res.page.current === 1){
this.returnInfo = [] this.returnInfo = []
} }
this.returnInfo = this.returnInfo.concat(res.data) this.returnInfo = this.returnInfo.concat(res.data)
this.goodsPage = res.page.current this.pageCurrent = res.page.current
this.pageStatus = res.page.has_more ? 'more': 'noMore' this.pageStatus = res.page.has_more ? 'more': 'noMore'
}) })
}, },
@@ -72,50 +70,21 @@
selectNav(id) { selectNav(id) {
if (this.selectNavId !== id) { if (this.selectNavId !== id) {
this.selectNavId = id this.selectNavId = id
this.pageCurrent = 1
this.returnData() 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() { onReachBottom() {
if(this.pageStatus == 'more'){ if(this.pageStatus == 'more'){
this.pageStatus = 'loading' this.pageStatus = 'loading'
if(this.selectNavId === '1') { this.pageCurrent += 1
this.goodsPage += 1
// 获取退货单列表
this.returnData(); this.returnData();
} }
} }
} }
} }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@@ -158,9 +158,9 @@
} }
} }
.submit { .submit {
background: #e93340; background: $mian-color;
color: white; color: white;
border-color: #e93340; border-color: $mian-color;
margin: $margin*4 $margin 0; margin: $margin;
} }
</style> </style>

View File

@@ -77,7 +77,7 @@
height: 100%; height: 100%;
} }
.take-tips { .take-tips {
background-color: #e53d4c; background-color: $mian-color;
width: $uni-img-size-sm; width: $uni-img-size-sm;
height: $uni-img-size-sm; height: $uni-img-size-sm;
border-radius: $uni-border-radius-circle; border-radius: $uni-border-radius-circle;
@@ -123,13 +123,13 @@
height: 100%; height: 100%;
} }
&:first-child { &:first-child {
color: #e53d4c; color: $mian-color;
} }
&:last-child::before { &:last-child::before {
background-color: $uni-bg-color; background-color: $uni-bg-color;
} }
&:first-child::after { &:first-child::after {
background-color: #e53d4c; background-color: $mian-color;
} }
.list-name { .list-name {
margin-bottom: $margin - 10; margin-bottom: $margin - 10;

View File

@@ -7,21 +7,15 @@
{{item.name}} {{item.name}}
</view> </view>
</scroll-view> </scroll-view>
<!-- 订单列表 --> <!-- 订单列表 -->
<store-order :list="returnInfo" @goSign="goSign" @goReToken="goReToken" /> <store-order :list="returnInfo" @goSign="goSign" @goReToken="goReToken" />
<!-- 分页 --> <!-- 分页 -->
<uni-load-more :status="pageStatus" :iconSize="16" v-if="returnInfo.length > 0"></uni-load-more> <uni-load-more :status="pageStatus" :iconSize="16" v-if="returnInfo.length > 0"></uni-load-more>
</view> </view>
</template> </template>
<script> <script>
import { import { storeReturn, storeSign, storeToken } from '@/apis/interfaces/store'
storeReturn,
storeSign,
storeToken
} from '@/apis/interfaces/store'
import storeOrder from '@/components/store-order/store-order' import storeOrder from '@/components/store-order/store-order'
export default { export default {
comments: { comments: {
@@ -42,16 +36,10 @@
}, { }, {
name: '待签收', name: '待签收',
id: 'delivered' id: 'delivered'
}, }, {
// {
// name: '已签收',
// id: 'signed'
// },
{
name: '待确认退货', name: '待确认退货',
id: 'process' id: 'process'
}, }, {
{
name: '完成退货', name: '完成退货',
id: 'completed' id: 'completed'
} }
@@ -60,7 +48,7 @@
// 分页 // 分页
pageStatus: '', pageStatus: '',
page: 1 goodsPage : 1
} }
}, },
created() {}, created() {},
@@ -94,7 +82,6 @@
// 签收订单 // 签收订单
goSign(info) { goSign(info) {
console.log('goSign',info)
let id = info.id let id = info.id
let index = info.index let index = info.index
uni.showModal({ uni.showModal({

File diff suppressed because one or more lines are too long