Browse Source

BUG 修改

master
Rui_Li 4 years ago
parent
commit
e4c705730a
  1. 7
      src/api/report/com_auth_customer_report.js
  2. 227
      src/views/modules/report/com_auth_customer_report.vue
  3. 27
      src/views/modules/yieldReport/com_split_order_switch_roll.vue
  4. 2
      src/views/modules/yieldReport/com_switch_roll.vue
  5. 2
      src/views/modules/yieldReport/otherReport/other_switch_roll.vue

7
src/api/report/com_auth_customer_report.js

@ -0,0 +1,7 @@
import { createAPI } from '@/utils/httpRequest.js'
// 获取查询列
export const getAuthRoles = data => createAPI('report/getAuthRoles', 'POST', data)
// 赋值权限
export const saveAuthCustomerReport = data => createAPI('report/saveAuthSingleCustomerReport', 'POST', data)

227
src/views/modules/report/com_auth_customer_report.vue

@ -0,0 +1,227 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners"
width="380px" style="height: 490px;" class="customer-dialog">
<el-form :inline="true" label-position="top" style="height: 300px;"
label-width="80px">
<el-row>
<el-form-item :label="'角色ID:'">
<el-input v-model="pageData.roleId" readonly="readonly" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'角色名称:'">
<el-input v-model="pageData.roleName" readonly="readonly" style="width: 120px"></el-input>
</el-form-item>
</el-row>
<!-- 主材料 -->
<el-form>
<el-table height="240"
:cell-style="customerCellStyle" :cell-class-name="customerCellClassName"
:data="authRoleList"
border
v-loading="dataListLoading"
style="width: 100%; margin-top: 0px;">
<el-table-column
type="selection"
width="55">
</el-table-column>
<el-table-column
v-for="(item,index) in authRoleArray" :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-checkbox true-label="Y" false-label="N" v-if="item.columnProp === 'checkedFlag' && item.columnAttr === 'check'"
v-model="scope.row[item.columnProp]" style="margin-top: 5px;"></el-checkbox>
<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="saveAuthCustomerReportBun">保存</el-button>
<el-button type="primary" @click="closeDialog">关闭</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
/*引入js*/
import {
getAuthRoles,
saveAuthCustomerReport,
} from '@/api/report/com_auth_single_customer_report.js';
export default {
data() {
return {
titleCon: '报表赋权',
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
roleId: '',
roleName: '',
},
customerReportList: [],
customerReportArray: [
{
userId: this.$store.state.user.name,
functionId: 5307,
serialNumber: '5307CustomerReportId',
tableId: "5307Customer",
tableName: "查询列",
columnProp: "reportId",
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: '5307CustomerRoleName',
tableId: "5307Customer",
tableName: "查询列",
columnProp: "roleName",
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: "checkedFlag",
headerAlign: "center",
align: "center",
columnLabel: "授权",
columnWidth: 90,
columnHidden: false,
columnAttr: 'check',
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
],
dataListLoading: false,
}
},
methods: {
/*初始化页面参数*/
init(currentRow) {
//
debugger;
this.pageData.roleId = currentRow.roleId;
this.pageData.roleName = currentRow.roleName;
//
this.refreshPageData();
},
/*关闭modal*/
closeDialog(){
this.$emit('update:visible', false);
//
this.$emit('refreshCurrentPage');
},
/*刷新当前的页面参数*/
refreshPageData(){
//
this.refreshAuthRoleTable();
},
//
refreshAuthRoleTable(){
getAuthRoles(this.pageData).then(({data}) => {
this.authRoleList = 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;';
}
},
/*保存已经修改好的参数数据*/
saveAuthCustomerReportBun(){
let requestData = {pageData: JSON.stringify(this.pageData), authRoles: JSON.stringify(this.authRoleList)};
saveAuthCustomerReport(requestData).then(({data}) => {
if(data.code === 200){
this.$message.success(data.msg);
//
this.closeDialog();
}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>

27
src/views/modules/yieldReport/com_split_order_switch_roll.vue

@ -1,13 +1,13 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners"
width="210px" style="height: 680px;" class="customer-dialog">
width="210px" style="height: 380px;" class="customer-dialog">
<el-form :inline="true" label-position="top" @submit.native.prevent style="height: 60px;"
label-width="80px">
<!-- 半成品卷卷号 -->
<el-row>
<el-col :span="24" style="margin-left: 35px;">
<el-form-item :label="'半成品卷卷号:'">
<el-form-item :label="'卷号:'">
<el-input ref="newRollNo" v-model="pageData.newRollNo" style="width: 120px;" ></el-input>
</el-form-item>
</el-col>
@ -15,7 +15,7 @@
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="switchRollBun"> </el-button>
<el-button type="primary" @click="closeDialog">关闭</el-button>
<el-button type="primary" @click="closeDialog" style="margin-bottom: 10px;">关闭</el-button>
</span>
</el-dialog>
@ -126,11 +126,12 @@ export default {
//
checkSplitScheduleSwitchRoll(this.pageData).then(({data}) => {
//
if (data.code == 500) {
this.$message.error(data.msg);
} else if (data.resultMap.resultCode == '201') {
if (data.code === 200) {
//
this.switchRollOperation();
} else if (data.code === '201') {
//
this.$confirm(data.resultMap.resultMsg, '提示', {
this.$confirm(data.msg, '提示', {
confirmButtonText: '确认',
celButtonText: '取消',
type: 'warning'
@ -138,8 +139,9 @@ export default {
//
this.switchRollOperation();
});
} else { //
this.switchRollOperation();
} else {
//
this.$message.error(data.msg);
}
});
},
@ -149,12 +151,13 @@ export default {
//
switchSfdcRoll(this.pageData).then(({data}) => {
//
if (data.code == 500) {
this.$message.error(data.msg);
} else {
if (data.code === 200) {
//
this.pageData.newRollNo = '';
this.closeDialog();
} else {
//
this.$message.error(data.msg);
}
})
},

2
src/views/modules/yieldReport/com_switch_roll.vue

@ -15,7 +15,7 @@
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="switchRollBun"> </el-button>
<el-button type="primary" @click="closeDialog">关闭</el-button>
<el-button type="primary" @click="closeDialog" style="margin-bottom: 10px;">关闭</el-button>
</span>
</el-dialog>

2
src/views/modules/yieldReport/otherReport/other_switch_roll.vue

@ -15,7 +15,7 @@
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="switchRollBun"> </el-button>
<el-button type="primary" @click="closeDialog">关闭</el-button>
<el-button type="primary" @click="closeDialog" style="margin-bottom: 10px;">关闭</el-button>
</span>
</el-dialog>

Loading…
Cancel
Save