| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getAddContact, getUpdateContact } from "@/api/client/contacts" |
| | | // import { getAddContact, getUpdateContact } from "@/api/client/contacts" |
| | | import CommonFormTableView from "@/components/makepager/CommonFormTableView" |
| | | export default { |
| | | name: "AddNewProduct", |
| | |
| | | const params = this.saveParams() |
| | | console.log(params) |
| | | if (this.editConfig.title === "添加") { |
| | | getAddContact(params).then((res) => { |
| | | console.log(res) |
| | | this.editConfig.visible = false |
| | | if (res.code === 200) { |
| | | this.$message.success("添加成功") |
| | | this.$parent.getData() |
| | | } |
| | | }) |
| | | // getAddContact(params).then((res) => { |
| | | // console.log(res) |
| | | // this.editConfig.visible = false |
| | | // if (res.code === 200) { |
| | | // this.$message.success("添加成功") |
| | | // this.$parent.getData() |
| | | // } |
| | | // }) |
| | | } else { |
| | | getUpdateContact(params).then((res) => { |
| | | console.log(res) |
| | | this.editConfig.visible = false |
| | | if (res.code === 200) { |
| | | this.$message.success("编辑成功") |
| | | this.$parent.getData() |
| | | } |
| | | }) |
| | | // getUpdateContact(params).then((res) => { |
| | | // console.log(res) |
| | | // this.editConfig.visible = false |
| | | // if (res.code === 200) { |
| | | // this.$message.success("编辑成功") |
| | | // this.$parent.getData() |
| | | // } |
| | | // }) |
| | | } |
| | | }, |
| | | saveParams() { |