wordorderDetails.html 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859
  1. <!DOCTYPE html>
  2. <html class="mask">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta
  6. name="viewport"
  7. content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"
  8. />
  9. <meta
  10. name="format-detection"
  11. content="telephone=no,email=no,date=no,address=no"
  12. />
  13. <title></title>
  14. <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
  15. <link rel="stylesheet" href="../../css/style.css" />
  16. <link rel="stylesheet" href="../../css/projeck.css" />
  17. <style>
  18. body {
  19. background: #fff;
  20. }
  21. .hidden {
  22. width: 100%;
  23. height: 100%;
  24. overflow: hidden;
  25. }
  26. .api_layout {
  27. padding: 15px;
  28. }
  29. .column {
  30. margin-bottom: 10px;
  31. }
  32. .aui-row {
  33. border: 1px dashed #c8d2de;
  34. -webkit-border-radius: 5px;
  35. -moz-border-radius: 5px;
  36. border-radius: 5px;
  37. padding: 10px;
  38. }
  39. .technological-process {
  40. margin-top: 10px;
  41. }
  42. /*****/
  43. /*审批进度条*/
  44. .layui-timeline {
  45. padding-left: 5px;
  46. }
  47. .layui-timeline-item {
  48. position: relative;
  49. padding-bottom: 20px;
  50. }
  51. .layui-timeline-item:first-child:before {
  52. display: block;
  53. }
  54. .layui-timeline-item:before {
  55. content: '';
  56. position: absolute;
  57. left: 5px;
  58. top: 0;
  59. z-index: 0;
  60. width: 1px;
  61. height: 100%;
  62. }
  63. .layui-timeline-item:before {
  64. background-color: #e6e6e6;
  65. }
  66. .layui-timeline-item img{
  67. position: absolute;
  68. left: -5px;
  69. top: 0;
  70. z-index: 10;
  71. width: 20px;
  72. height: 20px;
  73. line-height: 20px;
  74. background-color: #fff;
  75. color: #5fb878;
  76. border-radius: 50%;
  77. text-align: center;
  78. cursor: pointer;
  79. border: 1px solid #5fb878;
  80. }
  81. .layui-timeline-content {
  82. padding-left: 25px;
  83. }
  84. .layui-text {
  85. line-height: 22px;
  86. font-size: 14px;
  87. color: #666;
  88. }
  89. .layui-timeline-title {
  90. display: flex;
  91. align-items: center;
  92. justify-content: flex-start;
  93. }
  94. /******/
  95. .aui-list-item-input label {
  96. font-size: 14px;
  97. height: 21px;
  98. display: inline-block;
  99. line-height: 22px;
  100. margin-right: 5px;
  101. }
  102. .aui-list-item-input label:last-child {
  103. margin-right: 0;
  104. }
  105. .itmes li {
  106. display: flex;
  107. justify-content: space-between;
  108. flex-wrap: nowrap;
  109. padding: 10px 0;
  110. position: relative;
  111. }
  112. .itmes li:after {
  113. content: '';
  114. position: absolute;
  115. bottom: 0;
  116. left: 0;
  117. height: 1px;
  118. background: #ebeef3;
  119. width: 100%;
  120. }
  121. .itmes p {
  122. width: 40%;
  123. color: #2c3e50;
  124. font-size: 15px;
  125. }
  126. .itmes p:last-child {
  127. width: 60%;
  128. color: #3498db;
  129. }
  130. .column {
  131. margin-top: 15px;
  132. }
  133. .column-title {
  134. font-size: 15px;
  135. color: #2c3e50;
  136. margin-bottom: 5px;
  137. display: block;
  138. }
  139. .header-img {
  140. width: 50px;
  141. height: 50px;
  142. -webkit-border-radius: 50%;
  143. -moz-border-radius: 50%;
  144. border-radius: 50%;
  145. object-fit: cover;
  146. margin-right: 10px;
  147. }
  148. .img-title {
  149. display: flex;
  150. justify-content: flex-start;
  151. flex-wrap: nowrap;
  152. }
  153. .personalInfo {
  154. margin-bottom: 20px;
  155. }
  156. .personalInfo span {
  157. display: block;
  158. font-size: 14px;
  159. color: #6c6f74;
  160. }
  161. .personalInfo span:first-child {
  162. font-size: 18px;
  163. color: #002257;
  164. }
  165. .examine-success {
  166. background: #1abc9c;
  167. margin-left: 20px;
  168. }
  169. .examine-red {
  170. background: #e74c3c;
  171. }
  172. .staff_name {
  173. width: 50px;
  174. height: 50px;
  175. -webkit-border-radius: 50%;
  176. -moz-border-radius: 50%;
  177. border-radius: 50%;
  178. margin-right: 10px;
  179. line-height: 50px;
  180. text-align: center;
  181. color: #fff;
  182. }
  183. .aui-col-xs-4 img {
  184. object-fit: cover;
  185. border-radius: 3px;
  186. margin: auto;
  187. }
  188. .aui-col-xs-4 span {
  189. overflow: hidden;
  190. text-overflow: ellipsis;
  191. display: -webkit-box;
  192. -webkit-line-clamp: 2;
  193. -webkit-box-orient: vertical;
  194. padding: 0 3px;
  195. height: 48px;
  196. text-align: center;
  197. margin: 5px 0;
  198. font-size: 15px;
  199. }
  200. .fileList img {
  201. width: 35px;
  202. height: 35px;
  203. }
  204. .name-column span {
  205. background: #009fe8;
  206. padding: 4px 4px 2px 4px;
  207. color: #fff;
  208. border-radius: 2px;
  209. font-size: 13px;
  210. }
  211. /*抄送人部分*/
  212. .addNode-name {
  213. padding: 5px 5px;
  214. background: #009fe8;
  215. font-size: 16px;
  216. color: #fff;
  217. font-weight: bold;
  218. text-align: center;
  219. display: inline-block;
  220. border-radius: 2px;
  221. margin-left: 5px;
  222. }
  223. .aui-list-item-input label {
  224. font-size: 14px;
  225. height: 21px;
  226. display: inline-block;
  227. line-height: 22px;
  228. margin-right: 5px;
  229. }
  230. .aui-list-item-input label:last-child {
  231. margin-right: 0;
  232. }
  233. .column {
  234. margin-bottom: 10px;
  235. }
  236. .node-personal {
  237. width: 65%;
  238. display: -webkit-box;
  239. justify-items: flex-start;
  240. align-items: center;
  241. align-content: center;
  242. flex-wrap: wrap;
  243. line-height: normal;
  244. }
  245. .personal-name {
  246. display: inline-block;
  247. font-size: 13px;
  248. padding: 4px 3px;
  249. background: #009fe8;
  250. color: #fff;
  251. border-radius: 2px;
  252. margin-left: 5px;
  253. margin-bottom: 5px;
  254. position: relative;
  255. }
  256. .ico-loading {
  257. position: absolute;
  258. top: 0;
  259. left: 0;
  260. bottom: 0;
  261. right: 0;
  262. margin: auto;
  263. width: 35px;
  264. height: 35px;
  265. background: url('../../icon/loading.gif') no-repeat;
  266. background-size: cover;
  267. background-position: center;
  268. }
  269. .loading {
  270. position: absolute;
  271. width: 100%;
  272. height: 100%;
  273. background: rgba(255, 255, 255, 0.3);
  274. top: 0;
  275. left: 0;
  276. }
  277. /*#personal_List {
  278. background: red;
  279. overflow: scroll;
  280. }*/
  281. .api_layout_box {
  282. z-index: 10000;
  283. }
  284. .forward-content {
  285. margin-top: 10px;
  286. }
  287. .column-textarea {
  288. /*border: 1px solid #97a3b4;*/
  289. border: 1px solid #ccc;
  290. -webkit-border-radius: 5px;
  291. -moz-border-radius: 5px;
  292. border-radius: 5px;
  293. padding: 10px;
  294. height: 160px;
  295. }
  296. .column-textarea::placeholder {
  297. font-size: 14px;
  298. color: #333;
  299. }
  300. .aui-btn-danger-reject,
  301. .aui-btn-success-adopt {
  302. width: 60px;
  303. height: 35px;
  304. text-align: center;
  305. line-height: 35px;
  306. color: #ffffff;
  307. font-size: 14px;
  308. }
  309. .column-select {
  310. -webkit-appearance: none;
  311. /* google */
  312. -moz-appearance: none;
  313. /* firefox */
  314. appearance: none;
  315. /* IE */
  316. }
  317. /* .sureCircle,
  318. .rejectCircle,
  319. .waitCircle {
  320. width: 20px;
  321. height: 20px;
  322. border-radius: 20px;
  323. background-size: 100% 100%;
  324. background-repeat: no-repeat;
  325. } */
  326. .sureCircle {
  327. width: 30px;
  328. height: 30px;
  329. border-radius: 30px;
  330. background-size: cover;
  331. background: url('../../image/sureCircle.png') no-repeat;
  332. }
  333. .rejectCircle {
  334. background: url('../../image/rejectCircle.png') no-repeat;
  335. }
  336. .waitCircle {
  337. background: url('../../image/waitCircle.png') no-repeat;
  338. }
  339. </style>
  340. </head>
  341. <body>
  342. <div class="api_layout" id="wordOrder_details">
  343. <!-- <div class="sureCircle"></div> -->
  344. <!-- <div class="technologicals" style="margin-top:10px">
  345. <label class="column-title">固定审批流程:</label>
  346. <div class="technological-process">
  347. <ul class="layui-timeline">
  348. <li class="layui-timeline-item">
  349. <i class="aui-iconfont aui-icon-correct Correct layui-timeline-axis" ></i>
  350. <div class="layui-timeline-content layui-text">
  351. <div class="layui-timeline-title">
  352. <span>部门负责人:</span>
  353. <div class="name-column">
  354. <span>章三</span>
  355. </div>
  356. </div>
  357. </div>
  358. </li>
  359. <li class="layui-timeline-item">
  360. <i class="aui-iconfont aui-icon-correct Correct layui-timeline-axis" ></i>
  361. <div class="layui-timeline-content layui-text">
  362. <div class="layui-timeline-title">
  363. <span>部门负责人:</span>
  364. <div class="name-column">
  365. <span>章三</span>
  366. </div>
  367. </div>
  368. </div>
  369. </li>
  370. </ul>
  371. </div>
  372. </div> -->
  373. </div>
  374. <!--添加抄送人员-->
  375. <div class="api_layout_box hide">
  376. <div class="box_m">
  377. <div class="api_box">
  378. <div class="selectTitle after-border relative">
  379. <h3 class="h3">选择抄送人</h3>
  380. <i
  381. class="aui-iconfont aui-icon-close api-icon-close"
  382. onclick="closesss()"
  383. ></i>
  384. </div>
  385. <div class="aui-list-item-input relative">
  386. <select
  387. class="column-select input-s font-s"
  388. style="height:40px;-webkit-appearance:none;appearance:none;border:none;font-size:18px;padding:0px 10px;display:block;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;background-color: #FFFFFF;color:#333333;border-radius:4px;"
  389. onchange="getApproList($api.val(this))"
  390. >
  391. <option value="0">请选择部门</option>
  392. </select>
  393. </div>
  394. </div>
  395. <ul class="column" id="personal_List" style="margin-bottom: 0"></ul>
  396. <div class="loading hide">
  397. <i class="ico-loading"></i>
  398. </div>
  399. </div>
  400. </div>
  401. </body>
  402. <!-- 部门人员 -->
  403. <script type="text/template" id="getApproList">
  404. {{ for (var i = 0;i
  405. <it.length;i++) { }} <li class="after-border relative">
  406. <label class="remember-me-label flex-space">
  407. <div class="flex-start">
  408. <img src="" onerror=javascript:this.src="http://jiewei-icon.oss-cn-beijing.aliyuncs.com/icon/default-avatar.png" class="api_leader_head">
  409. <div>
  410. <p class="name font-s">{{=it[i].name}}</p>
  411. <p class="del font-s">{{=it[i].section_fullname}}</p>
  412. </div>
  413. </div>
  414. <div class="remember-password-container">
  415. <div class="remember-password-content">
  416. <input type="checkbox" class='checkbox' onchange="addApproValPesonal(this)" {{=personals.length>0?(it[i].staff_num == personals[i]?'checked':''):''}} value="{{=it[i].staff_num}}" name="{{=it[i].name}}">
  417. <span></span>
  418. </div>
  419. </div>
  420. </label>
  421. </li>
  422. {{ } }}
  423. </script>
  424. <!-- 审批流程 -->
  425. <script type="text/template" id="templateApply">
  426. <label class="column-title">固定审批流程:</label>
  427. <div class="technological-process">
  428. {{ for(var i=0;i
  429. <it.length;i++) { }} <div class="node-content">
  430. <span class="node-name">{{=it[i]}}:</span>
  431. <div class="node-personal" flowName='{{=it[i]}}' jobIDs="">
  432. <i class="aui-iconfont aui-icon-plus addNode-name" onclick="approValPesonal(this)"></i>
  433. </div>
  434. </div>
  435. {{ } }}
  436. </div>
  437. </script>
  438. <!-- 工单编号 分类 名称等 -->
  439. <script type="text/template" id="template">
  440. <div class="personalInfo">
  441. <div class="img-title">
  442. {{?it.staff_avatar === null}}
  443. <p class="staff_name" style="background:#{{=Math.random().toString(16).slice(2,8)}}">{{=it.staff.substr(it.staff.length-1,1)}}</p>
  444. {{??}}
  445. <img src="{{=it.staff_avatar}}" alt="" class="header-img"> {{?}}
  446. <div>
  447. <span>{{=it.staff}}</span>
  448. <span>{{=it.section}}</span>
  449. </div>
  450. </div>
  451. </div>
  452. <ul class="itmes ">
  453. <li>
  454. <p>流程名称:</p>
  455. <p>{{=it.title}}</p>
  456. </li>
  457. </ul>
  458. <ul class="itmes ">
  459. {{ for (var i = 0;i
  460. <it.form.length;i++) { }} {{?it.form[i].type !='images' && it.form[i].type !='files' }} <li>
  461. <p>{{=it.form[i].label}}:</p>
  462. <p>{{=it.form[i].value}}</p>
  463. </li>
  464. {{?}} {{ } }}
  465. </ul>
  466. <div class="column-row">
  467. {{ for (var i = 0;i
  468. <it.form.length;i++) { }} {{?it.form[i].type=='images' && it.form[i].value.length > 0 }} <div class="column">
  469. <label class="column-title">{{=it.form[i].label}}:</label>
  470. <div class="aui-row aui-row-padded">
  471. {{ for (var j = 0;j
  472. <it.form[i].value.length;j++) { }} <div class="aui-col-xs-4">
  473. <img src="{{=it.form[i].value[j]}}" class="colsImg" onload="setUpHeight(this)" onclick="browseImg('{{=it.form[i].value}}','{{=j}}')" />
  474. </div>
  475. {{ } }}
  476. </div>
  477. </div>
  478. {{??it.form[i].type == 'files' && it.form[i].value.length > 0}}
  479. <div class="column">
  480. <label class="column-title">{{=it.form[i].label}}:</label>
  481. <div class="aui-row aui-row-padded fileList">
  482. {{ for (var j = 0;j
  483. <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}}')">
  484. <img src="../../icon/{{=it.form[i].value[j].path.substr(it.form[i].value[j].path.length-3,3)}}.png" />
  485. <span>{{=it.form[i].value[j].name}}</span>
  486. </div>
  487. {{??it.form[i].value[j].path.endsWith('pdf')}}
  488. <div class="aui-col-xs-4" onclick="browseFile('{{=it.form[i].value[j].path}}')">
  489. <img src="../../icon/{{=it.form[i].value[j].path.substr(it.form[i].value[j].path.length-3,3)}}.png" />
  490. <span>{{=it.form[i].value[j].name}}</span>
  491. </div>
  492. {{??it.form[i].value[j].path.endsWith('ppt') || it.form[i].value[j].path.endsWith('ptx')}}
  493. <div class="aui-col-xs-4" onclick="browseFile('{{=it.form[i].value[j].path}}')">
  494. <img src="../../icon/{{=it.form[i].value[j].path.substr(it.form[i].value[j].path.length-3,3)}}.png" />
  495. <span>{{=it.form[i].value[j].name}}</span>
  496. </div>
  497. {{??it.form[i].value[j].path.endsWith('zip') || it.form[i].value[j].path.endsWith('rar')}}
  498. <div class="aui-col-xs-4" onclick="browseFile('{{=it.form[i].value[j].path}}',true)">
  499. <img src="../../icon/{{=it.form[i].value[j].path.substr(it.form[i].value[j].path.length-3,3)}}.png" />
  500. <span>{{=it.form[i].value[j].name}}</span>
  501. </div>
  502. {{??it.form[i].value[j].path.endsWith('xlsx')}}
  503. <div class="aui-col-xs-4" onclick="browseFile('{{=it.form[i].value[j].path}}')">
  504. <img src="../../icon/{{=it.form[i].value[j].path.substr(it.form[i].value[j].path.length-3,3)}}.png" />
  505. <span>{{=it.form[i].value[j].name}}</span>
  506. </div>
  507. {{??}}
  508. <div class="aui-col-xs-4" onclick="browseFile('{{=it.form[i].value[j].path}}')">
  509. <img src="../../icon/OTHER.png" />
  510. <span>{{=it.form[i].value[j].name}}</span>
  511. </div>
  512. {{?}} {{ } }}
  513. </div>
  514. </div>
  515. {{?}} {{ } }}
  516. </div>
  517. <div class="technologicals" style="margin-top:10px">
  518. <label class="column-title">固定审批流程:</label>
  519. <div class="technological-process">
  520. {{ for(var prop in it.flows) { }}
  521. <ul class="layui-timeline">
  522. <li class="layui-timeline-item">
  523. <img src="{{=it.flows[prop].status == 2 ? '../../image/sureCircle.png' : (it.flows[prop].status == 3 ? '../../image/rejectCircle.png':'../../image/waitCircle.png')}} "></i>
  524. <div class="layui-timeline-content layui-text">
  525. <div class="layui-timeline-title">
  526. <span>{{=it.flows[prop].flow_name}}:</span>
  527. <div class="name-column">
  528. {{ for (var j = 0;j
  529. <it.flows[prop].flow.length;j++) { }} <span>{{=it.flows[prop].flow[j]}}</span>
  530. {{ } }}
  531. </div>
  532. </div>
  533. </div>
  534. </li>
  535. </ul>
  536. {{ } }}
  537. </div>
  538. </div>
  539. <!-- 抄送人 根据is- -->
  540. {{?it.is_forward == 1}}
  541. <div class="is-cpoy-module">
  542. <label class="column-title">抄送人:</label>
  543. <div class="chioce-copy-person">
  544. <div class="node-personal" jobIDs="">
  545. <i class="aui-iconfont aui-icon-plus addNode-name" onclick="approValPesonal(this)"></i>
  546. </div>
  547. </div>
  548. <div class="forward-content">
  549. <textarea rows="4" cols="40" class="column-textarea font-s column-textarea1" placeholder="请输入抄送原因"></textarea>
  550. </div>
  551. </div>
  552. {{?}}
  553. <div style="text-align: center;margin-top: 15px">
  554. <div class="aui-btn aui-btn-danger-reject examine-red" onclick="openReject('{{=it.id}}')">驳回</div>
  555. <div class="aui-btn aui-btn-success-adopt examine-success" onclick="openAdopt('{{=it.id}}')">通过</div>
  556. </div>
  557. </script>
  558. <script type="text/javascript" src="../../script/api.js"></script>
  559. <script type="text/javascript" src="../../script/doT.min.js"></script>
  560. <script src="../../script/zepto.js" charset="utf-8"></script>
  561. <script type="text/javascript" src="../../script/config.js"></script>
  562. <script type="text/javascript">
  563. var toast = new auiToast(),
  564. personals = '',
  565. addNodeThis = '';
  566. apiready = function() {
  567. var info = $api.getStorage('data');
  568. token = JSON.parse(info).data.access_token;
  569. getApplyDe(api.pageParam.ID, token);
  570. getApplyDeTwo(api.pageParam.id, token);
  571. };
  572. function getApplyDe(id, token) {
  573. var headers = {
  574. Authorization: 'Bearer ' + token,
  575. };
  576. $http.fnReuestData(
  577. UrlRouter.getExamineDe + id,
  578. headers,
  579. 'get',
  580. '',
  581. function(ret, err) {
  582. // console.log(JSON.stringify(ret.data));
  583. if (ret.code === 0) {
  584. $apis.html(wordOrder_details, '#template', ret.data);
  585. toast.hide();
  586. } else if (ret.code == 1) {
  587. $apis.ToastType(ret.message, 'bottom');
  588. toast.hide();
  589. }
  590. }
  591. );
  592. }
  593. //
  594. function getApplyDeTwo(id, token) {
  595. var headers = {
  596. Authorization: 'Bearer ' + token,
  597. };
  598. $http.fnReuestDataNologing(
  599. UrlRouter.getApplyD + id,
  600. headers,
  601. 'get',
  602. '',
  603. function(ret, err) {
  604. if (ret.code === 0) {
  605. toast.hide();
  606. $apis.append(column_row, '#template', ret.data.form);
  607. $apis.append(technologicals, '#templateApply', ret.data.flow);
  608. }
  609. }
  610. );
  611. }
  612. // 通过
  613. function openAdopt(id) {
  614. var node_personal = $('.node-personal');
  615. var hadFlows = {};
  616. var hadFlows1 = [];
  617. node_personal.each(function(index) {
  618. var personal_names = $(this).find('.personal-name');
  619. // + '-' + index
  620. var key = $(this).attr('flowName');
  621. for (var i = 0; i < personal_names.length; i++) {
  622. hadFlows1.push($(personal_names[i]).attr('jobId'));
  623. }
  624. hadFlows[key] = hadFlows1.join(',');
  625. });
  626. api.openFrame({
  627. name: 'adopt',
  628. bounces: false,
  629. url: 'adopt.html',
  630. bgColor: 'rgba(0,0,0,.6)',
  631. animation: {
  632. type: 'fade',
  633. subType: 'from_right',
  634. duration: 300,
  635. },
  636. rect: {
  637. x: 0,
  638. y: 0,
  639. w: api.winWidth,
  640. h: 'auto',
  641. },
  642. pageParam: {
  643. ID: id,
  644. forward_content: $api.val($api.dom('.column-textarea')),
  645. forward_staff: hadFlows1,
  646. },
  647. });
  648. }
  649. // 驳回
  650. function openReject(id) {
  651. api.openFrame({
  652. name: 'reject',
  653. bounces: false,
  654. url: 'reject.html',
  655. bgColor: 'rgba(0,0,0,.6)',
  656. rect: {
  657. x: 0,
  658. y: 0,
  659. w: api.winWidth,
  660. h: 'auto',
  661. },
  662. animation: {
  663. type: 'fade',
  664. subType: 'from_right',
  665. duration: 300,
  666. },
  667. pageParam: {
  668. ID: id,
  669. },
  670. });
  671. }
  672. // 获取部门
  673. function getDep() {
  674. var headers = {
  675. Authorization: 'Bearer ' + token,
  676. };
  677. $http.fnReuestDataNologing(
  678. UrlRouter.getAlllist,
  679. headers,
  680. 'get',
  681. '',
  682. function(ret, err) {
  683. var html = '';
  684. for (var i = 0; i < ret.data.length; i++) {
  685. if (i == 0) {
  686. html += `<option value="0">请选择部门</option>`;
  687. }
  688. html += `<option value="${ret.data[i].id}">${ret.data[i].title}</option>`;
  689. }
  690. $api.html($api.dom('.column-select'), html);
  691. }
  692. );
  693. }
  694. // 获取人员列表
  695. function getApproList(id) {
  696. $api.removeCls($api.dom('.loading'), 'hide');
  697. $apis.html(personal_List, '#getApproList', '');
  698. var headers = {
  699. Authorization: 'Bearer ' + token,
  700. };
  701. $http.fnReuestDataNologing(
  702. UrlRouter.getPersonalList,
  703. headers,
  704. 'post',
  705. {
  706. id: id,
  707. },
  708. function(ret, err) {
  709. if (ret.code === 0) {
  710. $api.addCls($api.dom('.loading'), 'hide');
  711. $apis.html(personal_List, '#getApproList', ret.data);
  712. }
  713. }
  714. );
  715. }
  716. // 添加抄送人员
  717. function addApproValPesonal(that) {
  718. var personal_name = $(addNodeThis)
  719. .parent()
  720. .find('.personal-name');
  721. var name = $api.attr(that, 'name'),
  722. ID = $api.val(that),
  723. IDS = [];
  724. let addSdtaffNum = [];
  725. if (that.checked) {
  726. $api.prepend(
  727. addNodeThis.parentNode,
  728. `<sapn class="personal-name" jobId="${ID}" ondblclick="this.remove()">${name}</span>`
  729. );
  730. $(addNodeThis)
  731. .parent()
  732. .attr('jobIDs', IDS.push(ID));
  733. // console.log(JSON.stringify($('.personal-name').attr('jobId')));
  734. } else {
  735. $(addNodeThis)
  736. .parent()
  737. .find('[jobid*="' + ID + '"]')
  738. .remove();
  739. // console.log(JSON.stringify($('.personal-name').attr('jobId')));
  740. }
  741. }
  742. // 打开抄送人
  743. var ruleTop = '';
  744. function approValPesonal(that) {
  745. addNodeThis = that;
  746. $('.api_layout_box').show();
  747. $('.mask').addClass('hidden');
  748. ruleTop = $(addNodeThis).offset().top;
  749. $apis.html(personal_List, '#getApproList', '');
  750. getDep(); //调用部门接口
  751. }
  752. // 关闭
  753. function closesss() {
  754. $('.api_layout_box').hide();
  755. $('.mask').removeClass('hidden');
  756. $('body,html').scrollTop(ruleTop);
  757. }
  758. // 上传图片的高度
  759. function setUpHeight(that) {
  760. that.style.width = that.offsetWidth + 'px';
  761. that.style.height = that.offsetWidth + 'px';
  762. }
  763. // 上传图浏览
  764. function browseImg(data, i) {
  765. var imageBrowser = api.require('imageBrowser');
  766. imageBrowser.openImages({
  767. imageUrls: data.split(','),
  768. activeIndex: i,
  769. showList: false,
  770. });
  771. }
  772. // 上传文件在线浏览
  773. function browseFile(paths, flag) {
  774. api.download(
  775. {
  776. url: paths,
  777. report: true,
  778. cache: true,
  779. allowResume: true,
  780. },
  781. function(ret, err) {
  782. if (ret.state == 1) {
  783. if (!flag) {
  784. var superFile = api.require('superFile');
  785. superFile.open({
  786. path: ret.savePath,
  787. });
  788. }
  789. setTimeout(function() {
  790. api.toast({
  791. msg: '下载成功',
  792. duration: 2000,
  793. location: 'top',
  794. });
  795. }, 100);
  796. } else {
  797. }
  798. }
  799. );
  800. }
  801. </script>
  802. </html>