guangdong_zhongshan.js 44 KB

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