|
@@ -15,6 +15,7 @@
|
|
|
|
|
|
|
|
<el-container>
|
|
<el-container>
|
|
|
<el-main>
|
|
<el-main>
|
|
|
|
|
+
|
|
|
<div class="gva-table-box">
|
|
<div class="gva-table-box">
|
|
|
<!-- 按钮区域 -->
|
|
<!-- 按钮区域 -->
|
|
|
<el-form>
|
|
<el-form>
|
|
@@ -27,13 +28,17 @@
|
|
|
<el-button type="primary" icon="edit" @click="gdlcdcxconlick" class="bt" title="流程单查询">流程单查询</el-button>
|
|
<el-button type="primary" icon="edit" @click="gdlcdcxconlick" class="bt" title="流程单查询">流程单查询</el-button>
|
|
|
<el-button type="primary" icon="edit" @click="scpconClick" class="bt" title="工单生产批次信息查询">工单生产批次信息查询</el-button>
|
|
<el-button type="primary" icon="edit" @click="scpconClick" class="bt" title="工单生产批次信息查询">工单生产批次信息查询</el-button>
|
|
|
<el-button type="primary" icon="delete" class="bt" @click="handleDelete">删除</el-button>
|
|
<el-button type="primary" icon="delete" class="bt" @click="handleDelete">删除</el-button>
|
|
|
|
|
+ <div style="margin-left: auto;">
|
|
|
|
|
+ <el-button type="primary" class="bt" icon="Download" @click="exportExcel">导出到Excel</el-button>
|
|
|
|
|
+ </div>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
|
|
+
|
|
|
<!-- 数据展示 -->
|
|
<!-- 数据展示 -->
|
|
|
<el-table ref="table" style="width: 100%;height: 62vh;" :data="tableData" row-key="ID"
|
|
<el-table ref="table" style="width: 100%;height: 62vh;" :data="tableData" row-key="ID"
|
|
|
@row-click="handleSelectChange"
|
|
@row-click="handleSelectChange"
|
|
|
highlight-current-row="true"
|
|
highlight-current-row="true"
|
|
|
- border
|
|
|
|
|
|
|
+ border id="table"
|
|
|
:row-style="{ height: '20px' }" :header-cell-style="{ padding: '0px' }"
|
|
:row-style="{ height: '20px' }" :header-cell-style="{ padding: '0px' }"
|
|
|
:cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
|
|
:cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
|
|
|
:show-overflow-tooltip="true"
|
|
:show-overflow-tooltip="true"
|
|
@@ -460,6 +465,8 @@
|
|
|
<script setup>
|
|
<script setup>
|
|
|
// 全量引入格式化工具 请按需保留
|
|
// 全量引入格式化工具 请按需保留
|
|
|
import {createCompany,deleteCompany,deleteCompanyByIds,updateCompany,findCompany,getCompanyList} from '@/api/company'
|
|
import {createCompany,deleteCompany,deleteCompanyByIds,updateCompany,findCompany,getCompanyList} from '@/api/company'
|
|
|
|
|
+ import * as XLSX from 'xlsx'
|
|
|
|
|
+ import FileSaver from 'file-saver'
|
|
|
import {ElMessage,ElMessageBox,} from 'element-plus'
|
|
import {ElMessage,ElMessageBox,} from 'element-plus'
|
|
|
import {Search,Refresh,Download} from '@element-plus/icons-vue'
|
|
import {Search,Refresh,Download} from '@element-plus/icons-vue'
|
|
|
import {ref,reactive,nextTick} from 'vue'
|
|
import {ref,reactive,nextTick} from 'vue'
|
|
@@ -772,13 +779,13 @@ const Enterkeysearch = (event) => {
|
|
|
const _StaGetOrderList = async (node) => {
|
|
const _StaGetOrderList = async (node) => {
|
|
|
const StaGetOrderListdata = await StaGetOrderList({search:searchInfolcd.value});
|
|
const StaGetOrderListdata = await StaGetOrderList({search:searchInfolcd.value});
|
|
|
console.log(StaGetOrderListdata)
|
|
console.log(StaGetOrderListdata)
|
|
|
- if (StaGetOrderListdata.data === null) {
|
|
|
|
|
- ElMessage({
|
|
|
|
|
- type: 'warning',
|
|
|
|
|
- message: '未搜索具体查询条件',
|
|
|
|
|
- customClass: 'custom-message', // 添加自定义类名
|
|
|
|
|
- duration: 3000 // 可选:设置消息显示的持续时间(单位:毫秒)
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ if (StaGetOrderListdata.data === null) {
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: 'warning',
|
|
|
|
|
+ message: '未搜索具体查询条件',
|
|
|
|
|
+ customClass: 'custom-message', // 添加自定义类名
|
|
|
|
|
+ duration: 3000 // 可选:设置消息显示的持续时间(单位:毫秒)
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
tableDatalcd.splice(0,tableDatalcd.length,...StaGetOrderListdata.data);//表格数据
|
|
tableDatalcd.splice(0,tableDatalcd.length,...StaGetOrderListdata.data);//表格数据
|
|
|
};
|
|
};
|
|
@@ -800,22 +807,22 @@ const _GetorderDetail = ref(null)
|
|
|
*/
|
|
*/
|
|
|
const popdialog = ref(false);
|
|
const popdialog = ref(false);
|
|
|
const currentRows = ref('');
|
|
const currentRows = ref('');
|
|
|
-// 获取当前行数据
|
|
|
|
|
-const tableRowClicklcd = (row) => {
|
|
|
|
|
- currentRows.value = row; // 保存当前选中行
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
-// 按钮点击逻辑
|
|
|
|
|
|
|
+// 获取当前行数据
|
|
|
|
|
+const tableRowClicklcd = (row) => {
|
|
|
|
|
+ currentRows.value = row; // 保存当前选中行
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+// 按钮点击逻辑
|
|
|
const onstatsuclick = async () => {
|
|
const onstatsuclick = async () => {
|
|
|
- console.log(currentRows)
|
|
|
|
|
- if (!currentRows.value) {
|
|
|
|
|
- ElMessage({
|
|
|
|
|
- type: "warning",
|
|
|
|
|
- message: "请先点击选择一行数据",
|
|
|
|
|
- });
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- await updateCompanyFunclcd(currentRows.value);
|
|
|
|
|
|
|
+ console.log(currentRows)
|
|
|
|
|
+ if (!currentRows.value) {
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: "warning",
|
|
|
|
|
+ message: "请先点击选择一行数据",
|
|
|
|
|
+ });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ await updateCompanyFunclcd(currentRows.value);
|
|
|
};
|
|
};
|
|
|
//双击
|
|
//双击
|
|
|
const updateCompanyFunclcd = async (row) => {
|
|
const updateCompanyFunclcd = async (row) => {
|
|
@@ -1402,10 +1409,7 @@ const ontuicclicks = async () => {
|
|
|
dialogFormVisible.value = false
|
|
dialogFormVisible.value = false
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // 导出excel
|
|
|
|
|
- function exportExcel() {
|
|
|
|
|
- console.log('导出到excel')
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
const dialogMrhjtj = ref(false)
|
|
const dialogMrhjtj = ref(false)
|
|
|
const dialogGdzjfptj = ref(false)
|
|
const dialogGdzjfptj = ref(false)
|
|
@@ -2138,6 +2142,22 @@ const handleDelete = () => {
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+// 导出
|
|
|
|
|
+const exportExcel = ()=>{
|
|
|
|
|
+ const el = document.getElementById('table');
|
|
|
|
|
+ // 文件名
|
|
|
|
|
+ const filename = '导出核验单EXCEL.xlsx';
|
|
|
|
|
+ const wb = XLSX.utils.table_to_book(el, { raw: true });
|
|
|
|
|
+ const wbout = XLSX.write(wb, { bookType: 'xlsx', bookSST: true, type: 'array' });
|
|
|
|
|
+ try {
|
|
|
|
|
+ FileSaver.saveAs(new Blob([wbout], { type: 'application/octet-stream' }), filename);
|
|
|
|
|
+ } catch (e) {
|
|
|
|
|
+ console.log(e);
|
|
|
|
|
+ }
|
|
|
|
|
+ return wbout;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
<style>
|
|
@@ -2229,4 +2249,43 @@ const handleDelete = () => {
|
|
|
font-size: 20px;
|
|
font-size: 20px;
|
|
|
border-color: #f5c6cb;
|
|
border-color: #f5c6cb;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+/* 保证水平滚动条一直显示 */
|
|
|
|
|
+:deep(.el-scrollbar__wrap) {
|
|
|
|
|
+ overflow-x: scroll; /* 确保水平滚动条始终显示 */
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/* 水平滚动条的样式 */
|
|
|
|
|
+:deep(.el-scrollbar__bar.is-horizontal) {
|
|
|
|
|
+ height: 8px; /* 设置滚动条的高度,更细 */
|
|
|
|
|
+ background-color: transparent; /* 背景透明 */
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/* 水平滚动条滑块的样式 */
|
|
|
|
|
+:deep(.el-scrollbar__thumb.is-horizontal) {
|
|
|
|
|
+ background-color: rgba(0, 0, 0, 0.8); /* 滑块颜色,浅灰色 */
|
|
|
|
|
+ border-radius: 2px; /* 圆角效果 */
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/* 保证垂直滚动条也始终显示 */
|
|
|
|
|
+:deep(.el-scrollbar__wrap) {
|
|
|
|
|
+ overflow-y: scroll; /* 确保垂直滚动条始终显示 */
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/* 垂直滚动条的样式 */
|
|
|
|
|
+:deep(.el-scrollbar__bar.is-vertical) {
|
|
|
|
|
+ width: 8px; /* 设置滚动条的宽度,更细 */
|
|
|
|
|
+ background-color: transparent; /* 背景透明 */
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/* 垂直滚动条滑块的样式 */
|
|
|
|
|
+:deep(.el-scrollbar__thumb.is-vertical) {
|
|
|
|
|
+ background-color: rgba(0, 0, 0, 0.8); /* 滑块颜色,浅灰色 */
|
|
|
|
|
+ border-radius: 2px; /* 圆角效果 */
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/* 鼠标悬停时滚动条滑块的样式 */
|
|
|
|
|
+:deep(.el-scrollbar__thumb:hover) {
|
|
|
|
|
+ background-color: rgba(0, 0, 0, 1); /* 鼠标悬停时滑块颜色稍深 */
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|