main_consts.js 10 KB

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