959 lines
46 KiB
Plaintext
959 lines
46 KiB
Plaintext
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BJCPJXDR.aspx.cs" Inherits="GThinking.N_XLXSBJ.BJCPJXDR" Title="线缆报价深度解析导入" %>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head id="Head1" runat="server">
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>线缆报价深度解析导入</title>
|
|
|
|
<link rel="stylesheet" href="images/elmentindex.css">
|
|
<link rel="stylesheet" href="images/BJCPJXDR.css?mod=20260527_colresize3">
|
|
<script src="images/vue@3.js"></script>
|
|
<script src="images/element-plus.js"></script>
|
|
<script src="images/icons-vue.js"></script>
|
|
<script src="images/zhCn.js"></script>
|
|
<script src="images/h5player.min.js"></script>
|
|
<!-- 使用可靠的SheetJS CDN -->
|
|
<script src="images/xlsx.full.min.js"></script>
|
|
</head>
|
|
<body>
|
|
<form id="form1" runat="server">
|
|
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true"></asp:ScriptManager>
|
|
<gtc:gtTextBox ID="txtBJDID" runat="server" Width="120px" style="display: none"></gtc:gtTextBox>
|
|
<gtc:gtTextBox ID="txtBJU059" runat="server" Width="120px" style="display: none"></gtc:gtTextBox>
|
|
<div id="app">
|
|
<el-container class="container">
|
|
<el-header height="auto">
|
|
<el-row :gutter="8" class="toolbar">
|
|
<el-col :span="24" style="display: flex; gap: 8px;justify-content: space-between;">
|
|
<div style="display: flex; gap: 8px;">
|
|
<el-button
|
|
type="primary"
|
|
size="small"
|
|
plain
|
|
@click="pasteData"
|
|
:disabled="isLoading"
|
|
icon="DocumentCopy">
|
|
点击粘贴数据
|
|
</el-button>
|
|
<el-button
|
|
type="danger"
|
|
size="small"
|
|
plain
|
|
@click="deleteData"
|
|
:disabled="isLoading"
|
|
icon="DocumentCopy">
|
|
删除当前数据
|
|
</el-button>
|
|
|
|
<!-- 新增导入Excel按钮 -->
|
|
<el-button
|
|
type="success"
|
|
size="small"
|
|
plain
|
|
:disabled="isLoading"
|
|
@click="showImportDialog('excel')"
|
|
icon="Upload">
|
|
导入Excel
|
|
</el-button>
|
|
<!-- 新增导出Excel按钮 -->
|
|
<el-button
|
|
type="primary"
|
|
size="small"
|
|
plain
|
|
:disabled="tableData.length === 0"
|
|
@click="exportExcel"
|
|
icon="Download">
|
|
导出Excel
|
|
</el-button>
|
|
<!-- 新增PDF导入按钮 -->
|
|
<el-button
|
|
type="success"
|
|
size="small"
|
|
plain
|
|
:disabled="isLoading"
|
|
@click="showImportDialog('pdf')"
|
|
icon="Document">
|
|
导入PDF
|
|
</el-button>
|
|
<el-button
|
|
type="success"
|
|
size="small"
|
|
plain
|
|
@click="showRuleDialog"
|
|
icon="Plus"
|
|
:disabled="!selectedProduct">
|
|
新增解析规则
|
|
</el-button>
|
|
|
|
<el-button
|
|
type="warning"
|
|
size="small"
|
|
plain
|
|
@click="showEXRuleDialog"
|
|
:disabled="isLoading"
|
|
icon="Connection">
|
|
按已有规则解析
|
|
</el-button>
|
|
<el-button
|
|
type="warning"
|
|
size="small"
|
|
plain
|
|
:disabled="isLoading"
|
|
@click="InsertBJDMX"
|
|
icon="CirclePlusFilled">
|
|
导入报价单明细
|
|
</el-button>
|
|
</div>
|
|
<div>
|
|
<el-button
|
|
type="danger"
|
|
size="small"
|
|
plain
|
|
:disabled="isLoading"
|
|
@click="closePage"
|
|
icon="Close">
|
|
关闭
|
|
</el-button>
|
|
</div>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row :gutter="8" class="toolbar toolbar-batch">
|
|
<el-col :span="24">
|
|
<div class="toolbar-batch-row">
|
|
<el-button
|
|
type="info"
|
|
size="small"
|
|
plain
|
|
:disabled="!hasSelectedRows"
|
|
@click="showBatchUpdateDialog('standard')"
|
|
icon="Edit">
|
|
批量调整标准
|
|
</el-button>
|
|
<el-button
|
|
type="info"
|
|
size="small"
|
|
plain
|
|
:disabled="!hasSelectedRows"
|
|
@click="showBatchUpdateDialog('voltage')"
|
|
icon="Edit">
|
|
批量调整电压
|
|
</el-button>
|
|
<el-button
|
|
type="info"
|
|
size="small"
|
|
plain
|
|
:disabled="!hasSelectedRows"
|
|
@click="showBatchUpdateDialog('model')"
|
|
icon="Edit">
|
|
批量调整型号
|
|
</el-button>
|
|
<el-button
|
|
type="info"
|
|
size="small"
|
|
plain
|
|
:disabled="!hasSelectedRows"
|
|
@click="showBatchUpdateDialog('spec')"
|
|
icon="Edit">
|
|
批量调整规格
|
|
</el-button>
|
|
</div>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row :gutter="24" class="toolbar" style="display: flex; align-items: center;margin-bottom: 12px; margin-top: 18px;">
|
|
<!-- 解析规则 -->
|
|
<el-form :inline="true" label-position="middle" style="margin-right: 16px;">
|
|
<el-form-item
|
|
label="解析规则:"
|
|
style="margin-left: 10px; display: flex; align-items: center;"
|
|
label-width="auto">
|
|
<el-select
|
|
v-model="filterRule"
|
|
clearable
|
|
@focus="loadRuleOptions"
|
|
@change="loadTableData"
|
|
placeholder="请选择解析规则"
|
|
style=" min-width: 180px;">
|
|
<el-option
|
|
v-for="rule in ruleOptions"
|
|
:key="rule.value"
|
|
:label="rule.label"
|
|
:value="rule.value">
|
|
<template #default>
|
|
<div style="display: flex; justify-content: space-between; align-items: center; width: 100%;">
|
|
<span>{{ rule.label }}</span>
|
|
<el-button
|
|
v-if="rule.value !== '0' && rule.value !== '-1' && rule.value !== '-2'"
|
|
type="danger"
|
|
size="small"
|
|
text
|
|
@click.stop="deleteRule(rule.value)"
|
|
style="padding: 2px 6px; font-size: 12px;">
|
|
删除
|
|
</el-button>
|
|
</div>
|
|
</template>
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form>
|
|
|
|
<!-- 通用解析规则 -->
|
|
<el-form :inline="true" label-position="middle" style="margin-right: 16px;">
|
|
<el-form-item
|
|
label="通用解析规则:"
|
|
style="margin-left: 10px; display: flex; align-items: center;"
|
|
label-width="auto">
|
|
<el-select
|
|
v-model="ExRule"
|
|
clearable
|
|
@focus="loadCommonRuleOptions"
|
|
@change="loadTableData"
|
|
placeholder="请选择通用解析规则"
|
|
style=" min-width: 180px;">
|
|
<el-option
|
|
v-for="rule in commonRuleOptions"
|
|
:key="rule.value"
|
|
:label="rule.label"
|
|
:value="rule.value">
|
|
<template #default>
|
|
<div style="display: flex; justify-content: space-between; align-items: center; width: 100%;">
|
|
<span>{{ rule.label }}</span>
|
|
<el-button
|
|
v-if="rule.value !== '0'"
|
|
type="danger"
|
|
size="small"
|
|
text
|
|
@click.stop="deleteCommonRule(rule.value)"
|
|
style="padding: 2px 6px; font-size: 12px;">
|
|
删除
|
|
</el-button>
|
|
</div>
|
|
</template>
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form>
|
|
|
|
<!-- 导入情况 -->
|
|
<el-form :inline="true" label-position="middle">
|
|
<el-form-item
|
|
label="导入情况:"
|
|
style="display: flex; align-items: center; "
|
|
label-width="auto">
|
|
<el-select
|
|
v-model="filterStatus"
|
|
clearable
|
|
placeholder="请选择导入情况"
|
|
@change="loadTableData"
|
|
style="margin-left: 8px; min-width: 180px;">
|
|
<el-option
|
|
v-for="Statu in statusOptions"
|
|
:key="Statu.value"
|
|
:label="Statu.label"
|
|
:value="Statu.value">
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form>
|
|
<!-- 新增查询条件 -->
|
|
<!-- 报价产品(模糊查询) -->
|
|
<el-form :inline="true" label-position="middle">
|
|
<el-form-item
|
|
label="报价产品:"
|
|
style="display: flex; align-items: center; margin-left: 16px;"
|
|
label-width="auto">
|
|
<el-input
|
|
v-model="productQuery"
|
|
placeholder="请输入报价产品"
|
|
clearable
|
|
@change="loadTableData"
|
|
style="margin-left: 8px; width: 150px;">
|
|
</el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
|
|
<!-- 线缆型号(模糊查询) -->
|
|
<el-form :inline="true" label-position="middle">
|
|
<el-form-item
|
|
label="线缆型号:"
|
|
style="display: flex; align-items: center; margin-left: 16px;"
|
|
label-width="auto">
|
|
<el-input
|
|
v-model="modelQuery"
|
|
placeholder="请输入线缆型号"
|
|
clearable
|
|
@change="loadTableData"
|
|
style="margin-left: 8px; width: 150px;">
|
|
</el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
|
|
<!-- 线缆规格(模糊查询) -->
|
|
<el-form :inline="true" label-position="middle">
|
|
<el-form-item
|
|
label="线缆规格:"
|
|
style="display: flex; align-items: center; margin-left: 16px;"
|
|
label-width="auto">
|
|
<el-input
|
|
v-model="specQuery"
|
|
placeholder="请输入线缆规格"
|
|
clearable
|
|
@change="loadTableData"
|
|
style="margin-left: 8px; width: 150px;">
|
|
</el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
|
|
<!-- 线缆标准(精确查询) -->
|
|
<el-form :inline="true" label-position="middle">
|
|
<el-form-item
|
|
label="线缆标准:"
|
|
style="display: flex; align-items: center; margin-left: 16px;"
|
|
label-width="auto">
|
|
<el-select
|
|
v-model="standardQuery"
|
|
placeholder="请选择线缆标准"
|
|
clearable
|
|
@change="loadTableData"
|
|
style="margin-left: 8px; width: 150px;">
|
|
<el-option
|
|
v-for="option in standardOptions"
|
|
:key="option.value"
|
|
:label="option.label"
|
|
:value="option.value">
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form>
|
|
|
|
<!-- 电压等级(精确查询) -->
|
|
<el-form :inline="true" label-position="middle">
|
|
<el-form-item
|
|
label="电压等级:"
|
|
style="display: flex; align-items: center; margin-left: 16px;"
|
|
label-width="auto">
|
|
<el-select
|
|
v-model="voltageQuery"
|
|
placeholder="请选择电压等级"
|
|
clearable
|
|
@change="loadTableData"
|
|
style="margin-left: 8px; width: 150px;">
|
|
<el-option
|
|
v-for="option in voltageOptions"
|
|
:key="option.value"
|
|
:label="option.label"
|
|
:value="option.value">
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form>
|
|
|
|
<!-- 缺失要素(多选,对应解析字段为空) -->
|
|
<el-form :inline="true" label-position="middle">
|
|
<el-form-item
|
|
label="缺失要素:"
|
|
style="display: flex; align-items: center; margin-left: 16px;"
|
|
label-width="auto">
|
|
<el-select
|
|
v-model="missingElementQuery"
|
|
multiple
|
|
collapse-tags
|
|
collapse-tags-tooltip
|
|
placeholder="请选择缺失要素"
|
|
clearable
|
|
@change="loadTableData"
|
|
style="margin-left: 8px; min-width: 220px;">
|
|
<el-option
|
|
v-for="option in missingElementOptions"
|
|
:key="option.value"
|
|
:label="option.label"
|
|
:value="option.value">
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form>
|
|
|
|
<el-form :inline="true" label-position="middle">
|
|
<el-form-item
|
|
label=""
|
|
style="display: flex; align-items: center; margin-left: 16px;"
|
|
label-width="auto">
|
|
<el-checkbox
|
|
v-model="filterEquivalent"
|
|
@change="loadTableData"
|
|
style="margin-left: 8px;">
|
|
仅显示等效数据
|
|
</el-checkbox>
|
|
</el-form-item>
|
|
</el-form>
|
|
|
|
|
|
</el-row>
|
|
</el-header>
|
|
|
|
<el-main class="table-container" style="height: calc(100vh - 200px);">
|
|
<!-- 使用 el-table-v2 替换原有表格 -->
|
|
<el-table-v2
|
|
:columns="tableColumnsV2"
|
|
:data="tableData"
|
|
:width="tableWidth"
|
|
:height="tableHeight"
|
|
fixed
|
|
:row-height="42"
|
|
:estimated-row-height="42"
|
|
:header-height="42"
|
|
:row-class="getRowClass"
|
|
:row-event-handlers="{onClick:handleRowClick}"
|
|
v-loading="loading"
|
|
element-loading-background="rgba(245, 245, 245, 0.8)"
|
|
element-loading-spinner="el-icon-loading">
|
|
</el-table-v2>
|
|
</el-main>
|
|
|
|
<!-- 规则配置对话框 -->
|
|
<el-dialog
|
|
v-model="ruleDialogVisible"
|
|
width="950px"
|
|
align-center="false"
|
|
custom-class="rule-config-dialog"
|
|
:close-on-click-modal="false"
|
|
:show-close="false">
|
|
<template #header>
|
|
<div class="rule-config-header">
|
|
<i class="el-icon-setting"></i>
|
|
解析规则配置
|
|
</div>
|
|
</template>
|
|
|
|
<div class="rule-config-content">
|
|
<!-- 规则串部分 -->
|
|
<div class="rule-string-section">
|
|
<div class="rule-string-label">解析规则串:</div>
|
|
<textarea
|
|
ref="ruleEditor"
|
|
v-model="ruleString"
|
|
class="rule-string-textarea"
|
|
placeholder="在此输入解析规则串..."
|
|
@select="saveSelection"></textarea>
|
|
<button type="button" class="unmark-button" @click="unmarkAll">取消标记</button>
|
|
</div>
|
|
|
|
<!-- 规则配置项 -->
|
|
<div class="rule-config-item">
|
|
<div class="rule-item-label"><span class="rule-syntax-link" @click="showXlxhDialog">线缆型号</span></div>
|
|
<div class="rule-input-container">
|
|
<div class="rule-input rule-input-with-arrow">
|
|
<span>{{ modelValue }}</span>
|
|
<i class="el-icon-arrow-down rule-input-arrow"></i>
|
|
</div>
|
|
<div class="rule-input rule-input-with-arrow">
|
|
<span class="rule-highlight">{{ modelActualValue }}</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="rule-tags-container">
|
|
<span class="rule-tag" @click="markPrefixCode">前缀码</span>
|
|
<span class="rule-tag" @click="markModelCode">型号码</span>
|
|
<span class="rule-tag" @click="markSuffixCode">后缀码</span>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="rule-config-item">
|
|
<div class="rule-item-label"><span class="rule-syntax-link" @click="showXLGGDialog">线缆规格</span></div>
|
|
<div class="rule-input-container">
|
|
<div class="rule-input rule-input-with-arrow">
|
|
<span>{{ specValue }}</span>
|
|
<i class="el-icon-arrow-down rule-input-arrow"></i>
|
|
</div>
|
|
<div class="rule-input rule-input-with-arrow">
|
|
<span class="rule-highlight">{{ specActualValue }}</span>
|
|
</div>
|
|
</div>
|
|
<div class="rule-tags-container">
|
|
<span class="rule-tag" @click="markWireCount">芯数</span>
|
|
<span class="rule-tag" @click="markSection">截面</span>
|
|
<span class="rule-tag" @click="markWireGroup">线组数</span>
|
|
<span class="rule-tag" @click="markWirePair">线对数</span>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="rule-config-item">
|
|
<div class="rule-item-label"><span class="rule-syntax-link" @click="showDYDJDialog">电压等级</span></div>
|
|
<div class="rule-input-container">
|
|
<div class="rule-input rule-input-with-arrow">
|
|
<span>{{ voltageValue }}</span>
|
|
<i class="el-icon-arrow-down rule-input-arrow"></i>
|
|
</div>
|
|
<div class="rule-input rule-input-with-arrow">
|
|
<span class="rule-highlight">{{ voltageActualValue }}</span>
|
|
</div>
|
|
</div>
|
|
<div class="rule-tags-container">
|
|
<span class="rule-tag" @click="markVoltagePhase">相电压</span>
|
|
<span class="rule-tag" @click="markVoltageLine">线电压</span>
|
|
<span class="rule-tag" @click="markVoltageUnit">电压单位</span>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="rule-config-item">
|
|
<div class="rule-item-label"><span class="rule-syntax-link" @click="showXlBZDialog">线缆标准</span></div>
|
|
<div class="rule-input-container">
|
|
<div class="rule-input rule-input-with-arrow">
|
|
<span>{{ standardValue }}</span>
|
|
<i class="el-icon-arrow-down rule-input-arrow"></i>
|
|
</div>
|
|
<div class="rule-input rule-input-with-arrow">
|
|
<span class="rule-highlight">{{ standardActualValue }}</span>
|
|
</div>
|
|
</div>
|
|
<div class="rule-tags-container">
|
|
<span class="rule-tag" @click="markStandardName">标准名</span>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<template #footer>
|
|
<div class="dialog-footer">
|
|
<el-button
|
|
type="danger"
|
|
size="small"
|
|
@click="closeRuleDialog"
|
|
plain
|
|
icon="close">
|
|
取 消
|
|
</el-button>
|
|
<el-button
|
|
type="primary"
|
|
size="small"
|
|
plain
|
|
@click="saveRuleConfig('N')"
|
|
:disabled="isLoading"
|
|
icon="check">
|
|
保 存
|
|
</el-button>
|
|
<el-button
|
|
type="primary"
|
|
size="small"
|
|
plain
|
|
@click="saveRuleConfig('Y')"
|
|
:disabled="isLoading"
|
|
icon="check">
|
|
保存为通用解析规则
|
|
</el-button>
|
|
</div>
|
|
</template>
|
|
</el-dialog>
|
|
<!-- todo 线缆型号语法dialog改造-->
|
|
<el-dialog
|
|
v-model="YFGZDialogVisible"
|
|
width="950px"
|
|
align-center="false"
|
|
:close-on-click-modal="false"
|
|
>
|
|
<iframe
|
|
:src="iframeUrl"
|
|
frameborder="0"
|
|
style="width: 920px; height: 590px"
|
|
></iframe>
|
|
</el-dialog>
|
|
|
|
<!-- todo end -->
|
|
<!-- Excel导入对话框 -->
|
|
<el-dialog
|
|
v-model="importDialogVisible"
|
|
width="800px"
|
|
custom-class="import-dialog"
|
|
:close-on-click-modal="false"
|
|
:show-close="false">
|
|
|
|
<template #header>
|
|
<div class="import-header">
|
|
<i class="el-icon-document-add"></i>
|
|
Excel数据导入
|
|
</div>
|
|
</template>
|
|
|
|
<div class="import-content">
|
|
<!-- 文件上传区域 -->
|
|
<div class="upload-section" @click="triggerFileInput" style="cursor: pointer;">
|
|
<input
|
|
type="file"
|
|
ref="fileInput"
|
|
style="display: none"
|
|
accept=".xlsx, .xls"
|
|
@change="handleFileChange">
|
|
|
|
<div class="upload-icon">
|
|
<i class="el-icon-upload"></i>
|
|
</div>
|
|
|
|
<div class="upload-text">
|
|
<div>点击或将Excel文件拖拽到此区域</div>
|
|
<div style="font-size: 14px; margin-top: 5px; color: #909399;">支持扩展名: .xlsx, .xls</div>
|
|
</div>
|
|
|
|
<div class="file-info" v-if="excelFile">
|
|
<div class="file-name">{{ excelFile.name }}</div>
|
|
<div class="file-size">{{ formatFileSize(excelFile.size) }}</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 列映射区域 -->
|
|
<div class="mapping-section" v-if="excelColumns.length > 0">
|
|
<div class="mapping-title">
|
|
<i class="el-icon-set-up"></i>列映射配置 (将Excel列与系统字段对应)
|
|
</div>
|
|
<div class="mapping-grid">
|
|
<template v-for="(col, index) in tableColumns" :key="index">
|
|
<div class="system-column">{{ col }}</div>
|
|
<div class="mapping-arrow">→</div>
|
|
<el-select
|
|
v-model="columnMapping[col]"
|
|
clearable
|
|
placeholder="请选择Excel列"
|
|
class="column-select"
|
|
size="small">
|
|
<el-option
|
|
v-for="(excelCol, idx) in excelColumns"
|
|
:key="idx"
|
|
:label="excelCol"
|
|
:value="excelCol">
|
|
</el-option>
|
|
</el-select>
|
|
</template>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 预览区域 -->
|
|
<div class="preview-section" v-if="previewData.length > 0">
|
|
<div class="mapping-title">
|
|
<i class="el-icon-view"></i>数据预览 (前10行)
|
|
</div>
|
|
<div class="preview-table">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th v-for="(col, index) in excelColumns" :key="index">{{ col }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr v-for="(row, rowIndex) in previewData" :key="rowIndex">
|
|
<td v-for="(col, colIndex) in excelColumns" :key="colIndex">
|
|
{{ row[col] || '-' }}
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 进度条 -->
|
|
<div class="import-progress" v-if="importing">
|
|
<el-progress
|
|
:percentage="importProgress"
|
|
:stroke-width="18"
|
|
:status="importStatus"
|
|
text-inside>
|
|
</el-progress>
|
|
<div style="text-align: center; margin-top: 10px; color: #606266;">
|
|
处理中: 已导入 {{ importedCount }} / {{ totalRows }} 条记录
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 消息区域 -->
|
|
<div class="success-message" v-if="successMessage">
|
|
<i class="el-icon-success" style="margin-right: 5px;"></i> {{ successMessage }}
|
|
</div>
|
|
|
|
<div class="error-message" v-if="errorMessage">
|
|
<i class="el-icon-error" style="margin-right: 5px;"></i> {{ errorMessage }}
|
|
</div>
|
|
</div>
|
|
|
|
<template #footer>
|
|
<div class="dialog-footer" style="display: flex; justify-content: space-between;">
|
|
<div>
|
|
<el-button
|
|
size="small"
|
|
@click="resetImport"
|
|
plain>
|
|
重置
|
|
</el-button>
|
|
</div>
|
|
<div>
|
|
<el-button
|
|
size="small"
|
|
@click="closeImportDialog"
|
|
plain>
|
|
取 消
|
|
</el-button>
|
|
<el-button
|
|
type="primary"
|
|
size="small"
|
|
:disabled="!canImport"
|
|
:loading="importing"
|
|
@click="startImport"
|
|
plain>
|
|
{{ importing ? '导入中...' : '开始导入' }}
|
|
</el-button>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</el-dialog>
|
|
|
|
<div v-if="showCenterProgress" class="progress-overlay">
|
|
<div class="progress-container">
|
|
<el-progress
|
|
type="circle"
|
|
:percentage="centerProgressPercentage"
|
|
:width="120"
|
|
:status="centerProgressStatus">
|
|
</el-progress>
|
|
<p class="progress-text">{{ centerProgressText }}</p>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<el-dialog
|
|
v-model="EXRuleDialogVisible"
|
|
width="500px"
|
|
custom-class="filter-dialog"
|
|
title="按已有规则解析"
|
|
:close-on-click-modal="false">
|
|
<template #title>
|
|
<div class="dialog-header">
|
|
<i class="el-icon-filter" style="margin-right:8px"></i>
|
|
按已有规则解析
|
|
</div>
|
|
</template>
|
|
|
|
<el-form label-position="top">
|
|
<el-form-item label="解析规则">
|
|
<el-select
|
|
v-model="ExRule"
|
|
clearable
|
|
placeholder="请选择解析规则">
|
|
<el-option
|
|
v-for="rule in ruleOptions"
|
|
:key="rule.value"
|
|
:label="rule.label"
|
|
:value="rule.value">
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form>
|
|
|
|
<template #footer>
|
|
<div class="dialog-footer">
|
|
<el-button
|
|
type="danger"
|
|
size="small"
|
|
@click="closeEXRuleDialog"
|
|
plain
|
|
icon="close">
|
|
取 消
|
|
</el-button>
|
|
<el-button
|
|
type="primary"
|
|
size="small"
|
|
plain
|
|
@click="applyRule"
|
|
icon="check">
|
|
应 用
|
|
</el-button>
|
|
</div>
|
|
</template>
|
|
</el-dialog>
|
|
<!-- 手动粘贴对话框 -->
|
|
<el-dialog
|
|
v-model="manualPasteDialogVisible"
|
|
title="手动粘贴数据"
|
|
width="800px"
|
|
:close-on-click-modal="false"
|
|
@close="pasteStep = 'input'">
|
|
|
|
<template #header>
|
|
<div style="display: flex; align-items: center;">
|
|
<el-icon style="margin-right: 8px;"><DocumentCopy /></el-icon>
|
|
<span>手动粘贴数据</span>
|
|
</div>
|
|
</template>
|
|
|
|
<div v-show="pasteStep === 'input'">
|
|
<div style="margin-bottom: 16px; color: #f56c6c;">
|
|
<el-icon><Warning /></el-icon>
|
|
<span style="margin-left: 8px;">当前为非HTTPS环境,请将数据粘贴到下方文本框</span>
|
|
</div>
|
|
|
|
<el-input
|
|
v-model="manualPasteText"
|
|
type="textarea"
|
|
:rows="10"
|
|
placeholder="请将Excel或表格数据粘贴到这里,支持制表符分隔的多列数据..."
|
|
resize="none"
|
|
></el-input>
|
|
</div>
|
|
|
|
<div v-show="pasteStep === 'mapping'" style="display: none;">
|
|
<div style="margin-bottom: 8px; color: #606266;">
|
|
检测到 {{ detectedColumnCount }} 列数据,请为每列选择对应的字段。"报价产品"为必填项。
|
|
</div>
|
|
|
|
<div style="margin-bottom: 16px;">
|
|
<div style="font-weight: bold; margin-bottom: 8px; color: #606266;">数据预览(前5行):</div>
|
|
<el-table :data="detectedPreviewRows" border size="small" max-height="200">
|
|
<el-table-column prop="rowIndex" label="行号" width="60" align="center" />
|
|
<el-table-column
|
|
v-for="n in visibleColumns"
|
|
:key="n"
|
|
:label="'列' + n"
|
|
min-width="100">
|
|
<template #default="scope">
|
|
{{ scope.row['col' + (n - 1)] }}
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
|
|
<div>
|
|
<div style="font-weight: bold; margin-bottom: 8px; color: #606266;">列映射设置:</div>
|
|
<el-row :gutter="15">
|
|
<el-col :span="8" v-for="n in visibleColumns" :key="n" style="margin-bottom: 10px;">
|
|
<div style="display: flex; align-items: center;">
|
|
<span style="width: 50px; font-size: 13px; color: #409eff; font-weight: bold;">列 {{ n }}</span>
|
|
<el-select
|
|
v-model="columnFieldMapping[n]"
|
|
placeholder="选择字段"
|
|
style="flex: 1;"
|
|
size="small">
|
|
<el-option
|
|
v-for="option in pasteFieldOptions"
|
|
:key="option.value"
|
|
:label="option.label"
|
|
:value="option.value">
|
|
</el-option>
|
|
</el-select>
|
|
</div>
|
|
</el-col>
|
|
</el-row>
|
|
</div>
|
|
</div>
|
|
|
|
<template #footer>
|
|
<div class="dialog-footer">
|
|
<el-button
|
|
@click="handleManualPasteCancel"
|
|
plain>
|
|
取 消
|
|
</el-button>
|
|
<el-button
|
|
v-if="pasteStep === 'input'"
|
|
type="primary"
|
|
@click="handleManualPasteConfirm"
|
|
:disabled="!manualPasteText.trim()"
|
|
plain>
|
|
下一步:设置列映射
|
|
</el-button>
|
|
<template v-if="pasteStep === 'mapping'">
|
|
<el-button
|
|
@click="handleMappingBack"
|
|
plain>
|
|
上一步
|
|
</el-button>
|
|
<el-button
|
|
type="primary"
|
|
@click="handleMappingConfirm"
|
|
plain>
|
|
确 定 导 入
|
|
</el-button>
|
|
</template>
|
|
</div>
|
|
</template>
|
|
</el-dialog>
|
|
|
|
<!-- 批量调整对话框 -->
|
|
<el-dialog
|
|
v-model="batchUpdateDialogVisible"
|
|
width="500px"
|
|
:title="batchUpdateTitle"
|
|
:close-on-click-modal="false">
|
|
|
|
<template #header>
|
|
<div class="dialog-header">
|
|
<i class="el-icon-edit" style="margin-right:8px"></i>
|
|
{{ batchUpdateTitle }}
|
|
</div>
|
|
</template>
|
|
|
|
<el-form label-position="top">
|
|
<!-- 标准/电压:保持原下拉选择(与改版前一致) -->
|
|
<el-form-item
|
|
v-if="batchUpdateType === 'standard' || batchUpdateType === 'voltage'"
|
|
:label="batchUpdateType === 'standard' ? '线缆标准' : '电压等级'">
|
|
<el-select
|
|
v-model="batchUpdateValue"
|
|
:placeholder="batchUpdateType === 'standard' ? '请输入或选择线缆标准' : '请输入或选择电压等级'"
|
|
filterable
|
|
:filter-method="filterBatchUpdateOptions"
|
|
default-first-option
|
|
clearable
|
|
style="width: 100%;">
|
|
<el-option
|
|
v-for="option in batchUpdateFilteredOptions"
|
|
:key="option.value"
|
|
:label="option.label"
|
|
:value="option.value">
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<!-- 型号/规格:文本输入 -->
|
|
<el-form-item
|
|
v-else-if="batchUpdateType === 'model' || batchUpdateType === 'spec'"
|
|
:label="batchUpdateType === 'model' ? '线缆型号' : '线缆规格'">
|
|
<el-input
|
|
v-model="batchUpdateValue"
|
|
:placeholder="batchUpdateType === 'model' ? '请输入线缆型号' : '请输入线缆规格'"
|
|
clearable
|
|
style="width: 100%;" />
|
|
</el-form-item>
|
|
|
|
<el-form-item label="选中的记录数量">
|
|
<div style="color: #606266; font-size: 14px;">
|
|
已选中 {{ selectedRowsCount }} 条记录
|
|
</div>
|
|
</el-form-item>
|
|
</el-form>
|
|
|
|
<template #footer>
|
|
<div class="dialog-footer">
|
|
<el-button
|
|
type="danger"
|
|
size="small"
|
|
@click="closeBatchUpdateDialog"
|
|
plain>
|
|
取 消
|
|
</el-button>
|
|
<el-button
|
|
type="primary"
|
|
size="small"
|
|
@click="confirmBatchUpdate"
|
|
:disabled="!batchUpdateValue.trim()"
|
|
plain>
|
|
确 定
|
|
</el-button>
|
|
</div>
|
|
</template>
|
|
</el-dialog>
|
|
</el-container>
|
|
</div>
|
|
</form>
|
|
|
|
<script src='images/BJCPJXDR.js?ver=<%=GThinking.N_MISPROAS.Web.ResFile.GetVer("Q_YCGL8") %>&mod=20260527_batchfilter'></script>
|
|
</html>
|