<div  ms-controller="{{pluginVmid}}" style="padding:5px 10px;">
    <table border="0" align="center" cellpadding="0" cellspacing="0" id="mian" style="border-bottom: none;">
        <tbody>
            <tr>
                <td style="width: 198px; vertical-align: top;">
                    <table cellpadding="0" cellspacing="0" height="100%" class="bordergrag">
                        <tr>
                            <td style="vertical-align: top;">
                                <div class="boxTitlenoneb">
                                    <h2>
                                        客户种类
                                    </h2>
                                    <ul ms-attr-id="treeId" class='ztree' style="width: 198px; height: 559px; overflow: auto;"></ul>
                                </div>
                            </td>
                        </tr>
                    </table>
                </td>
                <td style="width: 10px;"></td>
                <td style="padding: 0px;vertical-align: top;">
                    <div class="boxTitlenoneb bordergrag" style="border-bottom:none;">
                        <h3>
                            客户列表
                            <span class="rseachbox">
                                <input class="input" type="text" ms-duplex="queryData.customerName.val" ms-enter="gridm.doSearch" placeholder="请输入客户名称或助记关键词">
                                <button type="button" class="inputbt" ms-click="gridm.doSearch" ></button>
                            </span>
                        </h3>
                    </div>
                    <div class="bordergrag" style="height: 300px; overflow-y:scroll;border-top:none;">
                        <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tableList">
                            <thead>
                                <tr class="head" style="background-color: rgb(250, 250, 250);">
                                    <td width="5%" align="center">
                                        <input ms-if="gridm.multiple" type="checkbox" ms-click="gridm.selectAll(true)" />
                                    </td>
                                    <td align="center" width="30%">客户名称</td>
                                    <td align="center" width="45%">地址</td>
                                    <td align="center" width="10%">状态</td>
                                    <td align="center" width="10%">归属</td>
                                </tr>
                            </thead>
                            <tbody ms-if="gridm.gridmsg">
                                <tr>
                                    <td colspan="5" class="gridmsg">{{gridm.gridmsg|html}}</td>
                                </tr>
                            </tbody>
                            <tbody>
                                <tr ms-class-1="selected:item.checked" ms-repeat-item="gridm.list" ms-dblclick="onDblClick(item)">
                                    <td align="center">
                                        <input ms-if="gridm.multiple" type="checkbox" ms-duplex-radio="item.checked" ms-disabled="item.chkDisabled" />
                                        <input ms-if="!gridm.multiple" type="radio" ms-duplex="item.checked" ms-disabled="item.chkDisabled" />
                                    </td>
                                    <td align="left">{{item.Name}}</td>
                                    <td align="center" style="white-space:normal;">{{item.CompanyAddress}}</td>
                                    <td align="center">{{item.State|customerState}}</td>
                                    <td align="center">{{item.OwnerBy}}</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div ms-widget='paging' data-gridid="gridm" style="height:30px;line-height:30px;border-top:none;" class="bordergrag"></div>
                    <div ms-if="type==CONST.CUSTOMER">
                        <div class="boxTitlenoneb bordergrag" style="margin-top: 2px; border-bottom: none;">
                            <h3>已选客户
                            </h3>
                        </div>
                        <div class="bordergrag" style="height: 200px; overflow-y: scroll; border-top: none;">
                            <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tableList">
                                <thead>
                                    <tr class="head" style="background-color: rgb(250, 250, 250);">
                                        <td width="5%" align="center">序号 
                                        </td>
                                        <td align="center" width="30%">客户名称</td>
                                        <td align="center" width="35%">地址</td>
                                        <td align="center" width="10%">状态</td>
                                        <td align="center" width="10%">归属</td>
                                        <td align="center" width="10%"><a href="javascript:void(0)" ms-click="clear" title="移除全部">移除</a></td>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr ms-repeat-item="grid1.list">
                                        <td align="center">{{$index+1}}
                                        </td>
                                        <td align="left">{{item.Name}}</td>
                                        <td align="center" style="white-space:normal;">{{item.CompanyAddress}}</td>
                                        <td align="center">{{item.State|customerState}}</td>
                                        <td align="center">{{item.OwnerBy}}</td>
                                        <td align="center">
                                            <a ms-if="!item.chkDisabled" href="javascript:void(0)" class="dodel" ms-click="grid1.removeById(item.Id,$index,false)" title="移除"></a>
                                        </td>
                                    </tr>
                                </tbody>
                                <tfoot>
                                    <tr ms-if="grid1.gridmsg">
                                        <td colspan="6" class="gridmsg">{{grid1.gridmsg|html}}</td>
                                    </tr>
                                </tfoot>
                            </table>
                        </div>
                    </div>
                    <div ms-if="type==CONST.CONTACTS">
                        <div class="boxTitlenoneb bordergrag" style="margin-top: 2px; border-bottom: none;">
                            <h3>联系人列表
                                <a href="javascript:void(0)" class="button acolor" ms-click="addContact()" style="margin-top:auto;">+ 新增联系人</a>
                            </h3>
                        </div>
                        <div class="bordergrag" style="height: 200px; overflow-y: scroll; border-top: none;">
                            <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tableList">
                                <thead>
                                    <tr class="head">
                                        <th style="width: 5%;">&nbsp;</th>
                                        <th style="width: 20%;" align="center">姓名</th>
                                        <th style="width: 10%;" align="center">性别</th>
                                        <th style="width: 20%;" align="center">职位</th>
                                        <th style="width: 20%;" align="center">角色</th>
                                        <th style="width: 20%;" align="center">手机</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr ms-repeat-c="grid1.list" ms-dblclick="onDblClick(c)">
                                        <td align="center">
                                            <input type="radio"  ms-duplex="c.checked" /></td>
                                        <td align="left">{{c.Name}}</td>
                                        <td align="center">{{c.Sex|sex}}</td>
                                        <td align="center">{{c.Post}}</td>
                                        <td align="center">{{c.ContactRoleDisplay}}</td>
                                        <td align="center">{{c.MobileNumber1}}</td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
</div>
