* When repairing the project and execution linked products, the branch judgment problem.

This commit is contained in:
tianshujie
2021-11-11 09:42:37 +08:00
parent 16251869b4
commit 5582354037
4 changed files with 48 additions and 64 deletions
+4 -8
View File
@@ -88,32 +88,28 @@ $(function()
$("#productsBox select[name^='products']").each(function()
{
var productID = $(this).val();
products[productID] = new Array();
if(typeof(products[productID]) == 'undefined') products[productID] = new Array();
if(multiBranchProducts[productID])
{
$("#productsBox select[name^='branch']").each(function()
{
var branchID = $(this).val();
var branchID = $(this).closest('.input-group').find("select[id^=branch]").val();
if(products[productID][branchID])
{
existedBranch = true;
return false;
}
else
{
products[productID][branchID] = branchID;
}
})
if(existedBranch) return false;
}
})
});
if(existedBranch)
{
bootbox.alert(errorSameBranches);
return false;
}
})
});
});
function showLifeTimeTips()
+4 -8
View File
@@ -11,32 +11,28 @@ $().ready(function()
$("#productsBox select[name^='products']").each(function()
{
var productID = $(this).val();
products[productID] = new Array();
if(typeof(products[productID]) == 'undefined') products[productID] = new Array();
if(multiBranchProducts[productID])
{
$("#productsBox select[name^='branch']").each(function()
{
var branchID = $(this).val();
var branchID = $(this).closest('.input-group').find("select[id^=branch]").val();
if(products[productID][branchID])
{
existedBranch = true;
return false;
}
else
{
products[productID][branchID] = branchID;
}
})
if(existedBranch) return false;
}
})
});
if(existedBranch)
{
bootbox.alert(errorSameBranches);
return false;
}
})
});
});
$(function()
+4 -8
View File
@@ -35,32 +35,28 @@ $(function()
$("#productsBox select[name^='products']").each(function()
{
var productID = $(this).val();
products[productID] = new Array();
if(typeof(products[productID]) == 'undefined') products[productID] = new Array();
if(multiBranchProducts[productID])
{
$("#productsBox select[name^='branch']").each(function()
{
var branchID = $(this).val();
var branchID = $(this).closest('.input-group').find("select[id^=branch]").val();
if(products[productID][branchID])
{
existedBranch = true;
return false;
}
else
{
products[productID][branchID] = branchID;
}
})
if(existedBranch) return false;
}
})
});
if(existedBranch)
{
bootbox.alert(errorSameBranches);
return false;
}
})
});
});
/**
+4 -8
View File
@@ -103,32 +103,28 @@ $(function()
$("#productsBox select[name^='products']").each(function()
{
var productID = $(this).val();
products[productID] = new Array();
if(typeof(products[productID]) == 'undefined') products[productID] = new Array();
if(multiBranchProducts[productID])
{
$("#productsBox select[name^='branch']").each(function()
{
var branchID = $(this).val();
var branchID = $(this).closest('.input-group').find("select[id^=branch]").val();
if(products[productID][branchID])
{
existedBranch = true;
return false;
}
else
{
products[productID][branchID] = branchID;
}
})
if(existedBranch) return false;
}
})
});
if(existedBranch)
{
bootbox.alert(errorSameBranches);
return false;
}
})
});
});
/**