|
@@ -456,6 +456,7 @@
|
|
|
obj.img = img[0].src;
|
|
|
objimgs.push(obj);
|
|
|
}
|
|
|
+ //保存到一户一档
|
|
|
var strSqlTask="insert INTO HEALTH.一户一档 (ID,NAME,BODY," +
|
|
|
"REGISTERE,IDTYPE,COUNTY,COUNTYSSTRING," +
|
|
|
"MAJOR,STREET,STREETID,SENDMONTH,SENDYEAR,SENDTIME,SOURCE,SOURCESUB,NUM)" +
|
|
@@ -466,56 +467,61 @@
|
|
|
",'"+document.getElementById("select_num").value+"')";
|
|
|
new WsCommonClass("QueryDataBaseJson", ["sql"], [strSqlTask], querySuccess, "AddInfo");
|
|
|
//alert(strSqlTask)
|
|
|
- // for(i=0;i<=objimgs.length;i++){
|
|
|
- //console.log(objimgs[i].img+"===****"+objimgs[i].imge+"");
|
|
|
- if (objimgs.length == 0) {
|
|
|
- var strSql = "insert into health.巡检状态(ID,一户一档ID,状态,手机,照片1,照片2) " +
|
|
|
- "values( "+SEQ_REPORT_ID+",'" + SEQ_TASK_ID + "','" + status + "','"+localStorage.getItem("mobile")+"','','')";
|
|
|
- console.log(strSql);
|
|
|
- new WsCommonClass("QueryDataBaseJson", ["sql"], [strSql], querySuccess, "AddInfo");
|
|
|
- } else if (objimgs.length == 1) {
|
|
|
- var strSql = "insert into health.巡检状态(ID,一户一档ID,状态,手机,照片1,照片2) " +
|
|
|
- "values("+SEQ_REPORT_ID+",'" + SEQ_TASK_ID + "','" + status + "','"+localStorage.getItem("mobile")+"','" + objimgs[0].img + "','')";
|
|
|
- //alert(strSql)
|
|
|
- new WsCommonClass("QueryDataBaseJson", ["sql"], [strSql], querySuccess, "AddInfo");
|
|
|
- } else if (objimgs.length == 2) {
|
|
|
- var strSql = "insert into health.巡检状态(ID,一户一档ID,状态,手机,照片1,照片2) " +
|
|
|
- "values("+SEQ_REPORT_ID+",'" + SEQ_TASK_ID + "','" + status + "','"+localStorage.getItem("mobile")+"','" + objimgs[0].img + "','" + objimgs[1].img + "')";
|
|
|
- console.log(strSql);
|
|
|
- new WsCommonClass("QueryDataBaseJson", ["sql"], [strSql], querySuccess, "AddInfo");
|
|
|
- } else if (objimgs.length == 3) {
|
|
|
- var strSql = "insert into health.巡检状态(ID,一户一档ID,状态,手机,照片1,照片2,照片3) " +
|
|
|
- "values("+SEQ_REPORT_ID+",'" + SEQ_TASK_ID + "','" + status + "','"+localStorage.getItem("mobile")+"','" + objimgs[0].img + "','" + objimgs[1].img + "','" + objimgs[2].img + "')";
|
|
|
- console.log(strSql);
|
|
|
- new WsCommonClass("QueryDataBaseJson", ["sql"], [strSql], querySuccess, "AddInfo");
|
|
|
- }
|
|
|
- else if (objimgs.length == 4) {
|
|
|
- var strSql = "insert into health.巡检状态(ID,一户一档ID,状态,手机,照片1,照片2,照片3,照片4) " +
|
|
|
- "values("+SEQ_REPORT_ID+",'" + SEQ_TASK_ID + "','" + status + "','"+localStorage.getItem("mobile")+"','" + objimgs[0].img + "','" + objimgs[1].img + "','" + objimgs[2].img + "','" + objimgs[3].img + "')";
|
|
|
- console.log(strSql);
|
|
|
- new WsCommonClass("QueryDataBaseJson", ["sql"], [strSql], querySuccess, "AddInfo");
|
|
|
- }
|
|
|
- else if (objimgs.length == 5) {
|
|
|
- var strSql = "insert into health.巡检状态(ID,一户一档ID,状态,手机,照片1,照片2,照片3,照片4,照片5) " +
|
|
|
- "values("+SEQ_REPORT_ID+",'" + SEQ_TASK_ID + "','" + currentClickid + "','"+localStorage.getItem("mobile")+"','" + objimgs[0].img + "','" + objimgs[1].img + "','" + objimgs[2].img + "','" + objimgs[3].img + "','" + objimgs[4].img + "')";
|
|
|
- new WsCommonClass("QueryDataBaseJson", ["sql"], [strSql], querySuccess, "AddInfo");
|
|
|
- }
|
|
|
|
|
|
- var strSql1 = "insert into health.PATROLSTATUS (ID,PATROLSTATUSID" +
|
|
|
- ", DRUG,DRUGNUM,INSTRUMENT,INSTRUMENTNUM,WASTE,WASTENUM," +
|
|
|
- " LISTED,LISTEDNAME,ADLET,DENTALCHAIR,INSIDERASK,SCENEOTHER,SCENEOTHERCONTENT" +
|
|
|
- ",WHETHERINSCENE" +
|
|
|
- ",INTERNALMEDICINE,DENTAL,MEDICAKBEAUTY, MEDICINEOTHER,MEDICINEOTHERCONTENT,"+
|
|
|
- "MOVEDACCORDING,MOVEDOTHER,NOTPRACTICINGACCORDING,NOTPRACTICINGOTHER)" +
|
|
|
- "values (SEQ_TASKSTATUS_ID.NEXTVAL, "+SEQ_REPORT_ID+" " +
|
|
|
- ","+yp+",'"+document.getElementById("ypNum").value+"',"+ylqx+",'"+document.getElementById("ylqxNum").value+"'" +
|
|
|
- ","+ylfqw+",'"+document.getElementById("ylfqwNum").value+"',"+gpmc+",'"+document.getElementById("gpmcName").value+"'" +
|
|
|
- ","+xmp+","+yy+","+xwhqy+","+xcqt+",'"+document.getElementById("xcqtContent").value+"',"+medicine+","+nk+"" +
|
|
|
- ","+yk+","+ylmr+","+xyqt+",'"+document.getElementById("xyqtContent").value+"'"+
|
|
|
- ","+_yblStatus+",'"+_yblyjContent+"',"+_wzyStatus+",'"+_wzyyjContent+"')";
|
|
|
- //alert(strSql1)
|
|
|
- new WsCommonClass("QueryDataBaseJson", ["sql"], [strSql1], querySuccess, "AddInfo");
|
|
|
+ // 巡查员用户&区级管理员用户
|
|
|
+ if(role == "21" || role == "3"){
|
|
|
+ // for(i=0;i<=objimgs.length;i++){
|
|
|
+ //console.log(objimgs[i].img+"===****"+objimgs[i].imge+"");
|
|
|
+ if (objimgs.length == 0) {
|
|
|
+ var strSql = "insert into health.巡检状态(ID,一户一档ID,状态,手机,照片1,照片2) " +
|
|
|
+ "values( "+SEQ_REPORT_ID+",'" + SEQ_TASK_ID + "','" + status + "','"+localStorage.getItem("mobile")+"','','')";
|
|
|
+ console.log(strSql);
|
|
|
+ new WsCommonClass("QueryDataBaseJson", ["sql"], [strSql], querySuccess, "AddInfo");
|
|
|
+ } else if (objimgs.length == 1) {
|
|
|
+ var strSql = "insert into health.巡检状态(ID,一户一档ID,状态,手机,照片1,照片2) " +
|
|
|
+ "values("+SEQ_REPORT_ID+",'" + SEQ_TASK_ID + "','" + status + "','"+localStorage.getItem("mobile")+"','" + objimgs[0].img + "','')";
|
|
|
+ //alert(strSql)
|
|
|
+ new WsCommonClass("QueryDataBaseJson", ["sql"], [strSql], querySuccess, "AddInfo");
|
|
|
+ } else if (objimgs.length == 2) {
|
|
|
+ var strSql = "insert into health.巡检状态(ID,一户一档ID,状态,手机,照片1,照片2) " +
|
|
|
+ "values("+SEQ_REPORT_ID+",'" + SEQ_TASK_ID + "','" + status + "','"+localStorage.getItem("mobile")+"','" + objimgs[0].img + "','" + objimgs[1].img + "')";
|
|
|
+ console.log(strSql);
|
|
|
+ new WsCommonClass("QueryDataBaseJson", ["sql"], [strSql], querySuccess, "AddInfo");
|
|
|
+ } else if (objimgs.length == 3) {
|
|
|
+ var strSql = "insert into health.巡检状态(ID,一户一档ID,状态,手机,照片1,照片2,照片3) " +
|
|
|
+ "values("+SEQ_REPORT_ID+",'" + SEQ_TASK_ID + "','" + status + "','"+localStorage.getItem("mobile")+"','" + objimgs[0].img + "','" + objimgs[1].img + "','" + objimgs[2].img + "')";
|
|
|
+ console.log(strSql);
|
|
|
+ new WsCommonClass("QueryDataBaseJson", ["sql"], [strSql], querySuccess, "AddInfo");
|
|
|
+ }
|
|
|
+ else if (objimgs.length == 4) {
|
|
|
+ var strSql = "insert into health.巡检状态(ID,一户一档ID,状态,手机,照片1,照片2,照片3,照片4) " +
|
|
|
+ "values("+SEQ_REPORT_ID+",'" + SEQ_TASK_ID + "','" + status + "','"+localStorage.getItem("mobile")+"','" + objimgs[0].img + "','" + objimgs[1].img + "','" + objimgs[2].img + "','" + objimgs[3].img + "')";
|
|
|
+ console.log(strSql);
|
|
|
+ new WsCommonClass("QueryDataBaseJson", ["sql"], [strSql], querySuccess, "AddInfo");
|
|
|
+ }
|
|
|
+ else if (objimgs.length == 5) {
|
|
|
+ var strSql = "insert into health.巡检状态(ID,一户一档ID,状态,手机,照片1,照片2,照片3,照片4,照片5) " +
|
|
|
+ "values("+SEQ_REPORT_ID+",'" + SEQ_TASK_ID + "','" + currentClickid + "','"+localStorage.getItem("mobile")+"','" + objimgs[0].img + "','" + objimgs[1].img + "','" + objimgs[2].img + "','" + objimgs[3].img + "','" + objimgs[4].img + "')";
|
|
|
+ new WsCommonClass("QueryDataBaseJson", ["sql"], [strSql], querySuccess, "AddInfo");
|
|
|
+ }
|
|
|
+
|
|
|
+ var strSql1 = "insert into health.PATROLSTATUS (ID,PATROLSTATUSID" +
|
|
|
+ ", DRUG,DRUGNUM,INSTRUMENT,INSTRUMENTNUM,WASTE,WASTENUM," +
|
|
|
+ " LISTED,LISTEDNAME,ADLET,DENTALCHAIR,INSIDERASK,SCENEOTHER,SCENEOTHERCONTENT" +
|
|
|
+ ",WHETHERINSCENE" +
|
|
|
+ ",INTERNALMEDICINE,DENTAL,MEDICAKBEAUTY, MEDICINEOTHER,MEDICINEOTHERCONTENT,"+
|
|
|
+ "MOVEDACCORDING,MOVEDOTHER,NOTPRACTICINGACCORDING,NOTPRACTICINGOTHER)" +
|
|
|
+ "values (SEQ_TASKSTATUS_ID.NEXTVAL, "+SEQ_REPORT_ID+" " +
|
|
|
+ ","+yp+",'"+document.getElementById("ypNum").value+"',"+ylqx+",'"+document.getElementById("ylqxNum").value+"'" +
|
|
|
+ ","+ylfqw+",'"+document.getElementById("ylfqwNum").value+"',"+gpmc+",'"+document.getElementById("gpmcName").value+"'" +
|
|
|
+ ","+xmp+","+yy+","+xwhqy+","+xcqt+",'"+document.getElementById("xcqtContent").value+"',"+medicine+","+nk+"" +
|
|
|
+ ","+yk+","+ylmr+","+xyqt+",'"+document.getElementById("xyqtContent").value+"'"+
|
|
|
+ ","+_yblStatus+",'"+_yblyjContent+"',"+_wzyStatus+",'"+_wzyyjContent+"')";
|
|
|
+ //alert(strSql1)
|
|
|
+ new WsCommonClass("QueryDataBaseJson", ["sql"], [strSql1], querySuccess, "AddInfo");
|
|
|
+ }
|
|
|
}else{
|
|
|
+ //保存到一户一档
|
|
|
var strSqlTask="insert INTO HEALTH.一户一档 (ID,NAME,BODY," +
|
|
|
"REGISTERE,IDTYPE,COUNTY,COUNTYSSTRING," +
|
|
|
"MAJOR,STREET,STREETID,SENDMONTH,SENDYEAR,SENDTIME,SOURCE,SOURCESUB,NUM)" +
|
|
@@ -526,25 +532,29 @@
|
|
|
",'"+document.getElementById("select_num").value+"')";
|
|
|
new WsCommonClass("QueryDataBaseJson", ["sql"], [strSqlTask], querySuccess, "AddInfo");
|
|
|
//alert(strSqlTask)
|
|
|
- var strSql = "insert into 巡检状态(ID,一户一档ID,状态,手机,照片1,照片2 ) " +
|
|
|
- "values("+SEQ_REPORT_ID+",'" + SEQ_TASK_ID + "','" + status + "','"+localStorage.getItem("mobile")+"','','')";
|
|
|
- //new WsCommonClass("QueryDataBaseJson", ["sql"], [strSql], querySuccess, "queryUser");
|
|
|
- var strSql1 = "insert into health.PATROLSTATUS (ID,PATROLSTATUSID" +
|
|
|
- ", DRUG,DRUGNUM,INSTRUMENT,INSTRUMENTNUM,WASTE,WASTENUM," +
|
|
|
- " LISTED,LISTEDNAME,ADLET,DENTALCHAIR,INSIDERASK,SCENEOTHER,SCENEOTHERCONTENT" +
|
|
|
- ",WHETHERINSCENE" +
|
|
|
- ",INTERNALMEDICINE,DENTAL,MEDICAKBEAUTY, MEDICINEOTHER,MEDICINEOTHERCONTENT,"+
|
|
|
- "MOVEDACCORDING,MOVEDOTHER,NOTPRACTICINGACCORDING,NOTPRACTICINGOTHER)" +
|
|
|
- "values (seq_taskstatus_id.nextval,"+SEQ_REPORT_ID+"" +
|
|
|
- ","+yp+",'"+document.getElementById("ypNum").value+"',"+ylqx+",'"+document.getElementById("ylqxNum").value+"'" +
|
|
|
- ","+ylfqw+",'"+document.getElementById("ylfqwNum").value+"',"+gpmc+",'"+document.getElementById("gpmcName").value+"'" +
|
|
|
- ","+xmp+","+yy+","+xwhqy+","+xcqt+",'"+document.getElementById("xcqtContent").value+"',"+medicine+","+nk+"" +
|
|
|
- ","+yk+","+ylmr+","+xyqt+",'"+document.getElementById("xyqtContent").value+"'"+
|
|
|
- ","+_yblStatus+",'"+_yblyjContent+"',"+_wzyStatus+",'"+_wzyyjContent+"')";
|
|
|
- //alert(strSql)
|
|
|
- //alert(strSql1)
|
|
|
- new WsCommonClass("QueryDataBaseJson", ["sql"], [strSql], querySuccess, "AddInfo");
|
|
|
- new WsCommonClass("QueryDataBaseJson", ["sql"], [strSql1], querySuccess, "AddInfo");
|
|
|
+
|
|
|
+ // 巡查员用户&区级管理员用户
|
|
|
+ if(role == "21" || role == "3"){
|
|
|
+ var strSql = "insert into 巡检状态(ID,一户一档ID,状态,手机,照片1,照片2 ) " +
|
|
|
+ "values("+SEQ_REPORT_ID+",'" + SEQ_TASK_ID + "','" + status + "','"+localStorage.getItem("mobile")+"','','')";
|
|
|
+ //new WsCommonClass("QueryDataBaseJson", ["sql"], [strSql], querySuccess, "queryUser");
|
|
|
+ var strSql1 = "insert into health.PATROLSTATUS (ID,PATROLSTATUSID" +
|
|
|
+ ", DRUG,DRUGNUM,INSTRUMENT,INSTRUMENTNUM,WASTE,WASTENUM," +
|
|
|
+ " LISTED,LISTEDNAME,ADLET,DENTALCHAIR,INSIDERASK,SCENEOTHER,SCENEOTHERCONTENT" +
|
|
|
+ ",WHETHERINSCENE" +
|
|
|
+ ",INTERNALMEDICINE,DENTAL,MEDICAKBEAUTY, MEDICINEOTHER,MEDICINEOTHERCONTENT,"+
|
|
|
+ "MOVEDACCORDING,MOVEDOTHER,NOTPRACTICINGACCORDING,NOTPRACTICINGOTHER)" +
|
|
|
+ "values (seq_taskstatus_id.nextval,"+SEQ_REPORT_ID+"" +
|
|
|
+ ","+yp+",'"+document.getElementById("ypNum").value+"',"+ylqx+",'"+document.getElementById("ylqxNum").value+"'" +
|
|
|
+ ","+ylfqw+",'"+document.getElementById("ylfqwNum").value+"',"+gpmc+",'"+document.getElementById("gpmcName").value+"'" +
|
|
|
+ ","+xmp+","+yy+","+xwhqy+","+xcqt+",'"+document.getElementById("xcqtContent").value+"',"+medicine+","+nk+"" +
|
|
|
+ ","+yk+","+ylmr+","+xyqt+",'"+document.getElementById("xyqtContent").value+"'"+
|
|
|
+ ","+_yblStatus+",'"+_yblyjContent+"',"+_wzyStatus+",'"+_wzyyjContent+"')";
|
|
|
+ //alert(strSql)
|
|
|
+ //alert(strSql1)
|
|
|
+ new WsCommonClass("QueryDataBaseJson", ["sql"], [strSql], querySuccess, "AddInfo");
|
|
|
+ new WsCommonClass("QueryDataBaseJson", ["sql"], [strSql1], querySuccess, "AddInfo");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
var address;
|