main_consts.js 11 KB

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