|
@@ -27,15 +27,6 @@
|
|
|
<!-- bim坐标弹框 -->
|
|
|
<bimDialog :dialog="myDialog" :bimcodeobj="bimcodeobj" @closeBIM="closeBIM" :addBody="true"
|
|
|
ref="bimdialog"></bimDialog>
|
|
|
- <!-- 型号弹窗 -->
|
|
|
- <firm :mess="{ deviceId: deviceType.assetType }" :firmDataType="firmDataType" ref="firm" @changeFirm="firmChange"
|
|
|
- :dialog="myDialog"></firm>
|
|
|
- <!-- 供应商合同弹窗 -->
|
|
|
- <supply-dialog ref="supply" @change="supplyChange" :id="id" :dialog="myDialog"/>
|
|
|
- <!-- 供应商弹窗 -->
|
|
|
- <supplier-dialog ref="supplier" :firmDataType="firmDataType" @changeSupplier="supplierChange" :dialog="myDialog"/>
|
|
|
-
|
|
|
- <guarantee-dialog :id="id" ref="guarantee" @change="guaranteeChange" :dialog="myDialog"/>
|
|
|
<!-- 上传文件-->
|
|
|
<upload-files-dialog :read="onlyRead ? true : false" ref="upload" @changeFile="fileChange" :keysArr="filesArr"
|
|
|
:firmDataType="firmDataType"
|
|
@@ -44,10 +35,6 @@
|
|
|
<upload-img-dialog :read="onlyRead ? true : false" @changeFile="imgChange" :keysArr="imgsArr" :dialog="myDialog"
|
|
|
:firmDataType="firmDataType"
|
|
|
:information="information" :infoType="infoType"/>
|
|
|
- <!-- 维修商信息-->
|
|
|
- <maintainer-dialog @changeMaintainer="changeMaintainer" :firmDataType="firmDataType" ref="maintainer"
|
|
|
- :dialog="myDialog"/>
|
|
|
- <insurer-dialog @changeInsurer="changeInsurer" :firmDataType="firmDataType" ref="insurer" :dialog="myDialog"/>
|
|
|
<pic-dialog :read="onlyRead ? true : false" :dialog="myDialog" :keysArr="picsArr" @change="changePics"
|
|
|
:firmDataType="firmDataType"
|
|
|
:information="information" :infoType="infoType"/>
|
|
@@ -125,12 +112,6 @@ import buildFloor from "@/utils/handsontable/buildFloorData";
|
|
|
|
|
|
import qrcode from "@/components/ledger/lib/qrcode";
|
|
|
import bimDialog from "@/components/ledger/lib/bimDialog";
|
|
|
-import firm from "@/components/dialogs/list/firm";
|
|
|
-import supplyDialog from "@/components/dialogs/list/supplyDialog";
|
|
|
-import supplierDialog from "@/components/dialogs/list/supplierDialog";
|
|
|
-import maintainerDialog from "@/components/dialogs/list/maintainerDialog";
|
|
|
-import insurerDialog from "@/components/dialogs/list/insurerDialog";
|
|
|
-import guaranteeDialog from "@/components/dialogs/list/guaranteeDialog";
|
|
|
import uploadFilesDialog from "@/components/dialogs/list/filesDialog";
|
|
|
import uploadImgDialog from "@/components/dialogs/list/uploadImgDialog";
|
|
|
import picDialog from "@/components/dialogs/list/picDialog";
|
|
@@ -154,13 +135,7 @@ export default {
|
|
|
props: ["myParam"],
|
|
|
components: {
|
|
|
qrcode, //二维码页面
|
|
|
- firm, //
|
|
|
- supplyDialog,
|
|
|
- supplierDialog,
|
|
|
- guaranteeDialog,
|
|
|
uploadFilesDialog,
|
|
|
- maintainerDialog,
|
|
|
- insurerDialog,
|
|
|
uploadImgDialog,
|
|
|
picDialog,
|
|
|
myPagination,
|
|
@@ -184,7 +159,6 @@ export default {
|
|
|
{value: "all", label: "全部"}
|
|
|
]
|
|
|
: [
|
|
|
- {value: "partInfo", label: "隐藏信息点"},
|
|
|
{value: "all", label: "全部"},
|
|
|
{value: "Visible", label: "只看采集信息"}
|
|
|
];
|
|
@@ -229,12 +203,6 @@ export default {
|
|
|
myDialog: {
|
|
|
qrcode: false, //二维码弹窗
|
|
|
bimcode: false, //bim弹窗
|
|
|
- firm: false, //厂商弹窗
|
|
|
- supply: false, //选择供应合同
|
|
|
- supplier: false, //供应商选择
|
|
|
- guarantee: false, //选择保单
|
|
|
- maintainer: false, //选择维修商
|
|
|
- insurer: false, //选择保险公司
|
|
|
uploadFiles: false, //上传文件
|
|
|
uploadImgs: false, //上传单个图片
|
|
|
pic: false, //多个图片
|
|
@@ -447,13 +415,6 @@ export default {
|
|
|
cascade: [
|
|
|
{
|
|
|
name: "property"
|
|
|
- // projection: [
|
|
|
- // "Family",
|
|
|
- // "EquipLocalName",
|
|
|
- // "EquipLocalID",
|
|
|
- // "EquipID",
|
|
|
- // "CodeType"
|
|
|
- // ]
|
|
|
},
|
|
|
{
|
|
|
Name: "building",
|
|
@@ -1193,62 +1154,29 @@ export default {
|
|
|
this.myDialog.changeRea = true;
|
|
|
}
|
|
|
return false;
|
|
|
- //品牌型号弹窗
|
|
|
- case "dpManufacturerId":
|
|
|
- if (!this.onlyRead) {
|
|
|
- this.myDialog.firm = true;
|
|
|
- }
|
|
|
- return false;
|
|
|
- //供应商信息弹窗
|
|
|
- case "dpSupplierId":
|
|
|
- if (!this.onlyRead) {
|
|
|
- this.myDialog.supplier = true;
|
|
|
- }
|
|
|
- return false;
|
|
|
- //维修商信息弹窗
|
|
|
- case "dpMaintainerId":
|
|
|
- if (!this.onlyRead) {
|
|
|
- this.myDialog.maintainer = true;
|
|
|
- }
|
|
|
- return false;
|
|
|
- //保险公司信息
|
|
|
- case "dpInsurerId":
|
|
|
- if (!this.onlyRead) {
|
|
|
- this.myDialog.insurer = true;
|
|
|
- }
|
|
|
- return false;
|
|
|
- //供应合同编号(B1)
|
|
|
- case "infos.supplierContractID":
|
|
|
- if (!this.onlyRead) {
|
|
|
- let ContractIDflag = null;
|
|
|
- let DPSdata = this.tableData[row.row].dpSupplierId;
|
|
|
- if (DPSdata) {
|
|
|
- ContractIDflag = DPSdata.split("-")[0];
|
|
|
- }
|
|
|
- if (!!ContractIDflag) {
|
|
|
- this.id = ContractIDflag;
|
|
|
- this.myDialog.supply = true;
|
|
|
- } else {
|
|
|
- this.$message("请先选择供应商");
|
|
|
- }
|
|
|
- }
|
|
|
- return false;
|
|
|
- //保险单号(B1)
|
|
|
- case "infos.insuranceNum":
|
|
|
- if (!this.onlyRead) {
|
|
|
- let DPInsurerIDflag = null;
|
|
|
- let DPIdata = this.tableData[row.row].dpInsurerId;
|
|
|
- if (DPIdata) {
|
|
|
- DPInsurerIDflag = DPIdata.split("-")[0];
|
|
|
- }
|
|
|
- if (!!DPInsurerIDflag) {
|
|
|
- this.id = DPInsurerIDflag;
|
|
|
- this.myDialog.guarantee = true;
|
|
|
- } else {
|
|
|
- this.$message("请先选择保险商");
|
|
|
+ /**
|
|
|
+ * 关联资产后才可维护的信息点
|
|
|
+ */
|
|
|
+ case 'flowBuild': //所属建筑楼层
|
|
|
+ case 'infos.productDate': //生产日期
|
|
|
+ case 'infos.serialNum': //出厂编号
|
|
|
+ case 'infos.assetID': //资产编号
|
|
|
+ case 'infos.purchasePrice': //采购价格
|
|
|
+ case 'infos.insuranceNum': //保险单号
|
|
|
+ case 'infos.insuranceFile': //保险文件
|
|
|
+ if (!this.onlyRead) {
|
|
|
+ const linkId = this.tableData[row.row].linkId;
|
|
|
+ if (!linkId) { //未关联资产
|
|
|
+ this.$confirm('请先关联资产后再维护该信息!', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ showCancelButton: false,
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ return false;
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- return false;
|
|
|
+ return false;
|
|
|
//保险文件--设备文档--安装质检报告
|
|
|
case "infos.insuranceFile": //保险文件(F2)
|
|
|
case "infos.archive": //设备文档(F2)
|
|
@@ -1303,8 +1231,6 @@ export default {
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
- console.log(inputData);
|
|
|
- console.log('====================');
|
|
|
if (!this.onlyRead && !inputData.editable) {
|
|
|
this.$message("该信息点的值为自动生成,不可人工维护!");
|
|
|
return false;
|
|
@@ -1367,139 +1293,6 @@ export default {
|
|
|
}
|
|
|
return a;
|
|
|
},
|
|
|
- //如果选择供应商之后
|
|
|
- supplierChange(data, type) {
|
|
|
- if (type === "dialog") {
|
|
|
- let firm = {...data, num: 8};
|
|
|
- this.firmName = firm;
|
|
|
- } else {
|
|
|
- tools.setDataForKey(this.tableData[this.row], "dpSupplierId", data.venderId);
|
|
|
- tools.setDataForKey(this.tableData[this.row], "infos.supplier", data.name);
|
|
|
- tools.setDataForKey(this.tableData[this.row], 'infos.supplierPhone', data.contacts[0] ? data.contacts[0].phone : null)
|
|
|
- tools.setDataForKey(this.tableData[this.row], 'infos.supplierContactor', data.contacts[0] ? data.contacts[0].name : null)
|
|
|
- tools.setDataForKey(this.tableData[this.row], 'infos.supplierWeb', data.website ? data.website : null)
|
|
|
- tools.setDataForKey(this.tableData[this.row], 'infos.supplierEmail', data.contacts[0] ? data.contacts[0].email : null)
|
|
|
- tools.setDataForKey(this.tableData[this.row], 'infos.supplierFax', data.contacts[0] ? data.contacts[0].fax : null)
|
|
|
- this.handleUpdataTable(
|
|
|
- [
|
|
|
- [this.row, "dpSupplierId", null, data.venderId],
|
|
|
- [this.row, "infos.supplier", null, data.name],
|
|
|
- [this.row, 'infos.supplierPhone', null, data.contacts[0] ? data.contacts[0].phone : null],
|
|
|
- [this.row, 'infos.supplierContactor', null, data.contacts[0] ? data.contacts[0].name : null],
|
|
|
- [this.row, 'infos.supplierWeb', null, data.website ? data.website : null],
|
|
|
- [this.row, 'infos.supplierEmail', null, data.contacts[0] ? data.contacts[0].email : null],
|
|
|
- [this.row, 'infos.supplierFax', null, data.contacts[0] ? data.contacts[0].fax : null],
|
|
|
- ],
|
|
|
- "edit"
|
|
|
- );
|
|
|
- }
|
|
|
- },
|
|
|
- //供应合同编号
|
|
|
- supplyChange(data) {
|
|
|
- tools.setDataForKey(this.tableData[this.row], "infos.supplierContractID", {id: data});
|
|
|
- },
|
|
|
- //保险单号-保险文件
|
|
|
- guaranteeChange(data) {
|
|
|
- for (let key in data) {
|
|
|
- this.utilToKey(key, "insuranceNo", data, "InsuranceNum");
|
|
|
- if (key == "contractFile") {
|
|
|
- if (!!data[key]) {
|
|
|
- data[key] = [data[key]];
|
|
|
- }
|
|
|
- }
|
|
|
- this.utilToKey(key, "contractFile", data, "InsuranceFile");
|
|
|
- }
|
|
|
- },
|
|
|
- //选择型号修改
|
|
|
- firmChange(data, type) {
|
|
|
- if (type === "dialog") {
|
|
|
- // 如果是批量信息维护
|
|
|
- let venderName = data.venderName ? data.venderName : "空";
|
|
|
- let brandName = data.brandName ? data.brandName : "空";
|
|
|
- let name = data.name ? data.name : "空";
|
|
|
- let firm = {
|
|
|
- ...data,
|
|
|
- num: 2,
|
|
|
- Specification: data.name,
|
|
|
- name: `${venderName}/${brandName}/${name}`
|
|
|
- };
|
|
|
- this.firmName = firm; //批量维护dialog显示对象的字段
|
|
|
- } else {
|
|
|
- //如果是表格操作
|
|
|
- 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], "testReport", data.venderName);
|
|
|
- tools.setDataForKey(this.tableData[this.row], "infos.manufacturer", data.venderName);
|
|
|
- tools.setDataForKey(this.tableData[this.row], "infos.brand", data.name);
|
|
|
- tools.setDataForKey(this.tableData[this.row], "infos.specification", data.brandName);
|
|
|
- this.handleUpdataTable(
|
|
|
- [
|
|
|
- [this.row, "dpManufacturerId", null, data.venderId],
|
|
|
- [this.row, "dpBrandId", null, data.brandId],
|
|
|
- [this.row, "dpSpecificationId", null, data.specificationId],
|
|
|
- [this.row, "infos.manufacturer", null, data.venderName],
|
|
|
- [this.row, "infos.brand", null, data.brandName],
|
|
|
- [this.row, "infos.specification", null, data.name]
|
|
|
- ],
|
|
|
- "edit"
|
|
|
- );
|
|
|
- }
|
|
|
- },
|
|
|
- //保险商变更
|
|
|
- changeInsurer(data, type) {
|
|
|
- if (type === "dialog") {
|
|
|
- let firm = {...data, num: 42};
|
|
|
- this.firmName = firm;
|
|
|
- } else {
|
|
|
- tools.setDataForKey(this.tableData[this.row], "dpInsurerId", data.venderId);
|
|
|
- tools.setDataForKey(this.tableData[this.row], "infos.insurer", data.name);
|
|
|
- tools.setDataForKey(this.tableData[this.row], 'infos.insurerWeb', data.website ? data.website : null)
|
|
|
- tools.setDataForKey(this.tableData[this.row], 'infos.insurerEmail', data.contacts[0] ? data.contacts[0].email : null)
|
|
|
- tools.setDataForKey(this.tableData[this.row], 'infos.insurerFax', data.contacts[0] ? data.contacts[0].fax : null)
|
|
|
- tools.setDataForKey(this.tableData[this.row], 'infos.insurerPhone', data.contacts[0] ? data.contacts[0].phone : null)
|
|
|
- tools.setDataForKey(this.tableData[this.row], 'infos.insurerContactor', data.contacts[0] ? data.contacts[0].name : null)
|
|
|
- this.handleUpdataTable(
|
|
|
- [
|
|
|
- [this.row, "dpInsurerId", null, data.venderId],
|
|
|
- [this.row, "infos.insurer", null, data.name],
|
|
|
- [this.row, 'infos.insurerWeb', null, data.website ? data.website : null],
|
|
|
- [this.row, 'infos.insurerEmail', null, data.contacts[0] ? data.contacts[0].email : null],
|
|
|
- [this.row, 'infos.insurerFax', null, data.contacts[0] ? data.contacts[0].fax : null],
|
|
|
- [this.row, 'infos.insurerPhone', null, data.contacts[0] ? data.contacts[0].phone : null],
|
|
|
- [this.row, 'infos.insurerContactor', null, data.contacts[0] ? data.contacts[0].name : null],
|
|
|
- ],
|
|
|
- "edit"
|
|
|
- );
|
|
|
- }
|
|
|
- },
|
|
|
- //维修商变更
|
|
|
- changeMaintainer(data, type) {
|
|
|
- if (type === "dialog") {
|
|
|
- let firm = {...data, num: 35};
|
|
|
- this.firmName = firm;
|
|
|
- } else {
|
|
|
- tools.setDataForKey(this.tableData[this.row], "dpMaintainerId", data.venderId);
|
|
|
- tools.setDataForKey(this.tableData[this.row], "infos.maintainer", data.name);
|
|
|
- tools.setDataForKey(this.tableData[this.row], 'infos.maintainerWeb', data.website ? data.website : null)
|
|
|
- tools.setDataForKey(this.tableData[this.row], 'infos.maintainerContactor', data.contacts[0] ? data.contacts[0].name : null)
|
|
|
- tools.setDataForKey(this.tableData[this.row], 'infos.maintainerPhone', data.contacts[0] ? data.contacts[0].phone : null)
|
|
|
- tools.setDataForKey(this.tableData[this.row], 'infos.maintainerEmail', data.contacts[0] ? data.contacts[0].email : null)
|
|
|
- tools.setDataForKey(this.tableData[this.row], 'infos.maintainerFax', data.contacts[0] ? data.contacts[0].fax : null)
|
|
|
- this.handleUpdataTable(
|
|
|
- [
|
|
|
- [this.row, "dpMaintainerId", null, data.venderId],
|
|
|
- [this.row, "infos.maintainer", null, data.name],
|
|
|
- [this.row, 'infos.maintainerWeb', null, data.website ? data.website : null],
|
|
|
- [this.row, 'infos.maintainerContactor', null, data.contacts[0] ? data.contacts[0].name : null],
|
|
|
- [this.row, 'infos.maintainerPhone', null, data.contacts[0] ? data.contacts[0].phone : null],
|
|
|
- [this.row, 'infos.maintainerEmail', null, data.contacts[0] ? data.contacts[0].email : null],
|
|
|
- [this.row, 'infos.maintainerFax', null, data.contacts[0] ? data.contacts[0].fax : null],
|
|
|
- ],
|
|
|
- "edit"
|
|
|
- );
|
|
|
- }
|
|
|
- },
|
|
|
//修改关联的资产
|
|
|
changeProperty(val) {
|
|
|
this.setDataToMain(val.propertyId, "propertyId", this.row);
|