main_consts.js 9.9 KB

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