|
@@ -170,7 +170,7 @@
|
|
|
width="650px">
|
|
|
<el-form :model='maskForm'
|
|
|
:rules="maskRules"
|
|
|
- label-width="100px"
|
|
|
+ label-width="110px"
|
|
|
label-position="right"
|
|
|
:inline="true"
|
|
|
ref="maskForm">
|
|
@@ -198,7 +198,16 @@
|
|
|
@mousewheel.native.prevent
|
|
|
:disabled='!isNew'></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="缴费金额"
|
|
|
+ <el-form-item label="是否开启限制"
|
|
|
+ prop="openMaxTerm"
|
|
|
+ :rules="[{ required: true, message: '请选择是否开启目标金额', trigger: 'change' }]"
|
|
|
+ v-if="maskForm.type == 12">
|
|
|
+ <el-select v-model.trim="maskForm.openMaxTerm" clearable>
|
|
|
+ <el-option :value="1" label="是"></el-option>
|
|
|
+ <el-option :value="0" label="否"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="目标金额"
|
|
|
prop="maxAmount"
|
|
|
:rules="[{ required: true, validator: validMaxNum, trigger: 'blur' }]"
|
|
|
v-if="maskForm.type == 12">
|
|
@@ -448,6 +457,7 @@ export default {
|
|
|
code: '',
|
|
|
musicGroupId: '',
|
|
|
maxAmount: null,
|
|
|
+ openMaxTerm: null,
|
|
|
subMoney: ''
|
|
|
},
|
|
|
maskMusicList: [],
|
|
@@ -544,6 +554,7 @@ export default {
|
|
|
type: null,
|
|
|
money: null,
|
|
|
maxAmount: null,
|
|
|
+ openMaxTerm: null,
|
|
|
desc: null,
|
|
|
title: null,
|
|
|
code: null
|
|
@@ -603,6 +614,7 @@ export default {
|
|
|
maskForm.money = row.amount
|
|
|
maskForm.subMoney = row.discountAmount
|
|
|
maskForm.maxAmount = row.maxAmount
|
|
|
+ maskForm.openMaxTerm = row.openMaxTerm
|
|
|
maskForm.musicGroupId = row.musicGroupId ? row.musicGroupId : null
|
|
|
if (row.userId) {
|
|
|
queryUserMusicInfos({ userId: row.userId }).then(studentInfo => {
|
|
@@ -636,7 +648,7 @@ export default {
|
|
|
}
|
|
|
this.$refs['maskForm'].validate(item => {
|
|
|
if(item) {
|
|
|
- updateZero(cleanDeep({ id: maskForm.id, maxAmount: maskForm.maxAmount })).then(res => {
|
|
|
+ updateZero(cleanDeep({ id: maskForm.id, maxAmount: maskForm.maxAmount, openMaxTerm: maskForm.openMaxTerm })).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.$message.success('更新成功')
|
|
|
this.zeroVisible = false;
|
|
@@ -657,7 +669,8 @@ export default {
|
|
|
amount: this.maskForm.money,
|
|
|
musicGroupId: this.maskForm.musicGroupId,
|
|
|
discountAmount: this.maskForm.subMoney,
|
|
|
- maxAmount: this.maskForm.maxAmount
|
|
|
+ maxAmount: this.maskForm.maxAmount,
|
|
|
+ openMaxTerm: this.maskForm.openMaxTerm
|
|
|
}
|
|
|
addZero(obj).then(res => {
|
|
|
if (res.code == 200) {
|