Commit 94429553 by zhangxw

查看合同bug修复

1 parent 5d35e78d
......@@ -374,7 +374,8 @@ export default {
},
methods: {
// 查看合同
handleContractPdf() {
handleContractPdf(flag) {
if (flag) return
const loading = this.$loading({
lock: true,
text: 'Loading',
......
......@@ -61,6 +61,8 @@
<GLDialog class="gl-form-page gl-form-min" title="审核不通过" mode="mid" :visible.sync="showNoPassDialog" @onOk="comfirmNoPass" @onCancel="cancleNoPass">
<glsx-combi-form ref="noPassRef" :isInline="false" labelWidth="154px" defaultWidth="284px" :formObj="noPassObj" :formData="noPassForm"></glsx-combi-form>
</GLDialog>
<!-- 查看合同 -->
<contract-dialog v-if="pageType != 1" ref="contract-dialog" :isVisible="contractVisible" :pdfUrl="pdfUrl" @handleContractPdf="handleContractPdf" @closeDialog="closeDialog"></contract-dialog>
</div>
</template>
<script>
......@@ -71,6 +73,7 @@ import util from '@/util/util'
import wraning from './components/wraning/index.vue'
import glsxCombiForm from '@/components/glsx-combi-form'
import NP from 'number-precision'
import contractDialog from '../djClaims/components/contractDialog.vue'
export default {
name: 'order',
components: {
......@@ -78,7 +81,8 @@ export default {
repair,
material,
wraning,
glsxCombiForm
glsxCombiForm,
contractDialog
},
data() {
return {
......@@ -174,7 +178,8 @@ export default {
},
reasonForFailureCode: 1,
isWatchOrder: false,
refitInfo: {}
refitInfo: {},
contractVisible: false
}
},
created() {
......@@ -203,6 +208,30 @@ export default {
},
mounted() {},
methods: {
// 查看合同
handleContractPdf(flag) {
if (flag) return
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)'
})
this.$apis.beforeSale.getContractUrlApi({contractNo: this.editForm?.contractNo}).then(res => {
let { code, message } = res
if (code == 0) {
this.pdfUrl = res.data
this.contractVisible = true
} else {
this.$message.error(message)
}
loading.close()
})
},
// 关闭查看合同弹窗
closeDialog() {
this.contractVisible = false
},
// 校验上传资料是否填完
verifyWarningImage() {
if (!this.queryList) {
......
......@@ -279,7 +279,8 @@ export default {
},
methods: {
// 查看合同
handleContractPdf() {
handleContractPdf(flag) {
if (flag) return
const loading = this.$loading({
lock: true,
text: 'Loading',
......
<template>
<!-- 合同内容弹窗 -->
<div
v-if="isVisible"
class="pdf-preview-container"
:style="containerStyle"
@mousedown="startDrag"
@touchstart.passive="startDrag"
>
<div class="pdf-header" >
<span>{{ title }}</span>
<button class="close-btn" @click="close">×</button>
<div>
<div
v-if="isVisible"
class="pdf-preview-container"
:style="containerStyle"
@mousedown="startDrag"
@touchstart.passive="startDrag"
>
<div class="pdf-header" >
<span>{{ title }}</span>
<button class="close-btn" @click="close">×</button>
</div>
<div class="pdf-content">
<iframe
ref="pdfIframe"
:src="pdfUrl"
frameborder="0"
:style="iframeStyle"
></iframe>
</div>
<!-- 八个方向的缩放控制点 -->
<div class="resize-handle n" @mousedown="startResize($event, 'n')"></div>
<div class="resize-handle e" @mousedown="startResize($event, 'e')"></div>
<div class="resize-handle s" @mousedown="startResize($event, 's')"></div>
<div class="resize-handle w" @mousedown="startResize($event, 'w')"></div>
<div class="resize-handle ne" @mousedown="startResize($event, 'ne')"></div>
<div class="resize-handle nw" @mousedown="startResize($event, 'nw')"></div>
<div class="resize-handle se" @mousedown="startResize($event, 'se')"></div>
<div class="resize-handle sw" @mousedown="startResize($event, 'sw')"></div>
</div>
<div class="pdf-content">
<iframe
ref="pdfIframe"
:src="pdfUrl"
frameborder="0"
:style="iframeStyle"
></iframe>
<!-- 功能入口 -->
<div class="point-btn" @click.capture="handleShow">
<img src="../../../assets/view-icon.png" alt="">
<div class="contact_text">查看合同</div>
</div>
<!-- 八个方向的缩放控制点 -->
<div class="resize-handle n" @mousedown="startResize($event, 'n')"></div>
<div class="resize-handle e" @mousedown="startResize($event, 'e')"></div>
<div class="resize-handle s" @mousedown="startResize($event, 's')"></div>
<div class="resize-handle w" @mousedown="startResize($event, 'w')"></div>
<div class="resize-handle ne" @mousedown="startResize($event, 'ne')"></div>
<div class="resize-handle nw" @mousedown="startResize($event, 'nw')"></div>
<div class="resize-handle se" @mousedown="startResize($event, 'se')"></div>
<div class="resize-handle sw" @mousedown="startResize($event, 'sw')"></div>
</div>
<!-- 功能入口 -->
<div v-else class="point-btn" @click.capture="handleShow">
<img src="../../../assets/view-icon.png" alt="">
<div class="contact_text">查看合同</div>
</div>
</template>
......@@ -73,9 +75,10 @@ export default {
watch: {
isVisible: {
handler(n) {
console.log(n)
this.size.width = 400
this.size.height = 500
this.position.x = 800
this.position.y = 100
}
}
},
......@@ -116,7 +119,7 @@ export default {
},
methods: {
handleShow() {
this.$emit('handleContractPdf')
this.$emit('handleContractPdf', this.isVisible)
},
startDrag(e) {
// 忽略缩放控制点的点击
......
......@@ -402,7 +402,8 @@ export default {
},
methods: {
// 查看合同
handleContractPdf() {
handleContractPdf(flag) {
if (flag) return
const loading = this.$loading({
lock: true,
text: 'Loading',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!