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
b5f4cc8f
Commit
b5f4cc8f
authored
May 06, 2019
by
qiankunpingtai
Browse files
拆分js,去掉不相关元素
parent
1841c1f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
erp_web/js/pages/manage/vendor.js
View file @
b5f4cc8f
//初始化界面
//初始化界面
var
listType
=
"
供应商
"
;
//类型
var
listTypeEn
=
"
Vendor
"
;
//英文类型
$
(
function
()
{
$
(
function
()
{
var
listTitle
=
""
;
//单据标题
var
listType
=
""
;
//类型
var
listTypeEn
=
""
;
//英文类型
getType
();
initTableData
();
initTableData
();
ininPager
();
ininPager
();
bindEvent
();
bindEvent
();
});
});
//根据名称获取类型
function
getType
(){
listTitle
=
$
(
"
#tablePanel
"
).
prev
().
text
();
if
(
listTitle
===
"
供应商信息列表
"
){
listType
=
"
供应商
"
;
listTypeEn
=
"
Vendor
"
;
}
else
if
(
listTitle
===
"
客户信息列表
"
){
listType
=
"
客户
"
;
listTypeEn
=
"
Customer
"
;
}
else
if
(
listTitle
===
"
会员信息列表
"
){
listType
=
"
会员
"
;
listTypeEn
=
"
Member
"
;
}
}
//初始化表格数据
//初始化表格数据
function
initTableData
()
{
function
initTableData
()
{
...
@@ -599,13 +581,7 @@ function editSupplier(index) {
...
@@ -599,13 +581,7 @@ function editSupplier(index) {
//显示累计应收和累计应付
//显示累计应收和累计应付
var
thisDateTime
=
getNowFormatDateTime
();
//当前时间
var
thisDateTime
=
getNowFormatDateTime
();
//当前时间
var
supType
=
"
customer
"
;
var
supType
=
"
vendor
"
;
if
(
listType
===
"
客户
"
){
supType
=
"
customer
"
}
else
if
(
listType
===
"
供应商
"
){
supType
=
"
vendor
"
}
$
.
ajax
({
$
.
ajax
({
type
:
"
get
"
,
type
:
"
get
"
,
url
:
"
/depotHead/findTotalPay
"
,
url
:
"
/depotHead/findTotalPay
"
,
...
@@ -635,14 +611,8 @@ function editSupplier(index) {
...
@@ -635,14 +611,8 @@ function editSupplier(index) {
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
;
//期初应付
if
(
listType
===
"
客户
"
){
money
=
(
money
+
moneyBeginNeedPay
-
moneyBeginNeedGet
).
toFixed
(
2
);
money
=
(
money
+
moneyBeginNeedGet
-
moneyBeginNeedPay
).
toFixed
(
2
);
$
(
"
#AllNeedPay
"
).
val
(
money
);
//累计应付
$
(
"
#AllNeedGet
"
).
val
(
money
);
//累计应收
}
else
if
(
listType
===
"
供应商
"
){
money
=
(
money
+
moneyBeginNeedPay
-
moneyBeginNeedGet
).
toFixed
(
2
);
$
(
"
#AllNeedPay
"
).
val
(
money
);
//累计应付
}
}
}
},
},
error
:
function
(){
error
:
function
(){
...
...
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