main_consts.js 9.1 KB

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