Browse Source

自定义报表

master
Rui_Li 4 years ago
parent
commit
4d2a508173
  1. 4
      src/api/report/com_edit_customer_report_search_column.js
  2. 4
      src/api/report/report_manage.js
  3. 30
      src/views/modules/report/com_edit_customer_report_search_column.vue
  4. 8
      src/views/modules/report/report_manage.vue

4
src/api/report/com_edit_customer_report_search_column.js

@ -12,3 +12,7 @@ export const autoProcessSearchColumn = data => createAPI('report/autoProcessSear
// 保存定制的报表功能
export const saveCustomerSearchColumns = data => createAPI('report/saveCustomerSearchColumns', 'POST', data)
// 删除定制报表的查询列参数
export const deleteCustomerReportSearchColumn = data => createAPI('report/deleteCustomerReportSearchColumn', 'POST', data)

4
src/api/report/report_manage.js

@ -5,3 +5,7 @@ export const getReportTypeList = data => createAPI('report/getReportTypeList', '
// 获取派工单的最新信息
export const getCurrentPageTables = data => createAPI('report/getCustomerReportList', 'POST', data)
// 删除定制的报表信息
export const deleteCustomerReport = data => createAPI('report/deleteCustomerReport', 'POST', data)

30
src/views/modules/report/com_edit_customer_report_search_column.vue

@ -42,7 +42,7 @@
width="115"
:label="'操作'">
<template slot-scope="scope">
<a class="customer-a" @click="warnReopenSfdcRollsConfirm(scope.row)">删除</a>
<a class="customer-a" @click="warnDeleteCustomerReportSearchColumnConfirm(scope.row)">删除</a>
</template>
</el-table-column>
<el-table-column
@ -89,6 +89,7 @@ import {
getReportTypeList,
autoProcessSearchColumn,
saveCustomerSearchColumns,
deleteCustomerReportSearchColumn,
} from '@/api/report/com_edit_customer_report_search_column.js';
export default {
name: "com_finish_roll",
@ -306,6 +307,33 @@ export default {
});
},
/*提醒是否删除的提示*/
warnDeleteCustomerReportSearchColumnConfirm(currentSearchColumn) {
this.$confirm('确实要删除报表'+currentSearchColumn.columnField+'吗?', '提示', {
confirmButtonText: '确认',
celButtonText: '取消',
type: 'warning'
}).then(() => {
//
this.deleteCustomerReportSearchColumnOperation(currentSearchColumn);
});
},
/*执行删除定制报表的查询列功能*/
deleteCustomerReportSearchColumnOperation(currentSearchColumn) {
//
deleteCustomerReportSearchColumn(currentSearchColumn).then(({data}) => {
//
if (data.code === 200) {
this.$message.success(data.msg);
//
this.refreshSearchColumnTable();
} else {
this.$message.error(data.msg);
}
});
},
},
created() {
//

8
src/views/modules/report/report_manage.vue

@ -45,7 +45,7 @@
:label="'操作'">
<template slot-scope="scope">
<a class="customer-a" @click="editCustomerReportModal(scope.row)">编辑</a>
<a class="customer-a" @click="warnReopenSfdcRollsConfirm(scope.row)">删除</a>
<a class="customer-a" @click="warnDeleteCustomerReportConfirm(scope.row)">删除</a>
<a class="customer-a" @click="editCustomerReportSearchColumnModal(scope.row)">列维护</a>
<a class="customer-a" @click="showCustomerReportSearchColumnModal(scope.row)">报表查询</a>
</template>
@ -301,11 +301,11 @@ export default {
deleteCustomerReport(currentCustomerReport).then(({data}) => {
//
if (data.code === 200) {
this.$message.error(data.msg);
} else {
this.$message.success(data.msg);
//
this.refreshPageData();
this.refreshPageTables();
} else {
this.$message.error(data.msg);
}
});
},

Loading…
Cancel
Save