| | |
| | | <el-form-item label="证件号码" prop="member.idcardNo"> |
| | | <el-input v-model="form.member.idcardNo" placeholder="请输入" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="邮箱" prop="email"> |
| | | <el-form-item label="邮箱" prop="member.email" :rules="[ |
| | | { required: false, type: 'email', message: '请输入正确的邮箱格式'} |
| | | ]"> |
| | | <el-input v-model="form.member.email" placeholder="请输入邮箱" v-trim /> |
| | | </el-form-item> |
| | | </template> |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | defaultForm() { |
| | | return { |
| | | id: null, |
| | | validity: '', |
| | | creator: '', |
| | | createDate: '', |
| | | editor: '', |
| | | editDate: '', |
| | | isdeleted: '', |
| | | remark: '', |
| | | industryId: '', |
| | | type: 1, |
| | | name: '', |
| | | phone: '', |
| | | idcardNo: '', |
| | | idcardDecode: '', |
| | | code: '', |
| | | status: '', |
| | | memberName: '', |
| | | lastLoginDate: '', |
| | | loginNum: '', |
| | | userId: '', |
| | | memberId: '', |
| | | accountBank: '', |
| | | accountNo: '', |
| | | accountPhone: '', |
| | | creditCard: '', |
| | | fpType: '', |
| | | accountAddr: '', |
| | | email: '', |
| | | selLangTime: false, |
| | | member: { |
| | | name: '', |
| | | phone: '', |
| | | highCheckor: 0, |
| | | idcardType: 0, |
| | | idcardNo: '', |
| | | email: '' |
| | | } |
| | | } |
| | | }, |
| | | openTrade() { |
| | | this.$refs.OperaCategoryWindowRef.open('新增行业') |
| | | }, |
| | |
| | | this.cateList = res |
| | | }) |
| | | }, |
| | | applyDetail(res) { |
| | | const base = this.defaultForm() |
| | | this.form = Object.assign(base, res, { |
| | | member: Object.assign({}, base.member, res.member || {}) |
| | | }) |
| | | this.form.selLangTime = this.form.validity === '2099-12-31' |
| | | }, |
| | | open(title, target) { |
| | | this.title = title |
| | | this.visible = true |
| | | this.initData() |
| | | // 新建 |
| | | this.form = this.defaultForm() |
| | | this.clientList = [] |
| | | this.$nextTick(() => { |
| | | this.$refs.form && this.$refs.form.clearValidate() |
| | | }) |
| | | if (target == null) { |
| | | this.$nextTick(() => { |
| | | this.$refs.form.resetFields() |
| | | this.form.validity = '' |
| | | this.form.id = '' |
| | | this.form.member = { |
| | | name: "", |
| | | phone: "", |
| | | highCheckor: 0, |
| | | idcardType: 0, |
| | | idcardNo: '', |
| | | email: '', |
| | | } |
| | | }) |
| | | this.form.type = 1 |
| | | return |
| | | } |
| | | // 编辑 |
| | | this.$nextTick(() => { |
| | | if (title == '编辑客户') { |
| | | this.getClient() |
| | | detailById(target.id).then(res => { |
| | | this.form = res |
| | | }) |
| | | } |
| | | }) |
| | | if (title === '编辑客户') { |
| | | this.getClient(target.id) |
| | | detailById(target.id).then(res => { |
| | | this.applyDetail(res) |
| | | }) |
| | | } |
| | | }, |
| | | getClient() { |
| | | getClient(customerId) { |
| | | fetchList({ |
| | | capacity: 9999, |
| | | page: 1, |
| | | model: {} |
| | | model: {customerId} |
| | | }).then(res => { |
| | | this.clientList = res.records |
| | | }) |
| | |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | | </style> |