main_consts.js 9.6 KB

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