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
c6acb9e3
"jetbrains:/idea/checkout/git" did not exist on "2acdb77dcab651a2535e40ece8c8d1e63244950a"
Commit
c6acb9e3
authored
Nov 07, 2017
by
季圣华
Browse files
修复保存单据失败的bug
parent
ca43b7fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/webapp/js/pages/materials/in_out.js
View file @
c6acb9e3
...
@@ -1998,15 +1998,20 @@
...
@@ -1998,15 +1998,20 @@
OrganId
=
$
(
'
#OrganId
'
).
combobox
(
'
getValue
'
);
OrganId
=
$
(
'
#OrganId
'
).
combobox
(
'
getValue
'
);
}
}
var
accountMoneyList
=
$
(
"
#AccountId
"
).
attr
(
"
data-accountmoneyarr
"
);
//账户金额列表-多账户
var
accountMoneyList
=
$
(
"
#AccountId
"
).
attr
(
"
data-accountmoneyarr
"
);
//账户金额列表-多账户
accountMoneyList
=
accountMoneyList
.
replace
(
"
[
"
,
""
).
replace
(
"
]
"
,
""
).
toString
();
var
accountMoneyArr
;
var
reg
=
new
RegExp
(
"
\"
"
,
"
g
"
);
//创建正则RegExp对象
if
(
accountMoneyList
)
{
accountMoneyList
=
accountMoneyList
.
replace
(
reg
,
""
);
//替换所有的双引号
accountMoneyList
=
accountMoneyList
.
replace
(
"
[
"
,
""
).
replace
(
"
]
"
,
""
).
toString
();
var
accountMoneyArr
=
accountMoneyList
.
split
(
"
,
"
);
//转为数组
var
reg
=
new
RegExp
(
"
\"
"
,
"
g
"
);
//创建正则RegExp对象
accountMoneyList
=
accountMoneyList
.
replace
(
reg
,
""
);
//替换所有的双引号
accountMoneyArr
=
accountMoneyList
.
split
(
"
,
"
);
//转为数组
}
if
(
listSubType
===
"
采购
"
||
listSubType
===
"
零售退货
"
||
listSubType
===
"
销售退货
"
){
if
(
listSubType
===
"
采购
"
||
listSubType
===
"
零售退货
"
||
listSubType
===
"
销售退货
"
){
//付款为负数
//付款为负数
ChangeAmount
=
0
-
ChangeAmount
;
ChangeAmount
=
0
-
ChangeAmount
;
TotalPrice
=
0
-
TotalPrice
;
TotalPrice
=
0
-
TotalPrice
;
accountMoneyArr
=
changeListFmtMinus
(
accountMoneyArr
);
//将数组单个金额中的数值转为负数
if
(
accountMoneyArr
)
{
accountMoneyArr
=
changeListFmtMinus
(
accountMoneyArr
);
//将数组单个金额中的数值转为负数
}
}
}
//零售时候,可以从会员预付款中扣款
//零售时候,可以从会员预付款中扣款
var
thisPayType
=
"
现付
"
;
var
thisPayType
=
"
现付
"
;
...
@@ -2054,7 +2059,7 @@
...
@@ -2054,7 +2059,7 @@
PayType
:
thisPayType
,
//现付/预付款
PayType
:
thisPayType
,
//现付/预付款
Remark
:
$
.
trim
(
$
(
"
#Remark
"
).
val
()),
Remark
:
$
.
trim
(
$
(
"
#Remark
"
).
val
()),
AccountIdList
:
$
(
"
#AccountId
"
).
attr
(
"
data-accountarr
"
),
//账户列表-多账户
AccountIdList
:
$
(
"
#AccountId
"
).
attr
(
"
data-accountarr
"
),
//账户列表-多账户
AccountMoneyList
:
JSON
.
stringify
(
accountMoneyArr
),
//账户金额列表-多账户
AccountMoneyList
:
accountMoneyArr
?
JSON
.
stringify
(
accountMoneyArr
)
:
""
,
//账户金额列表-多账户
Discount
:
$
.
trim
(
$
(
"
#Discount
"
).
val
()),
Discount
:
$
.
trim
(
$
(
"
#Discount
"
).
val
()),
DiscountMoney
:
$
.
trim
(
$
(
"
#DiscountMoney
"
).
val
()),
DiscountMoney
:
$
.
trim
(
$
(
"
#DiscountMoney
"
).
val
()),
DiscountLastMoney
:
$
.
trim
(
$
(
"
#DiscountLastMoney
"
).
val
()),
DiscountLastMoney
:
$
.
trim
(
$
(
"
#DiscountLastMoney
"
).
val
()),
...
...
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