main_consts.js 11 KB

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