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
c14c0812
Commit
c14c0812
authored
Jul 02, 2017
by
季圣华
Browse files
录入零售,刷卡时,解决加载预付款信息失败的bug
parent
c0ed080a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/webapp/js/pages/materials/in_out.js
View file @
c14c0812
...
...
@@ -24,6 +24,7 @@
var
amountNum
=
""
;
//单据编号开头字符
var
depotString
=
""
;
//店铺列表
var
orgDefaultId
=
0
;
//单位默认编号
var
orgDefaultList
;
//存储查询出来的会员列表
//初始化系统基础信息
getType
();
initSystemData_UB
();
...
...
@@ -216,10 +217,13 @@
onLoadSuccess
:
function
(
res
)
{
var
data
=
$
(
this
).
combobox
(
'
getData
'
);
for
(
var
i
=
0
;
i
<=
data
.
length
;
i
++
){
if
(
data
[
i
].
supplier
===
"
非会员
"
){
if
(
data
&&
data
[
i
]
&&
data
[
i
].
supplier
===
"
非会员
"
){
orgDefaultId
=
data
[
i
].
id
;
}
}
if
(
listSubType
===
"
零售
"
){
orgDefaultList
=
res
;
}
},
onSelect
:
function
(
rec
){
if
(
listSubType
===
"
零售
"
){
...
...
@@ -800,9 +804,25 @@
$
(
"
#OrganId
"
).
combobox
(
"
setValue
"
,
orgDefaultId
);
//自动默认选择非会员
//当会员卡号长度超过10位后,自动点击下拉框,用于兼容刷卡器
$
(
"
#OrganId
"
).
next
().
find
(
"
input
"
).
off
(
"
keyup
"
).
on
(
"
keyup
"
,
function
(){
var
self
=
this
;
if
(
$
(
this
).
val
().
length
===
10
){
setTimeout
(
function
(){
$
(
"
.combo-panel .combobox-item-selected
"
).
click
();
//更新付款类型,加载会员的预付款的金额
for
(
var
i
=
0
;
i
<
orgDefaultList
.
length
;
i
++
){
var
rec
=
orgDefaultList
[
i
];
if
(
rec
.
supplier
==
$
(
self
).
val
()){
var
option
=
""
;
if
(
rec
.
supplier
!==
"
非会员
"
&&
rec
.
advanceIn
>
0
){
option
=
'
<option value="预付款">预付款(
'
+
rec
.
advanceIn
+
'
)</option>
'
;
option
+=
'
<option value="现付">现付</option>
'
;
}
else
{
option
+=
'
<option value="现付">现付</option>
'
;
}
$
(
"
#payType
"
).
empty
().
append
(
option
);
}
}
},
500
);
}
});
...
...
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