额外额度计算修改

master
liyang 4 years ago
parent 82d8487bf9
commit e008e14046

@ -181,11 +181,11 @@
<td>
{$record.bind_role_name}
</td>
<td>{$record.base_quota}</td>
<td>{$record.other_quota}</td>
<td>{$record.quota}</td>
<td class="base_quota">{$record.base_quota}</td>
<td class="other_quota">{$record.other_quota}</td>
<td class="quota">{$record.quota}</td>
<td>{$record.verify_amount}</td>
<td>{$record.provide_amount}</td>
<td class="provide_amount">{$record.provide_amount}</td>
<td>{$record.today_amount}</td>
<td>{$record.apply_amount}</td>
<td>{$record.status}</td>
@ -341,11 +341,21 @@
return true
}
$('.set-quota-btn').click(function () {
var _this = $(this).parent().parent();
var base_quota = _this.find(".base_quota").text();
var quota = _this.find(".quota").text();
var provide_amount = _this.find(".provide_amount").text();
var box = $('#other-quota-box')
var tr = $(this).parents('tr').eq(0)
var id = tr.attr('data-id')
var otherQuota = tr.attr('data-other-quota')
var otherQuotaRemark = tr.attr('data-other-quota-remark')
console.log(tr)
box.find('[name=id]').val(id)
box.find('[name=other_quota]').val(otherQuota)
box.find('[name=other_quota_remark]').val(otherQuotaRemark)
@ -356,7 +366,9 @@
area: ['500px', '400px'],
zIndex: 250,
})
quota_submit(base_quota,quota,provide_amount);
})
function quota_submit(base_quota,quota,provide_amount) {
$('#quota-submit').on({
click: function() {
var box = $('#other-quota-box')
@ -371,6 +383,11 @@
quota = parseInt(quota,10) //奖金=累计额度
otherQuota = parseInt(otherQuota,10) //额外额度
provide_amount = parseInt(provide_amount,10) //累计已发放
console.log(base_quota)
console.log(quota)
console.log(otherQuota)
console.log(provide_amount)
if ((base_quota+quota+otherQuota-provide_amount) < 0){
return layer.msg('额度不足,请重新设置')
}
@ -394,6 +411,8 @@
})
}
})
}
$('.unbind-btn').click(function () {
var tr = $(this).parents('tr').eq(0)
var bindingId = tr.attr('data-binding-id')

Loading…
Cancel
Save