...
|
...
|
@@ -163,10 +163,10 @@ |
|
|
needSave: false,
|
|
|
prizeRules: {
|
|
|
prize_idx: [
|
|
|
{required: true, message: '奖品位置序号不能为空', trigger: 'blur'}
|
|
|
{required: true, message: '奖品位置序号不能为空'}
|
|
|
],
|
|
|
name: [
|
|
|
{required: true, message: '奖品名称不能为空', trigger: 'blur'}
|
|
|
{required: true, message: '奖品名称不能为空'}
|
|
|
],
|
|
|
type: [
|
|
|
{required: true}
|
...
|
...
|
@@ -298,8 +298,18 @@ |
|
|
this.prize = Object.assign({}, this.prizes[idx]);
|
|
|
this.prize._editIdx = idx;
|
|
|
this.isEditing = true;
|
|
|
|
|
|
|
|
|
console.log(JSON.stringify(this.prize))
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
const form = 'prizeForm';
|
|
|
this.validateForm(form);
|
|
|
});
|
|
|
},
|
|
|
confirmEdit() {
|
|
|
const form = 'prizeForm';
|
|
|
this.validateForm(form).then(() => {
|
|
|
let editIdx = this.prize['_editIdx'];
|
|
|
|
|
|
delete this.prize._editIdx;
|
...
|
...
|
@@ -308,6 +318,9 @@ |
|
|
this.isEditing = false;
|
|
|
this.needSave = true;
|
|
|
this.formReset('prizeForm');
|
|
|
}).catch(() => {});
|
|
|
|
|
|
|
|
|
},
|
|
|
prizesUpdate() {
|
|
|
let len = this.prizes.length;
|
...
|
...
|
|