From 7a0527e207c59cdcce0b1f7a41bd7457a236ab23 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期三, 26 三月 2025 10:25:52 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/ERP_override
---
north-glass-erp/northglass-erp/src/components/BasicTable.vue | 49 +++++++++++++++++++++++++++++--------------------
1 files changed, 29 insertions(+), 20 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/components/BasicTable.vue b/north-glass-erp/northglass-erp/src/components/BasicTable.vue
index 7ceaba3..1744a32 100644
--- a/north-glass-erp/northglass-erp/src/components/BasicTable.vue
+++ b/north-glass-erp/northglass-erp/src/components/BasicTable.vue
@@ -9,10 +9,12 @@
import {ElMessage} from "element-plus";
import * as XLSX from "xlsx";
import {useI18n} from "vue-i18n";
+import useOrderInfoStore from "@/stores/sd/order/orderInfo";
const { t } = useI18n()
const xGrid = ref()
let filterData = ref({})
+const orderInfo = useOrderInfoStore()
const gridOptions = reactive({
loading:true,
border: "full",//琛ㄦ牸鍔犺竟妗�
@@ -25,7 +27,8 @@
printConfig: {},
importConfig: {},
exportConfig: {},
- scrollY:{ enabled: true },//寮�鍚櫄鎷熸粴鍔�
+ scrollY:{ enabled: true,gt:0 },//寮�鍚櫄鎷熸粴鍔�
+ scrollX:{ enabled: true,gt:5 },//寮�鍚櫄鎷熸粴鍔�
showOverflow:true,
columnConfig: {
resizable: true,
@@ -47,7 +50,7 @@
options: [
[
- { code: 'exportExcelChecked', name: '瀵煎嚭閫変腑', prefixIcon: 'vxe-icon-download', visible: true }
+ { code: 'exportExcelChecked', name: t('components.exportSelected'), prefixIcon: 'vxe-icon-download', visible: true }
]
]
}
@@ -72,7 +75,7 @@
return[
columns.map((column, columnIndex) => {
if (columnIndex === 0) {
- return '鍚堣:'
+ return t('basicData.total')
}
if (props.childrenData.footList.includes(column.field)) {
return sumNum(data, column.field)
@@ -112,7 +115,7 @@
}
})
const basicProp = ref({
- pageSize : 100,//椤甸潰鏄剧ず鏁伴噺
+ pageSize : 10000,//椤甸潰鏄剧ず鏁伴噺
pageNum:1,//褰撳墠椤�
selectDate:['',''],//鏌ヨ鐨勬棩鏈�
pageTotal : 0,//鎬婚〉鏁�
@@ -171,12 +174,12 @@
}
const getReportData = () => {
- request.post(`${props.childrenData.url}/${basicProp.value.pageNum}/${basicProp.value.pageSize}/${basicProp.value.selectDate}`,filterData.value).then(res => {
+ request.post(`${props.childrenData.url}/${basicProp.value.pageNum}/${basicProp.value.pageSize}/${orderInfo.reportFormDate}`,filterData.value).then(res => {
if(res.code === '200'){
props.childrenData.data = res.data.data
basicProp.value.pageTotal = res.data.total.pageTotal
basicProp.value.dataTotal = res.data.total.total
- basicProp.value.selectDate = res.data.selectDate
+ orderInfo.reportFormDate = res.data.selectDate
}
})
}
@@ -187,12 +190,13 @@
</script>
<template>
- <div class="main-div">
+ <div style="width: 100%;height: 100%">
+ <div class="head">
<el-date-picker
- v-model="basicProp.selectDate"
+ v-model="orderInfo.reportFormDate"
type="daterange"
- start-placeholder="寮�濮嬫椂闂�"
- end-placeholder="缁撴潫鏃堕棿"
+ :start-placeholder="$t('basicData.startDate')"
+ :end-placeholder="$t('basicData.endDate')"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
/>
@@ -201,11 +205,12 @@
id="searchButton"
type="primary"
style="margin-top: -5px"
- :icon="Search">鏌ヨ</el-button>
- <div class="order-detail">
+ :icon="Search">{{$t('basicData.search')}}</el-button>
+ </div>
+ <div class="main-table">
<vxe-grid
@filter-change="filterChanged"
- height="110%"
+ height="100%"
class="mytable-scrollbar"
ref="xGrid"
v-bind="gridOptions"
@@ -224,7 +229,10 @@
<template #num1_filter="{ column, $panel }">
<div>
<div v-for="(option, index) in column.filters" :key="index">
- <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/>
+ <input type="type"
+ v-model="option.data"
+ @keyup.enter.native="$panel.confirmFilter()"
+ @input="changeFilterEvent($event, option, $panel)"/>
</div>
</div>
</template>
@@ -233,8 +241,8 @@
<vxe-button style="margin-right: 0.5rem"
@click="exportExcel(props.childrenData.exportUrl,
props.childrenData.exportName,
- basicProp.selectDate)">
- 瀵煎嚭</vxe-button>
+ orderInfo.reportFormDate)">
+ {{$t('basicData.export')}}</vxe-button>
</template>
<template #pager>
@@ -270,13 +278,14 @@
border: none !important;
background-color: transparent;
}
-.order-primary{
+.head{
width: 100%;
+ height: 35px;
}
-.order-detail{
- width: 100%;
- height: calc(100% - 30px);
+.main-table{
+ width: 100%;
+ height: calc(100% - 35px);
}
.vxe-grid {
--
Gitblit v1.8.0