Commit fefea6c9 by 李伟康

提交

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