main_consts.js 9.1 KB

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