修复管理后台bug
This commit is contained in:
@@ -239,7 +239,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="sendDressId" class="col-sm-3 control-label">送礼者获得装扮内容</label>
|
<label for="sendDressId" class="col-sm-3 control-label">送礼者获得装扮内容</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8" id="sendDressDiv">
|
||||||
<select name="sendDressId" id="sendDressId" data-btn-class="btn-warning" class="form-control">
|
<select name="sendDressId" id="sendDressId" data-btn-class="btn-warning" class="form-control">
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
@@ -264,7 +264,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="receiveDressId" class="col-sm-3 control-label">收礼者获得装扮内容</label>
|
<label for="receiveDressId" class="col-sm-3 control-label">收礼者获得装扮内容</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8" id="receiveDressDiv">
|
||||||
<select name="receiveDressId" id="receiveDressId" data-btn-class="btn-warning" class="form-control">
|
<select name="receiveDressId" id="receiveDressId" data-btn-class="btn-warning" class="form-control">
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
@@ -833,12 +833,18 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
let $dressId = $('#' + type + 'DressId');
|
|
||||||
let dressId = $('#' + type + 'DressIdBak').val();
|
let dressId = $('#' + type + 'DressIdBak').val();
|
||||||
console.log(dressId);
|
console.log(dressId);
|
||||||
$dressId.children().remove();
|
$('#' + type + 'DressDiv .combobox-container').remove();
|
||||||
|
$('#' + type + 'DressId').remove();
|
||||||
console.log(options);
|
console.log(options);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
let $div = $('#' + type + 'DressDiv');
|
||||||
|
let $select = $('<select/>');
|
||||||
|
$select.attr('name', type + 'DressId');
|
||||||
|
$select.attr('id', type + 'DressId');
|
||||||
|
$select.attr('data-btn-class', 'btn-warning');
|
||||||
|
$select.attr('class', 'form-control');
|
||||||
if (options.length > 0) {
|
if (options.length > 0) {
|
||||||
for (let j = 0; j < options.length; j++) {
|
for (let j = 0; j < options.length; j++) {
|
||||||
var option = options[j];
|
var option = options[j];
|
||||||
@@ -850,8 +856,9 @@ export default {
|
|||||||
$option.attr('selected', true);
|
$option.attr('selected', true);
|
||||||
}
|
}
|
||||||
$option.html(option.text);
|
$option.html(option.text);
|
||||||
$dressId.append($option);
|
$select.append($option);
|
||||||
}
|
}
|
||||||
|
$div.append($select);
|
||||||
ComboboxHelper.build(options, '#' + type + 'DressId', dressId);
|
ComboboxHelper.build(options, '#' + type + 'DressId', dressId);
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
@@ -867,7 +874,7 @@ export default {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
ComboboxHelper.build(options, '#baseGiftId', this.gift.baseGiftId);
|
ComboboxHelper.build([{text:'无', value: ''}].concat(options), '#baseGiftId', this.gift.baseGiftId);
|
||||||
}, 500);
|
}, 500);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -1197,10 +1204,10 @@ export default {
|
|||||||
$('#giftTagImage').attr("src", '');
|
$('#giftTagImage').attr("src", '');
|
||||||
$("#giftTagUploadInfo").html('');
|
$("#giftTagUploadInfo").html('');
|
||||||
$("#giftTagFile").val('');
|
$("#giftTagFile").val('');
|
||||||
$('#giftType').removeAttr('readonly');
|
$('#giftType').removeAttr('disabled');
|
||||||
$('#subGiftType').removeAttr('readonly');
|
$('#subGiftType').removeAttr('disabled');
|
||||||
$('#baseGiftId').removeAttr('readonly');
|
$('#baseGiftId').removeAttr('disabled');
|
||||||
$('#unlockNum').removeAttr('readonly');
|
$('#unlockNum').removeAttr('disabled');
|
||||||
$('#sendDressType').val('');
|
$('#sendDressType').val('');
|
||||||
$('#sendDressId').val('');
|
$('#sendDressId').val('');
|
||||||
$('#sendDressTime').val('');
|
$('#sendDressTime').val('');
|
||||||
@@ -1603,10 +1610,15 @@ export default {
|
|||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (entity.giftType == 16) {
|
if (entity.giftType == 16) {
|
||||||
$('#giftType').attr('readonly', 'readonly');
|
$('#giftType').attr('disabled', 'disabled');
|
||||||
$('#subGiftType').attr('readonly', 'readonly');
|
$('#subGiftType').attr('disabled', 'disabled');
|
||||||
$('#baseGiftId').attr('readonly', 'readonly');
|
$('#baseGiftId').attr('disabled', 'disabled');
|
||||||
$('#unlockNum').attr('readonly', 'readonly');
|
$('#unlockNum').attr('disabled', 'disabled');
|
||||||
|
} else {
|
||||||
|
$('#giftType').removeAttr('disabled');
|
||||||
|
$('#subGiftType').removeAttr('disabled');
|
||||||
|
$('#baseGiftId').removeAttr('disabled');
|
||||||
|
$('#unlockNum').removeAttr('disabled');
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
$this.giftUnlockList();
|
$this.giftUnlockList();
|
||||||
@@ -1644,7 +1656,9 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else if (subGiftType == 1) {
|
} else if (subGiftType == 1) {
|
||||||
let baseGiftId = $this.gift.baseGiftId;
|
let baseGiftId = ComboboxHelper.getSelected('#baseGiftId');
|
||||||
|
$('#baseGiftId').val(baseGiftId);
|
||||||
|
$this.gift.baseGiftId = baseGiftId;
|
||||||
let unlockNum = $this.gift.unlockNum;
|
let unlockNum = $this.gift.unlockNum;
|
||||||
if (!baseGiftId || baseGiftId == 0) {
|
if (!baseGiftId || baseGiftId == 0) {
|
||||||
$("#tipMsg").text("基础解锁礼物不能为空");
|
$("#tipMsg").text("基础解锁礼物不能为空");
|
||||||
@@ -1660,8 +1674,26 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (giftType == 17) {
|
||||||
|
let sendDressTime = $('#sendDressTime').val();
|
||||||
|
let receiveDressTime = $('#receiveDressTime').val();
|
||||||
|
let sendDressId = ComboboxHelper.getSelected('#sendDressId');
|
||||||
|
let receiveDressId = ComboboxHelper.getSelected('#receiveDressId');
|
||||||
|
$this.gift.sendDressId = sendDressId;
|
||||||
|
$this.gift.receiveDressId = receiveDressId;
|
||||||
|
$('#sendDressId').val(sendDressId);
|
||||||
|
$('#receiveDressid').val(receiveDressId);
|
||||||
|
if ((sendDressTime && sendDressTime < 5) || (receiveDressTime && receiveDressTime < 5)) {
|
||||||
|
$("#tipMsg").text("装扮时长不能小于5分钟");
|
||||||
|
$("#tipModal").modal('show');
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ($("#giftForm").validationEngine('validate')) {
|
if ($("#giftForm").validationEngine('validate')) {
|
||||||
|
$('#giftType').removeAttr('disabled');
|
||||||
|
$('#subGiftType').removeAttr('disabled');
|
||||||
|
$('#baseGiftId').removeAttr('disabled');
|
||||||
|
$('#unlockNum').removeAttr('disabled');
|
||||||
$("#consumeType").removeAttr("disabled");
|
$("#consumeType").removeAttr("disabled");
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "post",
|
type: "post",
|
||||||
|
Reference in New Issue
Block a user