|
|
@@ -259,7 +259,7 @@ const XMLStandard = (function () {
|
|
|
//单项工程定义
|
|
|
function Engineering(source) {
|
|
|
let attrs = [
|
|
|
- {name: '编号', value: source.code, required: true, minLen: 1, maxLen: 255, whiteSpace: _config.WHITE_SPACE.COLLAPSE},
|
|
|
+ {name: '编号', value: '', required: true, maxLen: 255, whiteSpace: _config.WHITE_SPACE.COLLAPSE},
|
|
|
{name: '名称', value: source.name, required: true, minLen: 1, maxLen: 255, whiteSpace: _config.WHITE_SPACE.COLLAPSE},
|
|
|
{name: '金额', value: exportKind === _config.EXPORT_KIND.Tender ? source.summaryInfo.engineeringCost : '0', type: _config.TYPE.NUM2},
|
|
|
];
|
|
|
@@ -272,7 +272,7 @@ const XMLStandard = (function () {
|
|
|
'2': '简易计税',
|
|
|
};
|
|
|
let attrs = [
|
|
|
- {name: '编号', value: source.code, required: true, minLen: 1, maxLen: 255, whiteSpace: _config.WHITE_SPACE.COLLAPSE},
|
|
|
+ {name: '编号', value: '', required: true, maxLen: 255, whiteSpace: _config.WHITE_SPACE.COLLAPSE},
|
|
|
{name: '名称', value: source.name, required: true, minLen: 1, maxLen: 255, whiteSpace: _config.WHITE_SPACE.COLLAPSE},
|
|
|
{name: '专业', value: source.engineeringName, required: true, enumeration: [
|
|
|
'土建工程', '装饰工程', '安装工程', '市政工程', '园林绿化工程',
|
|
|
@@ -957,16 +957,6 @@ const XMLStandard = (function () {
|
|
|
//记录拉取的单位工程项目详细数据,导出的时候,可能会导出多个文件,只有导出第一个文件的时候需要请求数据
|
|
|
let tenderDetailMap = {}; //ID映射 ID: data
|
|
|
|
|
|
- //自增编码
|
|
|
- let incrementData = {
|
|
|
- projectCode: 1, //项目编号,单项工程、单位工程编号自动生成
|
|
|
- };
|
|
|
- function getIncreamentData(field) {
|
|
|
- if (!incrementData[field]) {
|
|
|
- incrementData[field] = 1;
|
|
|
- }
|
|
|
- return incrementData[field]++;
|
|
|
- }
|
|
|
//获取需要导出的项目数据
|
|
|
//@param {Number}tenderID(当前界面的单位工程ID,后台根据这个单位工程,去找其建设项目下所有数据)
|
|
|
//@return {Object}(eleObj)
|
|
|
@@ -1046,10 +1036,8 @@ const XMLStandard = (function () {
|
|
|
* @param {Object}summaryInfo(项目汇总信息映射) {Object}engData(单项工程数据)
|
|
|
* */
|
|
|
async function loadEngineering(summaryInfo, engData) {
|
|
|
- let source = {summaryInfo: summaryInfo[engData.ID], name: engData.name, code: getIncreamentData('projectCode')};
|
|
|
+ let source = {summaryInfo: summaryInfo[engData.ID], name: engData.name};
|
|
|
let engineering = new Engineering(source);
|
|
|
- //单项工程编号要唯一
|
|
|
- _util.checkUnique(curProjectEle.constraints.engCode, source.code, '单项工程编号');
|
|
|
//费用构成
|
|
|
let feeForm = new FeeFrom(summaryInfo[engData.ID]);
|
|
|
engineering.children.push(feeForm);
|
|
|
@@ -1099,7 +1087,6 @@ const XMLStandard = (function () {
|
|
|
tenderGljs = allGljs.map(glj => glj.id);
|
|
|
//单位工程
|
|
|
let tenderSource = {
|
|
|
- code: getIncreamentData('projectCode'),
|
|
|
name: tenderData.name,
|
|
|
engineeringName: tenderData.property.engineeringName,
|
|
|
summaryInfo: summaryInfo[tenderData.ID],
|
|
|
@@ -1107,8 +1094,6 @@ const XMLStandard = (function () {
|
|
|
taxType: tenderData.property.taxType
|
|
|
};
|
|
|
let tender = curTenderEle = new Tender(tenderSource);
|
|
|
- //单位工程编号要唯一
|
|
|
- _util.checkUnique(curProjectEle.constraints.tenderCode, tenderSource.code, '单位工程编号');
|
|
|
//工程特征
|
|
|
let featureObj = _util.arrayToObj(tenderData.property.projectFeature);
|
|
|
let engFeature = new EngFeature({feature:featureObj, basicInformation: curPMData.project.property.basicInformation});
|
|
|
@@ -1839,6 +1824,10 @@ const XMLStandard = (function () {
|
|
|
for (let node of filterNodes) {
|
|
|
let mainTreeNode = detail.mainTree.getNodeByID(node.data.ID),
|
|
|
serialNo = mainTreeNode ? mainTreeNode.serialNo() + 1 : 1;
|
|
|
+ // 规费和规费子项费用类别相同
|
|
|
+ let feeType = node === chargeNode || node.parent === chargeNode
|
|
|
+ ? FEE_TYPE[chargeNode.getFlag()]
|
|
|
+ : FEE_TYPE[node.getFlag()] || FEE_TYPE['0'];
|
|
|
let source = {
|
|
|
row: detail.mainTree.nodes[detail.mainTree.prefix + node.data.ID].serialNo() + 1,
|
|
|
code: node.data.code,
|
|
|
@@ -1847,7 +1836,7 @@ const XMLStandard = (function () {
|
|
|
calcBase: _util.transformCalcBase(detail, node, {CalcBaseMap, FlagCalcBaseMap}),
|
|
|
feeRate: node.data.feeRate ? node.data.feeRate : 100,
|
|
|
fees: node.data.fees,
|
|
|
- feeType: FEE_TYPE[node.getFlag()] || FEE_TYPE['0'],
|
|
|
+ feeType: feeType,
|
|
|
remark: node.data.remark
|
|
|
};
|
|
|
source.calcBaseState = _util.transformCalcBaseState(detail, source.calcBase, CalcStateMap);
|
|
|
@@ -1926,8 +1915,9 @@ const XMLStandard = (function () {
|
|
|
let price = gljUtil.getGLJPrice(glj, detail.projectGLJ.datas,
|
|
|
curPMData.tender.property.calcOptions, detail.labourCoe.datas, curPMData.tender.property.decimal, false, _, scMathUtil);
|
|
|
//调整价
|
|
|
- let adjPrice = gljUtil.getAdjustPrice(glj, detail.projectGLJ.datas,
|
|
|
- curPMData.tender.property.calcOptions, detail.labourCoe.datas, curPMData.tender.property.decimal, false, _, scMathUtil);
|
|
|
+ /*let adjPrice = gljUtil.getAdjustPrice(glj, detail.projectGLJ.datas,
|
|
|
+ curPMData.tender.property.calcOptions, detail.labourCoe.datas, curPMData.tender.property.decimal, false, _, scMathUtil);*/
|
|
|
+ let adjPrice = 0;
|
|
|
//获取人材机费用类别: 1=人工费 2=材料费 3=机械费 4=未计价费
|
|
|
let feeType = String(glj.type)[0];
|
|
|
if (feeType && !['1', '2', '3'].includes(feeType)) {
|
|
|
@@ -2043,6 +2033,8 @@ const XMLStandard = (function () {
|
|
|
* */
|
|
|
this.transformData = async function (tenderID, curExportKind) {
|
|
|
if (curExportKind) {
|
|
|
+ // 更新缓存中的导出文件类型
|
|
|
+ _cache.setItem('exportKind', +curExportKind);
|
|
|
exportKind = parseInt(curExportKind);
|
|
|
}
|
|
|
let eleData = await loadProject(tenderID);
|