企业银行
Showing
3 changed files
with
20 additions
and
3 deletions
... | @@ -99,7 +99,7 @@ | ... | @@ -99,7 +99,7 @@ |
99 | } | 99 | } |
100 | }; | 100 | }; |
101 | import store from '@/store/index.js' | 101 | import store from '@/store/index.js' |
102 | import { addQy, update } from "@/api/xxba.js" | 102 | import { addQy, update, addYh } from "@/api/xxba.js" |
103 | import clxx from './clxx/index.vue' | 103 | import clxx from './clxx/index.vue' |
104 | export default { | 104 | export default { |
105 | props: { | 105 | props: { |
... | @@ -215,6 +215,7 @@ | ... | @@ -215,6 +215,7 @@ |
215 | that.$refs['ruleForm'].validate((valid) => { | 215 | that.$refs['ruleForm'].validate((valid) => { |
216 | if (valid) { | 216 | if (valid) { |
217 | store.dispatch("user/refreshPage", false); | 217 | store.dispatch("user/refreshPage", false); |
218 | if (this.formData.QyYh == 1) { | ||
218 | addQy(this.ruleForm).then(res => { | 219 | addQy(this.ruleForm).then(res => { |
219 | if (res.code == 200) { | 220 | if (res.code == 200) { |
220 | that.$message.success('保存成功') | 221 | that.$message.success('保存成功') |
... | @@ -229,6 +230,22 @@ | ... | @@ -229,6 +230,22 @@ |
229 | } | 230 | } |
230 | }) | 231 | }) |
231 | } else { | 232 | } else { |
233 | addYh(this.ruleForm).then(res => { | ||
234 | if (res.code == 200) { | ||
235 | that.$message.success('保存成功') | ||
236 | that.$emit("input", false); | ||
237 | that.$refs['ruleForm'].resetFields(); | ||
238 | that.resetTableFields(); | ||
239 | that.closeDialog(); | ||
240 | //刷新列表 | ||
241 | store.dispatch("user/refreshPage", true); | ||
242 | } else { | ||
243 | that.$message.error(res.message); | ||
244 | } | ||
245 | }) | ||
246 | } | ||
247 | |||
248 | } else { | ||
232 | this.$message.error('请完善表单'); | 249 | this.$message.error('请完善表单'); |
233 | return false; | 250 | return false; |
234 | } | 251 | } | ... | ... |
... | @@ -106,7 +106,7 @@ | ... | @@ -106,7 +106,7 @@ |
106 | * @author: renchao | 106 | * @author: renchao |
107 | */ | 107 | */ |
108 | handleAdd () { | 108 | handleAdd () { |
109 | this.$popupDialog("添加企业", "xxba/components/addDialog", { isAdd: 1 }, "75%") | 109 | this.$popupDialog("添加企业", "xxba/components/addDialog", { isAdd: 1, QyYh: 1 }, "75%") |
110 | }, | 110 | }, |
111 | /** | 111 | /** |
112 | * @description: handleDelete | 112 | * @description: handleDelete | ... | ... |
... | @@ -105,7 +105,7 @@ | ... | @@ -105,7 +105,7 @@ |
105 | * @author: renchao | 105 | * @author: renchao |
106 | */ | 106 | */ |
107 | handleAdd () { | 107 | handleAdd () { |
108 | this.$popupDialog("添加银行", "xxba/components/addDialog", { isAdd: 1 }, "75%") | 108 | this.$popupDialog("添加银行", "xxba/components/addDialog", { isAdd: 1, QyYh: 2 }, "75%") |
109 | }, | 109 | }, |
110 | /** | 110 | /** |
111 | * @description: handleDelete | 111 | * @description: handleDelete | ... | ... |
-
Please register or sign in to post a comment