| <template> | 
|     <GlobalWindow | 
|         :title="title" | 
|         width="500px" | 
|         :visible.sync="visible" | 
|         :confirm-working="isWorking" | 
|         @confirm="confirm" | 
|     > | 
|         <el-form ref="form" :model="form" :rules="rules" label-width="90px" inline> | 
|             <el-form-item label="开户银行" prop="receiveBank"> | 
|                 <el-input v-model="form.receiveBank" style="width: 100%;" placeholder="请输入"></el-input> | 
|             </el-form-item> | 
|             <el-form-item label="账号" prop="receiveAccount"> | 
|                 <el-input v-model="form.receiveAccount" placeholder="请输入"></el-input> | 
|             </el-form-item> | 
|             <el-form-item label="户名" prop="receiveUserName"> | 
|                 <el-input v-model="form.receiveUserName" placeholder="请输入"></el-input> | 
|             </el-form-item> | 
|         </el-form> | 
|     </GlobalWindow> | 
| </template> | 
|   | 
| <script> | 
|     import BaseOpera from '@/components/base/BaseOpera' | 
|     import GlobalWindow from '@/components/common/GlobalWindow' | 
|     import { updReceiveInfo } from '@/api/business/settleRisk' | 
|     export default { | 
|         name: 'paymentInformation', | 
|         extends: BaseOpera, | 
|         components: { GlobalWindow }, | 
|         data () { | 
|             return { | 
|                 form: { | 
|                     id: null, | 
|                     receiveBank: '', | 
|                     receiveAccount: '', | 
|                     receiveUserName: '' | 
|                 }, | 
|                 rules: { | 
|                     receiveBank: [ | 
|                         { required: true, message: '不能为空', trigger: 'blur' } | 
|                     ], | 
|                     receiveAccount: [ | 
|                         { required: true, message: '不能为空', trigger: 'blur' } | 
|                     ], | 
|                     receiveUserName: [ | 
|                         { required: true, message: '不能为空', trigger: 'blur' } | 
|                     ] | 
|                 } | 
|             } | 
|         }, | 
|         methods: { | 
|             open (title, target) { | 
|                 this.title = title | 
|                 this.visible = true | 
|                 // 新建 | 
|                 if (target == null) { | 
|                     this.$nextTick(() => { | 
|                         this.$refs.form.resetFields() | 
|                         this.form[this.configData['field.id']] = null | 
|                     }) | 
|                     return | 
|                 } | 
|                 // 编辑 | 
|                 this.$nextTick(() => { | 
|                     for (const key in this.form) { | 
|                         this.form[key] = target[key] | 
|                     } | 
|                 }) | 
|             }, | 
|             confirm() { | 
|                 this.$refs.form.validate((valid) => { | 
|                     if (valid) { | 
|                         this.isWorking = true | 
|                         updReceiveInfo(this.form) | 
|                             .then(() => { | 
|                                 this.visible = false | 
|                                 this.$tip.apiSuccess('修改成功') | 
|                                 this.$emit('success') | 
|                             }) | 
|                             .catch(e => { | 
|                                 this.$tip.apiFailed(e) | 
|                             }) | 
|                             .finally(() => { | 
|                                 this.isWorking = false | 
|                             }) | 
|                     } | 
|                 }); | 
|             } | 
|         } | 
|     } | 
| </script> | 
|   | 
| <style lang="scss" scoped> | 
|   | 
| </style> |