Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
6b68f70f
"ruoyi/git@ustchcs.com:gujinli1118/RuoYi-Vue.git" did not exist on "ec98648e4d2e25c1946f3664e9cab169d4e5b092"
Commit
6b68f70f
authored
Feb 20, 2020
by
季圣华
Browse files
优化单据中的仓库信息
parent
e1e133d9
Changes
2
Hide whitespace changes
Inline
Side-by-side
erp_web/js/common/common.js
View file @
6b68f70f
...
...
@@ -132,7 +132,7 @@
currentPage
:
1
,
pageSize
:
100
}),
async
:
false
,
async
:
false
,
//设置为同步
success
:
function
(
res
)
{
if
(
res
&&
res
.
code
===
200
)
{
if
(
res
.
data
&&
res
.
data
.
page
)
{
...
...
@@ -152,6 +152,26 @@
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位值随机值
* @returns 生成的字符串
...
...
erp_web/js/pages/materials/in_out.js
View file @
6b68f70f
...
...
@@ -171,48 +171,32 @@
}
});
}
//初始化系统基础信息
//初始化系统仓库信息
function
initSystemData_depot
(){
$
.
ajax
({
type
:
"
get
"
,
url
:
"
/depot/getAllList
"
,
//设置为同步
async
:
false
,
dataType
:
"
json
"
,
success
:
function
(
res
)
{
if
(
res
&&
res
.
code
===
200
){
depotList
=
res
.
data
;
if
(
depotList
!=
null
)
{
for
(
var
i
=
0
;
i
<
depotList
.
length
;
i
++
)
{
var
depot
=
depotList
[
i
];
var
config
=
getSystemConfig
();
if
(
config
&&
config
.
depotFlag
==
"
1
"
)
{
if
(
userdepot
!=
null
)
{
if
(
userdepot
.
indexOf
(
"
[
"
+
depot
.
id
+
"
]
"
)
!=-
1
)
{
if
(
depot
.
isDefault
){
defDepotId
=
depot
.
id
;
}
depotString
=
depotString
+
depot
.
id
+
"
,
"
;
}
}
}
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
;
}
}
});
var
config
=
getSystemConfig
();
var
depotList
=
getSystemDepot
();
if
(
depotList
!=
null
)
{
for
(
var
i
=
0
;
i
<
depotList
.
length
;
i
++
)
{
var
depot
=
depotList
[
i
];
if
(
config
&&
config
.
depotFlag
==
"
1
"
)
{
if
(
userdepot
!=
null
)
{
if
(
userdepot
.
indexOf
(
"
[
"
+
depot
.
id
+
"
]
"
)
!=-
1
)
{
if
(
depot
.
isDefault
){
defDepotId
=
depot
.
id
;
}
depotString
=
depotString
+
depot
.
id
+
"
,
"
;
}
}
}
else
{
if
(
depot
.
isDefault
){
defDepotId
=
depot
.
id
;
}
depotString
=
depotString
+
"
,
"
;
}
}
depotString
=
depotString
.
substring
(
0
,
depotString
.
length
-
1
);
}
}
//初始化供应商、客户、散户信息
function
initSupplier
(){
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment