| | |
| | | <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"> |
| | |
| | | placeholder="请输入物料代码" |
| | | style="width: 160px" |
| | | /> |
| | | <el-button type="primary" @click="handleResCnz" style="margin-left: 10px">重新同步</el-button> |
| | | <el-button type="primary" size="mini" @click="handleResCnz" style="margin-left: 10px">重新同步</el-button> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button> |
| | | <el-button @click="resetQuery">重置</el-button> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
| | | <el-button size="mini" @click="resetQuery">重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-form :model="queryParams" ref="filterForm"> |
| | |
| | | placeholder="请选择" |
| | | style="width: 100%" |
| | | > |
| | | <el-option value="0" label=""></el-option> |
| | | <!-- <el-option value="" label=""></el-option> --> |
| | | <el-option |
| | | v-for="(item, index) in visibleColumns" |
| | | :key="index" |
| | |
| | | placeholder="请选择" |
| | | style="width: 100%" |
| | | > |
| | | <el-option value="0" label=""></el-option> |
| | | <!-- <el-option value="0" label=""></el-option> --> |
| | | <el-option |
| | | v-for="(item, index) in comparatorList" |
| | | :key="index" |
| | |
| | | placeholder="请选择" |
| | | style="width: 100%" |
| | | > |
| | | <el-option value="0" label=""></el-option> |
| | | <!-- <el-option value="0" label=""></el-option> --> |
| | | <el-option |
| | | v-for="(item, index) in visibleColumns" |
| | | :key="index" |
| | |
| | | placeholder="请选择" |
| | | style="width: 100%" |
| | | > |
| | | <el-option value="0" label=""></el-option> |
| | | <!-- <el-option value="0" label=""></el-option> --> |
| | | <el-option |
| | | v-for="(item, index) in comparatorList" |
| | | :key="index" |
| | |
| | | placeholder="请选择" |
| | | style="width: 100%" |
| | | > |
| | | <el-option value="0" label=""></el-option> |
| | | <!-- <el-option value="0" label=""></el-option> --> |
| | | <el-option |
| | | v-for="(item, index) in visibleColumns" |
| | | :key="index" |
| | |
| | | placeholder="请选择" |
| | | style="width: 100%" |
| | | > |
| | | <el-option value="0" label=""></el-option> |
| | | <!-- <el-option value="0" label=""></el-option> --> |
| | | <el-option |
| | | v-for="(item, index) in comparatorList" |
| | | :key="index" |
| | |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-upload2" |
| | | size="mini" |
| | | @click="handleImport" |
| | | >导入</el-button |
| | |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-download" |
| | | size="mini" |
| | | @click="handleExport" |
| | | >导出</el-button |
| | |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-document" |
| | | size="mini" |
| | | @click="handleNumAdd" |
| | | >流水号新增</el-button |
| | |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-plus" |
| | | size="mini" |
| | | @click="handleAdd" |
| | | >新增</el-button |
| | |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | icon="el-icon-document-copy" |
| | | size="mini" |
| | | :disabled="single" |
| | | @click="handleCopy" |
| | |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | icon="el-icon-edit" |
| | | size="mini" |
| | | :disabled="single" |
| | | @click="handleEdit" |
| | |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="danger" |
| | | plain |
| | | icon="el-icon-delete" |
| | | size="mini" |
| | | :disabled="single" |
| | | @click="handleDelete" |
| | |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | icon="el-icon-check" |
| | | size="mini" |
| | | :disabled="single" |
| | | @click="handleAudit(0)" |
| | |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | icon="el-icon-close" |
| | | size="mini" |
| | | :disabled="single" |
| | | @click="handleAudit(1)" |
| | |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="el-icon-turn-off" |
| | | size="mini" |
| | | :disabled="single" |
| | | @click="handleStop(0)" |
| | |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="el-icon-open" |
| | | size="mini" |
| | | :disabled="single" |
| | | @click="handleStop(1)" |
| | |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="info" |
| | | plain |
| | | icon="el-icon-setting" |
| | | size="mini" |
| | | @click="handleColumnSetting" |
| | | >列设置</el-button |
| | |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="info" |
| | | plain |
| | | icon="el-icon-s-operation" |
| | | size="mini" |
| | | @click="handleButtonSetting" |
| | | >按钮设置</el-button |
| | |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-folder-checked" |
| | | size="mini" |
| | | @click="handleSaveScheme" |
| | | >保存方案</el-button |
| | |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-folder-opened" |
| | | size="mini" |
| | | @click="handleReadScheme" |
| | | >读取方案</el-button |
| | |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="info" |
| | | plain |
| | | icon="el-icon-refresh" |
| | | size="mini" |
| | | @click="handleRefresh" |
| | | >刷新</el-button |
| | |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="info" |
| | | plain |
| | | icon="el-icon-close" |
| | | size="mini" |
| | | @click="handleExit" |
| | | >退出</el-button |
| | |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-edit" |
| | | size="mini" |
| | | @click="handleCorrect" |
| | | >批改</el-button |
| | |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-edit" |
| | | size="mini" |
| | | @click="handleCorrect2" |
| | | >批改(方案2)</el-button |
| | |
| | | append-to-body |
| | | > |
| | | <div style="margin-top: -20px"> |
| | | <el-button type="primary" @click="handleImportSubmit">导入数据</el-button> |
| | | <el-button type="primary" @click="upload.open = false">退 出</el-button> |
| | | <el-button type="primary" size="mini" @click="handleImportSubmit">导入数据</el-button> |
| | | <el-button type="primary" size="mini" @click="upload.open = false">退 出</el-button> |
| | | <el-upload |
| | | ref="upload" |
| | | :limit="1" |
| | |
| | | :on-progress="handleFileUploadProgress" |
| | | :on-success="handleFileSuccess" |
| | | > |
| | | <el-button type="primary">文件上传</el-button> |
| | | <el-button type="primary" size="mini">文件上传</el-button> |
| | | </el-upload> |
| | | </div> |
| | | <el-table |
| | |
| | | HModel: null, |
| | | HOrgID: null, |
| | | HProject: null, |
| | | ColName: "0", |
| | | ColName1: "0", |
| | | ColName2: "0", |
| | | Comparator: "0", |
| | | Comparator1: "0", |
| | | Comparator2: "0", |
| | | ColName: "", |
| | | ColName1: "", |
| | | ColName2: "", |
| | | Comparator: "", |
| | | Comparator1: "", |
| | | Comparator2: "", |
| | | ColContent: "", |
| | | ColContent1: "", |
| | | ColContent2: "", |
| | |
| | | .then((response) => { |
| | | let data = response.data.data[0]; |
| | | this.user = data.Czymc; |
| | | |
| | | this.getOrganizations(); |
| | | this.queryParams.HOrgID = data.HUSEORGID; |
| | | this.getTreeData(); |
| | | this.getProjectOptions(); |
| | | this.getList(); |
| | | this.getDefaultFilterScheme(); |
| | | //this.getDefaultFilterScheme(); |
| | | }) |
| | | .catch((error) => { |
| | | this.$modal.msgError("接口请求失败!"); |
| | |
| | | .then((response) => { |
| | | if (response.data.count == 1) { |
| | | this.organizationOptions = response.data.data; |
| | | if (this.organizationOptions.length > 0) { |
| | | this.queryParams.HOrgID = this.organizationOptions[0].ID; |
| | | } |
| | | // if (this.organizationOptions.length > 0) { |
| | | // this.queryParams.HOrgID = this.organizationOptions[0].ID; |
| | | // } |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | |
| | | }, |
| | | |
| | | handleRefresh() { |
| | | // 刷新时清除表格选择并重置相关状态,保证复制/编辑/删除/审核等按钮被禁用 |
| | | if (this.$refs.tableData && this.$refs.tableData.clearSelection) { |
| | | this.$refs.tableData.clearSelection(); |
| | | } |
| | | this.selectedRow = null; |
| | | this.ids = []; |
| | | this.single = true; |
| | | this.multiple = true; |
| | | this.getList(); |
| | | }, |
| | | |
| | |
| | | }, |
| | | |
| | | // 物料代码点击 |
| | | 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)) { |
| | | return { background: "#ecf5ff" }; |
| | | 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> |