Commit 3c5481cb by liuyang

2024-09-20

1、提交或者审核需要校验是否提交
parent 69a323fb
...@@ -275,7 +275,11 @@ function submitFunc() { ...@@ -275,7 +275,11 @@ function submitFunc() {
return; return;
} }
var flag = true; var flag = true;
rows.forEach(function (row) { rows.forEach(function (index,row) {
if (isBlank(row.id)){
message("选中的第"+(index+1)+"行未保存的数据,请先保存!");
flag = false;
}
if (row.reviewStatus == "3") { if (row.reviewStatus == "3") {
message("勾选的数据中有已经提交的合同!"); message("勾选的数据中有已经提交的合同!");
flag = false; flag = false;
......
...@@ -110,7 +110,7 @@ function saveFunc() { ...@@ -110,7 +110,7 @@ function saveFunc() {
return; return;
} }
let flag = true; let flag = true;
$.each(rows, function(index, item) { $.each(rows, function(item,index) {
let projCode= item.get("projCode"); let projCode= item.get("projCode");
let contractContent= item.get("contractContent"); let contractContent= item.get("contractContent");
let totalContractPriceIncluding= item.get("totalContractPriceIncluding"); let totalContractPriceIncluding= item.get("totalContractPriceIncluding");
...@@ -234,7 +234,11 @@ function submitFunc() { ...@@ -234,7 +234,11 @@ function submitFunc() {
return; return;
} }
var flag = true; var flag = true;
rows.forEach(function (row) { rows.forEach(function (row,index) {
if (isBlank(row.id)){
message("选中的第"+(index+1)+"行未保存的数据,请先保存!");
flag = false;
}
if (row.reviewStatus == "3") { if (row.reviewStatus == "3") {
message("勾选的数据中有已经提交的合同!"); message("勾选的数据中有已经提交的合同!");
flag = false; flag = false;
......
...@@ -286,13 +286,17 @@ function submitFunc() { ...@@ -286,13 +286,17 @@ function submitFunc() {
return; return;
} }
var flag = true; var flag = true;
rows.forEach(function (row) { rows.forEach(function (row,index) {
if (isBlank(row.id)){
message("选中的第"+(index+1)+"行未保存的数据,请先保存!");
flag = false;
}
if (isBlank(row.billTybe)) { if (isBlank(row.billTybe)) {
message("勾选的数据中未选择票据类型!"); message("选中的第"+(index+1)+"行未选择票据类型!");
flag = false; flag = false;
} }
if (row.reviewStatus == "3") { if (row.reviewStatus == "3") {
message("勾选的数据中有已经提交的合同!"); message("选中的第"+(index+1)+"行已经提交的合同!");
flag = false; flag = false;
} }
}) })
......
...@@ -170,7 +170,11 @@ function submitFunc() { ...@@ -170,7 +170,11 @@ function submitFunc() {
return; return;
} }
var flag = true; var flag = true;
rows.forEach(function (row) { rows.forEach(function (row,index) {
if (isBlank(row.id)){
message("选中的第"+(index+1)+"行未保存的数据,请先保存!");
flag = false;
}
if (row.cancelStatus == "1") { if (row.cancelStatus == "1") {
message("勾选的数据中有未核销的单据!"); message("勾选的数据中有未核销的单据!");
flag = false; flag = false;
...@@ -223,7 +227,11 @@ function writeoffFunc() { ...@@ -223,7 +227,11 @@ function writeoffFunc() {
return; return;
} }
var flag = true; var flag = true;
rows.forEach(function (row) { rows.forEach(function (row,index) {
if (isBlank(row.id)){
message("选中的第"+(index+1)+"行未保存的数据,请先保存!");
flag = false;
}
if (row.cancelStatus == "2") { if (row.cancelStatus == "2") {
message("勾选的数据中有已经核销的单据!"); message("勾选的数据中有已经核销的单据!");
flag = false; flag = false;
......
...@@ -40,7 +40,8 @@ $(function() { ...@@ -40,7 +40,8 @@ $(function() {
} }
return dataItem["companyCode"]; return dataItem["companyCode"];
} }
}, { },
{
field: "projCode", field: "projCode",
filter:function (option) { filter:function (option) {
let companyCode = option.model["companyCode"]; let companyCode = option.model["companyCode"];
...@@ -226,12 +227,16 @@ function submitFunc() { ...@@ -226,12 +227,16 @@ function submitFunc() {
return; return;
} }
var flag = true; var flag = true;
rows.forEach(function (row) { rows.forEach(function (row,index) {
/* if (row.cancelStatus == "1") { /* if (row.cancelStatus == "1") {
message("勾选的数据中有未核销的单据!"); message("勾选的数据中有未核销的单据!");
flag = false; flag = false;
return; return;
}*/ }*/
if (isBlank(row.id)){
message("选中的第"+(index+1)+"行未保存的数据,请先保存!");
flag = false;
}
if (row.reviewStatus == "3") { if (row.reviewStatus == "3") {
message("勾选的数据中有已经提交的单据!"); message("勾选的数据中有已经提交的单据!");
flag = false; flag = false;
...@@ -279,7 +284,11 @@ function writeoffFunc() { ...@@ -279,7 +284,11 @@ function writeoffFunc() {
return; return;
} }
var flag = true; var flag = true;
rows.forEach(function (row) { rows.forEach(function (row,index) {
if (isBlank(row.id)){
message("选中的第"+(index+1)+"行未保存的数据,请先保存!");
flag = false;
}
if (row.cancelStatus == "2") { if (row.cancelStatus == "2") {
message("勾选的数据中有已经核销的单据!"); message("勾选的数据中有已经核销的单据!");
flag = false; flag = false;
......
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