| | |
| | | }) |
| | | }, |
| | | 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() |
| | | // 新建 |
| | | if (target == null) { |
| | | this.form = this.defaultForm() |
| | | this.clientList = [] |
| | | this.$nextTick(() => { |
| | | this.$refs.form.resetFields() |
| | | this.form.validity = '' |
| | | this.form.id = '' |
| | | this.form.member = { |
| | | name: "", |
| | | phone: "", |
| | | highCheckor: 0, |
| | | idcardType: 0, |
| | | idcardNo: '', |
| | | email: '', |
| | | } |
| | | this.$refs.form && this.$refs.form.clearValidate() |
| | | }) |
| | | this.form.type = 1 |
| | | if (target == null) { |
| | | return |
| | | } |
| | | // 编辑 |
| | | this.$nextTick(() => { |
| | | if (title == '编辑客户') { |
| | | if (title === '编辑客户') { |
| | | this.getClient(target.id) |
| | | detailById(target.id).then(res => { |
| | | this.form = res |
| | | this.applyDetail(res) |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | getClient(customerId) { |
| | | fetchList({ |