Commit a7c910f4 by 杨明

fixed

1 parent 50e99e60
...@@ -4,24 +4,10 @@ ...@@ -4,24 +4,10 @@
<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">
> <span class="detail-txt ellipsis-1" :title="detailForm[subItem.name]">{{ detailForm[subItem.name] ? detailForm[subItem.name] + (subItem.suffix || '') : '-' }}</span>
<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-form-item>
</el-row> </el-row>
<template v-if="detailForm.formDescribe"> <template v-if="detailForm.formDescribe">
...@@ -31,89 +17,43 @@ ...@@ -31,89 +17,43 @@
</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> <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 }}元 * <td>{{ item.activityPrice ? item.activityPrice : item.retailPrice }}元 * {{ item.goodsNumber }}</td>
{{ 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] || '-' }}</span>
<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-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>
...@@ -122,10 +62,7 @@ ...@@ -122,10 +62,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>
...@@ -135,7 +72,7 @@ import * as dayjs from 'dayjs' ...@@ -135,7 +72,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: '查看订单',
...@@ -200,15 +137,14 @@ export default { ...@@ -200,15 +137,14 @@ export default {
} }
}, },
created () { created() {},
},
mounted () { mounted() {
this.getCrowdfundingOrderConfig() this.getCrowdfundingOrderConfig()
}, },
methods: { methods: {
async getCrowdfundingOrderConfig () { async getCrowdfundingOrderConfig() {
let detailFormData = [ let detailFormData = [
{ {
label: '订单编号', label: '订单编号',
...@@ -231,8 +167,8 @@ export default { ...@@ -231,8 +167,8 @@ export default {
name: 'shareStaffName' name: 'shareStaffName'
}, },
{ {
label:'推荐人ID', label: '推荐人ID',
name:'shareStaffId' name: 'shareStaffId'
}, },
{ {
label: '推荐人类型', label: '推荐人类型',
...@@ -306,7 +242,7 @@ export default { ...@@ -306,7 +242,7 @@ export default {
this.getInfo() this.getInfo()
this.formToRow('afterInfoData') this.formToRow('afterInfoData')
}, },
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++) {
...@@ -321,7 +257,7 @@ export default { ...@@ -321,7 +257,7 @@ 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 || null this.orderRefund = res.orderRefund || null
...@@ -338,6 +274,9 @@ export default { ...@@ -338,6 +274,9 @@ export default {
this.detailForm.subOrderCoupon.discountAmount = (this.detailForm.subOrderCoupon.discountAmount / 100).toFixed(2) this.detailForm.subOrderCoupon.discountAmount = (this.detailForm.subOrderCoupon.discountAmount / 100).toFixed(2)
} }
this.orderGoods = res.orderGoods || [] 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.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.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 : '-' 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 { ...@@ -373,7 +312,7 @@ export default {
this.formToRow('detailFormData') this.formToRow('detailFormData')
}) })
}, },
handleCancel () { handleCancel() {
this.$router.push({ this.$router.push({
path: '/orderManage/index' path: '/orderManage/index'
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!