zslq.vue
4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<template>
<div class="zslq">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px">
<el-row>
<el-col :span="8">
<el-form-item label="发证人姓名">
<el-input v-model="ruleForm.fzrxm" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="发证时间">
<el-input v-model="ruleForm.fzrxm" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="发证数量">
<el-input v-model="ruleForm.fzsl" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<lb-table border :column="tableData.columns" :data="tableData.data" :pagination="false" :heightNum="600">
</lb-table>
<el-row>
<el-col :span="6">
<el-form-item label="领证人" prop="lzrxm">
<el-input v-model="ruleForm.lzrxm"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="证件类型" prop="lzrzjlb">
<el-select v-model="ruleForm.lzrzjlb" filterable clearable placeholder="请选择">
<el-option v-for="item in zslqList" :key="item.dcode" :label="item.dname" :value="item.dcode">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="证件号" prop="lzrzjh">
<el-input v-model="ruleForm.lzrzjh"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="领证人电话" prop="lzrdh">
<el-input v-model="ruleForm.lzrdh"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</template>
<script>
import store from '@/store/index.js'
import table from "@/utils/mixin/table";
import { getCertificateList, issueCertificate } from "@/api/fqsq.js";
import { datas } from "../javascript/fzxxdata";
export default {
mixins: [table],
data () {
return {
zslqList: [],
ruleForm: {
fzrxm: '',
fzsj: '',
fzsl: '',
bsmBdcqz: [],
lzrxm: '',
lzrzjlb: '',
lzrzjh: '',
lzrdh: ''
},
rules: {
lzrxm: [
{ required: true, message: '请输入领证人', trigger: 'blur' }
],
lzrzjlb: [
{ required: true, message: '请选择证件类型', trigger: 'change' }
],
lzrzjh: [
{ required: true, message: '请输入证件号', trigger: 'blur' }
],
lzrdh: [
{ required: true, message: '请输入电话号码', trigger: 'blur' }
],
},
tableData: {
total: 0,
columns: datas.columns(),
data: [],
},
}
},
created () {
this.zslqList = store.getters.dictData['A30']
},
methods: {
fetchData () { },
//列表初始化
tablelistFn () {
var bsmSldy = this.$parent._data.unitData[0].bsmSldy
getCertificateList({ "bsmSldy": bsmSldy }).then(res => {
if (res.code === 200) {
this.tableData.data = res.result
if (res.result) {
res.result.forEach((item, index) => {
this.ruleForm.bsmBdcqz.push(item.bsmBdcqz)
})
}
}
})
},
submitForm () {
this.$refs.ruleForm.validate(valid => {
if (valid) {
issueCertificate(this.ruleForm).then(res => {
if (res.code == 200) {
this.$message.success('保存成功')
this.$emit("input", false);
this.$refs.ruleForm.resetFields();
} else {
this.$message.error(res.message)
}
})
} else {
return false;
}
});
},
closeDialog () {
this.$emit("input", false);
this.$refs.ruleForm.resetFields();
},
}
}
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
</style>