main_consts.js 11 KB

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