guangdong_zhongshan.js 43 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441
  1. // INTERFACE_EXPORT =,必须这么写,这样才能在导出时动态加载脚本后,覆盖前端代码
  2. INTERFACE_EXPORT = (() => {
  3. "use strict";
  4. const feeRateMap = {
  5. 冬季施工增加费: "DJSGZJFFL",
  6. 冬季施工: "DJSGZJFFL",
  7. 雨季施工增加费: "YUJSGZJFFL",
  8. 雨季施工: "YUJSGZJFFL",
  9. 夜间施工增加费: "YEJSGZJFFL",
  10. 夜间施工: "YEJSGZJFFL",
  11. 高原地区施工增加费: "GYDQSGZJFFL",
  12. 高原施工: "GYDQSGZJFFL",
  13. 风沙地区施工增加费: "FSDQSGZJFFL",
  14. 风沙施工: "FSDQSGZJFFL",
  15. 沿海地区施工增加费: "YHDQSGZJFFL",
  16. 沿海施工: "YHDQSGZJFFL",
  17. 行车干扰施工增加费: "XCGRGCSGZJFFL",
  18. 行车干扰: "XCGRGCSGZJFFL",
  19. 工地转移费: "GDZYFFL",
  20. '工地转移(km)': "GDZYFFL",
  21. 施工辅助费: "SGFZFFL",
  22. 施工辅助: "SGFZFFL",
  23. 基本费用: "JBFYFL",
  24. 主副食运费补贴: "ZFSYFBTFL",
  25. '综合里程(km)': "ZFSYFBTFL",
  26. 职工探亲路费: "ZGTQLFFL",
  27. 职工探亲: "ZGTQLFFL",
  28. 职工取暖补贴: "ZGQNBTFL",
  29. 职工取暖: "ZGQNBTFL",
  30. 财务费用: "CWFYFL",
  31. 养老保险费: "YANGLBXFFL",
  32. 失业保险费: "SYBXFFL",
  33. 医疗保险费: "YILBXFFL",
  34. 工伤保险费: "GSBXFL",
  35. 养老保险: "YANGLBXFFL",
  36. 失业保险: "SYBXFFL",
  37. 医疗保险: "YILBXFFL",
  38. 工伤保险: "GSBXFL",
  39. 住房公积金: "ZFGJJFL",
  40. 规费: "GFZHFL",
  41. 利润: "LRL",
  42. 税金: "SL",
  43. 土方: "TF",
  44. 石方: "SF",
  45. 运输: "YS",
  46. 路面: "LM",
  47. "路面(不计雨)": "LM",
  48. 隧道: "SD",
  49. 构造物I: "GZW1",
  50. "构造物I(不计冬)": "GZW1",
  51. "构造物I(不计雨)": "GZW1",
  52. 构造物II: "GZW2",
  53. "构造物III(桥梁)": "GZW3",
  54. "构造物III(除桥以外)": "GZW3",
  55. "构造物III(除桥以外不计雨夜)": "GZW3",
  56. 技术复杂大桥: "JSFZDQ",
  57. "钢材及钢结构(桥梁)": "GJG",
  58. "钢材及钢结构(除桥以外)": "GJG",
  59. "钢材及钢结构(除桥以外不计夜)": "GJG",
  60. };
  61. //计算程序有,这里没有:施工机械使用费\施工机械人工费\定额人工费\定额材料费\定额施工机械使用费
  62. const itemFeeMap = {
  63. 'marketLabour': 'RGF',
  64. 'marketMaterial': 'CLF',
  65. 'marketEquipment': 'SBGZF',
  66. 'direct': 'DEZJF',
  67. 'equipment': 'DESBF',
  68. 'marketDirect': 'ZJF',
  69. 'measure': 'CSF',
  70. 'manage': 'QYGLF',
  71. 'force': 'GF',
  72. 'profit': 'LR',
  73. 'tax': 'SJ',
  74. 'common': 'JAF',
  75. 'rationCommon': 'DEJAF'
  76. };
  77. const feeLibNoMap = {
  78. 'eba0e7c0-cfe6-11ea-ba15-739be477d1fe': 'GYSFL-000000-2018-86',
  79. '451d3180-e02e-11ea-8056-1514dfc2f39e': 'GYSFL-340000-2019-210'
  80. };
  81. const FixedCostMap = {
  82. //折旧费、检修费、维护费、安拆辅助费
  83. '折旧费': 1,
  84. '检修费': 1,
  85. '维护费': 1,
  86. '安拆辅助费':1
  87. }
  88. function getBasePrice(projectGLJID, tenderProject) {
  89. let glj = _.find(tenderProject.projectGLJ.datas.gljList, {
  90. id: projectGLJID
  91. })
  92. return glj ? gljUtil.getBasePrice(glj, null, null, null, decimalObj, false, _, scMathUtil) : 0;
  93. }
  94. function getFeeRate(programID, fieldName, tenderProject) {
  95. let rate = 0;
  96. let template = tenderProject.calcProgram.compiledTemplates;
  97. if (template[programID]) {
  98. let item = _.find(template[programID].calcItems, {
  99. fieldName: fieldName
  100. })
  101. if (item) rate = item.feeRate;
  102. }
  103. return rate
  104. }
  105. /**
  106. *
  107. * @param {String} areaKey - 地区标识,如:'安徽@马鞍山',有些地区的接口只是取值上有不同,共有一个接口脚本, 需要通过地区标识确定一些特殊处理
  108. * @param {Number} exportKind - 导出类型,招标、投标、控制价
  109. * @param {Object} projectData - 项目表数据:{ 建设项目Data, children: [单位工程...] }
  110. * @param {Object} tenderDetailMap - 单位工程ID与getData接口数据(projectObj.project的结构)的映射。
  111. * @return {Promise<Array>} - 返回的数据结构必须按照规定:[{ data, exportKind, fileName }],参考web\building_saas\standard_interface\index.js中的注释说明
  112. */
  113. async function entry(areaKey, exportKind, projectData, tenderDetailMap) {
  114. const {
  115. UTIL,
  116. Element
  117. } = INTERFACE_EXPORT_BASE;
  118. const {
  119. EXPORT_KIND: {
  120. BID_INVITATION,
  121. BID_SUBMISSION,
  122. CONTROL
  123. },
  124. fixedFlag,
  125. } = window.commonConstants;
  126. let cprjType = {
  127. 1: "ZBKZJ", // 招标
  128. 2: "TBBJ", // 投标
  129. 3: "GCLQD", // 控制价
  130. };
  131. const isBidInvitation = exportKind === BID_INVITATION; // 是否是招标
  132. const isBidSubmission = exportKind === BID_SUBMISSION; // 是否是投标
  133. const isControl = exportKind === CONTROL; // 是否是控制价
  134. function emptyElement(name) {
  135. this.name = name;
  136. this.attrs = [];
  137. this.children = [];
  138. }
  139. // 建设项目根节点信息
  140. function CprjInfo(projectName) {
  141. const attrs = [{
  142. name: "CprjName",
  143. value: projectName,
  144. },
  145. {
  146. name: "CprjType",
  147. value: cprjType[exportKind],
  148. },
  149. ];
  150. Element.call(this, "CprjInfo", attrs);
  151. }
  152. // 项目基本信息
  153. function SystemInfo(projectData) {
  154. let hardID = UTIL.generateHardwareId();
  155. let [cpuId, diskId, macId] = hardID.split(";");
  156. const attrs = [{
  157. name: "Name",
  158. value: "公路工程造价数据标准",
  159. },
  160. {
  161. name: "Version",
  162. value: "1.0",
  163. },
  164. {
  165. name: "SoftwareName",
  166. value: "纵横公路云造价",
  167. },
  168. {
  169. name: "SoftwareVer",
  170. value: "V" + VERSION,
  171. },
  172. {
  173. name: "SoftwareCompany",
  174. value: "珠海纵横创新软件有限公司",
  175. },
  176. {
  177. name: "MakeDate",
  178. value: UTIL.getNowFormatTime(),
  179. },
  180. {
  181. name: "Key1",
  182. value: window.btoa(VERSION),
  183. },
  184. {
  185. name: "Key2",
  186. value: window.btoa(diskId),
  187. },
  188. {
  189. name: "Key3",
  190. value: window.btoa(macId),
  191. },
  192. ];
  193. if (isBidSubmission)
  194. attrs.splice(6, 0, {
  195. name: "BidderVer",
  196. value: UTIL.getNowFormatTime(),
  197. });
  198. Element.call(this, "SystemInfo", attrs);
  199. }
  200. //造价依据
  201. function CostBasis() {
  202. // ItemStandardNo="GYSFX-000000-2018-86"
  203. const attrs = [{
  204. name: "MakeRuleNo",
  205. value: "GYSBB-000000-2018-86",
  206. },
  207. {
  208. name: "MakeRuleName",
  209. value: "公路工程建设项目概算预算编制办法",
  210. },
  211. {
  212. name: "ItemStandardNo",
  213. value: "GYSFX-000000-2018-86",
  214. },
  215. ];
  216. Element.call(this, "CostBasis", attrs);
  217. //定额库信息
  218. //to do 改成实际的值
  219. function NormLib() {
  220. const attrs = [{
  221. name: "NormLibNo",
  222. value: "YSDE-000000-2018-86",
  223. },
  224. {
  225. name: "NormLibName",
  226. value: "部颁公路工程预算定额(2018)",
  227. },
  228. {
  229. name: "Type",
  230. value: "ZDEK",
  231. },
  232. ];
  233. Element.call(this, "NormLib", attrs);
  234. }
  235. this.children.push(new NormLib());
  236. }
  237. function Rate(tenderProject, feeRateInfo, seirNo) {
  238. //RateNo="1" Name="纵横软件测试版本" RateLibNo="GYSFL-000000-2018-86"
  239. const attrs = [{
  240. name: "RateNo",
  241. value: seirNo,
  242. },
  243. {
  244. name: "Name",
  245. value: feeRateInfo.name,
  246. },
  247. {
  248. name: "RateLibNo",
  249. value: feeLibNoMap[feeRateInfo.libID],
  250. },
  251. ];
  252. Element.call(this, "Rate", attrs);
  253. let RateParams = new emptyElement("RateParams");
  254. let subRates = projectObj.project.FeeRate.getAllSubRates(feeRateInfo.rates);
  255. for (let s of subRates) {
  256. let sname = s.name.replace("(%)", "");
  257. sname = sname.replace("(%)", "");
  258. if (feeRateMap[sname]) {
  259. let value = "";
  260. if (s.editable) {
  261. let sel = _.find(s.optionList, {
  262. selected: true,
  263. });
  264. if (sel) {
  265. value = sel.name;
  266. } else if (gljUtil.isDef(s.value)) {
  267. value = s.value;
  268. }
  269. } else {
  270. value = _.findIndex(s.optionList, {
  271. selected: true,
  272. });
  273. if (value == -1) value = 0;
  274. }
  275. /* if (sname == '利润') tenderProject.ProfitRate = value;
  276. if (sname == '税金') tenderProject.TaxRate = value; */
  277. RateParams.children.push(new RateParam(feeRateMap[sname], value));
  278. }
  279. }
  280. this.children.push(RateParams);
  281. function RateParam(RateTypeNo, RateParamNo) {
  282. //<RateParam RateTypeNo="DJSGZJFFL" RateParamNo="0" Ratio="100"/>
  283. const attrs = [{
  284. name: "RateTypeNo",
  285. value: RateTypeNo,
  286. },
  287. {
  288. name: "RateParamNo",
  289. value: RateParamNo,
  290. },
  291. {
  292. name: "Ratio",
  293. value: "100",
  294. },
  295. ];
  296. Element.call(this, "RateParam", attrs);
  297. }
  298. let RateValues = new emptyElement("RateValues");
  299. function RateValue(CostTypeNo, RateTypeNo, value) {
  300. const attrs = [{
  301. name: "CostTypeNo",
  302. value: CostTypeNo,
  303. },
  304. {
  305. name: "RateTypeNo",
  306. value: RateTypeNo,
  307. },
  308. {
  309. name: "RateValue",
  310. value: value,
  311. },
  312. ];
  313. Element.call(this, "RateValue", attrs);
  314. }
  315. let prefix = "";
  316. for (let r of feeRateInfo.rates) {
  317. if (!r.ParentID && feeRateMap[r.name]) prefix = feeRateMap[r.name];
  318. if (feeRateMap[r.name] && r.ParentID) {
  319. RateValues.children.push(new RateValue(prefix, feeRateMap[r.name], r.rate));
  320. }
  321. }
  322. this.children.push(RateValues);
  323. }
  324. function Pract(tpdata, seriNo) {
  325. let pgljData = tpdata.projectGLJ.datas;
  326. let decimalObj = tpdata.property.decimal;
  327. const attrs = [{
  328. name: "PractNo",
  329. value: seriNo,
  330. },
  331. {
  332. name: "Name",
  333. value: pgljData.constData.usedUnitPriceInfo.name,
  334. },
  335. ];
  336. Element.call(this, "Pract", attrs);
  337. let Param = {
  338. name: "Param",
  339. attrs: [{
  340. name: "TaxLibNo",
  341. value: "CCSBZ-440000-2019-544",
  342. },
  343. {
  344. name: "AuxRate",
  345. value: pgljData.constData.assistProductionFeeRate,
  346. },
  347. ],
  348. children: [],
  349. };
  350. let elecDatas = electrovalenceObj.getElectrovalenceDatas(null, pgljData.com_electrovalence, pgljData.gljList);
  351. electrovalenceObj.calcPertElectrovalenceMarketPrice(elecDatas);
  352. for (let e of elecDatas) {
  353. let Electro = {
  354. name: "Electro",
  355. attrs: [{
  356. name: "Code",
  357. value: e.code,
  358. },
  359. {
  360. name: "Price",
  361. value: e.electPrice,
  362. },
  363. {
  364. name: "Ratio",
  365. value: e.coe,
  366. },
  367. ],
  368. children: [],
  369. };
  370. Param.children.push(Electro);
  371. }
  372. this.children.push(Param);
  373. function MP(g) {
  374. const attrs = [{
  375. name: "Code",
  376. value: g.code,
  377. },
  378. {
  379. name: "PractName",
  380. value: g.name,
  381. },
  382. {
  383. name: "Spec",
  384. value: g.specs,
  385. },
  386. {
  387. name: "Unit",
  388. value: g.unit,
  389. },
  390. {
  391. name: "BugetPrice",
  392. value: g.priceInfo.tenderPrice,
  393. },
  394. {
  395. name: "NormPrice",
  396. value: g.priceInfo.basePrice,
  397. },
  398. {
  399. name: "IsAdd",
  400. value: g.unit_price.is_add,
  401. },
  402. ];
  403. Element.call(this, "MP", attrs);
  404. }
  405. function Material(g) {
  406. const attrs = [{
  407. name: "Code",
  408. value: g.code,
  409. },
  410. {
  411. name: "PractName",
  412. value: g.name,
  413. },
  414. {
  415. name: "Spec",
  416. value: g.specs,
  417. },
  418. {
  419. name: "Unit",
  420. value: g.unit,
  421. },
  422. {
  423. name: "BugetPrice",
  424. value: g.priceInfo.tenderPrice,
  425. },
  426. {
  427. name: "NormPrice",
  428. value: g.priceInfo.basePrice,
  429. },
  430. {
  431. name: "IsAdd",
  432. value: g.unit_price.is_add,
  433. },
  434. {
  435. name: "OrgPrice",
  436. value: g.unit_price.originalPrice ? g.unit_price.originalPrice : 0,
  437. },
  438. {
  439. name: "TransFee",
  440. value: g.unit_price.unitFreight ? g.unit_price.unitFreight : 0,
  441. },
  442. {
  443. name: "GwRate",
  444. value: g.unit_price.grossWeightCoe_n ? g.unit_price.grossWeightCoe_n : 0,
  445. },
  446. {
  447. name: "OffSiteLf",
  448. value: g.unit_price.offSiteTransportLossRate_n ? g.unit_price.offSiteTransportLossRate_n : 0,
  449. },
  450. {
  451. name: "OnSiteLf",
  452. value: 0,
  453. },
  454. {
  455. name: "LoadLf",
  456. value: g.unit_price.handlingLossRate_n ? g.unit_price.handlingLossRate_n : 0,
  457. },
  458. {
  459. name: "StoreRate",
  460. value: g.unit_price.purchaseStorageRate_n ? g.unit_price.purchaseStorageRate_n : 0,
  461. },
  462. {
  463. name: "PackageRecycleFee",
  464. value: g.unit_price.packageRecoverValue ? g.unit_price.packageRecoverValue : 0,
  465. },
  466. ];
  467. Element.call(this, "Material", attrs);
  468. // if (g.unit_price.calcMaterial == 1) { //有材料计算
  469. // let index = gljUtil.getIndex(g);
  470. // let orList = [];
  471. // for (let o of pgljData.originalList) {
  472. // if (o.connect_key == index) orList.push(new OrgPrices(o));
  473. // }
  474. // if (orList.length > 0) this.children = orList;
  475. // }
  476. function CostStructure(r) {
  477. //待获取
  478. this.name = "CostStructure";
  479. this.attrs = [];
  480. this.children = [];
  481. }
  482. function Consume(r, o) {
  483. this.name = "Consume";
  484. this.attrs = [];
  485. this.children = [];
  486. for (let g of o.ration_gljs) {
  487. if (g.rationID == r.ID) {
  488. let r_quantity = scMathUtil.roundForObj(r.quantity, tpdata.property.decimal.ration.quantity);
  489. this.children.push(new ConsumeItem(g, r_quantity));
  490. }
  491. }
  492. }
  493. function ConsumeItem(g, ration_quantity) {
  494. const attrs = [{
  495. name: "Code", //待获取
  496. value: g.code,
  497. },
  498. {
  499. name: "Consumption",
  500. value: scMathUtil.roundForObj(ration_quantity * parseFloat(g.quantity), tpdata.property.decimal.glj.quantity),
  501. },
  502. ];
  503. Element.call(this, "ConsumeItem", attrs);
  504. }
  505. function Norm(r, o) {
  506. const attrs = [{
  507. name: "NormLibNo", //待获取
  508. value: "",
  509. },
  510. {
  511. name: "DisplayCode",
  512. value: r.code,
  513. },
  514. {
  515. name: "Name",
  516. value: r.name,
  517. },
  518. {
  519. name: "Unit",
  520. value: r.unit,
  521. },
  522. {
  523. name: "Num",
  524. value: r.quantity,
  525. },
  526. {
  527. name: "CostTypeNo",
  528. value: "", //待获取
  529. },
  530. {
  531. name: "FabricationCost", //待获取
  532. value: "",
  533. },
  534. {
  535. name: "AdjustStatus",
  536. value: "",
  537. },
  538. ];
  539. Element.call(this, "Norm", attrs);
  540. this.children.push(new CostStructure(r));
  541. this.children.push(new Consume(r, o));
  542. }
  543. function SelfCollect(o) {
  544. const attrs = [{
  545. name: "OtherCost",
  546. value: 0,
  547. }, ];
  548. Element.call(this, "SelfCollect", attrs);
  549. for (let r of o.rations) {
  550. this.children.push(new Norm(r, o));
  551. }
  552. }
  553. function OrgPrices(o) {
  554. const attrs = [{
  555. name: "OrgPricevalue",
  556. value: o.supplyPrice,
  557. },
  558. {
  559. name: "Ratio",
  560. value: o.coe,
  561. },
  562. ];
  563. Element.call(this, "OrgPrices", attrs);
  564. if (!o.rations) return;
  565. this.children.push(new SelfCollect(o));
  566. }
  567. }
  568. function Mech(g,gljKeyMap) {
  569. const attrs = [{
  570. name: "Code",
  571. value: g.code,
  572. },
  573. {
  574. name: "PractName",
  575. value: g.name,
  576. },
  577. {
  578. name: "Spec",
  579. value: g.specs,
  580. },
  581. {
  582. name: "Unit",
  583. value: g.unit,
  584. },
  585. {
  586. name: "BugetPrice",
  587. value: g.priceInfo.tenderPrice,
  588. },
  589. {
  590. name: "NormPrice",
  591. value: g.priceInfo.basePrice,
  592. },
  593. {
  594. name: "IsAdd",
  595. value: g.unit_price.is_add,
  596. },
  597. ];
  598. Element.call(this, "Mech", attrs);
  599. let FixedCostItems = [];
  600. let fcsum = 0;
  601. let VariableCostItems = [];
  602. let vcsum = 0;
  603. if (g.ratio_data && g.ratio_data.length > 0) {
  604. for (let ratio of g.ratio_data) {
  605. let rIndex = gljUtil.getIndex(ratio);
  606. let rglj = gljKeyMap[rIndex];
  607. let ts = scMathUtil.roundForObj(parseFloat(ratio.consumption) * rglj.priceInfo.tenderPrice, decimalObj.glj.unitPrice);
  608. if (FixedCostMap[ratio.name]) {
  609. FixedCostItems.push(new FixedCostItem(ratio));
  610. fcsum = scMathUtil.roundForObj(fcsum + ts, decimalObj.glj.unitPrice);
  611. } else {
  612. VariableCostItems.push(new VariableCostItem(ratio));
  613. vcsum = scMathUtil.roundForObj(vcsum + ts, decimalObj.glj.unitPrice);
  614. }
  615. }
  616. }
  617. if (FixedCostItems.length > 0) {
  618. let fc = new FixedCost(fcsum);
  619. fc.children = FixedCostItems;
  620. this.children.push(fc);
  621. }
  622. if (VariableCostItems.length > 0) {
  623. let vc = new VariableCost(vcsum);
  624. vc.children = VariableCostItems;
  625. this.children.push(vc);
  626. }
  627. function VariableCost(sum) {
  628. const attrs = [{
  629. name: "VariableCostSum",
  630. value: sum,
  631. }];
  632. Element.call(this, "VariableCost", attrs);
  633. }
  634. function VariableCostItem(item) {
  635. const attrs = [{
  636. name: "VariableCostNo",
  637. value: item.code,
  638. },{
  639. name: "Consumption",
  640. value: item.consumption,
  641. }]
  642. Element.call(this, "VariableCostItem", attrs);
  643. }
  644. function FixedCost(sum) {
  645. const attrs = [{
  646. name: "FixedCostSum",
  647. value: sum,
  648. }, {
  649. name: "FixedRate",
  650. value: 1,
  651. }];
  652. Element.call(this, "FixedCost", attrs);
  653. }
  654. function FixedCostItem(item) {
  655. const attrs = [{
  656. name: "FixedCostNo",
  657. value: item.code,
  658. },{
  659. name: "Sum",
  660. value: item.consumption,
  661. }]
  662. Element.call(this, "FixedCostItem", attrs);
  663. }
  664. }
  665. let Mps = new emptyElement("Mps");
  666. let Materials = new emptyElement("Materials");
  667. let Mechs = new emptyElement("Mechs");
  668. let gljKeyMap = {};
  669. for (let g of pgljData.gljList) {
  670. let type = g.type + "";
  671. gljKeyMap[gljUtil.getIndex(g)] = g;
  672. type = type.charAt(0);
  673. if (type == "1") {
  674. Mps.children.push(new MP(g));
  675. } else if (type == "2" || type == 5) {
  676. Materials.children.push(new Material(g));
  677. } else if (type == "3") {
  678. Mechs.children.push(new Mech(g,gljKeyMap));
  679. }
  680. }
  681. this.children.push(Mps);
  682. this.children.push(Materials);
  683. this.children.push(Mechs);
  684. }
  685. function EprjInfo(tenderProject) {
  686. let bills = tenderProject.Bills.datas;
  687. let totalItem = null;
  688. let proItem = null; //暂列金额项
  689. for (let b of bills) {
  690. if (b.flagsIndex && b.flagsIndex.fixed && b.flagsIndex.fixed.flag == fixedFlag.TOTAL_COST) totalItem = b;
  691. if (b.flagsIndex && b.flagsIndex.fixed && b.flagsIndex.fixed.flag == fixedFlag.PROVISIONAL) proItem = b;
  692. }
  693. const attrs = [{
  694. name: "Name",
  695. value: tenderProject.projectInfo.name,
  696. },
  697. {
  698. name: "Sums",
  699. value: totalItem.feesIndex && totalItem.feesIndex.common && totalItem.feesIndex.common.tenderTotalFee ? totalItem.feesIndex.common.tenderTotalFee : 0,
  700. },
  701. ];
  702. Element.call(this, "EprjInfo", attrs);
  703. this.children.push(new SummaryOfCost(totalItem, proItem));
  704. this.children.push(new MakeInfo(tenderProject));
  705. this.children.push(new Params(tenderProject));
  706. this.children.push(new getBillsItems(tenderProject));
  707. this.children.push(new getIndexs(tenderProject));
  708. let bidEvaluationMainMaterials = getBidEvaluationMainMaterial(tenderProject);
  709. if(bidEvaluationMainMaterials.length > 0) this.children.push(...bidEvaluationMainMaterials);
  710. }
  711. function getBidEvaluationMainMaterial(tenderProject) {
  712. let bidMaterials = [];
  713. let i = 1;
  714. for (let b of tenderProject.bidMaterialData) {
  715. bidMaterials.push(new BidEvaluationMainMaterial(b, i));
  716. i++
  717. }
  718. return bidMaterials;
  719. function BidEvaluationMainMaterial(b, index) {
  720. const attrs = [{
  721. name: "Code",
  722. value: index,
  723. },
  724. {
  725. name: "Number",
  726. value: b.code
  727. },
  728. {
  729. name: "Name",
  730. value: b.name
  731. },
  732. {
  733. name: "Specification",
  734. value: b.specs
  735. },
  736. {
  737. name: "Unit",
  738. value: b.unit
  739. },
  740. {
  741. name: "Price",
  742. value: b.tenderPrice
  743. },
  744. {
  745. name: "LimitedPrice",
  746. value: b.tenderPrice
  747. },
  748. {
  749. name: "Quantity",
  750. value: b.quantity
  751. },
  752. {
  753. name: "Total",
  754. value: b.totalPrice
  755. },
  756. {
  757. name: "Remark",
  758. value: b.remark
  759. }
  760. ];
  761. Element.call(this, "BidEvaluationMainMaterial", attrs);
  762. }
  763. }
  764. function getIndexs(tenderProject) {
  765. let Indexs = new emptyElement('Indexs');
  766. let feature = tenderProject.property.projectFeature ? tenderProject.property.projectFeature : [];
  767. for (let f of feature) {
  768. if (f.code) Indexs.children.push(new IndexItem(f))
  769. }
  770. return Indexs;
  771. function IndexItem(fea) {
  772. const attrs = [{
  773. name: "Code",
  774. value: fea.code,
  775. },
  776. {
  777. name: "Name",
  778. value: fea.dispName,
  779. },
  780. {
  781. name: "Unit",
  782. value: fea.unit,
  783. },
  784. {
  785. name: "Value",
  786. value: fea.value,
  787. },
  788. {
  789. name: "Remark",
  790. value: fea.remark,
  791. }
  792. ]
  793. Element.call(this, "IndexItem", attrs);
  794. }
  795. }
  796. function getBillsItems(tenderProject) {
  797. let items = new emptyElement("Items");
  798. let rootNodes = tenderProject.mainTree.roots;
  799. for (let r of rootNodes) {
  800. setItem(r, -1, items.children);
  801. }
  802. return items;
  803. function setItem(bNode, level, list) {
  804. if (bNode.sourceType == ModuleNames.ration) return;
  805. list.push(new bill(bNode, level));
  806. if (bNode.children && bNode.children.length > 0) {
  807. level += 1;
  808. for (let c of bNode.children) {
  809. setItem(c, level, list);
  810. }
  811. }
  812. function bill(bNode, level) {
  813. let data = bNode.data;
  814. let CostKind = 3;
  815. if (data.name.indexOf("安全生产费") != -1) CostKind = 1;
  816. if (data.name.indexOf("暂列金额") != -1) CostKind = 2;
  817. //1 = 工程量×综合单价;2 = 计算基数×费率;3 = 工程量×单价。
  818. let CalcType = 2;
  819. if (data.calcFlag == 2) CalcType = 3;
  820. if (data.calcFlag == 1) CalcType = 1;
  821. //取暂估价类型。读取造价书界面的专项暂定列。0=材料暂估价,1=工程设备暂估价,2=专业工程暂估价,没有选的输出为空。
  822. let ProvisionalType = "";
  823. if (data.specialProvisional == "材料") ProvisionalType = 0;
  824. if (data.specialProvisional == "工程设备") ProvisionalType = 1;
  825. if (data.specialProvisional == "专业工程") ProvisionalType = 2;
  826. //MpRatio
  827. let MpRatio = "";
  828. let MaterialRatio = "";
  829. let MechRatio = "";
  830. if (data.quantityCoe) {
  831. if (data.quantityCoe["labour"]) MpRatio = data.quantityCoe["labour"];
  832. if (data.quantityCoe["material"]) MaterialRatio = data.quantityCoe["material"];
  833. if (data.quantityCoe["machine"]) MechRatio = data.quantityCoe["machine"];
  834. }
  835. const attrs = [{
  836. name: "ListCode",
  837. value: data.code,
  838. },
  839. {
  840. name: "ListName",
  841. value: data.name,
  842. },
  843. {
  844. name: "Unit",
  845. value: data.unit,
  846. },
  847. {
  848. name: "Num",
  849. value: data.quantity,
  850. },
  851. {
  852. name: "QtyFomula",
  853. value: data.calcBase //data.calcBase ? cbParser.toFExpr(data.calcBase, tenderProject.mainTree.items) : "",
  854. },
  855. {
  856. name: "Price",
  857. value: data.feesIndex && data.feesIndex.common ? data.feesIndex.common.tenderUnitFee : "",
  858. },
  859. {
  860. name: "Rate",
  861. value: 100,
  862. },
  863. {
  864. name: "Sum",
  865. value: data.feesIndex && data.feesIndex.common ? data.feesIndex.common.tenderTotalFee : "",
  866. },
  867. {
  868. name: "ChapterKind",
  869. value: level,
  870. },
  871. {
  872. name: "CostKind",
  873. value: CostKind,
  874. },
  875. {
  876. name: "CalcType",
  877. value: CalcType,
  878. },
  879. {
  880. name: "ProvisionalType",
  881. value: ProvisionalType,
  882. },
  883. {
  884. name: "MeterRules",
  885. value: "",
  886. },
  887. {
  888. name: "Content",
  889. value: data.jobContentText,
  890. },
  891. {
  892. name: "Remarks",
  893. value: data.remark,
  894. },
  895. {
  896. name: "MpRatio",
  897. value: MpRatio,
  898. },
  899. {
  900. name: "MaterialRatio",
  901. value: MaterialRatio,
  902. },
  903. {
  904. name: "MechRatio",
  905. value: MechRatio,
  906. },
  907. {
  908. name: "AdjustedPrice",
  909. value: data.feesIndex && data.feesIndex.common ? data.feesIndex.common.tenderUnitFee : "",
  910. },
  911. {
  912. name: "AdjustedSums",
  913. value: data.feesIndex && data.feesIndex.common ? data.feesIndex.common.tenderTotalFee : "",
  914. },
  915. {
  916. name: "ItemType",
  917. value: 1,
  918. },
  919. {
  920. name: "FomulaCode",
  921. value: "",
  922. },
  923. ];
  924. Element.call(this, "Item", attrs);
  925. let cc = CostComposition(bNode);
  926. if (cc) this.children.push(cc);
  927. this.children.push(CostStructure(data))
  928. function CostComposition(bNode) {
  929. let CostComposition = new emptyElement('CostComposition');
  930. let Norms = [];
  931. let Costs = [];
  932. if (bNode.children && bNode.children.length > 0 && bNode.children[0].sourceType == ModuleNames.ration) {
  933. for (let r of bNode.children) {
  934. if (r.data.type == rationType.ration) {
  935. Norms.push(new Ration(r.data));
  936. } else {
  937. Costs.push(new Cost(r.data));
  938. }
  939. }
  940. }
  941. if (Norms.length > 0) CostComposition.children.push(...Norms);
  942. if (Costs.length > 0) CostComposition.children.push(...Costs);
  943. if (bNode.data.calcBase) CostComposition.children.push(new Formula(bNode.data));
  944. return CostComposition.children.length > 0 ? CostComposition : null;
  945. function Formula(bills) {
  946. const attrs = [{
  947. name: "Name",
  948. value: bills.name
  949. },
  950. {
  951. name: "Formulas",
  952. value: bills.calcBase
  953. },
  954. {
  955. name: "Ratio",
  956. value: 1
  957. },
  958. {
  959. name: "Sum",
  960. value: bills.feesIndex && bills.feesIndex.common ? bills.feesIndex.common.tenderTotalFee : "",
  961. },
  962. {
  963. name: "Remarks",
  964. value: bills.remark
  965. }
  966. ]
  967. Element.call(this, "Formula", attrs);
  968. // 1.Name
  969. // 名称/描述。取清单的名称。
  970. // 2.Formulas
  971. // 计算式。读取计算基数的文本。
  972. // 取基数计算窗口内容,基数直接转换为金额?参考标准文档的 7.11 及 7.12 节。
  973. // 7.11是定额的费用,7.12是清单累进基数,主要是估概预算中用到,清单里的不同,所以中山的接口直接输出基数文本。
  974. // 3.Ratio
  975. // 系数。输出为1,非必填。
  976. // 4.Sum
  977. // 取金额。
  978. // 5.Remarks
  979. }
  980. function Cost(item) {
  981. let BasePrice = 0;
  982. if (item.type == rationType.volumePrice) { // 当插入的是量价时,基价读取单价列。
  983. BasePrice = item.feesIndex && item.feesIndex.common ? item.feesIndex.common.tenderUnitFee : 0
  984. } else {
  985. BasePrice = getBasePrice(item.projectGLJID, tenderProject)
  986. }
  987. let calcMap = tenderProject.calcProgram.compiledTemplateMaps
  988. let CostTypeNo = '';
  989. if (feeRateMap[calcMap[item.programID]]) CostTypeNo = feeRateMap[calcMap[item.programID]];
  990. const attrs = [{
  991. name: "Code",
  992. value: item.code,
  993. }, {
  994. name: 'Name',
  995. value: item.name
  996. }, {
  997. name: 'Spec',
  998. value: item.specs
  999. }, {
  1000. name: 'Unit',
  1001. value: item.unit
  1002. }, {
  1003. name: 'Num',
  1004. value: item.tenderQuantity
  1005. }, {
  1006. name: 'BasePrice',
  1007. value: BasePrice
  1008. }, {
  1009. name: 'Price',
  1010. value: item.feesIndex && item.feesIndex.common ? item.feesIndex.common.tenderUnitFee : 0
  1011. }, {
  1012. name: 'IsEquipment',
  1013. value: item.subType == gljType.EQUIPMENT ? 1 : 0
  1014. }, {
  1015. name: 'CostTypeNo',
  1016. value: CostTypeNo
  1017. }, {
  1018. name: 'ProfitRate',
  1019. value: getFeeRate(item.programID, 'profit', tenderProject)
  1020. },
  1021. {
  1022. name: 'TaxRate',
  1023. value: getFeeRate(item.programID, 'tax', tenderProject)
  1024. },
  1025. {
  1026. name: 'MpRatio',
  1027. value: item.subType == gljType.LABOUR ? 100 : 0
  1028. },
  1029. {
  1030. name: 'MaterialRatio',
  1031. value: item.subType == gljType.GENERAL_MATERIAL ? 100 : 0
  1032. },
  1033. {
  1034. name: 'MechRatio',
  1035. value: item.subType == gljType.GENERAL_MACHINE ? 100 : 0
  1036. }
  1037. ]
  1038. Element.call(this, "Cost", attrs);
  1039. this.children.push(CostStructure(item));
  1040. }
  1041. function Ration(ration) {
  1042. let calcMap = tenderProject.calcProgram.compiledTemplateMaps
  1043. let CostTypeNo = '';
  1044. if (feeRateMap[calcMap[ration.programID]]) CostTypeNo = feeRateMap[calcMap[ration.programID]];
  1045. const attrs = [{
  1046. name: "NormLibNo",
  1047. value: 'YSDE-000000-2018-86',
  1048. }, {
  1049. name: 'DisplayCode',
  1050. value: ration.code
  1051. }, {
  1052. name: 'Name',
  1053. value: ration.name
  1054. }, {
  1055. name: 'Unit',
  1056. value: ration.unit
  1057. }, {
  1058. name: 'Num',
  1059. value: ration.tenderQuantity
  1060. },
  1061. {
  1062. name: 'CostTypeNo',
  1063. value: CostTypeNo
  1064. },
  1065. {
  1066. name: 'ProfitRate',
  1067. value: getFeeRate(ration.programID, 'profit', tenderProject) //tenderProject.ProfitRate
  1068. },
  1069. {
  1070. name: 'TaxRate',
  1071. value: getFeeRate(ration.programID, 'tax', tenderProject) //tenderProject.TaxRate
  1072. },
  1073. {
  1074. name: 'FabricationCost',
  1075. value: ration.feesIndex && ration.feesIndex.common ? ration.feesIndex.common.tenderTotalFee : 0
  1076. },
  1077. {
  1078. name: 'AdjustStatus',
  1079. value: ration.adjustState
  1080. }
  1081. ]
  1082. Element.call(this, "Norm", attrs);
  1083. this.children.push(CostStructure(ration));
  1084. this.children.push(Consume(ration));
  1085. }
  1086. }
  1087. function Consume(ration) {
  1088. let consume = new emptyElement('Consume');
  1089. for (let rg of ration.rationGLJList) {
  1090. consume.children.push(new ConsumeItem(rg));
  1091. }
  1092. return consume;
  1093. function ConsumeItem(rg) {
  1094. const attrs = [{
  1095. name: "Code",
  1096. value: rg.code,
  1097. }, {
  1098. name: "Consumption",
  1099. value: rg.tenderQuantity
  1100. }];
  1101. Element.call(this, "ConsumeItem", attrs);
  1102. }
  1103. }
  1104. function CostStructure(item) {
  1105. let CostStructure = new emptyElement('CostStructure');
  1106. for (let f of cpFeeTypes) {
  1107. if (item.feesIndex && item.feesIndex[f.type] && itemFeeMap[f.type]) CostStructure.children.push(new CostItem(item.feesIndex[f.type]));
  1108. }
  1109. function CostItem(fee) {
  1110. const attrs = [{
  1111. name: "ItemNo",
  1112. value: itemFeeMap[fee.fieldName],
  1113. }, {
  1114. name: 'Sum',
  1115. value: fee.tenderTotalFee
  1116. }]
  1117. Element.call(this, "CostItem", attrs);
  1118. }
  1119. return CostStructure;
  1120. }
  1121. }
  1122. }
  1123. }
  1124. function Params(tenderProject) {
  1125. let feature = tenderProject.property.projectFeature ? tenderProject.property.projectFeature : [];
  1126. let featrueMap = {};
  1127. for (let f of feature) {
  1128. featrueMap[f.dispName] = f;
  1129. }
  1130. let BuildType = "";
  1131. if (featrueMap["建设性质"] == 0) BuildType = "新建";
  1132. if (featrueMap["建设性质"] == 1) BuildType = "改(扩)建";
  1133. let Terrain = "";
  1134. if (featrueMap["地形类别"] == 0) Terrain = "平原微丘陵区";
  1135. if (featrueMap["地形类别"] == 1) Terrain = "山岭重丘陵区";
  1136. let DesignSpeed = "";
  1137. if (featrueMap["设计时速"] == 0) DesignSpeed = "高速公路";
  1138. if (featrueMap["设计时速"] == 1) DesignSpeed = "一级公路";
  1139. if (featrueMap["设计时速"] == 2) DesignSpeed = "二级公路";
  1140. if (featrueMap["设计时速"] == 3) DesignSpeed = "三级公路";
  1141. if (featrueMap["设计时速"] == 4) DesignSpeed = "四级公路";
  1142. let Structure = "";
  1143. if (featrueMap["路面结构"] == 0) Structure = "沥青路面";
  1144. if (featrueMap["路面结构"] == 1) Structure = "水泥混凝土路面";
  1145. if (featrueMap["路面结构"] == 2) Structure = "其他类型路面";
  1146. const attrs = [{
  1147. name: "PrjArea",
  1148. value: featrueMap["工程所在地"] ? featrueMap["工程所在地"].value : "",
  1149. },
  1150. {
  1151. name: "StartPileNo",
  1152. value: featrueMap["起点桩号"] ? featrueMap["起点桩号"].value : "",
  1153. },
  1154. {
  1155. name: "EndPileNo",
  1156. value: featrueMap["终点桩号"] ? featrueMap["终点桩号"].value : "",
  1157. },
  1158. {
  1159. name: "BuildType",
  1160. value: BuildType,
  1161. },
  1162. {
  1163. name: "Terrain",
  1164. value: Terrain,
  1165. },
  1166. {
  1167. name: "RoadGrade",
  1168. value: featrueMap["公路等级"] ? featrueMap["公路等级"].value : "",
  1169. },
  1170. {
  1171. name: "DesignSpeed",
  1172. value: DesignSpeed,
  1173. },
  1174. {
  1175. name: "Structure",
  1176. value: Structure,
  1177. },
  1178. {
  1179. name: "SubgradeWidth",
  1180. value: featrueMap["路基宽度"] ? featrueMap["路基宽度"].value : "",
  1181. },
  1182. {
  1183. name: "RoadLength",
  1184. value: featrueMap["路线长度"] ? featrueMap["路线长度"].value : "",
  1185. },
  1186. {
  1187. name: "BridgeLength",
  1188. value: featrueMap["桥梁长度"] ? featrueMap["桥梁长度"].value : "",
  1189. },
  1190. {
  1191. name: "TunnelLength",
  1192. value: featrueMap["隧道长度"] ? featrueMap["隧道长度"].value : "",
  1193. },
  1194. {
  1195. name: "BriTunRate",
  1196. value: featrueMap["桥隧比"] ? featrueMap["桥隧比"].value : "",
  1197. },
  1198. {
  1199. name: "InterchangeNum",
  1200. value: featrueMap["互通式立交数"] ? featrueMap["互通式立交数"].value : "",
  1201. },
  1202. {
  1203. name: "StubLengths",
  1204. value: featrueMap["支线、联络线长度"] ? featrueMap["支线、联络线长度"].value : "",
  1205. },
  1206. {
  1207. name: "LaneLength",
  1208. value: featrueMap["辅道、连接线长度"] ? featrueMap["辅道、连接线长度"].value : "",
  1209. },
  1210. ];
  1211. Element.call(this, "Params", attrs);
  1212. }
  1213. function SummaryOfCost(totalItem, proItem) {
  1214. const attrs = [{
  1215. name: "TenderSumLimit",
  1216. value: totalItem.feesIndex && totalItem.feesIndex.common && totalItem.feesIndex.common.tenderTotalFee ? totalItem.feesIndex.common.tenderTotalFee : 0,
  1217. },
  1218. {
  1219. name: "BidTotal",
  1220. value: totalItem.feesIndex && totalItem.feesIndex.common && totalItem.feesIndex.common.tenderTotalFee ? totalItem.feesIndex.common.tenderTotalFee : 0,
  1221. },
  1222. {
  1223. name: "BillTotal",
  1224. value: totalItem.feesIndex && totalItem.feesIndex.common && totalItem.feesIndex.common.tenderTotalFee ? totalItem.feesIndex.common.tenderTotalFee : 0,
  1225. },
  1226. {
  1227. name: "CostForHSE",
  1228. value: 0,
  1229. },
  1230. {
  1231. name: "ProvisionalSums",
  1232. value: proItem.feesIndex && proItem.feesIndex.common && proItem.feesIndex.common.tenderTotalFee ? proItem.feesIndex.common.tenderTotalFee : 0,
  1233. },
  1234. {
  1235. name: "Appraisal",
  1236. value: totalItem.feesIndex && totalItem.feesIndex.estimate && totalItem.feesIndex.estimate.tenderTotalFee ? totalItem.feesIndex.estimate.tenderTotalFee : 0,
  1237. },
  1238. ];
  1239. if (isBidInvitation || isControl) attrs.splice(1, 1); //招标 - 控制价
  1240. if (isBidSubmission) attrs.splice(0, 1); //投标
  1241. Element.call(this, "SummaryOfCost", attrs);
  1242. }
  1243. function MakeInfo(tenderProject) {
  1244. let property = tenderProject.property;
  1245. let baseMap = {};
  1246. let baseInfo = _.find(property.basicInformation, {
  1247. dispName: "基本信息",
  1248. });
  1249. for (let i of baseInfo.items) {
  1250. let key = i.dispName;
  1251. if (i.dispName == "编制日期") key = "编制时间";
  1252. baseMap[key] = i;
  1253. }
  1254. const attrs = [{
  1255. name: "ValuationModel",
  1256. value: property.taxType,
  1257. },
  1258. {
  1259. name: "Manage",
  1260. value: baseMap["建设单位"] ? baseMap["建设单位"].value : "",
  1261. },
  1262. {
  1263. name: "Designer",
  1264. value: baseMap["设计单位"] ? baseMap["设计单位"].value : "",
  1265. },
  1266. {
  1267. name: "Compile",
  1268. value: baseMap["编制单位"] ? baseMap["编制单位"].value : "",
  1269. },
  1270. {
  1271. name: "CompileApprover",
  1272. value: baseMap["编制人"] ? baseMap["编制人"].value : "",
  1273. },
  1274. {
  1275. name: "CompileCertNo",
  1276. value: baseMap["编制人证书号"] ? baseMap["编制人证书号"].value : "",
  1277. },
  1278. {
  1279. name: "CompileDate",
  1280. value: baseMap["编制时间"] ? baseMap["编制时间"].value : "",
  1281. },
  1282. {
  1283. name: "Review",
  1284. value: baseMap["复核单位"] ? baseMap["复核单位"].value : "",
  1285. },
  1286. {
  1287. name: "ReviewApprover",
  1288. value: baseMap["复核人"] ? baseMap["复核人"].value : "",
  1289. },
  1290. {
  1291. name: "ReviewCertNo",
  1292. value: baseMap["复核人证书"] ? baseMap["复核人证书"].value : "",
  1293. },
  1294. {
  1295. name: "ReviewDate",
  1296. value: baseMap["复核日期"] ? baseMap["复核日期"].value : "",
  1297. },
  1298. {
  1299. name: "Examine",
  1300. value: baseMap["审核单位"] ? baseMap["审核单位"].value : "",
  1301. },
  1302. {
  1303. name: "ExamineApprover",
  1304. value: baseMap["审核人"] ? baseMap["审核人"].value : "",
  1305. },
  1306. {
  1307. name: "ExamineCertNo",
  1308. value: baseMap["审核人证书"] ? baseMap["审核人证书"].value : "",
  1309. },
  1310. {
  1311. name: "ExamineDate",
  1312. value: baseMap["审核日期"] ? baseMap["审核日期"].value : "",
  1313. },
  1314. {
  1315. name: "CompileExplain",
  1316. value: baseMap["编制说明"] ? baseMap["编制说明"].value : "",
  1317. },
  1318. {
  1319. name: "ExamineExplain",
  1320. value: baseMap["审核说明"] ? baseMap["审核说明"].value : "",
  1321. },
  1322. {
  1323. name: "ProjectExplain",
  1324. value: baseMap["工程说明"] ? baseMap["工程说明"].value : "",
  1325. },
  1326. ];
  1327. Element.call(this, "MakeInfo", attrs);
  1328. }
  1329. let data = new CprjInfo(projectData.name);
  1330. data.children.push(new SystemInfo());
  1331. data.children.push(new CostBasis());
  1332. let seriNo = 1;
  1333. let Rates = [];
  1334. let Practs = [];
  1335. let EprjInfos = [];
  1336. for (let c of projectData.children) {
  1337. let tenderProject = tenderDetailMap[c.ID];
  1338. let feeRataDatas = tenderProject.FeeRate.datas;
  1339. Rates.push(new Rate(tenderProject, feeRataDatas, seriNo));
  1340. Practs.push(new Pract(tenderProject, seriNo));
  1341. EprjInfos.push(new EprjInfo(tenderProject));
  1342. seriNo++;
  1343. }
  1344. data.children.push(...Rates,...Practs,...EprjInfos);
  1345. return [{
  1346. data: data,
  1347. exportKind: exportKind,
  1348. fileName: projectData.name + INTERFACE_CONFIG[areaKey]["fileSuffix"][exportKind],
  1349. }, ];
  1350. }
  1351. return {
  1352. entry,
  1353. };
  1354. })();