This commit is contained in:
shijingjing
2022-06-30 16:59:55 +08:00
parent a08aca7afe
commit 9587b1acfe
2 changed files with 9 additions and 5 deletions

View File

@@ -108,7 +108,6 @@ export default {
this.instance.post(`/app/apppartyintegralinfo/list`, null, {
params: {
...this.search,
type: 1
},
})
.then((res) => {

View File

@@ -235,6 +235,7 @@ export default {
this.form = res.data
this.form.ladderIntegral = JSON.parse(res.data.ladderRule)
this.form.ruleType = res.data.ruleType
this.form.integralArr = [ res.data.integralMin, res.data.integralMax ]
this.dialog = true
}
})
@@ -306,12 +307,16 @@ export default {
this.getList();
},
onConfirm() {
this.form.integralMin = this.form.integralArr?.[0] || ''
this.form.integralMax = this.form.integralArr?.[1] || ''
this.form.ladderRule = JSON.stringify(this.form.ladderIntegral)
if(this.form.integralMin >= this.form.integralMax) {
return this.$message.error('请输入正确的区间范围')
}
this.$refs.DialogForm.validate((valid) => {
if (valid) {
this.form.integralMin = this.form.integralArr?.[0] || ''
this.form.integralMax = this.form.integralArr?.[1] || ''
this.form.ladderRule = JSON.stringify(this.form.ladderIntegral)
this.instance.post(`/app/apppartyintegralrule/addOrUpdate`, {
...this.form,
id: this.form.id || ''