guangdong_zhongshan.js 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445
  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. let temMechs = [];
  670. for (let g of pgljData.gljList) {
  671. let type = g.type + "";
  672. gljKeyMap[gljUtil.getIndex(g)] = g;
  673. type = type.charAt(0);
  674. if (type == "1") {
  675. Mps.children.push(new MP(g));
  676. } else if (type == "2" || type == 5) {
  677. Materials.children.push(new Material(g));
  678. } else if (type == "3") {
  679. temMechs.push(g);
  680. }
  681. }
  682. for (let t of temMechs) {
  683. Mechs.children.push(new Mech(t,gljKeyMap));
  684. }
  685. this.children.push(Mps);
  686. this.children.push(Materials);
  687. this.children.push(Mechs);
  688. }
  689. function EprjInfo(tenderProject) {
  690. let bills = tenderProject.Bills.datas;
  691. let totalItem = null;
  692. let proItem = null; //暂列金额项
  693. for (let b of bills) {
  694. if (b.flagsIndex && b.flagsIndex.fixed && b.flagsIndex.fixed.flag == fixedFlag.TOTAL_COST) totalItem = b;
  695. if (b.flagsIndex && b.flagsIndex.fixed && b.flagsIndex.fixed.flag == fixedFlag.PROVISIONAL) proItem = b;
  696. }
  697. const attrs = [{
  698. name: "Name",
  699. value: tenderProject.projectInfo.name,
  700. },
  701. {
  702. name: "Sums",
  703. value: totalItem.feesIndex && totalItem.feesIndex.common && totalItem.feesIndex.common.tenderTotalFee ? totalItem.feesIndex.common.tenderTotalFee : 0,
  704. },
  705. ];
  706. Element.call(this, "EprjInfo", attrs);
  707. this.children.push(new SummaryOfCost(totalItem, proItem));
  708. this.children.push(new MakeInfo(tenderProject));
  709. this.children.push(new Params(tenderProject));
  710. this.children.push(new getBillsItems(tenderProject));
  711. this.children.push(new getIndexs(tenderProject));
  712. let bidEvaluationMainMaterials = getBidEvaluationMainMaterial(tenderProject);
  713. if(bidEvaluationMainMaterials.length > 0) this.children.push(...bidEvaluationMainMaterials);
  714. }
  715. function getBidEvaluationMainMaterial(tenderProject) {
  716. let bidMaterials = [];
  717. let i = 1;
  718. for (let b of tenderProject.bidMaterialData) {
  719. bidMaterials.push(new BidEvaluationMainMaterial(b, i));
  720. i++
  721. }
  722. return bidMaterials;
  723. function BidEvaluationMainMaterial(b, index) {
  724. const attrs = [{
  725. name: "Code",
  726. value: index,
  727. },
  728. {
  729. name: "Number",
  730. value: b.code
  731. },
  732. {
  733. name: "Name",
  734. value: b.name
  735. },
  736. {
  737. name: "Specification",
  738. value: b.specs
  739. },
  740. {
  741. name: "Unit",
  742. value: b.unit
  743. },
  744. {
  745. name: "Price",
  746. value: b.tenderPrice
  747. },
  748. {
  749. name: "LimitedPrice",
  750. value: b.tenderPrice
  751. },
  752. {
  753. name: "Quantity",
  754. value: b.quantity
  755. },
  756. {
  757. name: "Total",
  758. value: b.totalPrice
  759. },
  760. {
  761. name: "Remark",
  762. value: b.remark
  763. }
  764. ];
  765. Element.call(this, "BidEvaluationMainMaterial", attrs);
  766. }
  767. }
  768. function getIndexs(tenderProject) {
  769. let Indexs = new emptyElement('Indexs');
  770. let feature = tenderProject.property.projectFeature ? tenderProject.property.projectFeature : [];
  771. for (let f of feature) {
  772. if (f.code) Indexs.children.push(new IndexItem(f))
  773. }
  774. return Indexs;
  775. function IndexItem(fea) {
  776. const attrs = [{
  777. name: "Code",
  778. value: fea.code,
  779. },
  780. {
  781. name: "Name",
  782. value: fea.dispName,
  783. },
  784. {
  785. name: "Unit",
  786. value: fea.unit,
  787. },
  788. {
  789. name: "Value",
  790. value: fea.value,
  791. },
  792. {
  793. name: "Remark",
  794. value: fea.remark,
  795. }
  796. ]
  797. Element.call(this, "IndexItem", attrs);
  798. }
  799. }
  800. function getBillsItems(tenderProject) {
  801. let items = new emptyElement("Items");
  802. let rootNodes = tenderProject.mainTree.roots;
  803. for (let r of rootNodes) {
  804. setItem(r, -1, items.children);
  805. }
  806. return items;
  807. function setItem(bNode, level, list) {
  808. if (bNode.sourceType == ModuleNames.ration) return;
  809. list.push(new bill(bNode, level));
  810. if (bNode.children && bNode.children.length > 0) {
  811. level += 1;
  812. for (let c of bNode.children) {
  813. setItem(c, level, list);
  814. }
  815. }
  816. function bill(bNode, level) {
  817. let data = bNode.data;
  818. let CostKind = 3;
  819. if (data.name.indexOf("安全生产费") != -1) CostKind = 1;
  820. if (data.name.indexOf("暂列金额") != -1) CostKind = 2;
  821. //1 = 工程量×综合单价;2 = 计算基数×费率;3 = 工程量×单价。
  822. let CalcType = 2;
  823. if (data.calcFlag == 2) CalcType = 3;
  824. if (data.calcFlag == 1) CalcType = 1;
  825. //取暂估价类型。读取造价书界面的专项暂定列。0=材料暂估价,1=工程设备暂估价,2=专业工程暂估价,没有选的输出为空。
  826. let ProvisionalType = "";
  827. if (data.specialProvisional == "材料") ProvisionalType = 0;
  828. if (data.specialProvisional == "工程设备") ProvisionalType = 1;
  829. if (data.specialProvisional == "专业工程") ProvisionalType = 2;
  830. //MpRatio
  831. let MpRatio = "";
  832. let MaterialRatio = "";
  833. let MechRatio = "";
  834. if (data.quantityCoe) {
  835. if (data.quantityCoe["labour"]) MpRatio = data.quantityCoe["labour"];
  836. if (data.quantityCoe["material"]) MaterialRatio = data.quantityCoe["material"];
  837. if (data.quantityCoe["machine"]) MechRatio = data.quantityCoe["machine"];
  838. }
  839. const attrs = [{
  840. name: "ListCode",
  841. value: data.code,
  842. },
  843. {
  844. name: "ListName",
  845. value: data.name,
  846. },
  847. {
  848. name: "Unit",
  849. value: data.unit,
  850. },
  851. {
  852. name: "Num",
  853. value: data.quantity,
  854. },
  855. {
  856. name: "QtyFomula",
  857. value: data.calcBase //data.calcBase ? cbParser.toFExpr(data.calcBase, tenderProject.mainTree.items) : "",
  858. },
  859. {
  860. name: "Price",
  861. value: data.feesIndex && data.feesIndex.common ? data.feesIndex.common.tenderUnitFee : "",
  862. },
  863. {
  864. name: "Rate",
  865. value: 100,
  866. },
  867. {
  868. name: "Sum",
  869. value: data.feesIndex && data.feesIndex.common ? data.feesIndex.common.tenderTotalFee : "",
  870. },
  871. {
  872. name: "ChapterKind",
  873. value: level,
  874. },
  875. {
  876. name: "CostKind",
  877. value: CostKind,
  878. },
  879. {
  880. name: "CalcType",
  881. value: CalcType,
  882. },
  883. {
  884. name: "ProvisionalType",
  885. value: ProvisionalType,
  886. },
  887. {
  888. name: "MeterRules",
  889. value: "",
  890. },
  891. {
  892. name: "Content",
  893. value: data.jobContentText,
  894. },
  895. {
  896. name: "Remarks",
  897. value: data.remark,
  898. },
  899. {
  900. name: "MpRatio",
  901. value: MpRatio,
  902. },
  903. {
  904. name: "MaterialRatio",
  905. value: MaterialRatio,
  906. },
  907. {
  908. name: "MechRatio",
  909. value: MechRatio,
  910. },
  911. {
  912. name: "AdjustedPrice",
  913. value: data.feesIndex && data.feesIndex.common ? data.feesIndex.common.tenderUnitFee : "",
  914. },
  915. {
  916. name: "AdjustedSums",
  917. value: data.feesIndex && data.feesIndex.common ? data.feesIndex.common.tenderTotalFee : "",
  918. },
  919. {
  920. name: "ItemType",
  921. value: 1,
  922. },
  923. {
  924. name: "FomulaCode",
  925. value: "",
  926. },
  927. ];
  928. Element.call(this, "Item", attrs);
  929. let cc = CostComposition(bNode);
  930. if (cc) this.children.push(cc);
  931. this.children.push(CostStructure(data))
  932. function CostComposition(bNode) {
  933. let CostComposition = new emptyElement('CostComposition');
  934. let Norms = [];
  935. let Costs = [];
  936. if (bNode.children && bNode.children.length > 0 && bNode.children[0].sourceType == ModuleNames.ration) {
  937. for (let r of bNode.children) {
  938. if (r.data.type == rationType.ration) {
  939. Norms.push(new Ration(r.data));
  940. } else {
  941. Costs.push(new Cost(r.data));
  942. }
  943. }
  944. }
  945. if (Norms.length > 0) CostComposition.children.push(...Norms);
  946. if (Costs.length > 0) CostComposition.children.push(...Costs);
  947. if (bNode.data.calcBase) CostComposition.children.push(new Formula(bNode.data));
  948. return CostComposition.children.length > 0 ? CostComposition : null;
  949. function Formula(bills) {
  950. const attrs = [{
  951. name: "Name",
  952. value: bills.name
  953. },
  954. {
  955. name: "Formulas",
  956. value: bills.calcBase
  957. },
  958. {
  959. name: "Ratio",
  960. value: 1
  961. },
  962. {
  963. name: "Sum",
  964. value: bills.feesIndex && bills.feesIndex.common ? bills.feesIndex.common.tenderTotalFee : "",
  965. },
  966. {
  967. name: "Remarks",
  968. value: bills.remark
  969. }
  970. ]
  971. Element.call(this, "Formula", attrs);
  972. // 1.Name
  973. // 名称/描述。取清单的名称。
  974. // 2.Formulas
  975. // 计算式。读取计算基数的文本。
  976. // 取基数计算窗口内容,基数直接转换为金额?参考标准文档的 7.11 及 7.12 节。
  977. // 7.11是定额的费用,7.12是清单累进基数,主要是估概预算中用到,清单里的不同,所以中山的接口直接输出基数文本。
  978. // 3.Ratio
  979. // 系数。输出为1,非必填。
  980. // 4.Sum
  981. // 取金额。
  982. // 5.Remarks
  983. }
  984. function Cost(item) {
  985. let BasePrice = 0;
  986. if (item.type == rationType.volumePrice) { // 当插入的是量价时,基价读取单价列。
  987. BasePrice = item.feesIndex && item.feesIndex.common ? item.feesIndex.common.tenderUnitFee : 0
  988. } else {
  989. BasePrice = getBasePrice(item.projectGLJID, tenderProject)
  990. }
  991. let calcMap = tenderProject.calcProgram.compiledTemplateMaps
  992. let CostTypeNo = '';
  993. if (feeRateMap[calcMap[item.programID]]) CostTypeNo = feeRateMap[calcMap[item.programID]];
  994. const attrs = [{
  995. name: "Code",
  996. value: item.code,
  997. }, {
  998. name: 'Name',
  999. value: item.name
  1000. }, {
  1001. name: 'Spec',
  1002. value: item.specs
  1003. }, {
  1004. name: 'Unit',
  1005. value: item.unit
  1006. }, {
  1007. name: 'Num',
  1008. value: item.tenderQuantity
  1009. }, {
  1010. name: 'BasePrice',
  1011. value: BasePrice
  1012. }, {
  1013. name: 'Price',
  1014. value: item.feesIndex && item.feesIndex.common ? item.feesIndex.common.tenderUnitFee : 0
  1015. }, {
  1016. name: 'IsEquipment',
  1017. value: item.subType == gljType.EQUIPMENT ? 1 : 0
  1018. }, {
  1019. name: 'CostTypeNo',
  1020. value: CostTypeNo
  1021. }, {
  1022. name: 'ProfitRate',
  1023. value: getFeeRate(item.programID, 'profit', tenderProject)
  1024. },
  1025. {
  1026. name: 'TaxRate',
  1027. value: getFeeRate(item.programID, 'tax', tenderProject)
  1028. },
  1029. {
  1030. name: 'MpRatio',
  1031. value: item.subType == gljType.LABOUR ? 100 : 0
  1032. },
  1033. {
  1034. name: 'MaterialRatio',
  1035. value: item.subType == gljType.GENERAL_MATERIAL ? 100 : 0
  1036. },
  1037. {
  1038. name: 'MechRatio',
  1039. value: item.subType == gljType.GENERAL_MACHINE ? 100 : 0
  1040. }
  1041. ]
  1042. Element.call(this, "Cost", attrs);
  1043. this.children.push(CostStructure(item));
  1044. }
  1045. function Ration(ration) {
  1046. let calcMap = tenderProject.calcProgram.compiledTemplateMaps
  1047. let CostTypeNo = '';
  1048. if (feeRateMap[calcMap[ration.programID]]) CostTypeNo = feeRateMap[calcMap[ration.programID]];
  1049. const attrs = [{
  1050. name: "NormLibNo",
  1051. value: 'YSDE-000000-2018-86',
  1052. }, {
  1053. name: 'DisplayCode',
  1054. value: ration.code
  1055. }, {
  1056. name: 'Name',
  1057. value: ration.name
  1058. }, {
  1059. name: 'Unit',
  1060. value: ration.unit
  1061. }, {
  1062. name: 'Num',
  1063. value: ration.tenderQuantity
  1064. },
  1065. {
  1066. name: 'CostTypeNo',
  1067. value: CostTypeNo
  1068. },
  1069. {
  1070. name: 'ProfitRate',
  1071. value: getFeeRate(ration.programID, 'profit', tenderProject) //tenderProject.ProfitRate
  1072. },
  1073. {
  1074. name: 'TaxRate',
  1075. value: getFeeRate(ration.programID, 'tax', tenderProject) //tenderProject.TaxRate
  1076. },
  1077. {
  1078. name: 'FabricationCost',
  1079. value: ration.feesIndex && ration.feesIndex.common ? ration.feesIndex.common.tenderTotalFee : 0
  1080. },
  1081. {
  1082. name: 'AdjustStatus',
  1083. value: ration.adjustState
  1084. }
  1085. ]
  1086. Element.call(this, "Norm", attrs);
  1087. this.children.push(CostStructure(ration));
  1088. this.children.push(Consume(ration));
  1089. }
  1090. }
  1091. function Consume(ration) {
  1092. let consume = new emptyElement('Consume');
  1093. for (let rg of ration.rationGLJList) {
  1094. consume.children.push(new ConsumeItem(rg));
  1095. }
  1096. return consume;
  1097. function ConsumeItem(rg) {
  1098. const attrs = [{
  1099. name: "Code",
  1100. value: rg.code,
  1101. }, {
  1102. name: "Consumption",
  1103. value: rg.tenderQuantity
  1104. }];
  1105. Element.call(this, "ConsumeItem", attrs);
  1106. }
  1107. }
  1108. function CostStructure(item) {
  1109. let CostStructure = new emptyElement('CostStructure');
  1110. for (let f of cpFeeTypes) {
  1111. if (item.feesIndex && item.feesIndex[f.type] && itemFeeMap[f.type]) CostStructure.children.push(new CostItem(item.feesIndex[f.type]));
  1112. }
  1113. function CostItem(fee) {
  1114. const attrs = [{
  1115. name: "ItemNo",
  1116. value: itemFeeMap[fee.fieldName],
  1117. }, {
  1118. name: 'Sum',
  1119. value: fee.tenderTotalFee
  1120. }]
  1121. Element.call(this, "CostItem", attrs);
  1122. }
  1123. return CostStructure;
  1124. }
  1125. }
  1126. }
  1127. }
  1128. function Params(tenderProject) {
  1129. let feature = tenderProject.property.projectFeature ? tenderProject.property.projectFeature : [];
  1130. let featrueMap = {};
  1131. for (let f of feature) {
  1132. featrueMap[f.dispName] = f;
  1133. }
  1134. let BuildType = "";
  1135. if (featrueMap["建设性质"] == 0) BuildType = "新建";
  1136. if (featrueMap["建设性质"] == 1) BuildType = "改(扩)建";
  1137. let Terrain = "";
  1138. if (featrueMap["地形类别"] == 0) Terrain = "平原微丘陵区";
  1139. if (featrueMap["地形类别"] == 1) Terrain = "山岭重丘陵区";
  1140. let DesignSpeed = "";
  1141. if (featrueMap["设计时速"] == 0) DesignSpeed = "高速公路";
  1142. if (featrueMap["设计时速"] == 1) DesignSpeed = "一级公路";
  1143. if (featrueMap["设计时速"] == 2) DesignSpeed = "二级公路";
  1144. if (featrueMap["设计时速"] == 3) DesignSpeed = "三级公路";
  1145. if (featrueMap["设计时速"] == 4) DesignSpeed = "四级公路";
  1146. let Structure = "";
  1147. if (featrueMap["路面结构"] == 0) Structure = "沥青路面";
  1148. if (featrueMap["路面结构"] == 1) Structure = "水泥混凝土路面";
  1149. if (featrueMap["路面结构"] == 2) Structure = "其他类型路面";
  1150. const attrs = [{
  1151. name: "PrjArea",
  1152. value: featrueMap["工程所在地"] ? featrueMap["工程所在地"].value : "",
  1153. },
  1154. {
  1155. name: "StartPileNo",
  1156. value: featrueMap["起点桩号"] ? featrueMap["起点桩号"].value : "",
  1157. },
  1158. {
  1159. name: "EndPileNo",
  1160. value: featrueMap["终点桩号"] ? featrueMap["终点桩号"].value : "",
  1161. },
  1162. {
  1163. name: "BuildType",
  1164. value: BuildType,
  1165. },
  1166. {
  1167. name: "Terrain",
  1168. value: Terrain,
  1169. },
  1170. {
  1171. name: "RoadGrade",
  1172. value: featrueMap["公路等级"] ? featrueMap["公路等级"].value : "",
  1173. },
  1174. {
  1175. name: "DesignSpeed",
  1176. value: DesignSpeed,
  1177. },
  1178. {
  1179. name: "Structure",
  1180. value: Structure,
  1181. },
  1182. {
  1183. name: "SubgradeWidth",
  1184. value: featrueMap["路基宽度"] ? featrueMap["路基宽度"].value : "",
  1185. },
  1186. {
  1187. name: "RoadLength",
  1188. value: featrueMap["路线长度"] ? featrueMap["路线长度"].value : "",
  1189. },
  1190. {
  1191. name: "BridgeLength",
  1192. value: featrueMap["桥梁长度"] ? featrueMap["桥梁长度"].value : "",
  1193. },
  1194. {
  1195. name: "TunnelLength",
  1196. value: featrueMap["隧道长度"] ? featrueMap["隧道长度"].value : "",
  1197. },
  1198. {
  1199. name: "BriTunRate",
  1200. value: featrueMap["桥隧比"] ? featrueMap["桥隧比"].value : "",
  1201. },
  1202. {
  1203. name: "InterchangeNum",
  1204. value: featrueMap["互通式立交数"] ? featrueMap["互通式立交数"].value : "",
  1205. },
  1206. {
  1207. name: "StubLengths",
  1208. value: featrueMap["支线、联络线长度"] ? featrueMap["支线、联络线长度"].value : "",
  1209. },
  1210. {
  1211. name: "LaneLength",
  1212. value: featrueMap["辅道、连接线长度"] ? featrueMap["辅道、连接线长度"].value : "",
  1213. },
  1214. ];
  1215. Element.call(this, "Params", attrs);
  1216. }
  1217. function SummaryOfCost(totalItem, proItem) {
  1218. const attrs = [{
  1219. name: "TenderSumLimit",
  1220. value: totalItem.feesIndex && totalItem.feesIndex.common && totalItem.feesIndex.common.tenderTotalFee ? totalItem.feesIndex.common.tenderTotalFee : 0,
  1221. },
  1222. {
  1223. name: "BidTotal",
  1224. value: totalItem.feesIndex && totalItem.feesIndex.common && totalItem.feesIndex.common.tenderTotalFee ? totalItem.feesIndex.common.tenderTotalFee : 0,
  1225. },
  1226. {
  1227. name: "BillTotal",
  1228. value: totalItem.feesIndex && totalItem.feesIndex.common && totalItem.feesIndex.common.tenderTotalFee ? totalItem.feesIndex.common.tenderTotalFee : 0,
  1229. },
  1230. {
  1231. name: "CostForHSE",
  1232. value: 0,
  1233. },
  1234. {
  1235. name: "ProvisionalSums",
  1236. value: proItem.feesIndex && proItem.feesIndex.common && proItem.feesIndex.common.tenderTotalFee ? proItem.feesIndex.common.tenderTotalFee : 0,
  1237. },
  1238. {
  1239. name: "Appraisal",
  1240. value: totalItem.feesIndex && totalItem.feesIndex.estimate && totalItem.feesIndex.estimate.tenderTotalFee ? totalItem.feesIndex.estimate.tenderTotalFee : 0,
  1241. },
  1242. ];
  1243. if (isBidInvitation || isControl) attrs.splice(1, 1); //招标 - 控制价
  1244. if (isBidSubmission) attrs.splice(0, 1); //投标
  1245. Element.call(this, "SummaryOfCost", attrs);
  1246. }
  1247. function MakeInfo(tenderProject) {
  1248. let property = tenderProject.property;
  1249. let baseMap = {};
  1250. let baseInfo = _.find(property.basicInformation, {
  1251. dispName: "基本信息",
  1252. });
  1253. for (let i of baseInfo.items) {
  1254. let key = i.dispName;
  1255. if (i.dispName == "编制日期") key = "编制时间";
  1256. baseMap[key] = i;
  1257. }
  1258. const attrs = [{
  1259. name: "ValuationModel",
  1260. value: property.taxType,
  1261. },
  1262. {
  1263. name: "Manage",
  1264. value: baseMap["建设单位"] ? baseMap["建设单位"].value : "",
  1265. },
  1266. {
  1267. name: "Designer",
  1268. value: baseMap["设计单位"] ? baseMap["设计单位"].value : "",
  1269. },
  1270. {
  1271. name: "Compile",
  1272. value: baseMap["编制单位"] ? baseMap["编制单位"].value : "",
  1273. },
  1274. {
  1275. name: "CompileApprover",
  1276. value: baseMap["编制人"] ? baseMap["编制人"].value : "",
  1277. },
  1278. {
  1279. name: "CompileCertNo",
  1280. value: baseMap["编制人证书号"] ? baseMap["编制人证书号"].value : "",
  1281. },
  1282. {
  1283. name: "CompileDate",
  1284. value: baseMap["编制时间"] ? baseMap["编制时间"].value : "",
  1285. },
  1286. {
  1287. name: "Review",
  1288. value: baseMap["复核单位"] ? baseMap["复核单位"].value : "",
  1289. },
  1290. {
  1291. name: "ReviewApprover",
  1292. value: baseMap["复核人"] ? baseMap["复核人"].value : "",
  1293. },
  1294. {
  1295. name: "ReviewCertNo",
  1296. value: baseMap["复核人证书"] ? baseMap["复核人证书"].value : "",
  1297. },
  1298. {
  1299. name: "ReviewDate",
  1300. value: baseMap["复核日期"] ? baseMap["复核日期"].value : "",
  1301. },
  1302. {
  1303. name: "Examine",
  1304. value: baseMap["审核单位"] ? baseMap["审核单位"].value : "",
  1305. },
  1306. {
  1307. name: "ExamineApprover",
  1308. value: baseMap["审核人"] ? baseMap["审核人"].value : "",
  1309. },
  1310. {
  1311. name: "ExamineCertNo",
  1312. value: baseMap["审核人证书"] ? baseMap["审核人证书"].value : "",
  1313. },
  1314. {
  1315. name: "ExamineDate",
  1316. value: baseMap["审核日期"] ? baseMap["审核日期"].value : "",
  1317. },
  1318. {
  1319. name: "CompileExplain",
  1320. value: baseMap["编制说明"] ? baseMap["编制说明"].value : "",
  1321. },
  1322. {
  1323. name: "ExamineExplain",
  1324. value: baseMap["审核说明"] ? baseMap["审核说明"].value : "",
  1325. },
  1326. {
  1327. name: "ProjectExplain",
  1328. value: baseMap["工程说明"] ? baseMap["工程说明"].value : "",
  1329. },
  1330. ];
  1331. Element.call(this, "MakeInfo", attrs);
  1332. }
  1333. let data = new CprjInfo(projectData.name);
  1334. data.children.push(new SystemInfo());
  1335. data.children.push(new CostBasis());
  1336. let seriNo = 1;
  1337. let Rates = [];
  1338. let Practs = [];
  1339. let EprjInfos = [];
  1340. for (let c of projectData.children) {
  1341. let tenderProject = tenderDetailMap[c.ID];
  1342. let feeRataDatas = tenderProject.FeeRate.datas;
  1343. Rates.push(new Rate(tenderProject, feeRataDatas, seriNo));
  1344. Practs.push(new Pract(tenderProject, seriNo));
  1345. EprjInfos.push(new EprjInfo(tenderProject));
  1346. seriNo++;
  1347. }
  1348. data.children.push(...Rates,...Practs,...EprjInfos);
  1349. return [{
  1350. data: data,
  1351. exportKind: exportKind,
  1352. fileName: projectData.name + INTERFACE_CONFIG[areaKey]["fileSuffix"][exportKind],
  1353. }, ];
  1354. }
  1355. return {
  1356. entry,
  1357. };
  1358. })();