供应商防止重复

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

@@ -20,7 +20,7 @@ export function addTable(supplierName, businessNature, creationDate, registeredC
data: {
type: '2',
name: '采购管理_供应商_增加数据',
param: '供应商名称=' + supplierName + '&企业性质=' + businessNature + '&创立日期=' + creationDate + '&注册资本=' + registeredCapital + '&税号=' + taxNumber + '&开户行=' + bank + '&账号=' + account + '&电子信箱=' + email + '&地址=' + address + '&电话号码=' + telephone + '&传真=' + fax + '&货期=' + deliveryPeriod
param: '供应商名称=' + supplierName + '&企业性质=' + businessNature + '&创立日期=' + creationDate + '&注册资本=' + registeredCapital + '&税号=' + taxNumber + '&开户行=' + bank + '&账号=' + account + '&电子信箱=' + email + '&地址=' + address + '&电话号码=' + telephone + '&传真=' + fax + '&货期=' + deliveryPeriod + '&output1=1=int=output'
}
})
}

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