|
@@ -44,20 +44,11 @@
|
|
|
:total="page.total"></el-pagination>
|
|
|
<!-- 二维码弹窗 -->
|
|
|
<qrcode :dialog="myDialog" :qrcodeUrl="qrcodeUrl" :addBody="true" ref="qrcode"></qrcode>
|
|
|
- <!-- 型号弹窗 -->
|
|
|
- <firm :mess="{deviceId: firmId}" ref="firm" @changeFirm="firmChange" :dialog="myDialog"></firm>
|
|
|
- <!-- 供应商合同弹窗 -->
|
|
|
- <supply-dialog ref="supply" @change="supplyChange" :id="id" :dialog="myDialog"></supply-dialog>
|
|
|
- <!-- 供应商弹窗 -->
|
|
|
- <supplier-dialog ref="supplier" @changeSupplier="supplierChange" :dialog="myDialog"></supplier-dialog>
|
|
|
- <guarantee-dialog :id="id" ref="guarantee" @change="guaranteeChange" :dialog="myDialog"></guarantee-dialog>
|
|
|
<upload-files-dialog :read="onlyRead ? true : false" ref="upload" @changeFile="fileChange" :keysArr="filesArr"
|
|
|
:dialog="myDialog">
|
|
|
</upload-files-dialog>
|
|
|
<upload-img-dialog :read="onlyRead ? true : false" @changeFile="imgChange" :keysArr="imgsArr"
|
|
|
:dialog="myDialog"></upload-img-dialog>
|
|
|
- <maintainer-dialog @changeMaintainer="changeMaintainer" ref="maintainer" :dialog="myDialog"></maintainer-dialog>
|
|
|
- <insurer-dialog @changeInsurer="changeInsurer" ref="insurer" :dialog="myDialog"></insurer-dialog>
|
|
|
<pic-dialog :read="onlyRead ? true : false" :dialog="myDialog" :keysArr="picsArr" @change="changePics"></pic-dialog>
|
|
|
<details-dialog :iframeSrc="iframeSrc" v-if="myDialog.details" :dialog="myDialog"></details-dialog>
|
|
|
<!-- 关联资产 -->
|
|
@@ -100,12 +91,6 @@ import { getDataDictionary } from "@/api/dict";
|
|
|
import { mapGetters, mapActions } from "vuex";
|
|
|
|
|
|
import qrcode from "@/components/ledger/lib/qrcode";
|
|
|
-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";
|
|
@@ -114,12 +99,6 @@ import changeRea from "@/components/dialogs/changeRea"
|
|
|
export default {
|
|
|
components: {
|
|
|
qrcode, //二维码页面
|
|
|
- firm, //品牌型号弹窗
|
|
|
- supplyDialog,
|
|
|
- supplierDialog,
|
|
|
- maintainerDialog,
|
|
|
- insurerDialog,
|
|
|
- guaranteeDialog,
|
|
|
uploadFilesDialog,
|
|
|
uploadImgDialog,
|
|
|
picDialog,
|
|
@@ -166,12 +145,6 @@ export default {
|
|
|
partsTypeList: [], //tabs
|
|
|
myDialog: {
|
|
|
qrcode: false, //二维码弹窗
|
|
|
- firm: false, //厂商弹窗
|
|
|
- supply: false, //选择供应合同
|
|
|
- supplier: false, //供应商选择
|
|
|
- guarantee: false, //选择保单
|
|
|
- maintainer: false, //选择维修商
|
|
|
- insurer: false, //选择保险公司
|
|
|
uploadFiles: false, //上传文件
|
|
|
uploadImgs: false, //上传单个图片
|
|
|
pic: false, //多个图片
|
|
@@ -485,111 +458,6 @@ export default {
|
|
|
}
|
|
|
return a;
|
|
|
},
|
|
|
- //选择型号修改
|
|
|
- firmChange(data) {
|
|
|
- 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], "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"
|
|
|
- )
|
|
|
- // this.handleUpdataTable([[this.row, "LedgerParam.equipManufactor.Brand", null, data.brand]], "edit")
|
|
|
- // this.handleUpdataTable([[this.row, "LedgerParam.equipManufactor.Specification", null, data.name]], "edit")
|
|
|
- },
|
|
|
- //供应商变更
|
|
|
- supplierChange(data) {
|
|
|
- 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"
|
|
|
- )
|
|
|
- },
|
|
|
- //保险商变更
|
|
|
- changeInsurer(data) {
|
|
|
- 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"
|
|
|
- )
|
|
|
- // this.handleUpdataTable([[this.row, "LedgerParam.InsuranceDoc.Insurer", null, data.name]], "edit")
|
|
|
- },
|
|
|
- //维修商变更
|
|
|
- changeMaintainer(data) {
|
|
|
- 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"
|
|
|
- )
|
|
|
- // this.handleUpdataTable([[this.row, "LedgerParam.operationMainte.maintainer", null, data.name]], "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");
|
|
|
- }
|
|
|
- },
|
|
|
//修改关联的资产
|
|
|
changeProperty(val) {
|
|
|
this.setDataToMain(val.propertyId, 'propertyId', this.row);
|
|
@@ -685,62 +553,27 @@ export default {
|
|
|
this.myDialog.changeRea = true;
|
|
|
}
|
|
|
break;
|
|
|
- //品牌型号弹窗
|
|
|
- case 'dpManufacturerId':
|
|
|
- if (!this.onlyRead) {
|
|
|
- this.myDialog.firm = true;
|
|
|
- }
|
|
|
- break;
|
|
|
- //供应商信息弹窗
|
|
|
- case 'dpSupplierId':
|
|
|
- if (!this.onlyRead) {
|
|
|
- this.myDialog.supplier = true;
|
|
|
- }
|
|
|
- break;
|
|
|
- //维修商信息弹窗
|
|
|
- case 'dpMaintainerId':
|
|
|
- if (!this.onlyRead) {
|
|
|
- this.myDialog.maintainer = true;
|
|
|
- }
|
|
|
- break;
|
|
|
- //保险公司信息
|
|
|
- case 'dpInsurerId':
|
|
|
- if (!this.onlyRead) {
|
|
|
- this.myDialog.insurer = true;
|
|
|
- }
|
|
|
- break;
|
|
|
- //供应合同编号
|
|
|
- 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("请先选择供应商");
|
|
|
- }
|
|
|
- }
|
|
|
- break;
|
|
|
- //保险单号
|
|
|
- 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': //保险文件
|
|
|
+ const propertyId = this.tableData[row.row].propertyId;
|
|
|
+ if (!propertyId) { //未关联资产
|
|
|
+ this.$confirm('请先关联资产后再维护该信息!', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ showCancelButton: false,
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ return false;
|
|
|
+ });
|
|
|
}
|
|
|
- }
|
|
|
- break;
|
|
|
+ break
|
|
|
//保险文件--设备文档--安装质检报告
|
|
|
case 'infos.insuranceFile': //保险文件
|
|
|
case 'infos.archive': //设备文档
|