优化单据中的仓库信息
This commit is contained in:
@@ -132,7 +132,7 @@
|
|||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
pageSize: 100
|
pageSize: 100
|
||||||
}),
|
}),
|
||||||
async: false,
|
async: false, //设置为同步
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
if (res && res.code === 200) {
|
if (res && res.code === 200) {
|
||||||
if(res.data && res.data.page) {
|
if(res.data && res.data.page) {
|
||||||
@@ -152,6 +152,26 @@
|
|||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//初始化系统基础信息
|
||||||
|
function getSystemDepot(){
|
||||||
|
var depotList = null;
|
||||||
|
$.ajax({
|
||||||
|
type:"get",
|
||||||
|
url: "/depot/getAllList",
|
||||||
|
async:false, //设置为同步
|
||||||
|
dataType: "json",
|
||||||
|
success: function (res) {
|
||||||
|
if(res && res.code === 200) {
|
||||||
|
depotList = res.data;
|
||||||
|
} else {
|
||||||
|
$.messager.alert('提示', '查找系统基础信息异常,请与管理员联系!', 'error');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return depotList;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* js生成唯一ID值 32位值随机值
|
* js生成唯一ID值 32位值随机值
|
||||||
* @returns 生成的字符串
|
* @returns 生成的字符串
|
||||||
|
|||||||
@@ -171,48 +171,32 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//初始化系统基础信息
|
|
||||||
|
//初始化系统仓库信息
|
||||||
function initSystemData_depot(){
|
function initSystemData_depot(){
|
||||||
$.ajax({
|
var config = getSystemConfig();
|
||||||
type:"get",
|
var depotList = getSystemDepot();
|
||||||
url: "/depot/getAllList",
|
if(depotList !=null) {
|
||||||
//设置为同步
|
for(var i = 0 ;i < depotList.length;i++) {
|
||||||
async:false,
|
var depot = depotList[i];
|
||||||
dataType: "json",
|
if(config && config.depotFlag == "1") {
|
||||||
success: function (res) {
|
if(userdepot!=null) {
|
||||||
if(res && res.code === 200){
|
if(userdepot.indexOf("["+depot.id+"]")!=-1) {
|
||||||
depotList = res.data;
|
if(depot.isDefault){
|
||||||
if(depotList !=null) {
|
defDepotId = depot.id;
|
||||||
for(var i = 0 ;i < depotList.length;i++) {
|
}
|
||||||
var depot = depotList[i];
|
depotString = depotString + depot.id + ",";
|
||||||
var config = getSystemConfig();
|
}
|
||||||
if(config && config.depotFlag == "1") {
|
}
|
||||||
if(userdepot!=null) {
|
} else {
|
||||||
if(userdepot.indexOf("["+depot.id+"]")!=-1) {
|
if(depot.isDefault){
|
||||||
if(depot.isDefault){
|
defDepotId = depot.id;
|
||||||
defDepotId = depot.id;
|
}
|
||||||
}
|
depotString = depotString + ",";
|
||||||
depotString = depotString + depot.id + ",";
|
}
|
||||||
}
|
}
|
||||||
}
|
depotString = depotString.substring(0, depotString.length-1);
|
||||||
} else {
|
}
|
||||||
if(depot.isDefault){
|
|
||||||
defDepotId = depot.id;
|
|
||||||
}
|
|
||||||
depotString = depotString + depot.id + ",";
|
|
||||||
}
|
|
||||||
if(depot.type === 1){
|
|
||||||
depotString = depotString + depot.id + ",";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
depotString = depotString.substring(0, depotString.length-1);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$.messager.alert('提示', '查找系统基础信息异常,请与管理员联系!', 'error');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
//初始化供应商、客户、散户信息
|
//初始化供应商、客户、散户信息
|
||||||
function initSupplier(){
|
function initSupplier(){
|
||||||
|
|||||||
Reference in New Issue
Block a user