Merge branch 'release' into dev

master
zhengchanglong 5 years ago
commit 9961448831

@ -223,9 +223,9 @@
</div> </div>
<div class="page"> <div class="page">
<if condition="$is_admin eq true "> <!-- <if condition="$is_admin eq true ">
<a class="sch-btn" href="{:U('Export/promote_list',array_merge(['xlsname'=>'推广员管理_推广员列表'.((I('type',1)==2)?'_混服申请':'_推广员列表')],I('get.')))}">导出</a> <a class="sch-btn" href="{:U('Export/promote_list',array_merge(['xlsname'=>'推广员管理_推广员列表'.((I('type',1)==2)?'_混服申请':'_推广员列表')],I('get.')))}">导出</a>
</if> </if>-->
{$_page|default=''} {$_page|default=''}
</div> </div>

@ -200,6 +200,14 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
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}$/
}
var queryData = []; var queryData = [];
var statement = []; var statement = [];
var key = 0; var key = 0;
@ -464,6 +472,12 @@
function eventnew(){ function eventnew(){
$(".tax").off("blur"); $(".tax").off("blur");
$(".tax").on("blur", function() { $(".tax").on("blur", function() {
if (!CHECK.number.test($(this).val())) {
layer.msg("结算单的罚款与税率必须是数字且不能为空");
$(this).val('0');
}
var lastNum = (parseFloat($(this).parent().next().text())).toFixed(2); var lastNum = (parseFloat($(this).parent().next().text())).toFixed(2);
$(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);
@ -473,8 +487,15 @@
$(".forfeit").off("blur"); $(".forfeit").off("blur");
$(".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()); $(".sumAmount").text($(".sumAmount").attr("data-value")-$(this).val());

@ -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));

Loading…
Cancel
Save