|
@@ -165,8 +165,8 @@ export default {
|
|
|
}
|
|
|
let flag = false;
|
|
|
newData.map(item => {
|
|
|
- item.Family = this.category.Family
|
|
|
- if (!item.EquipLocalName) {
|
|
|
+ item.family = this.category.Family
|
|
|
+ if (!item.localName) {
|
|
|
flag = true
|
|
|
}
|
|
|
// 处理建筑-楼层
|
|
@@ -174,20 +174,19 @@ export default {
|
|
|
let BuildingId = item.flowBuild.split("-")[0]
|
|
|
let FloorId = item.flowBuild.split("-")[1]
|
|
|
if (BuildingId && FloorId) {
|
|
|
- item.BuildingId = BuildingId
|
|
|
- item.FloorId = FloorId
|
|
|
+ item.buildingId = BuildingId
|
|
|
+ item.gloorId = FloorId
|
|
|
} else if (BuildingId && !FloorId) {
|
|
|
- item.BuildingId = BuildingId
|
|
|
+ item.buildingId = BuildingId
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
// 添加资产
|
|
|
if (flag) {
|
|
|
- debugger
|
|
|
this.$message.info("存在设备的本地名称为空,请检查")
|
|
|
return;
|
|
|
}
|
|
|
- params.Content = newData
|
|
|
+ params.content = newData
|
|
|
await createPropertyData(params, res => {
|
|
|
this.$message.success("添加成功!")
|
|
|
session.remove("propertyAddData")
|
|
@@ -296,28 +295,28 @@ export default {
|
|
|
tools.setDataForKey(this.tableData[this.row], "DPManufacturerID", data.venderId)//生产商ID
|
|
|
tools.setDataForKey(this.tableData[this.row], "DPBrandID", data.brandId)//品牌ID
|
|
|
tools.setDataForKey(this.tableData[this.row], "DPSpecificationID", data.specificationId)//型号ID
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Manufacturer", data.venderName)
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Brand", data.brandName)
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Specification", data.name)
|
|
|
+ tools.setDataForKey(this.tableData[this.row], "infos.manufacturer", data.venderName)
|
|
|
+ tools.setDataForKey(this.tableData[this.row], "infos.brand", data.brandName)
|
|
|
+ tools.setDataForKey(this.tableData[this.row], "infos.specification", data.name)
|
|
|
},
|
|
|
supplyChange(data) {
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierContractID", { id: data })
|
|
|
+ tools.setDataForKey(this.tableData[this.row], "infos.supplierContractID", { id: data })
|
|
|
},
|
|
|
//如果选择供应商之后
|
|
|
supplierChange(data) {
|
|
|
+ tools.setDataForKey(this.tableData[this.row], "infos.supplier", data.name)
|
|
|
tools.setDataForKey(this.tableData[this.row], "DPSupplierID", data.venderId)
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.Supplier", data.name)
|
|
|
},
|
|
|
//保险合同
|
|
|
guaranteeChange(data) {
|
|
|
for (let key in data) {
|
|
|
- this.utilToKey(key, "insuranceNo", data, "InsuranceNum");
|
|
|
+ this.utilToKey(key, "insuranceNo", data, "insuranceNum");
|
|
|
if (key == "contractFile") {
|
|
|
if (!!data[key]) {
|
|
|
data[key] = [data[key]];
|
|
|
}
|
|
|
}
|
|
|
- this.utilToKey(key, "contractFile", data, "InsuranceFile");
|
|
|
+ this.utilToKey(key, "contractFile", data, "insuranceFile");
|
|
|
}
|
|
|
},
|
|
|
//上传文件弹窗触发事件
|
|
@@ -330,12 +329,12 @@ export default {
|
|
|
},
|
|
|
//维修商变更
|
|
|
changeMaintainer(data) {
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.Maintainer", data.name)
|
|
|
+ tools.setDataForKey(this.tableData[this.row], "infos.maintainer", data.name)
|
|
|
tools.setDataForKey(this.tableData[this.row], "DPMaintainerID", data.venderId)
|
|
|
},
|
|
|
//保险商变更
|
|
|
changeInsurer(data) {
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.Insurer", data.name)
|
|
|
+ tools.setDataForKey(this.tableData[this.row], "infos.insurer", data.name)
|
|
|
tools.setDataForKey(this.tableData[this.row], "DPInsurerID", data.venderId)
|
|
|
},
|
|
|
//设备图片弹窗改变事件
|
|
@@ -414,7 +413,7 @@ export default {
|
|
|
}
|
|
|
break;
|
|
|
//供应合同编号
|
|
|
- case 'LedgerParam.SupplyPurchase.SupplierContractID':
|
|
|
+ case 'infos.supplierContractID':
|
|
|
if (!this.onlyRead) {
|
|
|
let ContractIDflag = null;
|
|
|
let DPSdata = this.tableData[row.row].DPSupplierID;
|
|
@@ -430,7 +429,7 @@ export default {
|
|
|
}
|
|
|
break;
|
|
|
//保险单号
|
|
|
- case 'LedgerParam.InsuranceDoc.InsuranceNum':
|
|
|
+ case 'infos.insuranceNum':
|
|
|
if (!this.onlyRead) {
|
|
|
let DPInsurerIDflag = null;
|
|
|
let DPIdata = this.tableData[row.row].DPInsurerID;
|
|
@@ -446,33 +445,33 @@ export default {
|
|
|
}
|
|
|
break;
|
|
|
//保险文件--设备文档--安装质检报告
|
|
|
- case 'LedgerParam.InsuranceDoc.InsuranceFile': //保险文件
|
|
|
- case 'LedgerParam.PhotoDoc.Archive': //设备文档
|
|
|
- case 'LedgerParam.Siteinstall.CheckReport': //安装质检报告
|
|
|
- case 'LedgerParam.OperationMainte.MaintainManual': //维修保养手册
|
|
|
- case 'LedgerParam.SupplyPurchase.ApproachingAcceptance': //进场验收单
|
|
|
- case 'LedgerParam.SupplyPurchase.AcceptanceReport': //验收报告
|
|
|
- case 'LedgerParam.PhotoDoc.OperationManual': //操作说明书
|
|
|
- case 'LedgerParam.EquipManufactor.OriginalCertificate': //原厂证明
|
|
|
- case 'LedgerParam.EquipManufactor.TestReport': //检测报告
|
|
|
- case 'LedgerParam.PhotoDoc.ProductCertification': //产品合格证
|
|
|
- case 'LedgerParam.Siteinstall.InstallInstruction': //安装说明书
|
|
|
- case 'LedgerParam.SupplyPurchase.SupplierContract': //供应合同
|
|
|
- case 'LedgerParam.PhotoDoc.Drawing': //设备图纸
|
|
|
- case 'LedgerParam.Siteinstall.InstallDrawing': //安装图纸
|
|
|
+ case 'infos.insuranceFile': //保险文件
|
|
|
+ case 'infos.archive': //设备文档
|
|
|
+ case 'infos.checkReport': //安装质检报告
|
|
|
+ case 'infos.maintainManual': //维修保养手册
|
|
|
+ case 'infos.approachingAcceptance': //进场验收单
|
|
|
+ case 'infos.acceptanceReport': //验收报告
|
|
|
+ case 'infos.operationManual': //操作说明书
|
|
|
+ case 'infos.originalCertificate': //原厂证明
|
|
|
+ case 'infos.testReport': //检测报告
|
|
|
+ case 'infos.productCertification': //产品合格证
|
|
|
+ case 'infos.installInstruction': //安装说明书
|
|
|
+ case 'infos.supplierContract': //供应合同
|
|
|
+ case 'infos.drawing': //设备图纸
|
|
|
+ case 'infos.installDrawing': //安装图纸
|
|
|
let IPSdata = tools.dataForKey(this.tableData[row.row], val);
|
|
|
this.filesArr = IPSdata ? IPSdata : [];
|
|
|
this.myDialog.uploadFiles = true;
|
|
|
break;
|
|
|
//安装照片--设备铭牌照片
|
|
|
- case 'LedgerParam.Siteinstall.InstallPic':
|
|
|
- case 'LedgerParam.PhotoDoc.Nameplate':
|
|
|
+ case 'infos.installPic':
|
|
|
+ case 'infos.nameplate':
|
|
|
let SSPPdata = tools.dataForKey(this.tableData[row.row], val);
|
|
|
this.imgsArr = SSPPdata ? SSPPdata : [];
|
|
|
this.myDialog.uploadImgs = true;
|
|
|
break;
|
|
|
//设备照片
|
|
|
- case 'LedgerParam.PhotoDoc.Pic':
|
|
|
+ case 'infos.pic':
|
|
|
let Pdata = tools.dataForKey(this.tableData[row.row], val);
|
|
|
this.picsArr = Pdata ? Pdata : [];
|
|
|
this.myDialog.pic = true;
|