[发货单退货单详情名称统一发货单退货单流程跑通及退货单调用子组件接口不好用完善接口]

This commit is contained in:
2021-10-19 11:40:04 +08:00
parent 1b41b40de9
commit 2d7da5d5c6
7 changed files with 814 additions and 439 deletions

View File

@@ -26,7 +26,7 @@
<view class="name nowrap">{{info.shop.name}}</view> <view class="name nowrap">{{info.shop.name}}</view>
</view> </view>
<view class="flexrow"> <view class="flexrow">
<view class="no nowrap" v-if="listType == 'deliver'">退货单号 {{info.shipment_no}}</view> <view class="no nowrap" v-if="listType == 'deliver'">货单号 {{info.shipment_no}}</view>
<view class="no nowrap" v-else>退货单号 {{info.refund_no}}</view> <view class="no nowrap" v-else>退货单号 {{info.refund_no}}</view>
</view> </view>
</view> </view>
@@ -39,10 +39,22 @@
</view> </view>
</view> </view>
</view> </view>
<view class="goods-info1"> <view class="goods-info1" >
<view class="goods-type">创建退货时间 <span>{{info.created_at}}</span></view> <view class="goods-type">创建{{listType == 'deliver'?'发货':'退货'}}时间 <span>{{info.created_at}}</span></view>
<view class="goods-type">运费 <span>自行承担运费</span></view> <view class="goods-type">运费 <span>自行承担运费</span></view>
<view class="goods-type">退货数量 <span>{{info.qty}}</span></view> <view class="goods-type">{{listType === 'deliver'?'发货':'退货'}}数量 <span>{{info.qty}}</span></view>
</view>
<view class="goods-info1" v-if="listType === 'deliver' && info.express">
<view class="goods-type" v-if="info.express">收件人姓名 <span>{{info.express.name || '--'}}</span></view>
<view class="goods-type" v-if="info.express" @click="call(info.express.mobile)">收件人电话 <span>{{info.express.mobile || '--'}}</span></view>
<view class="goods-type" v-if="info.express">收货地址 <span>{{info.express.full_address || '--'}}</span></view>
<view class="goods-type" v-if="info.express">发货快递 <span>{{info.express.express_name || '--'}}</span></view>
<view class="goods-type" v-if="info.express">快递单号 <span>{{info.express.express_no || '--'}}</span></view>
</view>
<view class="goods-info1" v-else>
<view class="goods-type" v-if="info.express">退货单快递<span>{{info.express.company || '--'}}</span></view>
<view class="goods-type" v-if="info.express">退货快递单号 <span>{{info.express.number || '--'}}</span></view>
</view> </view>
<!-- 操作相关 --> <!-- 操作相关 -->
@@ -70,6 +82,11 @@
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}) })
},
call(number){
uni.makePhoneCall({
phoneNumber:number
})
} }
} }
} }
@@ -144,7 +161,7 @@
font-weight: bold; font-weight: bold;
} }
.no { .no {
margin-top: 16rpx; margin-top: 30rpx !important;
font-size: $title-size*0.8; font-size: $title-size*0.8;
color: #999; color: #999;
} }

View File

@@ -12,7 +12,8 @@
<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> <view class="status" style="color:#ff5500;" 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:#ff5500;" 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">
@@ -25,14 +26,26 @@
</view> </view>
<view class="actions"> <view class="actions">
<view v-if="item.can"> <view v-if="item.can">
<view v-if="item.can.audit" @click="$Router.push({name: 'Examine', params: {id: item.refund_id}})" class="nowPay actions-color">订单审核</view> <view v-if="item.can.audit"
<view v-if="item.can.sign" @click="goSign(item.refund_id, index)" class="nowPay actions-color">订单签收</view> @click="$Router.push({name: 'Examine', params: {id: item.refund_id}})"
<view v-if="item.can.reToken" @click="goReToken(item.refund_id, index)" class="nowPay actions-color">确认退货</view> class="nowPay actions-color">订单审核</view>
<view v-if="item.can.logistic" @click="$Router.push({name: 'Logistic', params: {id: item.shipment_no}})" class="nowPay actions-color">查看物流</view> <view v-if="item.can.sign" @click="goSigns(item.refund_id, index)" class="nowPay actions-color">
<view v-if="item.can.deliver" @click="$Router.push({name: 'DeliverForm', params: {id: item.shipment_no}})" class="nowPay actions-color">我要发货</view> 订单签收</view>
<view v-if="item.can.reToken" @click="goReTokens(item.refund_id, index)"
class="nowPay actions-color">确认退货</view>
<view v-if="item.can.logistic"
@click="$Router.push({name: 'Logistic', params: {id: item.shipment_no}})"
class="nowPay actions-color">查看物流</view>
<view v-if="item.can.deliver"
@click="$Router.push({name: 'DeliverForm', params: {id: item.shipment_no}})"
class="nowPay actions-color">我要发货</view>
</view> </view>
<view v-if="listType == 'deliver'" class="nowPay" @click="$Router.push({name: 'storeOrderDetails', params: {id: item.shipment_no, type: listType}})">查看详情</view> <view v-if="listType == 'deliver'" class="nowPay"
<view v-else class="nowPay" @click="$Router.push({name: 'storeOrderDetails', params: {id: item.refund_id, type: 'return'}})">查看详情</view> @click="$Router.push({name: 'storeOrderDetails', params: {id: item.shipment_no, type: listType}})">
查看详情</view>
<view v-else class="nowPay"
@click="$Router.push({name: 'storeOrderDetails', params: {id: item.refund_id, type: 'return'}})">
查看详情</view>
</view> </view>
</view> </view>
</block> </block>
@@ -45,23 +58,31 @@
<script> <script>
export default { export default {
name:"goodsList", name: "goodsList",
props:{ props: {
// 数据列表 // 数据列表
list: { list: {
type : Array, type: Array,
default : () => { default: () => {
return new Array return new Array
} }
}, },
listType: '', listType: '',
// 列表空提示 // 列表空提示
toast : { toast: {
type : String, type: String,
default : '暂无订单数据 -_-!' default: '暂无订单数据 -_-!'
}
}, },
created() {} },
created() {},
methods: {
goSigns(id,index) {
this.$emit('goSign',{id:id,index:index});
},
goReTokens(id,index){
this.$emit('goReToken',{id:id,index:index});
}
}
} }
</script> </script>
@@ -74,10 +95,11 @@
margin-top: $margin; margin-top: $margin;
} }
.MallRefundsTemplate{ .MallRefundsTemplate {
position: relative; position: relative;
z-index: 0; z-index: 0;
} }
// 顶部信息 // 顶部信息
.top { .top {
display: flex; display: flex;
@@ -89,15 +111,18 @@
border-bottom: solid 1rpx #f7f7f7; border-bottom: solid 1rpx #f7f7f7;
position: relative; position: relative;
z-index: 0; z-index: 0;
.company-logo { .company-logo {
display: flex; display: flex;
width: 90%; width: 90%;
image { image {
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
border-radius: 50%; border-radius: 50%;
margin-right: 20rpx; margin-right: 20rpx;
} }
.company-name { .company-name {
font-size: 30rpx; font-size: 30rpx;
color: #484848; color: #484848;
@@ -107,11 +132,13 @@
box-sizing: border-box; box-sizing: border-box;
} }
} }
.no { .no {
margin-top: 10rpx; margin-top: 10rpx;
font-size: $title-size*0.8; font-size: $title-size*0.8;
color: #999; color: #999;
} }
.status { .status {
color: #999; color: #999;
font-size: $title-size*.9; font-size: $title-size*.9;
@@ -135,15 +162,18 @@
height: 120rpx; height: 120rpx;
border-radius: 10rpx; border-radius: 10rpx;
} }
.goods { .goods {
flex: 1; flex: 1;
width: calc(100% - 120rpx); width: calc(100% - 120rpx);
padding: 0 20rpx; padding: 0 20rpx;
box-sizing: border-box; box-sizing: border-box;
margin-bottom: 10rpx; margin-bottom: 10rpx;
.name { .name {
width: 100%; width: 100%;
font-size: 30rpx; font-size: 30rpx;
span { span {
font-size: 32rpx; font-size: 32rpx;
font-weight: normal; font-weight: normal;
@@ -193,18 +223,21 @@
color: #fff; color: #fff;
border-top: solid 1rpx #EFF4F2; border-top: solid 1rpx #EFF4F2;
margin-top: $margin; margin-top: $margin;
.nowPay { .nowPay {
padding: 4rpx 20rpx; padding: 4rpx 20rpx;
border-radius: 40rpx; border-radius: 40rpx;
margin-left: 20rpx; margin-left: 20rpx;
margin-top: 20rpx; margin-top: 20rpx;
color: #999; color: #999;
border:solid 1rpx #cacaca; border: solid 1rpx #cacaca;
&.actions-color { &.actions-color {
color: #e1293f; color: #e1293f;
border-color: #ec96a0; border-color: #ec96a0;
} }
} }
.cancelOrder { .cancelOrder {
padding: 10rpx 30rpx; padding: 10rpx 30rpx;
border-radius: 40rpx; border-radius: 40rpx;
@@ -212,6 +245,7 @@
margin-top: 20rpx; margin-top: 20rpx;
background-color: #DD524D; background-color: #DD524D;
} }
.logistics { .logistics {
background-color: $main-color; background-color: $main-color;
padding: 10rpx 30rpx; padding: 10rpx 30rpx;
@@ -219,6 +253,7 @@
margin-left: 20rpx; margin-left: 20rpx;
margin-top: 20rpx; margin-top: 20rpx;
} }
.sign { .sign {
background-color: #DD524D; background-color: #DD524D;
padding: 10rpx 30rpx; padding: 10rpx 30rpx;
@@ -226,6 +261,7 @@
margin-left: 20rpx; margin-left: 20rpx;
margin-top: 20rpx; margin-top: 20rpx;
} }
.evaluate { .evaluate {
background-color: $main-color; background-color: $main-color;
padding: 10rpx 30rpx; padding: 10rpx 30rpx;
@@ -241,9 +277,10 @@
font-size: $title-size-sm; font-size: $title-size-sm;
color: $text-gray; color: $text-gray;
padding-top: 50%; padding-top: 50%;
image { image {
width: $uni-img-size-lg * 2; width: $uni-img-size-lg * 2;
height:$uni-img-size-lg * 2; height: $uni-img-size-lg * 2;
border-radius: $uni-border-radius-circle; border-radius: $uni-border-radius-circle;
margin-bottom: $margin; margin-bottom: $margin;
} }

View File

@@ -190,7 +190,7 @@
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#e93340", "navigationBarBackgroundColor": "#e93340",
"navigationBarTitleText": "已使用订单" "navigationBarTitleText": "已使用服务类订单"
} }
},{ },{
"path": "pages/property/order/servicesOrderInfo", "path": "pages/property/order/servicesOrderInfo",

View File

@@ -2,13 +2,14 @@
<view> <view>
<!-- 订单分类 --> <!-- 订单分类 -->
<scroll-view class="nav" scroll-x="true" scroll-with-animation="true"> <scroll-view class="nav" scroll-x="true" scroll-with-animation="true">
<view :class="['nav-item', selectNavId === item.id ? 'nav-item-selected':'']" v-for="(item,index) in navList" :key="index" @click="selectNav(item.id)"> <view :class="['nav-item', selectNavId === item.id ? 'nav-item-selected':'']"
v-for="(item,index) in navList" :key="index" @click="selectNav(item.id)">
{{item.name}} {{item.name}}
</view> </view>
</scroll-view> </scroll-view>
<!-- 订单列表 --> <!-- 订单列表 -->
<store-order :list="returnInfo" /> <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>
@@ -16,66 +17,70 @@
</template> </template>
<script> <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' import storeOrder from '@/components/store-order/store-order'
export default { export default {
comments:{ comments: {
storeOrder storeOrder
}, },
data() { data() {
return { return {
returnInfo : [] ,// 列表 returnInfo: [], // 列表
navList : [{ navList: [{
name : '待审核', name: '待审核',
id : 'apply' id: 'apply'
},{ }, {
name : '已驳回', name: '已驳回',
id : 'refuse' id: 'refuse'
},{ }, {
name : '待返货', name: '待返货',
id : 'deliver' id: 'deliver'
},{ }, {
name : '待签收', name: '待签收',
id : 'delivered' id: 'delivered'
},{ },
name : '已签收', // {
id : 'signed' // name: '已签收',
// id: 'signed'
// },
{
name: '待确认退货',
id: 'process'
}, },
{ {
name : '待确认退货', name: '完成退货',
id : 'process' id: 'completed'
},
{
name : '完成退货',
id : 'completed'
} }
], ],
selectNavId : 'apply', selectNavId: 'apply',
// 分页 // 分页
pageStatus : '', pageStatus: '',
page : 1 page: 1
} }
}, },
created() { created() {},
},
onShow() { onShow() {
// 获取退货单列表 // 获取退货单列表
this.returnData(); this.returnData();
}, },
methods: { methods: {
// 退货单列表 // 退货单列表
returnData(){ returnData() {
storeReturn({ storeReturn({
state: this.selectNavId, state: this.selectNavId,
page : this.goodsPage page: this.goodsPage
}).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.goodsPage = res.page.current
this.pageStatus = res.page.has_more ? 'more': 'noMore' this.pageStatus = res.page.has_more ? 'more' : 'noMore'
}) })
}, },
@@ -88,19 +93,23 @@
}, },
// 签收订单 // 签收订单
goSign(orderNo,index) { goSign(info) {
console.log('goSign',info)
let id = info.id
let index = info.index
uni.showModal({ uni.showModal({
title: '是否签收此订单?', title: '是否签收此订单?',
success: res => { success: res => {
if(res.confirm) { if (res.confirm) {
storeSign(orderNo).then(() => { storeSign(id).then(() => {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: '签收成功' title: '签收成功'
}) })
setTimeout(()=>{ setTimeout(() => {
this.returnData() this.returnInfo.splice(index,1)
},3000) // this.returnData()
}, 500)
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
@@ -113,19 +122,22 @@
}, },
// 确认退货 // 确认退货
goReToken(orderNo,index) { goReToken(info) {
let id = info.id
let index = info.index
uni.showModal({ uni.showModal({
title: '是否确认退货此订单?', title: '是否确认退货此订单?',
success: res => { success: res => {
if(res.confirm) { if (res.confirm) {
storeToken(orderNo).then(() => { storeToken(id).then(() => {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: '退货成功' title: '退货成功'
}) })
setTimeout(()=>{ setTimeout(() => {
this.returnData() // this.returnData()
},3000) this.returnInfo.splice(index,1)
}, 500)
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
@@ -139,9 +151,9 @@
// 下拉加载 // 下拉加载
onReachBottom() { onReachBottom() {
if(this.pageStatus == 'more'){ if (this.pageStatus == 'more') {
this.pageStatus = 'loading' this.pageStatus = 'loading'
if(this.tabIndex === 'apply') { if (this.tabIndex === 'apply') {
this.goodsPage += 1 this.goodsPage += 1
// 获取退货单列表 // 获取退货单列表
this.returnData(); this.returnData();
@@ -168,12 +180,14 @@
position: sticky; position: sticky;
top: 0rpx; top: 0rpx;
z-index: 1; z-index: 1;
.nav-item { .nav-item {
display: inline-block; display: inline-block;
border-bottom: solid 4rpx #fff; border-bottom: solid 4rpx #fff;
padding: 30rpx 10rpx; padding: 30rpx 10rpx;
margin-right: 10rpx; margin-right: 10rpx;
} }
.nav-item-selected { .nav-item-selected {
border-bottom: solid 4rpx $main-color; border-bottom: solid 4rpx $main-color;
color: $main-color; color: $main-color;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long