diff --git a/src/views/financialCenter/enterpriseRecharge/components/add.vue b/src/views/financialCenter/enterpriseRecharge/components/add.vue index e8047ad..ce155fb 100644 --- a/src/views/financialCenter/enterpriseRecharge/components/add.vue +++ b/src/views/financialCenter/enterpriseRecharge/components/add.vue @@ -128,6 +128,10 @@ export default { if (this.form.companyId) callback() else callback('请选择公司') } + let checkZero = (rule, value, callback) => { + if (!+value) callback('请输入交易金额或交易金额不可为0') + else callback() + } let validatorRefineryCenterAccountId = (rule, value, callback) => { if (this.form.refineryCenterAccountId) callback() else callback('请选择油批中心账户') @@ -174,7 +178,7 @@ export default { rules: { companyId: [{ required: true, validator: validatorcompanyId, trigger: 'change' }], transactionType: [{ required: true, message: '请选择交易类型', trigger: 'change' }], - transactionAmount: [{ required: true, message: '请输入交易金额', trigger: 'blur' }], + transactionAmount: [{ required: true, validator: checkZero, trigger: 'blur' }], offlinePaymentCompany: [ { required: true, diff --git a/src/views/financialCenter/enterpriseRecharge/components/addTurn.vue b/src/views/financialCenter/enterpriseRecharge/components/addTurn.vue index d956eb7..862190f 100644 --- a/src/views/financialCenter/enterpriseRecharge/components/addTurn.vue +++ b/src/views/financialCenter/enterpriseRecharge/components/addTurn.vue @@ -79,9 +79,9 @@ export default { // else callback("请选择公司"); // }; let validatortransactionAmount = (rule, value, callback) => { + if (!+value) callback('请输入圈回金额或圈回金额不可为0') let typeTarget = this.correspondTypeEnum.find(item => item.value == this.form.turnType) let superiorLimit = this.companyInfo[typeTarget.valueKey] - if (value == '') callback('请输入圈回金额') if (value > superiorLimit) { callback(`圈回金额不可超过${typeTarget.label}`) } diff --git a/src/views/order/components/billOfLading.vue b/src/views/order/components/billOfLading.vue index e8a8a78..f8cbf62 100644 --- a/src/views/order/components/billOfLading.vue +++ b/src/views/order/components/billOfLading.vue @@ -362,7 +362,7 @@ export default { if (refineryInfo) { let balance = refineryInfo.balance * 10000 let costTotal = orderInfo.floorPrice * orderInfo.preQuantity * 10000 - let total = this.$utils.fixedHandle((balance + costTotal) / 10000) + let total = this.$utils.fixedHandle((balance - costTotal) / 10000) return total } return 0 diff --git a/src/views/refineryCenter/index.vue b/src/views/refineryCenter/index.vue index ebff031..04a8161 100644 --- a/src/views/refineryCenter/index.vue +++ b/src/views/refineryCenter/index.vue @@ -14,11 +14,11 @@ >
充值余额 - + @@ -89,7 +89,7 @@

- +