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
66dcd16e
Commit
66dcd16e
authored
Jun 18, 2020
by
季圣华
Browse files
优化单据页面新增账户和仓库的功能
parent
84943631
Changes
1
Hide whitespace changes
Inline
Side-by-side
erp_web/js/pages/materials/add_temp.js
View file @
66dcd16e
...
...
@@ -50,7 +50,7 @@ $.get("../../pages/template/base.html?7891", function(tem) {
collapsible
:
false
,
closable
:
true
});
$
(
"
#depotDlg #name
,#depotDlg #address
"
).
textbox
({
$
(
"
#depotDlg #name
"
).
textbox
({
required
:
true
,
validType
:
'
length[2,30]
'
});
...
...
@@ -232,6 +232,9 @@ function bindDepotEvent() {
return
flag
;
}
$
(
"
#saveDepot
"
).
off
(
"
click
"
).
on
(
"
click
"
,
function
()
{
if
(
!
$
(
'
#depotFM
'
).
form
(
'
validate
'
)){
return
;
}
var
infoObj
=
$
(
"
#depotFM
"
).
serializeObject
();
infoObj
.
type
=
0
;
if
(
checkDepotName
())
{
...
...
@@ -300,24 +303,28 @@ function bindAccountEvent() {
if
(
checkAccountName
())
{
return
;
}
$
.
ajax
({
url
:
'
/account/add
'
,
type
:
"
post
"
,
dataType
:
"
json
"
,
data
:
({
info
:
JSON
.
stringify
(
$
(
"
#accountFM
"
).
serializeObject
())
}),
success
:
function
(
res
)
{
if
(
res
&&
res
.
code
===
200
)
{
$
(
'
#accountDlg
'
).
dialog
(
'
close
'
);
initSystemData_account
();
//刷新账户
if
(
!
$
(
'
#accountFM
'
).
form
(
'
validate
'
)){
return
;
}
else
{
$
.
ajax
({
url
:
'
/account/add
'
,
type
:
"
post
"
,
dataType
:
"
json
"
,
data
:
({
info
:
JSON
.
stringify
(
$
(
"
#accountFM
"
).
serializeObject
())
}),
success
:
function
(
res
)
{
if
(
res
&&
res
.
code
===
200
)
{
$
(
'
#accountDlg
'
).
dialog
(
'
close
'
);
initSystemData_account
();
//刷新账户
}
},
//此处添加错误处理
error
:
function
()
{
$
.
messager
.
alert
(
'
提示
'
,
'
保存结算账户异常,请稍后再试!
'
,
'
error
'
);
return
;
}
},
//此处添加错误处理
error
:
function
()
{
$
.
messager
.
alert
(
'
提示
'
,
'
保存结算账户异常,请稍后再试!
'
,
'
error
'
);
return
;
}
});
});
}
});
}
\ No newline at end of file
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