main_consts.js 9.7 KB

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