| | |
| | | props: { |
| | | getinit: { |
| | | type: Function, |
| | | default: function () {}, |
| | | }, |
| | | default: function () {} |
| | | } |
| | | }, |
| | | 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', 'agentId'], |
| | | 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({ agentId: 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) => { |
| | | if (!errors) { |
| | |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | }, |
| | | } |
| | | } |
| | | } |
| | | </script> |