Commit 6666abf0 by zhangquan

合同优化需求

1 parent 01e416ae
<template> <template>
<div>
<GLDialog bigTitle="选择合同" <GLDialog bigTitle="选择合同"
mode="big" mode="big"
:visible.sync="changeContractObj.visible" :visible.sync="changeContractObj.visible"
...@@ -25,13 +26,17 @@ ...@@ -25,13 +26,17 @@
</span> </span>
</GLTable> </GLTable>
</GLDialog> </GLDialog>
<pdf-dialog :isVisible="isPdfVisible" title="合同" :pdfUrl="pdfUrl" @closeDialog="handlePdfClose"></pdf-dialog>
</div>
</template> </template>
<script> <script>
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import pdfDialog from '@/views/beforeSale/pdfDialog'
import glsxCombiForm from '@/components/glsx-combi-form' import glsxCombiForm from '@/components/glsx-combi-form'
export default { export default {
name: 'changeContract', name: 'changeContract',
components: { components: {
pdfDialog,
glsxCombiForm glsxCombiForm
}, },
props: { props: {
...@@ -43,6 +48,8 @@ ...@@ -43,6 +48,8 @@
data() { data() {
return { return {
size: 'small', size: 'small',
isPdfVisible: false,
pdfUrl: '',
curId: '', curId: '',
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
getListApi: this.$apis.contractManager.getContractListApi, getListApi: this.$apis.contractManager.getContractListApi,
...@@ -98,6 +105,24 @@ ...@@ -98,6 +105,24 @@
mounted() { mounted() {
}, },
methods: { methods: {
handlePdfClose() {
this.isPdfVisible = !this.isPdfVisible
},
// 打印
handlePdf(row) {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)'
})
this.$apis.contractManager.printContractApi({ packageCode : row.packageCode , merchantId: row.merchantId }).then(res => {
this.pdfUrl = res
this.handlePdfClose()
loading.close()
})
},
beforeSearchFn() { beforeSearchFn() {
return new Promise(resolve => { return new Promise(resolve => {
resolve() resolve()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!