Commit e544cf0b by 王志慧

8月商城订单月中版本

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