main_consts.js 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405
  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. let 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: 120,
  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 tenderTypes = {
  111. ttCalc: 1, // 正向调价
  112. ttReverseRation: 2, // 反向调价-调子目
  113. ttReverseGLJ: 3 // 反向调价-调工料机
  114. };
  115. const calcAllType = {
  116. catAll: 'all',
  117. catBills: 'bills',
  118. catRations: 'ration'
  119. };
  120. const priceTypes = {
  121. ptBasePrice: 1,
  122. ptAdjustPrice: 2,
  123. ptMarketPrice: 3,
  124. ptDiffPrice: 4
  125. };
  126. const subSheetIndex = {
  127. ssiRationGLJ: 0,
  128. ssiRationCoe: 1,
  129. // ssiRationAssistant: 2,
  130. ssiQuantityDetail: 3,
  131. ssiCalcProgram: 2,
  132. ssiMemo: 5,
  133. ssiFeature: 6
  134. };
  135. const volumePriceMaps = {
  136. "量人": gljType.LABOUR,
  137. "量材": gljType.GENERAL_MATERIAL,
  138. "量机": gljType.GENERAL_MACHINE,
  139. "量主": gljType.MAIN_MATERIAL,
  140. "量设": gljType.EQUIPMENT,
  141. "人工": gljType.LABOUR,
  142. "材料": gljType.GENERAL_MATERIAL,
  143. "机械": gljType.GENERAL_MACHINE,
  144. "主材": gljType.MAIN_MATERIAL,
  145. "设备": gljType.EQUIPMENT,
  146. 1: "量人",
  147. 201: "量材",
  148. 301: "量机",
  149. 4: "量主",
  150. 5: "量设"
  151. };
  152. const rationType = {
  153. ration: 1,
  154. volumePrice: 2,
  155. gljRation: 3,
  156. install:4
  157. };
  158. const rationPrefix = { //定额前缀,补/借
  159. none: '',
  160. complementary: '补',
  161. borrow: '借',
  162. replace: '换'
  163. };
  164. const rationFrom = {
  165. std: 'std',
  166. cpt: 'cpt'
  167. };
  168. const leafBillGetFeeType = {
  169. rationContent: 0,
  170. rationPriceConverse: 1,
  171. rationPrice: 2,
  172. billsPrice: 3
  173. };
  174. const zanguCalcType = {
  175. common: 0,
  176. gatherMaterial: 1
  177. };
  178. //供货方式
  179. const supplyType = {
  180. //自行采购
  181. ZXCG: 0,
  182. //部分甲供
  183. BFJG: 1,
  184. //完全甲供
  185. WQJG: 2,
  186. //甲定乙供
  187. JDYG: 3
  188. };
  189. const supplyText = {
  190. //自行采购
  191. ZXCG: '自行采购',
  192. //部分甲供
  193. BFJG: '部分甲供',
  194. //完全甲供
  195. WQJG: '完全甲供',
  196. //甲定乙供
  197. JDYG: '甲定乙供'
  198. };
  199. //三材类别
  200. const materialType = {
  201. 1: '钢材',
  202. 2: '钢筋',
  203. 3: '木材',
  204. 4: '水泥',
  205. 5: '标准砖'
  206. };
  207. const materialTypeMap = {
  208. GC: 1,
  209. GJ: 2,
  210. MC: 3,
  211. SN: 4,
  212. SZ: 5,
  213. 1:'GC',
  214. 2:'GJ',
  215. 3:'MC',
  216. 4:'SN',
  217. 5:'SZ'
  218. }
  219. //清单固定行
  220. const fixedFlag = {
  221. // 分部分项工程
  222. SUB_ENGINERRING: 1,
  223. // 措施项目
  224. MEASURE: 2,
  225. // 施工技术措施项目
  226. CONSTRUCTION_TECH: 3,
  227. // 安全文明施工按实计算费用
  228. SAFETY_CONSTRUCTION_ACTUAL: 4,
  229. // 施工组织措施专项费用
  230. CONSTRUCTION_ORGANIZATION: 5,
  231. // 安全文明施工专项费用
  232. SAFETY_CONSTRUCTION: 6,
  233. // 其他项目
  234. OTHER: 7,
  235. // 暂列金额
  236. PROVISIONAL: 8,
  237. // 暂估价
  238. ESTIMATE: 9,
  239. // 材料(工程设备)暂估价
  240. MATERIAL_PROVISIONAL: 10,
  241. // 专业工程暂估价
  242. ENGINEERING_ESITIMATE: 11,
  243. // 计日工
  244. DAYWORK: 12,
  245. // 总承包服务费
  246. TURN_KEY_CONTRACT: 13,
  247. // 索赔与现场签证
  248. CLAIM_VISA: 14,
  249. // 规费
  250. CHARGE: 15,
  251. // 社会保险费及住房公积金 Social insurance fee and housing accumulation fund
  252. SOCIAL_INSURANCE_HOUSING_FUND: 16,
  253. // 工程排污费 charges for disposing pollutants
  254. POLLUTANTS: 17,
  255. // 税金
  256. TAX: 18,
  257. //工程造价
  258. ENGINEERINGCOST: 19
  259. };
  260. const gljKeyArray =['code','name','specs','unit','type'];
  261. const rationKeyArray =['code','name','specs','unit','subType'];
  262. const gljLibKeyArray =['code', 'name', 'specs', 'unit', 'gljType'];
  263. const billType ={
  264. DXFY:1,//大项费用
  265. FB:2,//分部
  266. FX:3,//分项
  267. BILL:4,//清单
  268. BX:5//补项
  269. };
  270. const billText = {
  271. 1:'费用',
  272. 2:'分部',
  273. 3:'分项',
  274. 4:'清单',
  275. 5:'补项'
  276. };
  277. const cpFeeTypes = [
  278. {type: 'direct', name: '直接费'},
  279. {type: 'labour', name: '人工费'},
  280. {type: 'material', name: '材料费'},
  281. {type: 'machine', name: '机械费'},
  282. {type: 'mainMaterial', name: '主材费'},
  283. {type: 'equipment', name: '设备费'},
  284. {type: 'manage', name: '企业管理费'},
  285. {type: 'profit', name: '利润'},
  286. {type: 'risk', name: '风险费'},
  287. {type: 'labourDiff', name: '人工价差'},
  288. {type: 'materialDiff', name: '材料价差'},
  289. {type: 'machineDiff', name: '机械价差'},
  290. {type: 'adjustLabour', name: '调整人工费'},
  291. {type: 'adjustMachineLabour', name: '调整机上人工费'},
  292. {type: 'unratedMaterial', name: '未计价材料费'},
  293. {type: 'organizeMeasures', name: '组织措施费'},
  294. {type: 'safeCivilization', name: '安全文明施工费'},
  295. {type: 'night', name: '夜间施工费'},
  296. {type: 'secondHandling', name: '二次搬运费'},
  297. {type: 'winterRainy', name: '冬雨季施工增加费'},
  298. {type: 'protection', name: '已完工程及设备保护费'},
  299. {type: 'clean', name: '工程定位复测点交及场地清理费'},
  300. {type: 'quotaDetermine', name: '工程定额测定费'},
  301. {type: 'materialInspect', name: '材料检验试验费'},
  302. {type: 'acceptance', name: '住宅工程质量分户验收费'},
  303. {type: 'docManage', name: '档案管理费'},
  304. {type: 'forceFee', name: '规费'},
  305. {type: 'fiveOne', name: '五险一金'},
  306. {type: 'sewage', name: '工程排污费'},
  307. {type: 'tax', name: '税金'},
  308. // {type: 'estimate', name: '暂估费'},
  309. {type: 'common', name: '工程造价'},
  310. {type: 'fee1', name: '费用1'}//,
  311. // {type: 'fee2', name: '费用2'},
  312. // {type: 'fee3', name: '费用3'},
  313. // {type: 'fee4', name: '费用4'},
  314. // {type: 'fee5', name: '费用5'},
  315. // {type: 'fee6', name: '费用6'},
  316. // {type: 'fee7', name: '费用7'},
  317. // {type: 'fee8', name: '费用8'},
  318. // {type: 'fee9', name: '费用9'}
  319. ];
  320. const engineeringType = {
  321. // 建筑工程
  322. ARCHITECTURE: 1,
  323. // 装饰工程
  324. DECORATE: 2,
  325. // 仿古建筑工程
  326. ANTIQUE_ARCHITECTURE: 3,
  327. // 安装工程
  328. BUILD_IN: 4,
  329. // 市政土建工程
  330. MUNICIPAL_CONSTRUCTION: 5,
  331. // 市政安装工程
  332. MUNICIPAL_BUILD_IN: 6,
  333. // 人工土石方工程
  334. ARTIFICIAL_EARTHWORK: 7,
  335. // 机械土石方工程
  336. MECHANICAL_EARTHWORK: 8,
  337. // 炉窖砌筑工程
  338. KILN_MASONRY: 9,
  339. // 园林工程
  340. GARDEN: 10,
  341. // 绿化工程
  342. PLANTING: 11,
  343. // 单拆除工程
  344. DISMANTLE: 12,
  345. // 建筑修缮工程
  346. BUILDING_REPAIR: 13,
  347. // 安装修缮工程
  348. BUILD_IN_REPAIR: 14
  349. };
  350. const blockType ={
  351. RATION:1,//定额
  352. FB:2,//分部
  353. FX:3,//分项
  354. BILL:4,//清单
  355. BX:5//补项
  356. };
  357. const filterType = {
  358. ALL:'0',
  359. LABOUR:'1',
  360. GENERAL_MATERIAL:'2',
  361. GENERAL_MACHINE:'3',
  362. MAIN_MATERIAL:'4',
  363. EQUIPMENT:'5',
  364. FBFX:'6',
  365. TECH:'7',
  366. JGCL:'8',
  367. ZGCL:'9',
  368. SCHZ:'10',
  369. ZYCL:'11'
  370. };
  371. const filterTypeArray = ['1','2','3','4','5'];
  372. const installFeeType = ['子目费用','分项费用','措施费用'];
  373. const installSectionBase = ['分别按人材机乘系数','人工','材料','机械'];
  374. const supplyComboMap = [{text:"自行采购",value:0},{text:"完全甲供",value:2},{text:"部分甲供",value:1},{text:"甲定乙供",value:3}];//后来调整了下拉选项的顺序,为了不改之前的业务逻辑,这里的值对换了一下
  375. const materialComboMap = [
  376. {text:materialType[materialTypeMap.GC],value:materialTypeMap.GC},
  377. {text:materialType[materialTypeMap.GJ],value:materialTypeMap.GJ},
  378. {text:materialType[materialTypeMap.MC],value:materialTypeMap.MC},
  379. {text:materialType[materialTypeMap.SN],value:materialTypeMap.SN},
  380. {text:materialType[materialTypeMap.SZ],value:materialTypeMap.SZ}
  381. ];