| | |
| | | this.$refs.dataForm.validate((valid) => { |
| | | if (valid) { |
| | | if (this.dataForm.id) { |
| | | updateCustomerOrderById(this.dataForm) |
| | | .then((data) => { |
| | | updateCustomerOrderById(this.dataForm).then((data) => { |
| | | this.$message.success('修改成功') |
| | | this.visible = false |
| | | this.buttonDisable = false |
| | | this.$emit('refreshDataList', 1) |
| | | }) |
| | | .catch((error) => { |
| | | }).catch((error) => { |
| | | this.buttonDisable = false |
| | | }) |
| | | } else { |
| | | addCustomerOrder(this.dataForm) |
| | | .then((data) => { |
| | | addCustomerOrder(this.dataForm).then((data) => { |
| | | this.$message.success('添加成功') |
| | | this.visible = false |
| | | this.buttonDisable = false |
| | | this.$emit('refreshDataList', 1) |
| | | }) |
| | | .catch((error) => { |
| | | }).catch((error) => { |
| | | this.buttonDisable = false |
| | | }) |
| | | } |