Merge branch 'master' of http://yun.pashanhoo.com:9090/bdc/bdcdj-web
Showing
3 changed files
with
113 additions
and
60 deletions
1 | <template> | 1 | <template> |
2 | <dialogBox title="申请人信息" width="60%" isMain v-model="myValue" :isFullscreen="false" @submitForm="submitForm" | 2 | <dialogBox |
3 | @closeDialog="closeDialog"> | 3 | title="申请人信息" |
4 | <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px"> | 4 | width="60%" |
5 | isMain | ||
6 | v-model="myValue" | ||
7 | :isFullscreen="false" | ||
8 | @submitForm="submitForm" | ||
9 | @closeDialog="closeDialog" | ||
10 | > | ||
11 | <el-form | ||
12 | :model="ruleForm" | ||
13 | :rules="rules" | ||
14 | ref="ruleForm" | ||
15 | label-width="120px" | ||
16 | > | ||
5 | <el-row> | 17 | <el-row> |
6 | <el-col :span="8"> | 18 | <el-col :span="8"> |
7 | <el-form-item label="权利人类型" prop="sqrlx"> | 19 | <el-form-item label="权利人类型" prop="sqrlx"> |
8 | <el-select clearable v-model="ruleForm.sqrlx" class="width100" placeholder="请选择"> | 20 | <el-select |
9 | <el-option v-for="item in dictData['A36']" :key="item.dcode" :label="item.dname" :value="item.dcode"> | 21 | clearable |
22 | v-model="ruleForm.sqrlx" | ||
23 | class="width100" | ||
24 | placeholder="请选择" | ||
25 | > | ||
26 | <el-option | ||
27 | v-for="item in dictData['A36']" | ||
28 | :key="item.dcode" | ||
29 | :label="item.dname" | ||
30 | :value="item.dcode" | ||
31 | > | ||
10 | </el-option> | 32 | </el-option> |
11 | </el-select> | 33 | </el-select> |
12 | </el-form-item> | 34 | </el-form-item> |
... | @@ -18,8 +40,18 @@ | ... | @@ -18,8 +40,18 @@ |
18 | </el-col> | 40 | </el-col> |
19 | <el-col :span="8"> | 41 | <el-col :span="8"> |
20 | <el-form-item label="证件种类" prop="zjzl"> | 42 | <el-form-item label="证件种类" prop="zjzl"> |
21 | <el-select clearable v-model="ruleForm.zjzl" class="width100" placeholder="请选择"> | 43 | <el-select |
22 | <el-option v-for="item in dictData['A30']" :key="item.dcode" :label="item.dname" :value="item.dcode"> | 44 | clearable |
45 | v-model="ruleForm.zjzl" | ||
46 | class="width100" | ||
47 | placeholder="请选择" | ||
48 | > | ||
49 | <el-option | ||
50 | v-for="item in dictData['A30']" | ||
51 | :key="item.dcode" | ||
52 | :label="item.dname" | ||
53 | :value="item.dcode" | ||
54 | > | ||
23 | </el-option> | 55 | </el-option> |
24 | </el-select> | 56 | </el-select> |
25 | </el-form-item> | 57 | </el-form-item> |
... | @@ -38,8 +70,18 @@ | ... | @@ -38,8 +70,18 @@ |
38 | </el-col> | 70 | </el-col> |
39 | <el-col :span="8"> | 71 | <el-col :span="8"> |
40 | <el-form-item label="性别"> | 72 | <el-form-item label="性别"> |
41 | <el-select clearable v-model="ruleForm.xb" class="width100" placeholder="请选择"> | 73 | <el-select |
42 | <el-option v-for="item in dictData['A43']" :key="item.dcode" :label="item.dname" :value="item.dcode"> | 74 | clearable |
75 | v-model="ruleForm.xb" | ||
76 | class="width100" | ||
77 | placeholder="请选择" | ||
78 | > | ||
79 | <el-option | ||
80 | v-for="item in dictData['A43']" | ||
81 | :key="item.dcode" | ||
82 | :label="item.dname" | ||
83 | :value="item.dcode" | ||
84 | > | ||
43 | </el-option> | 85 | </el-option> |
44 | </el-select> | 86 | </el-select> |
45 | </el-form-item> | 87 | </el-form-item> |
... | @@ -120,8 +162,18 @@ | ... | @@ -120,8 +162,18 @@ |
120 | </el-col> | 162 | </el-col> |
121 | <el-col :span="8"> | 163 | <el-col :span="8"> |
122 | <el-form-item label="代理人证件类型"> | 164 | <el-form-item label="代理人证件类型"> |
123 | <el-select clearable v-model="ruleForm.dlrzjlx" class="width100" placeholder="请选择"> | 165 | <el-select |
124 | <el-option v-for="item in dictData['A30']" :key="item.dcode" :label="item.dname" :value="item.dcode"> | 166 | clearable |
167 | v-model="ruleForm.dlrzjlx" | ||
168 | class="width100" | ||
169 | placeholder="请选择" | ||
170 | > | ||
171 | <el-option | ||
172 | v-for="item in dictData['A30']" | ||
173 | :key="item.dcode" | ||
174 | :label="item.dname" | ||
175 | :value="item.dcode" | ||
176 | > | ||
125 | </el-option> | 177 | </el-option> |
126 | </el-select> | 178 | </el-select> |
127 | </el-form-item> | 179 | </el-form-item> |
... | @@ -138,74 +190,64 @@ | ... | @@ -138,74 +190,64 @@ |
138 | </dialogBox> | 190 | </dialogBox> |
139 | </template> | 191 | </template> |
140 | <script> | 192 | <script> |
141 | import { mapGetters } from 'vuex' | 193 | import { mapGetters } from "vuex"; |
142 | export default { | 194 | export default { |
143 | props: { | 195 | props: { |
144 | value: { type: Boolean, default: false }, | 196 | value: { type: Boolean, default: false }, |
145 | details: { type: Object, default: {} } | 197 | details: { type: Object, default: {} }, |
146 | }, | 198 | }, |
147 | computed: { | 199 | computed: { |
148 | ...mapGetters(["dictData"]), | 200 | ...mapGetters(["dictData"]), |
149 | }, | 201 | }, |
150 | data () { | 202 | data() { |
151 | return { | 203 | return { |
152 | myValue: this.value, | 204 | myValue: this.value, |
153 | ruleForm: { | 205 | ruleForm: { |
154 | sqrlx: '', | 206 | sqrlx: "", |
155 | sqrmc: '', | 207 | sqrmc: "", |
156 | zjzl: '', | 208 | zjzl: "", |
157 | zjh: '', | 209 | zjh: "", |
158 | dh: '', | 210 | dh: "", |
159 | xb: '', | 211 | xb: "", |
160 | frmc: '', | 212 | frmc: "", |
161 | gjdq: '', | 213 | gjdq: "", |
162 | szss: '', | 214 | szss: "", |
163 | dz: '', | 215 | dz: "", |
164 | yb: '', | 216 | yb: "", |
165 | fzjg: '', | 217 | fzjg: "", |
166 | dzyj: '', | 218 | dzyj: "", |
167 | qlbl: '', | 219 | qlbl: "", |
168 | gzdw: '', | 220 | gzdw: "", |
169 | dljg: '', | 221 | dljg: "", |
170 | dlrxm: '', | 222 | dlrxm: "", |
171 | dlrzjlx: '', | 223 | dlrzjlx: "", |
172 | dlrzjh: '' | 224 | dlrzjh: "", |
173 | }, | 225 | }, |
174 | rules: { | 226 | rules: { |
175 | sqrlx: [ | 227 | sqrlx: [{ required: true, message: "权利人类型", trigger: "change" }], |
176 | { required: true, message: '权利人类型', trigger: 'change' } | 228 | sqrmc: [{ required: true, message: "姓名/名称", trigger: "blur" }], |
177 | ], | 229 | zjzl: [{ required: true, message: "证件种类", trigger: "change" }], |
178 | sqrmc: [ | 230 | zjh: [{ required: true, message: "证件号", trigger: "blur" }], |
179 | { required: true, message: '姓名/名称', trigger: 'blur' } | 231 | }, |
180 | ], | 232 | }; |
181 | zjzl: [ | ||
182 | { required: true, message: '证件种类', trigger: 'change' } | ||
183 | ], | ||
184 | zjh: [ | ||
185 | { required: true, message: '证件号', trigger: 'blur' } | ||
186 | ] | ||
187 | } | ||
188 | } | ||
189 | }, | 233 | }, |
190 | watch: { | 234 | watch: { |
191 | value (val) { | 235 | value(val) { |
192 | this.myValue = _.cloneDeep(val) | 236 | this.myValue = _.cloneDeep(val); |
193 | }, | 237 | }, |
194 | details: { | 238 | details: { |
195 | handler: function (val, oldVal) { | 239 | handler: function (val, oldVal) { |
196 | this.ruleForm = val | 240 | this.ruleForm = val; |
197 | }, | 241 | }, |
198 | deep: true | 242 | deep: true, |
199 | } | 243 | }, |
200 | }, | 244 | }, |
201 | methods: { | 245 | methods: { |
202 | closeDialog () { | 246 | closeDialog() { |
203 | this.$emit("input", false); | 247 | this.$emit("input", false); |
204 | this.$refs['ruleForm'].resetFields(); | 248 | this.$refs["ruleForm"].resetFields(); |
205 | }, | 249 | }, |
206 | submitForm () { | 250 | submitForm() { |
207 | this.$emit("input", false); | ||
208 | this.$emit("updateDetail", _.cloneDeep(this.ruleForm)); | ||
209 | // this.$refs['ruleForm'].validate((valid) => { | 251 | // this.$refs['ruleForm'].validate((valid) => { |
210 | // if (valid) { | 252 | // if (valid) { |
211 | // this.$message({ | 253 | // this.$message({ |
... | @@ -217,9 +259,18 @@ export default { | ... | @@ -217,9 +259,18 @@ export default { |
217 | // this.$message.error('请完善必填项'); | 259 | // this.$message.error('请完善必填项'); |
218 | // } | 260 | // } |
219 | // }) | 261 | // }) |
220 | } | 262 | |
221 | } | 263 | this.$refs.ruleForm.validate((valid) => { |
222 | } | 264 | if (valid) { |
265 | this.$emit("input", false); | ||
266 | this.$emit("updateDetail", _.cloneDeep(this.ruleForm)); | ||
267 | } else { | ||
268 | return false; | ||
269 | } | ||
270 | }); | ||
271 | }, | ||
272 | }, | ||
273 | }; | ||
223 | </script> | 274 | </script> |
224 | <style scoped lang="scss"> | 275 | <style scoped lang="scss"> |
225 | .submit-button { | 276 | .submit-button { | ... | ... |
... | @@ -304,6 +304,7 @@ export default { | ... | @@ -304,6 +304,7 @@ export default { |
304 | Init(formdata).then((res) => { | 304 | Init(formdata).then((res) => { |
305 | if (res.code === 200 && res.result) { | 305 | if (res.code === 200 && res.result) { |
306 | this.ruleForm = res.result; | 306 | this.ruleForm = res.result; |
307 | this.ruleForm.diyaq.sfczjzhxz="0"; | ||
307 | } | 308 | } |
308 | }); | 309 | }); |
309 | }, | 310 | }, | ... | ... |
... | @@ -304,6 +304,7 @@ export default { | ... | @@ -304,6 +304,7 @@ export default { |
304 | Init(formdata).then((res) => { | 304 | Init(formdata).then((res) => { |
305 | if (res.code === 200 && res.result) { | 305 | if (res.code === 200 && res.result) { |
306 | this.ruleForm = res.result; | 306 | this.ruleForm = res.result; |
307 | this.ruleForm.diyaq.sfczjzhxz="0"; | ||
307 | } | 308 | } |
308 | }); | 309 | }); |
309 | }, | 310 | }, | ... | ... |
-
Please register or sign in to post a comment