修改bug

This commit is contained in:
‘937886381’
2024-01-24 17:16:05 +08:00
parent 3bc12b8830
commit c47dddfcdc
14 changed files with 1458 additions and 38 deletions

View File

@@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-12-12 13:45:25
* @LastEditTime: 2023-12-14 14:56:45
* @LastEditTime: 2024-01-24 15:59:21
* @LastEditors: zhp
* @Description:
-->
@@ -17,10 +17,15 @@
</el-date-picker>
</el-form-item>
<el-button type="primary" @click="getDataList()">查询</el-button>
<el-button type="primary" icon="el-icon-edit-outline" @click="editDataList()">编辑</el-button>
<el-button v-if="isSave" type="success" @click="saveDataList()">保存</el-button>
<el-button v-if="this.$auth.hasPermi('report:glass-month:export')" type="primary" size="small" plain
@click="handleExport">导出</el-button>
<!-- <el-button type="primary" icon="el-icon-edit-outline" @click="editDataList()">编辑</el-button>
<el-button v-if="isSave" type="success" @click="saveDataList()">保存</el-button> -->
</el-form>
<el-row style="float: right; margin-bottom: 5px">
<el-button size="small" @click="editDataList()">编辑</el-button>
<el-button size="small" v-if="isSave" @click="saveDataList()">保存</el-button>
</el-row>
<el-table :data="list" style="width: 100%" :header-cell-style="{
background: '#F2F4F9',
color: '#606266'
@@ -147,7 +152,8 @@
import {
getProductionDataList,
updateProductionDataList,
updateSumProductionDataList
updateSumProductionDataList,
exportProductExcel
} from '@/api/report/production';
// import Editor from '@/components/Editor';
import moment from 'moment';
@@ -250,6 +256,9 @@ export default {
data() {
return {
list: [],
urlOptions: {
exportURL: exportProductExcel
},
remark: '',
timeTips:'',
yearValue1: null,//最多10年
@@ -357,6 +366,19 @@ export default {
this.getDataList()
},
methods: {
handleExport() {
// 处理查询参数
let params = { ...this.dataForm };
params.pageNo = undefined;
params.pageSize = undefined;
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
this.exportLoading = true;
return this.urlOptions.exportURL(params);
}).then(response => {
this.$download.excel(response, '成品生产月报.xls');
this.exportLoading = false;
}).catch(() => { });
},
startYear() {
if (this.yearValue2 && this.yearValue2 < this.yearValue1) {
this.$modal.msgError('开始时间不能晚于结束时间,请重新选择')