main_consts.js 9.1 KB

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