mitao
2024-07-08 022a7ff7abf82cd2546e18071ade5228b4e2339f
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
105
@layout("/common/_container.html"){
<div class="ibox float-e-margins">
    <div class="ibox-content">
        <div class="form-horizontal" id="userInfoForm">
 
            <input type="hidden" id="id" value="${user.id}">
            <input type="hidden" id="sexValue" value="${user.sex}">
 
            <div class="row">
                <div class="col-sm-6 b-r">
                    <#input id="account" name="账户" underline="true" value="${user.account}"/>
                    <#input id="citySel" name="部门" underline="true" readonly="readonly" hidden="deptid" hiddenValue="${user.deptid}" value="${deptName}" clickFun="UserInfoDlg.showDeptSelectTree(); return false;" style="background-color: #ffffff !important;"/>
                    <#input id="companyAddress" name="公司地址" value="${user.companyAddress}" underline="true" type="text"/>
                </div>
                <div class="col-sm-6">
                    <div id="driverInfoContent">
                        <input id="birthday" name="birthday" value="${user.birthday}" type="hidden"/>
                        <#input id="name" name="姓名" underline="true" value="${user.name}"/>
                        <#input id="phone" name="联系电话" value="${user.phone}" underline="true"/>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">所属城市</label>
                            <div class="col-sm-9">
                                <select class="form-control" id="cityCode1" name="cityCode1" onchange="Feng.selectCity1();">
                                    @for(city in cityList){
                                    <option value="${city.code}" ${city.code==provinceCode?'selected="selected"':''}>${city.name}</option>
                                    @}
                                </select>
                                <select class="form-control" id="cityCode2" name="cityCode2" onchange="Feng.selectCity2();">
                                    <option value="-1">请选择</option>
                                </select>
                                <select class="form-control" id="cityCode" name="cityCode">
                                    <option value="-1">请选择</option>
                                </select>
 
                                <input type="hidden" id="cityCode2Str" value="${cityCode}">
                                <input type="hidden" id="cityCode3Str" value="${countyCode}">
                                <script type="text/javascript">
                                    var cityCode2Str = $("#cityCode2Str").val();
                                    var cityCode3Str = $("#cityCode3Str").val();
 
                                    var code1 = $("#cityCode1").val();
                                    $.ajax({
                                        type: "GET",
                                        url: Feng.ctxPath + "/cityRegion/getListByParentId",
                                        data: {code1: code1},
                                        success: function(data) {
                                            var options = '<option value="-1">请选择</option>';
                                            $(data).each(function (i, item) {
                                                var selectedStr = "";
                                                if (cityCode2Str == item.code) {
                                                    selectedStr = 'selected="selected"';
                                                }
                                                options += "<option value='" + item.code + "' " + selectedStr + ">" + item.name + "</option>"
                                            });
                                            $("#cityCode2").html(options);
 
                                            var code2 = $("#cityCode2").val();
                                            $.ajax({
                                                type: "GET",
                                                url: Feng.ctxPath + "/cityRegion/getListByParentId",
                                                data: {code2: code2},
                                                success: function(data) {
                                                    var options = '<option value="-1">请选择</option>';
                                                    $(data).each(function (i, item) {
                                                        var selectedStr = "";
                                                        if (cityCode3Str == item.code) {
                                                            selectedStr = 'selected="selected"';
                                                        }
                                                        options += "<option value='" + item.code + "' " + selectedStr + ">" + item.name + "</option>"
                                                    });
                                                    $("#cityCode").html(options);
                                                }
                                            });
                                        }
                                    });
                                </script>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
 
            <!-- 这是部门选择的下拉框 -->
            <div id="menuContent" class="menuContent"
                 style="display: none; position: absolute; z-index: 200;">
                <ul id="treeDemo" class="ztree tree-box" style="width: 249px !important;"></ul>
            </div>
 
            <div class="row btn-group-m-t">
                <div class="col-sm-10 col-sm-offset-4">
                    <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="UserInfoDlg.editSubmit()"/>
                    <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="UserInfoDlg.close()"/>
                </div>
            </div>
        </div>
 
    </div>
</div>
<script src="${ctxPath}/static/modular/system/user/user_info.js"></script>
<script>
    laydate.render({
        elem: '#birthday'
    });
</script>
@}