org_manage_main.php 10.7 KB

<div class="easyui-layout" data-options="fit:true">
    <div data-options="region:'center',border:false" style="overflow: hidden;">
        <table id="win_base_org_grid" class="easyui-treegrid" style="width: 100%;"
               data-options="
				fit:true,
				collapsible:true,
				iconCls:'kbi-icon-record',
				singleSelect:true,
				border:false,
				method:'get',
				toolbar:'#orders_grid_details_toolbar',
				rownumbers:true,
				idField: 'org_id',
				treeField:'cn_name',
				lines: true,
				resizeHandle:'right',
                onDblClickRow:$.h.org.onDblClickRow,
                onClickRow:$.h.org.onClickRow,
                onRowContextMenu:$.h.org.rightClick,
                onLoadSuccess:function(){$('.createSelectUpBtn').linkbutton({plain: true});},
                url:'/web/organization/getTree'
			">
            <thead data-options="frozen:true">
            <tr>
                <th data-options="field:'org_id',hidden:true"></th>
                <th data-options="field:'caozuo',width:40,formatter:$.h.org.createSelectUpBtn"><b>操作</b></th>
                <th data-options="field:'cn_name',width:300"><b>机构名称</b></th>
            </tr>
            </thead>
            <thead>
            <tr>
                <th data-options="field:'org_code',width:100"><b>编码</b></th>
                <th data-options="field:'org_head',width:100"><b>负责人</b></th>
                <th data-options="field:'org_phone',width:150"><b>电话</b></th>
                <th data-options="
							field:'org_type',
							fixed:true,
							width:80,
							align:'center',
							formatter:function(value,row,index) {
								switch(value) {
									case 1:
										return '保险代理';
									case 2:
										return '主体公司';
									case 3:
										return '科技公司';
									case 4:
										return '内部机构';
									case 5:
										return '外部机构';
									default:
									    return '未知';
								}
							},
							styler:function(value,row,index) {
								switch(value) {
									case 1:return;
										//return 'background-color:#ccc;color:red;';
									case 2:return;
										//return 'background-color:#eee;color:blue;';
									case 3:return;
										//return 'background-color:#ccc;color:red;';
									case 4:return;
										//return 'background-color:#eee;color:blue;';
									case 5:return;
										//return 'background-color:#eee;color:blue;';
									default:
									    return 'background-color:#eee;color:red;';
								}
							}
						"><b>机构类型</b></th>
                <th data-options="
                            value:1,
                            width:50,
							field:'org_status',
							formatter:function(value,row,index) {
								return value == 1 ? '<font color=green>启用</font>' : '<font color=red>禁用</font>'
							}
						"><b>状态</b></th>
                <th data-options="field:'org_province',width:100"><b>省份</b></th>
                <th data-options="field:'org_city',width:100"><b>城市</b></th>
                <th data-options="field:'org_area',width:100"><b>区/县</b></th>
                <th data-options="field:'org_address',width:250"><b>地址</b></th>
                <th data-options="field:'en_name',width:100"><b>英文简称</b></th>
                <th data-options="field:'remark',width:100"><b>备注</b></th>


            </tr>
            </thead>
        </table>
    </div>

    <div data-options="
        region:'east',
        split:true,
        collapsible:true,
        footer:'#win_base_org_form_footer',
        onResize:$.h.org.onReSizeForm
        " title="添加机构" id="orgSaveBox" style="width:360px;padding:5px;">
        <div class="easyui-panel" data-options="fit:true,border:false,footer:'#client_list_left_footer'" style="background-color:#eee;padding:5px 5px 0px 5px;">
            <form action="" id="orgForm" data-options="" method="post" class="form-message" style="padding-top: 20px;">

                <ul class=" totalForm">
                    <li>
                        <div class="formflow-l">上级机构</div>
                        <div class="formflow-r">
                            <input type="text" disabled data-options="required:true" class="easyui-textbox" id="org_pname"  value="请在左侧列表选择" style="width: 100%;"/>
                            <input type="hidden" id="org_pid" name="org_pid">
                            <input type="hidden" name="org_id" id="org_id">
                            <input type="hidden" name="lock_version">
                        </div>
                    </li>
                    <li>
                        <div class="formflow-l">机构类型</div>
                        <div class="formflow-r">
                            <select data-potions="editable:false,panelHeight:'auto'" class="easyui-combobox" name="org_type" id="org_type" style="width: 100%;">
                                <option value="1">保险代理</option>
                                <option value="2">主体公司</option>
                                <option value="3">科技公司</option>
                                <option value="4">内部机构</option>
                                <option value="5">外部机构</option>
                            </select>
                        </div>
                    </li>
                    <li>
                        <div class="formflow-l">中文名称</div>
                        <div class="formflow-r">
                            <input class="easyui-textbox" name="cn_name" style="width: 100%;" data-options="required:true"/>
                        </div>
                    </li>
                    <li>
                        <div class="formflow-l">负责人</div>
                        <div class="formflow-r">
                            <input class="easyui-textbox" name="org_head" style="width: 100%;" data-options="required:true"/>
                        </div>
                    </li>
                    <li>
                        <div class="formflow-l">电话</div>
                        <div class="formflow-r">
                            <input class="easyui-textbox" name="org_phone" style="width: 100%;" data-options="required:true,validType:'phone'"/>
                        </div>
                    </li>
                    <li>
                        <div class="formflow-l">省份</div>
                        <div class="formflow-r">
                            <input class="easyui-textbox" name="org_province" style="width: 100%;" data-options=""/>
                        </div>
                    </li>
                    <li>
                        <div class="formflow-l">城市</div>
                        <div class="formflow-r">
                            <input class="easyui-textbox" name="org_city" style="width: 100%;" data-options=""/>
                        </div>
                    </li>
                    <li>
                        <div class="formflow-l">区县</div>
                        <div class="formflow-r">
                            <input class="easyui-textbox" name="org_area" style="width: 100%;" data-options=""/>
                        </div>
                    </li>
                    <li>
                        <div class="formflow-l">地址</div>
                        <div class="formflow-r">
                            <input class="easyui-textbox" name="org_address" style="width: 100%;" data-options=""/>
                        </div>
                    </li>
                    <li>
                        <div class="formflow-l">备注</div>
                        <div class="formflow-r">
                            <input class="easyui-textbox" name="remark" style="width: 100%;" data-options=""/>
                        </div>
                    </li>
                    <li>
                        <div class="formflow-l">英文简称</div>
                        <div class="formflow-r">
                            <input class="easyui-textbox" name="en_name" style="width: 100%;" data-options=""/>
                        </div>
                    </li>
                    <li>
                        <div class="formflow-l">状态</div>
                        <div class="formflow-r">
                            <input id="org_status" name="org_status" class="easyui-switchbutton" data-options="value:1,onText:'启用',offText:'禁用',width:100,checked:true,onChange:$.h.org.changeStatus" />
                        </div>
                    </li>
                    <li>
                        <div class="formflow-l">排序</div>
                        <div class="formflow-r">
                            <input id="org_sort" name="org_sort" class="easyui-numberspinner" style="width:100%;" data-options="value:1,required:true,spinAlign:'horizontal',min:0,max:9999999"/>
                        </div>
                    </li>
                </ul>
            </form>
            <div id="client_list_left_footer" style="padding:5px;overflow:hidden; display:flex;justify-content:space-between;align-items:center;">
                <a class="easyui-linkbutton" style="width:46%;height:40px;" data-options="iconCls:'icon-reload',onClick:$.h.org.reset">重置</a>
                <a class="easyui-linkbutton" id="orgSubmitBTN" data-options="iconCls:'icon-ok',onClick:$.h.org.onSubmitForm" style="width:46%;height:40px;">添加</a>
            </div>
        </div>
    </div>
<!--    右键菜单 -->
    <div id="mm" class="easyui-menu" style="width:120px;" data-options="onClick:$.h.org.menuHandler">
        <div data-options="name:'selectUpOrg'">选为上级机构</div>
    </div>

    <!--    工具栏-->
    <div id="orders_grid_details_toolbar" style="height:33px;display:flex;justify-content: space-between;">
        <div style="margin-left: 5px;">
            <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:false,onClick:$.h.org.oninit">刷新</a>
            <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-cancel',plain:false,onClick:$.h.org.delOrgTip">删除机构</a>
<!--            <input class="easyui-textbox" id="itemid" data-options="label:'机构名称',labelWidth:70" style="width:250px" />-->
<!--            <input class="easyui-textbox" data-options="label:'身份证号',labelWidth:70" style="width:200px" />-->
<!--            <input class="easyui-datetimespinner" data-options="label:'日期',labelWidth:35" style="width:200px" />-->
<!--            <input class="easyui-datetimespinner" data-options="label:'至',labelWidth:20" style="width:190px" />-->
<!--            <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:false,onClick:$.h.org.searchOrg">搜索</a>-->
        </div>
    </div>
</div>