| | |
| | | |
| | | }); |
| | | }, |
| | | handleSubmit2(){ |
| | | alert(this.form) |
| | | console.log( 99999999999999) |
| | | console.log( this.data) |
| | | const { form: { validateFields } } = this |
| | | this.confirmLoading = true |
| | | validateFields((errors, values) => { |
| | | if (!errors) { |
| | | for (const key in values) { |
| | | if (typeof (values[key]) === 'object') { |
| | | values[key] = JSON.stringify(values[key]) |
| | | } |
| | | } |
| | | console.log(22222222222222222) |
| | | console.log(values ) |
| | | this.confirmLoading = false |
| | | // WmsMaterialAdd(values).then((res) => { |
| | | // if (res.success) { |
| | | // this.$message.success('新增成功') |
| | | // this.confirmLoading = false |
| | | // this.$emit('ok', values) |
| | | // this.handleCancel() |
| | | // } else { |
| | | // this.$message.error('新增失败:' + JSON.stringify(res.message)) |
| | | // } |
| | | // }).finally((res) => { |
| | | // this.confirmLoading = false |
| | | // }) |
| | | |
| | | // return values |
| | | |
| | | } else { |
| | | this.confirmLoading = false |
| | | } |
| | | }) |
| | | }, |
| | | /** |
| | | * 提交表单 |
| | | */ |
| | |
| | | values[key] = JSON.stringify(values[key]) |
| | | } |
| | | } |
| | | |
| | | WmsMaterialAdd(values).then((res) => { |
| | | if (res.success) { |
| | | this.$message.success('新增成功') |
| | |
| | | }).finally((res) => { |
| | | this.confirmLoading = false |
| | | }) |
| | | |
| | | // return values |
| | | |
| | | } else { |
| | | this.confirmLoading = false |
| | | } |