diff --git a/src/views/PurchasingCenter/ContractChange/index.vue b/src/views/PurchasingCenter/ContractChange/index.vue index c83b801e..5a587a48 100644 --- a/src/views/PurchasingCenter/ContractChange/index.vue +++ b/src/views/PurchasingCenter/ContractChange/index.vue @@ -26,7 +26,7 @@ 采购员: - + 采购员: - + { - this.contractValue = '' - this.changeReason = '' - if (response.data[0].result === '1') { - this.$message.success('变更成功') - this.searchTable1() - this.contractNumValue = '' - this.contractNumValue3 = '' - this.fetchData() - } else { this.$message.error('变更失败') } + this.$confirm('确定更改该合同?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + contractChange(this.contractValue, this.changeReason).then(response => { + this.contractValue = '' + this.changeReason = '' + if (response.data[0].result === '1') { + this.$message.success('变更成功') + this.searchTable1() + this.contractNumValue = '' + this.contractNumValue3 = '' + this.fetchData() + } else { this.$message.error('变更失败') } + }) + }).catch(() => { + this.$message({ + type: 'info', + message: '已取消操作' + }) }) } else { this.$message.error('请先选择合同')