Commit 9049905e by 胡懿

Merge branch 'master' of 47.92.228.5:huyi/warehouse into hy

parents 40a75f67 4f04e93b
......@@ -155,7 +155,21 @@
searchKeys: "code",
}, function (items) {
if (Array.isArray(items)) {
var data = items.map(function (item) {
/***
* 重复的物资编码去重
*/
var newItems = [];
items.forEach(function(item){
var fined = getTableData().find(function(v){
return v.ledgerInfo.code === item.code
})
if(!fined){
newItems.push(item);
}else{
jp.warning('重复的物资不能添加!');
}
});
var data = newItems.map(function (item) {
item[0] = false;
return {
id: '',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment