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
3a78eb51
Commit
3a78eb51
authored
May 22, 2019
by
qiankunpingtai
Browse files
修改财务管理部分财务明细未做操作时也可以保存
parent
79d4c7d2
Changes
7
Hide whitespace changes
Inline
Side-by-side
erp_web/js/pages/financial/advance_in.js
View file @
3a78eb51
...
...
@@ -896,59 +896,57 @@ function CheckData() {
function
saveAccountHeadAndDetail
(
listType
,
ChangeAmount
,
TotalPrice
,
OrganId
)
{
append
();
removeit
();
if
(
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
).
length
)
{
if
(
!
CheckData
())
return
false
;
var
inserted
=
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
,
"
inserted
"
);
var
deleted
=
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
,
"
deleted
"
);
var
updated
=
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
,
"
updated
"
);
$
.
ajax
({
type
:
"
post
"
,
url
:
url
,
dataType
:
"
json
"
,
data
:
{
inserted
:
JSON
.
stringify
(
inserted
),
deleted
:
JSON
.
stringify
(
deleted
),
updated
:
JSON
.
stringify
(
updated
),
info
:
JSON
.
stringify
({
Type
:
listType
,
BillNo
:
$
.
trim
(
$
(
"
#BillNo
"
).
val
()),
BillTime
:
$
.
trim
(
$
(
"
#BillTime
"
).
val
()),
AccountId
:
$
.
trim
(
$
(
"
#AccountId
"
).
val
()),
ChangeAmount
:
ChangeAmount
,
//付款/收款/优惠/实付
TotalPrice
:
TotalPrice
,
//合计
OrganId
:
OrganId
,
HandsPersonId
:
$
.
trim
(
$
(
"
#HandsPersonId
"
).
val
()),
Remark
:
$
.
trim
(
$
(
"
#Remark
"
).
val
())
}),
listType
:
listType
},
success
:
function
(
tipInfo
)
{
if
(
tipInfo
)
{
$
.
messager
.
alert
(
'
提示
'
,
'
保存成功!
'
,
'
info
'
);
$
(
'
#accountHeadDlg
'
).
dialog
(
'
close
'
);
var
opts
=
$
(
"
#tableData
"
).
datagrid
(
'
options
'
);
showAccountHeadDetails
(
opts
.
pageNumber
,
opts
.
pageSize
);
if
(
endEditing
())
{
$
(
'
#accountData
'
).
datagrid
(
'
acceptChanges
'
);
}
}
else
{
$
.
messager
.
show
({
title
:
'
错误提示
'
,
msg
:
'
保存信息失败,请稍后重试!
'
});
if
(
!
CheckData
())
return
false
;
var
inserted
=
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
,
"
inserted
"
);
var
deleted
=
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
,
"
deleted
"
);
var
updated
=
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
,
"
updated
"
);
$
.
ajax
({
type
:
"
post
"
,
url
:
url
,
dataType
:
"
json
"
,
data
:
{
inserted
:
JSON
.
stringify
(
inserted
),
deleted
:
JSON
.
stringify
(
deleted
),
updated
:
JSON
.
stringify
(
updated
),
info
:
JSON
.
stringify
({
Type
:
listType
,
BillNo
:
$
.
trim
(
$
(
"
#BillNo
"
).
val
()),
BillTime
:
$
.
trim
(
$
(
"
#BillTime
"
).
val
()),
AccountId
:
$
.
trim
(
$
(
"
#AccountId
"
).
val
()),
ChangeAmount
:
ChangeAmount
,
//付款/收款/优惠/实付
TotalPrice
:
TotalPrice
,
//合计
OrganId
:
OrganId
,
HandsPersonId
:
$
.
trim
(
$
(
"
#HandsPersonId
"
).
val
()),
Remark
:
$
.
trim
(
$
(
"
#Remark
"
).
val
())
}),
listType
:
listType
},
success
:
function
(
tipInfo
)
{
if
(
tipInfo
)
{
$
.
messager
.
alert
(
'
提示
'
,
'
保存成功!
'
,
'
info
'
);
$
(
'
#accountHeadDlg
'
).
dialog
(
'
close
'
);
var
opts
=
$
(
"
#tableData
"
).
datagrid
(
'
options
'
);
showAccountHeadDetails
(
opts
.
pageNumber
,
opts
.
pageSize
);
if
(
endEditing
())
{
$
(
'
#accountData
'
).
datagrid
(
'
acceptChanges
'
);
}
}
else
{
},
error
:
function
(
XmlHttpRequest
,
textStatus
,
errorThrown
)
{
$
.
messager
.
alert
(
'
提示
'
,
XmlHttpRequest
.
responseText
,
'
error
'
);
$
.
messager
.
show
({
title
:
'
错误提示
'
,
msg
:
'
保存信息失败,请稍后重试!
'
}
);
}
});
}
},
error
:
function
(
XmlHttpRequest
,
textStatus
,
errorThrown
)
{
$
.
messager
.
alert
(
'
提示
'
,
XmlHttpRequest
.
responseText
,
'
error
'
);
}
});
}
erp_web/js/pages/financial/giro.js
View file @
3a78eb51
...
...
@@ -803,58 +803,56 @@ function CheckData() {
function
saveAccountHeadAndDetail
(
listType
,
ChangeAmount
,
TotalPrice
,
OrganId
)
{
append
();
removeit
();
if
(
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
).
length
)
{
if
(
!
CheckData
())
return
false
;
var
inserted
=
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
,
"
inserted
"
);
var
deleted
=
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
,
"
deleted
"
);
var
updated
=
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
,
"
updated
"
);
$
.
ajax
({
type
:
"
post
"
,
url
:
url
,
dataType
:
"
json
"
,
data
:
{
inserted
:
JSON
.
stringify
(
inserted
),
deleted
:
JSON
.
stringify
(
deleted
),
updated
:
JSON
.
stringify
(
updated
),
info
:
JSON
.
stringify
({
Type
:
listType
,
BillNo
:
$
.
trim
(
$
(
"
#BillNo
"
).
val
()),
BillTime
:
$
.
trim
(
$
(
"
#BillTime
"
).
val
()),
AccountId
:
$
.
trim
(
$
(
"
#AccountId
"
).
val
()),
ChangeAmount
:
ChangeAmount
,
//付款/收款/优惠/实付
TotalPrice
:
TotalPrice
,
//合计
OrganId
:
OrganId
,
HandsPersonId
:
$
.
trim
(
$
(
"
#HandsPersonId
"
).
val
()),
Remark
:
$
.
trim
(
$
(
"
#Remark
"
).
val
())
}),
listType
:
listType
},
success
:
function
(
tipInfo
)
{
if
(
tipInfo
)
{
$
.
messager
.
alert
(
'
提示
'
,
'
保存成功!
'
,
'
info
'
);
$
(
'
#accountHeadDlg
'
).
dialog
(
'
close
'
);
var
opts
=
$
(
"
#tableData
"
).
datagrid
(
'
options
'
);
showAccountHeadDetails
(
opts
.
pageNumber
,
opts
.
pageSize
);
if
(
endEditing
())
{
$
(
'
#accountData
'
).
datagrid
(
'
acceptChanges
'
);
}
}
else
{
$
.
messager
.
show
({
title
:
'
错误提示
'
,
msg
:
'
保存信息失败,请稍后重试!
'
});
if
(
!
CheckData
())
return
false
;
var
inserted
=
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
,
"
inserted
"
);
var
deleted
=
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
,
"
deleted
"
);
var
updated
=
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
,
"
updated
"
);
$
.
ajax
({
type
:
"
post
"
,
url
:
url
,
dataType
:
"
json
"
,
data
:
{
inserted
:
JSON
.
stringify
(
inserted
),
deleted
:
JSON
.
stringify
(
deleted
),
updated
:
JSON
.
stringify
(
updated
),
info
:
JSON
.
stringify
({
Type
:
listType
,
BillNo
:
$
.
trim
(
$
(
"
#BillNo
"
).
val
()),
BillTime
:
$
.
trim
(
$
(
"
#BillTime
"
).
val
()),
AccountId
:
$
.
trim
(
$
(
"
#AccountId
"
).
val
()),
ChangeAmount
:
ChangeAmount
,
//付款/收款/优惠/实付
TotalPrice
:
TotalPrice
,
//合计
OrganId
:
OrganId
,
HandsPersonId
:
$
.
trim
(
$
(
"
#HandsPersonId
"
).
val
()),
Remark
:
$
.
trim
(
$
(
"
#Remark
"
).
val
())
}),
listType
:
listType
},
success
:
function
(
tipInfo
)
{
if
(
tipInfo
)
{
$
.
messager
.
alert
(
'
提示
'
,
'
保存成功!
'
,
'
info
'
);
$
(
'
#accountHeadDlg
'
).
dialog
(
'
close
'
);
var
opts
=
$
(
"
#tableData
"
).
datagrid
(
'
options
'
);
showAccountHeadDetails
(
opts
.
pageNumber
,
opts
.
pageSize
);
if
(
endEditing
())
{
$
(
'
#accountData
'
).
datagrid
(
'
acceptChanges
'
);
}
}
else
{
},
error
:
function
(
XmlHttpRequest
,
textStatus
,
errorThrown
)
{
$
.
messager
.
alert
(
'
提示
'
,
XmlHttpRequest
.
responseText
,
'
error
'
);
$
.
messager
.
show
({
title
:
'
错误提示
'
,
msg
:
'
保存信息失败,请稍后重试!
'
}
);
}
});
}
},
error
:
function
(
XmlHttpRequest
,
textStatus
,
errorThrown
)
{
$
.
messager
.
alert
(
'
提示
'
,
XmlHttpRequest
.
responseText
,
'
error
'
);
}
});
}
\ No newline at end of file
erp_web/js/pages/financial/item_in.js
View file @
3a78eb51
...
...
@@ -819,58 +819,56 @@ function CheckData() {
function
saveAccountHeadAndDetail
(
listType
,
ChangeAmount
,
TotalPrice
,
OrganId
)
{
append
();
removeit
();
if
(
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
).
length
)
{
if
(
!
CheckData
())
return
false
;
var
inserted
=
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
,
"
inserted
"
);
var
deleted
=
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
,
"
deleted
"
);
var
updated
=
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
,
"
updated
"
);
$
.
ajax
({
type
:
"
post
"
,
url
:
url
,
dataType
:
"
json
"
,
data
:
{
inserted
:
JSON
.
stringify
(
inserted
),
deleted
:
JSON
.
stringify
(
deleted
),
updated
:
JSON
.
stringify
(
updated
),
info
:
JSON
.
stringify
({
Type
:
listType
,
BillNo
:
$
.
trim
(
$
(
"
#BillNo
"
).
val
()),
BillTime
:
$
.
trim
(
$
(
"
#BillTime
"
).
val
()),
AccountId
:
$
.
trim
(
$
(
"
#AccountId
"
).
val
()),
ChangeAmount
:
ChangeAmount
,
//付款/收款/优惠/实付
TotalPrice
:
TotalPrice
,
//合计
OrganId
:
OrganId
,
HandsPersonId
:
$
.
trim
(
$
(
"
#HandsPersonId
"
).
val
()),
Remark
:
$
.
trim
(
$
(
"
#Remark
"
).
val
())
}),
listType
:
listType
},
success
:
function
(
tipInfo
)
{
if
(
tipInfo
)
{
$
.
messager
.
alert
(
'
提示
'
,
'
保存成功!
'
,
'
info
'
);
$
(
'
#accountHeadDlg
'
).
dialog
(
'
close
'
);
var
opts
=
$
(
"
#tableData
"
).
datagrid
(
'
options
'
);
showAccountHeadDetails
(
opts
.
pageNumber
,
opts
.
pageSize
);
if
(
endEditing
())
{
$
(
'
#accountData
'
).
datagrid
(
'
acceptChanges
'
);
}
}
else
{
$
.
messager
.
show
({
title
:
'
错误提示
'
,
msg
:
'
保存信息失败,请稍后重试!
'
});
if
(
!
CheckData
())
return
false
;
var
inserted
=
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
,
"
inserted
"
);
var
deleted
=
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
,
"
deleted
"
);
var
updated
=
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
,
"
updated
"
);
$
.
ajax
({
type
:
"
post
"
,
url
:
url
,
dataType
:
"
json
"
,
data
:
{
inserted
:
JSON
.
stringify
(
inserted
),
deleted
:
JSON
.
stringify
(
deleted
),
updated
:
JSON
.
stringify
(
updated
),
info
:
JSON
.
stringify
({
Type
:
listType
,
BillNo
:
$
.
trim
(
$
(
"
#BillNo
"
).
val
()),
BillTime
:
$
.
trim
(
$
(
"
#BillTime
"
).
val
()),
AccountId
:
$
.
trim
(
$
(
"
#AccountId
"
).
val
()),
ChangeAmount
:
ChangeAmount
,
//付款/收款/优惠/实付
TotalPrice
:
TotalPrice
,
//合计
OrganId
:
OrganId
,
HandsPersonId
:
$
.
trim
(
$
(
"
#HandsPersonId
"
).
val
()),
Remark
:
$
.
trim
(
$
(
"
#Remark
"
).
val
())
}),
listType
:
listType
},
success
:
function
(
tipInfo
)
{
if
(
tipInfo
)
{
$
.
messager
.
alert
(
'
提示
'
,
'
保存成功!
'
,
'
info
'
);
$
(
'
#accountHeadDlg
'
).
dialog
(
'
close
'
);
var
opts
=
$
(
"
#tableData
"
).
datagrid
(
'
options
'
);
showAccountHeadDetails
(
opts
.
pageNumber
,
opts
.
pageSize
);
if
(
endEditing
())
{
$
(
'
#accountData
'
).
datagrid
(
'
acceptChanges
'
);
}
}
else
{
},
error
:
function
(
XmlHttpRequest
,
textStatus
,
errorThrown
)
{
$
.
messager
.
alert
(
'
提示
'
,
XmlHttpRequest
.
responseText
,
'
error
'
);
$
.
messager
.
show
({
title
:
'
错误提示
'
,
msg
:
'
保存信息失败,请稍后重试!
'
}
);
}
});
}
},
error
:
function
(
XmlHttpRequest
,
textStatus
,
errorThrown
)
{
$
.
messager
.
alert
(
'
提示
'
,
XmlHttpRequest
.
responseText
,
'
error
'
);
}
});
}
\ No newline at end of file
erp_web/js/pages/financial/item_out.js
View file @
3a78eb51
...
...
@@ -825,58 +825,56 @@ function CheckData() {
function
saveAccountHeadAndDetail
(
listType
,
ChangeAmount
,
TotalPrice
,
OrganId
)
{
append
();
removeit
();
if
(
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
).
length
)
{
if
(
!
CheckData
())
return
false
;
var
inserted
=
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
,
"
inserted
"
);
var
deleted
=
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
,
"
deleted
"
);
var
updated
=
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
,
"
updated
"
);
$
.
ajax
({
type
:
"
post
"
,
url
:
url
,
dataType
:
"
json
"
,
data
:
{
inserted
:
JSON
.
stringify
(
inserted
),
deleted
:
JSON
.
stringify
(
deleted
),
updated
:
JSON
.
stringify
(
updated
),
info
:
JSON
.
stringify
({
Type
:
listType
,
BillNo
:
$
.
trim
(
$
(
"
#BillNo
"
).
val
()),
BillTime
:
$
.
trim
(
$
(
"
#BillTime
"
).
val
()),
AccountId
:
$
.
trim
(
$
(
"
#AccountId
"
).
val
()),
ChangeAmount
:
ChangeAmount
,
//付款/收款/优惠/实付
TotalPrice
:
TotalPrice
,
//合计
OrganId
:
OrganId
,
HandsPersonId
:
$
.
trim
(
$
(
"
#HandsPersonId
"
).
val
()),
Remark
:
$
.
trim
(
$
(
"
#Remark
"
).
val
())
}),
listType
:
listType
},
success
:
function
(
tipInfo
)
{
if
(
tipInfo
)
{
$
.
messager
.
alert
(
'
提示
'
,
'
保存成功!
'
,
'
info
'
);
$
(
'
#accountHeadDlg
'
).
dialog
(
'
close
'
);
var
opts
=
$
(
"
#tableData
"
).
datagrid
(
'
options
'
);
showAccountHeadDetails
(
opts
.
pageNumber
,
opts
.
pageSize
);
if
(
endEditing
())
{
$
(
'
#accountData
'
).
datagrid
(
'
acceptChanges
'
);
}
}
else
{
$
.
messager
.
show
({
title
:
'
错误提示
'
,
msg
:
'
保存信息失败,请稍后重试!
'
});
if
(
!
CheckData
())
return
false
;
var
inserted
=
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
,
"
inserted
"
);
var
deleted
=
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
,
"
deleted
"
);
var
updated
=
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
,
"
updated
"
);
$
.
ajax
({
type
:
"
post
"
,
url
:
url
,
dataType
:
"
json
"
,
data
:
{
inserted
:
JSON
.
stringify
(
inserted
),
deleted
:
JSON
.
stringify
(
deleted
),
updated
:
JSON
.
stringify
(
updated
),
info
:
JSON
.
stringify
({
Type
:
listType
,
BillNo
:
$
.
trim
(
$
(
"
#BillNo
"
).
val
()),
BillTime
:
$
.
trim
(
$
(
"
#BillTime
"
).
val
()),
AccountId
:
$
.
trim
(
$
(
"
#AccountId
"
).
val
()),
ChangeAmount
:
ChangeAmount
,
//付款/收款/优惠/实付
TotalPrice
:
TotalPrice
,
//合计
OrganId
:
OrganId
,
HandsPersonId
:
$
.
trim
(
$
(
"
#HandsPersonId
"
).
val
()),
Remark
:
$
.
trim
(
$
(
"
#Remark
"
).
val
())
}),
listType
:
listType
},
success
:
function
(
tipInfo
)
{
if
(
tipInfo
)
{
$
.
messager
.
alert
(
'
提示
'
,
'
保存成功!
'
,
'
info
'
);
$
(
'
#accountHeadDlg
'
).
dialog
(
'
close
'
);
var
opts
=
$
(
"
#tableData
"
).
datagrid
(
'
options
'
);
showAccountHeadDetails
(
opts
.
pageNumber
,
opts
.
pageSize
);
if
(
endEditing
())
{
$
(
'
#accountData
'
).
datagrid
(
'
acceptChanges
'
);
}
}
else
{
},
error
:
function
(
XmlHttpRequest
,
textStatus
,
errorThrown
)
{
$
.
messager
.
alert
(
'
提示
'
,
XmlHttpRequest
.
responseText
,
'
error
'
);
$
.
messager
.
show
({
title
:
'
错误提示
'
,
msg
:
'
保存信息失败,请稍后重试!
'
}
);
}
});
}
},
error
:
function
(
XmlHttpRequest
,
textStatus
,
errorThrown
)
{
$
.
messager
.
alert
(
'
提示
'
,
XmlHttpRequest
.
responseText
,
'
error
'
);
}
});
}
\ No newline at end of file
erp_web/js/pages/financial/money_in.js
View file @
3a78eb51
...
...
@@ -815,58 +815,56 @@ function CheckData() {
function
saveAccountHeadAndDetail
(
listType
,
ChangeAmount
,
TotalPrice
,
OrganId
)
{
append
();
removeit
();
if
(
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
).
length
)
{
if
(
!
CheckData
())
return
false
;
var
inserted
=
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
,
"
inserted
"
);
var
deleted
=
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
,
"
deleted
"
);
var
updated
=
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
,
"
updated
"
);
$
.
ajax
({
type
:
"
post
"
,
url
:
url
,
dataType
:
"
json
"
,
data
:
{
inserted
:
JSON
.
stringify
(
inserted
),
deleted
:
JSON
.
stringify
(
deleted
),
updated
:
JSON
.
stringify
(
updated
),
info
:
JSON
.
stringify
({
Type
:
listType
,
BillNo
:
$
.
trim
(
$
(
"
#BillNo
"
).
val
()),
BillTime
:
$
.
trim
(
$
(
"
#BillTime
"
).
val
()),
AccountId
:
$
.
trim
(
$
(
"
#AccountId
"
).
val
()),
ChangeAmount
:
ChangeAmount
,
//付款/收款/优惠/实付
TotalPrice
:
TotalPrice
,
//合计
OrganId
:
OrganId
,
HandsPersonId
:
$
.
trim
(
$
(
"
#HandsPersonId
"
).
val
()),
Remark
:
$
.
trim
(
$
(
"
#Remark
"
).
val
())
}),
listType
:
listType
},
success
:
function
(
tipInfo
)
{
if
(
tipInfo
)
{
$
.
messager
.
alert
(
'
提示
'
,
'
保存成功!
'
,
'
info
'
);
$
(
'
#accountHeadDlg
'
).
dialog
(
'
close
'
);
var
opts
=
$
(
"
#tableData
"
).
datagrid
(
'
options
'
);
showAccountHeadDetails
(
opts
.
pageNumber
,
opts
.
pageSize
);
if
(
endEditing
())
{
$
(
'
#accountData
'
).
datagrid
(
'
acceptChanges
'
);
}
}
else
{
$
.
messager
.
show
({
title
:
'
错误提示
'
,
msg
:
'
保存信息失败,请稍后重试!
'
});
if
(
!
CheckData
())
return
false
;
var
inserted
=
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
,
"
inserted
"
);
var
deleted
=
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
,
"
deleted
"
);
var
updated
=
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
,
"
updated
"
);
$
.
ajax
({
type
:
"
post
"
,
url
:
url
,
dataType
:
"
json
"
,
data
:
{
inserted
:
JSON
.
stringify
(
inserted
),
deleted
:
JSON
.
stringify
(
deleted
),
updated
:
JSON
.
stringify
(
updated
),
info
:
JSON
.
stringify
({
Type
:
listType
,
BillNo
:
$
.
trim
(
$
(
"
#BillNo
"
).
val
()),
BillTime
:
$
.
trim
(
$
(
"
#BillTime
"
).
val
()),
AccountId
:
$
.
trim
(
$
(
"
#AccountId
"
).
val
()),
ChangeAmount
:
ChangeAmount
,
//付款/收款/优惠/实付
TotalPrice
:
TotalPrice
,
//合计
OrganId
:
OrganId
,
HandsPersonId
:
$
.
trim
(
$
(
"
#HandsPersonId
"
).
val
()),
Remark
:
$
.
trim
(
$
(
"
#Remark
"
).
val
())
}),
listType
:
listType
},
success
:
function
(
tipInfo
)
{
if
(
tipInfo
)
{
$
.
messager
.
alert
(
'
提示
'
,
'
保存成功!
'
,
'
info
'
);
$
(
'
#accountHeadDlg
'
).
dialog
(
'
close
'
);
var
opts
=
$
(
"
#tableData
"
).
datagrid
(
'
options
'
);
showAccountHeadDetails
(
opts
.
pageNumber
,
opts
.
pageSize
);
if
(
endEditing
())
{
$
(
'
#accountData
'
).
datagrid
(
'
acceptChanges
'
);
}
}
else
{
},
error
:
function
(
XmlHttpRequest
,
textStatus
,
errorThrown
)
{
$
.
messager
.
alert
(
'
提示
'
,
XmlHttpRequest
.
responseText
,
'
error
'
);
$
.
messager
.
show
({
title
:
'
错误提示
'
,
msg
:
'
保存信息失败,请稍后重试!
'
}
);
}
});
}
},
error
:
function
(
XmlHttpRequest
,
textStatus
,
errorThrown
)
{
$
.
messager
.
alert
(
'
提示
'
,
XmlHttpRequest
.
responseText
,
'
error
'
);
}
});
}
\ No newline at end of file
erp_web/js/pages/financial/money_out.js
View file @
3a78eb51
...
...
@@ -837,58 +837,56 @@ function CheckData() {
function
saveAccountHeadAndDetail
(
listType
,
ChangeAmount
,
TotalPrice
,
OrganId
)
{
append
();
removeit
();
if
(
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
).
length
)
{
if
(
!
CheckData
())
return
false
;
var
inserted
=
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
,
"
inserted
"
);
var
deleted
=
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
,
"
deleted
"
);
var
updated
=
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
,
"
updated
"
);
$
.
ajax
({
type
:
"
post
"
,
url
:
url
,
dataType
:
"
json
"
,
data
:
{
inserted
:
JSON
.
stringify
(
inserted
),
deleted
:
JSON
.
stringify
(
deleted
),
updated
:
JSON
.
stringify
(
updated
),
info
:
JSON
.
stringify
({
Type
:
listType
,
BillNo
:
$
.
trim
(
$
(
"
#BillNo
"
).
val
()),
BillTime
:
$
.
trim
(
$
(
"
#BillTime
"
).
val
()),
AccountId
:
$
.
trim
(
$
(
"
#AccountId
"
).
val
()),
ChangeAmount
:
ChangeAmount
,
//付款/收款/优惠/实付
TotalPrice
:
TotalPrice
,
//合计
OrganId
:
OrganId
,
HandsPersonId
:
$
.
trim
(
$
(
"
#HandsPersonId
"
).
val
()),
Remark
:
$
.
trim
(
$
(
"
#Remark
"
).
val
())
}),
listType
:
listType
},
success
:
function
(
tipInfo
)
{
if
(
tipInfo
)
{
$
.
messager
.
alert
(
'
提示
'
,
'
保存成功!
'
,
'
info
'
);
$
(
'
#accountHeadDlg
'
).
dialog
(
'
close
'
);
var
opts
=
$
(
"
#tableData
"
).
datagrid
(
'
options
'
);
showAccountHeadDetails
(
opts
.
pageNumber
,
opts
.
pageSize
);
if
(
endEditing
())
{
$
(
'
#accountData
'
).
datagrid
(
'
acceptChanges
'
);
}
}
else
{
$
.
messager
.
show
({
title
:
'
错误提示
'
,
msg
:
'
保存信息失败,请稍后重试!
'
});
if
(
!
CheckData
())
return
false
;
var
inserted
=
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
,
"
inserted
"
);
var
deleted
=
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
,
"
deleted
"
);
var
updated
=
$
(
"
#accountData
"
).
datagrid
(
'
getChanges
'
,
"
updated
"
);
$
.
ajax
({
type
:
"
post
"
,
url
:
url
,
dataType
:
"
json
"
,
data
:
{
inserted
:
JSON
.
stringify
(
inserted
),
deleted
:
JSON
.
stringify
(
deleted
),
updated
:
JSON
.
stringify
(
updated
),
info
:
JSON
.
stringify
({
Type
:
listType
,
BillNo
:
$
.
trim
(
$
(
"
#BillNo
"
).
val
()),
BillTime
:
$
.
trim
(
$
(
"
#BillTime
"
).
val
()),
AccountId
:
$
.
trim
(
$
(
"
#AccountId
"
).
val
()),
ChangeAmount
:
ChangeAmount
,
//付款/收款/优惠/实付
TotalPrice
:
TotalPrice
,
//合计
OrganId
:
OrganId
,
HandsPersonId
:
$
.
trim
(
$
(
"
#HandsPersonId
"
).
val
()),
Remark
:
$
.
trim
(
$
(
"
#Remark
"
).
val
())
}),
listType
:
listType
},
success
:
function
(
tipInfo
)
{
if
(
tipInfo
)
{
$
.
messager
.
alert
(
'
提示
'
,
'
保存成功!
'
,
'
info
'
);
$
(
'
#accountHeadDlg
'
).
dialog
(
'
close
'
);
var
opts
=
$
(
"
#tableData
"
).
datagrid
(
'
options
'
);
showAccountHeadDetails
(
opts
.
pageNumber
,
opts
.
pageSize
);
if
(
endEditing
())
{
$
(
'
#accountData
'
).
datagrid
(
'
acceptChanges
'
);
}
}
else
{
},
error
:
function
(
XmlHttpRequest
,
textStatus
,
errorThrown
)
{
$
.
messager
.
alert
(
'
提示
'
,
XmlHttpRequest
.
responseText
,
'
error
'
);
$
.
messager
.
show
({
title
:
'
错误提示
'
,
msg
:
'
保存信息失败,请稍后重试!
'
}
);
}
});
}
},
error
:
function
(
XmlHttpRequest
,
textStatus
,
errorThrown
)
{
$
.
messager
.
alert
(
'
提示
'
,
XmlHttpRequest
.
responseText
,
'
error
'
);
}
});
}
\ No newline at end of file
src/main/java/com/jsh/erp/service/supplier/SupplierService.java
View file @
3a78eb51
...
...
@@ -202,7 +202,7 @@ public class SupplierService {
int
result
=
0
;
try
{
if
(
supplier
!=
null
){
supplier
.
setAdvancein
(
supplier
.
getAdvancein
().
add
(
advanceIn
));
//增加预收款的金额,可能增加的是负值
supplier
.
setAdvancein
(
(
supplier
.
getAdvancein
()
==
null
?
BigDecimal
.
ZERO
:
supplier
.
getAdvancein
())
.
add
(
advanceIn
));
//增加预收款的金额,可能增加的是负值
result
=
supplierMapper
.
updateByPrimaryKeySelective
(
supplier
);
}
}
catch
(
Exception
e
){
...
...
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