main_consts.js 10 KB

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