无关风月
2025-05-08 9486766c806fe1d9e082b2fd02ea1cc558f1b443
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
@layout("/common/_container.html"){
<style>
    .avatar-uploader .el-upload {
        border: 1px dashed #d9d9d9;
        border-radius: 6px;
        cursor: pointer;
        position: relative;
        height: 100px;
        width: 100px;
        overflow: hidden;
    }
 
    .avatar-uploader .el-upload:hover {
        border-color: #409EFF;
    }
    .avatar-uploader-icon {
        font-size: 28px;
        color: #8c939d;
        width: 100px;
        height: 100px;
        line-height: 100px;
        margin-top: 32px;
        text-align: center;
    }
    .avatar {
        width: 100px;
        height: 100px;
        display: block;
    }
 
    .col-sm-12 {
        margin-top: 20px;
    }
 
    .col-sm-12 select {
        height: 33px;
    }
    #app1{
        margin-left: 255px;
    }
 
 
</style>
<script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.15&key=77b37f0753049c4e712ea79a24e0719c"></script>
<div class="ibox float-e-margins">
    <input hidden id="userType" value="${userType}">
    <input hidden id="type" value="${type}">
    <input hidden id="id" value="${id}">
    <input hidden id="operatorId" value="${operatorId}">
    @if(userType==3){
    <input hidden id="storeId" value="${storeId}">
    @}
    <div class="ibox-content">
        <div class="form-horizontal" id="carInfoForm">
            @if(userType==1){
            <div class="form-group">
                <label class="col-sm-3 control-label">*闸机类型:</label>
                <div class="col-sm-9">
                    <input type="radio" name="type" value="0" checked onclick="updateType(0)"> 平台闸机
                    <input type="radio" name="type" value="1" onclick="updateType(1)" id="radio1"   > 运营商闸机
                </div>
            </div>
            @}
            <div class="form-group" >
                <label class="col-sm-3 control-label">*闸机名称:</label>
                <div class="col-sm-9" style="display: flex;">
                    <input style="width: 300px" class="form-control" id="name" value="${data.name}" name="name" placeholder="请输入闸机名称" >
                </div>
            </div>
            @if(userType==1){
                <div id = "yys" class="form-group" >
                    <label class="col-sm-3 control-label">*所属运营商:</label>
                    <div class="col-sm-9">
                        <select class="form-control" disabled id="account" name="account" onchange="TCarInfoDlg.getStore(this)" >
                            @if(data.operatorId==0){
                            <option value="">选择运营商</option>
                            @}
                            @for(obj in yysList){
                            <option value="${obj.id}" ${obj.id == data.operatorId ? 'selected=selected' : ''}>${obj.name}</option>
                            @}
 
                        </select>
                    </div>
                </div>
            @}
            @if(userType!=3){
            <div class="form-group">
                    <label class="col-sm-3 control-label">*所属门店:</label>
                    <div class="col-sm-9">
                        <select class="form-control" id="store" name="account" onchange="TCarInfoDlg.getSite(this)" >
                            @for(obj in storeList){
                            <option value="${obj.id}" ${obj.id == data.storeId ? 'selected=selected' : ''}>${obj.name}</option>
                            @}
                        </select>
                    </div>
            </div>
            @}
            <div class="form-group">
                <label class="col-sm-3 control-label">*所属场地:</label>
                <div class="col-sm-9">
                    <select class="form-control" id="site" name="account"  >
                        @for(obj in siteList){
                        <option value="${obj.id}" ${obj.id == data.siteId ? 'selected=selected' : ''}>${obj.name}</option>
                        @}
                    </select>
                </div>
            </div>
            <div class="form-group" >
                <label class="col-sm-3 control-label">*硬件编号:</label>
                <div class="col-sm-9" style="display: flex;">
                    <input style="width: 300px" class="form-control" value="${data.device}" id="device" name="device" placeholder="请输入硬件编号" >
                </div>
            </div>
            <div class="row btn-group-m-t">
                <div class="col-sm-10 col-sm-offset-5" >
                    <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TCarInfoDlg.editSubmit()"/>
                    <#button btnCss="danger" name="关闭" id="cancel" icon="fa-eraser" clickFun="TCarInfoDlg.close()"/>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="${ctxPath}/modular/system/gate/gate_info.js"></script>
<script src="${ctxPath}/js/vue/vue.js"></script>
<script src="${ctxPath}/js/elementui/index.js"></script>
<link rel="stylesheet" href="${ctxPath}/js/elementui/index.css">
 
<script>
    laydate.render({
        elem: '#time',
        range:true
    });
 
    function updateType(e) {
        var selectElement = document.getElementById('account');
        var storeSelect = document.getElementById("store");
        var siteSelect = document.getElementById("site");
 
        // $("#store").empty();
        // $("#site").empty();
        if(e =='0'){
            selectElement.innerHTML = '<option value="">请选择运营商</option>';
            storeSelect.innerHTML = '<option value="">请选择门店</option>';
            siteSelect.innerHTML = '<option value="">请选择场地</option>';
            selectElement.disabled = true;
            var ajax = new $ax(Feng.ctxPath + "/gate/getStore", function(data){
                if(data!=null){
                    var content="<option value=''>选择门店</option>";
                    $.each(data, function(k,v) {
                        content += "<option value='"+v.id+"'>"+v.name+"</option>";
                    });
                    $("#store").empty().append(content);
                }
            });
            ajax.set("operatorId",e);
            ajax.start();
        }else {
            var ajax = new $ax(Feng.ctxPath + "/gate/getOperatorList", function(data){
                if(data!=null){
                    var content="<option value=''>选择运营商</option>";
                    $.each(data, function(k,v) {
                        content += "<option value='"+v.id+"'>"+v.name+"</option>";
                    });
                    $("#account").empty().append(content);
                }
            });
            ajax.start();
            selectElement.disabled = false;
 
                    var content="<option value=''>请选择运营商</option>";
 
                    $("#store").empty().append(content);
        }
    }
 
    window.onload = function(){
        // 如果是1平台 2运营商
        var temp = $("#type").val();
        // 如果不是平台闸机
        if (temp!=1){
            var selectElement = document.getElementById('account');
            selectElement.disabled = false;
        }
        var OBJradio1=document.getElementsByName("type")
        if(temp==1){//判断是否与radio的值相同
            OBJradio1[0].checked=true//修改选中状态
        }else{
            OBJradio1[1].checked=true//修改选中状态
        }
 
    }
</script>
@}