Browse Source

自定义报表

master
Rui_Li 4 years ago
parent
commit
20ed5cc397
  1. 7
      src/api/report/com_add_customer_report.js
  2. 14
      src/api/report/com_edit_customer_report_search_column.js
  3. 5
      src/api/report/com_run_customer_report.js
  4. 11
      src/api/report/com_show_customer_report_search_column.js
  5. 11
      src/api/report/com_update_customer_report.js
  6. 4
      src/api/report/report_manage.js
  7. 27
      src/assets/scss/global.scss
  8. 151
      src/views/modules/report/com_add_customer_report.vue
  9. 337
      src/views/modules/report/com_edit_customer_report_search_column.vue
  10. 126
      src/views/modules/report/com_run_customer_report.vue
  11. 239
      src/views/modules/report/com_show_customer_report_search_column.vue
  12. 152
      src/views/modules/report/com_update_customer_report.vue
  13. 797
      src/views/modules/report/report_manage.vue

7
src/api/report/com_add_customer_report.js

@ -0,0 +1,7 @@
import { createAPI } from '@/utils/httpRequest.js'
// 获取派工单的最新信息
export const getReportTypeList = data => createAPI('report/getReportTypeList', 'POST', data)
// 保存定制的报表功能
export const addCustomerReport = data => createAPI('report/addCustomerReport', 'POST', data)

14
src/api/report/com_edit_customer_report_search_column.js

@ -0,0 +1,14 @@
import { createAPI } from '@/utils/httpRequest.js'
// 获取查询列
export const getSearchColumns = data => createAPI('report/getSearchColumnsByReportId', 'POST', data)
// 获取派工单的最新信息
export const getReportTypeList = data => createAPI('report/getReportTypeList', 'POST', data)
// 自动处理sql的查询列
export const autoProcessSearchColumn = data => createAPI('report/autoProcessSearchColumn', 'POST', data)
// 保存定制的报表功能
export const saveCustomerSearchColumns = data => createAPI('report/saveCustomerSearchColumns', 'POST', data)

5
src/api/report/com_run_customer_report.js

@ -0,0 +1,5 @@
import { createAPI } from '@/utils/httpRequest.js'
// 获取派工单的最新信息
export const runCustomerReport = data => createAPI('report/runCustomerReport', 'POST', data)

11
src/api/report/com_show_customer_report_search_column.js

@ -0,0 +1,11 @@
import { createAPI } from '@/utils/httpRequest.js'
// 获取查询列
export const getSearchColumns = data => createAPI('report/getSearchColumnsByReportId', 'POST', data)
// 自动处理sql的查询列
export const autoProcessSearchColumn = data => createAPI('report/autoProcessSearchColumn', 'POST', data)
// 保存定制的报表功能
export const saveCustomerSearchColumns = data => createAPI('report/saveCustomerSearchColumns', 'POST', data)

11
src/api/report/com_update_customer_report.js

@ -0,0 +1,11 @@
import { createAPI } from '@/utils/httpRequest.js'
// 获取派工单的最新信息
export const getReportTypeList = data => createAPI('report/getReportTypeList', 'POST', data)
// 查询定制的报表功能
export const getCustomerReportByReportId = data => createAPI('report/getCustomerReportByReportId', 'POST', data)
// 保存定制的报表功能
export const saveCustomerReport = data => createAPI('report/saveCustomerReport', 'POST', data)

4
src/api/report/report_manage.js

@ -1,7 +1,7 @@
import { createAPI } from '@/utils/httpRequest.js'
// 获取派工单的最新信息
export const getReportTypeList = data => createAPI('scheduling/getReportTypeList', 'POST', data)
export const getReportTypeList = data => createAPI('report/getReportTypeList', 'POST', data)
// 获取派工单的最新信息
export const getCurrentPageTables = data => createAPI('scheduling/getCustomerReportList', 'POST', data)
export const getCurrentPageTables = data => createAPI('report/getCustomerReportList', 'POST', data)

27
src/assets/scss/global.scss

@ -338,10 +338,35 @@ input.el-input__inner{
/*全局 el-table 下 el-input的样式 LR 2022-01-12*/
.customer-number-cell .cell{
height: 25px !important;
height: 24px !important;
padding: 0px;
}
.customer-text-cell .cell{
height: 24px !important;
padding: 0px;
}
/*table中input 修改样式*/
div.table-number-input {
padding: 0px 0px;
height: 24px !important;
}
/*table中input*/
div.table-number-input input.el-input__inner{
padding: 0px 0px;
height: 24px !important;
text-align: right;
}
div.table-text-input input.el-input__inner{
padding: 0px 0px;
height: 24px !important;
text-align: center;
}
/*a标签全局无下划线 2022-01-18 LR*/
a:hover{
text-decoration: none;

151
src/views/modules/report/com_add_customer_report.vue

@ -0,0 +1,151 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners"
width="580px" style="height: 600px;" class="customer-dialog">
<el-form :inline="true" label-position="top" style="height: 320px;"
label-width="80px">
<!-- 信息 -->
<el-row>
<el-col :span="18">
<el-form-item :label="'报表名称:'" >
<el-input v-model="pageData.reportName" ref="reportName" style="width: 450px"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="'报表分类:'" style="margin-left: 60px;">
<el-select v-model="pageData.reportType" style="width: 80px">
<el-option
v-for="(item, index) in reportTypeList"
:key="index"
:label="item.baseData"
:value="item.baseData">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item :label="'备注:'" >
<el-input v-model="pageData.reportRemark" style="width: 560px"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24" >
<el-form-item :label="'SQL语句:'" >
<el-input type="textarea" class="customer-textarea" style="width: 560px;" ref="reportSql" v-model="pageData.reportSql" :rows="10" :cols="85"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer" style="margin-top: -20px;">
<el-button type="primary" @click="addCustomerReportBun">保存</el-button>
<el-button type="primary" @click="closeDialog">关闭</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
getReportTypeList,
addCustomerReport,
} from '@/api/report/com_add_customer_report.js'
export default {
name: "com_exception_reason",
data() {
return {
titleCon: '报表自定义-新增',
reportTypeList: [],
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
reportName: '',
reportRemark: '',
reportType: '',
reportSql: '',
},
}
},
methods: {
/*初始化页面参数*/
init() {
//
this.pageData.reportId = '';
this.pageData.reportName = '';
this.pageData.reportRemark = '';
this.pageData.reportSql = '';
//
this.$nextTick(() => {
this.$refs.reportName.focus();
});
},
/*关闭modal*/
closeDialog(){
this.$emit('update:visible', false);
//
this.$emit('refreshCurrentPage');
},
/*刷新报工的类型*/
refreshReportType(){
let requestData = {type: 'report_type', secondType: 'select'};
getReportTypeList(requestData).then(({data}) => {
this.reportTypeList = data.rows;
//ALL
this.pageData.reportType = data.rows[0].baseData;
})
},
/*添加异常原因的数据*/
addCustomerReportBun(){
// sql
let reportName = this.pageData.reportName.trim();
let reportSql = this.pageData.reportSql.trim();
if(null == reportName || '' === reportName){
this.$message.error('请输入报表的名称!')
return false;
}
if(null == reportSql || '' === reportSql){
this.$message.error('请输入报表的SQL语句!')
return false;
}
//
this.pageData.reportName = reportName;
this.pageData.reportSql = reportSql;
//
addCustomerReport(this.pageData).then(({data}) => {
//
if(data.code == 200){
this.$message.success(data.msg)
//dialog
this.closeDialog();
}else{
this.$message.error(data.msg);
}
});
},
editSearchColumnModal(){
//
this.closeDialog();
//
this.$emit('initExceptionReason', this.pageData.exceptionReason);
},
},
created() {
//
this.refreshReportType();
}
}
</script>
<style scoped lang="scss">
</style>

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

@ -0,0 +1,337 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners"
width="850px" style="height: 490px;" class="customer-dialog">
<el-form :inline="true" label-position="top" style="height: 320px;"
label-width="80px">
<!-- 菜单信息 -->
<el-row style="margin-top: -20px;">
<el-col :span="4">
<el-form-item class="customer-button">
<el-button @click="" type="primary" style="margin-left: 10px; margin-bottom: 5px;">
新增</el-button>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item class="customer-button">
<el-button @click="autoProcessSearchColumnBun" type="primary" style="margin-left: 10px; margin-bottom: 5px;">
自动获取</el-button>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item class="customer-button">
<el-button type="primary" @click="refreshPageData" style="margin-left: 10px; margin-bottom: 5px;">
刷新</el-button>
</el-form-item>
</el-col>
</el-row>
<!-- 主材料 -->
<el-form>
<fieldset class="customer-fieldset" style="width: 830px;">
<legend>查询列</legend>
<el-table height="240"
:cell-style="customerCellStyle" :cell-class-name="customerCellClassName"
:data="searchColumnList"
border
v-loading="dataListLoading"
style="width: 100%; margin-top: -5px;">
<el-table-column
fixed="left"
header-align="center"
align="center"
width="115"
:label="'操作'">
<template slot-scope="scope">
<a class="customer-a" @click="warnReopenSfdcRollsConfirm(scope.row)">删除</a>
</template>
</el-table-column>
<el-table-column
v-for="(item,index) in columnSearchColumnlArray" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed"
:width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<el-input type="number" class="table-number-input" v-if="item.columnAttr === 'number'"
v-model="scope.row[item.columnProp]"></el-input>
<el-input type="text" class="table-text-input" v-if="item.columnAttr === 'text'"
v-model="scope.row[item.columnProp]"></el-input>
<el-select v-model="scope.row[item.columnProp]" class="table-select-input" v-if="item.columnAttr === 'select'">
<el-option v-for="(item, index) in columnTypeList" :key="index" :label="item.columnType" :value="item.columnType">
</el-option>
</el-select>
<span v-else>{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
</fieldset>
</el-form>
</el-form>
<span slot="footer" class="dialog-footer" style="margin-top: 0px;">
<el-button type="primary" @click="saveCustomerReportSearchColumns">保存</el-button>
<el-button type="primary" @click="closeDialog">关闭</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
getSearchColumns,
getReportTypeList,
autoProcessSearchColumn,
saveCustomerSearchColumns,
} from '@/api/report/com_edit_customer_report_search_column.js';
export default {
name: "com_finish_roll",
data() {
return {
titleCon: '查询列维护',
reportTypeList: [],
columnTypeList:[
{columnType: '文本'},
{columnType: '数字'},
],
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
reportId: '',
},
searchColumnList: [],
columnSearchColumnlArray: [
{
userId: this.$store.state.user.name,
functionId: 5307,
serialNumber: '5307CustomerColumnField',
tableId: "5307Customer",
tableName: "查询列",
columnProp: "columnField",
headerAlign: "center",
align: "center",
columnLabel: "参数ID",
columnWidth: '',
columnHidden: false,
columnAttr: 'ori',
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5307,
serialNumber: '5307CustomerColumnName',
tableId: "5307Customer",
tableName: "查询列",
columnProp: "columnName",
headerAlign: "center",
align: "center",
columnLabel: "参数名称",
columnWidth: '',
columnHidden: false,
columnAttr: 'text',
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5307,
serialNumber: '5307CustomerColumnType',
tableId: "5307Customer",
tableName: "查询列",
columnProp: "columnType",
headerAlign: "center",
align: "center",
columnLabel: "参数类型",
columnWidth: '',
columnHidden: false,
columnAttr: 'select',
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5307,
serialNumber: '5307CustomerColumnDefaultValue',
tableId: "5307Customer",
tableName: "查询列",
columnProp: "columnDefaultValue",
headerAlign: "center",
align: "center",
columnLabel: "参数默认值",
columnWidth: '',
columnHidden: false,
columnAttr: 'text',
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5307,
serialNumber: '5307CustomerSortNo',
tableId: "5307Customer",
tableName: "查询列",
columnProp: "sortNo",
headerAlign: "center",
align: "center",
columnLabel: "显示顺序",
columnWidth: '',
columnHidden: false,
columnAttr: 'number',
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5307,
serialNumber: '5307CustomerColumnRemark',
tableId: "5307Customer",
tableName: "查询列",
columnProp: "columnRemark",
headerAlign: "center",
align: "right",
columnLabel: "备注",
columnWidth: '',
columnHidden: false,
columnAttr: 'text',
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
],
dataListLoading: false,
}
},
methods: {
/*初始化页面参数*/
init(reportId) {
//
this.pageData.reportId = reportId;
//
this.refreshPageData();
},
/*关闭modal*/
closeDialog(){
this.$emit('update:visible', false);
},
/*刷新当前的页面参数*/
refreshPageData(){
//
this.refreshSearchColumnTable();
},
/*刷新报工的类型*/
refreshReportType(){
let requestData = {'type': 'report_type', 'secondType': 'select'};
getReportTypeList(requestData).then(({data}) => {
this.reportTypeList = data.rows;
})
},
//
refreshSearchColumnTable(){
getSearchColumns(this.pageData).then(({data}) => {
this.searchColumnList = data.rows;
});
},
/*添加定制的css类*/
customerCellClassName({row, column, rowIndex, columnIndex}) {
if(column.property === 'sortNo'){
return 'customer-number-cell';
}else if(columnIndex >= 2 && column.property === 'reportType'){
return 'customer-select-cell';
}else if(columnIndex >= 2){
return 'customer-text-cell';
}
},
/*添加定制的cess样式*/
customerCellStyle({row, column, rowIndex, columnIndex}) {
if(columnIndex >= 2){
return 'padding: 0px 0px;';
}
},
/*自动获取列*/
autoProcessSearchColumnBun(){
autoProcessSearchColumn(this.pageData).then(({data}) => {
//
if(data.code == 200){
this.$message.success(data.msg);
//
this.refreshSearchColumnTable();
}else{
this.$message.error(data.msg);
}
});
},
/*保存已经修改好的参数数据*/
saveCustomerReportSearchColumns(){
//
let requestData = {searchColumnList: JSON.stringify(this.searchColumnList), pageData: JSON.stringify(this.pageData)};
saveCustomerSearchColumns(requestData).then(({data}) => {
//
if(data.code == 200){
this.closeDialog();
}else{
this.$message.error(data.msg);
}
});
},
},
created() {
//
this.refreshReportType();
}
}
</script>
<style scoped lang="scss">
/*调节页面button和input的上下间距*/
.customer-css .customer-button{
margin-top: 25px;
}
/*调节样式*/
.customer-item{
margin-top: -10px;
}
/*fieldset下table的样式*/
.customer-fieldset /deep/ .el-table__header th.is-leaf{
line-height: 16px;
}
/deep/ .customer-tab .el-tabs__content{
padding: 0px !important;
}
</style>

126
src/views/modules/report/com_run_customer_report.vue

@ -0,0 +1,126 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners"
width="1200px" style="height: 590px;" class="customer-dialog">
<el-form :inline="true" label-position="top" style="height: 360px;"
label-width="80px">
<!-- 定制报表查询 -->
<el-form>
<el-table height="340"
:data="customerReportList"
border
v-loading="dataListLoading"
style="width: 100%; margin-top: 0px;">
<el-table-column
v-for="(item,index) in customerColumnlArray" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed"
:width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<el-input type="number" class="table-number-input" v-if="item.columnAttr === 'number'"
v-model="scope.row[item.columnProp]"></el-input>
<el-input type="text" class="table-text-input" v-if="item.columnAttr === 'text'"
v-model="scope.row[item.columnProp]"></el-input>
<span v-else>{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
</el-form>
</el-form>
<span slot="footer" class="dialog-footer" style="margin-top: 0px;">
<el-button type="primary" @click="runCustomerReportData">刷新</el-button>
<el-button type="primary" @click="closeDialog">关闭</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
runCustomerReport,
} from '@/api/report/com_run_customer_report.js';
export default {
data() {
return {
titleCon: '定制报表查询',
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
reportId: '',
},
customerReportList: [],
customerColumnlArray: [],
searchColumnData: [],
dataListLoading: false,
}
},
methods: {
/*初始化页面参数*/
init(reportId, searchColumns) {
//
this.pageData.reportId = reportId;
this.searchColumnData = searchColumns;
//
this.customerReportList = [];
this.customerColumnlArray = [];
//
this.runCustomerReportData();
},
/*关闭modal*/
closeDialog(){
this.$emit('update:visible', false);
},
/*刷新当前的页面参数*/
runCustomerReportData(){
//
let requestData = {searchColumnList: JSON.stringify(this.searchColumnData), pageData: JSON.stringify(this.pageData)};
runCustomerReport(requestData).then(({data}) => {
//
if(data.code === 200){
debugger;
this.customerReportList = data.resultMap.resultRows;
this.customerColumnlArray = data.resultMap.columnRows;
}else{
this.$message.error(data.msg);
}
});
},
},
created() {
//
}
}
</script>
<style scoped lang="scss">
/*调节页面button和input的上下间距*/
.customer-css .customer-button{
margin-top: 25px;
}
/*调节样式*/
.customer-item{
margin-top: -10px;
}
/*fieldset下table的样式*/
.customer-fieldset /deep/ .el-table__header th.is-leaf{
line-height: 16px;
}
/deep/ .customer-tab .el-tabs__content{
padding: 0px !important;
}
</style>

239
src/views/modules/report/com_show_customer_report_search_column.vue

@ -0,0 +1,239 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners"
width="650px" style="height: 490px;" class="customer-dialog">
<el-form :inline="true" label-position="top" style="height: 260px;"
label-width="80px">
<!-- 主材料 -->
<el-form>
<fieldset class="customer-fieldset" style="width: 630px;">
<el-table height="240"
:cell-style="customerCellStyle" :cell-class-name="customerCellClassName"
:data="searchColumnList"
border
v-loading="dataListLoading"
style="width: 100%; margin-top: 0px;">
<el-table-column
v-for="(item,index) in searchColumnlArray" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed"
:width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<el-input type="number" class="table-number-input" v-if="item.columnProp === 'columnDefaultValue' && scope.row.columnType === '数字'"
v-model="scope.row[item.columnProp]"></el-input>
<el-input type="text" class="table-text-input" v-if="item.columnProp === 'columnDefaultValue' && scope.row.columnType === '文本'"
v-model="scope.row[item.columnProp]"></el-input>
<span v-else>{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
</fieldset>
</el-form>
</el-form>
<span slot="footer" class="dialog-footer" style="margin-top: 0px;">
<el-button type="primary" @click="runCustomerReportModal">执行</el-button>
<el-button type="primary" @click="closeDialog">关闭</el-button>
</span>
</el-dialog>
<!-- 查询列展示 -->
<runCustomerReport ref="runCustomerReport" :close-on-click-modal="false"
:visible.sync="showRunCustomerReportFlag">
</runCustomerReport>
</div>
</template>
<script>
/*组件*/
import runCustomerReport from '@/views/modules/report/com_run_customer_report';/*运行自定义报表的功能*/
/*引入js*/
import {
getSearchColumns,
} from '@/api/report/com_show_customer_report_search_column.js';
export default {
data() {
return {
titleCon: '查询列',
showRunCustomerReportFlag: false,
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
reportId: '',
},
searchColumnList: [],
searchColumnlArray: [
{
userId: this.$store.state.user.name,
functionId: 5307,
serialNumber: '5307CustomerColumnField',
tableId: "5307Customer",
tableName: "查询列",
columnProp: "columnField",
headerAlign: "center",
align: "center",
columnLabel: "参数ID",
columnWidth: 120,
columnHidden: false,
columnAttr: 'ori',
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5307,
serialNumber: '5307CustomerColumnName',
tableId: "5307Customer",
tableName: "查询列",
columnProp: "columnName",
headerAlign: "center",
align: "center",
columnLabel: "参数名称",
columnWidth: 140,
columnHidden: false,
columnAttr: 'ori',
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5307,
serialNumber: '5307CustomerColumnDefaultValue',
tableId: "5307Customer",
tableName: "查询列",
columnProp: "columnDefaultValue",
headerAlign: "center",
align: "center",
columnLabel: "参数默认值",
columnWidth: 160,
columnHidden: false,
columnAttr: 'text',
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5307,
serialNumber: '5307CustomerColumnRemark',
tableId: "5307Customer",
tableName: "查询列",
columnProp: "columnRemark",
headerAlign: "center",
align: "center",
columnLabel: "备注",
columnWidth: 200,
columnHidden: false,
columnAttr: 'ori',
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
],
dataListLoading: false,
}
},
/*组件*/
components: {
runCustomerReport,/*运行报表的功能*/
},
methods: {
/*初始化页面参数*/
init(reportId) {
//
this.pageData.reportId = reportId;
//
this.refreshPageData();
},
/*关闭modal*/
closeDialog(){
this.$emit('update:visible', false);
},
/*刷新当前的页面参数*/
refreshPageData(){
//
this.refreshSearchColumnTable();
},
//
refreshSearchColumnTable(){
getSearchColumns(this.pageData).then(({data}) => {
this.searchColumnList = data.rows;
});
},
/*添加定制的css类*/
customerCellClassName({row, column, rowIndex, columnIndex}) {
if(column.property == 'sortNo'){
return 'customer-number-cell';
}else if(columnIndex === 2){
return 'customer-text-cell';
}
},
/*添加定制的cess样式*/
customerCellStyle({row, column, rowIndex, columnIndex}) {
if(columnIndex === 2){
return 'padding: 0px 0px;';
}
},
/*保存已经修改好的参数数据*/
runCustomerReportModal(){
this.$nextTick(() => {
this.showRunCustomerReportFlag = true;
this.$refs.runCustomerReport.init(this.pageData.reportId, this.searchColumnList);
});
},
},
created() {
//
}
}
</script>
<style scoped lang="scss">
/*调节页面button和input的上下间距*/
.customer-css .customer-button{
margin-top: 25px;
}
/*调节样式*/
.customer-item{
margin-top: -10px;
}
/*fieldset下table的样式*/
.customer-fieldset /deep/ .el-table__header th.is-leaf{
line-height: 16px;
}
/deep/ .customer-tab .el-tabs__content{
padding: 0px !important;
}
</style>

152
src/views/modules/report/com_update_customer_report.vue

@ -0,0 +1,152 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners"
width="580px" style="height: 600px;" class="customer-dialog">
<el-form :inline="true" label-position="top" style="height: 320px;"
label-width="80px">
<!-- 信息 -->
<el-row>
<el-col :span="12">
<el-form-item :label="'报表名称:'" >
<el-input v-model="pageData.reportName" ref="reportName" style="width: 220px"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="'报表分类:'" style="margin-left: 0px;">
<el-select v-model="pageData.reportType" style="width: 80px">
<el-option
v-for="(item, index) in reportTypeList"
:key="index"
:label="item.baseData"
:value="item.baseData">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="'报表ID:'" style="margin-left: 0px;">
<el-input v-model="pageData.reportId" readonly="readonly" style="width: 140px"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item :label="'备注:'" >
<el-input v-model="pageData.reportRemark" style="width: 560px"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24" >
<el-form-item :label="'SQL语句:'" >
<el-input type="textarea" style="width: 560px;" class="customer-textarea" ref="reportSql" v-model="pageData.reportSql" :rows="10" :cols="85"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer" style="margin-top: -20px;">
<el-button type="primary" @click="saveCustomerReportBun">保存</el-button>
<el-button type="primary" @click="editCustomerReportSearchModal">列维护</el-button>
<el-button type="primary" @click="closeDialog">关闭</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
getReportTypeList,
getCustomerReportByReportId,
saveCustomerReport,
} from '@/api/report/com_update_customer_report.js'
export default {
name: "com_exception_reason",
data() {
return {
titleCon: '报表自定义-修改',
reportTypeList: [],
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
reportId: '',
reportName: '',
reportRemark: '',
reportType: '',
reportSql: '',
},
}
},
methods: {
/*初始化页面参数*/
init(reportId) {
//
this.pageData.reportId = reportId;
//
this.pageData.reportName = '';
this.pageData.reportSql = '';
this.pageData.reportRemark = '';
//
this.$nextTick(() => {
this.$refs.reportName.focus();
});
//
this.getCustomerReportByCon();
},
/*关闭modal*/
closeDialog(){
this.$emit('update:visible', false);
},
/*刷新报工的类型*/
refreshReportType(){
let requestData = {type: 'report_type', secondType: 'select'};
getReportTypeList(requestData).then(({data}) => {
this.reportTypeList = data.rows;
//ALL
this.pageData.reportType = data.rows[0].baseData;
})
},
/*添加异常原因的数据*/
getCustomerReportByCon(){
//
getCustomerReportByReportId(this.pageData).then(({data}) => {
//
this.pageData.reportName = data.row.reportName;
this.pageData.reportType = data.row.reportType;
this.pageData.reportRemark = data.row.reportRemark;
this.pageData.reportSql = data.row.reportSql;
});
},
/*保存定制报表的信息*/
saveCustomerReportBun(){
saveCustomerReport(this.pageData).then(({data}) => {
if (data.code == 200){
this.$message.success(data.msg);
}else{
this.$message.error(data.msg);
}
});
},
editCustomerReportSearchModal(){
//
this.closeDialog();
//
this.$emit('initExceptionReason', this.pageData.exceptionReason);
},
},
created() {
//
this.refreshReportType();
}
}
</script>
<style scoped lang="scss">
</style>

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

@ -4,27 +4,26 @@
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;" >
<el-row>
<el-form-item :label="'报表名称:'">
<el-input v-model="pageData.orderNo" style="width: 120px"></el-input>
<el-input v-model="pageData.reportName" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'报表分类:'">
<el-select v-model="pageData.reportType" style="width: 130px"
placeholder="请选择">
<el-select v-model="pageData.reportType" style="width: 130px">
<el-option
v-for="(item, index) in reportTypeList"
:key="index"
:label="item.label"
:value="item.value">
:label="item.baseData"
:value="item.baseData">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="''" style="margin-left: 50px; margin-top: 20px;">
<el-button class="customer-bun-min" type="primary" @click="addReportModal" style="margin-left: 10px; margin-bottom: 5px;">新增</el-button>
<el-button class="customer-bun-min" type="primary" @click="refreshPageTables" style="margin-left: 10px; margin-bottom: 5px;">查询</el-button>
<el-button class="customer-bun-min" type="primary" @click="addReportModal" style="margin-left: 10px; margin-bottom: 5px;">新增</el-button>
</el-form-item>
</el-row>
</el-form>
<!-- 工单主表信息 -->
<el-main style="margin-top: 25px; padding: 0px; width: 100%;">
<el-main style="margin-top: 5px; padding: 0px; width: 100%;">
<el-form :inline="true" label-position="top" label-width="100px">
<el-form-item :label="'主记录'">
</el-form-item>
@ -35,11 +34,24 @@
border
ref="reportTable"
highlight-current-row
@row-click="setCurrentRoutingRow"
@row-click="setCurrentReportRow"
v-loading="dataListLoading"
style="margin-top: -20px; width: 100%;">
<el-table-column
v-for="(item,index) in columnOrderArray" :key="index"
fixed="left"
header-align="center"
align="center"
width="160"
: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="editCustomerReportSearchColumnModal(scope.row)">列维护</a>
<a class="customer-a" @click="showCustomerReportSearchColumnModal(scope.row)">报表查询</a>
</template>
</el-table-column>
<el-table-column
v-for="(item,index) in columnReportArray" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
@ -58,20 +70,44 @@
</el-main>
<!-- 物料库存查询 -->
<comScheduleOrderExpand ref="comScheduleOrderExpand" :close-on-click-modal="false"
:visible.sync="showScheduleOrderFlag"
@refreshPageTables = "refreshPageTables">
</comScheduleOrderExpand>
<!-- 新增 -->
<addCustomerReport ref="addCustomerReport" :close-on-click-modal="false"
:visible.sync="addCustomerReportFlag"
@refreshCurrentPage = "refreshCurrentPage">
</addCustomerReport>
<!-- 修改 -->
<updateCustomerReport ref="updateCustomerReport" :close-on-click-modal="false"
:visible.sync="updateCustomerReportFlag"
@refreshCurrentPage = "refreshCurrentPage">
</updateCustomerReport>
<!-- 查询列维护 -->
<editCustomerReportSearchColumn ref="editCustomerReportSearchColumn" :close-on-click-modal="false"
:visible.sync="editCustomerReportSearchColumnFlag"
@refreshCurrentPage = "refreshCurrentPage">
</editCustomerReportSearchColumn>
<!-- 查询列展示 -->
<showCustomerReportSearchColumn ref="showCustomerReportSearchColumn" :close-on-click-modal="false"
:visible.sync="showCustomerReportSearchColumnFlag"
@refreshCurrentPage = "refreshCurrentPage">
</showCustomerReportSearchColumn>
</div>
</template>
<script>
import comScheduleOrderExpand from '@/views/modules/schedule/com_schedule_order_expand';/*排产扩展 排产单个工单*/
/*组件*/
import addCustomerReport from '@/views/modules/report/com_add_customer_report';/*新增自定义报表的功能*/
import updateCustomerReport from '@/views/modules/report/com_update_customer_report';/*新增自定义报表的功能*/
import editCustomerReportSearchColumn from '@/views/modules/report/com_edit_customer_report_search_column';/*新增自定义报表的功能*/
import showCustomerReportSearchColumn from '@/views/modules/report/com_show_customer_report_search_column';/*新增自定义报表的功能*/
import {
getReportTypeList,
getCurrentPageTables,
deleteCustomerReport,
} from '@/api/report/report_manage.js'
export default {
@ -79,334 +115,33 @@ export default {
return {
height: 200,
reportTypeList: [],
showScheduleOrderFlag: false,
addCustomerReportFlag: false,
updateCustomerReportFlag: false,
editCustomerReportSearchColumnFlag: false,
showCustomerReportSearchColumnFlag: false,
currentReportRow: {},
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
orderNo: '',
itemNo: '',
reportName: '',
reportType: '',
seqNo: 0,
resourceId: '',
workCenterNo: '',
enterTime1: '',
enterTime2: '',
needTime1: '',
needTime2: '',
scheduleDate: this.dayjs(new Date()).format('YYYY-MM-DD'),
scheduleTime: '08:30',
specifiedTime: 'N',
scheduledQty: 0,
waitTimes: 0,
scheduleSeqNo: 0,
planStartTime: '',
calendarId: '',
calendarDesc: '',
status: 1,
sortField: 'needDate'
},
reportList: [],
dataListLoading: false,
columnOrderArray: [
{
userId: this.$store.state.user.name,
functionId: 5301,
serialNumber: '5301OrderOrderNo',
tableId: "5301Order",
tableName: "工单表",
columnProp: "orderNo",
headerAlign: "center",
align: "center",
columnLabel: "订单号",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5301,
serialNumber: '5301OrderItemNo',
tableId: "5301Order",
tableName: "工单表",
columnProp: "itemNo",
headerAlign: "center",
align: "center",
columnLabel: "工序号",
columnWidth: 60,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5301,
serialNumber: '5301OrderItemDesc',
tableId: "5301Order",
tableName: "工单表",
columnProp: "itemDesc",
headerAlign: "center",
align: "center",
columnLabel: "工序名称",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5301,
serialNumber: '5301OrderNeedDate',
tableId: "5301Order",
tableName: "工单表",
columnProp: "needDate",
headerAlign: "center",
align: "center",
columnLabel: "要求完工日期",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5301,
serialNumber: '5301OrderPartNo',
tableId: "5301Order",
tableName: "工单表",
columnProp: "partNo",
headerAlign: "center",
align: "center",
columnLabel: "产品编码",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5301,
serialNumber: '5301OrderCustomerName',
tableId: "5301Order",
tableName: "工单表",
columnProp: "customerName",
headerAlign: "center",
align: "center",
columnLabel: "客户名称",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5301,
serialNumber: '5301OrderCustPartNo',
tableId: "5301Order",
tableName: "工单表",
columnProp: "custPartNo",
headerAlign: "center",
align: "center",
columnLabel: "客户产品料号",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5301,
serialNumber: '5301OrderPartDesc',
tableId: "5301Order",
tableName: "工单表",
columnProp: "partDesc",
headerAlign: "center",
align: "center",
columnLabel: "产成品名称",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5301,
serialNumber: '5301OrderLotSize',
tableId: "5301Order",
tableName: "工单表",
columnProp: "lotSize",
headerAlign: "center",
align: "center",
columnLabel: "订单量",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5301,
serialNumber: '5301OrderQtyToSchedule',
tableId: "5301Order",
tableName: "工单表",
columnProp: "qtyToSchedule",
headerAlign: "center",
align: "center",
columnLabel: "待排产数量",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5301,
serialNumber: '5301OrderQtyScheduled',
tableId: "5301Order",
tableName: "工单表",
columnProp: "qtyScheduled",
headerAlign: "center",
align: "center",
columnLabel: "已排产数量",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5301,
serialNumber: '5301OrderQtyReported',
tableId: "5301Order",
tableName: "工单表",
columnProp: "qtyReported",
headerAlign: "center",
align: "center",
columnLabel: "已报工数量",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5301,
serialNumber: '5301OrderSpec',
tableId: "5301Order",
tableName: "工单表",
columnProp: "spec",
headerAlign: "center",
align: "center",
columnLabel: "规格型号",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5301,
serialNumber: '5301OrderSite',
tableId: "5301Order",
tableName: "工单表",
columnProp: "site",
headerAlign: "center",
align: "center",
columnLabel: "工厂编号",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5301,
serialNumber: '5301OrderWorkCenterNo',
tableId: "5301Order",
tableName: "工单表",
columnProp: "workCenterNo",
headerAlign: "center",
align: "center",
columnLabel: "加工中心",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5301,
serialNumber: '5301OrderNextItemNo',
tableId: "5301Order",
tableName: "工单表",
columnProp: "nextItemNo",
headerAlign: "center",
align: "center",
columnLabel: "下道工序",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
columnReportArray: [
{
userId: this.$store.state.user.name,
functionId: 5301,
serialNumber: '5301OrderNextItemDesc',
tableId: "5301Order",
tableName: "工单表",
columnProp: "nextItemDesc",
functionId: 5306,
serialNumber: '5306ReportReportId',
tableId: "5306Report",
tableName: "自定义报表",
columnProp: "reportId",
headerAlign: "center",
align: "center",
columnLabel: "下道工序名称",
columnWidth: 80,
columnLabel: "报表ID",
columnWidth: '',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -416,15 +151,15 @@ export default {
},
{
userId: this.$store.state.user.name,
functionId: 5301,
serialNumber: '5301OrderNextScheduledFlag',
tableId: "5301Order",
tableName: "工单表",
columnProp: "nextScheduledFlag",
functionId: 5306,
serialNumber: '5306ReportReportName',
tableId: "5306Report",
tableName: "自定义报表",
columnProp: "reportName",
headerAlign: "center",
align: "center",
columnLabel: "下道工序已排产",
columnWidth: 80,
columnLabel: "报表名称",
columnWidth: '',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -434,15 +169,15 @@ export default {
},
{
userId: this.$store.state.user.name,
functionId: 5301,
serialNumber: '5301OrderPreItemNo',
tableId: "5301Order",
tableName: "工单表",
columnProp: "preItemNo",
functionId: 5306,
serialNumber: '5306ReportReportType',
tableId: "5306Report",
tableName: "自定义报表",
columnProp: "reportType",
headerAlign: "center",
align: "center",
columnLabel: "上道工序",
columnWidth: 80,
columnLabel: "报表分类",
columnWidth: '',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -452,285 +187,15 @@ export default {
},
{
userId: this.$store.state.user.name,
functionId: 5301,
serialNumber: '5301OrderPreItemDesc',
tableId: "5301Order",
tableName: "工单表",
columnProp: "preItemDesc",
functionId: 5306,
serialNumber: '5306ReportReportRemark',
tableId: "5306Report",
tableName: "自定义报表",
columnProp: "reportRemark",
headerAlign: "center",
align: "center",
columnLabel: "上道工序名称",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5301,
serialNumber: '5301OrderPreScheduledFlag',
tableId: "5301Order",
tableName: "工单表",
columnProp: "preScheduledFlag",
headerAlign: "center",
align: "center",
columnLabel: "上道工序已排产",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5301,
serialNumber: '5301OrderScheduledFlag',
tableId: "5301Order",
tableName: "工单表",
columnProp: "scheduledFlag",
headerAlign: "center",
align: "center",
columnLabel: "是否排产",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5301,
serialNumber: '5301OrderAvailResource',
tableId: "5301Order",
tableName: "工单表",
columnProp: "availResource",
headerAlign: "center",
align: "center",
columnLabel: "可用机台",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5301,
serialNumber: '5301OrderEnterDate',
tableId: "5301Order",
tableName: "工单表",
columnProp: "enterDate",
headerAlign: "center",
align: "center",
columnLabel: "录入日期",
columnWidth: 125,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5301,
serialNumber: '5301OrderScheduleToPlanTime',
tableId: "5301Order",
tableName: "工单表",
columnProp: "scheduleToPlanTime",
headerAlign: "center",
align: "center",
columnLabel: "计划时间",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5301,
serialNumber: '5301OrderMachRunFactor',
tableId: "5301Order",
tableName: "工单表",
columnProp: "machRunFactor",
headerAlign: "center",
align: "center",
columnLabel: "单位产出",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5301,
serialNumber: '5301OrderMachSetupTime',
tableId: "5301Order",
tableName: "工单表",
columnProp: "machSetupTime",
headerAlign: "center",
align: "center",
columnLabel: "调机时间",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5301,
serialNumber: '5301OrderFactorUnit',
tableId: "5301Order",
tableName: "工单表",
columnProp: "factorUnit",
headerAlign: "center",
align: "center",
columnLabel: "产出单位",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5301,
serialNumber: '5301OrderQtyScheduledPreOps',
tableId: "5301Order",
tableName: "工单表",
columnProp: "qtyScheduledPreOps",
headerAlign: "center",
align: "center",
columnLabel: "前道工序已排产数量",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5301,
serialNumber: '5301OrderQtyApprovedPreOps',
tableId: "5301Order",
tableName: "工单表",
columnProp: "qtyApprovedPreOps",
headerAlign: "center",
align: "center",
columnLabel: "前道工序已报合格数",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5301,
serialNumber: '5301OrderOriSOOrderNo',
tableId: "5301Order",
tableName: "工单表",
columnProp: "oriSOOrderNo",
headerAlign: "center",
align: "center",
columnLabel: "SAP参考号",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5301,
serialNumber: '5301OrderEficiency',
tableId: "5301Order",
tableName: "工单表",
columnProp: "efficiency",
headerAlign: "center",
align: "center",
columnLabel: "效率",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5301,
serialNumber: '5301OrderCostRollUpFlag',
tableId: "5301Order",
tableName: "工单表",
columnProp: "costRollUpFlag",
headerAlign: "center",
align: "center",
columnLabel: "已排料",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5301,
serialNumber: '5301OrderManualFlag',
tableId: "5301Order",
tableName: "工单表",
columnProp: "manualFlag",
headerAlign: "center",
align: "center",
columnLabel: "刀模已发",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5301,
serialNumber: '5301OrderRepairSOFlag',
tableId: "5301Order",
tableName: "工单表",
columnProp: "repairSOFlag",
headerAlign: "center",
align: "center",
columnLabel: "印版已发",
columnWidth: 80,
columnLabel: "备注",
columnWidth: '',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -741,21 +206,33 @@ export default {
],
}
},
/*组件*/
components: {
comScheduleOrderExpand,/*扩展排产 处理多加工中心排产*/
addCustomerReport,/*新增自定义报表的功能*/
updateCustomerReport,/*报表修改*/
editCustomerReportSearchColumn,/*查询列修改*/
showCustomerReportSearchColumn,/*显示查询列参数*/
},
mounted() {
this.$nextTick(() => {
this.height = window.innerHeight - 205;
this.height = window.innerHeight - 165;
})
},
methods: {
/*刷新报工的类型*/
refreshReportType(){
let requestData = {'type': 'report_type'};
getReportTypeList(requestData).then(({data}) => {
this.reportTypeList = data.rows;
//
this.pageData.reportType = data.rows[0].baseData;
})
},
/*刷新页面table*/
refreshPage(){
refreshCurrentPage(){
this.refreshPageTables();
},
@ -770,35 +247,73 @@ export default {
/*刷新当前的页面的显示数据*/
addReportModal(orderRow){
//
this.$nextTick(() => {
this.showScheduleOrderFlag = true;
this.$refs.comScheduleOrderExpand.init(orderRow);
this.addCustomerReportFlag = true;
this.$refs.addCustomerReport.init();
});
},
/*获取当前的机台对应的加工中心*/
getCurrentWorkCenterNoByResourceId(){
getCurrentWorkCenterNoByResourceId(this.pageData).then(({data}) => {
//
if (data.code == 500) {
//this.$message.error(data.msg);
} else{
this.pageData.workCenterNo = data.workCenterNo;
}
this.pageData.workCenterNo = data.workCenterNo;
/*修改当前的定制报表数据*/
editCustomerReportModal(currentRow){
this.$nextTick(() => {
this.updateCustomerReportFlag = true;
this.$refs.updateCustomerReport.init(currentRow.reportId);
});
},
/*查询列维护*/
editCustomerReportSearchColumnModal(currentRow){
this.$nextTick(() => {
this.editCustomerReportSearchColumnFlag = true;
this.$refs.editCustomerReportSearchColumn.init(currentRow.reportId);
});
},
/*展示查询列*/
showCustomerReportSearchColumnModal(currentRow){
this.$nextTick(() => {
this.showCustomerReportSearchColumnFlag = true;
this.$refs.showCustomerReportSearchColumn.init(currentRow.reportId);
});
},
/*设置工艺的行*/
setCurrentRoutingRow(row, column, event) {
setCurrentReportRow(row, column, event) {
this.currentReportRow = row;
},
/*提醒是否删除的提示*/
warnDeleteCustomerReportConfirm(currentCustomerReport) {
this.$confirm('确实要删除报表'+currentCustomerReport.reportName+'吗?', '提示', {
confirmButtonText: '确认',
celButtonText: '取消',
type: 'warning'
}).then(() => {
//
this.deleteCustomerReportOperation(currentCustomerReport);
});
},
/*执行删除定制报表的功能*/
deleteCustomerReportOperation(currentCustomerReport) {
//
deleteCustomerReport(currentCustomerReport).then(({data}) => {
//
if (data.code === 200) {
this.$message.error(data.msg);
} else {
this.$message.success(data.msg);
//
this.refreshPageData();
}
});
},
},
created() {
//
//this.getShopOrderList();
//
this.refreshReportType();
},

Loading…
Cancel
Save