main_consts.js 9.5 KB

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