Commit e544cf0b by 王志慧

8月商城订单月中版本

1 parent 2f0e2deb
......@@ -4,24 +4,12 @@
<div class="edit-box">
<div class="container m-b-20">
<p class="edit-title">订单信息</p>
<el-form
label-width="100px"
:inline="true"
>
<el-row
v-for="(item, index) in detailFormDataRow"
:key="index"
>
<el-form-item
v-for="(subItem, subIndex) in item.rowList"
:key="subIndex"
:label="subItem.label"
class="row-item"
>
<span
class="detail-txt ellipsis-1"
:title="detailForm[subItem.name]"
>{{ detailForm[subItem.name] ? detailForm[subItem.name] + (subItem.suffix || '') : '-' }}</span>
<el-form label-width="100px" :inline="true">
<el-row v-for="(item, index) in detailFormDataRow" :key="index">
<el-form-item v-for="(subItem, subIndex) in item.rowList" :key="subIndex" :label="subItem.label"
class="row-item">
<span class="detail-txt ellipsis-1" :title="detailForm[subItem.name]">{{ detailForm[subItem.name] ?
detailForm[subItem.name] + (subItem.suffix || '') : '-' }}</span>
</el-form-item>
</el-row>
<template v-if="detailForm.formDescribe">
......@@ -30,89 +18,56 @@
</el-form>
</div>
<div :class="['container', orderRefund ? 'm-b-20' : 'edit-container']">
<p class="edit-title">收货信息</p>
<el-form label-width="100px" :inline="true">
<el-row v-for="(item, index) in receiveInfoDataRow" :key="index">
<el-form-item v-for="(subItem, subIndex) in item.rowList" :key="subIndex" :label="subItem.label">
<span class="detail-txt ellipsis-1" :title="detailForm[subItem.name]">{{ detailForm[subItem.name] || '-'
}}</span>
</el-form-item>
</el-row>
</el-form>
</div>
<div :class="['container', orderRefund ? 'm-b-20' : 'edit-container']">
<p class="edit-title">发货信息</p>
<el-form
label-width="100px"
:inline="true"
>
<el-form label-width="100px" :inline="true">
<el-form-item label="物流信息">
<span>{{ detailForm.deliveryCompany }}&nbsp;&nbsp;&nbsp;{{ detailForm.deliveryNumber }}</span>
</el-form-item>
</el-form>
<div
v-if="orderGoods.length"
class="p-l-40"
>
<div v-if="orderGoods.length" class="p-l-40">
<table class="show-table">
<tbody>
<tr
v-for="(item, index) in orderGoods"
:key="index"
style="height: 70px;"
>
<td><img
:src="item.goodsImage"
class="img-60"
/></td>
<tr v-for="(item, index) in orderGoods" :key="index" style="height: 70px;">
<td><img :src="item.goodsImage" class="img-60" /></td>
<td>{{ item.goodsName }}</td>
<td>{{ item.specificationData }}</td>
<td>{{ item.activityPrice ? item.activityPrice : item.retailPrice }}元 * {{ item.goodsNumber }}</td>
</tr>
<tr
v-if="detailForm.subOrderCoupon"
style="height: 40px;"
>
<td
style="text-align: left;"
colspan="3"
>优惠券</td>
<tr v-if="detailForm.subOrderCoupon" style="height: 40px;">
<td style="text-align: left;" colspan="3">优惠券</td>
<td>{{ detailForm.subOrderCoupon.discountAmount }}元</td>
</tr>
</tbody>
</table>
</div>
</div>
<div
class="container edit-container"
v-if="orderRefund"
>
<div class="container edit-container" v-if="orderRefund">
<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 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="form-img">
<el-form
label-width="100px"
:inline="true"
>
<el-form label-width="100px" :inline="true">
<el-form-item label="售后凭证">
<div class="flex">
<span
v-for="(item, index) in orderRefund.imgUrls"
:key="index"
>
<el-image
class="img-60 comment-img"
:src="item"
:preview-src-list="[item]"
></el-image>
<span v-for="(item, index) in orderRefund.imgUrls" :key="index">
<el-image class="img-60 comment-img" :src="item" :preview-src-list="[item]"></el-image>
</span>
</div>
</el-form-item>
......@@ -121,10 +76,7 @@
</div>
</div>
<GLFooter>
<el-button
@click="handleCancel"
size="medium"
>取消</el-button>
<el-button @click="handleCancel" size="medium">取消</el-button>
</GLFooter>
</div>
</template>
......@@ -134,7 +86,7 @@ import * as dayjs from 'dayjs'
import { orderManageStatusList, orderSourceList, deliveryTypeList } from '@/common/constant'
export default {
name: 'orderDetail',
data () {
data() {
return {
size: 'small',
title: '查看订单',
......@@ -180,6 +132,21 @@ export default {
// name: ''
// }
],
receiveInfoDataRow:[],
receiveInfoData: [
{
label: '收货人',
name: 'contactName'
},
{
label: '收货人电话',
name: 'contactPhone'
},
{
label: '收货地址',
name: 'shipAddress'
},
],
// 基本数据
baseData: {
orderStatusList: orderManageStatusList,
......@@ -199,14 +166,14 @@ export default {
}
},
created () { },
created() { },
mounted () {
mounted() {
this.getCrowdfundingOrderConfig()
},
methods: {
async getCrowdfundingOrderConfig () {
async getCrowdfundingOrderConfig() {
let detailFormData = [
{
label: '订单编号',
......@@ -289,7 +256,7 @@ export default {
const res = await this.$apis.common.getCrowdfundingOrderConfig()
let configShow = res != 1
if (!configShow) {
const filterFormList = ['customerPhone','shareStaffName', 'shareStaffTypeName', 'vin', 'shipAddress']
const filterFormList = ['shareStaffName', 'shareStaffTypeName', 'vin', 'shipAddress']
for (let i = 0; i < detailFormData.length; i++) {
if (filterFormList.includes(detailFormData[i].name)) {
detailFormData.splice(i, 1)
......@@ -303,8 +270,9 @@ export default {
this.routeInfo = this.$route.query
this.getInfo()
this.formToRow('afterInfoData')
this.formToRow('receiveInfoData')
},
formToRow (formName, numOfRow = 3) {
formToRow(formName, numOfRow = 3) {
var rowNum = Math.ceil(this[formName].length / numOfRow)
for (var i = 0; i < rowNum; i++) {
for (var j = 0; j < numOfRow; j++) {
......@@ -319,9 +287,10 @@ export default {
}
}
},
getInfo () {
getInfo() {
this.$apis.orderManage.getOrderDetailApi({ orderCode: this.routeInfo.orderCode }).then(res => {
this.detailForm = res
console.log(res, 888)
this.orderRefund = res.orderRefund || null
this.detailForm.createdDateStr = dayjs(this.detailForm.createdDate).format('YYYY-MM-DD HH:mm:ss')
if (this.orderRefund) {
......@@ -374,7 +343,7 @@ export default {
this.formToRow('detailFormData')
})
},
handleCancel () {
handleCancel() {
this.$router.push({
path: '/orderManage/index'
})
......@@ -386,29 +355,37 @@ export default {
.marketing.order-detail .el-form--inline .el-form-item {
margin: 0;
}
.marketing.order-detail .el-form--inline .el-form-item__content {
height: 30px;
}
.marketing.order-detail .form-img .el-form--inline .el-form-item__content {
height: auto !important;
}
.marketing.order-detail .flex {
justify-content: flex-start;
}
.marketing.order-detail .row-item {
width: 33%;
}
.detail-txt {
display: inline-block;
width: 220px;
}
.marketing.order-detail .show-table > tbody > tr > td {
.marketing.order-detail .show-table>tbody>tr>td {
text-align: center;
vertical-align: middle;
}
.marketing.order-detail .show-table td {
padding-right: 20px;
}
.order-detail .comment-img {
margin-top: 10px;
margin-right: 20px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!