<!-- 关联客户窗口 -->
<
div modal=
"true" class=
"easyui-window" title=
"关联客户窗口" id=
"customerWindow" collapsible=
"false" closed=
"true" minimizable=
"false" maximizable=
"false" style=
"top:
20
px
;left:
200
px
;width:
400
px
;height:
300
px
;
"
>
<
div style=
"overflow:
auto
;padding:
5
px
;
" border=
"false"
>
<
form id=
"customerForm" action=
"../../fixedAreaAction_assignCustomers2FixedArea.action" method=
"post"
>
<
table class=
"table-edit" width=
"80%" align=
"center"
>
<
tr class=
"title"
>
<
td colspan=
"3"
>关联客户
</
td
>
</
tr
>
<
tr
>
<
td
>
<
input type=
"hidden" name=
"id" id=
"customerFixedAreaId"
/>
<
select id=
"noassociationSelect" multiple=
"multiple" size=
"10"
>
</
select
>
</
td
>
<
td
>
<
input type=
"button" value=
"》》" id=
"toRight"
>
<
br
/>
<
input type=
"button" value=
"《《" id=
"toLeft"
>
<
script type=
"text/javascript"
>
$
(
function
()
{
//为上面两个按钮绑定事件,实现左右移动客户数据效果
$
(
"#toRight"
)
.
click
(
function
()
{
$
(
"#associationSelect"
)
.
append
(
$
(
"#noassociationSelect
option
:selected"
))
;
}
)
;
$
(
"#toLeft"
)
.
click
(
function
()
{
$
(
"#noassociationSelect"
)
.
append
(
$
(
"#associationSelect
option
:selected"
))
;
}
)
;
$
(
"#associationBtn"
)
.
click
(
function
()
{
//获取当前选中的定区id
//获得数据表格所有选中的行
var
rows
=
$
(
"#grid"
)
.datagrid
(
"getSelections"
)
;
var id
= rows
[
0
]
.id
;
$
(
"#customerFixedAreaId"
)
.val
(id
)
;
//提交表单之前需要选中所有的关联客户option
$
(
"#associationSelect
option
"
)
.attr
(
"selected"
,
"selected"
)
;
$
(
"#customerForm"
)
.submit
()
;
}
)
;
}
)
;
</
script
>
</
td
>
<
td
>
<
select id=
"associationSelect" name=
"customerIds" multiple=
"multiple" size=
"10"
></
select
>
</
td
>
</
tr
>
<
tr
>
<
td colspan=
"3"
><
a id=
"associationBtn" href=
"#" class=
"easyui-linkbutton" data-options=
"iconCls:'icon-save'"
>关联客户
</
a
> </
td
>
</
tr
>
</
table
>
</
form
>
</
div
>
</
div
>