Commit 91d7dd20 by chenwq

feat(储值卡): 异步获取商户手续费并更新表单显示

在created钩子中异步获取商户手续费数据,更新gasCardServiceCharge和passageServiceCharge对应的标签显示和chargeObject值
1 parent 46136ab1
...@@ -364,7 +364,7 @@ export default { ...@@ -364,7 +364,7 @@ export default {
} }
} }
}, },
created() { async created() {
/** loginpath:标识系统 /** loginpath:标识系统
* 门店版:/login * 门店版:/login
* 1、默认带出商户,“选择商户”按钮置灰 * 1、默认带出商户,“选择商户”按钮置灰
...@@ -375,6 +375,16 @@ export default { ...@@ -375,6 +375,16 @@ export default {
this.baseData.personTypeList.splice(1, 1) this.baseData.personTypeList.splice(1, 1)
this.configForm.merchantId = this.$globalState.session.merchantId this.configForm.merchantId = this.$globalState.session.merchantId
this.configForm.merchantName = this.$globalState.session.merchantName this.configForm.merchantName = this.$globalState.session.merchantName
const res = await this.$apis.points.getMerchantCharge({ merchantId: this.configForm.merchantId })
if (res) {
this.totalFormData.map(e => {
if (['gasCardServiceCharge', 'passageServiceCharge'].includes(e.name)) {
const val = res[e.name] || 0
e.label = e.label.replace(/\d+/g, val)
this.chargeObject[e.name] = val
}
})
}
} }
}, },
mounted() { mounted() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!