|
|
|
@ -186,6 +186,7 @@ body {
|
|
|
|
|
|
|
|
|
|
<div class="clearfix" style="margin-top: 10px;">
|
|
|
|
|
<input id="hasItf" type="hidden" value="<?=$hasItf?>" name="has_itf">
|
|
|
|
|
<input id="isEnableNum" type="hidden" value="<?=$isEnableNum?>" name="is_enable_num">
|
|
|
|
|
<?php if ($hasItf):?>
|
|
|
|
|
<div class="form-group fl">
|
|
|
|
|
<select id="resource-type-select" name="resource_type_id" style="width:150px" class="select_gallery">
|
|
|
|
@ -204,8 +205,11 @@ body {
|
|
|
|
|
<p id="resource-amount" class="static-input">资源价值: --</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group fl">
|
|
|
|
|
<?php if ($isEnableNum):?>
|
|
|
|
|
<input id="num-input" type="text" name="num" class="txt normal_txt" placeholder="请输入资源数量" value="">
|
|
|
|
|
<?php else:?>
|
|
|
|
|
<p class="static-input">资源数量: 1</p>
|
|
|
|
|
<!-- <input id="num-input" type="text" name="num" class="txt normal_txt" id="uid" placeholder="请输入资源数量" value=""> -->
|
|
|
|
|
<?php endif;?>
|
|
|
|
|
</div>
|
|
|
|
|
<?php else:?>
|
|
|
|
|
<div class="form-group fl">
|
|
|
|
@ -289,6 +293,7 @@ body {
|
|
|
|
|
$(".select_gallery").select2()
|
|
|
|
|
var globalGameId = $('#game-select').val()
|
|
|
|
|
var hasItf = $('#hasItf').val()
|
|
|
|
|
var isEnableNum = $('#isEnableNum').val()
|
|
|
|
|
if (globalGameId > 0) {
|
|
|
|
|
initTable(globalGameId)
|
|
|
|
|
}
|
|
|
|
@ -465,8 +470,7 @@ body {
|
|
|
|
|
var resourceName = $('#resource-select option:selected').html()
|
|
|
|
|
var amount = $('#resource-select option:selected').attr('data-amount')
|
|
|
|
|
amount = amount == undefined ? '--' : amount
|
|
|
|
|
// var num = $('#num-input').val()
|
|
|
|
|
var num = 1
|
|
|
|
|
var num = isEnableNum == 1 ? $('#num-input').val() : 1
|
|
|
|
|
var remark = $('#remark-input').val()
|
|
|
|
|
|
|
|
|
|
if (resourceTypeId == '') {
|
|
|
|
@ -481,7 +485,9 @@ body {
|
|
|
|
|
if (!isNumber(num)) {
|
|
|
|
|
return layer.msg('资源数量只能为正整数')
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (num <= 0) {
|
|
|
|
|
return layer.msg('资源数量需要大于0')
|
|
|
|
|
}
|
|
|
|
|
var html = '<tr class="normal-row" data-resource-id="' + resourceId + '" data-resource-type-id="' + resourceTypeId + '" >' +
|
|
|
|
|
'<td>' + resourceTypeName + '</td>' +
|
|
|
|
|
'<td>' + resourceName + '</td>' +
|
|
|
|
|