main_consts.js 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  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. divide_setting:'divide_setting',
  22. evaluate_list:'evaluate_list',
  23. };
  24. let gljType = gljUtil.gljType;
  25. // 计算基数 [定额基价材料费] 要用到的材料类型。
  26. const baseMaterialTypes = [
  27. gljType.GENERAL_MATERIAL,
  28. gljType.CONCRETE,
  29. gljType.MORTAR,
  30. gljType.MIX_RATIO,
  31. gljType.COMMERCIAL_CONCRETE,
  32. gljType.COMMERCIAL_MORTAR,
  33. gljType.PURCHASE_COMPONENT,
  34. gljType.GREEN_SEEDLING
  35. ];
  36. // 计算基数 [定额基价机械费] 要用到的机械类型。
  37. const baseMachineTypes = [
  38. gljType.GENERAL_MACHINE,
  39. gljType.MACHINE_COMPOSITION,
  40. gljType.MACHINE_LABOUR
  41. ];
  42. const baseMachineMasterTypes = [
  43. gljType.GENERAL_MACHINE
  44. ];
  45. // 全部材料类型。用于暂估等 (多了主材和设备)
  46. const allMaterialTypes = [
  47. gljType.GENERAL_MATERIAL,
  48. gljType.CONCRETE,
  49. gljType.MORTAR,
  50. gljType.MIX_RATIO,
  51. gljType.COMMERCIAL_CONCRETE,
  52. gljType.COMMERCIAL_MORTAR,
  53. gljType.PURCHASE_COMPONENT,
  54. gljType.GREEN_SEEDLING,
  55. gljType.MAIN_MATERIAL,
  56. gljType.EQUIPMENT
  57. ];
  58. // 会有组成物的材料、机械台班
  59. const compositionTypes =gljUtil.notEditType;//统一定义,方便覆盖
  60. const CP_Col_Width = { // 多处计算程序界面的列宽统一设置
  61. rowHeader: 30,
  62. colHeader: 30, // 这个是标题栏高度不是宽度,也写在一起
  63. code: 70,
  64. serialNo: 50,
  65. name: 200,
  66. dispExprUser: 180,
  67. feeRate: 60,
  68. displayFieldName: 120,
  69. statement: 380,
  70. memo: 120,
  71. unitFee: 90,
  72. totalFee: 90
  73. };
  74. const treeNodeCalcType = {
  75. ctRationCalcProgram: 1,
  76. ctBillCalcProgram: 2, // 汇总清单下所有定额的工料机
  77. ctGatherRationsFees: 3, // 汇总定额的各个费
  78. ctGatherBillsFees: 4, // 汇总清单的各个费
  79. ctCalcBaseValue: 5,
  80. ctNull: 6
  81. // ctCommonUnitFee: 6 // 树结点的手工输入综合单价的方式已废弃,现综合单价只读,引入市场单价。
  82. };
  83. const treeNodeCalcFlag = { // 主要用于清单。建筑的清单类型计算逻辑不能用公路。这里引入公路的计算Flag
  84. customTotalPrice: 1, // 用户直接输入金额
  85. customUnitPrice: 2, // 用户直接输入单价,金额是根据用户输入的单价算来的
  86. customDesignPrice: 3 // 用户直接输入设计单价,金额是根据用户输入的设计单价算来的
  87. // 末定义情况、0 // 金额是由定额计算的来的
  88. };
  89. const tenderTypes = {
  90. ttCalc: 1, // 正向调价
  91. ttReverseRation: 2, // 反向调价-调子目
  92. ttReverseGLJ: 3 // 反向调价-调工料机
  93. };
  94. const calcAllType = {
  95. catAll: 'all',
  96. catBills: 'bills',
  97. catRations: 'ration'
  98. };
  99. const priceTypes = {
  100. ptBasePrice: 1,
  101. ptAdjustPrice: 2,
  102. ptMarketPrice: 3,
  103. ptDiffPrice: 4
  104. };
  105. const subSheetIndex = {
  106. ssiRationGLJ: 0,
  107. ssiRationCoe: 1,
  108. // ssiRationAssistant: 2,
  109. ssiQuantityDetail: 3,
  110. ssiCalcProgram: 2,
  111. ssiMemo: 5,
  112. ssiFeature: 6
  113. };
  114. const volumePriceMaps = {
  115. "量人": gljType.LABOUR,
  116. "量材": gljType.GENERAL_MATERIAL,
  117. "量机": gljType.GENERAL_MACHINE,
  118. "量主": gljType.MAIN_MATERIAL,
  119. "量设": gljType.EQUIPMENT,
  120. "人工": gljType.LABOUR,
  121. "材料": gljType.GENERAL_MATERIAL,
  122. "机械": gljType.GENERAL_MACHINE,
  123. "主材": gljType.MAIN_MATERIAL,
  124. "设备": gljType.EQUIPMENT,
  125. 1: "量人",
  126. 201: "量材",
  127. 301: "量机",
  128. 4: "量主",
  129. 5: "量设"
  130. };
  131. const rationType = {
  132. ration: 1,
  133. volumePrice: 2,
  134. gljRation: 3,
  135. install:4
  136. };
  137. const rationPrefix = { //定额前缀,补/借
  138. none: '',
  139. complementary: '补',
  140. borrow: '借',
  141. replace: '换'
  142. };
  143. const rationFrom = {
  144. std: 'std',
  145. cpt: 'cpt'
  146. };
  147. let leafBillGetFeeType = {
  148. rationContent: 0,
  149. rationPriceConverse: 1,
  150. rationPrice: 2,
  151. billsPrice: 3
  152. };
  153. const zanguCalcType = {
  154. common: 0,
  155. gatherMaterial: 1
  156. };
  157. //供货方式
  158. const supplyType = {
  159. //自行采购
  160. ZXCG: 0,
  161. //部分甲供
  162. BFJG: 1,
  163. //完全甲供
  164. WQJG: 2,
  165. //甲定乙供
  166. JDYG: 3
  167. };
  168. const supplyText = {
  169. //自行采购
  170. ZXCG: '自行采购',
  171. //部分甲供
  172. BFJG: '部分甲供',
  173. //完全甲供
  174. WQJG: '完全甲供',
  175. //甲定乙供
  176. JDYG: '甲定乙供'
  177. };
  178. //三材类别
  179. const materialType = {
  180. 1: '钢材',
  181. 2: '钢筋',
  182. 3: '木材',
  183. 4: '水泥',
  184. 5: '标准砖'
  185. };
  186. const materialTypeMap = {
  187. GC: 1,
  188. GJ: 2,
  189. MC: 3,
  190. SN: 4,
  191. SZ: 5,
  192. 1:'GC',
  193. 2:'GJ',
  194. 3:'MC',
  195. 4:'SN',
  196. 5:'SZ'
  197. }
  198. //清单固定行
  199. const fixedFlag = commonConstants.fixedFlag;
  200. const gljKeyArray =['code','name','specs','unit','type'];
  201. const rationKeyArray =['code','name','specs','unit','subType'];
  202. const gljLibKeyArray =['code', 'name', 'specs', 'unit', 'gljType'];
  203. const billType ={
  204. DXFY:1,//大项费用
  205. FB:2,//分部
  206. FX:3,//分项
  207. BILL:4,//清单
  208. BX:5//补项
  209. };
  210. const billText = {
  211. 1:'费用',
  212. 2:'分部',
  213. 3:'分项',
  214. 4:'清单',
  215. 5:'补项'
  216. };
  217. // 2019.10.30,CSL
  218. // 说明:此处是重庆养护标准,作为代码模板,其它地区需要在其自已的文件中覆盖,如neimeng_2019.js。
  219. // 这里的命名十分头疼,因养护和建筑反过来,且各地区编办不统一,导致各地区命名出现混乱:如“人工费”,重庆建筑指市场价人工费,江西建筑指定额价人工费。
  220. // 规费、利润等这种,实际上是市场价算来的,但并不需要加market前缀。因为它是间接基数,且任何时候只有一个,不存在需要区分的情况。
  221. // 建安费命名没统一,没办法,重庆养护已发布,不允许再改了,维持现状。强迫症者对不住了。
  222. let cpFeeTypes = [
  223. {type: 'marketLabour', name: '人工费'},
  224. {type: 'marketMaterial', name: '材料费'},
  225. {type: 'marketMachine', name: '施工机械使用费'},
  226. {type: 'marketMachineLabour', name: '施工机械人工费'},
  227. {type: 'marketEquipment', name: '设备购置费'},
  228. {type: 'marketDirect', name: '直接费'},
  229. {type: 'labour', name: '定额人工费'},
  230. {type: 'material', name: '定额材料费'},
  231. {type: 'machine', name: '定额施工机械使用费'},
  232. {type: 'equipment', name: '定额设备费'},
  233. {type: 'direct', name: '定额直接费'},
  234. {type: 'measure', name: '措施费'},
  235. {type: 'measure1', name: '措施费I'},
  236. {type: 'measure2', name: '措施费II'},
  237. {type: 'manage', name: '企业管理费'},
  238. {type: 'force', name: '规费'},
  239. {type: 'profit', name: '利润'},
  240. {type: 'tax', name: '税金'},
  241. {type: 'common', name: '建安费'},
  242. {type: 'rationCommon', name: '定额建安费'}
  243. // {type: 'fee1', name: '费用1'},
  244. // {type: 'fee2', name: '费用2'}
  245. ];
  246. //8-27 zhang 这个已经不能用来判断工程类型了
  247. /*const engineeringType = {
  248. // 建筑工程
  249. ARCHITECTURE: 1,
  250. // 装饰工程
  251. DECORATE: 2,
  252. // 仿古建筑工程
  253. ANTIQUE_ARCHITECTURE: 3,
  254. // 安装工程
  255. BUILD_IN: 4,
  256. // 市政土建工程
  257. MUNICIPAL_CONSTRUCTION: 5,
  258. // 市政安装工程
  259. MUNICIPAL_BUILD_IN: 6,
  260. // 人工土石方工程
  261. ARTIFICIAL_EARTHWORK: 7,
  262. // 机械土石方工程
  263. MECHANICAL_EARTHWORK: 8,
  264. // 炉窖砌筑工程
  265. KILN_MASONRY: 9,
  266. // 园林工程
  267. GARDEN: 10,
  268. // 绿化工程
  269. PLANTING: 11,
  270. // 单拆除工程
  271. DISMANTLE: 12,
  272. // 建筑修缮工程
  273. BUILDING_REPAIR: 13,
  274. // 安装修缮工程
  275. BUILD_IN_REPAIR: 14
  276. };*/
  277. const blockType ={
  278. RATION:1,//定额
  279. FB:2,//分部
  280. FX:3,//分项
  281. BILL:4,//清单
  282. BX:5,//补项
  283. DXFY:6//大项费用
  284. };
  285. const filterType = {
  286. ALL:'0',
  287. LABOUR:'1',
  288. GENERAL_MATERIAL:'2',
  289. GENERAL_MACHINE:'3',
  290. MAIN_MATERIAL:'4',
  291. EQUIPMENT:'5',
  292. FBFX:'6',
  293. TECH:'7',
  294. JGCL:'8',
  295. ZGCL:'9',
  296. SCHZ:'10',
  297. ZYCL:'11'
  298. };
  299. const filterTypeArray = ['1','2','3','4','5'];
  300. const installFeeType = ['子目费用','分项费用','措施费用'];
  301. const installSectionBase = ['分别按人材机乘系数','人工','材料','机械'];
  302. const supplyComboMap = [{text:"自行采购",value:0},{text:"完全甲供",value:2},{text:"部分甲供",value:1},{text:"甲定乙供",value:3}];//后来调整了下拉选项的顺序,为了不改之前的业务逻辑,这里的值对换了一下
  303. const materialComboMap = [
  304. {text:materialType[materialTypeMap.GC],value:materialTypeMap.GC},
  305. {text:materialType[materialTypeMap.GJ],value:materialTypeMap.GJ},
  306. {text:materialType[materialTypeMap.MC],value:materialTypeMap.MC},
  307. {text:materialType[materialTypeMap.SN],value:materialTypeMap.SN},
  308. {text:materialType[materialTypeMap.SZ],value:materialTypeMap.SZ}
  309. ];