Commit ae062a71 by 徐忆琳

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

修改尾款订单展示

See merge request !528
2 parents 339abce5 8ec839c3
...@@ -65,7 +65,8 @@ ...@@ -65,7 +65,8 @@
<td <td
style="text-align: left;" style="text-align: left;"
colspan="3" colspan="3"
>优惠券</td> >优惠券
</td>
<td>{{ detailForm.subOrderCoupon.discountAmount }}元</td> <td>{{ detailForm.subOrderCoupon.discountAmount }}元</td>
</tr> </tr>
</tbody> </tbody>
...@@ -124,17 +125,19 @@ ...@@ -124,17 +125,19 @@
<el-button <el-button
@click="handleCancel" @click="handleCancel"
size="medium" size="medium"
>取消</el-button> >取消
</el-button>
</GLFooter> </GLFooter>
</div> </div>
</template> </template>
<script> <script>
import * as dayjs from 'dayjs' 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: '查看订单',
...@@ -186,27 +189,28 @@ export default { ...@@ -186,27 +189,28 @@ export default {
orderSourceList: orderSourceList, orderSourceList: orderSourceList,
deliveryTypeList: deliveryTypeList, deliveryTypeList: deliveryTypeList,
refundTypeList: [ refundTypeList: [
{ confId: '1', confName: '退款退货' }, {confId: '1', confName: '退款退货'},
{ confId: '2', confName: '退款不退货' }, {confId: '2', confName: '退款不退货'},
{ confId: '3', confName: '众筹订单退款' } {confId: '3', confName: '众筹订单退款'}
], ],
shareStaffTypeList: [ shareStaffTypeList: [
{ confId: '1', confName: '个微' }, {confId: '1', confName: '个微'},
{ confId: '2', confName: '企微' } {confId: '2', confName: '企微'}
] ]
}, },
configShow: false configShow: false
} }
}, },
created () { }, created() {
},
mounted () { mounted() {
this.getCrowdfundingOrderConfig() this.getCrowdfundingOrderConfig()
}, },
methods: { methods: {
async getCrowdfundingOrderConfig () { async getCrowdfundingOrderConfig() {
let detailFormData = [ let detailFormData = [
{ {
label: '订单编号', label: '订单编号',
...@@ -289,7 +293,7 @@ export default { ...@@ -289,7 +293,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 = ['customerPhone', '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)
...@@ -304,7 +308,7 @@ export default { ...@@ -304,7 +308,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++) {
...@@ -319,10 +323,20 @@ export default { ...@@ -319,10 +323,20 @@ 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
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') this.detailForm.createdDateStr = dayjs(this.detailForm.createdDate).format('YYYY-MM-DD HH:mm:ss')
if (this.orderRefund) { 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 : '-' 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 { ...@@ -340,6 +354,12 @@ export default {
this.detailForm.crowdFundingPrice = (res.crowdFundingPrice - res.payPrice).toFixed(2) + '元' 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元'
// 尾款转化为元
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.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 : '-'
if (!this.detailForm.takeFee) { if (!this.detailForm.takeFee) {
...@@ -374,7 +394,7 @@ export default { ...@@ -374,7 +394,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 +406,37 @@ export default { ...@@ -386,29 +406,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!