Commit 3896d798 authored by youjie's avatar youjie

no message

parent 80c983e0
...@@ -157,6 +157,15 @@ ...@@ -157,6 +157,15 @@
getTextarea() getTextarea()
var postMsg = []; var postMsg = [];
if (dataList && dataList.length > 0) { if (dataList && dataList.length > 0) {
for(let i=0;i<dataList.length;i++){
if(dataList[i].SurveyType==2||dataList[i].SurveyType==3){
let filter = dataList[i].SurveyOptionsList.filter(x=> {return x.IsCheck=='1'})
if(filter.length==0){
layer.msg("请选择"+dataList[i].Title)
return
}
}
}
dataList.forEach(item => { dataList.forEach(item => {
if(localStorage.TakeoutVersion==1){ if(localStorage.TakeoutVersion==1){
item.c = newMsg.c item.c = newMsg.c
...@@ -173,7 +182,6 @@ ...@@ -173,7 +182,6 @@
if (item.SurveyType == 2) { if (item.SurveyType == 2) {
if (item.ScoreNum == y.ID) { if (item.ScoreNum == y.ID) {
y.IsCheck = "1"; y.IsCheck = "1";
item.ScoreNum = 0;
}else{ }else{
y.IsCheck = "0"; y.IsCheck = "0";
} }
...@@ -187,22 +195,19 @@ ...@@ -187,22 +195,19 @@
} }
} }
}) })
// item.ScoreNum = 0;
} }
postMsg.push(item); postMsg.push(item);
}) })
} }
for(let i=0;i<dataList.length;i++){
if(dataList[i].SurveyType==2||dataList[i].SurveyType==3){ postMsg.forEach(item=>{
let filter = dataList[i].SurveyOptionsList.filter(x=> {return x.IsCheck=='0'}) if(item.SurveyType==2||item.SurveyType==3){
console.log(filter,'----------') item.ScoreNum = 0
if(filter.length==0){
layer.msg("请选择"+dataList[i].Title)
return
}
} }
} })
$('#submitB').attr('disabled', true) $('#submitB').attr('disabled', true)
$.ajax({ $.ajax({
type: "POST", type: "POST",
......
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