tender_info.js 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. 'use strict';
  2. /**
  3. *
  4. *
  5. * @author Mai
  6. * @date
  7. * @version
  8. */
  9. const parseInfo = ['deal_info', 'construction_unit', 'tech_param', 'decimal', 'precision', 'deal_param', 'display', 'pay_account', 'shenpi', 'bid_info', 'ledger_check', 'fun_rela', 'over_range_check'];
  10. const arrayInfo = ['chapter'];
  11. const defaultInfo = {
  12. // 合同信息
  13. deal_info: {
  14. buildName: '', // 建设项目名称
  15. dealCode: '', // 合同编号
  16. dealName: '', // 合同名称
  17. projectType: '', // 工程类别
  18. dealType: '', // 合同类别
  19. finalCode: '', // 结算书编号
  20. budgetApprovalCode: '', // 概算批复编号
  21. },
  22. // 参建单位
  23. construction_unit: {
  24. // 建设
  25. build: {
  26. company: '', // 单位名称
  27. corporation: '', // 法人代表
  28. date: '', // 签订日期
  29. },
  30. // 代建
  31. sub_build: {
  32. company: '',
  33. corporation: '',
  34. date: '',
  35. },
  36. // 承包
  37. contract1: {
  38. company: '',
  39. corporation: '',
  40. date: '',
  41. management: '',
  42. },
  43. contract2: {
  44. company: '',
  45. corporation: '',
  46. date: '',
  47. },
  48. // 监理
  49. supervision1: {
  50. company: '',
  51. corporation: '',
  52. date: '',
  53. },
  54. supervision2: {
  55. company: '',
  56. corporation: '',
  57. date: '',
  58. },
  59. // 检测
  60. detect: {
  61. company: '',
  62. corporation: '',
  63. date: '',
  64. },
  65. // 审计
  66. audit: {
  67. company: '',
  68. corporation: '',
  69. date: '',
  70. }
  71. },
  72. // 技术参数
  73. tech_param: {
  74. loadLevel: 0, // 公路等级
  75. loadLength: 0, // 长度
  76. startPeg: '', // 起始桩号
  77. endPeg: '', // 终止桩号
  78. laneCount: 0, // 车道数
  79. dealPeriod: '', // 合同工期
  80. startDate: '', // 开工日期
  81. planEndDate: '', // 计划完工日期
  82. realStartDate: '', // 实际开工日期
  83. realEndDate: '', // 实际完工日期
  84. structureScale: '', // 构造物规模
  85. mainContent: '', // 主要工作内容
  86. },
  87. // 中标信息
  88. bid_info: {
  89. controlPrice: 0, // 业主控制价
  90. bidPrice: 0, // 中标价
  91. bidStartDate: '', // 开标日期
  92. bidType: '公开招标', // 招标方式
  93. dealCalcType: '单价合同', // 合同计价方式
  94. bidYuPrice: 0, // 招标清单预算
  95. },
  96. // 小数位数
  97. decimal: {
  98. up: 2,
  99. qty: 3,
  100. tp: 0,
  101. pay: false,
  102. payTp: 0,
  103. extra: false,
  104. extraTp: 0,
  105. },
  106. precision: {
  107. t: { unit: 't', value: 3 },
  108. km: { unit: 'km', value: 3 },
  109. m: { unit: 'm', value: 3 },
  110. m2: { unit: 'm2', value: 2 },
  111. m3: { unit: 'm3', value: 2 },
  112. kg: { unit: 'kg', value: 2 },
  113. ge: { unit: '个', value: 0 },
  114. tai: { unit: '台', value: 0 },
  115. tao: { unit: '套', value: 0 },
  116. ke: { unit: '棵', value: 0 },
  117. zu: { unit: '组', value: 0 },
  118. xitong: { unit: '系统', value: 0 },
  119. other: { value: 3 },
  120. },
  121. // 合同参数
  122. deal_param: {
  123. contractPrice: 0, // 签约合同价
  124. zanLiePrice: 0, // 暂列金额
  125. startAdvance: 0, // 开工预付款
  126. materialAdvance: 0, // 材料预付款
  127. safeAdvance: 0, // 安全生产预付款
  128. dustAdvance: 0, // 扬尘污染预付款
  129. },
  130. // 显示设置
  131. display: {
  132. ledger: {
  133. deal: false,
  134. dgnQty: false,
  135. clQty: false,
  136. ancillaryGcl: false,
  137. },
  138. exMemo: true,
  139. thousandth: false,
  140. stage: {
  141. realComplete: false,
  142. correct: true,
  143. priceDiff: false,
  144. },
  145. dayMode: false,
  146. },
  147. chapter: [
  148. {code: '100', name: '总则'},
  149. {code: '200', name: '路基'},
  150. {code: '300', name: '路面'},
  151. {code: '400', name: '桥梁、涵洞'},
  152. {code: '500', name: '隧道'},
  153. {code: '600', name: '安全设施及预埋管线'},
  154. {code: '700', name: '绿化及环境保护'},
  155. {code: '800', name: '机电工程'},
  156. {code: '900', name: '房建工程'},
  157. {code: '1000', name: '收费系统'},
  158. {code: '1100', name: '通信系统'},
  159. {code: '1200', name: '消防系统'},
  160. {code: '1300', name: '供配电及照明系统'},
  161. ],
  162. // 付款账号
  163. pay_account: {
  164. project: { // 工程款
  165. name: '', // 开户名称
  166. bank: '', // 开户银行
  167. account: '', // 开户账号
  168. rate: '', // 分账划拨比例
  169. contact: '', // 联系人
  170. phone: '', // 联系电话
  171. num: '', // 行号
  172. },
  173. worker: { // 农民工
  174. name: '',
  175. bank: '',
  176. account: '',
  177. rate: '',
  178. contact: '',
  179. phone: '',
  180. num: '',
  181. },
  182. },
  183. shenpi: {
  184. advance: 1,
  185. ledger: 1,
  186. revise: 1,
  187. stage: 1,
  188. settle: 1,
  189. change: 1,
  190. material: 1,
  191. phasePay: 1,
  192. },
  193. ledger_check: {
  194. same_code: true,
  195. sibling: true,
  196. over: true,
  197. banMinusChangeBills: true,
  198. },
  199. fun_rela: {
  200. hintOver: true,
  201. repel: false,
  202. stage_change: {
  203. minusNoValue: true,
  204. },
  205. sum_load: {
  206. ignoreParent: false,
  207. },
  208. stage_rela: {
  209. show: false,
  210. },
  211. },
  212. over_range_check: {
  213. field: 'tz', // 'deal', 'both',
  214. percent: 100,
  215. billsWithPos: 'pos', // 'bills', 'both',
  216. },
  217. };
  218. const gclDefaultInfo = (function () {
  219. const result = JSON.parse(JSON.stringify(defaultInfo));
  220. result.display.ledger.deal = true;
  221. result.over_range_check = { field: 'deal', percent: 100, billsWithPos: 'bills'};
  222. return result;
  223. })(defaultInfo);
  224. const tzDefaultInfo = (function () {
  225. const result = JSON.parse(JSON.stringify(defaultInfo));
  226. result.over_range_check = { field: 'tz', percent: 100, billsWithPos: 'both'};
  227. return result;
  228. })(defaultInfo);
  229. const paymentDefaultInfo = (function () {
  230. const result = {};
  231. result.deal_info = JSON.parse(JSON.stringify(defaultInfo.deal_info));
  232. result.construction_unit = JSON.parse(JSON.stringify(defaultInfo.construction_unit));
  233. result.tech_param = JSON.parse(JSON.stringify(defaultInfo.tech_param));
  234. result.pay_account = JSON.parse(JSON.stringify(defaultInfo.pay_account));
  235. return result;
  236. })(defaultInfo);
  237. const transOverRangeCheck = function(helper, check) {
  238. const result = {};
  239. result.coe = helper.div(check.percent, 100);
  240. result.checkTz = check.field === 'tz' || check.field === 'both';
  241. result.checkDeal = check.field === 'deal' || check.field === 'both';
  242. result.hasPosCheckBills = check.billsWithPos === 'bills' || check.billsWithPos === 'both';
  243. result.hasPosCheckPos = check.billsWithPos === 'pos' || check.billsWithPos === 'both';
  244. return result;
  245. };
  246. module.exports = {
  247. parseInfo,
  248. arrayInfo,
  249. defaultInfo,
  250. gclDefaultInfo,
  251. tzDefaultInfo,
  252. paymentDefaultInfo,
  253. transOverRangeCheck,
  254. };