优化默认仓库的加载逻辑
This commit is contained in:
@@ -221,18 +221,21 @@
|
|||||||
options = "";
|
options = "";
|
||||||
for(var i = 0 ;i < depotList.length;i++) {
|
for(var i = 0 ;i < depotList.length;i++) {
|
||||||
var depot = depotList[i];
|
var depot = depotList[i];
|
||||||
if(depot.isDefault){
|
|
||||||
defDepotId = depot.id;
|
|
||||||
}
|
|
||||||
var config = getSystemConfig();
|
var config = getSystemConfig();
|
||||||
if(config && config.depotFlag == "1") {
|
if(config && config.depotFlag == "1") {
|
||||||
if(userdepot!=null) {
|
if(userdepot!=null) {
|
||||||
if(userdepot.indexOf("["+depot.id+"]")!=-1) {
|
if(userdepot.indexOf("["+depot.id+"]")!=-1) {
|
||||||
|
if(depot.isDefault){
|
||||||
|
defDepotId = depot.id;
|
||||||
|
}
|
||||||
options += '<option value="' + depot.id + '">' + depot.name + '</option>';
|
options += '<option value="' + depot.id + '">' + depot.name + '</option>';
|
||||||
depotString = depotString + depot.id + ",";
|
depotString = depotString + depot.id + ",";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if(depot.isDefault){
|
||||||
|
defDepotId = depot.id;
|
||||||
|
}
|
||||||
depotString = depotString + depot.id + ",";
|
depotString = depotString + depot.id + ",";
|
||||||
}
|
}
|
||||||
if(depot.type === 1){
|
if(depot.type === 1){
|
||||||
|
|||||||
Reference in New Issue
Block a user