|
|
|
@ -48,6 +48,11 @@
|
|
|
|
|
.clearfix {
|
|
|
|
|
*zoom: 1;
|
|
|
|
|
}
|
|
|
|
|
#other_quota_remark {
|
|
|
|
|
width:250px;
|
|
|
|
|
height:130px;
|
|
|
|
|
padding: 0 10px;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
</block>
|
|
|
|
|
<block name="body">
|
|
|
|
@ -242,6 +247,12 @@
|
|
|
|
|
<input type="text" class="form-input" name="other_quota" value="" style="width:250px">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label>备注信息:</label>
|
|
|
|
|
<div class="form-item" style="width: 280px;">
|
|
|
|
|
<textarea name="other_quota_remark"id="other_quota_remark" class="form-input" placeholder="100字以内" maxlength="100"></textarea>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label></label>
|
|
|
|
|
<a id="quota-submit" href="javascript:;" class="add-submit btn">确定</a>
|
|
|
|
@ -264,6 +275,10 @@
|
|
|
|
|
//导航高亮
|
|
|
|
|
highlight_subnav("{:U('TestingResource/index')}");
|
|
|
|
|
$(function(){
|
|
|
|
|
// 全局变量声明
|
|
|
|
|
var base_quota = 0;
|
|
|
|
|
var quota = 0;
|
|
|
|
|
var provide_amount = 0;
|
|
|
|
|
// 添加全部选项
|
|
|
|
|
if ('all' == "{:I('row', 0)}") {
|
|
|
|
|
$("#pagechange").prepend("<option value='all' selected>全部</option>");
|
|
|
|
@ -336,7 +351,7 @@
|
|
|
|
|
title: '设置额外额度',
|
|
|
|
|
type: 1,
|
|
|
|
|
content: box,
|
|
|
|
|
area: ['500px', '200px'],
|
|
|
|
|
area: ['500px', '400px'],
|
|
|
|
|
zIndex: 250,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
@ -345,14 +360,23 @@
|
|
|
|
|
var box = $('#other-quota-box')
|
|
|
|
|
var id = box.find('[name=id]').val()
|
|
|
|
|
var otherQuota = box.find('[name=other_quota]').val()
|
|
|
|
|
if (!isNumber(otherQuota)) {
|
|
|
|
|
return layer.msg('额外额度只能为正整数')
|
|
|
|
|
var otherQuotaRemark = box.find('[name=other_quota_remark]').val()
|
|
|
|
|
if (!(parseInt(otherQuota, 10) == otherQuota)){
|
|
|
|
|
return layer.msg('额外额度只能为整数')
|
|
|
|
|
}
|
|
|
|
|
// 初始金额+奖金(累计金额)+额外额度-累计已发放
|
|
|
|
|
base_quota = parseInt(base_quota,10) //初始金额
|
|
|
|
|
quota = parseInt(quota,10) //奖金=累计额度
|
|
|
|
|
otherQuota = parseInt(otherQuota,10) //额外额度
|
|
|
|
|
provide_amount = parseInt(provide_amount,10) //累计已发放
|
|
|
|
|
if ((base_quota+quota+otherQuota-provide_amount) < 0){
|
|
|
|
|
return layer.msg('额度不足,请重新设置')
|
|
|
|
|
}
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "{:U('setOtherQuota')}",
|
|
|
|
|
type: "POST",
|
|
|
|
|
dataType: "json",
|
|
|
|
|
data: { id: id, other_quota: otherQuota },
|
|
|
|
|
data: { id: id, other_quota: otherQuota,otherQuotaRemark: otherQuotaRemark },
|
|
|
|
|
success: function (result) {
|
|
|
|
|
if (result.status == 0) {
|
|
|
|
|
layer.msg(result.message);
|
|
|
|
|