myWordOrderDe.html 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
  6. <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
  7. <title></title>
  8. <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
  9. <link rel="stylesheet" type="text/css" href="../../css/api.css" />
  10. <link rel="stylesheet" href="../../css/select.css">
  11. <style>
  12. body {
  13. background: #fff;
  14. }
  15. .api_layout {
  16. background: #fff;
  17. width: 100%;
  18. /*margin-top: -10px;*/
  19. }
  20. /*.column {
  21. margin-bottom: 10px;
  22. }*/
  23. .aui-row {
  24. border: 1px dashed #c8d2de;
  25. -webkit-border-radius: 5px;
  26. -moz-border-radius: 5px;
  27. border-radius: 5px;
  28. padding: 10px;
  29. }
  30. .technological-process {
  31. margin-top: 10px;
  32. }
  33. /*****/
  34. /*审批进度条*/
  35. .layui-timeline {
  36. padding-left: 5px;
  37. }
  38. .layui-timeline-item {
  39. position: relative;
  40. padding-bottom: 20px;
  41. }
  42. .layui-timeline-item:first-child:before {
  43. display: block;
  44. }
  45. .layui-timeline-item:before {
  46. content: '';
  47. position: absolute;
  48. left: 5px;
  49. top: 0;
  50. z-index: 0;
  51. width: 1px;
  52. height: 100%;
  53. }
  54. .layui-timeline-item:before,
  55. hr {
  56. background-color: #e6e6e6;
  57. }
  58. .layui-timeline-item img{
  59. font-size: 12px;
  60. /*font-weight: bold;*/
  61. position: absolute;
  62. left: -5px;
  63. top: 0;
  64. z-index: 10;
  65. width: 20px;
  66. height: 20px;
  67. line-height: 20px;
  68. background-color: #fff;
  69. border-radius: 50%;
  70. text-align: center;
  71. cursor: pointer;
  72. margin-top: 2px;
  73. }
  74. .Correct {
  75. color: #5FB878;
  76. border: 1px solid #5FB878;
  77. }
  78. .closes {
  79. color: red;
  80. border: 1px solid red;
  81. }
  82. .layui-timeline-content {
  83. padding-left: 25px;
  84. align-items: center;
  85. }
  86. .layui-text {
  87. line-height: 22px;
  88. font-size: 14px;
  89. color: #666;
  90. }
  91. .layui-timeline-title {
  92. display: flex;
  93. align-items: center;
  94. justify-content: flex-start;
  95. }
  96. .layui-timeline-reamrk-text {
  97. color: #4BC612;
  98. display: flex;
  99. align-items: center;
  100. }
  101. .remark {
  102. padding: 3px 0 0 2px;
  103. border-radius: 2px;
  104. display: none;
  105. }
  106. /******/
  107. .aui-list-item-input label {
  108. font-size: 14px;
  109. height: 21px;
  110. display: inline-block;
  111. line-height: 22px;
  112. margin-right: 5px;
  113. }
  114. .aui-list-item-input label:last-child {
  115. margin-right: 0;
  116. }
  117. .itmes li {
  118. display: flex;
  119. justify-content: space-between;
  120. flex-wrap: nowrap;
  121. padding: 10px 0;
  122. position: relative;
  123. }
  124. .itmes li p:first-child {
  125. width: 33%;
  126. color: #2c3e50;
  127. font-size: 15px;
  128. }
  129. .itmes li p:last-child {
  130. margin-left: 2%;
  131. width: 65%;
  132. color: #3498db;
  133. }
  134. .header-img {
  135. width: 50px;
  136. height: 50px;
  137. -webkit-border-radius: 50%;
  138. -moz-border-radius: 50%;
  139. border-radius: 50%;
  140. object-fit: cover;
  141. margin-right: 10px;
  142. }
  143. .img-title {
  144. display: flex;
  145. justify-content: flex-start;
  146. flex-wrap: nowrap;
  147. }
  148. .details-message {
  149. width: 100%;
  150. background: #fff;
  151. }
  152. .details-message-child {
  153. padding: 0 15px 15px 15px;
  154. }
  155. .personalInfo {
  156. padding: 10px 0;
  157. }
  158. .personalInfo span {
  159. display: block;
  160. font-size: 14px;
  161. color: #6c6f74;
  162. }
  163. .personalInfo span:first-child {
  164. font-size: 18px;
  165. color: #002257;
  166. }
  167. .examine-success {
  168. background: #1abc9c;
  169. }
  170. .examine-red {
  171. background: #e74c3c;
  172. }
  173. .staff_name {
  174. width: 50px;
  175. height: 50px;
  176. -webkit-border-radius: 50%;
  177. -moz-border-radius: 50%;
  178. border-radius: 50%;
  179. margin-right: 10px;
  180. line-height: 50px;
  181. text-align: center;
  182. color: #fff;
  183. }
  184. .aui-col-xs-4 img {
  185. object-fit: cover;
  186. border-radius: 3px;
  187. margin: auto;
  188. }
  189. .aui-col-xs-4 span {
  190. overflow: hidden;
  191. text-overflow: ellipsis;
  192. display: -webkit-box;
  193. -webkit-line-clamp: 2;
  194. -webkit-box-orient: vertical;
  195. padding: 0 3px;
  196. height: 48px;
  197. text-align: center;
  198. margin: 5px 0;
  199. font-size: 15px;
  200. }
  201. .fileList img {
  202. width: 35px;
  203. height: 35px;
  204. }
  205. .name-column span {
  206. background: #009fe8;
  207. padding: 4px 4px 2px 4px;
  208. color: #fff;
  209. border-radius: 2px;
  210. font-size: 13px;
  211. }
  212. .column-title {
  213. display: block;
  214. font-size: 15px;
  215. color: #97a3b4;
  216. /*#2c3e50*/
  217. margin-bottom: 10px;
  218. }
  219. .column-textarea {
  220. border: 1px solid rgba(200, 210, 222, 1);
  221. -webkit-border-radius: 5px;
  222. -moz-border-radius: 5px;
  223. border-radius: 5px;
  224. padding: 10px;
  225. height: 40px;
  226. }
  227. .column-textarea::placeholder {
  228. font-size: 14px;
  229. color: #333;
  230. }
  231. /*定位*/
  232. .position-photo-notes {
  233. padding: 15px;
  234. }
  235. .postion-title {
  236. text-align: center;
  237. }
  238. .postion-title div img {
  239. width: 60px;
  240. height: 60px;
  241. }
  242. /*position*/
  243. .flex-space {
  244. display: flex;
  245. align-items: center;
  246. white-space: nowrap;
  247. }
  248. .flex-start {
  249. display: flex;
  250. justify-content: space-between;
  251. white-space: nowrap;
  252. align-items: center;
  253. }
  254. .ico-map {
  255. width: 25px;
  256. height: 25px;
  257. background: url("../../icon/position.png") no-repeat;
  258. background-position: center;
  259. background-size: cover;
  260. }
  261. .position-map {
  262. display: flex;
  263. align-items: center;
  264. white-space: nowrap;
  265. padding: 8px 14px;
  266. border-radius: 50px;
  267. background: #F0F0F0;
  268. font-size: 14px;
  269. margin-top: 10px;
  270. }
  271. .map1 {
  272. color: #009FE8;
  273. }
  274. .again {
  275. color: #6C6F74;
  276. }
  277. .map-name {
  278. width: 99%;
  279. }
  280. .names {
  281. width: 85%;
  282. }
  283. .names .map1 {
  284. width: 100%;
  285. padding-top: 3px;
  286. white-space: pre-wrap;
  287. overflow: hidden;
  288. text-overflow: ellipsis;
  289. display: -webkit-box;
  290. -webkit-box-orient: vertical;
  291. -webkit-line-clamp: 2;
  292. /*font-weight: bold;*/
  293. }
  294. .textarea {
  295. height: 45px;
  296. line-height: 1.5;
  297. }
  298. /*图片上传*/
  299. .input-recode {
  300. border: dashed 1px rgba(200, 210, 222, 1);
  301. display: flex;
  302. flex-flow: wrap;
  303. align-items: center;
  304. line-height: 100%;
  305. }
  306. .file-width {
  307. width: 33.3333333%;
  308. box-sizing: border-box;
  309. font-size: 14px;
  310. color: #333;
  311. }
  312. .upload {
  313. padding-top: 10px;
  314. }
  315. .upload img {
  316. width: 80px;
  317. height: 80px;
  318. margin-left: 15px;
  319. }
  320. /*图片*/
  321. /*未提交定位信息的图片容器*/
  322. .img-item {
  323. text-align: center;
  324. line-height: 100%;
  325. }
  326. .img-item img {
  327. width: 80px;
  328. height: 80px;
  329. border-radius: 3px;
  330. object-fit: cover;
  331. }
  332. .img-items .upload {
  333. text-align: center;
  334. }
  335. .img-items .upload img {
  336. width: 80px;
  337. height: 80px;
  338. margin: 0;
  339. }
  340. .add-message-remark {
  341. background: #fff;
  342. border-radius:10px;
  343. position: relative;
  344. }
  345. .add-message-remark-child {
  346. background: #fff;
  347. margin: 0 15px 15px 15px;
  348. border-radius: 5px;
  349. border:1px solid rgba(224,225,226,1);
  350. }
  351. .add-msg-list {
  352. margin-top: 10px;
  353. }
  354. .add-msg-list div {
  355. width: 100%;
  356. height: 40px;
  357. line-height: 40px;
  358. text-align: center;
  359. border-radius: 4px;
  360. color: #fff;
  361. background: #009fe8;
  362. font-size: 14px;
  363. }
  364. .work-order-remarks {
  365. color: #2C3E50;
  366. font-size: 15px;
  367. font-weight: bold;
  368. }
  369. .staff-message {
  370. /*font-weight:400;*/
  371. font-size: 14px;
  372. color:rgba(108,111,116,1);
  373. }
  374. .remarkInfo {
  375. color: #232627;
  376. margin-bottom: 6px
  377. }
  378. .remarkInfo-message {
  379. background:rgba(236,240,241,1);
  380. border-radius:2px;
  381. display: flex;
  382. }
  383. .left-line-icon {
  384. background: #009FE8;
  385. width: 3px;
  386. margin: 8px 0;
  387. }
  388. .remarkInfo-message div:last-child {
  389. padding: 7.5px 0 7.5px 10px;
  390. color: #009FE8;
  391. /*font-weight: bold;*/
  392. }
  393. .more-icon {
  394. width: 20px;
  395. height: 20px;
  396. background: url("../../image/more.png") no-repeat;
  397. background-position: center;
  398. background-size: cover;
  399. }
  400. .img-item-two {
  401. position: relative;
  402. display: inline-block;
  403. width: 32%;
  404. margin-left: 6px;
  405. margin-top: 6px;
  406. }
  407. .img-item-two img {
  408. z-index: 0;
  409. height: 27vw;
  410. width: 27vw;
  411. object-fit: cover;
  412. border-radius: 5px;
  413. }
  414. .notes-content {
  415. margin-top: 10px;
  416. }
  417. </style>
  418. </head>
  419. <body>
  420. <div class="api_layout" id="wordOrder_details">
  421. </div>
  422. </body>
  423. <script type="text/template" id="template">
  424. {{?api.pageParam.status == 2 || api.pageParam.type == '工单完结'}}
  425. <div class="add-message-remark">
  426. <div style="height: 15px; width: 100%"></div>
  427. <div class="add-message-remark-child">
  428. <!-- 是否定位 -->
  429. {{?it.open_gps == 1 && it.open_remark == 1}} {{=getLonLat(it.open_gps)}} {{?}}
  430. <!-- 定位信息 拍照 以及备注信息 -->
  431. <div class="position-photo-notes">
  432. <div class="postion-title">
  433. <div><img src="../../icon/0001.png"></div>
  434. <div class="work-order-remarks">目的地打卡</div>
  435. <div class="staff-message">
  436. {{=it.staff}}
  437. </div>
  438. </div>
  439. {{? it.open_gps == 1 && it.open_remark == 1}}
  440. <div class="position-content" id="position_warp"></div>
  441. {{?}}
  442. {{? it.open_gps == 1 && it.open_remark == 2}}
  443. <div class="position-map" onclick="openMaps('{{=it.longitude}}','{{=it.latitude}}')">
  444. <div class="map-name flex-start">
  445. <i class="ico-map"></i>
  446. <div class="names">
  447. <p class="map1">{{=it.address}}</p>
  448. </div>
  449. </div>
  450. <p class="more-icon"></p>
  451. </div>
  452. {{?}}
  453. {{? it.open_remark == 1}}
  454. <div class="notes-content">
  455. <div>
  456. <div class="remarkInfo">备注内容:</div>
  457. <textarea oninput="Oninput(this)" id="remark_information" class="column-textarea font-s column-textarea1" placeholder="请输入备注信息"></textarea>
  458. </div>
  459. </div>
  460. {{?}}
  461. {{? it.open_remark == 2 && JSON.parse(it.remark_info).remarkInfo != ''}}
  462. <div class="notes-content">
  463. <div class="remarkInfo-message">
  464. <div class="left-line-icon"></div>
  465. <div>备注信息</div>
  466. </div>
  467. <div style="padding-top: 10px;color: #232627;">
  468. {{=JSON.parse(it.remark_info).remarkInfo}}
  469. </div>
  470. </div>
  471. {{?}}
  472. <!-- {{? it.open_remark == 1}}
  473. <div class="modula img-warp">
  474. <label class="remarkInfo">现场照片:</label>
  475. <div class="text-input input-recode file-items-add img-items photoFile">
  476. <div class="upload file-width" onclick="uploadImg('remote',this)">
  477. <img src="../../image/upload.png" alt="">
  478. </div>
  479. </div>
  480. </div>
  481. {{?}} -->
  482. <!-- {{? it.open_remark == 2 && JSON.parse(it.remark_info).imageList.length > 0}}
  483. <div class="modula img-warp">
  484. <label class="remarkInfo">现场照片:</label>
  485. <div class="text-input input-recode file-items-add img-items photoFile">
  486. {{ for (var i = 0; i
  487. < JSON.parse(it.remark_info).imageList.length; i++) { }} <div class="img-dv img-item-two" onclick="browseImgTwo('{{=i}}','{{=JSON.parse(it.remark_info).imageList.toString()}}')">
  488. <a href="javascript:;">
  489. <img src="{{=JSON.parse(it.remark_info).imageList[i]}}">
  490. </a>
  491. </div>
  492. {{ } }}
  493. </div>
  494. </div>
  495. {{?}} -->
  496. {{? it.open_remark == 1}}
  497. <div class="add-msg-list">
  498. <div onclick="addPositionNotes()">提交</div>
  499. </div>
  500. {{?}}
  501. </div>
  502. </div>
  503. </div>
  504. {{?}}
  505. <div class="details-message">
  506. <div class="details-message-child">
  507. <div class="personalInfo">
  508. <div class="img-title">
  509. {{?it.staff_avatar === null}}
  510. <p class="staff_name" style="background:#{{=Math.random().toString(16).slice(2,8)}}">{{=it.staff.substr(it.staff.length-1,1)}}</p>
  511. {{??}}
  512. <img src="{{=it.staff_avatar}}" alt="" class="header-img"> {{?}}
  513. <div>
  514. <span>{{=it.staff}}</span>
  515. <span>{{=it.section}}</span>
  516. </div>
  517. </div>
  518. </div>
  519. <ul class="itmes">
  520. <!-- <li>
  521. <p>工单编号:</p>
  522. <p>#{{=it.id}}</p>
  523. </li>
  524. <li>
  525. <p>工单分类:</p>
  526. <p>{{=it.classify}}</p>
  527. </li> -->
  528. <li>
  529. <p>流程名称:</p>
  530. <p>{{=it.title}}</p>
  531. </li>
  532. </ul>
  533. <ul class="itmes">
  534. {{ for (var i = 0;i
  535. <it.form.length;i++) { }} {{?it.form[i].type !='images' && it.form[i].type !='files' }} <li>
  536. <p>{{=it.form[i].label}}:</p>
  537. <p>{{=it.form[i].value}}</p>
  538. </li>
  539. {{?}} {{ } }}
  540. </ul>
  541. <div class="column-row">
  542. {{ for (var i = 0;i
  543. <it.form.length;i++) { }} {{? it.form[i].type=='images' && it.form[i].value.length > 0 }} <div class="column">
  544. <label class="column-title">{{=it.form[i].label}}:</label>
  545. <div class="aui-row aui-row-padded">
  546. {{ for (var j = 0;j
  547. <it.form[i].value.length;j++) { }} <div class="aui-col-xs-4">
  548. <img src="{{=it.form[i].value[j]}}" class="colsImg" onload="setUpHeight(this)" onclick="browseImg('{{=it.form[i].value}}','{{=j}}')" />
  549. </div>
  550. {{ } }}
  551. </div>
  552. </div>
  553. {{??it.form[i].type == 'files' && it.form[i].value.length > 0}}
  554. <div class="column">
  555. <label class="column-title">{{=it.form[i].label}}:</label>
  556. <div class="aui-row aui-row-padded fileList">
  557. {{ for (var j = 0;j
  558. <it.form[i].value.length;j++) { }} {{?it.form[i].value[j].path.endsWith( 'docx') || it.form[i].value[j].path.endsWith( 'doc')}} <div class="aui-col-xs-4" onclick="browseFile('{{=it.form[i].value[j].path}}')">
  559. <img src="../../icon/{{=it.form[i].value[j].path.substr(it.form[i].value[j].path.length-3,3)}}.png" />
  560. <span>{{=it.form[i].value[j].name}}</span>
  561. </div>
  562. {{??it.form[i].value[j].path.endsWith('pdf')}}
  563. <div class="aui-col-xs-4" onclick="browseFile('{{=it.form[i].value[j].path}}')">
  564. <img src="../../icon/{{=it.form[i].value[j].path.substr(it.form[i].value[j].path.length-3,3)}}.png" />
  565. <span>{{=it.form[i].value[j].name}}</span>
  566. </div>
  567. {{??it.form[i].value[j].path.endsWith('ppt') || it.form[i].value[j].path.endsWith('ptx')}}
  568. <div class="aui-col-xs-4" onclick="browseFile('{{=it.form[i].value[j].path}}')">
  569. <img src="../../icon/{{=it.form[i].value[j].path.substr(it.form[i].value[j].path.length-3,3)}}.png" />
  570. <span>{{=it.form[i].value[j].name}}</span>
  571. </div>
  572. {{??it.form[i].value[j].path.endsWith('zip') || it.form[i].value[j].path.endsWith('rar')}}
  573. <div class="aui-col-xs-4" onclick="browseFile('{{=it.form[i].value[j].path}}',true)">
  574. <img src="../../icon/{{=it.form[i].value[j].path.substr(it.form[i].value[j].path.length-3,3)}}.png" />
  575. <span>{{=it.form[i].value[j].name}}</span>
  576. </div>
  577. {{??it.form[i].value[j].path.endsWith('xlsx')}}
  578. <div class="aui-col-xs-4" onclick="browseFile('{{=it.form[i].value[j].path}}')">
  579. <img src="../../icon/{{=it.form[i].value[j].path.substr(it.form[i].value[j].path.length-3,3)}}.png" />
  580. <span>{{=it.form[i].value[j].name}}</span>
  581. </div>
  582. {{??}}
  583. <div class="aui-col-xs-4" onclick="browseFile('{{=it.form[i].value[j].path}}')">
  584. <img src="../../icon/OTHER.png" />
  585. <span>{{=it.form[i].value[j].name}}</span>
  586. </div>
  587. {{?}} {{ } }}
  588. </div>
  589. </div>
  590. {{?}} {{ } }}
  591. </div>
  592. <div class="technologicals" style="margin-top:10px">
  593. <label class="column-title">固定审批流程:</label>
  594. <div class="technological-process">
  595. {{ for(var prop in it.flows) { }}
  596. <ul class="layui-timeline">
  597. <li class="layui-timeline-item">
  598. <img src="{{=it.flows[prop].status == 2 ? '../../image/sureCircle.png' : (it.flows[prop].status == 3 ? '../../image/rejectCircle.png':'../../image/waitCircle.png')}} "></i>
  599. <!-- <i class="layui-timeline-axis" style="background:{{=it.flows[prop].status == '1'?'#5FB878':''}}"></i> -->
  600. <div class="layui-timeline-content layui-text">
  601. <div class="layui-timeline-title">
  602. <span>{{=it.flows[prop].flow_name}}:</span>
  603. <div class="name-column">
  604. {{ for (var j = 0;j
  605. <it.flows[prop].flow.length;j++) { }} <span>{{=it.flows[prop].flow[j]}}</span>
  606. {{ } }}
  607. </div>
  608. </div>
  609. </div>
  610. </li>
  611. </ul>
  612. {{ } }}
  613. </div>
  614. </div>
  615. <!-- 定位 拍照 备注信息 -->
  616. <!-- <div class="postion-reson">
  617. hahahahah
  618. </div> -->
  619. <div style="text-align: right;margin-top: 15px;{{=it.id !=" "?'display:none':'display:block'}}">
  620. <div class="aui-btn aui-btn-danger examine-red" onclick="openReject('{{=it.id}}')">驳回</div>
  621. <div class="aui-btn aui-btn-success examine-success" onclick="openAdopt('{{=it.id}}')">通过</div>
  622. </div>
  623. </div>
  624. </div>
  625. </script>
  626. <script type="text/javascript" src="../../script/api.js"></script>
  627. <script type="text/javascript" src="../../script/doT.min.js"></script>
  628. <script src="../../script/zepto.js" charset="utf-8"></script>
  629. <script type="text/javascript" src="../../script/config.js"></script>
  630. <!-- 地图 -->
  631. <script type="text/template" id="mapTemplate">
  632. <div class="position-map">
  633. <div class="map-name flex-start">
  634. <i class="ico-map"></i>
  635. <div class="names">
  636. <p class="map1">{{=it.address}}</p>
  637. </div>
  638. </div>
  639. <p class="again" onclick="getLonLat(false)">重新定位</p>
  640. </div>
  641. </script>
  642. <script type="text/javascript">
  643. var toast = new auiToast()
  644. var token
  645. apiready = function() {
  646. var info = $api.getStorage('data');
  647. token = JSON.parse(info).data.access_token;
  648. getApplyDe(api.pageParam.ID, token)
  649. };
  650. function getApplyDe(id, token) {
  651. var headers = {
  652. "Authorization": "Bearer " + token
  653. };
  654. $http.fnReuestData(UrlRouter.submitApplyDe + id, headers, 'get', '', function(ret, err) {
  655. // console.log(JSON.stringify(ret.data));
  656. // console.log(JSON.stringify(ret));
  657. if (ret.code === 0) {
  658. $apis.html(wordOrder_details, '#template', ret.data);
  659. toast.hide();
  660. } else {
  661. toast.hide();
  662. }
  663. })
  664. }
  665. // // 上传图片的高度
  666. function setUpHeight(that) {
  667. that.style.width = that.offsetWidth+ 'px'
  668. that.style.height = that.offsetWidth+ 'px'
  669. }
  670. //  上传图浏览
  671. function browseImg(data, i) {
  672. var imageBrowser = api.require('imageBrowser');
  673. imageBrowser.openImages({
  674. imageUrls: data.split(','),
  675. activeIndex:i,
  676. showList:false
  677. });
  678. }
  679. // 上传文件在线浏览
  680. function browseFile(paths, flag) {
  681. api.download({
  682. url: paths,
  683. report: true,
  684. cache: true,
  685. allowResume: true
  686. }, function(ret, err) {
  687. if (ret.state == 1) {
  688. if (!flag) {
  689. var superFile = api.require('superFile');
  690. superFile.open({
  691. path: ret.savePath
  692. });
  693. }
  694. setTimeout(function() {
  695. api.toast({
  696. msg: '下载成功',
  697. duration: 2000,
  698. location: 'top'
  699. });
  700. }, 100)
  701. } else {
  702. }
  703. });
  704. }
  705. // 通过
  706. function openAdopt(id) {
  707. // var node_personal= $('.node-personal')
  708. // var hadFlows={};
  709. // var hadFlows1=[];
  710. // node_personal.each(function (index) {
  711. // var personal_names = $(this).find('.personal-name')
  712. // var key = $(this).attr('flowName')+'-'+index
  713. // for (var i=0;i<personal_names.length;i++){
  714. // hadFlows1.push($(personal_names[i]).attr('jobId'))
  715. // }
  716. // hadFlows[key] = hadFlows1.join(',');
  717. // });
  718. api.openFrame({
  719. name: 'myAdopt',
  720. bounces: false,
  721. url: 'myAdopt.html',
  722. bgColor: 'rgba(0,0,0,.6)',
  723. animation: {
  724. type: "fade",
  725. subType: "from_right",
  726. duration: 300
  727. },
  728. rect: {
  729. x: 0,
  730. y: 0,
  731. w: api.winWidth,
  732. h: 'auto',
  733. },
  734. pageParam: {
  735. ID: id,
  736. // forward_content: $api.val($api.dom('.column-textarea')),
  737. // forward_staff: hadFlows1
  738. }
  739. });
  740. }
  741. // 驳回
  742. function openReject(id) {
  743. api.openFrame({
  744. name: 'myReject',
  745. bounces: false,
  746. url: 'myReject.html',
  747. bgColor: 'rgba(0,0,0,.6)',
  748. rect: {
  749. x: 0,
  750. y: 0,
  751. w: api.winWidth,
  752. h: 'auto',
  753. },
  754. animation: {
  755. type: "fade",
  756. subType: "from_right",
  757. duration: 300
  758. },
  759. pageParam: {
  760. ID: id
  761. }
  762. });
  763. }
  764. // 定位初始化
  765. var spName = '',
  766. lon = '',
  767. lat = '';
  768. function getLonLat(flag) {
  769. if (flag == 1) {
  770. api.showProgress({
  771. title: '提示',
  772. text: '定位中...',
  773. });
  774. }
  775. var aMap = api.require('aMap');
  776. aMap.getLocation(function(ret, err) {
  777. if (ret.status) {
  778. api.hideProgress();
  779. lon = ret.lon;
  780. lat = ret.lat;
  781. aMap.getNameFromCoords({
  782. lon: ret.lon,
  783. lat: ret.lat
  784. }, function(ret, err) {
  785. if (ret.status) {
  786. spName = ret.address
  787. $apis.html(position_warp, '#mapTemplate', ret);
  788. } else {
  789. api.toast({
  790. msg: '请打开手机定位',
  791. duration: 2000,
  792. location: 'top'
  793. });
  794. }
  795. });
  796. } else {
  797. api.hideProgress();
  798. api.toast({
  799. msg: '定位失败请重新定位',
  800. duration: 2000,
  801. location: 'top'
  802. });
  803. }
  804. });
  805. return '';
  806. }
  807. function uploadImg(type, that) {
  808. if (type == 'remote') {
  809. api.getPicture({
  810. sourceType: 'camera',
  811. mediaValue: 'pic',
  812. saveToPhotoAlbum: false
  813. }, function(ret, err) {
  814. if (ret && ret.data != '') {
  815. uploadHead(ret.data, that);
  816. } else {
  817. alert(JSON.stringify(err));
  818. }
  819. });
  820. }
  821. }
  822. // upload img
  823. function uploadHead(imgUrl, that) {
  824. $http.fileUploadRequest(UrlRouter.up_images, 'post', {
  825. image: imgUrl
  826. })
  827. .then(ret => {
  828. if (ret.code == 0) {
  829. var html = `<div class="img-item file-width" img-Url="${ret.data.path}">
  830. <img src="${ret.data.path}" alt="">
  831. </div>`;
  832. $api.append(that.parentNode, html);
  833. api.toast({
  834. msg: '上传成功',
  835. duration: 2000,
  836. location: 'top'
  837. });
  838. } else {
  839. api.toast({
  840. msg: '上传失败',
  841. duration: 2000,
  842. location: 'top'
  843. });
  844. }
  845. })
  846. .catch(err => {
  847. api.toast({
  848. msg: '网络错误',
  849. duration: 2000,
  850. location: 'top'
  851. });
  852. })
  853. }
  854. // 获取相册图片路径
  855. function changeImageUrl(el) {
  856. UIAlbumBrowser.imagePicker({
  857. max: 9,
  858. styles: {
  859. bg: '#000000',
  860. //cameraImg: 'widget://res/cameraImg.png',
  861. mark: {
  862. position: 'top_right',
  863. size: 20
  864. },
  865. nav: {
  866. bg: '#000000',
  867. cancelColor: '#fff',
  868. cancelSize: 16,
  869. nextStepColor: '#7fff00',
  870. nextStepSize: 16
  871. },
  872. thumbnail: {
  873. w: 100,
  874. h: 100
  875. }
  876. },
  877. animation: true,
  878. }, function(ret) {
  879. if (ret.eventType == 'nextStep') {
  880. UIAlbumBrowser.closePicker();
  881. if (ret.list && ret.list.length > 0) {
  882. imgarr = ret.list;
  883. // 转换缩略图路径 ios
  884. UIAlbumBrowser_transPath(el);
  885. }
  886. }
  887. if (ret.originalPath && ret.originalPath.length > 0) {
  888. uploadHead(ret.originalPath, el)
  889. }
  890. });
  891. }
  892. // 转换缩略图路径 ios
  893. function UIAlbumBrowser_transPath(el) {
  894. UIAlbumBrowser.transPath({
  895. path: imgarr[i].path
  896. }, function(ret, err) {
  897. if (ret) {
  898. i++;
  899. if (i < imgarr.length) {
  900. UIAlbumBrowser_transPath(el);
  901. } else {
  902. i = 0;
  903. }
  904. uploadHead(ret.path, el)
  905. }
  906. });
  907. }
  908. // 备注地理位置
  909. function addPositionNotes() {
  910. var headers = {
  911. "Authorization": "Bearer " + token
  912. };
  913. var photoFile = $('.photoFile'),
  914. photoArray = [],
  915. inputObj = {};
  916. photoFile.each(function() {
  917. inputObj = {};
  918. photoArray = [];
  919. var photoList = $(this).find('.img-item');
  920. photoList.each(function() {
  921. photoArray.push($(this).attr('img-Url'));
  922. });
  923. inputObj.inputValue = photoArray.join(',');
  924. });
  925. const query = {
  926. address: spName,
  927. longitude: lon,
  928. latitude: lat,
  929. remark_info: {
  930. remarkInfo: $api.val($api.byId('remark_information')),
  931. imageList: photoArray
  932. }
  933. }
  934. $http.fnReuestData(UrlRouter.fill_order + api.pageParam.ID, headers, 'post', query, function(ret, err) {
  935. if (ret.code === 0) {
  936. toast.hide();
  937. getApplyDe(api.pageParam.ID, token)
  938. } else {
  939. api.toast({
  940. msg: ret.message,
  941. duration: 2000,
  942. location: 'bottom'
  943. });
  944. toast.hide();
  945. }
  946. })
  947. }
  948. // textarea根据文字多少自适应高度
  949. function Oninput(that) {
  950. $(that).height(that.scrollHeight);
  951. }
  952. // 打开地图
  953. function openMaps(lon, lat) {
  954. $event.openTabLayout('map', '../browseQrcode/map', '', {
  955. lon: lon,
  956. lat: lat
  957. })
  958. }
  959. // 图片浏览
  960. function browseImgTwo(i, value) {
  961. var imageBrowser = api.require('imageBrowser');
  962. imageBrowser.openImages({
  963. imageUrls: value.split(','),
  964. activeIndex: i,
  965. showList: false
  966. });
  967. }
  968. </script>
  969. </html>