| | |
| | | show: true, |
| | | total: true, |
| | | sumProp: ["Amount", "Unit", "total"], |
| | | mergeNumber: 3 |
| | | mergeNumber: 2 |
| | | }, |
| | | editSelectClientConfig: { |
| | | editVisible: false, |
| | |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | console.log(this.editConfig.infomation) |
| | | const params = this.saveParams() |
| | | console.log(params) |
| | | if (this.editConfig.title === "新建") { |
| | | addInvoice(params).then((res) => { |
| | | console.log(res) |
| | | this.editConfig.visible = false |
| | | if (res.code === 200) { |
| | | this.$message.success("添加成功") |
| | | this.$parent.getData() |
| | | } |
| | | }) |
| | | for (let i = 0; i < this.tableData.length; i++) { |
| | | if (this.tableData[i].name.length === 0) { |
| | | this.isNoProduct = true |
| | | break |
| | | } else { |
| | | this.isNoProduct = false |
| | | } |
| | | } |
| | | if (this.isNoProduct) { |
| | | this.$message.error("产品名称不能为空") |
| | | } else { |
| | | // getUpdateServiceContract(params).then((res) => { |
| | | // console.log(res) |
| | | // this.editConfig.visible = false |
| | | // if (res.code === 200) { |
| | | // this.$message.success("编辑成功") |
| | | // this.$parent.getData() |
| | | // } |
| | | // }) |
| | | const params = this.saveParams() |
| | | console.log(params) |
| | | if (this.editConfig.title === "新建") { |
| | | addInvoice(params).then((res) => { |
| | | console.log(res) |
| | | this.editConfig.visible = false |
| | | if (res.code === 200) { |
| | | this.$message.success("添加成功") |
| | | this.$parent.getData() |
| | | } |
| | | }) |
| | | } else { |
| | | // getUpdateServiceContract(params).then((res) => { |
| | | // console.log(res) |
| | | // this.editConfig.visible = false |
| | | // if (res.code === 200) { |
| | | // this.$message.success("编辑成功") |
| | | // this.$parent.getData() |
| | | // } |
| | | // }) |
| | | } |
| | | } |
| | | } else { |
| | | console.log("error submit") |