main_consts.js 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385
  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. ctNull: 6
  82. // ctCommonUnitFee: 6 // 树结点的手工输入综合单价的方式已废弃,现综合单价只读,引入市场单价。
  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 = {
  149. //自行采购
  150. ZXCG: 0,
  151. //部分甲供
  152. BFJG: 1,
  153. //完全甲供
  154. WQJG: 2,
  155. //甲定乙供
  156. JDYG: 3
  157. };
  158. const supplyText = {
  159. //自行采购
  160. ZXCG: '自行采购',
  161. //部分甲供
  162. BFJG: '部分甲供',
  163. //完全甲供
  164. WQJG: '完全甲供',
  165. //甲定乙供
  166. JDYG: '甲定乙供'
  167. };
  168. //三材类别
  169. const materialType = {
  170. 1: '钢材',
  171. 2: '钢筋',
  172. 3: '木材',
  173. 4: '水泥',
  174. 5: '商品砼',
  175. 6: '商品砂浆'
  176. };
  177. const materialTypeMap = {
  178. GC: 1,
  179. GJ: 2,
  180. MC: 3,
  181. SN: 4,
  182. ST: 5,
  183. SS: 6,
  184. 1:'GC',
  185. 2:'GJ',
  186. 3:'MC',
  187. 4:'SN',
  188. 5:'ST',
  189. 6:'SS'
  190. }
  191. //清单固定行
  192. const fixedFlag = commonConstants.fixedFlag;
  193. // 只读的固定类别(工程量、单价、综合合价只读,相当于是标题)
  194. const titleFlags = [
  195. fixedFlag.PROVISIONAL,
  196. fixedFlag.ESTIMATE,
  197. fixedFlag.ENGINEERING_ESITIMATE,
  198. fixedFlag.DAYWORK,
  199. fixedFlag.LABOUR,
  200. fixedFlag.MATERIAL,
  201. fixedFlag.MACHINE,
  202. fixedFlag.TURN_KEY_CONTRACT,
  203. fixedFlag.CLAIM_VISA,
  204. fixedFlag.CLAIM,
  205. fixedFlag.VISA
  206. ];
  207. const gljKeyArray =['code','name','specs','unit','type'];
  208. const rationKeyArray =['code','name','specs','unit','subType'];
  209. const gljLibKeyArray =['code', 'name', 'specs', 'unit', 'gljType'];
  210. const billType = commonConstants.billType;
  211. const billText = {
  212. 1:'费用',
  213. 2:'分部',
  214. 3:'分项',
  215. 4:'清单',
  216. 5:'补项'
  217. };
  218. let cpFeeTypes = [
  219. {type: 'direct', name: '直接费'},
  220. {type: 'labour', name: '人工费'},
  221. {type: 'material', name: '材料费'},
  222. {type: 'machine', name: '机械费'},
  223. {type: 'mainMaterial', name: '主材费'},
  224. {type: 'equipment', name: '设备费'},
  225. {type: 'manage', name: '企业管理费'},
  226. {type: 'profit', name: '利润'},
  227. {type: 'risk', name: '风险费'},
  228. {type: 'labourDiff', name: '人工价差'},
  229. {type: 'materialDiff', name: '材料价差'},
  230. {type: 'machineDiff', name: '机械价差'},
  231. {type: 'adjustLabour', name: '调整人工费'},
  232. {type: 'adjustMachineLabour', name: '调整机上人工费'},
  233. {type: 'unratedMaterial', name: '未计价材料费'},
  234. {type: 'organizeMeasures', name: '组织措施费'},
  235. {type: 'safeCivilization', name: '安全文明施工费'},
  236. {type: 'night', name: '夜间施工费'},
  237. {type: 'secondHandling', name: '二次搬运费'},
  238. {type: 'winterRainy', name: '冬雨季施工增加费'},
  239. {type: 'protection', name: '已完工程及设备保护费'},
  240. {type: 'clean', name: '工程定位复测点交及场地清理费'},
  241. {type: 'quotaDetermine', name: '工程定额测定费'},
  242. {type: 'materialInspect', name: '材料检验试验费'},
  243. {type: 'acceptance', name: '住宅工程质量分户验收费'},
  244. {type: 'docManage', name: '档案管理费'},
  245. {type: 'forceFee', name: '规费'},
  246. {type: 'fiveOne', name: '五险一金'},
  247. {type: 'sewage', name: '工程排污费'},
  248. {type: 'tax', name: '税金'},
  249. // {type: 'estimate', name: '暂估费'},
  250. {type: 'common', name: '工程造价'},
  251. {type: 'fee1', name: '费用1'}//,
  252. // {type: 'fee2', name: '费用2'},
  253. // {type: 'fee3', name: '费用3'},
  254. // {type: 'fee4', name: '费用4'},
  255. // {type: 'fee5', name: '费用5'},
  256. // {type: 'fee6', name: '费用6'},
  257. // {type: 'fee7', name: '费用7'},
  258. // {type: 'fee8', name: '费用8'},
  259. // {type: 'fee9', name: '费用9'}
  260. ];
  261. //8-27 zhang 这个已经不能用来判断工程类型了
  262. /*const engineeringType = {
  263. // 建筑工程
  264. ARCHITECTURE: 1,
  265. // 装饰工程
  266. DECORATE: 2,
  267. // 仿古建筑工程
  268. ANTIQUE_ARCHITECTURE: 3,
  269. // 安装工程
  270. BUILD_IN: 4,
  271. // 市政土建工程
  272. MUNICIPAL_CONSTRUCTION: 5,
  273. // 市政安装工程
  274. MUNICIPAL_BUILD_IN: 6,
  275. // 人工土石方工程
  276. ARTIFICIAL_EARTHWORK: 7,
  277. // 机械土石方工程
  278. MECHANICAL_EARTHWORK: 8,
  279. // 炉窖砌筑工程
  280. KILN_MASONRY: 9,
  281. // 园林工程
  282. GARDEN: 10,
  283. // 绿化工程
  284. PLANTING: 11,
  285. // 单拆除工程
  286. DISMANTLE: 12,
  287. // 建筑修缮工程
  288. BUILDING_REPAIR: 13,
  289. // 安装修缮工程
  290. BUILD_IN_REPAIR: 14
  291. };*/
  292. const blockType ={
  293. RATION:1,//定额
  294. FB:2,//分部
  295. FX:3,//分项
  296. BILL:4,//清单
  297. BX:5,//补项
  298. DXFY:6//大项费用
  299. };
  300. const filterType = {
  301. ALL:'0',
  302. LABOUR:'1',
  303. GENERAL_MATERIAL:'2',
  304. GENERAL_MACHINE:'3',
  305. MAIN_MATERIAL:'4',
  306. EQUIPMENT:'5',
  307. FBFX:'6',
  308. TECH:'7',
  309. JGCL:'8',
  310. ZGCL:'9',
  311. SCHZ:'10',
  312. ZYCL:'11',
  313. AMAE:'12',
  314. PBCL:'13'
  315. };
  316. // 文件类型
  317. const _fileKind = {
  318. // 投标
  319. tender: 1,
  320. // 招标
  321. bid: 2,
  322. // 控制价
  323. control: 3
  324. };
  325. const filterTypeArray = ['1','2','3','4','5'];
  326. const installFeeType = ['子目费用','分项费用','措施费用'];
  327. const installSectionBase = ['分别按人材机乘系数','人工','材料','机械'];
  328. //2019-04-02 ,{text:"部分甲供",value:1} “部分甲供”隐藏,“完全甲供”改文字为“甲供材料”。
  329. const supplyComboMap = [{text:"自行采购",value:0},{text:"甲供材料",value:2},{text:"甲定乙供",value:3}];//后来调整了下拉选项的顺序,为了不改之前的业务逻辑,这里的值对换了一下
  330. const materialComboMap = [
  331. {text:materialType[materialTypeMap.GC],value:materialTypeMap.GC},
  332. {text:materialType[materialTypeMap.GJ],value:materialTypeMap.GJ},
  333. {text:materialType[materialTypeMap.MC],value:materialTypeMap.MC},
  334. {text:materialType[materialTypeMap.SN],value:materialTypeMap.SN},
  335. {text:materialType[materialTypeMap.ST],value:materialTypeMap.ST},
  336. {text:materialType[materialTypeMap.SS],value:materialTypeMap.SS}
  337. ];
  338. //定额计算基数简称对应关系,目前只有导出标准接口使用
  339. const rationBaseShort = {
  340. '[定额人工费]': 'RGF',
  341. '[定额材料费]': 'CLF',
  342. '[定额其他材料费]': 'QTCLF',
  343. '[定额施工机具使用费]': 'JXF',
  344. '[市场价主材费]': 'SCJZCF',
  345. '[市场价设备费]': 'SCJSBF',
  346. '[人工工日]': 'RGGR',
  347. '[人工费价差]': 'RGJC',
  348. '[材料费价差]': 'CLJC',
  349. '[机上人工费价差]': 'JSRGJC',
  350. '[燃料动力费价差]': 'RLDLJC',
  351. '[建筑面积]': 'JZMJ',
  352. '[甲供定额人工费]': 'JGRGF',
  353. '[甲供定额材料费]': 'JGCLF',
  354. '[甲供定额施工机具费]': 'JGJXF',
  355. '[甲供主材费]': 'JGZCF',
  356. '[暂估材料费]': 'ZGF',
  357. '[机械折旧费]': 'JXZJF',
  358. '[特大机械检修费]': 'TDJXJXF',
  359. '[中小机械检修费]': 'ZXJXJXF',
  360. '[特大机械维护费]': 'TDJXWHF',
  361. '[中小机械维护费]': 'ZXJXWHF',
  362. '[安拆费及场外运输费]': 'ACCWYSF',
  363. '[定额仪器仪表费]': 'YQYBF',
  364. };