Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
77a2c2a7
Commit
77a2c2a7
authored
Nov 27, 2017
by
季圣华
Browse files
单据数据不全的时候增加提示
parent
e6a74500
Changes
1
Show whitespace changes
Inline
Side-by-side
src/main/webapp/js/pages/materials/in_out.js
View file @
77a2c2a7
...
@@ -2121,11 +2121,11 @@
...
@@ -2121,11 +2121,11 @@
if(depotHeadID ==0)
if(depotHeadID ==0)
{
{
getMaxId(); //查找最大的Id
getMaxId(); //查找最大的Id
accept(depotHeadMaxId,closeDialog); //新增
accept(depotHeadMaxId,closeDialog
,"add"
); //新增
}
}
else
else
{
{
accept(depotHeadID,closeDialog); //修改
accept(depotHeadID,closeDialog
,"edit"
); //修改
}
}
}
}
else
else
...
@@ -2873,9 +2873,13 @@
...
@@ -2873,9 +2873,13 @@
//判断
//判断
function CheckData() {
function CheckData() {
var row = $('#materialData').datagrid('getRows');
var row = $('#materialData').datagrid('getRows');
if(!row.length){
$.messager.alert('提示',"请输入明细信息!",'info');
return false;
}
var totalRowNum = "";
var totalRowNum = "";
for (var i = 0; i < row.length; i++) {
for (var i = 0; i < row.length; i++) {
if (row[i].MaterialId == "" || row[i].OperNumber == "" || row[i].UnitPrice === "" || row[i].AllPrice === "") {
if (
row[i].DepotId == "" ||
row[i].MaterialId == "" || row[i].OperNumber == "" || row[i].UnitPrice === "" || row[i].AllPrice === "") {
totalRowNum += (i + 1) + "、";
totalRowNum += (i + 1) + "、";
}
}
}
}
...
@@ -2887,10 +2891,15 @@
...
@@ -2887,10 +2891,15 @@
return true;
return true;
}
}
//保存
//保存
function accept(accepId,fun) {
function accept(accepId,fun
,type
) {
append();
append();
removeit();
removeit();
if ($("#materialData").datagrid('getChanges').length) {
var change = $('#materialData').datagrid('getChanges').length;
if(type =="add" && !change) {
$.messager.alert('提示','请输入明细信息!','warning');
return;
}
if (change) {
if (!CheckData()) {
if (!CheckData()) {
return;
return;
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment