|
@@ -920,200 +920,206 @@
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- //获取到了正确的信息
|
|
|
- getInfors(infos, row, el) {
|
|
|
- let val = this.hot.colToProp(row.col);
|
|
|
- let inputMode = this.inputMap[val];
|
|
|
- this.row = row.row;
|
|
|
- this.messKey = val;
|
|
|
- this.firmDataType = 'row'
|
|
|
- lStorage.set('screen_data', {path: this.$route.path, data: {equip: infos}})
|
|
|
- switch (val) {
|
|
|
- //操作
|
|
|
- case 'caozuo':
|
|
|
- // window.open(`http://adm.sagacloud.cn:8058/spread?id=${infos.EquipID}&pid=${this.projectId}&secret=${this.secret}`,"_blank")
|
|
|
- this.$message("开发中...")
|
|
|
- return false
|
|
|
- //设备二维码图片
|
|
|
- case 'EquipQRCode':
|
|
|
- this.qrcodeUrl = this.tableData[row.row].EquipQRCode;
|
|
|
- if (!!this.qrcodeUrl) {
|
|
|
- this.myDialog.qrcode = true;
|
|
|
- } else {
|
|
|
- this.$message("此设备没有设备二维码");
|
|
|
- }
|
|
|
- return false
|
|
|
- //关联系统
|
|
|
- case 'LinkSystem':
|
|
|
- if (!this.onlyRead) {
|
|
|
- this.curDevice = infos.EquipID;
|
|
|
- this.systemList = this.tableData[row.row].LinkSystem || [];
|
|
|
- this.myDialog.systemType = true;
|
|
|
- }
|
|
|
- return false
|
|
|
- //关联资产
|
|
|
- case 'LinkEquipLocalName':
|
|
|
- if (!this.onlyRead) {
|
|
|
- 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;
|
|
|
+ //获取到了正确的信息
|
|
|
+ getInfors(infos, row, el) {
|
|
|
+ let val = this.hot.colToProp(row.col);
|
|
|
+ let inputMode = this.inputMap[val];
|
|
|
+ this.row = row.row;
|
|
|
+ this.messKey = val;
|
|
|
+ this.firmDataType = 'row'
|
|
|
+ lStorage.set('screen_data', { path: this.$route.path, data: { equip: infos } })
|
|
|
+ switch (val) {
|
|
|
+ //操作
|
|
|
+ case 'caozuo':
|
|
|
+ // window.open(`http://adm.sagacloud.cn:8058/spread?id=${infos.EquipID}&pid=${this.projectId}&secret=${this.secret}`,"_blank")
|
|
|
+ this.$message("开发中...")
|
|
|
+ return false
|
|
|
+ //设备二维码图片
|
|
|
+ case 'EquipQRCode':
|
|
|
+ this.qrcodeUrl = this.tableData[row.row].EquipQRCode;
|
|
|
+ if (!!this.qrcodeUrl) {
|
|
|
+ this.myDialog.qrcode = true;
|
|
|
+ } else {
|
|
|
+ this.$message("此设备没有设备二维码");
|
|
|
+ }
|
|
|
+ return false
|
|
|
+ //关联系统
|
|
|
+ case 'LinkSystem':
|
|
|
+ if (!this.onlyRead) {
|
|
|
+ this.curDevice = infos.EquipID;
|
|
|
+ this.systemList = this.tableData[row.row].LinkSystem || [];
|
|
|
+ this.myDialog.systemType = true;
|
|
|
+ }
|
|
|
+ return false
|
|
|
+ //关联资产
|
|
|
+ case 'LinkEquipLocalName':
|
|
|
+ if (!this.onlyRead) {
|
|
|
+ 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
|
|
|
+ //供应合同编号
|
|
|
+ case 'LedgerParam.SupplyPurchase.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
|
|
|
+ //保险单号
|
|
|
+ case 'LedgerParam.InsuranceDoc.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("请先选择保险商");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false
|
|
|
+ //保险文件--设备文档--安装质检报告
|
|
|
+ case 'LedgerParam.InsuranceDoc.InsuranceFile':
|
|
|
+ case 'LedgerParam.PhotoDoc.Archive':
|
|
|
+ case 'LedgerParam.Siteinstall.CheckReport':
|
|
|
+ let IPSdata = tools.dataForKey(this.tableData[row.row], val);
|
|
|
+ this.filesArr = IPSdata ? IPSdata : [];
|
|
|
+ if (!this.onlyRead || this.filesArr.length) {
|
|
|
+ this.myDialog.uploadFiles = true;
|
|
|
+ }
|
|
|
+ return false
|
|
|
+ //安装照片--安装图纸--设备铭牌照片--设备图纸
|
|
|
+ case 'LedgerParam.Siteinstall.InstallPic':
|
|
|
+ case 'LedgerParam.Siteinstall.InstallDrawing':
|
|
|
+ case 'LedgerParam.PhotoDoc.Nameplate':
|
|
|
+ case 'LedgerParam.PhotoDoc.Drawing':
|
|
|
+ let SSPPdata = tools.dataForKey(this.tableData[row.row], val);
|
|
|
+ this.imgsArr = SSPPdata ? SSPPdata : [];
|
|
|
+ if (!this.onlyRead || this.imgsArr.length) {
|
|
|
+ this.myDialog.uploadImgs = true;
|
|
|
+ }
|
|
|
+ return false
|
|
|
+ //设备照片
|
|
|
+ case 'LedgerParam.PhotoDoc.Pic':
|
|
|
+ let Pdata = tools.dataForKey(this.tableData[row.row], val);
|
|
|
+ this.picsArr = Pdata ? Pdata : [];
|
|
|
+ if (!this.onlyRead || this.picsArr.length) {
|
|
|
+ this.myDialog.pic = true;
|
|
|
+ }
|
|
|
+ return false
|
|
|
+ //包含的部件字段
|
|
|
+ case 'Count':
|
|
|
+ if (this.onlyRead) {
|
|
|
+ this.$router.push({path: '/ledger/parts', query: {deviceId: infos.EquipID}});
|
|
|
+ } else {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/ledger/partsmanage',
|
|
|
+ query: {deviceId: infos.EquipID, typeId: this.mess.deviceId}
|
|
|
+ });
|
|
|
+ }
|
|
|
+ return false
|
|
|
+ default:
|
|
|
+ break;
|
|
|
}
|
|
|
- return false
|
|
|
- //维修商信息弹窗
|
|
|
- case 'DPMaintainerID':
|
|
|
- if (!this.onlyRead) {
|
|
|
- this.myDialog.maintainer = true;
|
|
|
+ if (!this.onlyRead && showTools.InputModeArr.indexOf(inputMode) == '-1') {
|
|
|
+ this.updateInfoPoint = val
|
|
|
+ this.updateInput = tools.dataForKey(this.tableData[row.row], val)
|
|
|
+ this.myDialog.update = true
|
|
|
}
|
|
|
- return false
|
|
|
- //保险公司信息
|
|
|
- case 'DPInsurerID':
|
|
|
- if (!this.onlyRead) {
|
|
|
- this.myDialog.insurer = true;
|
|
|
+ },
|
|
|
+ //关闭临时维护弹窗回调
|
|
|
+ handleCloseUpdate() {
|
|
|
+ this.updateInputShow = false
|
|
|
+ this.updateInfoPoint = ''
|
|
|
+ this.updateInput = ''
|
|
|
+ },
|
|
|
+ //更新临时维护信息点
|
|
|
+ handleClickUpdate() {
|
|
|
+ tools.setDataForKey(this.tableData[this.row], this.updateInfoPoint, this.updateInput)
|
|
|
+ this.handleUpdataTable([[this.row, this.updateInfoPoint, null, this.updateInput]], "edit")
|
|
|
+ this.updateInputShow = false
|
|
|
+ this.myDialog.update = false
|
|
|
+ this.updateInput = ''
|
|
|
+ },
|
|
|
+ //获取被筛选掉的行号
|
|
|
+ trimmedRows() {
|
|
|
+ var plugin = this.hot.getPlugin("trimRows").trimmedRows;
|
|
|
+ let dataLength = this.tableData.length;
|
|
|
+ let dataArr = new Array();
|
|
|
+ for (let i = 0; i < dataLength; i++) {
|
|
|
+ dataArr.push(i);
|
|
|
}
|
|
|
- return false
|
|
|
- //供应合同编号
|
|
|
- case 'LedgerParam.SupplyPurchase.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("请先选择供应商");
|
|
|
- }
|
|
|
+ if (plugin.length <= 0) {
|
|
|
+ dataArr = undefined;
|
|
|
+ } else {
|
|
|
+ dataArr = this.array_diff(dataArr, plugin);
|
|
|
}
|
|
|
- return false
|
|
|
- //保险单号
|
|
|
- case 'LedgerParam.InsuranceDoc.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("请先选择保险商");
|
|
|
- }
|
|
|
+ return dataArr || [];
|
|
|
+ },
|
|
|
+ //去除数组中相同的元素
|
|
|
+ array_diff(a, b) {
|
|
|
+ for (var i = 0; i < b.length; i++) {
|
|
|
+ for (var j = 0; j < a.length; j++) {
|
|
|
+ if (a[j] == b[i]) {
|
|
|
+ a.splice(j, 1);
|
|
|
+ j = j - 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
- return false
|
|
|
- //保险文件--设备文档--安装质检报告
|
|
|
- case 'LedgerParam.InsuranceDoc.InsuranceFile':
|
|
|
- case 'LedgerParam.PhotoDoc.Archive':
|
|
|
- case 'LedgerParam.Siteinstall.CheckReport':
|
|
|
- let IPSdata = tools.dataForKey(this.tableData[row.row], val);
|
|
|
- this.filesArr = IPSdata ? IPSdata : [];
|
|
|
- this.myDialog.uploadFiles = true;
|
|
|
- return false
|
|
|
- //安装照片--安装图纸--设备铭牌照片--设备图纸
|
|
|
- case 'LedgerParam.Siteinstall.InstallPic':
|
|
|
- case 'LedgerParam.Siteinstall.InstallDrawing':
|
|
|
- case 'LedgerParam.PhotoDoc.Nameplate':
|
|
|
- case 'LedgerParam.PhotoDoc.Drawing':
|
|
|
- let SSPPdata = tools.dataForKey(this.tableData[row.row], val);
|
|
|
- this.imgsArr = SSPPdata ? SSPPdata : [];
|
|
|
- this.myDialog.uploadImgs = true;
|
|
|
- return false
|
|
|
- //设备照片
|
|
|
- case 'LedgerParam.PhotoDoc.Pic':
|
|
|
- let Pdata = tools.dataForKey(this.tableData[row.row], val);
|
|
|
- this.picsArr = Pdata ? Pdata : [];
|
|
|
- this.myDialog.pic = true;
|
|
|
- return false
|
|
|
- //包含的部件字段
|
|
|
- case 'Count':
|
|
|
- if (this.onlyRead) {
|
|
|
- this.$router.push({path: '/ledger/parts', query: {deviceId: infos.EquipID}});
|
|
|
+ return a;
|
|
|
+ },
|
|
|
+ //如果选择供应商之后
|
|
|
+ supplierChange(data, type) {
|
|
|
+ if (type === 'dialog') {
|
|
|
+ let firm = {...data, num: 8}
|
|
|
+ this.firmName = firm
|
|
|
} else {
|
|
|
- this.$router.push({
|
|
|
- path: '/ledger/partsmanage',
|
|
|
- query: {deviceId: infos.EquipID, typeId: this.mess.deviceId}
|
|
|
- });
|
|
|
+ tools.setDataForKey(this.tableData[this.row], "DPSupplierID", data.venderId)
|
|
|
+ tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.Supplier", data.name)
|
|
|
+ this.handleUpdataTable(
|
|
|
+ [
|
|
|
+ [this.row, "DPSupplierID", null, data.venderId],
|
|
|
+ [this.row, "LedgerParam.SupplyPurchase.Supplier", null, data.name]
|
|
|
+ ],
|
|
|
+ "edit"
|
|
|
+ )
|
|
|
+ // this.handleUpdataTable([[this.row, "LedgerParam.SupplyPurchase.Supplier", null, data.name]], "edit")
|
|
|
}
|
|
|
- return false
|
|
|
- default:
|
|
|
- break;
|
|
|
- }
|
|
|
- if (!this.onlyRead && showTools.InputModeArr.indexOf(inputMode) == '-1') {
|
|
|
- this.updateInfoPoint = val
|
|
|
- this.updateInput = tools.dataForKey(this.tableData[row.row], val)
|
|
|
- this.myDialog.update = true
|
|
|
- }
|
|
|
- },
|
|
|
- //关闭临时维护弹窗回调
|
|
|
- handleCloseUpdate() {
|
|
|
- this.updateInputShow = false
|
|
|
- this.updateInfoPoint = ''
|
|
|
- this.updateInput = ''
|
|
|
- },
|
|
|
- //更新临时维护信息点
|
|
|
- handleClickUpdate() {
|
|
|
- tools.setDataForKey(this.tableData[this.row], this.updateInfoPoint, this.updateInput)
|
|
|
- this.handleUpdataTable([[this.row, this.updateInfoPoint, null, this.updateInput]], "edit")
|
|
|
- this.updateInputShow = false
|
|
|
- this.myDialog.update = false
|
|
|
- this.updateInput = ''
|
|
|
- },
|
|
|
- //获取被筛选掉的行号
|
|
|
- trimmedRows() {
|
|
|
- var plugin = this.hot.getPlugin("trimRows").trimmedRows;
|
|
|
- let dataLength = this.tableData.length;
|
|
|
- let dataArr = new Array();
|
|
|
- for (let i = 0; i < dataLength; i++) {
|
|
|
- dataArr.push(i);
|
|
|
- }
|
|
|
- if (plugin.length <= 0) {
|
|
|
- dataArr = undefined;
|
|
|
- } else {
|
|
|
- dataArr = this.array_diff(dataArr, plugin);
|
|
|
- }
|
|
|
- return dataArr || [];
|
|
|
- },
|
|
|
- //去除数组中相同的元素
|
|
|
- array_diff(a, b) {
|
|
|
- for (var i = 0; i < b.length; i++) {
|
|
|
- for (var j = 0; j < a.length; j++) {
|
|
|
- if (a[j] == b[i]) {
|
|
|
- a.splice(j, 1);
|
|
|
- j = j - 1;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- 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], "LedgerParam.SupplyPurchase.Supplier", data.name)
|
|
|
- this.handleUpdataTable(
|
|
|
- [
|
|
|
- [this.row, "DPSupplierID", null, data.venderId],
|
|
|
- [this.row, "LedgerParam.SupplyPurchase.Supplier", null, data.name]
|
|
|
- ],
|
|
|
- "edit"
|
|
|
- )
|
|
|
- // this.handleUpdataTable([[this.row, "LedgerParam.SupplyPurchase.Supplier", null, data.name]], "edit")
|
|
|
- }
|
|
|
|
|
|
},
|
|
|
//供应合同编号
|