JUI页面是这样的
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
<
div
class
=
"tabsContent"
style
=
"height: 150px;"
>
<
div
>
<
table
class
=
"list nowrap itemDetail"
addButton
=
"新建诊疗服务录入"
width
=
"1400px"
>
<
thead
>
<
tr
>
<!-- <th type="text" name="" defaultVal="#index#" size="2" fieldClass="digits">序号</th> -->
<
th
defaultVal
=
"注射"
type
=
"text"
name
=
"surgerys[#index#].name"
size
=
"12"
fieldClass
=
"required"
fieldAttrs
=
"{remote:'validate_remote.html', maxlength:100}"
>项目名称</
th
>
<
th
defaultVal
=
"注射"
type
=
"text"
name
=
"surgerys[#index#].meaning"
size
=
"12"
fieldClass
=
"required"
fieldAttrs
=
"{remote:'validate_remote.html', maxlength:100}"
>项目内涵</
th
>
<
th
defaultVal
=
"注射"
type
=
"text"
name
=
"surgerys[#index#].exceptedContent"
size
=
"12"
fieldClass
=
"required"
fieldAttrs
=
"{remote:'validate_remote.html', maxlength:100}"
>除外内容</
th
>
<
th
defaultVal
=
"元"
type
=
"text"
name
=
"surgerys[#index#].chargeElement"
size
=
"12"
fieldClass
=
"required"
fieldAttrs
=
"{remote:'validate_remote.html', maxlength:100}"
>计价单位</
th
>
<
th
defaultVal
=
"个"
type
=
"text"
name
=
"surgerys[#index#].unit"
size
=
"12"
fieldClass
=
"required"
fieldAttrs
=
"{remote:'validate_remote.html', maxlength:10}"
>单位</
th
>
<
th
defaultVal
=
"注射"
type
=
"text"
name
=
"surgesrys[#index#].specification"
size
=
"12"
fieldClass
=
"required"
fieldAttrs
=
"{remote:'validate_remote.html', maxlength:10}"
>规格</
th
>
<
th
defaultVal
=
"45"
type
=
"text"
name
=
"surgerys[#index#].amountUnit"
defaultVal
=
"0.8"
size
=
"12"
fieldClass
=
"number"
>单价</
th
>
<
th
defaultVal
=
"12"
type
=
"text"
name
=
"surgerys[#index#].elements"
size
=
"12"
fieldClass
=
"digits"
>数量</
th
>
<
th
defaultVal
=
"0.8"
type
=
"text"
name
=
"surgerys[#index#].amount"
size
=
"12"
fieldClass
=
"number"
>金额</
th
>
<
th
type
=
"enum"
name
=
"surgerys[#index#].isMedicalInsurance"
size
=
"12"
enumUrl
=
"public-resources/manage/isMedicalInsurance.html"
>医保类型</
th
>
<
th
defaultVal
=
"注射"
type
=
"text"
name
=
"surgerys[#index#].instruction"
size
=
"12"
fieldClass
=
"required"
fieldAttrs
=
"{remote:'validate_remote.html', maxlength:100}"
>说明</
th
>
<
th
defaultVal
=
"注射"
type
=
"text"
name
=
"surgerys[#index#].surgeryType"
size
=
"12"
fieldClass
=
"required"
fieldAttrs
=
"{remote:'validate_remote.html', maxlength:100}"
>类别</
th
>
<
th
defaultVal
=
"13"
type
=
"text"
name
=
"surgerys[#index#].selfPayRatio"
size
=
"12"
fieldClass
=
"number"
>自付比例</
th
>
<
th
defaultVal
=
"备注"
type
=
"text"
name
=
"surgerys[#index#].remark"
size
=
"20"
fieldClass
=
"required"
fieldAttrs
=
"{remote:'validate_remote.html', maxlength:200}"
>备注</
th
>
<
th
type
=
"del"
width
=
"60"
>操作</
th
>
</
tr
>
</
thead
>
<
tbody
></
tbody
>
</
table
>
</
div
>
</
div
>
|
每点击一下就增加一条信息,html代码如下
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
<
tbody
>
<
tr
class
=
"unitBox"
>
<
td
><
input
name
=
"surgerys[0].name"
value
=
"注射"
size
=
"12"
class
=
"required textInput"
remote
=
"validate_remote.html"
maxlength
=
"100"
type
=
"text"
></
td
>
<
td
><
input
name
=
"surgerys[0].meaning"
value
=
"注射"
size
=
"12"
class
=
"required textInput valid"
remote
=
"validate_remote.html"
maxlength
=
"100"
type
=
"text"
></
td
>
<
td
><
input
name
=
"surgerys[0].exceptedContent"
value
=
"注射"
size
=
"12"
class
=
"required textInput"
remote
=
"validate_remote.html"
maxlength
=
"100"
type
=
"text"
></
td
>
<
td
><
input
name
=
"surgerys[0].chargeElement"
value
=
"元"
size
=
"12"
class
=
"required textInput"
remote
=
"validate_remote.html"
maxlength
=
"100"
type
=
"text"
></
td
>
<
td
><
input
name
=
"surgerys[0].unit"
value
=
"个"
size
=
"12"
class
=
"required textInput"
remote
=
"validate_remote.html"
maxlength
=
"10"
type
=
"text"
></
td
>
<
td
><
input
name
=
"surgesrys[0].specification"
value
=
"注射"
size
=
"12"
class
=
"required textInput"
remote
=
"validate_remote.html"
maxlength
=
"10"
type
=
"text"
></
td
>
<
td
><
input
name
=
"surgerys[0].amountUnit"
value
=
"45"
size
=
"12"
class
=
"number textInput"
type
=
"text"
></
td
>
<
td
><
input
name
=
"surgerys[0].elements"
value
=
"12"
size
=
"12"
class
=
"digits textInput"
type
=
"text"
></
td
>
<
td
><
input
name
=
"surgerys[0].amount"
value
=
"0.8"
size
=
"12"
class
=
"number textInput"
type
=
"text"
></
td
>
<
td
>
<!-- 录入二 录入账单信息 诊疗服务 医保类型 -->
<
div
class
=
"combox"
>
<
div
id
=
"combox_4178430"
class
=
"select"
>
<
a
href
=
"javascript:"
class
=
""
name
=
"surgery.isMedicalInsurance"
value
=
"true"
>是</
a
><
select
class
=
""
name
=
"surgery.isMedicalInsurance"
>
<
option
value
=
"true"
>是</
option
>
<
option
value
=
"false"
>否</
option
>
</
select
>
</
div
>
</
div
>
</
td
>
<
td
><
input
name
=
"surgerys[0].instruction"
value
=
"注射"
size
=
"12"
class
=
"required textInput"
remote
=
"validate_remote.html"
maxlength
=
"100"
type
=
"text"
></
td
>
<
td
><
input
name
=
"surgerys[0].surgeryType"
value
=
"注射"
size
=
"12"
class
=
"required textInput"
remote
=
"validate_remote.html"
maxlength
=
"100"
type
=
"text"
></
td
>
<
td
><
input
name
=
"surgerys[0].selfPayRatio"
value
=
"13"
size
=
"12"
class
=
"number textInput"
type
=
"text"
></
td
>
<
td
><
input
name
=
"surgerys[0].remark"
value
=
"备注"
size
=
"20"
class
=
"required textInput"
remote
=
"validate_remote.html"
maxlength
=
"200"
type
=
"text"
></
td
>
<
td
><
a
href
=
"javascript:void(0)"
class
=
"btnDel "
>删除</
a
></
td
>
</
tr
>
<
tr
class
=
"unitBox"
>
<
td
><
input
name
=
"surgerys[1].name"
value
=
"注射"
size
=
"12"
class
=
"required textInput valid"
remote
=
"validate_remote.html"
maxlength
=
"100"
type
=
"text"
></
td
>
<
td
><
input
name
=
"surgerys[1].meaning"
value
=
"注射"
size
=
"12"
class
=
"required textInput valid"
remote
=
"validate_remote.html"
maxlength
=
"100"
type
=
"text"
></
td
>
<
td
><
input
name
=
"surgerys[1].exceptedContent"
value
=
"注射"
size
=
"12"
class
=
"required textInput"
remote
=
"validate_remote.html"
maxlength
=
"100"
type
=
"text"
></
td
>
<
td
><
input
name
=
"surgerys[1].chargeElement"
value
=
"元"
size
=
"12"
class
=
"required textInput"
remote
=
"validate_remote.html"
maxlength
=
"100"
type
=
"text"
></
td
>
<
td
><
input
name
=
"surgerys[1].unit"
value
=
"个"
size
=
"12"
class
=
"required textInput"
remote
=
"validate_remote.html"
maxlength
=
"10"
type
=
"text"
></
td
>
<
td
><
input
name
=
"surgesrys[1].specification"
value
=
"注射"
size
=
"12"
class
=
"required textInput"
remote
=
"validate_remote.html"
maxlength
=
"10"
type
=
"text"
></
td
>
<
td
><
input
name
=
"surgerys[1].amountUnit"
value
=
"45"
size
=
"12"
class
=
"number textInput"
type
=
"text"
></
td
>
<
td
><
input
name
=
"surgerys[1].elements"
value
=
"12"
size
=
"12"
class
=
"digits textInput"
type
=
"text"
></
td
>
<
td
><
input
name
=
"surgerys[1].amount"
value
=
"0.8"
size
=
"12"
class
=
"number textInput"
type
=
"text"
></
td
>
<
td
>
<!-- 录入二 录入账单信息 诊疗服务 医保类型 -->
<
div
class
=
"combox"
>
<
div
id
=
"combox_4628796"
class
=
"select"
>
<
a
href
=
"javascript:"
class
=
""
name
=
"surgery.isMedicalInsurance"
value
=
"true"
>是</
a
><
select
class
=
""
name
=
"surgery.isMedicalInsurance"
>
<
option
value
=
"true"
>是</
option
>
<
option
value
=
"false"
>否</
option
>
</
select
>
</
div
>
</
div
>
</
td
>
<
td
><
input
name
=
"surgerys[1].instruction"
value
=
"注射"
size
=
"12"
class
=
"required textInput"
remote
=
"validate_remote.html"
maxlength
=
"100"
type
=
"text"
></
td
>
<
td
><
input
name
=
"surgerys[1].surgeryType"
value
=
"注射"
size
=
"12"
class
=
"required textInput"
remote
=
"validate_remote.html"
maxlength
=
"100"
type
=
"text"
></
td
>
<
td
><
input
name
=
"surgerys[1].selfPayRatio"
value
=
"13"
size
=
"12"
class
=
"number textInput"
type
=
"text"
></
td
>
<
td
><
input
name
=
"surgerys[1].remark"
value
=
"备注"
size
=
"20"
class
=
"required textInput"
remote
=
"validate_remote.html"
maxlength
=
"200"
type
=
"text"
></
td
>
<
td
><
a
href
=
"javascript:void(0)"
class
=
"btnDel "
>删除</
a
></
td
>
</
tr
>
</
tbody
>
|
效果:
后台不可能一个一个接收的,但是spring mvc又不能直接接收list集合,所以想到了新建一个VO来实现,
1
2
3
4
5
|
public
class
VoucherLineModel {
private
List<SurgeryImpl> surgerys;
// 服务诊疗
private
List<MedicineImpl> medicines;
// 药品
private
List<DiagnosisImpl> diagnosisList;
// 手术
|
Controler:
1
2
3
|
@RequestMapping
(
"/addVoucherLineDetail/{oid}"
)
public
ModelAndView addVoucherLineDetail(
@PathVariable
(
"oid"
)
long
oid,VoucherLineModel voucherLineModel,
HttpServletRequest request) {
|
这样就实现了需求了。