main_consts.js 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  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. quantity_detail:'quantity_detail',
  16. labour_coe: 'labour_coe',
  17. calc_program: 'calc_program',
  18. installation_fee:'installation_fee'
  19. };
  20. const gljType = {
  21. // 人工
  22. LABOUR: 1,
  23. // ==============材料类型=================
  24. // 普通材料
  25. GENERAL_MATERIAL: 201,
  26. // 混凝土
  27. CONCRETE: 202,
  28. // 砂浆
  29. MORTAR: 203,
  30. // 配合比
  31. MIX_RATIO: 204,
  32. // 商品混凝土
  33. COMMERCIAL_CONCRETE: 205,
  34. // 商品砂浆
  35. COMMERCIAL_MORTAR: 206,
  36. // ==============材料类型=================
  37. // ==============机械类型=================
  38. // 机械台班
  39. GENERAL_MACHINE: 301,
  40. // 机械组成物
  41. MACHINE_COMPOSITION: 302,
  42. // 机上人工
  43. MACHINE_LABOUR: 303,
  44. // ==============机械类型=================
  45. // 主材
  46. MAIN_MATERIAL: 4,
  47. // 设备
  48. EQUIPMENT: 5
  49. };
  50. // 计算基数 [定额基价材料费] 要用到的材料类型。
  51. const baseMaterialTypes = [
  52. gljType.GENERAL_MATERIAL,
  53. gljType.CONCRETE,
  54. gljType.MORTAR,
  55. gljType.MIX_RATIO,
  56. gljType.COMMERCIAL_CONCRETE,
  57. gljType.COMMERCIAL_MORTAR
  58. ];
  59. // 计算基数 [定额基价机械费] 要用到的机械类型。
  60. const baseMachineTypes = [
  61. gljType.GENERAL_MACHINE,
  62. gljType.MACHINE_COMPOSITION,
  63. gljType.MACHINE_LABOUR
  64. ];
  65. // 全部材料类型。用于暂估等 (多了主材和设备)
  66. const allMaterialTypes = [
  67. gljType.GENERAL_MATERIAL,
  68. gljType.CONCRETE,
  69. gljType.MORTAR,
  70. gljType.MIX_RATIO,
  71. gljType.COMMERCIAL_CONCRETE,
  72. gljType.COMMERCIAL_MORTAR,
  73. gljType.MAIN_MATERIAL,
  74. gljType.EQUIPMENT
  75. ];
  76. // 会有组成物的材料
  77. const compositionTypes = [
  78. gljType.MAIN_MATERIAL,
  79. gljType.CONCRETE,
  80. gljType.MORTAR,
  81. gljType.MIX_RATIO,
  82. gljType.GENERAL_MACHINE
  83. ];
  84. const notEditType = [
  85. gljType.CONCRETE,
  86. gljType.MORTAR,
  87. gljType.MIX_RATIO,
  88. gljType.GENERAL_MACHINE,
  89. gljType.MAIN_MATERIAL
  90. ];
  91. const CP_Col_Width = { // 多处计算程序界面的列宽统一设置
  92. rowHeader: 30,
  93. colHeader: 30, // 这个是标题栏高度不是宽度,也写在一起
  94. code: 70,
  95. serialNo: 50,
  96. name: 200,
  97. dispExprUser: 180,
  98. feeRate: 60,
  99. displayFieldName: 120,
  100. statement: 380,
  101. memo: 110,
  102. unitFee: 90,
  103. totalFee: 90
  104. };
  105. const treeNodeCalcType = {
  106. ctRationCalcProgram: 1,
  107. ctBillCalcProgram: 2, // 汇总清单下所有定额的工料机
  108. ctGatherRationsFees: 3, // 汇总定额的各个费
  109. ctGatherBillsFees: 4, // 汇总清单的各个费
  110. ctCalcBaseValue: 5,
  111. ctNull: 6
  112. // ctCommonUnitFee: 6 // 树结点的手工输入综合单价的方式已废弃,现综合单价只读,引入市场单价。
  113. };
  114. const calcAllType = {
  115. catAll: 'all',
  116. catBills: 'bills',
  117. catRations: 'ration'
  118. };
  119. const priceTypes = {
  120. ptBasePrice: 1,
  121. ptAdjustPrice: 2,
  122. ptMarketPrice: 3,
  123. ptDiffPrice: 4
  124. };
  125. const subSheetIndex = {
  126. ssiRationGLJ: 0,
  127. ssiRationCoe: 1,
  128. // ssiRationAssistant: 2,
  129. ssiQuantityDetail: 3,
  130. ssiCalcProgram: 2,
  131. ssiMemo: 5,
  132. ssiFeature: 6
  133. };
  134. const volumePriceMaps = {
  135. "量人": gljType.LABOUR,
  136. "量材": gljType.GENERAL_MATERIAL,
  137. "量机": gljType.GENERAL_MACHINE,
  138. "量主": gljType.MAIN_MATERIAL,
  139. "量设": gljType.EQUIPMENT,
  140. "人工": gljType.LABOUR,
  141. "材料": gljType.GENERAL_MATERIAL,
  142. "机械": gljType.GENERAL_MACHINE,
  143. "主材": gljType.MAIN_MATERIAL,
  144. "设备": gljType.EQUIPMENT,
  145. 1: "量人",
  146. 201: "量材",
  147. 301: "量机",
  148. 4: "量主",
  149. 5: "量设"
  150. };
  151. const rationType = {
  152. ration: 1,
  153. volumePrice: 2,
  154. gljRation: 3,
  155. install:4
  156. };
  157. const rationPrefix = { //定额前缀,补/借
  158. none: '',
  159. complementary: '补',
  160. borrow: '借'
  161. };
  162. const rationFrom = {
  163. std: 'std',
  164. cpt: 'cpt'
  165. };
  166. const leafBillGetFeeType = {
  167. rationContent: 0,
  168. rationPriceConverse: 1,
  169. rationPrice: 2,
  170. billsPrice: 3
  171. };
  172. const zanguCalcType = {
  173. common: 0,
  174. gatherMaterial: 1
  175. };
  176. //供货方式
  177. const supplyType = {
  178. //自行采购
  179. ZXCG: 0,
  180. //部分甲供
  181. BFJG: 1,
  182. //完全甲供
  183. WQJG: 2,
  184. //甲定乙供
  185. JDYG: 3
  186. };
  187. const supplyText = {
  188. //自行采购
  189. ZXCG: '自行采购',
  190. //部分甲供
  191. BFJG: '部分甲供',
  192. //完全甲供
  193. WQJG: '完全甲供',
  194. //甲定乙供
  195. JDYG: '甲定乙供'
  196. };
  197. //三材类别
  198. const materialType = {
  199. 1: '钢材',
  200. 2: '钢筋',
  201. 3: '木材',
  202. 4: '水泥',
  203. 5: '标准砖'
  204. };
  205. const materialTypeMap = {
  206. GC: 1,
  207. GJ: 2,
  208. MC: 3,
  209. SN: 4,
  210. SZ: 5,
  211. 1:'GC',
  212. 2:'GJ',
  213. 3:'MC',
  214. 4:'SN',
  215. 5:'SZ'
  216. }
  217. //清单固定行
  218. const fixedFlag = {
  219. // 分部分项工程
  220. SUB_ENGINERRING: 1,
  221. // 措施项目
  222. MEASURE: 2,
  223. // 施工技术措施项目
  224. CONSTRUCTION_TECH: 3,
  225. // 安全文明施工按实计算费用
  226. SAFETY_CONSTRUCTION_ACTUAL: 4,
  227. // 施工组织措施专项费用
  228. CONSTRUCTION_ORGANIZATION: 5,
  229. // 安全文明施工专项费用
  230. SAFETY_CONSTRUCTION: 6,
  231. // 其他项目
  232. OTHER: 7,
  233. // 暂列金额
  234. PROVISIONAL: 8,
  235. // 暂估价
  236. ESTIMATE: 9,
  237. // 材料(工程设备)暂估价
  238. MATERIAL_PROVISIONAL: 10,
  239. // 专业工程暂估价
  240. ENGINEERING_ESITIMATE: 11,
  241. // 计日工
  242. DAYWORK: 12,
  243. // 总承包服务费
  244. TURN_KEY_CONTRACT: 13,
  245. // 索赔与现场签证
  246. CLAIM_VISA: 14,
  247. // 规费
  248. CHARGE: 15,
  249. // 社会保险费及住房公积金 Social insurance fee and housing accumulation fund
  250. SOCIAL_INSURANCE_HOUSING_FUND: 16,
  251. // 工程排污费 charges for disposing pollutants
  252. POLLUTANTS: 17,
  253. // 税金
  254. TAX: 18,
  255. //工程造价
  256. ENGINEERINGCOST: 19
  257. };
  258. const gljKeyArray =['code','name','specs','unit','type'];
  259. const rationKeyArray =['code','name','specs','unit','subType'];
  260. const gljLibKeyArray =['code', 'name', 'specs', 'unit', 'gljType'];
  261. const billType ={
  262. DXFY:1,//大项费用
  263. FB:2,//分部
  264. FX:3,//分项
  265. BILL:4,//清单
  266. BX:5//补项
  267. };
  268. const billText = {
  269. 1:'费用',
  270. 2:'分部',
  271. 3:'分项',
  272. 4:'清单',
  273. 5:'补项'
  274. };
  275. const cpFeeTypes = [
  276. {type: 'direct', name: '直接费'},
  277. {type: 'labour', name: '人工费'},
  278. {type: 'material', name: '材料费'},
  279. {type: 'machine', name: '机械费'},
  280. {type: 'mainMaterial', name: '主材费'},
  281. {type: 'equipment', name: '设备费'},
  282. {type: 'manage', name: '企业管理费'},
  283. {type: 'profit', name: '利润'},
  284. {type: 'risk', name: '风险费'},
  285. {type: 'labourDiff', name: '人工价差'},
  286. {type: 'materialDiff', name: '材料价差'},
  287. {type: 'machineDiff', name: '机械价差'},
  288. {type: 'adjustLabour', name: '调整人工费'},
  289. {type: 'adjustMachineLabour', name: '调整机上人工费'},
  290. // {type: 'estimate', name: '暂估费'},
  291. {type: 'common', name: '工程造价'},
  292. {type: 'fee1', name: '费用1'}//,
  293. // {type: 'fee2', name: '费用2'},
  294. // {type: 'fee3', name: '费用3'},
  295. // {type: 'fee4', name: '费用4'},
  296. // {type: 'fee5', name: '费用5'},
  297. // {type: 'fee6', name: '费用6'},
  298. // {type: 'fee7', name: '费用7'},
  299. // {type: 'fee8', name: '费用8'},
  300. // {type: 'fee9', name: '费用9'}
  301. ];
  302. const engineeringType = {
  303. // 建筑工程
  304. ARCHITECTURE: 1,
  305. // 装饰工程
  306. DECORATE: 2,
  307. // 仿古建筑工程
  308. ANTIQUE_ARCHITECTURE: 3,
  309. // 安装工程
  310. BUILD_IN: 4,
  311. // 市政土建工程
  312. MUNICIPAL_CONSTRUCTION: 5,
  313. // 市政安装工程
  314. MUNICIPAL_BUILD_IN: 6,
  315. // 人工土石方工程
  316. ARTIFICIAL_EARTHWORK: 7,
  317. // 机械土石方工程
  318. MECHANICAL_EARTHWORK: 8,
  319. // 炉窖砌筑工程
  320. KILN_MASONRY: 9,
  321. // 园林工程
  322. GARDEN: 10,
  323. // 绿化工程
  324. PLANTING: 11,
  325. // 单拆除工程
  326. DISMANTLE: 12,
  327. // 建筑修缮工程
  328. BUILDING_REPAIR: 13,
  329. // 安装修缮工程
  330. BUILD_IN_REPAIR: 14
  331. };
  332. const blockType ={
  333. RATION:1,//定额
  334. FB:2,//分部
  335. FX:3,//分项
  336. BILL:4,//清单
  337. BX:5//补项
  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. ];