Commit 0cddef1c by 张立顺

修改价格判断逻辑

1 parent 990227fb
<!-- 选择商品弹窗 -->
<template>
<!-- :okText="productList.length ? '确定' : '创建商品'" -->
<GLDialog class="muti-pro"
bigTitle="选择商品"
mode="big"
:visible.sync="isMutiSelectVisible"
:before-close="handleMutiSelectClose"
:okText="productList.length ? '确定' : '创建商品'"
:okText="'确定'"
@onOk="handleMutiSelectConfirm"
@onCancel="handleMutiSelectClose"
:noClose="false"
......
<!-- 选择商品 - 单选 -->
<template>
<!-- :okText="productList.length ? '确定' : '创建商品'" -->
<GLDialog class="single-pro"
bigTitle="选择商品"
mode="big"
:before-close="handleSingleSelectClose"
:okText="productList.length ? '确定' : '创建商品'"
:okText="'确定'"
:visible.sync="isSingleSelectVisible"
@onOk="handleSingleSelectConfirm"
@onCancel="handleSingleSelectClose">
......
......@@ -279,7 +279,7 @@ export default {
this.detailForm.payPrice = res.payPrice ? res.payPrice + '元' : '0元'
this.detailForm.crowdFundingPrice = ''
if (res.payPrice && res.crowdFundingPrice) {
this.detailForm.crowdFundingPrice = res.crowdFundingPrice - res.payPrice + '元'
this.detailForm.crowdFundingPrice = (res.crowdFundingPrice - res.payPrice).toFixed(2) + '元'
}
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 : '-'
......
......@@ -944,7 +944,7 @@ export default {
validator: (rule, value, callback) => {
if (!this.editForm.crowdFundingPrice) return callback(new Error('请先填写众筹价'))
if (value > Number(this.editForm.crowdFundingPrice)) return callback(new Error('定金不能大于众筹价格'))
return value >= +(this.selectedProInfo.retailPrice / 100).toFixed(2) ? callback(new Error('秒杀价必须小于零售价')) : callback()
return value > +(this.selectedProInfo.retailPrice / 100).toFixed(2) ? callback(new Error('秒杀价必须小于零售价')) : callback()
},
trigger: 'change'
}
......@@ -1688,7 +1688,7 @@ export default {
filterBalancePayment(crowdFundingPrice, activityPrice) {
let BalancePaymentNum = Number(crowdFundingPrice) - Number(activityPrice)
if (BalancePaymentNum == 0) return 0
return BalancePaymentNum > 0 ? BalancePaymentNum : ''
return BalancePaymentNum > 0 ? BalancePaymentNum.toFixed(2) : ''
}
},
mounted() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!