InvDialog.vue 2.63 KB
<template>
	<div>
		<el-dialog el-dialog v-dialogDrag title="报文展示" :visible.sync="showDoc" width="60%" @close="handleClose" 
		destroy-on-close :modal-append-to-body="false" v-if="showDoc">
			<div class="diaClas">
				<el-table max-height="350px" style="text-align: center;" highlight-current-row :data="docList">
				<el-table-column label="报文标识号" sortable min-width="130px" prop="docfil"></el-table-column>
				<el-table-column label="创建日期" sortable min-width="110px" prop="credattim"></el-table-column>
				<el-table-column label="报文码" sortable min-width="130px" prop="msgtyp"></el-table-column>
				<el-table-column label="报文名称" sortable min-width="130px" prop="nam"></el-table-column>
				<el-table-column label="回报信息" sortable min-width="130px" prop="rjctinf"></el-table-column>
				<el-table-column label="报文状态" sortable min-width="130px" prop="staflg"></el-table-column>
				<el-table-column label="业务编号" sortable min-width="130px" prop="extkey"></el-table-column>
				<el-table-column fixed="right" label="操作" width="120px">
					<template slot-scope="scope">
						<el-button @click="showInvDocs(scope.row)" type="text">展示</el-button>
						<el-button @click="print(scope.row)" type="text">打印</el-button>
					</template>
				</el-table-column>
			</el-table>
			</div>
			
		</el-dialog>
		<el-dialog el-dialog v-dialogDrag title="电证报文" :visible.sync="showDocs" width="60%" @close="handleCloses" 
		destroy-on-close :modal-append-to-body="false" v-if="showDocs">
			<ElcView :formatData="formatData" :textContent="textContext" ref="elc"></ElcView>
		</el-dialog>
	</div>
</template>
<script>
import Api from '~/service/Api';
import ElcView from "~/components/business/ELCView";

export default {
	data(){
		return{
			showDoc: false,
			docList: [],
			formatData:{},
			textContext:"",
			showDocs:false
		}
	},
	components:{ElcView},
	methods:{
		handleClose(){
			this.showDoc = false
		},
		handleCloses(){
			this.showDocs = false
		},
		getList(imgInvmod){
			let params = {
				ownref: imgInvmod.ownref,
				imfref: imgInvmod.imfref
			}
			Api.post('/manager/imginf/queryDocsList',params).then(res =>{
				if(res.respCode == "AAAAAA"){
					this.docList = res.data
				}
			})
		},
		 async showInvDocs(row){
			let res = await Api.post("/manager/imginf/showDocs",row.inr)
				if(res.respCode == SUCCESS){
					this.formatData = res.data.formatData;
					this.textContext = res.data.data;
					this.showDocs = true
				}
				return res
		},
		 async print(row){
			 let res = await this.showInvDocs(row)
			 if(res.respCode == SUCCESS){
				 this.$refs.elc.print()
			 }
		}
	}
}
</script>