| | |
| | | export default { |
| | | components: {}, |
| | | filters: { |
| | | formatDate (value) { |
| | | formatDate(value) { |
| | | switch (value.accectType) { |
| | | case 'US': |
| | | return `美元(${value.symbol} ${value.availableBalance})` |
| | |
| | | default: |
| | | break |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | props: { |
| | | getinit: { |
| | | type: Function, |
| | | default: function () {} |
| | | default: function () {}, |
| | | }, |
| | | activeArr: { |
| | | type: Array, |
| | | default: [] |
| | | } |
| | | default: [], |
| | | }, |
| | | }, |
| | | data () { |
| | | data() { |
| | | return { |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 7 } |
| | | sm: { span: 7 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 13 } |
| | | sm: { span: 13 }, |
| | | }, |
| | | editUserform: this.$form.createForm(this), |
| | | editUserdialog: false, |
| | | editUserDialogloading: false, |
| | | fields: ['amt', 'direction', 'userId'], |
| | | currentDetails: {} |
| | | currentDetails: {}, |
| | | } |
| | | }, |
| | | methods: { |
| | | getEditorder (val) { |
| | | getEditorder(val) { |
| | | 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)) |
| | | }, |
| | | CanceleditUserdialog () { |
| | | CanceleditUserdialog() { |
| | | this.editUserdialog = false |
| | | const form = this.$refs.editUserform.form |
| | | form.resetFields() |
| | | }, |
| | | OkeditUserdialog () { |
| | | OkeditUserdialog() { |
| | | const form = this.$refs.editUserform.form |
| | | form.validateFields((errors, values) => { |
| | | console.log(values, 'from') |
| | |
| | | updateMoney({ id: arr[0].id, amt: amt }).then((res) => { |
| | | if (res.status == 0) { |
| | | this.editUserdialog = false |
| | | this.$message.success({ content: res.msg, duration: 2 }) |
| | | this.$message.success(res.msg) |
| | | form.resetFields() |
| | | this.getinit() |
| | | } else { |
| | |
| | | console.log(3333) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | } |
| | | </script> |