approve.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title></title>
  6. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  7. <link href="css/mui.css" rel="stylesheet" />
  8. <script src="assets/js/jquery-3.1.0.js"></script>
  9. <script src="assets/js/jquery.base64.js"></script>
  10. <script src="CommonJS/Config_JS/Config_Load.js"></script>
  11. <script src="CommonJS/DBUtil_JS/WsCommonClassJava.js"></script>
  12. <script src="CommonJS/Data_ProcessJS/CommonData.js"></script>
  13. <script src="CommonJS/HTML_ElementCommonJS/Select_Common.js"></script>
  14. <script src="js/mui.js"></script>
  15. <script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>
  16. <script src="js/recordAction.js"></script>
  17. <script src="js/mui.min.js"></script>
  18. <!--<script src="js/jquery.min.js"></script>-->
  19. <!-- <script src="js/uploadImgs.js"></script> -->
  20. <script src="js/promptAndAlert.js"></script>
  21. <script src="js/fileImg.js"></script>
  22. <style>
  23. <script type="text/javascript">
  24. mui.init()
  25. </script>
  26. <style>
  27. * {
  28. margin: 0;
  29. padding: 0;
  30. }
  31. html,
  32. body {
  33. width: 100%;
  34. height: 100%;
  35. overflow: hidden;
  36. }
  37. .logon_bg{
  38. position: absolute;
  39. width:100%;
  40. bottom: 0;
  41. }
  42. .bak{
  43. width: 100%;
  44. height: 100%;
  45. }
  46. .mainDiv{
  47. top: 0;
  48. position: absolute;
  49. width: 100%;
  50. height: 100%;
  51. margin-top: 2.375rem;
  52. }
  53. .dynamic_images ul {
  54. margin: 0;
  55. padding: 0;
  56. }
  57. .dynamic_images ul li {
  58. position: relative;
  59. display: inline-block;
  60. margin-top: 10px;
  61. margin-bottom: 10px;
  62. margin-right: 5px;
  63. margin-left: 10px;
  64. float: left;
  65. list-style: none;
  66. }
  67. .dynamic_images ul li img {
  68. width: 50px;
  69. height: 50px;
  70. border-radius: 5px;
  71. }
  72. .del {
  73. display: inline-block;
  74. position: absolute;
  75. top:6px;
  76. right: 0px;
  77. width: 12px;
  78. height: 2px;
  79. background: #ED544D;
  80. line-height: 0;
  81. font-size: 0;
  82. vertical-align: middle;
  83. -webkit-transform: rotate(45deg);
  84. }
  85. .del:after {
  86. content: "/";
  87. display: block;
  88. width: 12px;
  89. height: 2px;
  90. background: #ED544D;
  91. -webkit-transform: rotate(-90deg);
  92. }
  93. #showimg{
  94. width: 60px;
  95. height: 50px;
  96. margin: auto auto;
  97. display: table-cell;
  98. vertical-align: middle;
  99. text-align: center;
  100. margin-top: 13%;
  101. }
  102. .image-upload > input
  103. {
  104. display: none;
  105. }
  106. .image-uploads > input
  107. {
  108. display: none;
  109. }
  110. </style>
  111. <script>
  112. mui.init({
  113. swipeBack:true //启用右滑关闭功能
  114. });
  115. $(document).on("click", '#mainpage', function() {
  116. window.location="main.html?date="+getDateStr() ;
  117. });
  118. $(document).on("click", '#addpage', function() {
  119. // mui.alert('模块更新中 敬请期待!!!', '系统提示', function() {});
  120. window.location="add.html?date="+getDateStr();
  121. });
  122. $(document).on("click", '#back', function() {
  123. window.location="main.html?date="+getDateStr() ;
  124. });
  125. $(document).on("click", '#exit', function() {
  126. var btnArray = ['否', '是'];
  127. mui.confirm('是否确认退出登录?', '系统提示', btnArray, function(e) {
  128. if (e.index == 1) {
  129. window.location="login.html";
  130. } else {
  131. }
  132. })
  133. });
  134. // $(document).on("click", '#back', function() {
  135. // window.location="main.html";
  136. // });
  137. var idcard;
  138. var caseid;
  139. window.onload = function initInfo(){
  140. var name = localStorage.getItem("name");
  141. idcard = localStorage.getItem("idcard");
  142. var address = localStorage.getItem("address");
  143. caseid = localStorage.getItem("caseid");
  144. console.log(caseid+"***")
  145. var sex = localStorage.getItem("sex");
  146. var major = localStorage.getItem("major");
  147. $("#txt_name").val(name);
  148. // $('#checkUserName').attr("val ue",sessionUser.name);
  149. $("#txt_idcard").val(idcard);
  150. $("#txt_add").val(address);
  151. if(sex=='0'){
  152. $("#txt_sex").val('男');
  153. }else if(sex=='1'){
  154. $("#txt_sex").val('女');
  155. }else{
  156. $("#txt_sex").val('无');
  157. }
  158. $("#txt_major").val(major);
  159. // loadMajor();
  160. }
  161. // 1 1 营业中
  162. // 4 4 未营业
  163. // 2 2 已搬离
  164. // 3 3 待确定
  165. var currentClickid ;
  166. var uploadobj;
  167. var bz;
  168. function updateDb(state){
  169. currentClickid = state;
  170. determineSubmit();
  171. //uploadPicture();
  172. }
  173. function commitok(){
  174. document.getElementById("syyalertDiv").remove();
  175. try{
  176. document.getElementById("alertDiv").style.display ="";
  177. }catch{}
  178. }
  179. function commitButton() {
  180. var inputsj=document.getElementById("syyInput").value;
  181. if(inputsj==""){
  182. alerts('输入手机号为空!请重新提交',commitok)
  183. }else if(inputsj.length!=11){
  184. alerts("手机号不正确!请重新提交",commitok)
  185. }else{
  186. var objimgs=eval(uploadobj);
  187. if(objimgs.length>0 || objimgs.length!=null || objimgs.length!=""){
  188. // for(i=0;i<=objimgs.length;i++){
  189. //console.log(objimgs[i].img+"===****"+objimgs[i].imge+"");
  190. if(objimgs.length==0){
  191. var strSql = "insert into 巡检状态(一户一档ID,状态,手机,照片1,照片2) values('"+caseid+"','"+currentClickid+"','"+inputsj+"','','')";
  192. new WsCommonClass("QueryDataBaseJson",["sql"],[strSql],querySuccess,"queryUser");
  193. }else if(objimgs.length==1){
  194. var strSql = "insert into 巡检状态(一户一档ID,状态,手机,照片1,照片2) values('"+caseid+"','"+currentClickid+"','"+inputsj+"','"+objimgs[0].img+"','')";
  195. console.log(strSql)
  196. new WsCommonClass("QueryDataBaseJson",["sql"],[strSql],querySuccess,"queryUser");
  197. }else if(objimgs.length==2){
  198. var strSql = "insert into 巡检状态(一户一档ID,状态,手机,照片1,照片2) values('"+caseid+"','"+currentClickid+"','"+inputsj+"','"+objimgs[0].img+"','"+objimgs[1].img+"')";
  199. console.log(strSql)
  200. new WsCommonClass("QueryDataBaseJson",["sql"],[strSql],querySuccess,"queryUser");
  201. }else if(objimgs.length==3){
  202. var strSql = "insert into 巡检状态(一户一档ID,状态,手机,照片1,照片2,照片3) values('"+caseid+"','"+currentClickid+"','"+inputsj+"','"+objimgs[0].img+"','"+objimgs[1].img+"','"+objimgs[2].img+"')";
  203. console.log(strSql)
  204. new WsCommonClass("QueryDataBaseJson",["sql"],[strSql],querySuccess,"queryUser");
  205. }
  206. //}
  207. }else{
  208. alerts('您还没点击上传图片,请先上传图片',commitok);
  209. }
  210. }
  211. }
  212. function closefun() {
  213. document.getElementById("alertDiv").remove();
  214. }
  215. function applyToDB(){
  216. var state = currentClickid;
  217. //bz=$('#txt_bz').val();
  218. var alertInfo = "是否确认更改为营业中状态?";
  219. switch (state){
  220. case 1:
  221. alertInfo = "是否确认更改为营业中状态?\n确认请输入手机号提交";
  222. break;
  223. case 4:
  224. alertInfo = "是否确认更改未营业状态?";
  225. break;
  226. case 2:
  227. alertInfo = "是否确认更改为已搬离状态?";
  228. break;
  229. case 3:
  230. alertInfo = "是否确认更改为待确定状态?";
  231. break;
  232. }
  233. // var btnArray = ['否', '是'];
  234. // mui.confirm(alertInfo, '系统提示', btnArray, function(e) {
  235. // if (e.index == 1) {
  236. // var strSql = "insert into 巡检状态(一户一档ID,状态) values('"+caseid+"','"+state+"')";
  237. // new WsCommonClass("QueryDataBaseJson",["sql"],[strSql],querySuccess,"queryUser");
  238. // } else {
  239. // return;
  240. // }
  241. // });
  242. uploadobj = localStorage.getItem("datas");
  243. uploadobj=JSON.parse(uploadobj);
  244. var btnArray = ['确定', '取消'];
  245. prompts(alertInfo,'',commitButton,closefun,'prompt')
  246. /* mui.prompt(alertInfo, '请输入手机号码', '系统提示', btnArray, function(e) {
  247. if (e.index == 0) {
  248. if(e.value == ""){
  249. mui.alert('输入手机号为空!\n请重新提交', '系统提示', function() {
  250. });
  251. }else if(e.value.length != 11){
  252. mui.alert('手机号不正确!\n请重新提交', '系统提示', function() {
  253. });
  254. }else{
  255. var objimgs=eval(uploadobj);
  256. if(objimgs.length>0 || objimgs.length!=null || objimgs.length!=""){
  257. // for(i=0;i<=objimgs.length;i++){
  258. //console.log(objimgs[i].img+"===****"+objimgs[i].imge+"");
  259. if(objimgs.length==0){
  260. var strSql = "insert into 巡检状态(一户一档ID,状态,手机,备注,照片1,照片2) values('"+caseid+"','"+state+"','"+e.value+"','"+bz+"','','')";
  261. //console.log(strSql)
  262. new WsCommonClassSP("QueryDataBase",["sql"],[strSql],querySuccess,"queryUser");
  263. }else if(objimgs.length==1){
  264. var strSql = "insert into 巡检状态(一户一档ID,状态,手机,备注,照片1,照片2) values('"+caseid+"','"+state+"','"+e.value+"','"+bz+"','"+objimgs[0].img+"','')";
  265. //console.log(strSql)
  266. new WsCommonClassSP("QueryDataBase",["sql"],[strSql],querySuccess,"queryUser");
  267. }else if(objimgs.length==2){
  268. var strSql = "insert into 巡检状态(一户一档ID,状态,手机,备注,照片1,照片2) values('"+caseid+"','"+state+"','"+e.value+"','"+bz+"','"+objimgs[0].img+"','"+objimgs[1].img+"')";
  269. //console.log(strSql)
  270. new WsCommonClassSP("QueryDataBase",["sql"],[strSql],querySuccess,"queryUser");
  271. }else if(objimgs.length==3){
  272. var strSql = "insert into 巡检状态(一户一档ID,状态,手机,备注,照片1,照片2,照片3) values('"+caseid+"','"+state+"','"+e.value+"','"+bz+"','"+objimgs[0].img+"','"+objimgs[1].img+"','"+objimgs[2].img+"')";
  273. //console.log(strSql)
  274. new WsCommonClassSP("QueryDataBase",["sql"],[strSql],querySuccess,"queryUser");
  275. }
  276. // }
  277. }else{
  278. plus.nativeUI.alert('您还没点击上传图片,请先上传图片');
  279. }
  280. }
  281. } else {
  282. }
  283. }) */
  284. }
  285. function querySuccess(evt){
  286. /* var result = evt.substr(76,evtlength);
  287. var evtlength = evt.length-85;
  288. result = result.substr(0,evtlength);
  289. var jsonData = JSON.parse(result); */
  290. // var jsonObj = JSON.parse(evt)
  291. // var jsonData = jsonObj[0].data;
  292. // if(jsonData != null){
  293. mui.toast("状态更新成功");
  294. window.location="main.html?date="+getDateStr();
  295. // }
  296. insertActionRecord('用户操作更新状态');
  297. }
  298. function loadMajor() {
  299. var strSql = "select t.编码 as code,t.名称 as name,t.备注 as memo from view_编码表无证对象专业 t order by code";
  300. new WsCommonClass("QueryDataBaseJson", ["sql"], [strSql], querySuccesse, "loadMajor");
  301. }
  302. // function querySuccesse(evt, keyvalue) {
  303. // var result = evt.substr(76, evtlength);
  304. // var evtlength = evt.length - 85;
  305. // result = result.substr(0, evtlength);
  306. // // var jsonData = JSON.parse(result);
  307. // if (keyvalue == "AddInfo") {
  308. // insertActionRecord('用户操作新增排查点');
  309. // mui.toast("新增排查点成功!");
  310. // window.location = "main.html?date=" + getDateStr();
  311. // return;
  312. // }
  313. // var jsonObj = JSON.parse(result)
  314. // var jsonData = jsonObj[0].data;
  315. // if (jsonData != null) {
  316. // switch (keyvalue) {
  317. // case "loadMajor":
  318. // Select_DyCreate("select_major", jsonData, "code", "name",true);
  319. // break;
  320. // }
  321. // }
  322. // }
  323. function querySuccesse(evt, keyvalue) {
  324. // var result = evt.substr(76, evtlength);
  325. // var evtlength = evt.length - 85;
  326. // result = result.substr(0, evtlength);
  327. // var jsonData = JSON.parse(result);
  328. if (keyvalue == "AddInfo") {
  329. insertActionRecord('用户操作新增排查点');
  330. mui.toast("新增排查点成功!");
  331. window.location = "main.html?date=" + getDateStr();
  332. return;
  333. }
  334. // var jsonObj = JSON.parse(result)
  335. var jsonData = evt.data;
  336. if (jsonData != null) {
  337. switch (keyvalue) {
  338. case "loadMajor":
  339. Select_DyCreate("select_major", jsonData, "CODE", "NAME",true);
  340. break;
  341. }
  342. }
  343. }
  344. </script>
  345. </head>
  346. <body background="assets/image/login.png" style=" background-repeat:no-repeat ;background-size:100% 100%;background-attachment: fixed;">
  347. <header class="mui-bar mui-bar-nav">
  348. <a id="back" class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
  349. <h1 class="mui-title">巡查结果</h1>
  350. </header>
  351. <div class="mainDiv" style="overflow: scroll;width: 100%;height: 88%;">
  352. <div>
  353. <div class="mui-input-group" style="margin: 1.25rem 0.625rem 0.625rem 0.625rem;">
  354. <div class="mui-input-row" >
  355. <label>姓名:</label>
  356. <input id="txt_name" type="text" placeholder="姓名" readonly="true"/>
  357. </div>
  358. <div class="mui-input-row" >
  359. <label>性别:</label>
  360. <input id="txt_sex" type="text" placeholder="性别" readonly="true"/>
  361. <!-- <select id="txt_sex" class="mui-btn-block" >
  362. <option value="0">请选择</option>
  363. <option value="1">男</option>
  364. <option value="2">女</option>
  365. </select> -->
  366. </div>
  367. <!-- <div class="mui-input-row" >
  368. <label>类别:</label>
  369. <input id="txt_type" type="text" class="mui-input-clear" placeholder="主体类别"/>
  370. <select id="txt_type" class="mui-btn-block" >
  371. <option value="0">请选择</option>
  372. <option value="1">个人</option>
  373. <option value="2">单位</option>
  374. </select>
  375. </div> -->
  376. <div class="mui-input-row" >
  377. <label>专业:</label>
  378. <input id="txt_major" type="text" placeholder="从事专业" readonly="true"/>
  379. <!-- <select id="select_major" class="mui-btn-block" ></select> -->
  380. </div>
  381. <div class="mui-input-row" style="height: auto;" >
  382. <label>地址:</label>
  383. <textarea id="txt_add" placeholder="地址" readonly="true"></textarea>
  384. </div>
  385. <div class="mui-input-row" >
  386. <label>证件:</label>
  387. <input id="txt_idcard" type="text" placeholder="无" readonly="true"/>
  388. </div>
  389. <!-- <div class="mui-input-row" >
  390. <label>备注:</label>
  391. <input id="txt_bz" type="text" class="mui-input-clear" placeholder="备注"/>
  392. </div> -->
  393. </div>
  394. </div>
  395. <div style="text-align: center;width: 100%;">
  396. <div style="width: 87%;height: 9.375rem;margin: 0.625rem 1.875rem 0.625rem 1.875rem;">
  397. <div style="float: left;width: 72%;height: 100%;">
  398. <div style="width: 100%;">
  399. <button type="button" onclick="updateDb(1)" style="width: 98%;height: 4.375rem;" class="mui-btn mui-btn-danger">营业中</button>
  400. </div>
  401. <div style="width: 100%;margin-top: 0.625rem;">
  402. <div style="float: left;width: 35%;">
  403. <button type="button" onclick="updateDb(4)" style="width: 100%;height: 4.375rem;" class="mui-btn mui-btn-warning">未执业</button>
  404. </div>
  405. <div style="float: left;width:59%;margin-left: 0.625rem;">
  406. <button type="button" onclick="updateDb(2)" class="mui-btn mui-btn-primary" style="width: 100%;height: 4.375rem;">已搬离</button>
  407. </div>
  408. </div>
  409. </div>
  410. <div style="float: left;height: 100%;width:28%;">
  411. <button type="button" onclick="updateDb(3)" class="mui-btn mui-btn-success" style="height: 100%;width: 90%;">可疑执业</button>
  412. </div>
  413. </div>
  414. <div style="float: inherit;margin-top: 0.625rem;">
  415. <button type="button" class="mui-btn mui-btn-royal" style="width: 90%;">提交</button>
  416. </div>
  417. </div>
  418. <div class="mui-content" style="width: 93%;height: 28%;margin: 0 auto;background-color: #91DBD9;">
  419. <form id='from1' enctype = "multipart/form-data">
  420. <div style="margin-top: 16px;margin-bottom: 10px;">
  421. <!-- <div class="dynamic_images" style="background-color: #91DBD9;height: 70px;width: 100%;padding-left: 15px;padding-right: 15px;">
  422. <ul class="row mui-input-row">
  423. <li> onclick="showActionSheet();"-->
  424. <div class="image-uploads" style="width: 120px;position: absolute;">
  425. <label for="imgUploads">
  426. <img src="img/show3.png" id="addnew" style="width: 20px;height: 20px;margin-left: 10px;margin-top: 10px;" />
  427. </label>
  428. <input id="imgUploads" style="width: 180px;" type="file" name="imageUpload" accept="image/*" capture="camera" onchange="loadUpImgs()" / >
  429. </div>
  430. <!-- </li>
  431. </ul>
  432. </div> -->
  433. <span class="title" style="color: #F9FDFD;font-size: 15px;margin-top: 10px;position: absolute;margin-left: 40px;">拍照</span>
  434. <div class="image-upload" style="width: 120px;position: absolute;margin-left: 70px;">
  435. <label for="imgUpload">
  436. <img src="img/imgadd.png" id="addnew1" style="width: 20px;height: 20px;margin-left: 10px;margin-top: 10px;" />
  437. </label>
  438. <input id="imgUpload" style="width: 180px;" type="file" name="imageUpload" accept="image/*" onchange="loadUpImg()" / >
  439. </div>
  440. <span class="title" style="color: #F9FDFD;font-size: 15px;margin-top: 10px;position: absolute;margin-left: 110px;">从相册选取</span>
  441. <span id="picnum" style="float: right;font-size: 12px; color: #F9FDFD;margin-top: 10px;position: absolute;margin-left: 200px;">0/5</span>
  442. <!-- <div id="finish" class="mui-icon mui-icon-checkmarkempty" style="margin-left: 55px;color: #F9FDFD;position: absolute;margin-top: 10px;margin-left: 70%;" onclick="submits()"></div> -->
  443. </div>
  444. <div class="dynamic_images" style="background-color: #91DBD9;height: 70px;width: 100%;padding-left: 40px;padding-right: 15px;">
  445. <ul class="row mui-input-row" style="width: 83%;height: 23%;margin-top: 30px;position: absolute;margin-left: -5%;">
  446. <!-- <li>
  447. <img src="img/iconfont-tianjia.png" id="addnew" onclick="showActionSheet();" />
  448. </li> -->
  449. <img src="img/show.png" id="showimg"/>
  450. </ul>
  451. </div>
  452. <!-- <div style="margin-top: 16px;width: 100%;text-align: center;">
  453. <button style="background-color: #169BD5;height: 40px;width: 266px;font-size: 14px;color: #FFFFFF;border-radius: 5px;border: 0px;" type="button" onclick="submits()">提交</button>
  454. </div> -->
  455. </form>
  456. </div>
  457. <nav class="mui-bar mui-bar-tab">
  458. <a href="firstPage.html" id="mainpage" class="mui-tab-item mui-active">
  459. <span class="mui-icon mui-icon-home"></span>
  460. <span class="mui-tab-label">主页</span>
  461. </a>
  462. <a href="projectInfo.html" id="addpage" class="mui-tab-item">
  463. <span class="mui-icon mui-icon-chatboxes"></span>
  464. <span class="mui-tab-label">添加</span>
  465. </a>
  466. <a href="myInfo.html" id="exit" class="mui-tab-item">
  467. <span class="mui-icon mui-icon-gear"></span>
  468. <span class="mui-tab-label">退出</span>
  469. </a>
  470. </nav>
  471. </div>
  472. </body>
  473. </html>