Commit fefea6c9 by 李伟康

提交

1 parent c03a68f6
......@@ -241,7 +241,7 @@ import pointsConfig from './components/pointsConfig.vue'
import importErrDialog from './components/importErrDialog.vue'
const truncateDecimal = (number, decimalPlaces = 2) => {
let multiplier = Math.pow(10, decimalPlaces),
truncatedNumber = Math.floor(number * multiplier) / multiplier
truncatedNumber = Math.floor(number * multiplier) / multiplier
return truncatedNumber.toFixed(decimalPlaces)
}
export default {
......@@ -413,7 +413,10 @@ export default {
merchantId,
merchantName
}
this.getMerchantCharge()
this.getMerchantCharge({
gasCardServiceCharge: res.oilCouponRate,
passageServiceCharge: res.integralRate
})
detailList.map((row, index) => {
this.setRowTotal(row, index)
this.setPassageService(row, index)
......@@ -550,7 +553,7 @@ export default {
setTableHeight (detailList = []) {
const { listRef } = this.$refs,
{ id } = this.pageObject,
height = id ? 56 : 67.39
height = id ? 56 : 67.39
if (listRef) {
let length = detailList.length
listRef.tableHeightValues = `${(length > 10 ? 10 : length) * height + 56}px`
......@@ -561,10 +564,11 @@ export default {
validateField (id) {
this.$refs.fromRef.$refs.formRef.validateField(id)
},
async getMerchantCharge () {
async getMerchantCharge (isEdit) {
console.log(isEdit)
try {
const { merchantId } = this.configForm,
res = await this.$apis.points.getMerchantCharge({ merchantId })
res = isEdit ? isEdit : await this.$apis.points.getMerchantCharge({ merchantId })
if (res) {
this.totalFormData.map(e => {
if (['gasCardServiceCharge', 'passageServiceCharge'].includes(e.name)) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!