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
5da91bd0
Commit
5da91bd0
authored
Aug 09, 2020
by
季圣华
Browse files
给收入、支出单增加账户默认功能
parent
2fe61482
Changes
1
Hide whitespace changes
Inline
Side-by-side
erp_web/js/pages/financial/financial_base.js
View file @
5da91bd0
//初始化界面
var
defaultAccountId
=
0
;
//默认账户id
$
(
function
(){
var
accountList
=
null
;
var
accountID
=
null
;
...
...
@@ -25,7 +26,6 @@
initSystemData_person
();
//经手人数据
initSelectInfo_person
();
//经手人信息
initSystemData_account
();
//账户数据
initSelectInfo_account
();
//账户信息
initSupplier
();
//供应商
initTableData
();
ininPager
();
...
...
@@ -106,25 +106,22 @@
if
(
res
&&
res
.
code
===
200
)
{
if
(
res
.
data
)
{
accountList
=
res
.
data
.
accountList
;
var
options
=
""
;
if
(
accountList
!=
null
)
{
for
(
var
i
=
0
;
i
<
accountList
.
length
;
i
++
)
{
var
account
=
accountList
[
i
];
options
+=
'
<option value="
'
+
account
.
id
+
'
" data-currentAmount="
'
+
account
.
currentAmount
+
'
">
'
+
account
.
name
+
'
</option>
'
;
if
(
account
.
isDefault
)
{
defaultAccountId
=
account
.
id
;
//给账户赋值默认id
}
}
$
(
"
#AccountId
"
).
empty
().
append
(
options
);
}
}
}
}
});
}
//获取账户信息
function
initSelectInfo_account
(){
var
options
=
""
;
if
(
accountList
!=
null
)
{
options
=
""
;
for
(
var
i
=
0
;
i
<
accountList
.
length
;
i
++
)
{
var
account
=
accountList
[
i
];
options
+=
'
<option value="
'
+
account
.
id
+
'
">
'
+
account
.
name
+
'
</option>
'
;
}
$
(
"
#AccountId
"
).
empty
().
append
(
options
);
}
}
//初始化单位信息
function
initSupplier
(){
...
...
@@ -673,6 +670,7 @@
$
(
"
#BillTime
"
).
val
(
thisDateTime
);
var
thisNumber
=
getNowFormatDateNum
();
//根据时间生成编号
$
(
"
#BillNo
"
).
val
(
amountNum
+
thisNumber
).
focus
();
$
(
"
#AccountId
"
).
val
(
defaultAccountId
);
//初始化默认的账户Id
var
addTitle
=
listTitle
.
replace
(
"
列表
"
,
"
信息
"
);
$
(
'
#accountHeadDlg
'
).
dialog
(
'
open
'
).
dialog
(
'
setTitle
'
,
'
<img src="/js/easyui/themes/icons/edit_add.png"/> 增加
'
+
addTitle
);
$
(
"
.window-mask
"
).
css
({
width
:
webW
,
height
:
webH
});
...
...
@@ -706,6 +704,7 @@
$
(
'
#OrganId
'
).
combobox
(
'
setValue
'
,
res
.
organId
);
$
(
"
#HandsPersonId
"
).
val
(
res
.
handsPersonId
);
$
(
"
#ChangeAmount
"
).
val
(
res
.
changeAmount
);
$
(
"
#AccountId
"
).
val
(
defaultAccountId
);
//初始化默认的账户Id
var
TotalPrice
=
res
.
totalPrice
;
preTotalPrice
=
res
.
totalPrice
;
//记录前一次合计金额,用于收预付款
var
editTitle
=
listTitle
.
replace
(
"
列表
"
,
"
信息
"
);
...
...
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