main_consts.js 10 KB

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