|
@@ -619,7 +619,7 @@ const XMLStandard = (function () {
|
|
|
},
|
|
|
// 招标单位编制时间
|
|
|
{
|
|
|
- name: 'TenderCompileDate', mustHasValue: true,
|
|
|
+ name: 'TenderCompileDate', mustHasValue: true, required: true,
|
|
|
value: _util.getValueByKey(basicInformation, 'tenderCompileDate')
|
|
|
},
|
|
|
// 招标单位审核人
|
|
@@ -1580,7 +1580,7 @@ const XMLStandard = (function () {
|
|
|
// 工料机编码
|
|
|
{ name: 'Number', value: glj.code },
|
|
|
// 消耗量
|
|
|
- { name: 'Quantity', type: _type.DECIMAL, value: quantity },
|
|
|
+ { name: 'Quantity', type: _type.DECIMAL, value: (+quantity).toFixed(Decimal.GLJ) },
|
|
|
// 不计价材料
|
|
|
{ name: 'NOCost', typ: _type.BOOL, value: noCost },
|
|
|
// 备注
|
|
@@ -1966,8 +1966,8 @@ const XMLStandard = (function () {
|
|
|
{ name: 'Specification', value: glj.specs },
|
|
|
// 单位
|
|
|
{ name: 'Unit', dName: '单位', required: true, value: glj.unit },
|
|
|
- // 数量(总消耗量)
|
|
|
- { name: 'Quantity', type: _type.DECIMAL, value: glj.quantity },
|
|
|
+ // 数量(总消耗量) 用toFixed来补零没问题,因为补的位数是大于计算取舍位数,不会有toFixed的精度问题(2.35.toFixed(2) = 2.3)
|
|
|
+ { name: 'Quantity', type: _type.DECIMAL, value: (+glj.quantity).toFixed(Decimal.GLJ) },
|
|
|
// 风险系数 从承包人主要材料设备-造价信息差额调整法读取,取不到则输出"0"
|
|
|
{ name: 'ProviderRate', type: _type.DECIMAL, value: glj.riskCoe },
|
|
|
// 基准单价 从承包人主要材料设备-造价信息差额调整法读取,取不到则输出"0"
|
|
@@ -2135,7 +2135,7 @@ const XMLStandard = (function () {
|
|
|
const systemInfo = new SystemInfo({
|
|
|
// 软件相关信息进行base64编码
|
|
|
ID1: Base64.encode(projectData.softInfo),
|
|
|
- ID2: _util.generateHardwareId(),
|
|
|
+ ID2: Base64.encode(_util.generateHardwareId()),
|
|
|
makeDate: moment(Date.now()).format('YYYY-MM-DDTHH:mm:ss'),
|
|
|
});
|
|
|
// 工程信息
|
|
@@ -2376,7 +2376,7 @@ const XMLStandard = (function () {
|
|
|
.map(node => new UnitWorksSummaryItem(node));
|
|
|
otherGroup.children.push(...otherChildren);
|
|
|
// 除固定类别为“分部分项工程”、“措施项目”、“其他项目”以外的大项费用,通常无子项,所以显示到Item中。(即使造价书有子项,也显示到Item中,不再列出其子项数据)
|
|
|
- const flags = [fixedFlag.SUB_ENGINERRING, fixedFlag.MEASURE, fixedFlag.OTEHER];
|
|
|
+ const flags = [fixedFlag.SUB_ENGINERRING, fixedFlag.MEASURE, fixedFlag.OTHER];
|
|
|
const otherRoots = tenderDetail.mainTree.roots
|
|
|
.filter(node => !flags.includes(node.getFlag()))
|
|
|
.map(node => new UnitWorksSummaryItem(node));
|
|
@@ -2859,6 +2859,20 @@ const XMLStandard = (function () {
|
|
|
zip.file(file.fileName, file.blob, { binary: true });
|
|
|
}
|
|
|
const zipFile = await zip.generateAsync({ type: 'blob' });
|
|
|
+ // TODO
|
|
|
+ // 导出的文件名需要用gbk编码,否则广联达导入不了
|
|
|
+ /* debugger;
|
|
|
+ const zipFile = await zip.generateAsync({
|
|
|
+ type: 'uint8array',
|
|
|
+ encodeFileName: async function (string) {
|
|
|
+ if (!string) {
|
|
|
+ return string;
|
|
|
+ }
|
|
|
+ await _util.setTimeoutSync(() => { }, 300);
|
|
|
+ const encodedStr = await _util.getEncodedData(string, 'gbk');
|
|
|
+ return encodedStr;
|
|
|
+ }
|
|
|
+ }); */
|
|
|
const exportKindName = _config.EXPORT_KIND_NAME[exportKind];
|
|
|
saveAs(zipFile, `广东标准交换数据(${exportKindName}).COS`);
|
|
|
}
|