|
@@ -264,20 +264,24 @@ export default {
|
|
|
//生成要修改字段列表
|
|
|
change.map(item => {
|
|
|
if (item[1] && param.data.Projection.indexOf(item[1]) == -1) {
|
|
|
- param.data.Projection.push(item[1]);
|
|
|
+ param.data.Projection.push(item[1].split('.')[0]);
|
|
|
}
|
|
|
});
|
|
|
//生成对应修改数据
|
|
|
data.map((item, index) => {
|
|
|
- let keyarr = change[index][1].split(".");
|
|
|
- if (keyarr && keyarr.length > 1) {
|
|
|
- item[keyarr[0]][keyarr[1]] =
|
|
|
- item[keyarr[0]][keyarr[1]] != ""
|
|
|
- ? item[keyarr[0]][keyarr[1]]
|
|
|
- : null;
|
|
|
- } else {
|
|
|
- item[keyarr[0]] = item[keyarr[0]] != "" ? item[keyarr[0]] : null;
|
|
|
- }
|
|
|
+ param.data.Projection.map((value) => {
|
|
|
+ let itemData = tools.dataForKey(item,value)
|
|
|
+ tools.setDataForKey(item, value, itemData == ""?null:itemData)
|
|
|
+ })
|
|
|
+ // let keyarr = change[index][1].split(".");
|
|
|
+ // if (keyarr && keyarr.length > 1) {
|
|
|
+ // item[keyarr[0]][keyarr[1]] =
|
|
|
+ // item[keyarr[0]][keyarr[1]] != ""
|
|
|
+ // ? item[keyarr[0]][keyarr[1]]
|
|
|
+ // : null;
|
|
|
+ // } else {
|
|
|
+ // item[keyarr[0]] = item[keyarr[0]] != "" ? item[keyarr[0]] : null;
|
|
|
+ // }
|
|
|
param.data.Content.push(item);
|
|
|
});
|
|
|
await updateParts(param).then(res => {});
|
|
@@ -472,8 +476,11 @@ export default {
|
|
|
data[key] = data[key] + "-" + data.name + "/" + data.brand;
|
|
|
this.utilToKey(key, "venderId", data, "DPManufacturerID");
|
|
|
}
|
|
|
- this.utilToKey(key, "specificationId", data, "DPSpecificationID");
|
|
|
}
|
|
|
+ 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) {
|
|
|
let changeData = { id: data };
|
|
@@ -487,6 +494,12 @@ export default {
|
|
|
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) {
|
|
@@ -502,11 +515,11 @@ export default {
|
|
|
},
|
|
|
//上传文件弹窗触发事件
|
|
|
fileChange(keys) {
|
|
|
- this.setDataToMain(keys, this.messKey.split(".")[1], this.row);
|
|
|
+ this.setDataToMain(keys, this.messKey, this.row);
|
|
|
},
|
|
|
//上传图片弹窗触发事件
|
|
|
imgChange(keys) {
|
|
|
- this.setDataToMain(keys, this.messKey.split(".")[1], this.row);
|
|
|
+ this.setDataToMain(keys, this.messKey, this.row);
|
|
|
},
|
|
|
//维修商变更
|
|
|
changeMaintainer(data) {
|
|
@@ -516,6 +529,12 @@ export default {
|
|
|
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) {
|
|
@@ -525,10 +544,16 @@ export default {
|
|
|
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) {
|
|
|
- this.setDataToMain(keys, this.messKey.split(".")[1], this.row);
|
|
|
+ this.setDataToMain(keys, this.messKey, this.row);
|
|
|
},
|
|
|
setGraphyId(graphyId, assetGroupList) {
|
|
|
this.graphyId = graphyId;
|