Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sunac_report
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
java-sunac-report
sunac_report
Commits
8c523585
Commit
8c523585
authored
Aug 28, 2019
by
sunxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下拉框回显调整
parent
f9adb6ba
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
18 deletions
+44
-18
CtBbtcBusCategoryController.java
src/main/java/com/ejweb/modules/report/web/CtBbtcBusCategoryController.java
+5
-2
ctBbtcBusCategoryForm.jsp
src/main/webapp/WEB-INF/views/modules/report/ctBbtcBusCategoryForm.jsp
+22
-7
userForm.jsp
src/main/webapp/WEB-INF/views/modules/sys/userForm.jsp
+17
-9
No files found.
src/main/java/com/ejweb/modules/report/web/CtBbtcBusCategoryController.java
View file @
8c523585
...
@@ -127,8 +127,11 @@ public class CtBbtcBusCategoryController extends BaseController {
...
@@ -127,8 +127,11 @@ public class CtBbtcBusCategoryController extends BaseController {
List
<
CtBbtcBusType
>
ctBbtcBusTypeList
=
ctBbtcBusTypeService
.
findList
(
null
);
List
<
CtBbtcBusType
>
ctBbtcBusTypeList
=
ctBbtcBusTypeService
.
findList
(
null
);
if
(
ctBbtcBusCategory
.
getId
()
!=
null
){
if
(
ctBbtcBusCategory
.
getId
()
!=
null
){
CtBbtcBusCategory
ctBbtcBusCategory1
=
ctBbtcBusCategoryService
.
get
(
ctBbtcBusCategory
.
getId
());
CtBbtcBusCategory
ctBbtcBusCategory1
=
ctBbtcBusCategoryService
.
get
(
ctBbtcBusCategory
.
getId
());
ctBbtcBusCategory
.
setType
(
ctBbtcBusCategory1
.
getType
());
if
(
ctBbtcBusCategory1
!=
null
){
ctBbtcBusCategory
.
setTypeName
(
ctBbtcBusCategory1
.
getTypeName
());
ctBbtcBusCategory
.
setType
(
ctBbtcBusCategory1
.
getType
());
ctBbtcBusCategory
.
setTypeName
(
ctBbtcBusCategory1
.
getTypeName
());
ctBbtcBusCategory
.
setSupplementArea
(
ctBbtcBusCategory1
.
getSupplementArea
());
}
}
}
model
.
addAttribute
(
"ctBbtcBusTypeList"
,
ctBbtcBusTypeList
);
model
.
addAttribute
(
"ctBbtcBusTypeList"
,
ctBbtcBusTypeList
);
model
.
addAttribute
(
"ctBbtcBusCategory"
,
ctBbtcBusCategory
);
model
.
addAttribute
(
"ctBbtcBusCategory"
,
ctBbtcBusCategory
);
...
...
src/main/webapp/WEB-INF/views/modules/report/ctBbtcBusCategoryForm.jsp
View file @
8c523585
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
getRegion
();
getRegion
();
getType
();
//$("#name").focus();
//$("#name").focus();
$
(
"#inputForm"
).
validate
({
$
(
"#inputForm"
).
validate
({
...
@@ -32,7 +33,6 @@
...
@@ -32,7 +33,6 @@
var
selectNode
=
$
(
"#supplementArea"
);
var
selectNode
=
$
(
"#supplementArea"
);
selectNode
.
empty
();
//每次需要将上一次的数据进行清空
selectNode
.
empty
();
//每次需要将上一次的数据进行清空
selectNode
.
append
(
"<option value=''>请选择</option>"
);
selectNode
.
append
(
"<option value=''>请选择</option>"
);
var
ts_describe
=
$
(
"#ctBbtcGroup"
).
val
();
var
ts_describe
=
$
(
"#ctBbtcGroup"
).
val
();
if
(
ts_describe
!=
null
&&
ts_describe
!=
''
){
if
(
ts_describe
!=
null
&&
ts_describe
!=
''
){
$
.
ajax
({
$
.
ajax
({
...
@@ -41,11 +41,18 @@
...
@@ -41,11 +41,18 @@
dataType
:
"json"
,
dataType
:
"json"
,
success
:
function
(
returnedData
)
{
success
:
function
(
returnedData
)
{
var
data2
=
returnedData
.
ctBbtcRegionList
;
var
data2
=
returnedData
.
ctBbtcRegionList
;
var
supplementArea
=
"${ctBbtcBusCategory.supplementArea}"
;
if
(
data2
!=
''
)
{
if
(
data2
!=
''
)
{
var
slsb
=
document
.
getElementById
(
"
supplementArea"
);
var
slsb
=
$
(
"#
supplementArea"
);
for
(
var
i
=
0
;
i
<
data2
.
length
;
i
++
){
for
(
var
i
=
0
;
i
<
data2
.
length
;
i
++
){
slsb
.
append
(
new
Option
(
data2
[
i
].
name
,
data2
[
i
].
id
));
/* slsb.append(new Option(data1[i].name,data1[i].id) );*/
var
value
=
data2
[
i
].
id
;
var
label
=
data2
[
i
].
name
;
if
(
supplementArea
==
label
){
slsb
.
append
(
"<option value="
+
value
+
" selected='true' >"
+
label
+
"</option>"
);
}
else
{
slsb
.
append
(
"<option value="
+
value
+
" >"
+
label
+
"</option>"
);
}
}
}
}
}
},
error
:
function
(
data
){
},
error
:
function
(
data
){
...
@@ -65,6 +72,7 @@
...
@@ -65,6 +72,7 @@
var
ts_describe1
=
$
(
"#ctBbtcGroup"
).
val
();
var
ts_describe1
=
$
(
"#ctBbtcGroup"
).
val
();
var
ts_describe2
=
$
(
"#supplementArea"
).
val
();
var
ts_describe2
=
$
(
"#supplementArea"
).
val
();
if
(
ts_describe1
!=
null
&&
ts_describe1
!=
''
&&
ts_describe2
!=
null
&&
ts_describe2
!=
''
){
if
(
ts_describe1
!=
null
&&
ts_describe1
!=
''
&&
ts_describe2
!=
null
&&
ts_describe2
!=
''
){
$
.
ajax
({
$
.
ajax
({
type
:
"POST"
,
type
:
"POST"
,
...
@@ -72,11 +80,18 @@
...
@@ -72,11 +80,18 @@
dataType
:
"json"
,
dataType
:
"json"
,
success
:
function
(
returnedData
)
{
success
:
function
(
returnedData
)
{
var
data2
=
returnedData
.
ctBbtcTypeList
;
var
data2
=
returnedData
.
ctBbtcTypeList
;
var
type
=
"${ctBbtcBusCategory.typeName}"
;
if
(
data2
!=
''
)
{
if
(
data2
!=
''
)
{
var
slsb
=
document
.
getElementById
(
"
supplementType"
);
var
slsb
=
$
(
"#
supplementType"
);
for
(
var
i
=
0
;
i
<
data2
.
length
;
i
++
){
for
(
var
i
=
0
;
i
<
data2
.
length
;
i
++
){
slsb
.
append
(
new
Option
(
data2
[
i
].
typeName
,
data2
[
i
].
parentId
));
/* slsb.append(new Option(data1[i].name,data1[i].id) );*/
var
value
=
data2
[
i
].
parentId
;
var
label
=
data2
[
i
].
typeName
;
if
(
type
==
label
){
slsb
.
append
(
"<option value="
+
value
+
" selected='true' >"
+
label
+
"</option>"
);
}
else
{
slsb
.
append
(
"<option value="
+
value
+
" >"
+
label
+
"</option>"
);
}
}
}
}
}
},
error
:
function
(
data
){
},
error
:
function
(
data
){
...
...
src/main/webapp/WEB-INF/views/modules/sys/userForm.jsp
View file @
8c523585
...
@@ -48,17 +48,21 @@
...
@@ -48,17 +48,21 @@
var
data1
=
returnedData
.
ctBbtcRegionList
;
var
data1
=
returnedData
.
ctBbtcRegionList
;
// console.log(data1[0].name);
// console.log(data1[0].name);
// console.log(data2[0].name);
// console.log(data2[0].name);
var
supplementArea
=
$
(
"#hiddenArea"
).
val
();
if
(
data1
!=
''
)
{
if
(
data1
!=
''
)
{
var
slsb
=
document
.
getElementById
(
"
supplementArea"
);
var
slsb
=
$
(
"#
supplementArea"
);
for
(
var
i
=
0
;
i
<
data1
.
length
;
i
++
){
for
(
var
i
=
0
;
i
<
data1
.
length
;
i
++
){
slsb
.
append
(
new
Option
(
data1
[
i
].
name
,
data1
[
i
].
id
));
/* slsb.append(new Option(data1[i].name,data1[i].id) );*/
var
value
=
data1
[
i
].
id
;
var
label
=
data1
[
i
].
name
;
if
(
supplementArea
==
label
){
slsb
.
append
(
"<option value="
+
value
+
" selected='true' >"
+
label
+
"</option>"
);
}
else
{
slsb
.
append
(
"<option value="
+
value
+
" >"
+
label
+
"</option>"
);
}
}
}
}
}
var
supplementArea
=
"${user.areaName}"
;
if
(
supplementArea
!=
null
&&
supplementArea
!=
''
){
$
(
"#supplementArea"
).
val
(
supplementArea
);
}
},
error
:
function
(
data
){
},
error
:
function
(
data
){
alert
(
"系统错误"
);
alert
(
"系统错误"
);
}
}
...
@@ -140,11 +144,15 @@
...
@@ -140,11 +144,15 @@
<div
class=
"control-group"
>
<div
class=
"control-group"
>
<label
class=
"control-label"
>
所属区域:
</label>
<label
class=
"control-label"
>
所属区域:
</label>
<div
class=
"controls"
>
<div
class=
"controls"
>
<input
type=
"hidden"
value=
"${user.areaName}"
id=
"hiddenArea"
>
<form:select
id=
"supplementArea"
path=
"area"
class=
"input-small "
cssStyle=
"width: 220px"
>
<form:select
id=
"supplementArea"
path=
"area"
class=
"input-small "
cssStyle=
"width: 220px"
>
<form:option
value=
""
>
请选择
</form:option>
<form:option
value=
""
>
请选择
</form:option>
<
%
--
<
form:options
items=
"${fns:getDictList('supplement_area')}"
itemLabel=
"label"
itemValue=
"value
"
<
%
--
<
form:options
items=
"${ctBbtcRegionList}"
itemLabel=
"name"
itemValue=
"id
"
htmlEscape=
"false"
/>
--%>
htmlEscape=
"false"
/>
--%>
</form:select>
</form:select>
<
%
--
<
select
id=
"supplementArea"
name=
"area"
class=
"input-small"
style=
"width:220px "
>
<option
value=
""
>
请选择
</option>
</select>
--%>
<
%
--
<
span
class=
"help-inline"
><font
color=
"red"
>
*
</font>
</span>
--%>
<
%
--
<
span
class=
"help-inline"
><font
color=
"red"
>
*
</font>
</span>
--%>
</div>
</div>
</div>
</div>
...
...
Write
Preview
Markdown
is supported
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