Commit c6025938 by cwq0219

订单详情-售后

1 parent 0a9955c8
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
<div class="container m-b-20"> <div :class="['container', orderRefund ? 'm-b-20' : 'edit-container']">
<p class="edit-title">发货信息</p> <p class="edit-title">发货信息</p>
<el-form label-width="100px" :inline="true"> <el-form label-width="100px" :inline="true">
<el-form-item label="物流信息"> <el-form-item label="物流信息">
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<table class="show-table"> <table class="show-table">
<tbody> <tbody>
<tr v-for="(item, index) in orderGoods" :key="index"> <tr v-for="(item, index) in orderGoods" :key="index">
<td><img :src="item.goodsImage" class="img-60" @click="showMedia(item.goodsImage)" /></td> <td><img :src="item.goodsImage" class="img-60" /></td>
<td>{{ item.goodsName }}</td> <td>{{ item.goodsName }}</td>
<td>{{ item.specificationData }}</td> <td>{{ item.specificationData }}</td>
<td>{{ item.activityPrice ? item.activityPrice : item.retailPrice }}元 * {{item.goodsNumber}}</td> <td>{{ item.activityPrice ? item.activityPrice : item.retailPrice }}元 * {{item.goodsNumber}}</td>
...@@ -31,8 +31,18 @@ ...@@ -31,8 +31,18 @@
</table> </table>
</div> </div>
</div> </div>
<div class="container edit-container" v-if="orderRefund.length"> <div class="container edit-container" v-if="orderRefund">
<p class="edit-title">售后信息</p> <p class="edit-title">售后信息</p>
<el-form label-width="100px" :inline="true">
<el-row v-for="(item, index) in afterInfoDataRow" :key="index">
<el-form-item v-for="(subItem, subIndex) in item.rowList" :key="subIndex" :label="subItem.label">
<span class="detail-txt ellipsis-1" :title="orderRefund[subItem.name]">{{orderRefund[subItem.name]}}</span>
</el-form-item>
</el-row>
</el-form>
<div class="flex">
<img v-for="(item, index) in orderRefund.imgUrls" :key="index" class="img-60" :src="item"/>
</div>
</div> </div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> <div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="default" @click="handleCancel">返回</el-button> <el-button type="default" @click="handleCancel">返回</el-button>
...@@ -41,6 +51,7 @@ ...@@ -41,6 +51,7 @@
</template> </template>
<script> <script>
import * as dayjs from 'dayjs'
import { orderManageStatusList, orderSourceList, deliveryTypeList } from '@/common/constant' import { orderManageStatusList, orderSourceList, deliveryTypeList } from '@/common/constant'
export default { export default {
name: 'orderDetail', name: 'orderDetail',
...@@ -55,8 +66,9 @@ export default { ...@@ -55,8 +66,9 @@ export default {
orderCode: '' orderCode: ''
}, },
detailForm: {}, detailForm: {},
orderRefund: [], orderRefund: null,
orderGoods: [], orderGoods: [],
// 订单信息
detailFormDataRow: [], detailFormDataRow: [],
detailFormData: [ detailFormData: [
{ {
...@@ -92,17 +104,50 @@ export default { ...@@ -92,17 +104,50 @@ export default {
name: 'shipAddress' name: 'shipAddress'
} }
], ],
// 售后信息
afterInfoDataRow: [],
afterInfoData: [
{
label: '售后类型',
name: 'refundTypeName'
},
{
label: '申请金额',
name: 'refundPrice'
},
{
label: '申请时间',
name: 'createdDateStr'
},
{
label: '快递公司',
name: 'deliveryCompany'
},
{
label: '快递单号',
name: 'deliveryNumber'
},
{
label: '申请描述',
name: 'remark'
}
],
// 基本数据 // 基本数据
baseData: { baseData: {
orderStatusList: orderManageStatusList, orderStatusList: orderManageStatusList,
orderSourceList: orderSourceList, orderSourceList: orderSourceList,
deliveryTypeList: deliveryTypeList deliveryTypeList: deliveryTypeList,
refundTypeList: [
{ confId: '1', confName: '退款退货' },
{ confId: '2', confName: '退款不退货' }
]
} }
} }
}, },
created() { created() {
this.formToRow('detailFormData', 3) this.formToRow('detailFormData')
this.formToRow('afterInfoData')
}, },
mounted() { mounted() {
...@@ -113,7 +158,7 @@ export default { ...@@ -113,7 +158,7 @@ export default {
}, },
methods: { methods: {
formToRow(formName, numOfRow) { formToRow(formName, numOfRow = 3) {
var rowNum = Math.ceil(this[formName].length / numOfRow) var rowNum = Math.ceil(this[formName].length / numOfRow)
for(var i = 0; i < rowNum; i++) { for(var i = 0; i < rowNum; i++) {
for(var j = 0; j < numOfRow; j++) { for(var j = 0; j < numOfRow; j++) {
...@@ -131,7 +176,11 @@ export default { ...@@ -131,7 +176,11 @@ export default {
getInfo() { getInfo() {
this.$apis.orderManage.getOrderDetailApi({ orderCode: this.routeInfo.orderCode }).then(res => { this.$apis.orderManage.getOrderDetailApi({ orderCode: this.routeInfo.orderCode }).then(res => {
this.detailForm = res this.detailForm = res
this.orderRefund = res.orderRefund || [] this.orderRefund = res.orderRefund || null
if(this.orderRefund) {
this.orderRefund.refundTypeName = this.baseData.refundTypeList.map(item => item.confId).includes(res.refundType + '') ? this.baseData.refundTypeList.find(item => item.confId == res.refundType).confName : '-'
this.orderRefund.createdDateStr = dayjs(this.orderRefund.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
this.orderGoods = res.orderGoods || [] this.orderGoods = res.orderGoods || []
this.detailForm.payPrice = res.payPrice ? (res.payPrice + '元') : '-' this.detailForm.payPrice = res.payPrice ? (res.payPrice + '元') : '-'
this.detailForm.orderSourceName = this.baseData.orderSourceList.map(item => item.confId).includes(res.orderSource + '') ? this.baseData.orderSourceList.find(item => item.confId == res.orderSource).confName : '-' this.detailForm.orderSourceName = this.baseData.orderSourceList.map(item => item.confId).includes(res.orderSource + '') ? this.baseData.orderSourceList.find(item => item.confId == res.orderSource).confName : '-'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!