audit.js 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733
  1. 'use strict';
  2. /**
  3. *
  4. *
  5. * @author Mai
  6. * @date
  7. * @version
  8. */
  9. const auditType = (function () {
  10. const types = [
  11. { key: 'common', name: '个人', value: 1, short: '', long: '', class: '' },
  12. { key: 'and', name: '会签', value: 2, short: '会', long: '多人会签', class: 'primary' },
  13. { key: 'or', name: '或签', value: 3, short: '或', long: '多人或签', class: 'success' },
  14. ];
  15. const key = {};
  16. const info = [];
  17. for (const t of types) {
  18. key[t.key] = t.value;
  19. info[t.value] = t;
  20. }
  21. return { types, key, info };
  22. })();
  23. // 台账审批流程
  24. const ledger = (function() {
  25. const status = {
  26. uncheck: 1, // 待上报
  27. checking: 2, // 待审批|审批中
  28. checked: 3, // 审批通过
  29. checkNo: 4, // 审批退回
  30. };
  31. const statusString = [];
  32. statusString[status.uncheck] = '';
  33. statusString[status.checking] = '审批中';
  34. statusString[status.checked] = '审批完成';
  35. statusString[status.checkNo] = '审批退回';
  36. const statusClass = [];
  37. statusClass[status.uncheck] = '';
  38. statusClass[status.checking] = '';
  39. statusClass[status.checked] = 'text-success';
  40. statusClass[status.checkNo] = 'text-warning';
  41. // 标段概况页
  42. // 描述文本
  43. const auditString = [];
  44. auditString[status.uncheck] = '';
  45. auditString[status.checking] = '审批中';
  46. auditString[status.checked] = '审批通过';
  47. auditString[status.checkNo] = '审批退回';
  48. // 文字样式
  49. const auditStringClass = [];
  50. auditStringClass[status.uncheck] = '';
  51. auditStringClass[status.checking] = 'text-warning';
  52. auditStringClass[status.checked] = 'text-success';
  53. auditStringClass[status.checkNo] = 'text-warning';
  54. // 金额概况
  55. const tiStatusString = [];
  56. tiStatusString[status.uncheck] = '未上报';
  57. tiStatusString[status.checking] = '审批中';
  58. tiStatusString[status.checked] = '审批通过';
  59. tiStatusString[status.checkNo] = '审批退回';
  60. const tiStatusStringClass = [];
  61. tiStatusStringClass[status.uncheck] = '';
  62. tiStatusStringClass[status.checking] = 'text-warning';
  63. tiStatusStringClass[status.checked] = 'text-success';
  64. tiStatusStringClass[status.checkNo] = 'text-warning';
  65. return { status, statusString, statusClass, auditString, auditStringClass, tiStatusString, tiStatusStringClass };
  66. })();
  67. // 台账修订 审批流程
  68. const revise = (function() {
  69. const status = {
  70. uncheck: 1, // 待上报
  71. checking: 2, // 待审批|审批中
  72. checked: 3, // 审批通过
  73. checkNo: 4, // 审批退回
  74. };
  75. const statusString = [];
  76. statusString[status.uncheck] = '草稿';
  77. statusString[status.checking] = '审批中';
  78. statusString[status.checked] = '审批通过';
  79. statusString[status.checkNo] = '审批退回';
  80. const statusClass = [];
  81. statusClass[status.uncheck] = '';
  82. statusClass[status.checking] = '';
  83. statusClass[status.checked] = 'text-success';
  84. statusClass[status.checkNo] = 'text-warning';
  85. // 标段概况页
  86. // 描述文本
  87. const auditString = [];
  88. auditString[status.uncheck] = '';
  89. auditString[status.checking] = '审批中';
  90. auditString[status.checked] = '审批通过';
  91. auditString[status.checkNo] = '审批退回';
  92. // 文字样式
  93. const auditStringClass = [];
  94. auditStringClass[status.uncheck] = '';
  95. auditStringClass[status.checking] = 'text-warning';
  96. auditStringClass[status.checked] = 'text-success';
  97. auditStringClass[status.checkNo] = 'text-warning';
  98. // 描述文本
  99. const auditProgress = [];
  100. auditProgress[status.uncheck] = '草稿';
  101. auditProgress[status.checking] = '审批中';
  102. auditProgress[status.checked] = '审批通过';
  103. auditProgress[status.checkNo] = '审批退回';
  104. // 样式
  105. const auditProgressClass = [];
  106. auditProgressClass[status.uncheck] = '';
  107. auditProgressClass[status.checking] = 'text-warning';
  108. auditProgressClass[status.checked] = 'text-success';
  109. auditProgressClass[status.checkNo] = 'text-warning';
  110. return { status, statusString, statusClass, auditString, auditStringClass, auditProgress, auditProgressClass };
  111. })();
  112. // 期审批流程
  113. const stage = (function() {
  114. // 流程状态
  115. const status = {
  116. uncheck: 1, // 待上报
  117. checking: 2, // 待审批|审批中
  118. checked: 3, // 审批通过
  119. checkNo: 4, // 审批退回原报
  120. checkNoPre: 5, // 审批退回上一人
  121. checkAgain: 6, // 重新审批 // 该状态仅可用于,终审退回时,修改原终审的审批状态,并同时新增一条新的终审审批中记录
  122. checkCancel: 7, // 撤回 // 该状态为上一审批人可发起,回到它到审批阶段,并同时新增一条新的审批中记录
  123. checkSkip: 8, // 跳过
  124. };
  125. // 流程状态提示
  126. const statusString = [];
  127. statusString[status.uncheck] = '待上报';
  128. statusString[status.checking] = '审批中';
  129. statusString[status.checked] = '审批通过';
  130. statusString[status.checkNo] = '审批退回';
  131. statusString[status.checkNoPre] = '审批退回';
  132. statusString[status.checkAgain] = '重新审批';
  133. statusString[status.checkCancel] = '撤回';
  134. // 流程状态样式
  135. const statusClass = [];
  136. statusClass[status.uncheck] = '';
  137. statusClass[status.checking] = '';
  138. statusClass[status.checked] = 'text-success';
  139. statusClass[status.checkNo] = 'text-warning';
  140. statusClass[status.checkNoPre] = 'text-warning';
  141. statusClass[status.checkAgain] = 'text-warning';
  142. statusClass[status.checkCancel] = 'text-warning';
  143. /**
  144. * 期列表,审批状态一列
  145. */
  146. // 按钮
  147. const statusButton = [];
  148. statusButton[status.uncheck] = '待上报';
  149. statusButton[status.checking] = '审批';
  150. statusButton[status.checked] = '';
  151. statusButton[status.checkNo] = '重新上报';
  152. statusButton[status.checkNoPre] = '重新审批';
  153. statusButton[status.checkAgain] = '重新审批';
  154. statusButton[status.checkCancel] = '撤回';
  155. // 按钮样式
  156. const statusButtonClass = [];
  157. statusButtonClass[status.uncheck] = 'btn-primary';
  158. statusButtonClass[status.checking] = 'btn-success';
  159. statusButtonClass[status.checked] = '';
  160. statusButtonClass[status.checkNo] = 'btn-warning';
  161. statusButtonClass[status.checkNoPre] = 'btn-warning';
  162. statusButtonClass[status.checkAgain] = 'btn-warning';
  163. statusButtonClass[status.checkCancel] = 'btn-warning';
  164. // 描述文本
  165. const auditString = [];
  166. auditString[status.uncheck] = '';
  167. auditString[status.checking] = '审批中';
  168. auditString[status.checked] = '审批通过';
  169. auditString[status.checkNo] = '审批退回';
  170. auditString[status.checkNoPre] = '审批退回';
  171. auditString[status.checkAgain] = '重新审批';
  172. auditString[status.checkCancel] = '撤回';
  173. auditString[status.checkSkip] = '审批通过';
  174. // 文字样式
  175. const auditStringClass = [];
  176. auditStringClass[status.uncheck] = '';
  177. auditStringClass[status.checking] = 'text-warning';
  178. auditStringClass[status.checked] = 'text-success';
  179. auditStringClass[status.checkNo] = 'text-warning';
  180. auditStringClass[status.checkNoPre] = 'text-warning';
  181. auditStringClass[status.checkAgain] = 'text-warning';
  182. auditStringClass[status.checkCancel] = 'text-warning';
  183. auditStringClass[status.checkSkip] = 'text-success';
  184. /* ------------------------------------------------------- */
  185. /**
  186. * 期列表,审批进度一列
  187. */
  188. // 描述文本
  189. const auditProgress = [];
  190. auditProgress[status.uncheck] = '待上报';
  191. auditProgress[status.checking] = '审批中';
  192. auditProgress[status.checked] = '审批通过';
  193. auditProgress[status.checkNo] = '审批退回';
  194. auditProgress[status.checkNoPre] = '审批退回';
  195. auditProgress[status.checkAgain] = '重新审批';
  196. auditProgress[status.checkCancel] = '撤回';
  197. // 样式
  198. const auditProgressClass = [];
  199. auditProgressClass[status.uncheck] = '';
  200. auditProgressClass[status.checking] = 'text-warning';
  201. auditProgressClass[status.checked] = 'text-success';
  202. auditProgressClass[status.checkNo] = 'text-warning';
  203. auditProgressClass[status.checkNoPre] = 'text-warning';
  204. auditProgressClass[status.checkAgain] = 'text-warning';
  205. auditProgressClass[status.checkCancel] = 'text-warning';
  206. /* ------------------------------------------------------- */
  207. const tiStatusString = [];
  208. tiStatusString[status.uncheck] = '待上报';
  209. tiStatusString[status.checking] = '审批中';
  210. tiStatusString[status.checked] = '审批通过';
  211. tiStatusString[status.checkNo] = '审批退回';
  212. tiStatusString[status.checkNoPre] = '审批中';
  213. tiStatusString[status.checkAgain] = '审批中';
  214. tiStatusString[status.checkCancel] = '撤回';
  215. const tiStatusStringClass = [];
  216. tiStatusStringClass[status.uncheck] = '';
  217. tiStatusStringClass[status.checking] = 'text-warning';
  218. tiStatusStringClass[status.checked] = 'text-success';
  219. tiStatusStringClass[status.checkNo] = 'text-warning';
  220. tiStatusStringClass[status.checkNoPre] = 'text-warning';
  221. tiStatusStringClass[status.checkAgain] = 'text-warning';
  222. tiStatusStringClass[status.checkCancel] = 'text-warning';
  223. const backType = {
  224. org: 1,
  225. pre: 2,
  226. };
  227. return {
  228. status, statusString, statusClass,
  229. statusButton, statusButtonClass,
  230. auditString, auditStringClass,
  231. auditProgress, auditProgressClass,
  232. backType,
  233. timesLen: 100,
  234. tiStatusString, tiStatusStringClass,
  235. };
  236. })();
  237. // 变更令状态
  238. const status = {
  239. uncheck: 1, // 待上报
  240. checking: 2, // 审批中
  241. checked: 3, // 审批完成
  242. // checkNo: 4, // 审批终止
  243. back: 5, // 重新上报
  244. backnew: 6, // 退回
  245. revise: 9, // 修订变更
  246. };
  247. const statusButton = [];
  248. statusButton[status.uncheck] = '上报';
  249. statusButton[status.checking] = '审批';
  250. statusButton[status.checked] = '';
  251. // statusButton[status.checkNo] = '';
  252. statusButton[status.back] = '重新上报';
  253. statusButton[status.backnew] = '审批';
  254. statusButton[status.revise] = '修订';
  255. const statusButtonClass = [];
  256. statusButtonClass[status.uncheck] = 'btn-primary';
  257. statusButtonClass[status.checking] = 'btn-success';
  258. statusButtonClass[status.checked] = '';
  259. // statusButtonClass[status.checkNo] = '';
  260. statusButtonClass[status.back] = 'btn-warning';
  261. statusButtonClass[status.backnew] = 'btn-success';
  262. statusButtonClass[status.revise] = 'btn-warning';
  263. const statusString = [];
  264. statusString[status.uncheck] = '未上报';
  265. statusString[status.checking] = '审批中';
  266. statusString[status.checked] = '审批通过';
  267. // statusString[status.checkNo] = '终止';
  268. statusString[status.back] = '审批退回';
  269. statusString[status.backnew] = '审批退回';
  270. statusString[status.revise] = '修订中';
  271. const statusClass = [];
  272. statusClass[status.uncheck] = '';
  273. statusClass[status.checking] = 'text-warning';
  274. statusClass[status.checked] = 'text-success';
  275. // statusClass[status.checkNo] = 'text-danger';
  276. statusClass[status.back] = 'text-warning';
  277. statusClass[status.backnew] = 'text-warning';
  278. statusClass[status.revise] = 'text-warning';
  279. /* ------------------------------------------------------- */
  280. // 变更令审批人状态
  281. const auditStatus = {
  282. uncheck: 1, // 待审批
  283. checking: 2, // 审批中或者原报人待上报或者原报上报修订中
  284. checked: 3, // 审批通过或者原报人上报完成
  285. // checkNo: 4, // 审批终止
  286. back: 5, // 退回到原报人重新上报
  287. backnew: 6, // 退回到上一个审批人
  288. checkAgain: 7, // 重新审批
  289. revise: 9, // 修订变更
  290. };
  291. const auditStatusString = [];
  292. auditStatusString[auditStatus.uncheck] = '待上报';
  293. auditStatusString[auditStatus.checking] = '审批中';
  294. auditStatusString[auditStatus.checked] = '审批通过';
  295. // auditStatusString[auditStatus.checkNo] = '审批终止';
  296. auditStatusString[auditStatus.back] = '退回';
  297. auditStatusString[auditStatus.backnew] = '审批退回';
  298. auditStatusString[auditStatus.checkAgain] = '重新审批';
  299. auditStatusString[auditStatus.revise] = '修订变更';
  300. const auditStatusClass = [];
  301. auditStatusClass[auditStatus.uncheck] = '';
  302. auditStatusClass[auditStatus.checking] = 'text-warning';
  303. auditStatusClass[auditStatus.checked] = 'text-success';
  304. // auditStatusClass[auditStatus.checkNo] = 'text-danger';
  305. auditStatusClass[auditStatus.back] = 'text-warning';
  306. auditStatusClass[auditStatus.backnew] = 'text-warning';
  307. auditStatusClass[auditStatus.checkAgain] = 'text-warning';
  308. auditStatusClass[auditStatus.revise] = 'text-warning';
  309. /* ------------------------------------------------------- */
  310. const filter = {
  311. status: {
  312. pending: 1,
  313. uncheck: 5,
  314. checking: 2,
  315. checked: 3,
  316. // checkNo: 4,
  317. },
  318. statusString: [],
  319. };
  320. filter.statusString[filter.status.pending] = '待处理';
  321. filter.statusString[filter.status.uncheck] = '待上报';
  322. filter.statusString[filter.status.checking] = '进行中';
  323. filter.statusString[filter.status.checked] = '已完成';
  324. // filter.statusString[filter.status.checkNo] = '终止';
  325. // 材料调差审批流程
  326. const material = (function() {
  327. const status = {
  328. uncheck: 1, // 待上报
  329. checking: 2, // 待审批|审批中
  330. checked: 3, // 审批通过
  331. checkNo: 4, // 审批退回原报
  332. checkNoPre: 5, // 审批退回上一人
  333. checkAgain: 6, // 终审退回 --该状态仅可用于,终审退回时,修改原终审的审批状态,并同时新增一条新的终审审批中记录
  334. };
  335. // 流程状态提示
  336. const statusString = [];
  337. statusString[status.uncheck] = '待上报';
  338. statusString[status.checking] = '审批中';
  339. statusString[status.checked] = '审批通过';
  340. statusString[status.checkNo] = '审批退回';
  341. statusString[status.checkNoPre] = '审批退回';
  342. statusString[status.checkAgain] = '重新审批';
  343. // 流程状态样式
  344. const statusClass = [];
  345. statusClass[status.uncheck] = '';
  346. statusClass[status.checking] = '';
  347. statusClass[status.checked] = 'text-success';
  348. statusClass[status.checkNo] = 'text-warning';
  349. statusClass[status.checkNoPre] = 'text-warning';
  350. statusClass[status.checkAgain] = 'text-warning';
  351. // 按钮
  352. const statusButton = [];
  353. statusButton[status.uncheck] = '待上报';
  354. statusButton[status.checking] = '审批';
  355. statusButton[status.checked] = '';
  356. statusButton[status.checkNo] = '重新上报';
  357. // 按钮样式
  358. const statusButtonClass = [];
  359. statusButtonClass[status.uncheck] = 'btn-primary';
  360. statusButtonClass[status.checking] = 'btn-success';
  361. statusButtonClass[status.checked] = '';
  362. statusButtonClass[status.checkNo] = 'btn-warning';
  363. // 描述文本
  364. const auditProgress = [];
  365. auditProgress[status.uncheck] = '待上报';
  366. auditProgress[status.checking] = '审批中';
  367. auditProgress[status.checked] = '审批通过';
  368. auditProgress[status.checkNo] = '审批退回';
  369. // 样式
  370. const auditProgressClass = [];
  371. auditProgressClass[status.uncheck] = '';
  372. auditProgressClass[status.checking] = 'text-warning';
  373. auditProgressClass[status.checked] = 'text-success';
  374. auditProgressClass[status.checkNo] = 'text-warning';
  375. return { status, statusString, statusClass, statusButton, statusButtonClass, auditProgress, auditProgressClass };
  376. })();
  377. // 预付款审批流程
  378. const advance = (function() {
  379. const type = {
  380. start: 0,
  381. material: 1,
  382. };
  383. const status = {
  384. uncheck: 1, // 待上报
  385. checking: 2, // 待审批|审批中
  386. checked: 3, // 审批通过
  387. checkNo: 4, // 审批退回原报
  388. checkNoPre: 5, // 审批退回上一人
  389. };
  390. const statusString = [];
  391. statusString[status.uncheck] = '未上报';
  392. statusString[status.checking] = '审批中';
  393. statusString[status.checked] = '审批通过';
  394. statusString[status.checkNo] = '审批退回';
  395. statusString[status.checkNoPre] = '审批退回';
  396. const statusClass = [];
  397. statusClass[status.uncheck] = '';
  398. statusClass[status.checking] = 'text-warning';
  399. statusClass[status.checked] = 'text-success';
  400. statusClass[status.checkNo] = 'text-warning';
  401. statusClass[status.checkNoPre] = 'text-warning';
  402. // 标段概况页
  403. // 描述文本
  404. const auditString = [];
  405. auditString[status.uncheck] = '';
  406. auditString[status.checking] = '审批中';
  407. auditString[status.checked] = '审批通过';
  408. auditString[status.checkNo] = '审批退回';
  409. // 文字样式
  410. const auditStringClass = [];
  411. auditStringClass[status.uncheck] = '';
  412. auditStringClass[status.checking] = 'text-warning';
  413. auditStringClass[status.checked] = 'text-success';
  414. auditStringClass[status.checkNo] = 'text-warning';
  415. return { type, status, statusString, statusClass, auditString, auditStringClass };
  416. })();
  417. // 变更立项 审批流程
  418. const changeProject = (function() {
  419. const status = {
  420. uncheck: 1, // 待上报
  421. checking: 2, // 待审批|审批中
  422. checked: 3, // 审批通过
  423. checkNo: 4, // 审批终止
  424. back: 5, // 退回到原报人重新上报
  425. };
  426. const statusString = [];
  427. statusString[status.uncheck] = '待上报';
  428. statusString[status.checking] = '审批中';
  429. statusString[status.checked] = '审批通过';
  430. statusString[status.checkNo] = '终止';
  431. statusString[status.back] = '审批退回';
  432. const statusClass = [];
  433. statusClass[status.uncheck] = '';
  434. statusClass[status.checking] = 'text-warning';
  435. statusClass[status.checked] = 'text-success';
  436. statusClass[status.checkNo] = 'text-danger';
  437. statusClass[status.back] = 'text-warning';
  438. // 标段概况页
  439. // 描述文本
  440. const auditString = [];
  441. auditString[status.uncheck] = '';
  442. auditString[status.checking] = '审批中';
  443. auditString[status.checked] = '审批通过';
  444. auditString[status.checkNo] = '终止';
  445. auditString[status.back] = '审批退回';
  446. // 文字样式
  447. const auditStringClass = [];
  448. auditStringClass[status.uncheck] = '';
  449. auditStringClass[status.checking] = 'text-warning';
  450. auditStringClass[status.checked] = 'text-success';
  451. auditStringClass[status.checkNo] = 'text-danger';
  452. auditStringClass[status.back] = 'text-warning';
  453. // 描述文本
  454. const auditProgress = [];
  455. auditProgress[status.uncheck] = '草稿';
  456. auditProgress[status.checking] = '审批中';
  457. auditProgress[status.checked] = '审批通过';
  458. auditProgress[status.checkNo] = '终止';
  459. auditProgress[status.back] = '审批退回';
  460. // 样式
  461. const auditProgressClass = [];
  462. auditProgressClass[status.uncheck] = '';
  463. auditProgressClass[status.checking] = 'text-warning';
  464. auditProgressClass[status.checked] = 'text-success';
  465. auditProgressClass[status.checkNo] = 'text-danger';
  466. auditProgressClass[status.back] = 'text-warning';
  467. const filter = {
  468. status: {
  469. pending: 1,
  470. uncheck: 5,
  471. checking: 2,
  472. checked: 3,
  473. checkNo: 4,
  474. },
  475. statusString: [],
  476. };
  477. filter.statusString[filter.status.pending] = '待处理';
  478. filter.statusString[filter.status.uncheck] = '待上报';
  479. filter.statusString[filter.status.checking] = '进行中';
  480. filter.statusString[filter.status.checked] = '已通过';
  481. filter.statusString[filter.status.checkNo] = '终止';
  482. // 按钮
  483. const statusButton = [];
  484. statusButton[status.uncheck] = '上报';
  485. statusButton[status.checking] = '审批';
  486. statusButton[status.checked] = '';
  487. statusButton[status.checkNo] = '';
  488. statusButton[status.back] = '重新上报';
  489. // 按钮样式
  490. const statusButtonClass = [];
  491. statusButtonClass[status.uncheck] = 'btn-primary';
  492. statusButtonClass[status.checking] = 'btn-success';
  493. statusButtonClass[status.checked] = '';
  494. statusButtonClass[status.checkNo] = '';
  495. statusButtonClass[status.back] = 'btn-warning';
  496. return { status, statusString, statusClass, auditString, auditStringClass, auditProgress, auditProgressClass, filter, statusButton, statusButtonClass };
  497. })();
  498. // 变更申请 审批流程
  499. const changeApply = (function() {
  500. const status = {
  501. uncheck: 1, // 待上报
  502. checking: 2, // 待审批|审批中
  503. checked: 3, // 审批通过
  504. checkNo: 4, // 退回到原报人重新上报
  505. };
  506. const statusString = [];
  507. statusString[status.uncheck] = '待上报';
  508. statusString[status.checking] = '审批中';
  509. statusString[status.checked] = '审批通过';
  510. statusString[status.checkNo] = '审批退回';
  511. const statusClass = [];
  512. statusClass[status.uncheck] = '';
  513. statusClass[status.checking] = 'text-warning';
  514. statusClass[status.checked] = 'text-success';
  515. statusClass[status.checkNo] = 'text-warning';
  516. // 标段概况页
  517. // 描述文本
  518. const auditString = [];
  519. auditString[status.uncheck] = '';
  520. auditString[status.checking] = '审批中';
  521. auditString[status.checked] = '审批通过';
  522. auditString[status.checkNo] = '审批退回';
  523. // 文字样式
  524. const auditStringClass = [];
  525. auditStringClass[status.uncheck] = '';
  526. auditStringClass[status.checking] = 'text-warning';
  527. auditStringClass[status.checked] = 'text-success';
  528. auditStringClass[status.checkNo] = 'text-warning';
  529. // 描述文本
  530. const auditProgress = [];
  531. auditProgress[status.uncheck] = '草稿';
  532. auditProgress[status.checking] = '审批中';
  533. auditProgress[status.checked] = '审批通过';
  534. auditProgress[status.checkNo] = '审批退回';
  535. // 样式
  536. const auditProgressClass = [];
  537. auditProgressClass[status.uncheck] = '';
  538. auditProgressClass[status.checking] = 'text-warning';
  539. auditProgressClass[status.checked] = 'text-success';
  540. auditProgressClass[status.checkNo] = 'text-warning';
  541. const filter = {
  542. status: {
  543. pending: 1,
  544. uncheck: 5,
  545. checking: 2,
  546. checked: 3,
  547. // checkNo: 4,
  548. },
  549. statusString: [],
  550. };
  551. filter.statusString[filter.status.pending] = '待处理';
  552. filter.statusString[filter.status.uncheck] = '待上报';
  553. filter.statusString[filter.status.checking] = '进行中';
  554. filter.statusString[filter.status.checked] = '已通过';
  555. // filter.statusString[filter.status.checkNo] = '终止';
  556. // 按钮
  557. const statusButton = [];
  558. statusButton[status.uncheck] = '上报';
  559. statusButton[status.checking] = '审批';
  560. statusButton[status.checked] = '';
  561. statusButton[status.checkNo] = '重新上报';
  562. // 按钮样式
  563. const statusButtonClass = [];
  564. statusButtonClass[status.uncheck] = 'btn-primary';
  565. statusButtonClass[status.checking] = 'btn-success';
  566. statusButtonClass[status.checked] = '';
  567. statusButtonClass[status.checkNo] = 'btn-warning';
  568. return { status, statusString, statusClass, auditString, auditStringClass, auditProgress, auditProgressClass, filter, statusButton, statusButtonClass };
  569. })();
  570. // 变更方案 审批流程
  571. const changePlan = (function() {
  572. const status = {
  573. uncheck: 1, // 待上报
  574. checking: 2, // 待审批|审批中
  575. checked: 3, // 审批通过
  576. checkNo: 4, // 退回到原报人重新上报
  577. };
  578. const statusString = [];
  579. statusString[status.uncheck] = '待上报';
  580. statusString[status.checking] = '审批中';
  581. statusString[status.checked] = '审批通过';
  582. statusString[status.checkNo] = '审批退回';
  583. const statusClass = [];
  584. statusClass[status.uncheck] = '';
  585. statusClass[status.checking] = 'text-warning';
  586. statusClass[status.checked] = 'text-success';
  587. statusClass[status.checkNo] = 'text-warning';
  588. // 标段概况页
  589. // 描述文本
  590. const auditString = [];
  591. auditString[status.uncheck] = '';
  592. auditString[status.checking] = '审批中';
  593. auditString[status.checked] = '审批通过';
  594. auditString[status.checkNo] = '审批退回';
  595. // 文字样式
  596. const auditStringClass = [];
  597. auditStringClass[status.uncheck] = '';
  598. auditStringClass[status.checking] = 'text-warning';
  599. auditStringClass[status.checked] = 'text-success';
  600. auditStringClass[status.checkNo] = 'text-warning';
  601. // 描述文本
  602. const auditProgress = [];
  603. auditProgress[status.uncheck] = '草稿';
  604. auditProgress[status.checking] = '审批中';
  605. auditProgress[status.checked] = '审批通过';
  606. auditProgress[status.checkNo] = '审批退回';
  607. // 样式
  608. const auditProgressClass = [];
  609. auditProgressClass[status.uncheck] = '';
  610. auditProgressClass[status.checking] = 'text-warning';
  611. auditProgressClass[status.checked] = 'text-success';
  612. auditProgressClass[status.checkNo] = 'text-warning';
  613. const filter = {
  614. status: {
  615. pending: 1,
  616. uncheck: 5,
  617. checking: 2,
  618. checked: 3,
  619. // checkNo: 4,
  620. },
  621. statusString: [],
  622. };
  623. filter.statusString[filter.status.pending] = '待处理';
  624. filter.statusString[filter.status.uncheck] = '待上报';
  625. filter.statusString[filter.status.checking] = '进行中';
  626. filter.statusString[filter.status.checked] = '已通过';
  627. // filter.statusString[filter.status.checkNo] = '终止';
  628. // 按钮
  629. const statusButton = [];
  630. statusButton[status.uncheck] = '上报';
  631. statusButton[status.checking] = '审批';
  632. statusButton[status.checked] = '';
  633. statusButton[status.checkNo] = '重新上报';
  634. // 按钮样式
  635. const statusButtonClass = [];
  636. statusButtonClass[status.uncheck] = 'btn-primary';
  637. statusButtonClass[status.checking] = 'btn-success';
  638. statusButtonClass[status.checked] = '';
  639. statusButtonClass[status.checkNo] = 'btn-warning';
  640. return { status, statusString, statusClass, auditString, auditStringClass, auditProgress, auditProgressClass, filter, statusButton, statusButtonClass };
  641. })();
  642. // 推送类型
  643. const pushType = {
  644. material: 1,
  645. stage: 2,
  646. change: 3,
  647. revise: 4,
  648. ledger: 5,
  649. advance: 6,
  650. changeProject: 7,
  651. changeApply: 8,
  652. changePlan: 9,
  653. };
  654. module.exports = {
  655. auditType,
  656. ledger,
  657. stage,
  658. revise,
  659. material,
  660. flow: {
  661. status,
  662. statusString,
  663. statusButton,
  664. statusButtonClass,
  665. statusClass,
  666. auditStatus,
  667. auditStatusString,
  668. auditStatusClass,
  669. },
  670. filter,
  671. pushType,
  672. advance,
  673. changeProject,
  674. changeApply,
  675. changePlan,
  676. };