| | |
| | | <template> |
| | | <div style="padding: 10px; position: relative;"> |
| | | <div style="padding: 10px"> |
| | | <el-card style="margin-bottom: 10px;"> |
| | | <el-form :inline="true" :model="queryParams" ref="queryForm" class="mb8"> |
| | | <el-form-item label="物料代码" prop="HNumber"> |
| | |
| | | </el-collapse-item> |
| | | </el-collapse> |
| | | </el-form> |
| | | <!-- <div style="text-align:center;font-size:15px;font-weight:bold;color:#fc9393;margin: 20px 0;"> |
| | | <div style="text-align:center;font-size:15px;font-weight:bold;color:#fc9393;margin: 20px 0;"> |
| | | {{ currentFilterScheme }} |
| | | </div> --> |
| | | </div> |
| | | </el-card> |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | |
| | | }, |
| | | |
| | | // 物料代码点击 |
| | | handleMaterialCodeClick(row) { |
| | | handleMaterialCodeClick(row) { |
| | | this.selectedRow = row; |
| | | this.OperationType = 3; |
| | | this.currentEditId = row.HItemID; |
| | |
| | | |
| | | |
| | | handleRowClick(row, column, event) { |
| | | if(this.openPage){ |
| | | this.$emit('deptEmit', row, 3) |
| | | } |
| | | if (this.checkIsIframe()) { |
| | | // 将当前选中的数据暴露到window中 |
| | | window.selectedRow = row; |
| | | } |
| | | this.$refs.tableData.toggleRowSelection(row); |
| | | this.selectedRow = row; |
| | | this.getFileList(row.物料代码); |
| | | if (this.openPage) { |
| | | this.$emit('deptEmit', row, 3) |
| | | } |
| | | }, |
| | | |
| | | |
| | |
| | | |
| | | // 行样式 |
| | | rowStyle({ row, rowIndex }) { |
| | | if (this.ids.includes(row.HItemID)) { |
| | | if (this.ids.includes(row.hmainid)) { |
| | | return { background: "#ecf5ff" }; |
| | | } |
| | | }, |
| | | |
| | | // 双击行 |
| | | handleDblclick(row, column, cell, event) { |
| | | if (this.openPage) { |
| | | if(this.openPage){ |
| | | this.$emit('deptEmitDb', row, 3) |
| | | } else { |
| | | this.handleMaterialCodeClick(row); |
| | | } |
| | | if (this.checkIsIframe()) { |
| | | // IFrame 双击 返回当前双击的数据 |
| | | window.parent.iFrameMaterialCallback(row); |
| | | return; |
| | | } |
| | | this.handleMaterialCodeClick(row); |
| | | }, |
| | | |
| | | handleSelectionChange(selection) { |
| | | console.log(selection) |
| | | this.ids = selection.map((item) => item.HItemID); |
| | | this.ids = selection.map((item) => item.hmainid); |
| | | this.single = selection.length != 1; |
| | | this.multiple = !selection.length; |
| | | if (!this.single) { |
| | | this.selectedRow = selection[0]; |
| | | } |
| | | // if(this.openPage){ |
| | | // this.$emit('deptEmit', this.selectedRow, 3) |
| | | // } |
| | | }, |
| | | // 编辑关闭回调 |
| | | handleEditClose() { |
| | |
| | | |
| | | getDefaultFilterScheme() { |
| | | this.currentFilterScheme = "当前过滤方案:默认方案"; |
| | | } |
| | | }, |
| | | checkIsIframe() { |
| | | if (window.self == window.top) { |
| | | return false; |
| | | } |
| | | return true; |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |