Commit ae062a71 by 徐忆琳

Merge branch 'xuyl_' into 'SAAS+V4.25.1'

修改尾款订单展示

See merge request !528
2 parents 339abce5 8ec839c3
......@@ -65,7 +65,8 @@
<td
style="text-align: left;"
colspan="3"
>优惠券</td>
>优惠券
</td>
<td>{{ detailForm.subOrderCoupon.discountAmount }}元</td>
</tr>
</tbody>
......@@ -124,17 +125,19 @@
<el-button
@click="handleCancel"
size="medium"
>取消</el-button>
>取消
</el-button>
</GLFooter>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
import { orderManageStatusList, orderSourceList, deliveryTypeList } from '@/common/constant'
import {orderManageStatusList, orderSourceList, deliveryTypeList} from '@/common/constant'
export default {
name: 'orderDetail',
data () {
data() {
return {
size: 'small',
title: '查看订单',
......@@ -186,27 +189,28 @@ export default {
orderSourceList: orderSourceList,
deliveryTypeList: deliveryTypeList,
refundTypeList: [
{ confId: '1', confName: '退款退货' },
{ confId: '2', confName: '退款不退货' },
{ confId: '3', confName: '众筹订单退款' }
{confId: '1', confName: '退款退货'},
{confId: '2', confName: '退款不退货'},
{confId: '3', confName: '众筹订单退款'}
],
shareStaffTypeList: [
{ confId: '1', confName: '个微' },
{ confId: '2', confName: '企微' }
{confId: '1', confName: '个微'},
{confId: '2', confName: '企微'}
]
},
configShow: false
}
},
created () { },
created() {
},
mounted () {
mounted() {
this.getCrowdfundingOrderConfig()
},
methods: {
async getCrowdfundingOrderConfig () {
async getCrowdfundingOrderConfig() {
let detailFormData = [
{
label: '订单编号',
......@@ -289,7 +293,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 = ['customerPhone', 'shareStaffName', 'shareStaffTypeName', 'vin', 'shipAddress']
for (let i = 0; i < detailFormData.length; i++) {
if (filterFormList.includes(detailFormData[i].name)) {
detailFormData.splice(i, 1)
......@@ -304,7 +308,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++) {
......@@ -319,10 +323,20 @@ export default {
}
}
},
getInfo () {
this.$apis.orderManage.getOrderDetailApi({ orderCode: this.routeInfo.orderCode }).then(res => {
getInfo() {
this.$apis.orderManage.getOrderDetailApi({orderCode: this.routeInfo.orderCode}).then(res => {
this.detailForm = res
this.orderRefund = res.orderRefund || null
if (res.orderSource == 6 || res.orderSource == 7) {
this.detailFormData.find(item => {
if (item.label == '支付定金') {
item.name = 'orderPrice'
}
if (item.label == '尾款') {
item.name = 'finalPaymentAmount'
}
})
}
this.detailForm.createdDateStr = dayjs(this.detailForm.createdDate).format('YYYY-MM-DD HH:mm:ss')
if (this.orderRefund) {
this.orderRefund.refundTypeName = this.baseData.refundTypeList.map(item => item.confId).includes(res.orderRefund.refundType + '') ? this.baseData.refundTypeList.find(item => item.confId == res.orderRefund.refundType).confName : '-'
......@@ -340,6 +354,12 @@ export default {
this.detailForm.crowdFundingPrice = (res.crowdFundingPrice - res.payPrice).toFixed(2) + '元'
}
this.detailForm.payPrice = res.payPrice ? res.payPrice + '元' : '0元'
// 尾款转化为元
if ((res.finalPaymentAmount || res.finalPaymentAmount == 0) && (res.orderPrice || res.orderPrice == 0)) {
this.detailForm.finalPaymentAmount = (res.finalPaymentAmount / 100).toFixed(2) + '元'
}
this.detailForm.orderPrice = res.orderPrice ? res.orderPrice + '元' : '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 : '-'
if (!this.detailForm.takeFee) {
......@@ -374,7 +394,7 @@ export default {
this.formToRow('detailFormData')
})
},
handleCancel () {
handleCancel() {
this.$router.push({
path: '/orderManage/index'
})
......@@ -386,29 +406,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 {
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!