| | |
| | | var isDuplicate = false; |
| | | for (var j = 0; j < xxDataList.length; j++) { |
| | | if (xxDataList[j].locNo === data[i].locNo && xxDataList[j].matnr === data[i].matnr && xxDataList[j].batch === data[i].batch) { |
| | | isDuplicate = true; |
| | | duplicateCount++; |
| | | break; |
| | | if (xxDataList[j].diffQty !== 0){ |
| | | isDuplicate = true; |
| | | duplicateCount++; |
| | | break; |
| | | } |
| | | |
| | | } |
| | | } |
| | | if (data[j].diffQty !== 0){ |
| | | isDuplicate = true; |
| | | duplicateCount++; |
| | | } |
| | | // 如果不重复,则添加到列表 |
| | | if (!isDuplicate) { |
| | |
| | | insTbSSXM.reload({data: xxDataList, page: {curr: 1}}); |
| | | // 提示添加结果 |
| | | if (duplicateCount > 0) { |
| | | layer.msg('成功添加 ' + addedCount + ' 条数据,' + duplicateCount + ' 条重复数据已忽略', {icon: 1}); |
| | | layer.msg('成功添加 ' + addedCount + ' 条数据,' + duplicateCount + ' 条数据已忽略', {icon: 1}); |
| | | } else if (addedCount > 0) { |
| | | layer.msg('成功添加 ' + addedCount + ' 条数据', {icon: 1}); |
| | | } |