mitao
12 小时以前 a32219b5f00c173e04bf20ff0b1cbb05fb15c28f
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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
 @layout("/common/_container.html"){
<script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.15&key=77b37f0753049c4e712ea79a24e0719c"></script>
<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;
    }
    
    /* 价格配置相关样式 */
    .step-container {
        display: none;
    }
    
    .step-container.active {
        display: block;
    }
    
    .price-config-section {
        background: #fff;
        padding: 20px;
        margin-bottom: 20px;
        border-radius: 4px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .section-title {
        font-size: 16px;
        font-weight: bold;
        margin-bottom: 15px;
        padding-bottom: 10px;
        border-bottom: 2px solid #409EFF;
    }
    
    .field-item {
        display: flex;
        align-items: center;
        margin-bottom: 10px;
        padding: 8px;
        background: #f5f7fa;
        border-radius: 4px;
    }
    
    .field-item input[type="text"] {
        flex: 1;
        margin-right: 10px;
        padding: 5px 10px;
        border: 1px solid #ddd;
        border-radius: 3px;
    }
    
    .field-item .btn-remove {
        color: #f56c6c;
        cursor: pointer;
        font-size: 18px;
    }
    
    .btn-add {
        color: #409EFF;
        cursor: pointer;
        margin-left: 5px;
    }
    
    .audience-checkboxes {
        display: flex;
        gap: 20px;
    }
    
    .audience-checkboxes label {
        display: flex;
        align-items: center;
        cursor: pointer;
    }
    
    .audience-checkboxes input[type="checkbox"] {
        margin-right: 5px;
    }
    
    .time-slots-container {
        margin-top: 15px;
    }
    
    .time-slot-item {
        display: flex;
        align-items: center;
        margin-bottom: 10px;
        padding: 8px;
        background: #f5f7fa;
        border-radius: 4px;
    }
    
    .time-slot-item input[type="time"] {
        margin: 0 10px;
        padding: 5px;
        border: 1px solid #ddd;
        border-radius: 3px;
    }
    
    .price-table-container {
        margin-top: 20px;
        overflow-x: auto;
    }
    
    .price-table {
        width: 100%;
        border-collapse: collapse;
        margin-top: 15px;
    }
    
    .price-table th,
    .price-table td {
        border: 1px solid #ddd;
        padding: 10px;
        text-align: center;
    }
    
    .price-table th {
        background-color: #409EFF;
        color: white;
        font-weight: bold;
    }
    
    .price-table tbody tr:nth-child(even) {
        background-color: #f9f9f9;
    }
    
    .price-input {
        width: 80px;
        padding: 4px;
        border: 1px solid #ddd;
        border-radius: 3px;
        text-align: center;
    }
    
    .price-cell {
        display: flex;
        flex-direction: column;
        gap: 5px;
        align-items: center;
    }
    
    .price-label {
        font-size: 12px;
        color: #666;
        margin-bottom: 3px;
    }
    
    .info-alert {
        background-color: #fff3cd;
        border: 1px solid #ffc107;
        border-radius: 4px;
        padding: 12px;
        margin-bottom: 20px;
        color: #856404;
    }
    
    .tab-container {
        margin-bottom: 20px;
    }
    
    .tab-buttons {
        display: flex;
        gap: 10px;
        margin-bottom: 15px;
        border-bottom: 2px solid #e4e7ed;
    }
    
    .tab-btn {
        padding: 10px 20px;
        border: none;
        background: none;
        cursor: pointer;
        position: relative;
        color: #606266;
    }
    
    .tab-btn.active {
        color: #409EFF;
    }
    
    .tab-btn.active::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        right: 0;
        height: 2px;
        background-color: #409EFF;
    }
    
    .tab-content {
        display: none;
    }
    
    .tab-content.active {
        display: block;
    }
 
 
</style>
<div class="ibox float-e-margins">
    <div class="ibox-content">
        <!-- 步骤1:基本信息 -->
        <div class="step-container active" id="step1_basic_info">
        <div class="form-horizontal" id="carInfoForm">
 
            <input id="type_" value="${list.ishalf}" hidden>
            <input id="reservation" value="${list.reservation}" hidden>
            <input id="objectType" value="${objectType}" hidden>
            <input type="hidden" id="siteId" value="${list.id}">
            <input type="hidden" id="targetAudience" value="${targetAudience}">
            <input type="hidden" id="walkinCapacity" value="${walkinCapacity}">
 
            @if(objectType == 1){
            <div class="form-group" >
                <label class="col-sm-3 control-label">*所属运营商:</label>
                <div class="col-sm-8">
                    <select style="width: 300px" class="form-control" id="yys" name="yys" onchange="TSiteInfo.oneChangeYys(this)">
                        <option style="width: 300px" value="">选择运营商</option>
                        @for(obj in yysList){
                          <option value="${obj.id}" ${obj.id == list.operatorId ? 'selected=selected' : ''}>${obj.name}</option>
                        @}
                    </select>
                    <input type="checkbox" value="0" name="pt" id="pt" onchange="TSiteInfo.oneChangeYys(this)">平台</input>
                </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" >
                <label class="col-sm-3 control-label">*场地类型:</label>
                <div class="col-sm-9">
                    <select style="width: 300px" class="form-control" id="siteTypeOne" name = "typeId" onchange="updateTime1()">
                        @for(obj in typeNames){
                        <option value="${obj}" ${obj == list.typeName ? 'selected=selected' : ''}>${obj}</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.id == list.siteTypeId ? '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" >
                    <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">
                    <input type="radio" name="reservation" value="1"  onclick="updateHtml(1)"> 是
                    <input type="radio" name="reservation" value="0"   onclick="updateHtml(0)"> 否
                </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>
            <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="."
                                :file-list="imageUrl2"
                                :on-success="handleAvatarSuccess"
                                :on-remove="handleRemove">
                            <i class="el-icon-plus"></i>
                        </el-upload>
                        <el-dialog :visible.sync="dialogVisible">
                            <img width="100%" :src="imageUrl2" alt="">
                        </el-dialog>
                    </div>
                </div>
            </div>
        </div>
<!--        <div class="form-group" style="margin-left: 205px;">-->
<!--            <label class="col-sm-1 control-label">*添加闸机:</label>-->
<!--            <div class="col-sm-9">-->
<!--                <input class="form-control" id="ids" name="ids" value="${list.ids}" type="text" style="width: 300px" placeholder="请输入闸机ID">-->
<!--            </div>-->
<!--        </div>-->
        @if(objectType==1){
        <div class="form-group"   style="margin-left: 13%;display: inline-flex;margin-top: 16px;" >
            <label class="col-sm-2 control-label">场地说明:</label>
            <div class="col-sm-5" style="margin-left: -35px;">
                <textarea type="text/plain" id="editor"  style="height: 300px;width: 800px;">${list.introduce}</textarea>
            </div>
        </div>
        @}
        <div class="row btn-group-m-t">
            <div class="col-sm-10 col-sm-offset-5" >
                <#button btnCss="danger" name="关闭" id="cancel" icon="fa-eraser" clickFun="TSiteInfo.close()"/>
                <#button btnCss="primary" name="下一步,设置价格" id="btn_next_price" icon="fa-arrow-right" clickFun="TSiteInfo.nextStep()"/>
            </div>
        </div>
        <input hidden id="role" value="${role}">
        <input type="hidden" id="id" value="${list.id}">
    </div>
    </div>
    <!-- 步骤1结束 -->
    
    <!-- 步骤2:价格配置 -->
    <div class="step-container" id="step2_price_config">
        <div class="info-alert">
            <strong>场地信息:</strong> <span id="display_site_name"></span>
            <span id="display_next_names"></span>
            <span id="display_half_names"></span>
        </div>
        
        <!-- 场地配置区域(顶部) -->
        <div class="price-config-section">
            <div class="section-title">时段价格设置</div>
            
            <div class="form-group" id="siteMore_step2">
                <label class="control-label">多场地配置:<i class="fa fa-plus btn-add" onclick="TSiteInfo.addFieldBox()"></i></label>
                <div id="field_container" style="margin-top: 10px;">
                    @for(n in nextNames!){
                    <div class="field-item">
                        <label>*单个场地名</label>
                        <input type="text" name="name1_step2" class="form-control" value="${n}" style="flex:1;margin-right:10px;"/>
                        <i class="fa fa-remove btn-remove" onclick="TSiteInfo.removeFieldBox(this)"></i>
                    </div>
                    @}
                </div>
            </div>
            
            <div class="form-group">
                <label class="control-label">*是否可预定半场:</label>
                <div>
                    <label style="margin-right: 20px;">
                        <input type="radio" name="ishalf_step2" value="2" checked onclick="TSiteInfo.updateHalfField(2)"> 否
                    </label>
                    <label>
                        <input type="radio" name="ishalf_step2" value="1" onclick="TSiteInfo.updateHalfField(1)"> 是
                    </label>
                </div>
            </div>
            
            <div class="form-group" id="halfCode_step2" style="display:none;">
                <label class="control-label">*半场名称:<i class="fa fa-plus btn-add" onclick="TSiteInfo.addHalfFieldBox()"></i></label>
                <div id="half_field_container" style="margin-top: 10px;">
                    @for(h in halfNames){
                    <div class="field-item">
                        <label>*半场名称</label>
                        <input type="text" name="name2_step2" class="form-control" value="${h}" style="flex:1;margin-right:10px;"/>
                        <i class="fa fa-remove btn-remove" onclick="TSiteInfo.removeHalfFieldBox(this)"></i>
                    </div>
                    @}
                </div>
            </div>
        </div>
        
        <!-- 价格配置区域 -->
        <div class="price-config-section">
            <div class="section-title">价格配置</div>
            
            <div class="info-alert">
                <i class="fa fa-info-circle"></i> 
                <strong>说明:</strong>
                请先选择面向人群和半场配置,然后点击"生成价格表"按钮来创建价格配置表。
            </div>
            
            <!-- 面向人群 -->
            <div class="form-group">
                <label class="control-label">*面向人群:</label>
                <div class="audience-checkboxes">
                    <label>
                        <input type="checkbox" value="1" id="audience_booking"> 订场
                    </label>
                    <label>
                        <input type="checkbox" value="2" id="audience_walkin" checked> 散客
                    </label>
                </div>
                <small class="text-muted">至少选择一项</small>
            </div>
            
            <!-- 容纳散客数 -->
            <div class="form-group" id="walkin_capacity_group" style="display:none;">
                <label class="control-label">*容纳散客数:</label>
                <input type="number" id="walkin_capacity" class="form-control" style="width: 200px;" min="1" value="20" placeholder="请输入容纳散客数">
            </div>
            
            <!-- 生成价格表按钮 -->
            <div class="form-group">
                <button type="button" class="btn btn-primary" onclick="TSiteInfo.generatePriceTables()">
                    <i class="fa fa-table"></i> 生成价格表
                </button>
                <small class="text-muted" style="margin-left: 10px;">修改面向人群或半场配置后,需要重新生成价格表</small>
            </div>
        </div>
        
        <!-- 订场价格表区域 -->
        <div class="price-config-section" id="booking_section" style="display:none;">
            <div class="section-title">
                订场价格
                <button type="button" class="btn btn-sm btn-primary" style="margin-left: 20px;" onclick="TSiteInfo.addBookingTimeSlot()">
                    <i class="fa fa-plus"></i> 添加时段
                </button>
            </div>
            
            <div class="price-table-container">
                <table class="price-table" id="booking_price_table">
                    <thead id="booking_thead">
                        <!-- 表头将根据是否可预订半场动态生成 -->
                    </thead>
                    <tbody id="booking_price_tbody">
                        <!-- 价格行将动态添加 -->
                    </tbody>
                </table>
            </div>
        </div>
        
        <!-- 散客价格表区域 -->
        <div class="price-config-section" id="walkin_section" style="display:block;">
            <div class="section-title">
                散客价格
                <button type="button" class="btn btn-sm btn-primary" style="margin-left: 20px;" onclick="TSiteInfo.addWalkinTimeSlot()">
                    <i class="fa fa-plus"></i> 添加时段
                </button>
            </div>
            
            <div class="price-table-container">
                <table class="price-table" id="walkin_price_table">
                    <thead id="walkin_thead">
                        <!-- 表头将根据是否可预订半场动态生成 -->
                    </thead>
                    <tbody id="walkin_price_tbody">
                        <!-- 价格行将动态添加 -->
                    </tbody>
                </table>
            </div>
        </div>
        
        <!-- 底部按钮组 -->
        <div class="row btn-group-m-t">
            <div class="col-sm-10 col-sm-offset-5">
                <#button btnCss="default" name="上一步" id="btn_prev" icon="fa-arrow-left" clickFun="TSiteInfo.previousStep()"/>
                <#button btnCss="success" name="保存价格配置" id="btn_save_price" icon="fa-save" clickFun="TSiteInfo.savePriceConfig()"/>
                <#button btnCss="danger" name="关闭" id="btn_close" icon="fa-eraser" clickFun="TSiteInfo.close()"/>
            </div>
        </div>
    </div>
    <!-- 步骤2结束 -->
    
<!--    <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>
 
    function updateTime1() {
        var selectedValue = document.getElementById("siteTypeOne").value;
        var priceLabel = document.getElementById("priceLabel");
        var priceLabel1 = document.getElementById("priceLabel1");
        var priceLabel3 = document.getElementById("priceLabel3");
        var priceLabel4 = document.getElementById("priceLabel4");
 
        if (selectedValue === "智慧场地") {
            console.log("=============智慧场地=")
            priceLabel.innerText = "元/15分钟";
            priceLabel1.innerText = "元/15分钟";
            priceLabel3.innerText = "元/15分钟";
            priceLabel4.innerText = "元/15分钟";
        } else {
            priceLabel.innerText = "元/半小时";
            priceLabel1.innerText = "元/半小时";
            priceLabel3.innerText = "元/半小时";
            priceLabel4.innerText = "元/半小时";
        }
 
 
 
        // $("#end-time").val('');
        // $("#start-time").val('');
    }
 
 
 
    let id = "${list.imgs}"
    let obj = []
    console.log("看看")
    console.log(id)
    var vue2 = new Vue({
        el: '#app1',
        props: {
            // 数量限制
            limit: {
                type: Number,
                default: 2
            },
        },
        data: {
            autoUpload: true,//自动上传
            imageUrl1: '',//模型数据,用于上传图片完成后图片预览
            imageUrl2: [],
            dialogVisible: false
        },
        methods: {
            handleAvatarSuccess(res, file) {
                file.url =file.response
                TSiteInfo.goodsPicArray.push(file);
            },
            changeImg(){
                var i = id.split(",")
                for (let j = 0; j <i.length; j++) {
                    let obj={
                        fileName:i[j],
                        uuid:i[j],
                        url:i[j],
                        response:i[j],
                    }
                    this.imageUrl2.push(obj)
 
                }
            },
            beforeAvatarUpload(file) {
                const isLt2M = file.size / 1024 / 1024 < 10;
                if (!isLt2M) {
                    this.$message.error('上传图片大小不能超过 10MB!');
                }
                return isLt2M;
            },
            handleRemove(file, fileList) {
                TSiteInfo.goodsPicArray = TSiteInfo.goodsPicArray.filter(item => {
                    return item.uid != file.uid;
                });
            },
        },
        created() {
            this.changeImg()
            TSiteInfo.goodsPicArray = this.imageUrl2
        },
    });
 
    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;
        }
    });
 
    function updateHtml(e) {
        console.log("进入看看")
        console.log(e)
        if(e==0){
            $("#reservation1").hide()
        }else {
            $("#reservation1").show()
        }
    }
    window.onload = function(){
        var siteTypeOne = document.getElementById('siteTypeOne');
        siteTypeOne.onchange(); // Trigger the onchange event
 
 
        console.log("${list.operatorId}")
        if("${list.operatorId}"==0){
            console.log(233232)
            $("#pt").attr('checked', true)
        }
 
 
        var OBJradio=document.getElementsByName("ishalf")
        if($("#type_").val()==1){
            $("#halfCode").show()
        }
        for(i=0;i<OBJradio.length;i++){//循环查找这个radio
            if($("#type_").val()==OBJradio[i].value){//判断是否与radio的值相同
                OBJradio[i].checked=true//修改选中状态
            }
        }
 
        var OBJradio1=document.getElementsByName("reservation")
        if($("#reservation").val()==1){
            $("#reservation1").show()
        }else{
            $("#reservation1").hide()
        }
        for(j=0;j<OBJradio1.length;j++){//循环查找这个radio
            if($("#reservation").val()==OBJradio1[j].value){//判断是否与radio的值相同
                OBJradio1[j].checked=true//修改选中状态
            }
        }
    }
    // 选择了不可预约 可预约时间段、价格、多场地配置、半场配置,都不展示。
 
    function addBox1() {
        var a="     <div class=\"col-sm-8 control-label\" id=\"far\" style=\"margin-left: 210px;\">\n" +
            "                        <label class=\"col-sm-2 control-label\">*半场名称:</label>\n" +
            "                        <div class=\"col-sm-3\">\n" +
            "                            <input type=\"text\"  name=\"name2\"  class=\"form-control newWidth\"  style=\"margin-left: 8px;width: 240px;\"/>&nbsp;\n" +
            "                        </div>  \n" +
            "                        <div class=\"col-sm-1\">\n" +
            "                            <i class=\"col-sm-1 fa fa-remove\" onclick=\"delBox(this)\" style=\"margin-top:10px\"></i>\n" +
            "                        </div>  \n" +
            "                    </div> "
 
 
        $("#halfName").append($(a))
    }
    function addBox() {
        var a="     <div class=\"col-sm-8 control-label\" id=\"far\">\n" +
            "                        <label class=\"col-sm-2 control-label\">*单个场地名</label>\n" +
            "                        <div class=\"col-sm-3\">\n" +
            "                            <input type=\"text\"  name=\"name1\"  class=\"form-control newWidth\" />&nbsp;\n" +
            "                        </div>  \n" +
            "                        <div class=\"col-sm-1\">\n" +
            "                            <i class=\"col-sm-1 fa fa-remove\" onclick=\"delBox(this)\" style=\"margin-top:10px\"></i>\n" +
            "                        </div>  \n" +
            "                    </div> "
 
 
        $("#siteMore").append($(a))
    }
 
    function delBox(o) {
        $(o).parent("div").parent("div").remove()
    }
</script>
@}