退化货管理

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({
url: 'manages/shipments',
data: {
state
}
data
})
}

View File

@@ -12,9 +12,9 @@
<view class="no nowrap" v-if="listType == 'deliver'">退货单号 {{item.shipment_no}}</view>
<view class="no nowrap" v-else>退货单号 {{item.refund_no}}</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 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 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" />
@@ -81,6 +81,9 @@
},
goReTokens(id,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",
"name": "Return",
"style": {

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>
@@ -43,11 +43,9 @@
// 分页
pageStatus : '',
page : 1
pageCurrent : 1
}
},
created() {
},
onShow() {
// 获取退货单列表
this.returnData();
@@ -57,13 +55,13 @@
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.pageCurrent = res.page.current
this.pageStatus = res.page.has_more ? 'more': 'noMore'
})
},
@@ -72,50 +70,21 @@
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.pageCurrent += 1
this.returnData();
}
}
}
}
}
</script>
<style lang="scss" scoped>

View File

@@ -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>

View File

@@ -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;

View File

@@ -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({

File diff suppressed because one or more lines are too long