供应商防止重复

This commit is contained in:
chenjianan
2019-04-19 11:24:22 +08:00
parent eaafdf9538
commit d1c8408275
2 changed files with 5 additions and 2 deletions

View File

@@ -452,7 +452,10 @@ export default {
this.$refs[formName].validate((valid) => {
if (valid) {
addTable(this.form.供应商名称, this.form.企业性质, this.form.创立日期, this.form.注册资本, this.form.税号, this.form.开户行, this.form.帐号, this.form.电子信箱, this.form.地址, this.form.电话号码, this.form.传真, this.form.货期).then(response => {
if (response.data[0].result === '1') {
console.log(response.data)
if (Number(response.data.output[0].output1) === 0) {
this.$message.warning('该供应商已存在')
} else if (response.data.result[0].result === '1') {
this.$message.success('增加成功')
this.dialogFormVisible = false
this.pageCurrent = 1