alreadyWordorderDetails.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405
  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. <style>
  10. body{
  11. background: #fff;
  12. }
  13. .api_layout{
  14. padding: 15px;
  15. }
  16. .column{
  17. margin-bottom: 10px;
  18. }
  19. .aui-row{
  20. border: 1px dashed #c8d2de;
  21. -webkit-border-radius: 5px;
  22. -moz-border-radius: 5px;
  23. border-radius: 5px;
  24. padding: 10px;
  25. }
  26. .technological-process{
  27. margin-top: 10px;
  28. }
  29. /*****/
  30. /*审批进度条*/
  31. .layui-timeline {
  32. padding-left: 5px;
  33. }
  34. .layui-timeline-item {
  35. position: relative;
  36. padding-bottom: 20px;
  37. }
  38. .layui-timeline-item:first-child:before {
  39. display: block;
  40. }
  41. .layui-timeline-item:before {
  42. content: '';
  43. position: absolute;
  44. left: 5px;
  45. top: 0;
  46. z-index: 0;
  47. width: 1px;
  48. height: 100%;
  49. }
  50. .layui-timeline-item:before, hr {
  51. background-color: #e6e6e6;
  52. }
  53. .layui-timeline-axis {
  54. font-size: 12px;
  55. font-weight: bold;
  56. position: absolute;
  57. left: -5px;
  58. top: 0;
  59. z-index: 10;
  60. width: 20px;
  61. height: 20px;
  62. line-height: 20px;
  63. background-color: #fff;
  64. border-radius: 50%;
  65. text-align: center;
  66. cursor: pointer;
  67. }
  68. .Correct{
  69. color: #5FB878;
  70. border:1px solid #5FB878;
  71. }
  72. .closes{
  73. color: red;
  74. border:1px solid red;
  75. }
  76. .layui-timeline-content {
  77. padding-left: 25px;
  78. }
  79. .layui-text {
  80. line-height: 22px;
  81. font-size: 14px;
  82. color: #666;
  83. }
  84. .layui-timeline-title {
  85. position: relative;
  86. margin-bottom: 10px;
  87. display: flex;
  88. justify-content: flex-start;
  89. }
  90. .remark{
  91. padding: 2px 3px;
  92. border-radius: 2px;
  93. display: none;
  94. }
  95. /******/
  96. .aui-list-item-input label{
  97. font-size: 14px;
  98. height: 21px;
  99. display: inline-block;
  100. line-height: 22px;
  101. margin-right: 5px;
  102. }
  103. .aui-list-item-input label:last-child{
  104. margin-right: 0;
  105. }
  106. .itmes li{
  107. display: flex;
  108. justify-content: space-between;
  109. flex-wrap: nowrap;
  110. padding: 10px 0;
  111. position: relative;
  112. }
  113. .itmes li:after{
  114. content: "";
  115. position: absolute;
  116. bottom: 0;
  117. left: 0;
  118. height: 1px;
  119. background: #ebeef3;
  120. width: 100%;
  121. }
  122. .itmes p{
  123. width: 40%;
  124. color: #2c3e50;
  125. font-size: 15px;
  126. }
  127. .itmes p:last-child{
  128. margin-left: 10px;
  129. width: 55%;
  130. color: #3498db;
  131. }
  132. .column{
  133. margin-top: 15px;
  134. }
  135. .column-title{
  136. font-size: 15px;
  137. color: #2c3e50;
  138. margin-bottom: 5px;
  139. display: block;
  140. }
  141. .header-img{
  142. width: 50px;
  143. height: 50px;
  144. -webkit-border-radius: 50%;
  145. -moz-border-radius: 50%;
  146. border-radius: 50%;
  147. object-fit: cover;
  148. margin-right: 10px;
  149. }
  150. .img-title{
  151. display: flex;
  152. justify-content: flex-start;
  153. flex-wrap: nowrap;
  154. }
  155. .personalInfo{
  156. margin-bottom: 20px;
  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: 3px;
  208. color: #fff;
  209. border-radius: 2px;
  210. font-size: 13px;
  211. }
  212. /*.message-section-staff,
  213. .message-id-time {
  214. display: flex;
  215. }*/
  216. </style>
  217. </head>
  218. <body>
  219. <div class="api_layout" id="wordOrder_details">
  220. </div>
  221. </body>
  222. <script type="text/template" id="template">
  223. <div class="personalInfo">
  224. <div class="img-title">
  225. {{?it.staff_avatar === null}}
  226. <p class="staff_name" style="background:#{{=Math.random().toString(16).slice(2,8)}}">{{=it.staff.substr(it.staff.length-1,1)}}</p>
  227. {{??}}
  228. <img src="{{=it.staff_avatar}}" alt="" class="header-img">
  229. {{?}}
  230. <div>
  231. <span>{{=it.staff}}</span>
  232. <span>{{=it.section}}</span>
  233. </div>
  234. </div>
  235. </div>
  236. <ul class="itmes ">
  237. <li>
  238. <p>工单编号:</p>
  239. <p>#{{=it.id}}</p>
  240. </li>
  241. <li>
  242. <p>工单分类:</p>
  243. <p>{{=it.classify}}</p>
  244. </li>
  245. <li>
  246. <p>流程名称:</p>
  247. <p>{{=it.title}}</p>
  248. </li>
  249. </ul>
  250. <ul class="itmes ">
  251. {{ for (var i = 0;i<it.form.length;i++) { }}
  252. {{?it.form[i].type != 'images' && it.form[i].type != 'files'}}
  253. <li>
  254. <p>{{=it.form[i].label}}:</p>
  255. <p>{{=it.form[i].value}}</p>
  256. </li>
  257. {{?}}
  258. {{ } }}
  259. </ul>
  260. <div class="column-row">
  261. {{ for (var i = 0;i<it.form.length;i++) { }}
  262. {{?it.form[i].type == 'images'}}
  263. <div class="column">
  264. <label class="column-title">{{=it.form[i].label}}:</label>
  265. <div class="aui-row aui-row-padded">
  266. {{ for (var j = 0;j<it.form[i].value.length;j++) { }}
  267. <div class="aui-col-xs-4">
  268. <img src="{{=it.form[i].value[j]}}" class="colsImg" onload="setUpHeight(this)" onclick="browseImg('{{=it.form[i].value}}','{{=j}}')"/>
  269. </div>
  270. {{ } }}
  271. </div>
  272. </div>
  273. {{??it.form[i].type == 'files' && it.form[i].value.length > 0}}
  274. <div class="column">
  275. <label class="column-title">{{=it.form[i].label}}:</label>
  276. <div class="aui-row aui-row-padded fileList">
  277. {{ for (var j = 0;j<it.form[i].value.length;j++) { }}
  278. {{?it.form[i].value[j].path.endsWith('docx') || it.form[i].value[j].path.endsWith('doc')}}
  279. <div class="aui-col-xs-4" onclick="browseFile('{{=it.form[i].value[j].path}}')">
  280. <img src="../../icon/{{=it.form[i].value[j].path.substr(it.form[i].value[j].path.length-3,3)}}.png"/>
  281. <span>{{=it.form[i].value[j].name}}</span>
  282. </div>
  283. {{??it.form[i].value[j].path.endsWith('pdf')}}
  284. <div class="aui-col-xs-4" onclick="browseFile('{{=it.form[i].value[j].path}}')">
  285. <img src="../../icon/{{=it.form[i].value[j].path.substr(it.form[i].value[j].path.length-3,3)}}.png"/>
  286. <span>{{=it.form[i].value[j].name}}</span>
  287. </div>
  288. {{??it.form[i].value[j].path.endsWith('ppt') || it.form[i].value[j].path.endsWith('ptx')}}
  289. <div class="aui-col-xs-4" onclick="browseFile('{{=it.form[i].value[j].path}}')">
  290. <img src="../../icon/{{=it.form[i].value[j].path.substr(it.form[i].value[j].path.length-3,3)}}.png"/>
  291. <span>{{=it.form[i].value[j].name}}</span>
  292. </div>
  293. {{??it.form[i].value[j].path.endsWith('zip') || it.form[i].value[j].path.endsWith('rar')}}
  294. <div class="aui-col-xs-4" onclick="browseFile('{{=it.form[i].value[j].path}}',true)">
  295. <img src="../../icon/{{=it.form[i].value[j].path.substr(it.form[i].value[j].path.length-3,3)}}.png"/>
  296. <span>{{=it.form[i].value[j].name}}</span>
  297. </div>
  298. {{??it.form[i].value[j].path.endsWith('xlsx')}}
  299. <div class="aui-col-xs-4" onclick="browseFile('{{=it.form[i].value[j].path}}')">
  300. <img src="../../icon/{{=it.form[i].value[j].path.substr(it.form[i].value[j].path.length-3,3)}}.png"/>
  301. <span>{{=it.form[i].value[j].name}}</span>
  302. </div>
  303. {{??}}
  304. <div class="aui-col-xs-4" onclick="browseFile('{{=it.form[i].value[j].path}}')">
  305. <img src="../../icon/OTHER.png"/>
  306. <span>{{=it.form[i].value[j].name}}</span>
  307. </div>
  308. {{?}}
  309. {{ } }}
  310. </div>
  311. </div>
  312. {{?}}
  313. {{ } }}
  314. </div>
  315. <div class="technologicals" style="margin-top:10px">
  316. <label class="column-title">固定审批流程:</label>
  317. <div class="technological-process">
  318. {{ for(var prop in it.flows) { }}
  319. <ul class="layui-timeline">
  320. <li class="layui-timeline-item">
  321. <i class="{{=it.flows[prop].status == 2?'aui-iconfont aui-icon-correct Correct':(it.flows[prop].status == 3?'aui-iconfont aui-icon-close closes':'Correct')}} layui-timeline-axis"></i>
  322. <div class="layui-timeline-content layui-text">
  323. <div class="layui-timeline-title">
  324. <span>{{=it.flows[prop].flow_name}}:</span>
  325. <div class="name-column">
  326. {{ for (var j = 0;j<it.flows[prop].flow.length;j++) { }}
  327. <span>{{=it.flows[prop].flow[j]}}</span>
  328. {{ } }}
  329. </div>
  330. </div>
  331. <div class="layui-timeline-title remark" style="border:1px solid {{=it.flows[prop].status == 2?'#5FB878':(it.flows[prop].status == 3?'red':'')}};display:{{=it.flows[prop].remark?'inline-block':'none'}}">
  332. {{=it.flows[prop].remark}}
  333. </div>
  334. </div>
  335. </li>
  336. </ul>
  337. {{ } }}
  338. </div>
  339. </div>
  340. </script>
  341. <script type="text/javascript" src="../../script/api.js"></script>
  342. <script type="text/javascript" src="../../script/doT.min.js"></script>
  343. <script type="text/javascript" src="../../script/config.js"></script>
  344. <script type="text/javascript">
  345. var toast = new auiToast()
  346. apiready = function(){
  347. var info = $api.getStorage('data');
  348. token = JSON.parse(info).data.access_token;
  349. getApplyDe(api.pageParam.ID,token)
  350. };
  351. function getApplyDe(id,token) {
  352. var headers = {
  353. "Authorization": "Bearer " + token
  354. };
  355. $http.fnReuestData(UrlRouter.getAlreadyDe+id,headers,'get','',function (ret,err) {
  356. if (ret.code === 0) {
  357. $apis.html(wordOrder_details,'#template',ret.data);
  358. toast.hide();
  359. }else {
  360. toast.hide();
  361. }
  362. })
  363. }
  364. // 上传图片的高度
  365. function setUpHeight(that) {
  366. that.style.width = that.offsetWidth+ 'px'
  367. that.style.height = that.offsetWidth+ 'px'
  368. }
  369. //  上传图浏览
  370. function browseImg(data, i) {
  371. var imageBrowser = api.require('imageBrowser');
  372. imageBrowser.openImages({
  373. imageUrls: data.split(','),
  374. activeIndex:i,
  375. showList:false
  376. });
  377. }
  378. // 上传文件在线浏览
  379. function browseFile(paths, flag) {
  380. api.download({
  381. url: paths,
  382. report: true,
  383. cache: true,
  384. allowResume: true
  385. }, function(ret, err) {
  386. if (ret.state == 1) {
  387. if (!flag) {
  388. var superFile = api.require('superFile');
  389. superFile.open({path:ret.savePath});
  390. }
  391. setTimeout(function () {
  392. api.toast({
  393. msg: '下载成功',
  394. duration: 2000,
  395. location: 'top'
  396. });
  397. },100)
  398. } else {
  399. }
  400. });
  401. }
  402. </script>
  403. </html>