liujie
2023-09-16 1aa309700fb7e12d85f98bed22a45bdac448ec1c
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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
@layout("/common/_container.html"){
<script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.15&key=77b37f0753049c4e712ea79a24e0719c"></script>
<div class="ibox float-e-margins">
    <div class="ibox-content">
        <div class="form-horizontal" id="carInfoForm">
 
            @if(objectType == 1){
            <div class="form-group" id="provinceCode">
                <label class="col-sm-3 control-label">*所在省:</label>
                <div class="col-sm-9">
                    <select style="width: 300px" class="form-control" id="pCode" name="pCode" onchange="TSiteInfo.oneChange(this)">
<!--                        <option style="width: 300px" value="${list.province}">${list.province}</option>-->
                        @for(obj in province){
                        <option value="${obj}" ${obj == list.province ? 'selected=selected' : ''}>${obj}</option>
<!--                        <option style="width: 300px" value="${obj}">${obj}</option>-->
                        @}
                    </select>
                </div>
            </div>
            <div class="form-group" id="cityCode">
                <label class="col-sm-3 control-label">*所在市:</label>
                <div class="col-sm-9">
                    <select style="width: 300px" class="form-control" id="cCode" name="cCode" onchange="TSiteInfo.oneChangeNext(this)">
                        @for(obj in city1){
                        <option value="${obj.city}" ${obj.city == list.city ? 'selected=selected' : ''}>${obj.city}</option>
<!--                        <option style="width: 300px" value="${obj.city}">${obj.city}</option>-->
                        @}
                    </select>
                </div>
            </div>
            <div class="form-group" >
                <label class="col-sm-3 control-label">*所属账号:</label>
                <div class="col-sm-9">
                    <select style="width: 300px" class="form-control" id="account" name="account">
                        @for(obj in accounts){
                        <option style="width: 300px" value="${obj.id}">${obj.name}</option>
                        @}
                    </select>
                </div>
            </div>
            @}
            <div class="form-group" >
                <label class="col-sm-3 control-label">*所属门店:</label>
                <div class="col-sm-9">
                    <select style="width: 300px" class="form-control" id="store" name="store" onchange="TSiteInfo.getTime(this)" >
                            @for(obj in stores){
                        <option value="${obj.id}" ${obj.id == list.storeId ? 'selected=selected' : ''}>${obj.name}</option>
<!--                        <option style="width: 300px" value="${obj.id}">${obj.name}</option>-->
                            @}
                    </select>
                </div>
            </div>
            <div class="form-group" id="siteType">
                <label class="col-sm-3 control-label">*场地类型:</label>
                <div class="col-sm-9">
                    <select style="width: 300px" class="form-control" id="siteTypeId" name = "typeId">
                        @for(obj in siteType){
                        <option value="${obj.id}">${obj.name}</option>
                        @}
                    </select>
                </div>
            </div>
 
            <div class="form-group"  >
                <label class="col-sm-3 control-label">*场地名称:</label>
                <div class="col-sm-9" >
                    <input style="width: 300px" class="form-control" id="name" name="name" type="text" value="${list.name}">
                </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: 150px;" value="${list.appointmentStartTime}" id="start-time" class="form-control" type="time" >
                    <span style="margin-top: 7px">&nbsp;&nbsp;至&nbsp;&nbsp;</span>
                    <input style="width: 150px;" value="${list.appointmentEndTime}" id="end-time" class="form-control" type="time">
                </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="cashPrice" name="playPaiCoin" type="text" value="${list.cashPrice}">
                    <span style="margin-left: 5px;margin-top: 5px">元/半小时</span>
                </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="playPaiCoin" name="playPaiCoin" type="text" value="${list.playPaiCoin}">
                    <span style="margin-left: 5px;margin-top: 5px">币/半小时</span>
                </div>
            </div>
 
            <div class="form-group">
                <label class="col-sm-3 control-label">*场地责任险有效期:</label>
                <div class="col-sm-9">
                    <input value="${time}" style="width: 300px" class="form-control" id="insuranceEndTime" name="insuranceEndTime" type="date">
                </div>
            </div>
            <#avatar id="img" name="" value ="${list.insuranceImg}" avatarImg="${list.insuranceImg}"/>
 
            <div class="form-group">
                <label class="col-sm-3 control-label head-scu-label">*消防及应急管理方案:</label>
                <div class="col-sm-2" style="padding-top: 30px;">
                    <input type="file" id="upFile" name="upFile" style="display: none">
                    <input class="form-control" id="courseVideo" value="${list.managementPlan}" readonly/>
                </div>
                <div class="col-sm-2" style="padding-top: 30px;">
                    <button class="btn btn-outline btn-success" type="file" onclick="UploadFileFn()"><i class="fa fa-upload"></i>上传文件</button>
                </div>
            </div>
            @if(objectType ==1){
            <div class="row" id="app1">
                <div class="form-group">
                    <label class="col-sm-3 control-label head-scu-label">*实景图片(请上传不超过五张图片): </label>
                    <div class="col-sm-2" style="width: 100%;margin-left: 11%;margin-top: 1%">
                        <el-upload
                                :limit="5"
                                class="avatar-uploader"
                                action="/tCouponManage/uploadPic"
                                list-type="picture-card"
                                accept="."
                                :on-success="handleAvatarSuccess"
                                :on-remove="handleRemove">
                            <i class="el-icon-plus"></i>
                        </el-upload>
                        <el-dialog :visible.sync="dialogVisible">
                            <img width="100%" :src="imageUrl1" alt="">
                        </el-dialog>
                    </div>
                </div>
            </div>
            @}
        </div>
        @if(objectType==1){
        <#input style="width: 300px" id="name" name="*添加闸机:" placeholder="请输入闸机ID" type="text"/>
        @}
        <div class="row btn-group-m-t">
            <div class="col-sm-10 col-sm-offset-5" >
                @if(type==1){
                <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TSiteInfo.addSubmit()"/>
                @}
                <#button btnCss="danger" name="关闭" id="cancel" icon="fa-eraser" clickFun="TSiteInfo.close()"/>
            </div>
        </div>
        <input hidden id="role" value="${role}">
        <input type="hidden" id="id" value="${list.id}">
    </div>
<!--    <img  id="img" value="${list.insuranceImg}"/>-->
<!--    <img  id = "plan" value="${list.managementPlan}"/>-->
</div>
 
<script src="${ctxPath}/modular/system/tSite/tSite_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>
    var vue2 = new Vue({
        el: '#app1',
        props: {
            // 数量限制
            limit: {
                type: Number,
                default: 2
            },
        },
        data: {
            autoUpload: true,//自动上传
            imageUrl1: '',//模型数据,用于上传图片完成后图片预览
            dialogVisible: false
        },
        methods: {
            handleAvatarSuccess(res, file) {
                TCarInfoDlg.goodsPicArray.push(file);
            },
            beforeAvatarUpload(file) {
                const isLt2M = file.size / 1024 / 1024 < 10;
                if (!isLt2M) {
                    this.$message.error('上传图片大小不能超过 10MB!');
                }
                return isLt2M;
            },
            handleRemove(file, fileList) {
                TCarInfoDlg.goodsPicArray = TCarInfoDlg.goodsPicArray.filter(item => {
                    return item.uid != file.uid;
                });
            },
        },
        created() {
        },
    });
    var selectElement = document.getElementById('store');
    var startTime = document.getElementById('start-time');
    var endTime = document.getElementById('end-time');
 
    selectElement.addEventListener('change',function () {
        if (selectElement.value !== ''){
            startTime.disabled = false;
            endTime.disabled = false;
        }else{
            startTime.disabled = true;
            endTime.disabled = true;
        }
    });
</script>
@}