Commit 4eca7e76 by 徐忆琳

Merge branch 'v3.15.1_10' into 'v3.15.1'

修改订单状态取值

See merge request !16
2 parents 30187bb7 683c9147
<!-- 秒杀活动 --> <!-- 秒杀活动 -->
<template> <template>
<div class="ctnr"> <div class="ctnr">
<div class="stutas-wrap"> <div class="stutas-wrap">
<span>售后状态:</span> <span>售后状态:</span>
<span v-if="!isLoading" class="stutas-circle" :style="{backgroundColor: (orderInfo.returnOrderStatus == 1003 || orderInfo.returnOrderStatus == 1006) ? '#2CCA74': '#5850FF'}"></span> <span v-if="!isLoading" class="stutas-circle"
<span v-if="!isLoading">{{ (orderInfo.returnOrderStatus == 1003 || orderInfo.returnOrderStatus == 1006) ? '售后完成': '售后中'}}</span> :style="{backgroundColor: (orderInfo.returnOrderStatus == 1003 || orderInfo.returnOrderStatus == 1006) ? '#2CCA74': '#5850FF'}"></span>
</div> <span
<div class="info-wrap order-info"> v-if="!isLoading">{{ (orderInfo.returnOrderStatus == 1003 || orderInfo.returnOrderStatus == 1006) ? '售后完成' : '售后中' }}</span>
<div class="title">售后信息</div> </div>
<div class="detail"> <div class="info-wrap order-info">
<glsxCombiForm ref="editFormRef" labelWidth="154px" defaultWidth="214px" :formObj="orderInfo" :formData="editFormData"> <div class="title">售后信息</div>
<div slot="addDescImgSlot" class="addDescImgSlot"> <div class="detail">
<el-image class="img" v-for="(item,index) in orderInfo.imgUrlList" :preview-src-list="orderInfo.imgUrlList" :key="index" :src="item" ></el-image> <glsxCombiForm ref="editFormRef" labelWidth="154px" defaultWidth="214px" :formObj="orderInfo"
<span v-if="!orderInfo.imgUrlList || orderInfo.imgUrlList.length==0">--</span> :formData="editFormData">
</div> <div slot="addDescImgSlot" class="addDescImgSlot">
</glsxCombiForm> <el-image class="img" v-for="(item,index) in orderInfo.imgUrlList" :preview-src-list="orderInfo.imgUrlList"
</div> :key="index" :src="item"></el-image>
</div> <span v-if="!orderInfo.imgUrlList || orderInfo.imgUrlList.length==0">--</span>
<div class="info-wrap"> </div>
<div class="title">商品信息</div> </glsxCombiForm>
<div class="detail"> </div>
<GLTable :hasPage="false" ref="goodsTableRef" :tableParams="tableParams" :tableData="orderInfo.goodsInfoTableDate"> </div>
<div slot="goodsNameSlot" class="goodsNameSlot" slot-scope="scope"> <div class="info-wrap">
<img :src="scope.scope.goodsImageUrl" alt=""> <div class="title">商品信息</div>
<el-tooltip class="item" effect="dark" :content="(scope.scope.brandName || '') + (scope.scope.goodsSkuName || '')" placement="top"> <div class="detail">
<span class="name">{{ scope.scope.brandName }} {{ scope.scope.goodsSkuName }}</span> <GLTable :hasPage="false" ref="goodsTableRef" :tableParams="tableParams"
</el-tooltip> :tableData="orderInfo.goodsInfoTableDate">
</div> <div slot="goodsNameSlot" class="goodsNameSlot" slot-scope="scope">
</GLTable> <img :src="scope.scope.goodsImageUrl" alt="">
</div> <el-tooltip class="item" effect="dark"
</div> :content="(scope.scope.brandName || '') + (scope.scope.goodsSkuName || '')" placement="top">
<div v-if="showEmailInfo" class="info-wrap"> <span class="name">{{ scope.scope.brandName }} {{ scope.scope.goodsSkuName }}</span>
<div class="title">商品寄回</div> </el-tooltip>
<div class="detail"> </div>
<GLTable :hasPage="false" ref="shipmentsRef" :tableParams="shipmentsParams" :tableData="orderInfo.expressInfo"> </GLTable>
</div>
</div>
<div v-if="showEmailInfo" class="info-wrap">
<div class="title">商品寄回</div>
<div class="detail">
<GLTable :hasPage="false" ref="shipmentsRef" :tableParams="shipmentsParams" :tableData="orderInfo.expressInfo">
</GLTable> </GLTable>
</div> </div>
</div>
<GLFooter>
<el-button style="margin-top: 16px;" @click="$router.back()" size="medium">取消</el-button>
</GLFooter>
</div> </div>
<GLFooter>
<el-button style="margin-top: 16px;" @click="$router.back()" size="medium">取消</el-button>
</GLFooter>
</div>
</template> </template>
<script> <script>
import glsxCombiForm from '@/components/glsx-combi-form' import glsxCombiForm from '@/components/glsx-combi-form'
import util from '@/util/util' import util from '@/util/util'
const reasonObj = {1001:'商品无货',1002:'发货时间问题',1003:'不想要了/不喜欢',1004:'商品信息填写错误',1005:'地址信息填写错误',1006:'商品降价',1007:'其他',1008:'尺码不合适',1009:'无理由退货',1010:'发票问题',1011:'商品与页面描述不符',1012:'发错货',1013:'质量问题',1014:'买错尺码/颜色/型号',1015:'商品缺少或破损',1016:'买错了'}
const refundStatusObj = {1000:'待审核',1001: '审核通过',1002: '已收货',1003: '已退款',1004: '已生成新订单',1005: '审核不通过'} const reasonObj = {
const outRefundTypeObj = {0:'退款成功',1:'退款关闭',2:'退款处理中',3:'退款异常'} 1001: '商品无货',
1002: '发货时间问题',
1003: '不想要了/不喜欢',
1004: '商品信息填写错误',
1005: '地址信息填写错误',
1006: '商品降价',
1007: '其他',
1008: '尺码不合适',
1009: '无理由退货',
1010: '发票问题',
1011: '商品与页面描述不符',
1012: '发错货',
1013: '质量问题',
1014: '买错尺码/颜色/型号',
1015: '商品缺少或破损',
1016: '买错了'
}
const refundStatusObj = {
1000: '待审核',
1001: '审核通过',
1002: '已收货',
1003: '已退款',
1004: '已生成新订单',
1005: '审核不通过'
}
const outRefundTypeObj = {0: '退款成功', 1: '退款关闭', 2: '退款处理中', 3: '退款异常'}
export default { export default {
name: 'goodsOrderDetail', name: 'goodsOrderDetail',
data() { data() {
return { return {
editForm: { editForm: {
name: 123 name: 123
}, },
isLoading: false, isLoading: false,
showEmailInfo: false, showEmailInfo: false,
orderInfo: {}, orderInfo: {},
shipmentsParams: { shipmentsParams: {
listName: 'shipments', listName: 'shipments',
tableOption: false, tableOption: false,
tableColumns: [ tableColumns: [
{
label: '快递公司',
prop: 'expressName'
},
{
label: '快递单号',
prop: 'expressNo'
},
{
label: '寄回时间',
prop: 'returnTime'
}
]
},
tableParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '商品名称',
prop: 'goodsName',
addHtml: 'goodsNameSlot'
},
{
label: '申请数量',
prop: 'applyQty'
},
{
label: '申请金额 (元)',
prop: 'refundPrice',
formatter: cell => {
return cell.redeemPoints ? cell.redeemPoints + '积分' + '+' + cell.refundPrice + '元' : cell.refundPrice + '元'
}
},
{
label: '平台订单编号',
prop: 'tparReturnOrderCode'
},
{
label: '订单状态',
prop: 'refundStatus'
}
]
},
editFormData: [
{
label: '第三方售后编号',
name: 'returnOrderCode',
type: 'showTxt'
},
{ {
label: '平台订单编号', label: '快递公司',
name: 'tparReturnOrderCode', prop: 'expressName'
type: 'showTxt'
}, },
{ {
label: '申请时间', label: '快递单号',
name: 'createdDate', prop: 'expressNo'
type: 'showTxt'
}, },
{ {
label: '售后类型', label: '寄回时间',
name: 'returnType', prop: 'returnTime'
type: 'showTxt' }
}, ]
},
tableParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{ {
label: '售后原因', label: '商品名称',
name: 'returnReasonType', prop: 'goodsName',
type: 'showTxt' addHtml: 'goodsNameSlot'
}, },
{ {
label: '用户名称', label: '申请数量',
name: 'accountName', prop: 'applyQty'
type: 'showTxt'
}, },
{ {
label: '用户手机号', label: '申请金额 (元)',
name: 'customerPhone', prop: 'refundPrice',
type: 'showTxt' formatter: cell => {
return cell.redeemPoints ? cell.redeemPoints + '积分' + '+' + cell.refundPrice + '元' : cell.refundPrice + '元'
}
}, },
{ {
label: '申请描述', label: '平台订单编号',
name: 'returnContent', prop: 'tparReturnOrderCode'
type: 'showTxt'
}, },
{ {
label: '描述图片', label: '订单状态',
name: 'imgUrlList', prop: 'refundStatus'
addHtml: 'addDescImgSlot'
} }
] ]
}
},
components: {
glsxCombiForm
},
created() {
this.getDetailById()
},
mounted() {
},
methods: {
getDetailById(){
const { id } = this.$route.params
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)'
})
this.isLoading = true
this.$apis.platformGoods.getSaleOrderDetail({afterSalesOrderCode:id}).then(res =>{
loading.close()
this.isLoading = false
if(res?.id){
let {applyQty, refundPrice, outRefundType, refundStatus, tparReturnOrderCode, returnType, returnReasonType, returnTime} = res || {}
const {brandName, goodsSkuName, goodsImageUrl} = res.orderGoods || {}
this.showEmailInfo = returnType == 1001
res.returnType = {1001: '退货退款', 1002: '仅退款', 1003:'退货换货'}[returnType] || '--'
res.returnReasonType = reasonObj[returnReasonType]
refundStatus = refundStatus!=1003 ? refundStatusObj[refundStatus] : outRefundTypeObj[outRefundType]
res.goodsInfoTableDate = [{brandName, goodsSkuName, goodsImageUrl, applyQty, refundPrice, refundStatus, tparReturnOrderCode}]
res.createdDate = res.createdDate ? util.dateFormat(res.createdDate, 'YYYY-MM-DD HH:mm:ss') : '--'
res.returnTime = returnTime ? util.dateFormat(returnTime, 'YYYY-MM-DD HH:mm:ss') : '--'
res.expressInfo = [{expressName: res.expressName, expressNo: res.expressNo, returnTime: res.returnTime}]
this.orderInfo = res
}
}).catch(err=>{
this.isLoading = false
loading.close()
console.log(err)
})
}, },
editFormData: [
{
label: '第三方售后编号',
name: 'returnOrderCode',
type: 'showTxt'
},
{
label: '平台订单编号',
name: 'tparReturnOrderCode',
type: 'showTxt'
},
{
label: '申请时间',
name: 'createdDate',
type: 'showTxt'
},
{
label: '售后类型',
name: 'returnType',
type: 'showTxt'
},
{
label: '售后原因',
name: 'returnReasonType',
type: 'showTxt'
},
{
label: '用户名称',
name: 'accountName',
type: 'showTxt'
},
{
label: '用户手机号',
name: 'customerPhone',
type: 'showTxt'
},
{
label: '申请描述',
name: 'returnContent',
type: 'showTxt'
},
{
label: '描述图片',
name: 'imgUrlList',
addHtml: 'addDescImgSlot'
}
]
} }
},
components: {
glsxCombiForm
},
created() {
this.getDetailById()
},
mounted() {
},
methods: {
getDetailById() {
const {id} = this.$route.params
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)'
})
this.isLoading = true
this.$apis.platformGoods.getSaleOrderDetail({afterSalesOrderCode: id}).then(res => {
loading.close()
this.isLoading = false
if (res?.id) {
let {
applyQty,
refundPrice,
outRefundType,
refundStatus,
returnOrderStatus,
tparReturnOrderCode,
returnType,
returnReasonType,
returnTime
} = res || {}
const {brandName, goodsSkuName, goodsImageUrl} = res.orderGoods || {}
this.showEmailInfo = returnType == 1001
res.returnType = {1001: '退货退款', 1002: '仅退款', 1003: '退货换货'}[returnType] || '--'
res.returnReasonType = reasonObj[returnReasonType]
refundStatus = returnOrderStatus != 1003 ? refundStatusObj[returnOrderStatus] : outRefundTypeObj[outRefundType]
res.goodsInfoTableDate = [{
brandName,
goodsSkuName,
goodsImageUrl,
applyQty,
refundPrice,
refundStatus,
tparReturnOrderCode
}]
res.createdDate = res.createdDate ? util.dateFormat(res.createdDate, 'YYYY-MM-DD HH:mm:ss') : '--'
res.returnTime = returnTime ? util.dateFormat(returnTime, 'YYYY-MM-DD HH:mm:ss') : '--'
res.expressInfo = [{expressName: res.expressName, expressNo: res.expressNo, returnTime: res.returnTime}]
this.orderInfo = res
}
}).catch(err => {
this.isLoading = false
loading.close()
console.log(err)
})
},
} }
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.ctnr{ .ctnr {
.stutas-wrap{ .stutas-wrap {
background-color: #fff; background-color: #fff;
height: 72px; height: 72px;
line-height: 72px; line-height: 72px;
font-weight: 500; font-weight: 500;
font-size: 20px; font-size: 20px;
color: #333333; color: #333333;
padding: 0 20px; padding: 0 20px;
.stutas-circle{
display: inline-block; .stutas-circle {
border-radius: 50%; display: inline-block;
width: 10px; border-radius: 50%;
height: 10px; width: 10px;
background: #FDB757; height: 10px;
margin-right: 10px; background: #FDB757;
vertical-align: middle; margin-right: 10px;
} vertical-align: middle;
} }
.info-wrap{ }
background-color: #fff;
margin-top: 16px; .info-wrap {
.title{ background-color: #fff;
height: 60px; margin-top: 16px;
line-height: 60px;
border-bottom: 1px solid #E5E5E5; .title {
padding: 0 20px; height: 60px;
font-weight: 500; line-height: 60px;
font-size: 20px; border-bottom: 1px solid #E5E5E5;
color: #333333; padding: 0 20px;
} font-weight: 500;
.detail{ font-size: 20px;
padding: 20px; color: #333333;
.addDescImgSlot{
.img{
width: 36px;
height: 36px;
margin-right: 8px;
}
}
}
} }
.order-info{
.detail {
padding: 20px;
.addDescImgSlot {
.img {
width: 36px;
height: 36px;
margin-right: 8px;
}
}
} }
}
.order-info {
}
} }
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!