main_consts.js 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367
  1. /**
  2. * Created by jimiz on 2017/4/19.
  3. */
  4. const ModuleNames = {
  5. project:'project',
  6. bills: 'bills',
  7. ration: 'ration',
  8. GLJ: 'GLJ',
  9. feeRate: 'feeRate',
  10. projectGLJ: 'projectGLJ',
  11. ration_glj:'ration_glj',
  12. ration_coe:'ration_coe',
  13. ration_ass:'ration_ass',
  14. ration_installation:'ration_installation',
  15. ration_template:'ration_template',
  16. quantity_detail:'quantity_detail',
  17. labour_coe: 'labour_coe',
  18. calc_program: 'calc_program',
  19. installation_fee:'installation_fee'
  20. };
  21. let gljType = gljUtil.gljType;
  22. let gljTypeSeq =gljUtil.getGljTypeSeq(); /*[gljType.LABOUR,gljType.MAIN_MATERIAL,gljType.CONCRETE,gljType.MORTAR,gljType.MIX_RATIO,gljType.COMMERCIAL_CONCRETE,
  23. gljType.COMMERCIAL_MORTAR,gljType.GENERAL_MATERIAL,gljType.OTHER_MATERIAL,gljType.GENERAL_MACHINE,gljType.INSTRUMENT,gljType.OTHER_MACHINE_USED,
  24. gljType.MACHINE_COMPOSITION,gljType.MACHINE_LABOUR,gljType.FUEL_POWER_FEE,gljType.DEPRECIATION_FEE,gljType.INSPECTION_FEE,gljType.MAINTENANCE,
  25. gljType.DISMANTLING_FREIGHT_FEE,gljType.VERIFICATION_FEE,gljType.OTHER_FEE,gljType.EQUIPMENT,gljType.MANAGEMENT_FEE,gljType.PROFIT,gljType.GENERAL_RISK_FEE];*/
  26. // 计算基数 [定额基价材料费] 要用到的材料类型。
  27. const baseMaterialTypes = [
  28. gljType.GENERAL_MATERIAL,
  29. gljType.CONCRETE,
  30. gljType.MORTAR,
  31. gljType.MIX_RATIO,
  32. gljType.COMMERCIAL_CONCRETE,
  33. gljType.COMMERCIAL_MORTAR
  34. ];
  35. // 计算基数 [定额基价机械费] 要用到的机械类型。
  36. const baseMachineTypes = [
  37. gljType.GENERAL_MACHINE,
  38. gljType.MACHINE_COMPOSITION,
  39. gljType.MACHINE_LABOUR
  40. ];
  41. const baseMachineMasterTypes = [
  42. gljType.GENERAL_MACHINE
  43. ];
  44. // 全部材料类型。用于暂估等 (多了主材和设备)
  45. const allMaterialTypes = [
  46. gljType.GENERAL_MATERIAL,
  47. gljType.CONCRETE,
  48. gljType.MORTAR,
  49. gljType.MIX_RATIO,
  50. gljType.COMMERCIAL_CONCRETE,
  51. gljType.COMMERCIAL_MORTAR,
  52. gljType.MAIN_MATERIAL,
  53. gljType.EQUIPMENT
  54. ];
  55. // 会有组成物的材料、机械台班
  56. const compositionTypes =gljUtil.notEditType;//统一定义,方便覆盖
  57. const CP_Col_Width = { // 多处计算程序界面的列宽统一设置
  58. rowHeader: 30,
  59. colHeader: 30, // 这个是标题栏高度不是宽度,也写在一起
  60. code: 70,
  61. serialNo: 50,
  62. name: 200,
  63. dispExprUser: 180,
  64. feeRate: 60,
  65. displayFieldName: 120,
  66. statement: 380,
  67. memo: 120,
  68. unitFee: 90,
  69. totalFee: 90
  70. };
  71. const treeNodeCalcType = {
  72. ctRationCalcProgram: 1,
  73. ctBillCalcProgram: 2, // 汇总清单下所有定额的工料机
  74. ctGatherRationsFees: 3, // 汇总定额的各个费
  75. ctGatherBillsFees: 4, // 汇总清单的各个费
  76. ctCalcBaseValue: 5,
  77. ctNull: 6
  78. // ctCommonUnitFee: 6 // 树结点的手工输入综合单价的方式已废弃,现综合单价只读,引入市场单价。
  79. };
  80. const tenderTypes = {
  81. ttCalc: 1, // 正向调价
  82. ttReverseRation: 2, // 反向调价-调子目
  83. ttReverseGLJ: 3 // 反向调价-调工料机
  84. };
  85. const calcAllType = {
  86. catAll: 'all',
  87. catBills: 'bills',
  88. catRations: 'ration'
  89. };
  90. const priceTypes = {
  91. ptBasePrice: 1,
  92. ptAdjustPrice: 2,
  93. ptMarketPrice: 3,
  94. ptDiffPrice: 4
  95. };
  96. const subSheetIndex = {
  97. ssiRationGLJ: 0,
  98. ssiRationCoe: 1,
  99. // ssiRationAssistant: 2,
  100. ssiQuantityDetail: 3,
  101. ssiCalcProgram: 2,
  102. ssiMemo: 5,
  103. ssiFeature: 6
  104. };
  105. const volumePriceMaps = {
  106. "量人": gljType.LABOUR,
  107. "量材": gljType.GENERAL_MATERIAL,
  108. "量机": gljType.GENERAL_MACHINE,
  109. "量主": gljType.MAIN_MATERIAL,
  110. "量设": gljType.EQUIPMENT,
  111. "人工": gljType.LABOUR,
  112. "材料": gljType.GENERAL_MATERIAL,
  113. "机械": gljType.GENERAL_MACHINE,
  114. "主材": gljType.MAIN_MATERIAL,
  115. "设备": gljType.EQUIPMENT,
  116. 1: "量人",
  117. 201: "量材",
  118. 301: "量机",
  119. 4: "量主",
  120. 5: "量设"
  121. };
  122. const rationType = {
  123. ration: 1,
  124. volumePrice: 2,
  125. gljRation: 3,
  126. install:4
  127. };
  128. const rationPrefix = { //定额前缀,补/借
  129. none: '',
  130. complementary: '补',
  131. borrow: '借',
  132. replace: '换'
  133. };
  134. const rationFrom = {
  135. std: 'std',
  136. cpt: 'cpt'
  137. };
  138. let leafBillGetFeeType = {
  139. rationContent: 0,
  140. rationPriceConverse: 1,
  141. rationPrice: 2,
  142. billsPrice: 3
  143. };
  144. const zanguCalcType = {
  145. common: 0,
  146. gatherMaterial: 1
  147. };
  148. //供货方式
  149. const supplyType = {
  150. //自行采购
  151. ZXCG: 0,
  152. //部分甲供
  153. BFJG: 1,
  154. //完全甲供
  155. WQJG: 2,
  156. //甲定乙供
  157. JDYG: 3
  158. };
  159. const supplyText = {
  160. //自行采购
  161. ZXCG: '自行采购',
  162. //部分甲供
  163. BFJG: '部分甲供',
  164. //完全甲供
  165. WQJG: '完全甲供',
  166. //甲定乙供
  167. JDYG: '甲定乙供'
  168. };
  169. //三材类别
  170. const materialType = {
  171. 1: '钢材',
  172. 2: '钢筋',
  173. 3: '木材',
  174. 4: '水泥',
  175. 5: '标准砖'
  176. };
  177. const materialTypeMap = {
  178. GC: 1,
  179. GJ: 2,
  180. MC: 3,
  181. SN: 4,
  182. SZ: 5,
  183. 1:'GC',
  184. 2:'GJ',
  185. 3:'MC',
  186. 4:'SN',
  187. 5:'SZ'
  188. }
  189. //清单固定行
  190. const fixedFlag = {
  191. // 建筑安装工程费
  192. CONSTRUCTION_INSTALL_FEE: 1,
  193. // 土地使用及拆迁补偿费
  194. LAND_USED_DEMOLITION: 2,
  195. // 养护工程其他费用
  196. MAINTENANCE_EXPENSES: 3,
  197. // 预备费
  198. BUDGET_FEE: 4,
  199. // 基本预备费
  200. BASE_BUDGET_FEE: 5,
  201. // 价差预备费
  202. SPREAD_BUDGET_FEE: 6,
  203. // 一二三四部分合计
  204. ONE_TO_FOUR_TOTAL: 7,
  205. // 贷款利息
  206. LOAN_INTEREST: 8,
  207. // 总造价
  208. TOTAL_COST: 9,
  209. // 设备购置费
  210. EQUIPMENT_ACQUISITION_FEE: 10,
  211. // 专项费用 Special cost
  212. SPECIAL_COST: 11,
  213. // 施工场地建设费
  214. CONSTRUCTION_PLANT_COST: 12,
  215. // 养护单位(业主)管理费
  216. MAINTENANCE_MANAGENENT_FEE: 13,
  217. // 信息化费 Informatization fee
  218. INFORMATIZATION_FEE: 14,
  219. // 工程监理费 Engineering supervision fee
  220. ENGINEERING_SUP_FEE: 15,
  221. // 设计文件审查费 Design Document Review Fee
  222. DOCUMENT_REVIEW_FEE: 16,
  223. // 勘察设计费 Survey and design fees
  224. SURVEY_DESIGN_FEE: 17,
  225. // 招标代理及标底编制费 Bidding Agent and Preparing Fee of Bid Base
  226. AGENT_BASE_FEE: 18,
  227. //第100章至700章清单
  228. ONE_SEVEN_BILLS: 19,
  229. //专项暂定合计
  230. PROVISIONAL_TOTAL: 20,
  231. //清单合计扣除专项暂定合计
  232. BILLS_TOTAL_WT_PROV: 21,
  233. //计日工 daywork labor
  234. DAYWORK_LABOR: 22,
  235. //劳务
  236. LABOUR_SERVICE:23,
  237. //材料
  238. MATERIAL:24,
  239. //施工机械
  240. CONSTRUCTION_MACHINE:25,
  241. //暂列金额
  242. PROVISIONAL:26,
  243. //安全生产费
  244. SAFE_COST:27
  245. };
  246. const gljKeyArray =['code','name','specs','unit','type'];
  247. const rationKeyArray =['code','name','specs','unit','subType'];
  248. const gljLibKeyArray =['code', 'name', 'specs', 'unit', 'gljType'];
  249. const billType ={
  250. DXFY:1,//大项费用
  251. FB:2,//分部
  252. FX:3,//分项
  253. BILL:4,//清单
  254. BX:5//补项
  255. };
  256. const billText = {
  257. 1:'费用',
  258. 2:'分部',
  259. 3:'分项',
  260. 4:'清单',
  261. 5:'补项'
  262. };
  263. let cpFeeTypes = [
  264. {type: 'marketLabour', name: '人工费'},
  265. {type: 'marketMaterial', name: '材料费'},
  266. {type: 'marketMachine', name: '施工机具使用费'},
  267. {type: 'marketEquipment', name: '设备费'},
  268. {type: 'marketDirect', name: '直接费'},
  269. {type: 'labour', name: '定额人工费'},
  270. {type: 'material', name: '定额材料费'},
  271. {type: 'machine', name: '定额施工机具使用费'},
  272. {type: 'equipment', name: '定额设备费'},
  273. {type: 'direct', name: '定额直接费'},
  274. {type: 'measure', name: '措施费'},
  275. {type: 'measure1', name: '措施费I'},
  276. {type: 'measure2', name: '措施费II'},
  277. {type: 'manage', name: '企业管理费'},
  278. {type: 'force', name: '规费'},
  279. {type: 'profit', name: '利润'},
  280. {type: 'tax', name: '税金'},
  281. {type: 'common', name: '建安费'}
  282. // {type: 'fee1', name: '费用1'},
  283. // {type: 'fee2', name: '费用2'}
  284. ];
  285. //8-27 zhang 这个已经不能用来判断工程类型了
  286. /*const engineeringType = {
  287. // 建筑工程
  288. ARCHITECTURE: 1,
  289. // 装饰工程
  290. DECORATE: 2,
  291. // 仿古建筑工程
  292. ANTIQUE_ARCHITECTURE: 3,
  293. // 安装工程
  294. BUILD_IN: 4,
  295. // 市政土建工程
  296. MUNICIPAL_CONSTRUCTION: 5,
  297. // 市政安装工程
  298. MUNICIPAL_BUILD_IN: 6,
  299. // 人工土石方工程
  300. ARTIFICIAL_EARTHWORK: 7,
  301. // 机械土石方工程
  302. MECHANICAL_EARTHWORK: 8,
  303. // 炉窖砌筑工程
  304. KILN_MASONRY: 9,
  305. // 园林工程
  306. GARDEN: 10,
  307. // 绿化工程
  308. PLANTING: 11,
  309. // 单拆除工程
  310. DISMANTLE: 12,
  311. // 建筑修缮工程
  312. BUILDING_REPAIR: 13,
  313. // 安装修缮工程
  314. BUILD_IN_REPAIR: 14
  315. };*/
  316. const blockType ={
  317. RATION:1,//定额
  318. FB:2,//分部
  319. FX:3,//分项
  320. BILL:4,//清单
  321. BX:5//补项
  322. };
  323. const filterType = {
  324. ALL:'0',
  325. LABOUR:'1',
  326. GENERAL_MATERIAL:'2',
  327. GENERAL_MACHINE:'3',
  328. MAIN_MATERIAL:'4',
  329. EQUIPMENT:'5',
  330. FBFX:'6',
  331. TECH:'7',
  332. JGCL:'8',
  333. ZGCL:'9',
  334. SCHZ:'10',
  335. ZYCL:'11'
  336. };
  337. const filterTypeArray = ['1','2','3','4','5'];
  338. const installFeeType = ['子目费用','分项费用','措施费用'];
  339. const installSectionBase = ['分别按人材机乘系数','人工','材料','机械'];
  340. const supplyComboMap = [{text:"自行采购",value:0},{text:"完全甲供",value:2},{text:"部分甲供",value:1},{text:"甲定乙供",value:3}];//后来调整了下拉选项的顺序,为了不改之前的业务逻辑,这里的值对换了一下
  341. const materialComboMap = [
  342. {text:materialType[materialTypeMap.GC],value:materialTypeMap.GC},
  343. {text:materialType[materialTypeMap.GJ],value:materialTypeMap.GJ},
  344. {text:materialType[materialTypeMap.MC],value:materialTypeMap.MC},
  345. {text:materialType[materialTypeMap.SN],value:materialTypeMap.SN},
  346. {text:materialType[materialTypeMap.SZ],value:materialTypeMap.SZ}
  347. ];