| | |
| | | placeholder="请选择账户" |
| | | v-decorator="['accectType', { rules: [{ required: true, message: '请选择账户' }] }]" |
| | | > |
| | | <a-select-option v-for="item in activeArr" :key="item.id" :value="item.accectType"> |
| | | {{ |
| | | <a-select-option v-for="item in activeArr" :key="item.id" :value="item.accectType">{{ |
| | | item | formatDate |
| | | }}</a-select-option> |
| | | </a-select> |
| | |
| | | return `印度(${value.symbol} ${value.availableBalance})` |
| | | case 'SGP': |
| | | return `新加坡(${value.symbol} ${value.availableBalance})` |
| | | case 'ST': |
| | | return `沙特(${value.symbol} ${value.availableBalance})` |
| | | case 'USDT': |
| | | return `USDT( ${value.availableBalance})` |
| | | default: |
| | | break |
| | | } |
| | |
| | | data() { |
| | | return { |
| | | labelCol: { |
| | | xs: { |
| | | span: 24, |
| | | }, |
| | | sm: { |
| | | span: 7, |
| | | }, |
| | | xs: { span: 24 }, |
| | | sm: { span: 7 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { |
| | | span: 24, |
| | | }, |
| | | sm: { |
| | | span: 13, |
| | | }, |
| | | xs: { span: 24 }, |
| | | sm: { span: 13 }, |
| | | }, |
| | | editUserform: this.$form.createForm(this), |
| | | editUserdialog: false, |
| | |
| | | }, |
| | | methods: { |
| | | getEditorder(val) { |
| | | val.accectType = 'ST' |
| | | val.accectType = 'IN' |
| | | this.currentDetails = val |
| | | this.editUserdialog = true |
| | | this.fields.forEach((v) => this.editUserform.getFieldDecorator(v)) |
| | | this.editUserform.setFieldsValue(pick(val, this.fields)) |
| | | this.editUserform.setFieldsValue( |
| | | pick( |
| | | { |
| | | userId: val.id, |
| | | }, |
| | | this.fields |
| | | ) |
| | | ) |
| | | this.editUserform.setFieldsValue(pick({ userId: val.id }, this.fields)) |
| | | }, |
| | | CanceleditUserdialog() { |
| | | this.editUserdialog = false |
| | |
| | | }, |
| | | OkeditUserdialog() { |
| | | const form = this.$refs.editUserform.form |
| | | console.log(form) |
| | | console.log(this.activeArr); |
| | | form.validateFields((errors, values) => { |
| | | console.log(values, 'from', !errors, this.activeArr) |
| | | console.log('Errors', errors) |
| | | console.log(values, 'from', !errors) |
| | | const arr = this.activeArr.filter((item) => item.accectType === values.accectType) |
| | | const amt = values.amt |
| | | |
| | | console.log(arr) |
| | | if (!errors) { |
| | | this.editUserDialogloading = true |
| | | console.log({ |
| | | id: arr[0].id, |
| | | amt: amt, |
| | | type: this.direction, |
| | | }) |
| | | updateMoney({ |
| | | id: arr[0].id, |
| | | amt: amt, |
| | | type: values.direction, |
| | | accectType: values.accectType, |
| | | }) |
| | | console.log({ id: arr[0].id, amt: amt, type: this.direction }) |
| | | updateMoney({ id: arr[0].id, amt: amt, type: values.direction }) |
| | | .then((res) => { |
| | | if (res.status == 0) { |
| | | this.editUserdialog = false |
| | |
| | | form.resetFields() |
| | | this.getinit() |
| | | } else { |
| | | this.$message.error({ |
| | | content: res.msg || '划转成功', |
| | | }) |
| | | this.$message.error({ content: res.msg || '划转成功' }) |
| | | } |
| | | this.editUserDialogloading = false |
| | | }) |