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
c554e24e
Commit
c554e24e
authored
Dec 23, 2018
by
季圣华
Browse files
解决供应商、客户页面展示失败的bug
parent
ecdf734a
Changes
1
Hide whitespace changes
Inline
Side-by-side
erp_web/js/pages/manage/supplier.js
View file @
c554e24e
...
@@ -4,7 +4,6 @@
...
@@ -4,7 +4,6 @@
var
listType
=
""
;
//类型
var
listType
=
""
;
//类型
var
listTypeEn
=
""
;
//英文类型
var
listTypeEn
=
""
;
//英文类型
getType
();
getType
();
getPersonList
();
//获取业务员
initTableData
();
initTableData
();
ininPager
();
ininPager
();
bindEvent
();
bindEvent
();
...
@@ -27,43 +26,6 @@
...
@@ -27,43 +26,6 @@
}
}
}
}
//获取业务员
function
getPersonList
(){
$
.
ajax
({
type
:
"
post
"
,
url
:
"
/person/getBasicData.action
"
,
dataType
:
"
json
"
,
success
:
function
(
systemInfo
)
{
var
msgTip
=
systemInfo
.
showModel
.
msgTip
;
if
(
msgTip
!==
"
exceptoin
"
){
var
personList
=
systemInfo
.
showModel
.
map
.
personList
;
var
personID
,
options
;
if
(
personList
!=
null
)
{
for
(
var
i
=
0
;
i
<
personList
.
length
;
i
++
)
{
var
person
=
personList
[
i
];
if
(
0
==
i
)
{
personID
=
person
.
id
;
}
if
(
person
.
type
==
"
仓管员
"
)
{
options
+=
'
<option value="
'
+
person
.
id
+
'
">
'
+
person
.
name
+
'
</option>
'
;
}
}
$
(
"
#personId
"
).
empty
().
append
(
'
<option>不关联业务员</option>
'
).
append
(
options
);
}
}
else
{
$
.
messager
.
alert
(
'
提示
'
,
'
查找系统基础信息异常,请与管理员联系!
'
,
'
error
'
);
return
;
}
}
});
}
//初始化表格数据
//初始化表格数据
function
initTableData
()
{
function
initTableData
()
{
//改变宽度和高度
//改变宽度和高度
...
@@ -503,11 +465,10 @@
...
@@ -503,11 +465,10 @@
var
pager
=
$
(
"
#tableData
"
).
datagrid
(
'
getPager
'
);
var
pager
=
$
(
"
#tableData
"
).
datagrid
(
'
getPager
'
);
opts
.
pageNumber
=
1
;
opts
.
pageNumber
=
1
;
opts
.
pageSize
=
initPageSize
;
opts
.
pageSize
=
initPageSize
;
pager
.
pagination
(
'
refresh
'
,
pager
.
pagination
(
'
refresh
'
,
{
{
pageNumber
:
1
,
pageNumber
:
1
,
pageSize
:
initPageSize
pageSize
:
initPageSize
});
});
}
}
});
});
...
@@ -571,31 +532,31 @@
...
@@ -571,31 +532,31 @@
supType
=
"
vendor
"
supType
=
"
vendor
"
}
}
$
.
ajax
({
$
.
ajax
({
type
:
"
pos
t
"
,
type
:
"
ge
t
"
,
url
:
"
/depotHead/findTotalPay
.action
"
,
url
:
"
/depotHead/findTotalPay
"
,
dataType
:
"
json
"
,
dataType
:
"
json
"
,
async
:
false
,
async
:
false
,
data
:
({
data
:
({
supplierId
:
supplierInfo
[
0
],
supplierId
:
supplierInfo
[
0
],
E
ndTime
:
thisDateTime
,
e
ndTime
:
thisDateTime
,
supType
:
supType
supType
:
supType
}),
}),
success
:
function
(
res
){
success
:
function
(
res
){
if
(
res
)
{
if
(
res
&&
res
.
code
===
200
&&
res
.
data
&&
res
.
data
.
rows
&&
res
.
data
.
rows
.
getAllMoney
)
{
var
moneyA
=
res
.
getAllMoney
.
toFixed
(
2
)
-
0
;
var
moneyA
=
res
.
data
.
rows
.
getAllMoney
.
toFixed
(
2
)
-
0
;
$
.
ajax
({
$
.
ajax
({
type
:
"
pos
t
"
,
type
:
"
ge
t
"
,
url
:
path
+
"
/accountHead/findTotalPay
.action
"
,
url
:
"
/accountHead/findTotalPay
"
,
dataType
:
"
json
"
,
dataType
:
"
json
"
,
async
:
false
,
async
:
false
,
data
:
({
data
:
({
supplierId
:
supplierInfo
[
0
],
supplierId
:
supplierInfo
[
0
],
E
ndTime
:
thisDateTime
,
e
ndTime
:
thisDateTime
,
supType
:
supType
supType
:
supType
}),
}),
success
:
function
(
res
){
success
:
function
(
res
){
if
(
res
)
{
if
(
res
&&
res
.
code
===
200
&&
res
.
data
&&
res
.
data
.
rows
&&
res
.
data
.
rows
.
getAllMoney
)
{
var
moneyB
=
res
.
getAllMoney
.
toFixed
(
2
)
-
0
;
var
moneyB
=
res
.
data
.
rows
.
getAllMoney
.
toFixed
(
2
)
-
0
;
var
money
=
moneyA
+
moneyB
;
var
money
=
moneyA
+
moneyB
;
var
moneyBeginNeedGet
=
$
(
"
#BeginNeedGet
"
).
val
()
-
0
;
//期初应收
var
moneyBeginNeedGet
=
$
(
"
#BeginNeedGet
"
).
val
()
-
0
;
//期初应收
var
moneyBeginNeedPay
=
$
(
"
#BeginNeedPay
"
).
val
()
-
0
;
//期初应付
var
moneyBeginNeedPay
=
$
(
"
#BeginNeedPay
"
).
val
()
-
0
;
//期初应付
...
...
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