audit.js 46 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138
  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', valid: ['ledger', 'revise', 'stage', 'change'] },
  13. { key: 'or', name: '或签', value: 3, short: '或', long: '多人或签', class: 'success', valid: ['ledger', 'revise', 'stage', 'change'] },
  14. { key: 'union', name: '协同', value: 4, short: '协', long: '多人协同', class: 'warning', valid: ['stage']},
  15. ];
  16. const key = {};
  17. const info = [];
  18. for (const t of types) {
  19. key[t.key] = t.value;
  20. info[t.value] = t;
  21. }
  22. return { types, key, info };
  23. })();
  24. // 期审批流程
  25. const common = (function() {
  26. const auditStatusInfo = [
  27. { key: 'uncheck', value: 1, title: '待上报', class: '', btnTitle: '上报', btnClass: 'btn-primary' },
  28. { key: 'checking', value: 2, title: '审批中', class: 'text-warning', btnTitle: '审批', btnClass: 'btn-success' },
  29. { key: 'checked', value: 3, title: '审批通过', class: 'text-success', btnTitle: '', btnClass: 'btn-primary' },
  30. { key: 'checkNo', value: 4, title: '审批退回', class: 'text-warning', btnTitle: '重新上报', btnClass: 'btn-primary' },
  31. { key: 'checkNoPre', value: 5, title: '审批退回', class: 'text-warning', btnTitle: '重新审批', btnClass: 'btn-primary' },
  32. { key: 'checkSkip', value: 6, title: '', class: '', btnTitle: '', btnClass: '' },
  33. { key: 'checkCancel', value: 7, title: '撤回', class: 'text-warning', btnTitle: '', btnClass: '' },
  34. { key: 'checkAgain', value: 8, title: '重新审批', class: 'text-warning', btnTitle: '', btnClass: '' },
  35. ];
  36. return (function(){
  37. const status = {}, info = [];
  38. for (const i of auditStatusInfo) {
  39. status[i.key] = i.value;
  40. info[i.value] = i;
  41. }
  42. return {status, info, timesLen: 100, backType: { org: 1, pre: 2 }};
  43. })();
  44. })();
  45. // 台账审批流程
  46. const ledger = (function() {
  47. const status = {
  48. uncheck: 1, // 待上报
  49. checking: 2, // 待审批|审批中
  50. checked: 3, // 审批通过
  51. checkNo: 4, // 审批退回
  52. checkAgain: 6, // 重新审批 // 该状态仅可用于,终审退回时,修改原终审的审批状态,并同时新增一条新的终审审批中记录
  53. checkSkip: 8, // 跳过
  54. };
  55. const statusString = [];
  56. statusString[status.uncheck] = '';
  57. statusString[status.checking] = '审批中';
  58. statusString[status.checked] = '审批完成';
  59. statusString[status.checkNo] = '审批退回';
  60. statusString[status.checkAgain] = '重新审批';
  61. const statusClass = [];
  62. statusClass[status.uncheck] = '';
  63. statusClass[status.checking] = 'text-warning';
  64. statusClass[status.checked] = 'text-success';
  65. statusClass[status.checkNo] = 'text-warning';
  66. statusClass[status.checkAgain] = 'text-warning';
  67. // 标段概况页
  68. // 描述文本
  69. const auditString = [];
  70. auditString[status.uncheck] = '';
  71. auditString[status.checking] = '审批中';
  72. auditString[status.checked] = '审批通过';
  73. auditString[status.checkNo] = '审批退回';
  74. auditString[status.checkAgain] = '重新审批';
  75. auditString[status.checkSkip] = '审批通过';
  76. // 文字样式
  77. const auditStringClass = [];
  78. auditStringClass[status.uncheck] = '';
  79. auditStringClass[status.checking] = 'text-warning';
  80. auditStringClass[status.checked] = 'text-success';
  81. auditStringClass[status.checkNo] = 'text-warning';
  82. auditStringClass[status.checkAgain] = 'text-warning';
  83. auditString[status.checkSkip] = 'text-success';
  84. // 金额概况
  85. const tiStatusString = [];
  86. tiStatusString[status.uncheck] = '未上报';
  87. tiStatusString[status.checking] = '审批中';
  88. tiStatusString[status.checked] = '审批通过';
  89. tiStatusString[status.checkNo] = '审批退回';
  90. tiStatusString[status.checkAgain] = '审批中';
  91. const tiStatusStringClass = [];
  92. tiStatusStringClass[status.uncheck] = '';
  93. tiStatusStringClass[status.checking] = 'text-warning';
  94. tiStatusStringClass[status.checked] = 'text-success';
  95. tiStatusStringClass[status.checkNo] = 'text-warning';
  96. tiStatusStringClass[status.checkAgain] = 'text-warning';
  97. return { status, statusString, statusClass, auditString, auditStringClass, tiStatusString, tiStatusStringClass };
  98. })();
  99. // 台账修订 审批流程
  100. const revise = (function() {
  101. const status = {
  102. uncheck: 1, // 待上报
  103. checking: 2, // 待审批|审批中
  104. checked: 3, // 审批通过
  105. checkNo: 4, // 审批退回
  106. };
  107. const statusString = [];
  108. statusString[status.uncheck] = '草稿';
  109. statusString[status.checking] = '审批中';
  110. statusString[status.checked] = '审批通过';
  111. statusString[status.checkNo] = '审批退回';
  112. const statusClass = [];
  113. statusClass[status.uncheck] = '';
  114. statusClass[status.checking] = 'text-warning';
  115. statusClass[status.checked] = 'text-success';
  116. statusClass[status.checkNo] = 'text-warning';
  117. // 标段概况页
  118. // 描述文本
  119. const auditString = [];
  120. auditString[status.uncheck] = '';
  121. auditString[status.checking] = '审批中';
  122. auditString[status.checked] = '审批通过';
  123. auditString[status.checkNo] = '审批退回';
  124. // 文字样式
  125. const auditStringClass = [];
  126. auditStringClass[status.uncheck] = '';
  127. auditStringClass[status.checking] = 'text-warning';
  128. auditStringClass[status.checked] = 'text-success';
  129. auditStringClass[status.checkNo] = 'text-warning';
  130. // 描述文本
  131. const auditProgress = [];
  132. auditProgress[status.uncheck] = '草稿';
  133. auditProgress[status.checking] = '审批中';
  134. auditProgress[status.checked] = '审批通过';
  135. auditProgress[status.checkNo] = '审批退回';
  136. // 样式
  137. const auditProgressClass = [];
  138. auditProgressClass[status.uncheck] = '';
  139. auditProgressClass[status.checking] = 'text-warning';
  140. auditProgressClass[status.checked] = 'text-success';
  141. auditProgressClass[status.checkNo] = 'text-warning';
  142. return { status, statusString, statusClass, auditString, auditStringClass, auditProgress, auditProgressClass };
  143. })();
  144. // 期审批流程
  145. const stage = (function() {
  146. // 流程状态
  147. const status = {
  148. uncheck: 1, // 待上报
  149. checking: 2, // 待审批|审批中
  150. checked: 3, // 审批通过
  151. checkNo: 4, // 审批退回原报
  152. checkNoPre: 5, // 审批退回上一人
  153. checkAgain: 6, // 重新审批 // 该状态仅可用于,终审退回时,修改原终审的审批状态,并同时新增一条新的终审审批中记录
  154. checkCancel: 7, // 撤回 // 该状态为上一审批人可发起,回到它到审批阶段,并同时新增一条新的审批中记录
  155. checkSkip: 8, // 跳过
  156. };
  157. // 流程状态提示
  158. const statusString = [];
  159. statusString[status.uncheck] = '待上报';
  160. statusString[status.checking] = '审批中';
  161. statusString[status.checked] = '审批通过';
  162. statusString[status.checkNo] = '审批退回';
  163. statusString[status.checkNoPre] = '审批退回';
  164. statusString[status.checkAgain] = '重新审批';
  165. statusString[status.checkCancel] = '撤回';
  166. // 流程状态样式
  167. const statusClass = [];
  168. statusClass[status.uncheck] = '';
  169. statusClass[status.checking] = 'text-warning';
  170. statusClass[status.checked] = 'text-success';
  171. statusClass[status.checkNo] = 'text-warning';
  172. statusClass[status.checkNoPre] = 'text-warning';
  173. statusClass[status.checkAgain] = 'text-warning';
  174. statusClass[status.checkCancel] = 'text-warning';
  175. /**
  176. * 期列表,审批状态一列
  177. */
  178. // 按钮
  179. const statusButton = [];
  180. statusButton[status.uncheck] = '待上报';
  181. statusButton[status.checking] = '审批';
  182. statusButton[status.checked] = '';
  183. statusButton[status.checkNo] = '重新上报';
  184. statusButton[status.checkNoPre] = '重新审批';
  185. statusButton[status.checkAgain] = '重新审批';
  186. statusButton[status.checkCancel] = '撤回';
  187. // 按钮样式
  188. const statusButtonClass = [];
  189. statusButtonClass[status.uncheck] = 'btn-primary';
  190. statusButtonClass[status.checking] = 'btn-success';
  191. statusButtonClass[status.checked] = '';
  192. statusButtonClass[status.checkNo] = 'btn-warning';
  193. statusButtonClass[status.checkNoPre] = 'btn-warning';
  194. statusButtonClass[status.checkAgain] = 'btn-warning';
  195. statusButtonClass[status.checkCancel] = 'btn-warning';
  196. // 描述文本
  197. const auditString = [];
  198. auditString[status.uncheck] = '';
  199. auditString[status.checking] = '审批中';
  200. auditString[status.checked] = '审批通过';
  201. auditString[status.checkNo] = '审批退回';
  202. auditString[status.checkNoPre] = '审批退回';
  203. auditString[status.checkAgain] = '重新审批';
  204. auditString[status.checkCancel] = '撤回';
  205. auditString[status.checkSkip] = '审批通过';
  206. // 文字样式
  207. const auditStringClass = [];
  208. auditStringClass[status.uncheck] = '';
  209. auditStringClass[status.checking] = 'text-warning';
  210. auditStringClass[status.checked] = 'text-success';
  211. auditStringClass[status.checkNo] = 'text-warning';
  212. auditStringClass[status.checkNoPre] = 'text-warning';
  213. auditStringClass[status.checkAgain] = 'text-warning';
  214. auditStringClass[status.checkCancel] = 'text-warning';
  215. auditStringClass[status.checkSkip] = 'text-success';
  216. /* ------------------------------------------------------- */
  217. /**
  218. * 期列表,审批进度一列
  219. */
  220. // 描述文本
  221. const auditProgress = [];
  222. auditProgress[status.uncheck] = '待上报';
  223. auditProgress[status.checking] = '审批中';
  224. auditProgress[status.checked] = '审批通过';
  225. auditProgress[status.checkNo] = '审批退回';
  226. auditProgress[status.checkNoPre] = '审批退回';
  227. auditProgress[status.checkAgain] = '重新审批';
  228. auditProgress[status.checkCancel] = '撤回';
  229. // 样式
  230. const auditProgressClass = [];
  231. auditProgressClass[status.uncheck] = '';
  232. auditProgressClass[status.checking] = 'text-warning';
  233. auditProgressClass[status.checked] = 'text-success';
  234. auditProgressClass[status.checkNo] = 'text-warning';
  235. auditProgressClass[status.checkNoPre] = 'text-warning';
  236. auditProgressClass[status.checkAgain] = 'text-warning';
  237. auditProgressClass[status.checkCancel] = 'text-warning';
  238. /* ------------------------------------------------------- */
  239. const tiStatusString = [];
  240. tiStatusString[status.uncheck] = '待上报';
  241. tiStatusString[status.checking] = '审批中';
  242. tiStatusString[status.checked] = '审批通过';
  243. tiStatusString[status.checkNo] = '审批退回';
  244. tiStatusString[status.checkNoPre] = '审批中';
  245. tiStatusString[status.checkAgain] = '审批中';
  246. tiStatusString[status.checkCancel] = '撤回';
  247. const tiStatusStringClass = [];
  248. tiStatusStringClass[status.uncheck] = '';
  249. tiStatusStringClass[status.checking] = 'text-warning';
  250. tiStatusStringClass[status.checked] = 'text-success';
  251. tiStatusStringClass[status.checkNo] = 'text-warning';
  252. tiStatusStringClass[status.checkNoPre] = 'text-warning';
  253. tiStatusStringClass[status.checkAgain] = 'text-warning';
  254. tiStatusStringClass[status.checkCancel] = 'text-warning';
  255. const backType = {
  256. org: 1,
  257. pre: 2,
  258. };
  259. return {
  260. status, statusString, statusClass,
  261. statusButton, statusButtonClass,
  262. auditString, auditStringClass,
  263. auditProgress, auditProgressClass,
  264. backType,
  265. timesLen: 100,
  266. tiStatusString, tiStatusStringClass,
  267. };
  268. })();
  269. // 结算
  270. const settle = (function() {
  271. // 流程状态
  272. const status = {
  273. uncheck: 1, // 待上报
  274. checking: 2, // 待审批|审批中
  275. checked: 3, // 审批通过
  276. checkNo: 4, // 审批退回原报
  277. checkNoPre: 5, // 审批退回上一人
  278. checkAgain: 6, // 重新审批 // 该状态仅可用于,终审退回时,修改原终审的审批状态,并同时新增一条新的终审审批中记录
  279. checkCancel: 7, // 撤回 // 该状态为上一审批人可发起,回到它到审批阶段,并同时新增一条新的审批中记录
  280. checkSkip: 8, // 跳过
  281. };
  282. // 流程状态提示
  283. const statusString = [];
  284. statusString[status.uncheck] = '待上报';
  285. statusString[status.checking] = '审批中';
  286. statusString[status.checked] = '审批通过';
  287. statusString[status.checkNo] = '审批退回';
  288. statusString[status.checkNoPre] = '审批退回';
  289. statusString[status.checkAgain] = '重新审批';
  290. statusString[status.checkCancel] = '撤回';
  291. // 流程状态样式
  292. const statusClass = [];
  293. statusClass[status.uncheck] = '';
  294. statusClass[status.checking] = 'text-warning';
  295. statusClass[status.checked] = 'text-success';
  296. statusClass[status.checkNo] = 'text-warning';
  297. statusClass[status.checkNoPre] = 'text-warning';
  298. statusClass[status.checkAgain] = 'text-warning';
  299. statusClass[status.checkCancel] = 'text-warning';
  300. /**
  301. * 期列表,审批状态一列
  302. */
  303. // 按钮
  304. const statusButton = [];
  305. statusButton[status.uncheck] = '待上报';
  306. statusButton[status.checking] = '审批';
  307. statusButton[status.checked] = '';
  308. statusButton[status.checkNo] = '重新上报';
  309. statusButton[status.checkNoPre] = '重新审批';
  310. statusButton[status.checkAgain] = '重新审批';
  311. statusButton[status.checkCancel] = '撤回';
  312. // 按钮样式
  313. const statusButtonClass = [];
  314. statusButtonClass[status.uncheck] = 'btn-primary';
  315. statusButtonClass[status.checking] = 'btn-success';
  316. statusButtonClass[status.checked] = '';
  317. statusButtonClass[status.checkNo] = 'btn-warning';
  318. statusButtonClass[status.checkNoPre] = 'btn-warning';
  319. statusButtonClass[status.checkAgain] = 'btn-warning';
  320. statusButtonClass[status.checkCancel] = 'btn-warning';
  321. // 描述文本
  322. const auditString = [];
  323. auditString[status.uncheck] = '';
  324. auditString[status.checking] = '审批中';
  325. auditString[status.checked] = '审批通过';
  326. auditString[status.checkNo] = '审批退回';
  327. auditString[status.checkNoPre] = '审批退回';
  328. auditString[status.checkAgain] = '重新审批';
  329. auditString[status.checkCancel] = '撤回';
  330. auditString[status.checkSkip] = '审批通过';
  331. // 文字样式
  332. const auditStringClass = [];
  333. auditStringClass[status.uncheck] = '';
  334. auditStringClass[status.checking] = 'text-warning';
  335. auditStringClass[status.checked] = 'text-success';
  336. auditStringClass[status.checkNo] = 'text-warning';
  337. auditStringClass[status.checkNoPre] = 'text-warning';
  338. auditStringClass[status.checkAgain] = 'text-warning';
  339. auditStringClass[status.checkCancel] = 'text-warning';
  340. auditStringClass[status.checkSkip] = 'text-success';
  341. /* ------------------------------------------------------- */
  342. /**
  343. * 期列表,审批进度一列
  344. */
  345. // 描述文本
  346. const auditProgress = [];
  347. auditProgress[status.uncheck] = '待上报';
  348. auditProgress[status.checking] = '审批中';
  349. auditProgress[status.checked] = '审批通过';
  350. auditProgress[status.checkNo] = '审批退回';
  351. auditProgress[status.checkNoPre] = '审批退回';
  352. auditProgress[status.checkAgain] = '重新审批';
  353. auditProgress[status.checkCancel] = '撤回';
  354. // 样式
  355. const auditProgressClass = [];
  356. auditProgressClass[status.uncheck] = '';
  357. auditProgressClass[status.checking] = 'text-warning';
  358. auditProgressClass[status.checked] = 'text-success';
  359. auditProgressClass[status.checkNo] = 'text-warning';
  360. auditProgressClass[status.checkNoPre] = 'text-warning';
  361. auditProgressClass[status.checkAgain] = 'text-warning';
  362. auditProgressClass[status.checkCancel] = 'text-warning';
  363. /* ------------------------------------------------------- */
  364. const tiStatusString = [];
  365. tiStatusString[status.uncheck] = '待上报';
  366. tiStatusString[status.checking] = '审批中';
  367. tiStatusString[status.checked] = '审批通过';
  368. tiStatusString[status.checkNo] = '审批退回';
  369. tiStatusString[status.checkNoPre] = '审批中';
  370. tiStatusString[status.checkAgain] = '审批中';
  371. tiStatusString[status.checkCancel] = '撤回';
  372. const tiStatusStringClass = [];
  373. tiStatusStringClass[status.uncheck] = '';
  374. tiStatusStringClass[status.checking] = 'text-warning';
  375. tiStatusStringClass[status.checked] = 'text-success';
  376. tiStatusStringClass[status.checkNo] = 'text-warning';
  377. tiStatusStringClass[status.checkNoPre] = 'text-warning';
  378. tiStatusStringClass[status.checkAgain] = 'text-warning';
  379. tiStatusStringClass[status.checkCancel] = 'text-warning';
  380. const backType = {
  381. org: 1,
  382. pre: 2,
  383. };
  384. return {
  385. status, statusString, statusClass,
  386. statusButton, statusButtonClass,
  387. auditString, auditStringClass,
  388. auditProgress, auditProgressClass,
  389. backType,
  390. timesLen: 100,
  391. tiStatusString, tiStatusStringClass,
  392. };
  393. })();
  394. // 变更令状态
  395. const status = {
  396. uncheck: 1, // 待上报
  397. checking: 2, // 审批中
  398. checked: 3, // 审批完成
  399. // checkNo: 4, // 审批终止
  400. back: 5, // 重新上报
  401. backnew: 6, // 退回
  402. revise: 9, // 修订变更
  403. checkCancel: 11, // 撤回 // 该状态为上一审批人可发起,回到它到审批阶段,并同时新增一条新的审批中记录
  404. };
  405. const statusButton = [];
  406. statusButton[status.uncheck] = '上报';
  407. statusButton[status.checking] = '审批';
  408. statusButton[status.checked] = '';
  409. // statusButton[status.checkNo] = '';
  410. statusButton[status.back] = '重新上报';
  411. statusButton[status.backnew] = '审批';
  412. statusButton[status.revise] = '修订';
  413. statusButton[status.checkCancel] = '撤回';
  414. const statusButtonClass = [];
  415. statusButtonClass[status.uncheck] = 'btn-primary';
  416. statusButtonClass[status.checking] = 'btn-success';
  417. statusButtonClass[status.checked] = '';
  418. // statusButtonClass[status.checkNo] = '';
  419. statusButtonClass[status.back] = 'btn-warning';
  420. statusButtonClass[status.backnew] = 'btn-success';
  421. statusButtonClass[status.revise] = 'btn-warning';
  422. statusButtonClass[status.checkCancel] = 'btn-warning';
  423. const statusString = [];
  424. statusString[status.uncheck] = '未上报';
  425. statusString[status.checking] = '审批中';
  426. statusString[status.checked] = '审批通过';
  427. // statusString[status.checkNo] = '终止';
  428. statusString[status.back] = '审批退回';
  429. statusString[status.backnew] = '审批退回';
  430. statusString[status.revise] = '修订中';
  431. statusString[status.checkCancel] = '撤回';
  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. statusClass[status.backnew] = 'text-warning';
  439. statusClass[status.revise] = 'text-warning';
  440. statusClass[status.checkCancel] = 'text-warning';
  441. /* ------------------------------------------------------- */
  442. // 变更令审批人状态
  443. const auditStatus = {
  444. uncheck: 1, // 待审批
  445. checking: 2, // 审批中或者原报人待上报或者原报上报修订中
  446. checked: 3, // 审批通过或者原报人上报完成
  447. // checkNo: 4, // 审批终止
  448. back: 5, // 退回到原报人重新上报
  449. backnew: 6, // 退回到上一个审批人
  450. checkAgain: 7, // 重新审批
  451. revise: 9, // 修订变更
  452. cancelRevise: 10, // 撤销修订
  453. checkCancel: 11, // 撤回 // 该状态为上一审批人可发起,回到它到审批阶段,并同时新增一条新的审批中记录
  454. };
  455. const auditStatusString = [];
  456. auditStatusString[auditStatus.uncheck] = '待上报';
  457. auditStatusString[auditStatus.checking] = '审批中';
  458. auditStatusString[auditStatus.checked] = '审批通过';
  459. // auditStatusString[auditStatus.checkNo] = '审批终止';
  460. auditStatusString[auditStatus.back] = '退回';
  461. auditStatusString[auditStatus.backnew] = '审批退回';
  462. auditStatusString[auditStatus.checkAgain] = '重新审批';
  463. auditStatusString[auditStatus.revise] = '修订变更';
  464. auditStatusString[auditStatus.cancelRevise] = '撤销修订';
  465. auditStatusString[auditStatus.checkCancel] = '撤回';
  466. const auditStatusClass = [];
  467. auditStatusClass[auditStatus.uncheck] = '';
  468. auditStatusClass[auditStatus.checking] = 'text-warning';
  469. auditStatusClass[auditStatus.checked] = 'text-success';
  470. // auditStatusClass[auditStatus.checkNo] = 'text-danger';
  471. auditStatusClass[auditStatus.back] = 'text-warning';
  472. auditStatusClass[auditStatus.backnew] = 'text-warning';
  473. auditStatusClass[auditStatus.checkAgain] = 'text-warning';
  474. auditStatusClass[auditStatus.revise] = 'text-warning';
  475. auditStatusClass[auditStatus.cancelRevise] = 'text-success';
  476. auditStatusClass[auditStatus.checkCancel] = 'text-warning';
  477. /* ------------------------------------------------------- */
  478. const filter = {
  479. status: {
  480. pending: 1,
  481. uncheck: 5,
  482. checking: 2,
  483. checked: 3,
  484. // checkNo: 4,
  485. },
  486. statusString: [],
  487. };
  488. filter.statusString[filter.status.pending] = '待处理';
  489. filter.statusString[filter.status.uncheck] = '待上报';
  490. filter.statusString[filter.status.checking] = '进行中';
  491. filter.statusString[filter.status.checked] = '已完成';
  492. // filter.statusString[filter.status.checkNo] = '终止';
  493. // 材料调差审批流程
  494. const material = (function() {
  495. const status = {
  496. uncheck: 1, // 待上报
  497. checking: 2, // 待审批|审批中
  498. checked: 3, // 审批通过
  499. checkNo: 4, // 审批退回原报
  500. checkNoPre: 5, // 审批退回上一人
  501. checkAgain: 6, // 终审退回 --该状态仅可用于,终审退回时,修改原终审的审批状态,并同时新增一条新的终审审批中记录
  502. };
  503. // 流程状态提示
  504. const statusString = [];
  505. statusString[status.uncheck] = '待上报';
  506. statusString[status.checking] = '审批中';
  507. statusString[status.checked] = '审批通过';
  508. statusString[status.checkNo] = '审批退回';
  509. statusString[status.checkNoPre] = '审批退回';
  510. statusString[status.checkAgain] = '重新审批';
  511. // 流程状态样式
  512. const statusClass = [];
  513. statusClass[status.uncheck] = '';
  514. statusClass[status.checking] = 'text-warning';
  515. statusClass[status.checked] = 'text-success';
  516. statusClass[status.checkNo] = 'text-warning';
  517. statusClass[status.checkNoPre] = 'text-warning';
  518. statusClass[status.checkAgain] = 'text-warning';
  519. // 按钮
  520. const statusButton = [];
  521. statusButton[status.uncheck] = '待上报';
  522. statusButton[status.checking] = '审批';
  523. statusButton[status.checked] = '';
  524. statusButton[status.checkNo] = '重新上报';
  525. // 按钮样式
  526. const statusButtonClass = [];
  527. statusButtonClass[status.uncheck] = 'btn-primary';
  528. statusButtonClass[status.checking] = 'btn-success';
  529. statusButtonClass[status.checked] = '';
  530. statusButtonClass[status.checkNo] = 'btn-warning';
  531. // 描述文本
  532. const auditProgress = [];
  533. auditProgress[status.uncheck] = '待上报';
  534. auditProgress[status.checking] = '审批中';
  535. auditProgress[status.checked] = '审批通过';
  536. auditProgress[status.checkNo] = '审批退回';
  537. // 样式
  538. const auditProgressClass = [];
  539. auditProgressClass[status.uncheck] = '';
  540. auditProgressClass[status.checking] = 'text-warning';
  541. auditProgressClass[status.checked] = 'text-success';
  542. auditProgressClass[status.checkNo] = 'text-warning';
  543. return { status, statusString, statusClass, statusButton, statusButtonClass, auditProgress, auditProgressClass };
  544. })();
  545. // 预付款审批流程
  546. const advance = (function() {
  547. const type = {
  548. start: 0,
  549. material: 1,
  550. };
  551. const status = {
  552. uncheck: 1, // 待上报
  553. checking: 2, // 待审批|审批中
  554. checked: 3, // 审批通过
  555. checkNo: 4, // 审批退回原报
  556. checkNoPre: 5, // 审批退回上一人
  557. checkAgain: 6, // 终审退回 --该状态仅可用于,终审退回时,修改原终审的审批状态,并同时新增一条新的终审审批中记录
  558. };
  559. const statusString = [];
  560. statusString[status.uncheck] = '未上报';
  561. statusString[status.checking] = '审批中';
  562. statusString[status.checked] = '审批通过';
  563. statusString[status.checkNo] = '审批退回';
  564. statusString[status.checkNoPre] = '审批退回';
  565. statusString[status.checkAgain] = '重新审批';
  566. const statusClass = [];
  567. statusClass[status.uncheck] = '';
  568. statusClass[status.checking] = 'text-warning';
  569. statusClass[status.checked] = 'text-success';
  570. statusClass[status.checkNo] = 'text-warning';
  571. statusClass[status.checkNoPre] = 'text-warning';
  572. statusClass[status.checkAgain] = 'text-warning';
  573. // 标段概况页
  574. // 描述文本
  575. const auditString = [];
  576. auditString[status.uncheck] = '';
  577. auditString[status.checking] = '审批中';
  578. auditString[status.checked] = '审批通过';
  579. auditString[status.checkNo] = '审批退回';
  580. // 文字样式
  581. const auditStringClass = [];
  582. auditStringClass[status.uncheck] = '';
  583. auditStringClass[status.checking] = 'text-warning';
  584. auditStringClass[status.checked] = 'text-success';
  585. auditStringClass[status.checkNo] = 'text-warning';
  586. return { type, status, statusString, statusClass, auditString, auditStringClass };
  587. })();
  588. // 变更 审批流程(新的,旧的也要保留,防止报表或其他地方调用旧的出问题)
  589. const change = (function() {
  590. const status = {
  591. uncheck: 1, // 待审批
  592. checking: 2, // 审批中或者原报人待上报或者原报上报修订中
  593. checked: 3, // 审批通过或者原报人上报完成
  594. // checkNo: 4, // 审批终止
  595. checkNo: 5, // 退回到原报人重新上报
  596. checkNoPre: 6, // 退回到上一个审批人
  597. checkAgain: 7, // 重新审批
  598. checkSkip: 8, // 跳过
  599. revise: 9, // 修订变更
  600. cancelRevise: 10, // 撤销修订
  601. checkCancel: 11, // 撤回 // 该状态为上一审批人可发起,回到它到审批阶段,并同时新增一条新的审批中记录
  602. };
  603. const statusString = [];
  604. statusString[status.uncheck] = '待上报';
  605. statusString[status.checking] = '审批中';
  606. statusString[status.checked] = '审批通过';
  607. statusString[status.checkNo] = '审批退回';
  608. statusString[status.checkNoPre] = '审批退回';
  609. statusString[status.checkAgain] = '重新审批';
  610. statusString[status.revise] = '修订';
  611. statusString[status.cancelRevise] = '撤销修订';
  612. statusString[status.checkCancel] = '撤回';
  613. const statusClass = [];
  614. statusClass[status.uncheck] = '';
  615. statusClass[status.checking] = 'text-warning';
  616. statusClass[status.checked] = 'text-success';
  617. statusClass[status.checkNo] = 'text-warning';
  618. statusClass[status.checkNoPre] = 'text-warning';
  619. statusClass[status.checkAgain] = 'text-warning';
  620. statusClass[status.revise] = 'text-warning';
  621. statusClass[status.cancelRevise] = 'text-success';
  622. statusClass[status.checkCancel] = 'text-warning';
  623. // 标段概况页
  624. // 描述文本
  625. const auditString = [];
  626. auditString[status.uncheck] = '待上报';
  627. auditString[status.checking] = '审批中';
  628. auditString[status.checked] = '审批通过';
  629. auditString[status.checkNo] = '审批退回';
  630. auditString[status.checkNoPre] = '审批退回';
  631. auditString[status.checkAgain] = '重新审批';
  632. auditString[status.revise] = '修订';
  633. auditString[status.cancelRevise] = '撤销修订';
  634. auditString[status.checkCancel] = '撤回';
  635. auditString[status.checkSkip] = '审批通过';
  636. // 文字样式
  637. const auditStringClass = [];
  638. auditStringClass[status.uncheck] = '';
  639. auditStringClass[status.checking] = 'text-warning';
  640. auditStringClass[status.checked] = 'text-success';
  641. auditStringClass[status.checkNo] = 'text-warning';
  642. auditStringClass[status.checkNoPre] = 'text-warning';
  643. auditStringClass[status.checkAgain] = 'text-warning';
  644. auditStringClass[status.revise] = 'text-warning';
  645. auditStringClass[status.cancelRevise] = 'text-success';
  646. auditStringClass[status.checkCancel] = 'text-warning';
  647. auditStringClass[status.checkSkip] = 'text-success';
  648. // 描述文本
  649. const auditProgress = [];
  650. auditProgress[status.uncheck] = '待上报';
  651. auditProgress[status.checking] = '审批中';
  652. auditProgress[status.checked] = '审批通过';
  653. auditProgress[status.checkNo] = '审批退回';
  654. auditProgress[status.checkNoPre] = '审批退回';
  655. auditProgress[status.checkAgain] = '重新审批';
  656. auditProgress[status.revise] = '修订中';
  657. auditProgress[status.cancelRevise] = '撤销修订';
  658. auditProgress[status.checkCancel] = '撤回';
  659. auditProgress[status.checkSkip] = '审批通过';
  660. // 样式
  661. const auditProgressClass = [];
  662. auditProgressClass[status.uncheck] = '';
  663. auditProgressClass[status.checking] = 'text-warning';
  664. auditProgressClass[status.checked] = 'text-success';
  665. auditProgressClass[status.checkNo] = 'text-warning';
  666. auditProgressClass[status.checkNoPre] = 'text-warning';
  667. auditProgressClass[status.checkAgain] = 'text-warning';
  668. auditProgressClass[status.revise] = 'text-warning';
  669. auditProgressClass[status.cancelRevise] = 'text-success';
  670. auditProgressClass[status.checkCancel] = 'text-warning';
  671. auditProgressClass[status.checkSkip] = 'text-success';
  672. const filter = {
  673. status: {
  674. pending: 1,
  675. uncheck: 5,
  676. checking: 2,
  677. checked: 3,
  678. // checkNo: 4,
  679. },
  680. statusString: [],
  681. };
  682. filter.statusString[filter.status.pending] = '待处理';
  683. filter.statusString[filter.status.uncheck] = '待上报';
  684. filter.statusString[filter.status.checking] = '进行中';
  685. filter.statusString[filter.status.checked] = '已通过';
  686. // filter.statusString[filter.status.checkNo] = '终止';
  687. // 按钮
  688. const statusButton = [];
  689. statusButton[status.uncheck] = '上报';
  690. statusButton[status.checking] = '审批';
  691. statusButton[status.checked] = '';
  692. statusButton[status.checkNo] = '重新上报';
  693. statusButton[status.revise] = '修订';
  694. // 按钮样式
  695. const statusButtonClass = [];
  696. statusButtonClass[status.uncheck] = 'btn-primary';
  697. statusButtonClass[status.checking] = 'btn-success';
  698. statusButtonClass[status.checked] = '';
  699. statusButtonClass[status.checkNo] = 'btn-warning';
  700. statusButtonClass[status.revise] = 'btn-warning';
  701. return { status, statusString, statusClass, auditString, auditStringClass, auditProgress, auditProgressClass, filter, statusButton, statusButtonClass };
  702. })();
  703. // 变更立项 审批流程
  704. const changeProject = (function() {
  705. const status = {
  706. uncheck: 1, // 待上报
  707. checking: 2, // 待审批|审批中
  708. checked: 3, // 审批通过
  709. checkNo: 4, // 审批终止
  710. back: 5, // 退回到原报人重新上报
  711. checkAgain: 6, // 终审退回 --该状态仅可用于,终审退回时,修改原终审的审批状态,并同时新增一条新的终审审批中记录
  712. revise: 7, // 修订变更
  713. cancelRevise: 8, // 撤销修订
  714. checkCancel: 9, // 撤回
  715. checkSkip: 10, // 跳过
  716. };
  717. const statusString = [];
  718. statusString[status.uncheck] = '待上报';
  719. statusString[status.checking] = '审批中';
  720. statusString[status.checked] = '审批通过';
  721. statusString[status.checkNo] = '终止';
  722. statusString[status.back] = '审批退回';
  723. statusString[status.checkAgain] = '重新审批';
  724. statusString[status.revise] = '修订';
  725. statusString[status.cancelRevise] = '撤销修订';
  726. statusString[status.checkCancel] = '撤回';
  727. const statusClass = [];
  728. statusClass[status.uncheck] = '';
  729. statusClass[status.checking] = 'text-warning';
  730. statusClass[status.checked] = 'text-success';
  731. statusClass[status.checkNo] = 'text-danger';
  732. statusClass[status.back] = 'text-warning';
  733. statusClass[status.checkAgain] = 'text-warning';
  734. statusClass[status.revise] = 'text-warning';
  735. statusClass[status.cancelRevise] = 'text-success';
  736. statusClass[status.checkCancel] = 'text-warning';
  737. // 标段概况页
  738. // 描述文本
  739. const auditString = [];
  740. auditString[status.uncheck] = '';
  741. auditString[status.checking] = '审批中';
  742. auditString[status.checked] = '审批通过';
  743. auditString[status.checkNo] = '终止';
  744. auditString[status.back] = '审批退回';
  745. auditString[status.checkAgain] = '重新审批';
  746. auditString[status.revise] = '修订';
  747. auditString[status.cancelRevise] = '撤销修订';
  748. auditString[status.checkCancel] = '撤回';
  749. auditString[status.checkSkip] = '审批通过';
  750. // 文字样式
  751. const auditStringClass = [];
  752. auditStringClass[status.uncheck] = '';
  753. auditStringClass[status.checking] = 'text-warning';
  754. auditStringClass[status.checked] = 'text-success';
  755. auditStringClass[status.checkNo] = 'text-danger';
  756. auditStringClass[status.back] = 'text-warning';
  757. auditStringClass[status.checkAgain] = 'text-warning';
  758. auditStringClass[status.revise] = 'text-warning';
  759. auditStringClass[status.cancelRevise] = 'text-success';
  760. auditStringClass[status.checkCancel] = 'text-warning';
  761. auditStringClass[status.checkSkip] = 'text-success';
  762. // 描述文本
  763. const auditProgress = [];
  764. auditProgress[status.uncheck] = '待上报';
  765. auditProgress[status.checking] = '审批中';
  766. auditProgress[status.checked] = '审批通过';
  767. auditProgress[status.checkNo] = '终止';
  768. auditProgress[status.back] = '审批退回';
  769. auditProgress[status.checkAgain] = '重新审批';
  770. auditProgress[status.revise] = '修订中';
  771. auditProgress[status.cancelRevise] = '撤销修订';
  772. auditProgress[status.checkCancel] = '撤回';
  773. auditProgress[status.checkSkip] = '审批通过';
  774. // 样式
  775. const auditProgressClass = [];
  776. auditProgressClass[status.uncheck] = '';
  777. auditProgressClass[status.checking] = 'text-warning';
  778. auditProgressClass[status.checked] = 'text-success';
  779. auditProgressClass[status.checkNo] = 'text-danger';
  780. auditProgressClass[status.back] = 'text-warning';
  781. auditProgressClass[status.checkAgain] = 'text-warning';
  782. auditProgressClass[status.revise] = 'text-warning';
  783. auditProgressClass[status.cancelRevise] = 'text-success';
  784. auditProgressClass[status.checkCancel] = 'text-warning';
  785. auditProgressClass[status.checkSkip] = 'text-success';
  786. const filter = {
  787. status: {
  788. pending: 1,
  789. uncheck: 5,
  790. checking: 2,
  791. checked: 3,
  792. checkNo: 4,
  793. },
  794. statusString: [],
  795. };
  796. filter.statusString[filter.status.pending] = '待处理';
  797. filter.statusString[filter.status.uncheck] = '待上报';
  798. filter.statusString[filter.status.checking] = '进行中';
  799. filter.statusString[filter.status.checked] = '已通过';
  800. filter.statusString[filter.status.checkNo] = '终止';
  801. // 按钮
  802. const statusButton = [];
  803. statusButton[status.uncheck] = '上报';
  804. statusButton[status.checking] = '审批';
  805. statusButton[status.checked] = '';
  806. statusButton[status.checkNo] = '';
  807. statusButton[status.back] = '重新上报';
  808. statusButton[status.revise] = '修订';
  809. // 按钮样式
  810. const statusButtonClass = [];
  811. statusButtonClass[status.uncheck] = 'btn-primary';
  812. statusButtonClass[status.checking] = 'btn-success';
  813. statusButtonClass[status.checked] = '';
  814. statusButtonClass[status.checkNo] = '';
  815. statusButtonClass[status.back] = 'btn-warning';
  816. statusButtonClass[status.revise] = 'btn-warning';
  817. return { status, statusString, statusClass, auditString, auditStringClass, auditProgress, auditProgressClass, filter, statusButton, statusButtonClass };
  818. })();
  819. // 变更申请 审批流程
  820. const changeApply = (function() {
  821. const status = {
  822. uncheck: 1, // 待上报
  823. checking: 2, // 待审批|审批中
  824. checked: 3, // 审批通过
  825. checkNo: 4, // 退回到原报人重新上报
  826. checkAgain: 6,
  827. revise: 7, // 修订变更
  828. cancelRevise: 8, // 撤销修订
  829. checkCancel: 9, // 撤回
  830. checkSkip: 10, // 跳过
  831. };
  832. const statusString = [];
  833. statusString[status.uncheck] = '待上报';
  834. statusString[status.checking] = '审批中';
  835. statusString[status.checked] = '审批通过';
  836. statusString[status.checkNo] = '审批退回';
  837. statusString[status.checkAgain] = '重新审批';
  838. statusString[status.revise] = '修订';
  839. statusString[status.cancelRevise] = '撤销修订';
  840. statusString[status.checkCancel] = '撤回';
  841. const statusClass = [];
  842. statusClass[status.uncheck] = '';
  843. statusClass[status.checking] = 'text-warning';
  844. statusClass[status.checked] = 'text-success';
  845. statusClass[status.checkNo] = 'text-warning';
  846. statusClass[status.checkAgain] = 'text-warning';
  847. statusClass[status.revise] = 'text-warning';
  848. statusClass[status.cancelRevise] = 'text-success';
  849. statusClass[status.checkCancel] = 'text-warning';
  850. // 标段概况页
  851. // 描述文本
  852. const auditString = [];
  853. auditString[status.uncheck] = '';
  854. auditString[status.checking] = '审批中';
  855. auditString[status.checked] = '审批通过';
  856. auditString[status.checkNo] = '审批退回';
  857. auditString[status.checkAgain] = '重新审批';
  858. auditString[status.revise] = '修订';
  859. auditString[status.cancelRevise] = '撤销修订';
  860. auditString[status.checkCancel] = '撤回';
  861. auditString[status.checkSkip] = '审批通过';
  862. // 文字样式
  863. const auditStringClass = [];
  864. auditStringClass[status.uncheck] = '';
  865. auditStringClass[status.checking] = 'text-warning';
  866. auditStringClass[status.checked] = 'text-success';
  867. auditStringClass[status.checkNo] = 'text-warning';
  868. auditStringClass[status.checkAgain] = 'text-warning';
  869. auditStringClass[status.revise] = 'text-warning';
  870. auditStringClass[status.cancelRevise] = 'text-success';
  871. auditStringClass[status.checkCancel] = 'text-warning';
  872. auditStringClass[status.checkSkip] = 'text-success';
  873. // 描述文本
  874. const auditProgress = [];
  875. auditProgress[status.uncheck] = '待上报';
  876. auditProgress[status.checking] = '审批中';
  877. auditProgress[status.checked] = '审批通过';
  878. auditProgress[status.checkNo] = '审批退回';
  879. auditProgress[status.checkAgain] = '重新审批';
  880. auditProgress[status.revise] = '修订中';
  881. auditProgress[status.cancelRevise] = '撤销修订';
  882. auditProgress[status.checkCancel] = '撤回';
  883. // 样式
  884. const auditProgressClass = [];
  885. auditProgressClass[status.uncheck] = '';
  886. auditProgressClass[status.checking] = 'text-warning';
  887. auditProgressClass[status.checked] = 'text-success';
  888. auditProgressClass[status.checkNo] = 'text-warning';
  889. auditProgressClass[status.checkAgain] = 'text-warning';
  890. auditProgressClass[status.revise] = 'text-warning';
  891. auditProgressClass[status.cancelRevise] = 'text-success';
  892. auditProgressClass[status.checkCancel] = 'text-warning';
  893. const filter = {
  894. status: {
  895. pending: 1,
  896. uncheck: 5,
  897. checking: 2,
  898. checked: 3,
  899. // checkNo: 4,
  900. },
  901. statusString: [],
  902. };
  903. filter.statusString[filter.status.pending] = '待处理';
  904. filter.statusString[filter.status.uncheck] = '待上报';
  905. filter.statusString[filter.status.checking] = '进行中';
  906. filter.statusString[filter.status.checked] = '已通过';
  907. // filter.statusString[filter.status.checkNo] = '终止';
  908. // 按钮
  909. const statusButton = [];
  910. statusButton[status.uncheck] = '上报';
  911. statusButton[status.checking] = '审批';
  912. statusButton[status.checked] = '';
  913. statusButton[status.checkNo] = '重新上报';
  914. statusButton[status.revise] = '修订';
  915. // 按钮样式
  916. const statusButtonClass = [];
  917. statusButtonClass[status.uncheck] = 'btn-primary';
  918. statusButtonClass[status.checking] = 'btn-success';
  919. statusButtonClass[status.checked] = '';
  920. statusButtonClass[status.checkNo] = 'btn-warning';
  921. statusButtonClass[status.revise] = 'btn-warning';
  922. return { status, statusString, statusClass, auditString, auditStringClass, auditProgress, auditProgressClass, filter, statusButton, statusButtonClass };
  923. })();
  924. // 变更方案 审批流程
  925. const changePlan = (function() {
  926. const status = {
  927. uncheck: 1, // 待上报
  928. checking: 2, // 待审批|审批中
  929. checked: 3, // 审批通过
  930. checkNo: 4, // 退回到原报人重新上报
  931. checkAgain: 6,
  932. revise: 7, // 修订变更
  933. cancelRevise: 8, // 撤销修订
  934. checkCancel: 9, // 撤回
  935. checkSkip: 10, // 跳过
  936. };
  937. const statusString = [];
  938. statusString[status.uncheck] = '待上报';
  939. statusString[status.checking] = '审批中';
  940. statusString[status.checked] = '审批通过';
  941. statusString[status.checkNo] = '审批退回';
  942. statusString[status.checkAgain] = '重新审批';
  943. statusString[status.revise] = '修订';
  944. statusString[status.cancelRevise] = '撤销修订';
  945. statusString[status.checkCancel] = '撤回';
  946. const statusClass = [];
  947. statusClass[status.uncheck] = '';
  948. statusClass[status.checking] = 'text-warning';
  949. statusClass[status.checked] = 'text-success';
  950. statusClass[status.checkNo] = 'text-warning';
  951. statusClass[status.checkAgain] = 'text-warning';
  952. statusClass[status.revise] = 'text-warning';
  953. statusClass[status.cancelRevise] = 'text-success';
  954. statusClass[status.checkCancel] = 'text-warning';
  955. // 标段概况页
  956. // 描述文本
  957. const auditString = [];
  958. auditString[status.uncheck] = '';
  959. auditString[status.checking] = '审批中';
  960. auditString[status.checked] = '审批通过';
  961. auditString[status.checkNo] = '审批退回';
  962. auditString[status.checkAgain] = '重新审批';
  963. auditString[status.revise] = '修订';
  964. auditString[status.cancelRevise] = '撤销修订';
  965. auditString[status.checkCancel] = '撤回';
  966. auditString[status.checkSkip] = '审批通过';
  967. // 文字样式
  968. const auditStringClass = [];
  969. auditStringClass[status.uncheck] = '';
  970. auditStringClass[status.checking] = 'text-warning';
  971. auditStringClass[status.checked] = 'text-success';
  972. auditStringClass[status.checkNo] = 'text-warning';
  973. auditStringClass[status.checkAgain] = 'text-warning';
  974. auditStringClass[status.revise] = 'text-warning';
  975. auditStringClass[status.cancelRevise] = 'text-success';
  976. auditStringClass[status.checkCancel] = 'text-warning';
  977. auditStringClass[status.checkSkip] = 'text-success';
  978. // 描述文本
  979. const auditProgress = [];
  980. auditProgress[status.uncheck] = '待上报';
  981. auditProgress[status.checking] = '审批中';
  982. auditProgress[status.checked] = '审批通过';
  983. auditProgress[status.checkNo] = '审批退回';
  984. auditProgress[status.checkAgain] = '重新审批';
  985. auditProgress[status.revise] = '修订中';
  986. auditProgress[status.cancelRevise] = '撤销修订';
  987. auditProgress[status.checkCancel] = '撤回';
  988. // 样式
  989. const auditProgressClass = [];
  990. auditProgressClass[status.uncheck] = '';
  991. auditProgressClass[status.checking] = 'text-warning';
  992. auditProgressClass[status.checked] = 'text-success';
  993. auditProgressClass[status.checkNo] = 'text-warning';
  994. auditProgressClass[status.checkAgain] = 'text-warning';
  995. auditProgressClass[status.revise] = 'text-warning';
  996. auditProgressClass[status.cancelRevise] = 'text-success';
  997. auditProgressClass[status.checkCancel] = 'text-warning';
  998. const filter = {
  999. status: {
  1000. pending: 1,
  1001. uncheck: 5,
  1002. checking: 2,
  1003. checked: 3,
  1004. // checkNo: 4,
  1005. },
  1006. statusString: [],
  1007. };
  1008. filter.statusString[filter.status.pending] = '待处理';
  1009. filter.statusString[filter.status.uncheck] = '待上报';
  1010. filter.statusString[filter.status.checking] = '进行中';
  1011. filter.statusString[filter.status.checked] = '已通过';
  1012. // filter.statusString[filter.status.checkNo] = '终止';
  1013. // 按钮
  1014. const statusButton = [];
  1015. statusButton[status.uncheck] = '上报';
  1016. statusButton[status.checking] = '审批';
  1017. statusButton[status.checked] = '';
  1018. statusButton[status.checkNo] = '重新上报';
  1019. statusButton[status.revise] = '修订';
  1020. // 按钮样式
  1021. const statusButtonClass = [];
  1022. statusButtonClass[status.uncheck] = 'btn-primary';
  1023. statusButtonClass[status.checking] = 'btn-success';
  1024. statusButtonClass[status.checked] = '';
  1025. statusButtonClass[status.checkNo] = 'btn-warning';
  1026. statusButtonClass[status.revise] = 'btn-warning';
  1027. return { status, statusString, statusClass, auditString, auditStringClass, auditProgress, auditProgressClass, filter, statusButton, statusButtonClass };
  1028. })();
  1029. // 推送类型
  1030. const pushType = {
  1031. common,
  1032. material: 1,
  1033. stage: 2,
  1034. change: 3,
  1035. revise: 4,
  1036. ledger: 5,
  1037. advance: 6,
  1038. changeProject: 7,
  1039. changeApply: 8,
  1040. changePlan: 9,
  1041. settle: 10,
  1042. };
  1043. module.exports = {
  1044. auditType,
  1045. ledger,
  1046. stage,
  1047. settle,
  1048. revise,
  1049. material,
  1050. flow: {
  1051. status,
  1052. statusString,
  1053. statusButton,
  1054. statusButtonClass,
  1055. statusClass,
  1056. auditStatus,
  1057. auditStatusString,
  1058. auditStatusClass,
  1059. },
  1060. filter,
  1061. pushType,
  1062. advance,
  1063. change,
  1064. changeProject,
  1065. changeApply,
  1066. changePlan,
  1067. };