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