Commit 19c66045 by liuyang

优化销售开票选择任务添加金额校验

parent 77be3f11
......@@ -81,11 +81,17 @@ function saveFunc() {
let flag = true;
$.each(rows, function(index, item) {
let reviewStatus= item.get("reviewStatus");
let thisAmount= item.get("thisAmount");
if((reviewStatus === "1")){
message("数据已审核");
flag = false;
return false;
}
if (!isNumber(thisAmount) && !isPositiveNumber(thisAmount)) {
message("勾选的第" + (index + 1) + "行本次收票金额必须是大于0的数字");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
......
......@@ -56,7 +56,7 @@
data-errorprompt="请输入数字,该值最大可设置15位整数和2位小数!"/>
<EF:EFColumn ename="thisPriceTax" cname="结算含税金额" enable="false" hidden="false" format="{0:N2}" align="right"/>
<EF:EFColumn ename="thisAmount" cname="本次开票金额" width="120" enable="true" readonly="false" format="{0:N2}" editType="text"
displayType="0.00" sort="true" align="right" maxLength="15" required="false"
displayType="0.00" sort="true" align="right" maxLength="15" required="true"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,2})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和2位小数!"/>
<EF:EFColumn ename="remainingAmount" cname="剩余开票金额" width="120" enable="false" format="{0:N2}" editType="text"
......
......@@ -57,11 +57,17 @@ function saveFunc() {
let flag = true;
$.each(rows, function(index, item) {
let reviewStatus= item.get("reviewStatus");
let thisAmount= item.get("thisAmount");
if((reviewStatus === "1")){
message("数据已审核");
flag = false;
return false;
}
if (!isNumber(thisAmount) && !isPositiveNumber(thisAmount)) {
message("勾选的第" + (index + 1) + "行本次收票金额必须是大于0的数字");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
......
......@@ -69,7 +69,7 @@
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,2})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和2位小数!"/>
<EF:EFColumn ename="thisAmount" cname="本次开票金额" width="120" enable="true" readonly="false" format="{0:N2}" editType="text"
displayType="0.00" sort="true" align="right" maxLength="15" required="false"
displayType="0.00" sort="true" align="right" maxLength="15" required="true"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,2})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和2位小数!"/>
<EF:EFColumn ename="remainingAmount" cname="剩余开票金额" width="120" enable="false" format="{0:N2}" editType="text"
......
......@@ -57,11 +57,17 @@ function saveFunc() {
let flag = true;
$.each(rows, function(index, item) {
let reviewStatus= item.get("reviewStatus");
let thisAmount= item.get("thisAmount");
if((reviewStatus === "1")){
message("数据已审核");
flag = false;
return false;
}
if (!isNumber(thisAmount) && !isPositiveNumber(thisAmount)) {
message("勾选的第" + (index + 1) + "行本次收票金额必须是大于0的数字");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
......
......@@ -63,7 +63,7 @@
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,2})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和2位小数!"/>
<EF:EFColumn ename="thisAmount" cname="本次开票金额" width="120" enable="true" readonly="false" format="{0:N2}" editType="text"
displayType="0.00" sort="true" align="right" maxLength="15" required="false"
displayType="0.00" sort="true" align="right" maxLength="15" required="true"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,2})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和2位小数!"/>
<EF:EFColumn ename="remainingAmount" cname="剩余开票金额" width="120" enable="false" format="{0:N2}" editType="text"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment