|
@@ -20,11 +20,23 @@ Page({
|
|
|
});
|
|
|
},
|
|
|
dailytasksdeit(){
|
|
|
- request.httpServicePost(apiUrl.insertNewservantappletservicePath,{servantlist:this.servantlist}).then(data=>{
|
|
|
- console.log(data);
|
|
|
- this.setData({
|
|
|
- servantlist: data
|
|
|
- });
|
|
|
+ let employRelationNo = app.globalData.employRelationNo;
|
|
|
+ let servantselectedlist=[];
|
|
|
+ for(let i=0;i<this.servantlist.length;i++){
|
|
|
+ for(let j=0;j<this.servantlist[i].subjectList.length;j++){
|
|
|
+ let answerstr='';
|
|
|
+ for(let t=0;t<this.servantlist[i].subjectList[j].answer.length;t++){
|
|
|
+ if(this.servantlist[i].subjectList[j].answer[t].isChoose){
|
|
|
+ answerstr+=this.servantlist[i].subjectList[j].answer[t].answer+',';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ servantselectedlist.push({answer: [answerstr],customAnswer: this.servantlist[i].subjectList[j].subject,subjectId: this.servantlist[i].subjectList[j].subjectId});
|
|
|
+ }
|
|
|
+ }
|
|
|
+ request.httpServicePost(apiUrl.insertNewservantappletservicePath,{employRelationNo:employRelationNo,subjectList:servantselectedlist,subjectType:"SN000002"}).then(data=>{
|
|
|
+ alert(data);
|
|
|
});
|
|
|
},
|
|
|
});
|
|
|
+
|
|
|
+
|