f500eb48 by renchao@pashanhoo.com

style:善证

1 parent 141c94e6
<template>
<dialogBox
title="不动产权证书"
width="60%"
v-model="myValue"
@closeDialog="closeDialog"
@submitForm="handleSubmit">
<div>
<div>
<div class="zsdy-content loadingtext">
<el-form
:model="ruleForm"
:rules="rules"
......@@ -23,25 +17,30 @@
</el-select>
</el-form-item>
</el-form>
<img :src="previewImage" style="width: 100%">
</div>
<div class="text-center paddingtop10">
<el-button @click="$popupCacel">取消</el-button>
<el-button type="primary" @click="handleSubmit">确定</el-button>
</div>
<img :src="previewImage">
</div>
</dialogBox>
</template>
<script>
import { datas } from "../javascript/zsyl.js";
import store from '@/store/index.js'
import { datas } from "../../javascript/zsyl.js";
import { readYsxlh, certificate, bdcqzPreview } from "@/api/bdcqz.js";
export default {
components: {},
props: {
value: { type: Boolean, default: false },
bdcqz: { type: Object, default: () => { } },
formData: {
type: Object,
default: () => {
return {}
}
}
},
data () {
return {
myValue: this.value,
//印刷序列号集合
ysxlh: [],
//证书预览图片
......@@ -53,38 +52,31 @@
szmc: "不动产权证书",
bdcqzlx: "",
szzh: "",
ysxlh: "",
ysxlh: ""
},
rules: {
ysxlh: [
{ required: true, message: "请选择印刷序列号", trigger: "change" },
],
},
};
},
watch: {
value (val) {
this.myValue = val;
if (val) {
this.columns = datas.columns();
this.ysxlhList();
{ required: true, message: "请选择印刷序列号", trigger: "change" }
]
}
}
},
created () {
this.columns = datas.columns()
this.ysxlhList()
this.getBdcqzPreview()
},
methods: {
//获取印刷序列号列表
ysxlhList () {
readYsxlh({ zslx: this.bdcqz.bdcqzlx }).then((res) => {
readYsxlh({ zslx: this.formData.bdcqz.bdcqzlx }).then((res) => {
if (res.code === 200) {
this.ysxlh = res.result;
}
});
},
closeDialog () {
this.$emit("input", false);
})
},
handleSubmit () {
this.savePrintRecord();
this.savePrintRecord()
},
//获取证书内容
getRowValue (code) {
......@@ -93,7 +85,7 @@
},
getBdcqzPreview () {
this.$startLoading()
bdcqzPreview(this.bdcqz).then(res => {
bdcqzPreview(this.formData.bdcqz).then(res => {
this.$endLoading()
let blob = new Blob([res]);
let url = window.URL.createObjectURL(blob);
......@@ -102,17 +94,17 @@
},
//保存打印记录
savePrintRecord () {
this.ruleForm.bsmBdcqz = this.bdcqz.bsmBdcqz;
this.ruleForm.bdcqzlx = this.bdcqz.bdcqzlx;
this.ruleForm.szzh = this.bdcqz.bdcqzh;
this.ruleForm.bsmBdcqz = this.formData.bdcqz.bsmBdcqz;
this.ruleForm.bdcqzlx = this.formData.bdcqz.bdcqzlx;
this.ruleForm.szzh = this.formData.bdcqz.bdcqzh;
certificate(this.ruleForm).then((res) => {
if (res.code === 200) {
this.$emit("input", false);
this.$message.success("提交成功");
this.$popupCacel()
this.$message.success("提交成功")
//刷新列表
this.$parent.list();
store.dispatch('user/refreshPage', true);
} else {
this.$message.error(res.message);
this.$message.error(res.message)
}
});
},
......@@ -121,7 +113,13 @@
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
.zsdy-content {
height: 80vh;
overflow-y: scroll;
}
.paddingtop10 {
padding-top: 10px;
}
.aaaa {
width: 1024px;
height: 739px;
......
......@@ -11,7 +11,7 @@
</template>
<script>
import { datas } from "../javascript/zsyl.js";
import { datas } from "../../javascript/zsyl.js";
import { getSlsqBdcqzList, bdcqzPreview } from "@/api/bdcqz.js"
export default {
name: "zsyl",
......
......@@ -32,7 +32,6 @@
<div class="text color_red">
<span>{{ item.syqx }}</span>
</div>
<!-- <div class="top_line middle_margin"></div> -->
<div class="text color_iray">
<span>印刷序列号:{{ item.ysxlh }}</span>
</div>
......@@ -65,15 +64,13 @@
</div>
</div>
</el-dialog>
<bdcqzPrint ref="bdcqzPrint" v-model="dialog" :bdcqz="bdcqz" />
<el-empty description="暂无数据" v-if="tableData.length == 0"></el-empty>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import { getSlsqBdcqzList, invalidCertificate, getSzRecordList } from "@/api/bdcqz.js";
import bdcqzPrint from "./zsdy.vue";
export default {
components: { bdcqzPrint },
props: {},
data () {
return {
......@@ -87,6 +84,16 @@
bsmBdcqz: ""
};
},
computed: {
...mapGetters(['isRefresh'])
},
watch: {
isRefresh: {
handler (newVal, oldVal) {
if (newVal) this.list()
}
}
},
created () {
this.list();
},
......@@ -105,22 +112,11 @@
},
//打开证书预览弹窗
openZsylDialog (item, type) {
let that = this;
if (type == 1) {
//证书预览
this.$popup("证书预览", "workflow/components/zsyl", {
height: "630px",
width: "800px",
formData: {
bdcqz: item,
}
});
this.$popupDialog("证书预览", "workflow/components/dialog/zsyl", { bdcqz: item }, "70%", true);
} else {
this.$nextTick(() => {
this.dialog = true;
this.bdcqz = item;
this.$refs.bdcqzPrint.getBdcqzPreview();
})
this.$popupDialog("不动产权证书", "workflow/components/dialog/zsdy", { bdcqz: item }, "70%", true);
}
},
//再次打印
......