提交 bd926dd2 authored 作者: lihuihui's avatar lihuihui

update

上级 c85f2763
<template> <template>
<div>
<commonheader title="线下支付" />
<div class="offline-box"> <div class="offline-box">
<div class="call" v-if="data.offline_info">线下支付联系方式:{{ data.offline_info }}</div> <div class="call" v-if="data.offline_info">线下支付联系方式:{{ data.offline_info }}</div>
<div class="remarks" v-if="data.offline_more_info"> <div class="remarks" v-if="data.offline_more_info">
...@@ -18,14 +20,17 @@ ...@@ -18,14 +20,17 @@
</div> </div>
<div class="confim-btn" @click="uploadPay">确认</div> <div class="confim-btn" @click="uploadPay">确认</div>
</div> </div>
</div>
</template> </template>
<script> <script>
import { uploadPay } from '../api.js' import { uploadPay } from '../api.js'
import Commonheader from './Commonheader.vue'
import UploadImage from '@/components/upload/UploadImage.vue' import UploadImage from '@/components/upload/UploadImage.vue'
export default { export default {
components: { components: {
UploadImage UploadImage,
Commonheader
}, },
props: { props: {
data: { data: {
......
...@@ -116,11 +116,10 @@ export default { ...@@ -116,11 +116,10 @@ export default {
return list return list
}) })
.sort((a, b) => a.index - b.index) .sort((a, b) => a.index - b.index)
stepDetails.pay_price = item.activity.details.find(id => id.id === item.list[0].pay_record.activity_detail_id).pay_price
delete item.activity.details delete item.activity.details
stepDetails.activityInfo = item.activity stepDetails.activityInfo = item.activity
stepDetails.join_rand = item.join_rand stepDetails.join_rand = item.join_rand
stepDetails.pay_price = item.list[0].pay_record.pay_amount
console.log(item)
window.localStorage.orderStepDetails = JSON.stringify([stepDetails]) window.localStorage.orderStepDetails = JSON.stringify([stepDetails])
this.$router.push({ this.$router.push({
path: '/SignMainPage' path: '/SignMainPage'
......
...@@ -140,7 +140,7 @@ export default { ...@@ -140,7 +140,7 @@ export default {
// 共优惠价格 // 共优惠价格
totalCompanyPrice() { totalCompanyPrice() {
return this.selctOrderData return this.selctOrderData
.map(item => Number(this.payPrice) - Number(item.pay_record.pay_amount)) .map(item => Number(this.payPrice) - Number(item.pay_record.pay_amount) < 0 ? 0 : Number(this.payPrice) - Number(item.pay_record.pay_amount))
.reduce((pre, nex) => (pre += nex), 0) .reduce((pre, nex) => (pre += nex), 0)
.toFixed(2) .toFixed(2)
} }
...@@ -179,13 +179,14 @@ export default { ...@@ -179,13 +179,14 @@ export default {
// 实付价样式 // 实付价样式
getPayPrice() { getPayPrice() {
const splitPrice = this.payPrice.toString().split('.') const splitPrice = this.payPrice.toString().split('.')
console.log(111, this.payPrice, this.data)
// //2.重新赋值 // //2.重新赋值
return `<span style="font-size:0.34rem;">${splitPrice[0]}</span>.<span style="font-size:0.2rem;">${splitPrice[1]}</span>` return `<span style="font-size:0.34rem;">${splitPrice[0]}</span>.<span style="font-size:0.2rem;">${splitPrice[1]}</span>`
}, },
// 优惠价格样式 // 优惠价格样式
getCompanyPrice(item) { getCompanyPrice(item) {
const companyPrice = (Number(this.payPrice).toFixed(2) - Number(item.pay_record.pay_amount).toFixed(2)).toFixed(2) const companyPrice = (Number(this.payPrice).toFixed(2) - Number(item.pay_record.pay_amount).toFixed(2)).toFixed(2)
const splitPrice = companyPrice.split('.') const splitPrice = companyPrice < 0 ? '0.00'.split('.') : companyPrice.split('.')
// //2.重新赋值 // //2.重新赋值
return `<span style="font-size:0.34rem;">${splitPrice[0]}</span>.<span style="font-size:0.2rem;">${splitPrice[1]}</span>` return `<span style="font-size:0.34rem;">${splitPrice[0]}</span>.<span style="font-size:0.2rem;">${splitPrice[1]}</span>`
}, },
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论