|
|
@@ -1,31 +1,25 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <div style="height: 90%;margin-top:30px;margin-left: 20%" v-if="data.length>0">
|
|
|
- <el-steps direction="vertical"
|
|
|
- :active="active"
|
|
|
- space="150px"
|
|
|
- align-center
|
|
|
- style="font-size: 12px">
|
|
|
- <el-step :key="index"
|
|
|
- v-for="(item,index) in data"
|
|
|
- :title="item.title"
|
|
|
- :status="item.status"
|
|
|
- style="font-size: 14px !important;">
|
|
|
+ <div style="height: 90%;margin-top:30px;margin-left: 20%" v-if="data.length > 0">
|
|
|
+ <el-steps direction="vertical" :active="active" space="150px" align-center style="font-size: 12px">
|
|
|
+ <el-step :key="index" v-for="(item, index) in data" :title="item.title" :status="item.status"
|
|
|
+ style="font-size: 14px !important;">
|
|
|
<template slot="description" scope="scope">
|
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="font-size: 14px">
|
|
|
<tr>
|
|
|
<td>
|
|
|
- <span >{{index === 0?'提交人:':'审批人:'}} </span><span>{{item.auditName}}</span>
|
|
|
+ <span>{{ index === 0 ? '提交人:' : '审批人:' }} </span><span>{{ item.auditName }}</span>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td>
|
|
|
- <span >{{index === 0?'提交日期:':'审批日期:'}} </span><span>{{item.auditOpTime}}</span>
|
|
|
+ <span>{{ index === 0 ? '提交日期:' : '审批日期:' }} </span><span>{{ item.auditOpTime
|
|
|
+ }}</span>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td>
|
|
|
- <span >{{index === 0?'备注':'审批意见'}}: </span><span>{{item.auditMsg}}</span>
|
|
|
+ <span>{{ index === 0 ? '备注' : '审批意见' }}: </span><span>{{ item.auditMsg }}</span>
|
|
|
</td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
@@ -33,6 +27,7 @@
|
|
|
</el-step>
|
|
|
</el-steps>
|
|
|
<div class="dialogButton">
|
|
|
+ <el-button v-if="printShow" type="success" size="small" @click="printWindowfun">审核报表</el-button>
|
|
|
<el-button size="small" @click="$emit('choceScheduleFun')">关闭</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -45,97 +40,231 @@
|
|
|
<el-button size="small" @click="$emit('choceScheduleFun')">关闭</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <reportContainerlos style="width: 100%; height: 100vh" ref="reportContainer" :butShow="false">
|
|
|
+ </reportContainerlos>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import option from './config/mainList.json'
|
|
|
- import { auditProcessListHD } from "@/api/check/check";
|
|
|
-
|
|
|
- export default {
|
|
|
- name: "checkSchedule",
|
|
|
- props: {
|
|
|
- checkId: {
|
|
|
- type: String
|
|
|
- },
|
|
|
- batchNo:{
|
|
|
- type: String
|
|
|
- },
|
|
|
- times:{
|
|
|
- type: String
|
|
|
+import option from './config/mainList.json'
|
|
|
+import { auditProcessListHD } from "@/api/check/check";
|
|
|
+import { getList as getreportsList } from "@/api/iosBasicData/reports";
|
|
|
+import { reportsGetReportData } from "@/api/iosBasicData/reports";
|
|
|
+import reportContainerlos from "@/views/iosBasicData/report-container/report-container-los.vue"
|
|
|
+export default {
|
|
|
+ components: {
|
|
|
+ reportContainerlos
|
|
|
+ },
|
|
|
+ name: "checkSchedule",
|
|
|
+ props: {
|
|
|
+ checkId: {
|
|
|
+ type: String
|
|
|
+ },
|
|
|
+ batchNo: {
|
|
|
+ type: String
|
|
|
+ },
|
|
|
+ times: {
|
|
|
+ type: String
|
|
|
+ },
|
|
|
+ choceScheduleFun: {
|
|
|
+ type: Function
|
|
|
+ },
|
|
|
+ businessType: {
|
|
|
+ type: String
|
|
|
+ },
|
|
|
+ classifyCode: {
|
|
|
+ type: String
|
|
|
+ },
|
|
|
+ groupCode: {
|
|
|
+ type: String
|
|
|
+ },
|
|
|
+ printShow: {
|
|
|
+ type: Boolean,
|
|
|
+ default: false
|
|
|
+ },
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ checkData: {},
|
|
|
+ loading: false,
|
|
|
+ option: option,
|
|
|
+ active: 1,
|
|
|
+ data: [],
|
|
|
+ page: {
|
|
|
+ pageSize: 10,
|
|
|
+ pagerCount: 5,
|
|
|
+ total: 0,
|
|
|
},
|
|
|
- choceScheduleFun:{
|
|
|
- type: Function
|
|
|
+ reportsData: {}
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ checkId(val, oldVal) {
|
|
|
+ if (val != oldVal) {
|
|
|
+ this.init()
|
|
|
}
|
|
|
},
|
|
|
- data(){
|
|
|
- return {
|
|
|
- loading:false,
|
|
|
- option:option,
|
|
|
- active:1,
|
|
|
- data:[],
|
|
|
- page: {
|
|
|
- pageSize: 10,
|
|
|
- pagerCount: 5,
|
|
|
- total: 0,
|
|
|
- },
|
|
|
+ batchNo(val, oldVal) {
|
|
|
+ if (val != oldVal) {
|
|
|
+ this.init()
|
|
|
}
|
|
|
- },
|
|
|
- watch:{
|
|
|
- checkId(val, oldVal) {
|
|
|
- if(val != oldVal){
|
|
|
- this.init()
|
|
|
- }
|
|
|
- },
|
|
|
- batchNo(val, oldVal) {
|
|
|
- if(val != oldVal){
|
|
|
- this.init()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.init()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ init() {
|
|
|
+ this.times = this.times ? this.times : ''
|
|
|
+ auditProcessListHD(this.checkId, this.batchNo, this.times).then(res => {
|
|
|
+ res.data.data.map((item, index) => {
|
|
|
+ if (item.auditStatus == "A") {
|
|
|
+ this.active = index + 2
|
|
|
+ item.title = "审批通过"
|
|
|
+ item.status = "success"
|
|
|
+ }
|
|
|
+ if (item.auditStatus == "B") {
|
|
|
+ item.title = "审批驳回"
|
|
|
+ item.status = "error"
|
|
|
+ }
|
|
|
+ if (item.auditStatus == "S" || item.auditStatus == "N") {
|
|
|
+ item.title = "待审批"
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ let sendObject = {
|
|
|
+ ...res.data.data[0],
|
|
|
+ auditName: res.data.data[0].sendName,
|
|
|
+ auditOpTime: res.data.data[0].sendTime,
|
|
|
+ auditMsg: res.data.data[0].sendMsg,
|
|
|
+ auditStatus: "O",
|
|
|
+ title: "提交",
|
|
|
}
|
|
|
+ res.data.data.unshift(sendObject)
|
|
|
+ this.data = res.data.data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ printWindowfun() {
|
|
|
+ // 当时选择的数据
|
|
|
+ let obj = {}
|
|
|
+ obj = {
|
|
|
+ businessType: this.businessType,
|
|
|
+ classifyCode: this.classifyCode,
|
|
|
+ groupCode: this.groupCode
|
|
|
}
|
|
|
+ getreportsList(1, 10, obj).then(res => {
|
|
|
+ this.reportRadio(res.data.data.records[0])
|
|
|
+ })
|
|
|
},
|
|
|
- created() {
|
|
|
-
|
|
|
+ // 获取报表数据
|
|
|
+ reportRadio(val) {
|
|
|
+ reportsGetReportData({
|
|
|
+ billId: this.checkId,
|
|
|
+ reportCode: val.classifyCode,
|
|
|
+ groupCode: val.groupCode,
|
|
|
+ type: val.businessType
|
|
|
+ }).then(res => {
|
|
|
+ this.handleReportPreview(val.url, res.data.data.data)
|
|
|
+ })
|
|
|
},
|
|
|
- mounted() {
|
|
|
- this.init()
|
|
|
+ handleReportPreview(url, data) {
|
|
|
+ this.reportlist = data // 存一下数据 打印的时候需要传
|
|
|
+
|
|
|
+ Stimulsoft.Base.StiLicense.key = '6vJhGtLLLz2GNviWmUTrhSqnOItdDwjBylQzQcAOiHn0s4gy0Fr5YoUZ9V00Y0igCSFQzwEqYBh/N77k4f0fWXTHW5rqeBNLkaurJDenJ9o97TyqHs9HfvINK18Uwzsc/bG01Rq+x3H3Rf+g7AY92gvWmp7VA2Uxa30Q97f61siWz2dE5kdBVcCnSFzC6awE74JzDcJMj8OuxplqB1CYcpoPcOjKy1PiATlC3UsBaLEXsok1xxtRMQ283r282tkh8XQitsxtTczAJBxijuJNfziYhci2jResWXK51ygOOEbVAxmpflujkJ8oEVHkOA/CjX6bGx05pNZ6oSIu9H8deF94MyqIwcdeirCe60GbIQByQtLimfxbIZnO35X3fs/94av0ODfELqrQEpLrpU6FNeHttvlMc5UVrT4K+8lPbqR8Hq0PFWmFrbVIYSi7tAVFMMe2D1C59NWyLu3AkrD3No7YhLVh7LV0Tttr/8FrcZ8xirBPcMZCIGrRIesrHxOsZH2V8t/t0GXCnLLAWX+TNvdNXkB8cF2y9ZXf1enI064yE5dwMs2fQ0yOUG/xornE'
|
|
|
+ // Stimulsoft.Base.StiLicense.Key = '6vJhGtLLLz2GNviWmUTrhSqnOItdDwjBylQzQcAOiHkcgIvwL0jnpsDqRpWg5FI5kt2G7A0tYIcUygBh1sPs7plofUOqPB1a4HBIXJB621mau2oiAIj+ysU7gKUXfjn/D5BocmduNB+ZMiDGPxFrAp3PoD0nYNkkWh8r7gBZ1v/JZSXGE3bQDrCQCNSy6mgby+iFAMV8/PuZ1z77U+Xz3fkpbm6MYQXYp3cQooLGLUti7k1TFWrnawT0iEEDJ2iRcU9wLqn2g9UiWesEZtKwI/UmEI2T7nv5NbgV+CHguu6QU4WWzFpIgW+3LUnKCT/vCDY+ymzgycw9A9+HFSzARiPzgOaAuQYrFDpzhXV+ZeX31AxWlnzjDWqpfluygSNPtGul5gyNt2CEoJD1Yom0VN9fvRonYsMsimkFFx2AwyVpPcs+JfVBtpPbTcZscnzUdmiIvxv8Gcin6sNSibM6in/uUKFt3bVgW/XeMYa7MLGF53kvBSwi78poUDigA2n12SmghLR0AHxyEDIgZGOTbNI33GWu7ZsPBeUdGu55R8w='
|
|
|
+ Stimulsoft.Base.Localization.StiLocalization.addLocalizationFile('/reports/stimulsoft/Localization/zh-CHS.xml', true, 'zh-CHS')
|
|
|
+ Stimulsoft.Base.Localization.StiLocalization.setLocalizationFile('/reports/stimulsoft/Localization/zh-CHS.xml')
|
|
|
+
|
|
|
+ // 工具栏
|
|
|
+ var options = new Stimulsoft.Viewer.StiViewerOptions()
|
|
|
+ options.height = '100%'
|
|
|
+ options.appearance.scrollbarsMode = true
|
|
|
+ options.toolbar.showDesignButton = false
|
|
|
+ options.toolbar.showAboutButton = false
|
|
|
+ options.toolbar.showResourcesButton = false
|
|
|
+ options.toolbar.showFullScreenButton = false
|
|
|
+ options.toolbar.showOpenButton = false
|
|
|
+ options.appearance.showTooltips = false
|
|
|
+ options.appearance.showDialogsHelp = false
|
|
|
+ options.exports.showExportToDocument = false
|
|
|
+ options.toolbar.showParametersButton = true
|
|
|
+ options.appearance.bookmarksPrint = true
|
|
|
+ options.toolbar.printDestination = Stimulsoft.Viewer.StiPrintDestination.Direct
|
|
|
+ options.appearance.htmlRenderMode = Stimulsoft.Report.Export.StiHtmlExportMode.Table
|
|
|
+ let viewer = new Stimulsoft.Viewer.StiViewer(options, 'StiViewer', false)
|
|
|
+
|
|
|
+ // 报表
|
|
|
+ console.log("创建一个报表实例");
|
|
|
+ let report = new window.Stimulsoft.Report.StiReport();
|
|
|
+
|
|
|
+ // 加载文件
|
|
|
+ console.log("从url加载报表");
|
|
|
+ // report.loadFile("/reports/stimulsoft/demos/SimpleList.mrt");
|
|
|
+ // report.load(row.url)
|
|
|
+ report.load(url)
|
|
|
+
|
|
|
+ // 加载数据
|
|
|
+ var dataSet = new Stimulsoft.System.Data.DataSet(
|
|
|
+ 'reportData'
|
|
|
+ )
|
|
|
+ dataSet.readJson(data)
|
|
|
+ report.regData('reportData', 'reportData', dataSet)
|
|
|
+ // 从模版和数据加载报表
|
|
|
+ // loadReport(report, '', {})
|
|
|
+
|
|
|
+ viewer.report = report;
|
|
|
+
|
|
|
+
|
|
|
+ this.$refs.reportContainer.showContainer(
|
|
|
+ () => {
|
|
|
+ setTimeout(() => {
|
|
|
+ viewer.renderHtml('reportContainer')
|
|
|
+ this.createViewerButtons(viewer)
|
|
|
+ }, 50)
|
|
|
+ },
|
|
|
+ () => {
|
|
|
+ },
|
|
|
+ )
|
|
|
+ console.log(report, 301)
|
|
|
+ // var printButton = report.renderedPages[0].components.find(function(c) {
|
|
|
+ // return c.name === 'printButton';
|
|
|
+ // });
|
|
|
+ // // 为按钮控件添加“PrintReport”事件
|
|
|
+ // printButton.events.add('PrintReport', handlePrintReport);
|
|
|
+ console.log("加载成功完成!");
|
|
|
},
|
|
|
- methods:{
|
|
|
- init(){
|
|
|
- this.times = this.times?this.times:''
|
|
|
- auditProcessListHD(this.checkId,this.batchNo,this.times).then(res =>{
|
|
|
- res.data.data.map((item,index) =>{
|
|
|
- if(item.auditStatus == "A"){
|
|
|
- this.active = index + 2
|
|
|
- item.title = "审批通过"
|
|
|
- item.status = "success"
|
|
|
- }
|
|
|
- if(item.auditStatus == "B"){
|
|
|
- item.title = "审批驳回"
|
|
|
- item.status = "error"
|
|
|
- }
|
|
|
- if(item.auditStatus == "S" || item.auditStatus == "N"){
|
|
|
- item.title = "待审批"
|
|
|
- }
|
|
|
- })
|
|
|
+ // 报表的按钮
|
|
|
+ createViewerButtons(viewer) {
|
|
|
+ viewer.jsObject.collections.images['myClose.png'] =
|
|
|
+ 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAA0ElEQVQ4ja3TO05CQRQG4A8iOwAbtYWETndAaecK7NwCKmETtJZsSBNLobEz8ZFIJQ0UnOGSm3DnYviTybzO/895DQXGWGCVGQuMEqkRcwcfuMOLalziCaf4TIe9UG9nyMJmFRzNGoRK1BU4xxx9G7cfwostciGk+x8MqgySwDXe4tU53hVV+MNtTmAoX84JGv9NYgrHyR6DV8wUSW7hItZLm36ZVoVQxsFJLOMsPOrH/h7dQwR2cdxOTEn8DtUbPGc4V2H7Vb4Yqfedf/GYSGt8VUmxgyfuBAAAAABJRU5ErkJggg=='
|
|
|
+ const closeBtn = viewer.jsObject.SmallButton(
|
|
|
+ 'closeBtn',
|
|
|
+ '关闭',
|
|
|
+ 'myClose.png'
|
|
|
+ )
|
|
|
|
|
|
- let sendObject = {
|
|
|
- ... res.data.data[0],
|
|
|
- auditName:res.data.data[0].sendName,
|
|
|
- auditOpTime:res.data.data[0].sendTime,
|
|
|
- auditMsg:res.data.data[0].sendMsg,
|
|
|
- auditStatus:"O",
|
|
|
- title:"提交",
|
|
|
- }
|
|
|
- res.data.data.unshift(sendObject)
|
|
|
- this.data = res.data.data
|
|
|
- })
|
|
|
+ const toolbarTable = viewer.jsObject.controls.toolbar.firstChild.firstChild
|
|
|
+ const buttonsTable = toolbarTable.rows[0].lastChild.lastChild
|
|
|
+ const userButtonCell = buttonsTable.rows[0].insertCell(0)
|
|
|
+ userButtonCell.className = 'stiJsViewerClearAllStyles'
|
|
|
+ userButtonCell.appendChild(closeBtn)
|
|
|
+
|
|
|
+ let that = this
|
|
|
+ closeBtn.action = function () {
|
|
|
+ console.log(that.$refs.ReportContainer)
|
|
|
+ if (that.$refs.reportContainer)
|
|
|
+ that.$refs.reportContainer.hideContainer()
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
}
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
- /*::v-deep .el-step__title{*/
|
|
|
- /* font-size: 14px;*/
|
|
|
- /*}*/
|
|
|
+/*::v-deep .el-step__title{*/
|
|
|
+/* font-size: 14px;*/
|
|
|
+/*}*/
|
|
|
</style>
|