|
@@ -264,15 +264,15 @@ export default {
|
|
//生成要修改字段列表
|
|
//生成要修改字段列表
|
|
change.map(item => {
|
|
change.map(item => {
|
|
if (item[1] && param.data.Projection.indexOf(item[1]) == -1) {
|
|
if (item[1] && param.data.Projection.indexOf(item[1]) == -1) {
|
|
- param.data.Projection.push(item[1].split('.')[0]);
|
|
|
|
|
|
+ param.data.Projection.push(item[1].split(".")[0]);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
//生成对应修改数据
|
|
//生成对应修改数据
|
|
data.map((item, index) => {
|
|
data.map((item, index) => {
|
|
- param.data.Projection.map((value) => {
|
|
|
|
- let itemData = tools.dataForKey(item,value)
|
|
|
|
- tools.setDataForKey(item, value, itemData == ""?null:itemData)
|
|
|
|
- })
|
|
|
|
|
|
+ param.data.Projection.map(value => {
|
|
|
|
+ let itemData = tools.dataForKey(item, value);
|
|
|
|
+ tools.setDataForKey(item, value, itemData == "" ? null : itemData);
|
|
|
|
+ });
|
|
// let keyarr = change[index][1].split(".");
|
|
// let keyarr = change[index][1].split(".");
|
|
// if (keyarr && keyarr.length > 1) {
|
|
// if (keyarr && keyarr.length > 1) {
|
|
// item[keyarr[0]][keyarr[1]] =
|
|
// item[keyarr[0]][keyarr[1]] =
|
|
@@ -471,16 +471,32 @@ export default {
|
|
},
|
|
},
|
|
//选择型号修改
|
|
//选择型号修改
|
|
firmChange(data) {
|
|
firmChange(data) {
|
|
|
|
+ tools.setDataForKey(
|
|
|
|
+ this.tableData[this.row],
|
|
|
|
+ "DPSpecificationID",
|
|
|
|
+ data.specificationId
|
|
|
|
+ );
|
|
|
|
+ tools.setDataForKey(
|
|
|
|
+ this.tableData[this.row],
|
|
|
|
+ "LedgerParam.EquipManufactor.Brand",
|
|
|
|
+ data.brand
|
|
|
|
+ );
|
|
|
|
+ tools.setDataForKey(
|
|
|
|
+ this.tableData[this.row],
|
|
|
|
+ "LedgerParam.EquipManufactor.Specification",
|
|
|
|
+ data.name
|
|
|
|
+ );
|
|
|
|
+ tools.setDataForKey(
|
|
|
|
+ this.tableData[this.row],
|
|
|
|
+ "LedgerParam.EquipManufactor.Manufacturer",
|
|
|
|
+ data.venderName
|
|
|
|
+ );
|
|
for (let key in data) {
|
|
for (let key in data) {
|
|
if (key == "venderId") {
|
|
if (key == "venderId") {
|
|
data[key] = data[key] + "-" + data.name + "/" + data.brand;
|
|
data[key] = data[key] + "-" + data.name + "/" + data.brand;
|
|
this.utilToKey(key, "venderId", data, "DPManufacturerID");
|
|
this.utilToKey(key, "venderId", data, "DPManufacturerID");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- this.utilToKey('specificationId', "specificationId", data, "DPSpecificationID");
|
|
|
|
- this.utilToKey('brand', "brand", data, "LedgerParam.EquipManufactor.Brand");
|
|
|
|
- this.utilToKey('name', "name", data, "LedgerParam.EquipManufactor.Specification");
|
|
|
|
- this.utilToKey('venderName', "venderName", data, "LedgerParam.EquipManufactor.Manufacturer");
|
|
|
|
},
|
|
},
|
|
supplyChange(data) {
|
|
supplyChange(data) {
|
|
let changeData = { id: data };
|
|
let changeData = { id: data };
|
|
@@ -488,18 +504,42 @@ export default {
|
|
},
|
|
},
|
|
//如果选择供应商之后
|
|
//如果选择供应商之后
|
|
supplierChange(data) {
|
|
supplierChange(data) {
|
|
|
|
+ tools.setDataForKey(
|
|
|
|
+ this.tableData[this.row],
|
|
|
|
+ "LedgerParam.SupplyPurchase.Supplier",
|
|
|
|
+ data.name
|
|
|
|
+ );
|
|
|
|
+ tools.setDataForKey(
|
|
|
|
+ this.tableData[this.row],
|
|
|
|
+ "LedgerParam.SupplyPurchase.SupplierWeb",
|
|
|
|
+ data.website
|
|
|
|
+ );
|
|
|
|
+ tools.setDataForKey(
|
|
|
|
+ this.tableData[this.row],
|
|
|
|
+ "LedgerParam.SupplyPurchase.SupplierContactor",
|
|
|
|
+ data.man
|
|
|
|
+ );
|
|
|
|
+ tools.setDataForKey(
|
|
|
|
+ this.tableData[this.row],
|
|
|
|
+ "LedgerParam.SupplyPurchase.SupplierPhone",
|
|
|
|
+ data.phone
|
|
|
|
+ );
|
|
|
|
+ tools.setDataForKey(
|
|
|
|
+ this.tableData[this.row],
|
|
|
|
+ "LedgerParam.SupplyPurchase.SupplierFax",
|
|
|
|
+ data.fox
|
|
|
|
+ );
|
|
|
|
+ tools.setDataForKey(
|
|
|
|
+ this.tableData[this.row],
|
|
|
|
+ "LedgerParam.SupplyPurchase.SupplierEmail",
|
|
|
|
+ data.email
|
|
|
|
+ );
|
|
for (let key in data) {
|
|
for (let key in data) {
|
|
if (key == "venderId") {
|
|
if (key == "venderId") {
|
|
data[key] = data[key] + "-" + data.name;
|
|
data[key] = data[key] + "-" + data.name;
|
|
this.utilToKey(key, "venderId", data, "DPSupplierID");
|
|
this.utilToKey(key, "venderId", data, "DPSupplierID");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- this.utilToKey('name', "name", data, "LedgerParam.SupplyPurchase.Supplier");
|
|
|
|
- this.utilToKey('website', "website", data, "LedgerParam.SupplyPurchase.SupplierWeb");
|
|
|
|
- this.utilToKey('man', "man", data, "LedgerParam.SupplyPurchase.SupplierContactor");
|
|
|
|
- this.utilToKey('phone', "phone", data, "LedgerParam.SupplyPurchase.SupplierPhone");
|
|
|
|
- this.utilToKey('fox', "fox", data, "LedgerParam.SupplyPurchase.SupplierFax");
|
|
|
|
- this.utilToKey('email', "email", data, "LedgerParam.SupplyPurchase.SupplierEmail");
|
|
|
|
},
|
|
},
|
|
//保险合同
|
|
//保险合同
|
|
guaranteeChange(data) {
|
|
guaranteeChange(data) {
|
|
@@ -523,33 +563,81 @@ export default {
|
|
},
|
|
},
|
|
//维修商变更
|
|
//维修商变更
|
|
changeMaintainer(data) {
|
|
changeMaintainer(data) {
|
|
|
|
+ tools.setDataForKey(
|
|
|
|
+ this.tableData[this.row],
|
|
|
|
+ "LedgerParam.OperationMainte.Maintainer",
|
|
|
|
+ data.name
|
|
|
|
+ );
|
|
|
|
+ tools.setDataForKey(
|
|
|
|
+ this.tableData[this.row],
|
|
|
|
+ "LedgerParam.OperationMainte.MaintainerWeb",
|
|
|
|
+ data.website
|
|
|
|
+ );
|
|
|
|
+ tools.setDataForKey(
|
|
|
|
+ this.tableData[this.row],
|
|
|
|
+ "LedgerParam.OperationMainte.MaintainerContactor",
|
|
|
|
+ data.man
|
|
|
|
+ );
|
|
|
|
+ tools.setDataForKey(
|
|
|
|
+ this.tableData[this.row],
|
|
|
|
+ "LedgerParam.OperationMainte.MaintainerPhone",
|
|
|
|
+ data.phone
|
|
|
|
+ );
|
|
|
|
+ tools.setDataForKey(
|
|
|
|
+ this.tableData[this.row],
|
|
|
|
+ "LedgerParam.OperationMainte.MaintainerFax",
|
|
|
|
+ data.fox
|
|
|
|
+ );
|
|
|
|
+ tools.setDataForKey(
|
|
|
|
+ this.tableData[this.row],
|
|
|
|
+ "LedgerParam.OperationMainte.MaintainerEmail",
|
|
|
|
+ data.email
|
|
|
|
+ );
|
|
for (let key in data) {
|
|
for (let key in data) {
|
|
if (key == "venderId") {
|
|
if (key == "venderId") {
|
|
data[key] = data[key] + "-" + data.name;
|
|
data[key] = data[key] + "-" + data.name;
|
|
this.utilToKey(key, "venderId", data, "DPMaintainerID");
|
|
this.utilToKey(key, "venderId", data, "DPMaintainerID");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- this.utilToKey('name', "name", data, "LedgerParam.OperationMainte.Maintainer");
|
|
|
|
- this.utilToKey('website', "website", data, "LedgerParam.OperationMainte.MaintainerWeb");
|
|
|
|
- this.utilToKey('man', "man", data, "LedgerParam.OperationMainte.MaintainerContactor");
|
|
|
|
- this.utilToKey('phone', "phone", data, "LedgerParam.OperationMainte.MaintainerPhone");
|
|
|
|
- this.utilToKey('fox', "fox", data, "LedgerParam.OperationMainte.MaintainerFax");
|
|
|
|
- this.utilToKey('email', "email", data, "LedgerParam.OperationMainte.MaintainerEmail");
|
|
|
|
},
|
|
},
|
|
//保险商变更
|
|
//保险商变更
|
|
changeInsurer(data) {
|
|
changeInsurer(data) {
|
|
|
|
+ tools.setDataForKey(
|
|
|
|
+ this.tableData[this.row],
|
|
|
|
+ "LedgerParam.InsuranceDoc.InsurerEmail",
|
|
|
|
+ data.email
|
|
|
|
+ );
|
|
|
|
+ tools.setDataForKey(
|
|
|
|
+ this.tableData[this.row],
|
|
|
|
+ "LedgerParam.InsuranceDoc.InsurerFax",
|
|
|
|
+ data.fox
|
|
|
|
+ );
|
|
|
|
+ tools.setDataForKey(
|
|
|
|
+ this.tableData[this.row],
|
|
|
|
+ "LedgerParam.InsuranceDoc.InsurerPhone",
|
|
|
|
+ data.phone
|
|
|
|
+ );
|
|
|
|
+ tools.setDataForKey(
|
|
|
|
+ this.tableData[this.row],
|
|
|
|
+ "LedgerParam.InsuranceDoc.InsurerContactor",
|
|
|
|
+ data.man
|
|
|
|
+ );
|
|
|
|
+ tools.setDataForKey(
|
|
|
|
+ this.tableData[this.row],
|
|
|
|
+ "LedgerParam.InsuranceDoc.InsurerWeb",
|
|
|
|
+ data.website
|
|
|
|
+ );
|
|
|
|
+ tools.setDataForKey(
|
|
|
|
+ this.tableData[this.row],
|
|
|
|
+ "LedgerParam.InsuranceDoc.Insurer",
|
|
|
|
+ data.name
|
|
|
|
+ );
|
|
for (let key in data) {
|
|
for (let key in data) {
|
|
if (key == "venderId") {
|
|
if (key == "venderId") {
|
|
data[key] = data[key] + "-" + data.name;
|
|
data[key] = data[key] + "-" + data.name;
|
|
this.utilToKey(key, "venderId", data, "DPInsurerID");
|
|
this.utilToKey(key, "venderId", data, "DPInsurerID");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- this.utilToKey('name', "name", data, "LedgerParam.InsuranceDoc.Insurer");
|
|
|
|
- this.utilToKey('website', "website", data, "LedgerParam.InsuranceDoc.InsurerWeb");
|
|
|
|
- this.utilToKey('man', "man", data, "LedgerParam.InsuranceDoc.InsurerContactor");
|
|
|
|
- this.utilToKey('phone', "phone", data, "LedgerParam.InsuranceDoc.InsurerPhone");
|
|
|
|
- this.utilToKey('fox', "fox", data, "LedgerParam.InsuranceDoc.InsurerFax");
|
|
|
|
- this.utilToKey('email', "email", data, "LedgerParam.InsuranceDoc.InsurerEmail");
|
|
|
|
},
|
|
},
|
|
//设备图片弹窗改变事件
|
|
//设备图片弹窗改变事件
|
|
changePics(keys) {
|
|
changePics(keys) {
|
|
@@ -621,11 +709,11 @@ export default {
|
|
}
|
|
}
|
|
//设备二维码图片
|
|
//设备二维码图片
|
|
if (val == "EquipQRCode") {
|
|
if (val == "EquipQRCode") {
|
|
- this.qrcodeUrl = this.tableData[row.row].EquipQRCode
|
|
|
|
|
|
+ this.qrcodeUrl = this.tableData[row.row].EquipQRCode;
|
|
if (!!this.qrcodeUrl) {
|
|
if (!!this.qrcodeUrl) {
|
|
this.myDialog.qrcode = true;
|
|
this.myDialog.qrcode = true;
|
|
} else {
|
|
} else {
|
|
- this.$message("此设备没有设备二维码")
|
|
|
|
|
|
+ this.$message("此设备没有设备二维码");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//关联系统
|
|
//关联系统
|
|
@@ -653,6 +741,9 @@ export default {
|
|
if (val == "LedgerParam.SupplyPurchase.SupplierContractID") {
|
|
if (val == "LedgerParam.SupplyPurchase.SupplierContractID") {
|
|
let falg = null;
|
|
let falg = null;
|
|
let data = this.tableData[row.row].DPSupplierID;
|
|
let data = this.tableData[row.row].DPSupplierID;
|
|
|
|
+ if (data) {
|
|
|
|
+ falg = data.split("-")[0];
|
|
|
|
+ }
|
|
if (!!falg) {
|
|
if (!!falg) {
|
|
this.id = falg;
|
|
this.id = falg;
|
|
this.myDialog.supply = true;
|
|
this.myDialog.supply = true;
|
|
@@ -664,7 +755,10 @@ export default {
|
|
if (val == "LedgerParam.InsuranceDoc.InsuranceNum") {
|
|
if (val == "LedgerParam.InsuranceDoc.InsuranceNum") {
|
|
//选择保单
|
|
//选择保单
|
|
let falg = null;
|
|
let falg = null;
|
|
- let data = this.tableData[row.row].DPInsurerID
|
|
|
|
|
|
+ let data = this.tableData[row.row].DPInsurerID;
|
|
|
|
+ if (data) {
|
|
|
|
+ falg = data.split("-")[0];
|
|
|
|
+ }
|
|
if (!!falg) {
|
|
if (!!falg) {
|
|
this.id = falg;
|
|
this.id = falg;
|
|
this.myDialog.guarantee = true;
|
|
this.myDialog.guarantee = true;
|
|
@@ -675,11 +769,11 @@ export default {
|
|
//保险文件--设备文档--安装质检报告
|
|
//保险文件--设备文档--安装质检报告
|
|
if (
|
|
if (
|
|
val == "LedgerParam.InsuranceDoc.InsuranceFile" ||
|
|
val == "LedgerParam.InsuranceDoc.InsuranceFile" ||
|
|
- val == "LedgerParam.PhotoDoc.Archive" ||
|
|
|
|
|
|
+ val == "LedgerParam.PhotoDoc.Archive" ||
|
|
val == "LedgerParam.Siteinstall.CheckReport"
|
|
val == "LedgerParam.Siteinstall.CheckReport"
|
|
) {
|
|
) {
|
|
- let data = tools.dataForKey(this.tableData[row.row], val)
|
|
|
|
- this.filesArr = data? data: []
|
|
|
|
|
|
+ let data = tools.dataForKey(this.tableData[row.row], val);
|
|
|
|
+ this.filesArr = data ? data : [];
|
|
this.myDialog.uploadFiles = true;
|
|
this.myDialog.uploadFiles = true;
|
|
}
|
|
}
|
|
//安装照片--安装图纸--设备铭牌照片--设备图纸
|
|
//安装照片--安装图纸--设备铭牌照片--设备图纸
|
|
@@ -689,14 +783,14 @@ export default {
|
|
val == "LedgerParam.PhotoDoc.Nameplate" ||
|
|
val == "LedgerParam.PhotoDoc.Nameplate" ||
|
|
val == "LedgerParam.PhotoDoc.Drawing"
|
|
val == "LedgerParam.PhotoDoc.Drawing"
|
|
) {
|
|
) {
|
|
- let data = tools.dataForKey(this.tableData[row.row], val)
|
|
|
|
- this.imgsArr = data? data: []
|
|
|
|
|
|
+ let data = tools.dataForKey(this.tableData[row.row], val);
|
|
|
|
+ this.imgsArr = data ? data : [];
|
|
this.myDialog.uploadImgs = true;
|
|
this.myDialog.uploadImgs = true;
|
|
}
|
|
}
|
|
//设备照片
|
|
//设备照片
|
|
if (val == "LedgerParam.PhotoDoc.Pic") {
|
|
if (val == "LedgerParam.PhotoDoc.Pic") {
|
|
- let data = tools.dataForKey(this.tableData[row.row], val)
|
|
|
|
- this.picsArr = data? data: []
|
|
|
|
|
|
+ let data = tools.dataForKey(this.tableData[row.row], val);
|
|
|
|
+ this.picsArr = data ? data : [];
|
|
this.myDialog.pic = true;
|
|
this.myDialog.pic = true;
|
|
}
|
|
}
|
|
this.row = row.row;
|
|
this.row = row.row;
|
|
@@ -723,14 +817,14 @@ export default {
|
|
setDataToMain(data, key, row) {
|
|
setDataToMain(data, key, row) {
|
|
if (!!data && data != "--") {
|
|
if (!!data && data != "--") {
|
|
if (!!this.tableData[row]) {
|
|
if (!!this.tableData[row]) {
|
|
- tools.setDataForKey(this.tableData[row], key, data)
|
|
|
|
|
|
+ tools.setDataForKey(this.tableData[row], key, data);
|
|
this.handleUpdataTable([[row, key, null, data]], "edit");
|
|
this.handleUpdataTable([[row, key, null, data]], "edit");
|
|
} else {
|
|
} else {
|
|
this.tableData[row] = {};
|
|
this.tableData[row] = {};
|
|
- tools.setDataForKey(this.tableData[row], key, data)
|
|
|
|
|
|
+ tools.setDataForKey(this.tableData[row], key, data);
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- tools.setDataForKey(this.tableData[row], key, "")
|
|
|
|
|
|
+ tools.setDataForKey(this.tableData[row], key, "");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|