main_consts.js 9.1 KB

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