|
@@ -225,7 +225,10 @@ export default {
|
|
|
// 新增触发
|
|
|
rowSave(row,done,loading) {
|
|
|
if (!row.corpId) return this.$message.error('客户不能为空')
|
|
|
- const repeat = this.dataList.some(item => item.corpId == row.corpId)
|
|
|
+ let repeat = false
|
|
|
+ for (let item = 0;item < this.dataList.length - 1;item++) {
|
|
|
+ if (row.corpId == this.dataList[item].corpId) repeat = true
|
|
|
+ }
|
|
|
if (repeat) return this.$message.error('客户已存在')
|
|
|
updateList(row).then(res => {
|
|
|
this.$message.success(row.id? '修改成功':'新增成功')
|