Commit a7c910f4 by 杨明

fixed

1 parent 50e99e60
......@@ -4,24 +4,10 @@
<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">
......@@ -31,89 +17,43 @@
</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>
<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>
......@@ -122,10 +62,7 @@
</div>
</div>
<GLFooter>
<el-button
@click="handleCancel"
size="medium"
>取消</el-button>
<el-button @click="handleCancel" size="medium">取消</el-button>
</GLFooter>
</div>
</template>
......@@ -135,7 +72,7 @@ import * as dayjs from 'dayjs'
import { orderManageStatusList, orderSourceList, deliveryTypeList } from '@/common/constant'
export default {
name: 'orderDetail',
data () {
data() {
return {
size: 'small',
title: '查看订单',
......@@ -200,15 +137,14 @@ export default {
}
},
created () {
},
created() {},
mounted () {
mounted() {
this.getCrowdfundingOrderConfig()
},
methods: {
async getCrowdfundingOrderConfig () {
async getCrowdfundingOrderConfig() {
let detailFormData = [
{
label: '订单编号',
......@@ -230,9 +166,9 @@ export default {
label: '推荐人',
name: 'shareStaffName'
},
{
label:'推荐人ID',
name:'shareStaffId'
{
label: '推荐人ID',
name: 'shareStaffId'
},
{
label: '推荐人类型',
......@@ -306,7 +242,7 @@ export default {
this.getInfo()
this.formToRow('afterInfoData')
},
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++) {
......@@ -321,7 +257,7 @@ export default {
}
}
},
getInfo () {
getInfo() {
this.$apis.orderManage.getOrderDetailApi({ orderCode: this.routeInfo.orderCode }).then(res => {
this.detailForm = res
this.orderRefund = res.orderRefund || null
......@@ -338,6 +274,9 @@ export default {
this.detailForm.subOrderCoupon.discountAmount = (this.detailForm.subOrderCoupon.discountAmount / 100).toFixed(2)
}
this.orderGoods = res.orderGoods || []
if ((res.crowdFundingPrice || res.crowdFundingPrice == 0) && (res.payPrice || res.payPrice == 0)) {
this.detailForm.crowdFundingPrice = (res.crowdFundingPrice - res.payPrice).toFixed(2) + '元'
}
this.detailForm.payPrice = res.payPrice ? res.payPrice + '元' : '0元'
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.orderStatusName = this.baseData.orderStatusList.map(item => item.confId).includes(res.orderStatus + '') ? this.baseData.orderStatusList.find(item => item.confId == res.orderStatus).confName : '-'
......@@ -373,7 +312,7 @@ export default {
this.formToRow('detailFormData')
})
},
handleCancel () {
handleCancel() {
this.$router.push({
path: '/orderManage/index'
})
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!