|
|
@ -177,6 +177,13 @@
|
|
|
|
var statement = [];
|
|
|
|
var statement = [];
|
|
|
|
var key = 0;
|
|
|
|
var key = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var CHECK = {
|
|
|
|
|
|
|
|
number: /^\d+(\.{1}\d+)?$/,
|
|
|
|
|
|
|
|
mobile:/^1[3456789]\d{9}$/,
|
|
|
|
|
|
|
|
BankNo:/^([1-9]{1})(\d{15}|\d{18})$/,
|
|
|
|
|
|
|
|
money:/((^[1-9]\d*)|^0)(\.\d{0,2}){0,1}$/
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//搜索功能
|
|
|
|
//搜索功能
|
|
|
|
$("#ext_field").change(function(){
|
|
|
|
$("#ext_field").change(function(){
|
|
|
|
var ext_field = $("#ext_field").val();
|
|
|
|
var ext_field = $("#ext_field").val();
|
|
|
@ -287,6 +294,12 @@
|
|
|
|
$(".tax").off("blur");
|
|
|
|
$(".tax").off("blur");
|
|
|
|
$(".tax").on("blur", function() {
|
|
|
|
$(".tax").on("blur", function() {
|
|
|
|
var lastNum = (parseFloat($(this).parent().next().text())).toFixed(2);
|
|
|
|
var lastNum = (parseFloat($(this).parent().next().text())).toFixed(2);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!CHECK.number.test($(this).val())) {
|
|
|
|
|
|
|
|
layer.msg("结算单的罚款与税率必须是数字且不能为空");
|
|
|
|
|
|
|
|
$(this).val('0');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$(this).parent().next().text(($(this).parent().next().attr('data-value')*(1-$(this).val()/100)).toFixed(2));
|
|
|
|
$(this).parent().next().text(($(this).parent().next().attr('data-value')*(1-$(this).val()/100)).toFixed(2));
|
|
|
|
var nowNum = (parseFloat($(this).parent().next().text())).toFixed(2);
|
|
|
|
var nowNum = (parseFloat($(this).parent().next().text())).toFixed(2);
|
|
|
|
console.log((nowNum-lastNum))
|
|
|
|
console.log((nowNum-lastNum))
|
|
|
@ -297,6 +310,12 @@
|
|
|
|
$(".forfeit").on("blur", function() {
|
|
|
|
$(".forfeit").on("blur", function() {
|
|
|
|
var lastNumber = $(this).parent().next().next().next().text();
|
|
|
|
var lastNumber = $(this).parent().next().next().next().text();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(!$(this).val()||!CHECK.number.test($(this).val())) {
|
|
|
|
|
|
|
|
layer.msg("结算单的罚款与税率必须是数字且不能为空");
|
|
|
|
|
|
|
|
$(this).val(lastNumber);
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$(this).parent().next().next().next().text(parseFloat($(this).val()).toFixed(2));
|
|
|
|
$(this).parent().next().next().next().text(parseFloat($(this).val()).toFixed(2));
|
|
|
|
$(".sumAmount").text(($(".sumAmount").attr("data-value")-$(this).val()).toFixed(2));
|
|
|
|
$(".sumAmount").text(($(".sumAmount").attr("data-value")-$(this).val()).toFixed(2));
|
|
|
|
|
|
|
|
|
|
|
|