| | |
| | | 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",//表格加边框 |
| | |
| | | } |
| | | }) |
| | | const basicProp = ref({ |
| | | pageSize : 100,//页面显示数量 |
| | | pageSize : 10000,//页面显示数量 |
| | | pageNum:1,//当前页 |
| | | selectDate:['',''],//查询的日期 |
| | | pageTotal : 0,//总页数 |
| | |
| | | gridOptions.columns = props.childrenData.columns |
| | | getReportData() |
| | | addListener(xGrid.value,gridOptions) |
| | | |
| | | |
| | | }) |
| | | function filterChanged(column){ |
| | | //gridOptions.loading=true |
| | |
| | | } |
| | | |
| | | 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 |
| | | } |
| | | }) |
| | | } |
| | |
| | | </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="$t('basicData.startDate')" |
| | | :end-placeholder="$t('basicData.endDate')" |
| | |
| | | type="primary" |
| | | style="margin-top: -5px" |
| | | :icon="Search">{{$t('basicData.search')}}</el-button> |
| | | <div class="order-detail"> |
| | | </div> |
| | | <div class="main-table"> |
| | | <vxe-grid |
| | | @filter-change="filterChanged" |
| | | height="110%" |
| | | height="100%" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | |
| | | <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> |
| | |
| | | <vxe-button style="margin-right: 0.5rem" |
| | | @click="exportExcel(props.childrenData.exportUrl, |
| | | props.childrenData.exportName, |
| | | basicProp.selectDate)"> |
| | | orderInfo.reportFormDate)"> |
| | | {{$t('basicData.export')}}</vxe-button> |
| | | </template> |
| | | |
| | |
| | | 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 { |