Commit 9802f1bb by wangzhihui

Merge branch 'SAAS+V5.2.0-1030' of http://192.168.3.233:8090/saas/scrm-micro-poi…

…nts into SAAS+V5.2.0-1030
2 parents 8b4df4e0 91d7dd20
......@@ -206,7 +206,8 @@ const updateCustomerIntegral = params => {
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
sign: true,
returnAll: true
})
}
......
......@@ -364,7 +364,7 @@ export default {
}
}
},
created() {
async created() {
/** loginpath:标识系统
* 门店版:/login
* 1、默认带出商户,“选择商户”按钮置灰
......@@ -375,6 +375,16 @@ export default {
this.baseData.personTypeList.splice(1, 1)
this.configForm.merchantId = this.$globalState.session.merchantId
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() {
......@@ -426,6 +436,9 @@ export default {
handleConfirm() {
const { disabled, id } = this.pageObject
if (disabled) return this.$router.go(-1)
if(this.loading) {
return true
}
this.$refs.fromRef.$refs.formRef.validate(async valid => {
if (valid) {
try {
......@@ -473,14 +486,16 @@ export default {
}
if (id) params.id = id
const res = await this.$apis.points.updateCustomerIntegral(params)
if (res) {
console.log(res)
if (res.code == 0) {
this.$message({
message: id ? '编辑成功' : '创建成功',
type: 'success'
})
setTimeout(() => this.$router.go(-1), 1e3)
}
this.loading = false
} else {
this.loading = false
}
} catch (error) {
this.loading = false
this.$message.error(error || '操作失败')
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!