解决条码长度超长的问题

This commit is contained in:
季圣华
2020-02-18 23:26:44 +08:00
parent ebc637fe72
commit d23f1f4117
6 changed files with 34 additions and 65 deletions

View File

@@ -1606,6 +1606,7 @@
function CheckData() {
var row = $('#materialExtendData').datagrid('getRows');
var totalRowNum = "";
var totalBarCodeOverNum = "";
for (var i = 0; i < row.length; i++) {
if (row[i].BarCode == "") {
totalRowNum += (i + 1) + "";
@@ -1613,12 +1614,20 @@
if (row[i].CommodityUnit == "") {
totalRowNum += (i + 1) + "";
}
if (row[i].BarCode.length > 15) {
totalBarCodeOverNum += (i + 1) + "";
}
}
if (totalRowNum != "") {
var totalRowNum = totalRowNum.substring(0, totalRowNum.length - 1);
$.messager.alert('提示',"" + totalRowNum + "行数据填写不完整",'info');
return false;
}
if (totalBarCodeOverNum != "") {
var totalBarCodeOverNum = totalBarCodeOverNum.substring(0, totalBarCodeOverNum.length - 1);
$.messager.alert('提示',"" + totalBarCodeOverNum + "行条码长度超过15位",'info');
return false;
}
return true;
}