Pu Zhibing
昨天 2fde2e99c38e8c46f7f7988fce076cc7d16445e4
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
@layout("/common/_container.html"){
<head>
    <meta charset="UTF-8">
    <title>处理异常订单</title>
    <style>
        body {
            background: #888;
            margin: 0;
            padding: 0;
        }
 
        .container {
            background: #fff;
            margin: 20px auto;
            padding: 20px 30px;
            border-radius: 10px;
            max-width: 98vw;
            min-width: 1200px;
        }
 
        .title {
            font-size: 20px;
            font-weight: bold;
            margin-bottom: 20px;
        }
 
        .order-table {
            width: 100%;
            border-collapse: collapse;
            margin-bottom: 30px;
        }
 
        .order-table th,
        .order-table td {
            border: 1px solid #e0e0e0;
            padding: 8px 6px;
            text-align: center;
            font-size: 13px;
        }
 
        .order-table th {
            background: #f8f8f8;
            font-weight: 600;
        }
 
        .section-title {
            font-size: 16px;
            font-weight: bold;
            margin: 30px 0 10px 0;
        }
 
        .desc-row {
            margin-bottom: 10px;
        }
 
        .desc-label {
            font-weight: bold;
            margin-right: 10px;
        }
 
        .img-list {
            display: flex;
            gap: 20px;
            margin: 10px 0 20px 0;
        }
 
        .img-list img {
            width: 120px;
            height: 80px;
            object-fit: cover;
            border-radius: 6px;
            border: 1px solid #ccc;
        }
 
        .order-link {
            color: #1976d2;
            text-decoration: underline;
            cursor: pointer;
        }
 
        input[type="radio"] {
            accent-color: #1976d2;
            width: 18px;
            height: 18px;
            vertical-align: middle;
            margin-right: 4px;
        }
 
        .radio-group label {
            margin-right: 18px;
            font-size: 15px;
            cursor: pointer;
        }
 
        #duty-selector {
            display: flex;
            margin-bottom: 18px;
            border: 1px solid #ccc;
            border-radius: 4px;
            overflow: hidden;
            width: fit-content;
        }
 
 
        .duty-btn {
            flex: 1 1 0;
            padding: 12px 32px;
            border: none;
            background: #fff;
            color: #222;
            font-size: 16px;
            cursor: pointer;
            outline: none;
            border-right: 1px solid #ccc;
            transition: background 0.2s, color 0.2s;
            height: 62px;
            line-height: 24px;
        }
 
        .duty-btn:last-child {
            border-right: none;
        }
 
        .duty-btn.active {
            background: #1976d2;
            color: #fff;
            font-weight: bold;
        }
 
        .action-btn {
            min-width: 140px;
            height: 48px;
            background: #1976d2;
            color: #fff;
            border: none;
            border-radius: 5px;
            font-size: 16px;
            font-weight: bold;
            margin-right: 18px;
            cursor: pointer;
            transition: background 0.2s, box-shadow 0.2s;
            box-shadow: 0 2px 6px rgba(25, 118, 210, 0.08);
        }
 
        .action-btn:last-child {
            margin-right: 0;
        }
 
        .action-btn:hover {
            background: #1565c0;
        }
 
        #action-btns {
            margin-top: 32px;
            display: flex;
            align-items: center;
        }
    </style>
</head>
<div class="ibox float-e-margins">
    <div class="ibox-content">
        <div class="form-horizontal">
            <input type="hidden" id="id" value="${item.id!}"/>
 
            <div id="duty-selector">
                <button type="button" class="duty-btn active" data-type="platformAll">活动基础信息</button>
                <button type="button" class="duty-btn" data-type="driverAll">推广情况</button>
            </div>
            <div id="s1">
                <div class="row">
                    <div class="col-sm-4">
                        <#input id="activityTitle" name="推广活动标题" value="${item.activityTitle}"/>
                    </div>
                </div>
 
                <div class="row" style="margin-left: -24px">
                    <label class="col-sm-1 control-label">关联业务:</label>
                    <div class="col-sm-3">
                        <label class="checkbox-inline">
                            <input type="checkbox" name="bizType" value="1"> 专车
                        </label>
                        <label class="checkbox-inline">
                            <input type="checkbox" name="bizType" value="2"> 出租车
                        </label>
                        <label class="checkbox-inline">
                            <input type="checkbox" name="bizType" value="3"> 城际
                        </label>
                    </div>
                </div>
 
                <div class="row" style="margin-top: 10px">
                    <label class="col-sm-1 control-label">活动区域:</label>
                    <div class="col-sm-2">
                        <select class="form-control" id="province" onchange="provinceChange(this)">
                            <option value="">选择省</option>
                            @for(obj in provinceList){
                            <option value="${obj.code}" ${obj.code== item.provinceCode ?
                            'selected=selected' : ''}>${obj.name}</option>
                            @}
                        </select>
                    </div>
                    <div class="col-sm-2">
                        <select class="form-control" id="city" onchange="cityChage(this)">
                            <option value="">选择市</option>
                            @for(obj in cityList){
                            <option value="${obj.code}" ${obj.code== item.cityCode ?
                            'selected=selected' : ''}>${obj.name}</option>
                            @}
                        </select>
                    </div>
                    <div class="col-sm-2">
                        <select class="form-control" id="area">
                            <option value="">选择区</option>
                            @for(obj in areaList){
                            <option value="${obj.code}" ${obj.code== item.districtCode ?
                            'selected=selected' : ''}>${obj.name}</option>
                            @}
                        </select>
                    </div>
                </div>
 
                <div class="row" style="margin-top: 10px">
                    <div class="col-sm-3">
                        <#input id="time" name="活动时间" isTime="false"/>
                    </div>
                </div>
 
                <div class="row">
                    <div class="col-sm-3">
                        <#input id="commissionRatio" name="抽佣比例" />
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-3">
                        <#input id="bindingDays" name="绑定有效期" />
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-3">
                        <label style="font-weight:700">推广活动说明:</label>
 
                        <div class="tab-content">
                            <div id="tab-1" class="tab-pane active">
                                <div class="panel-body">
                                    <textarea id="editor_1" type="text/plain"
                                              style="width:1200px;height:400px;"></textarea>
                                </div>
                            </div>
 
                        </div>
                    </div>
                </div>
            </div>
        </div>
 
 
        <div id="s2">
            <div class="ibox-content">
                <div class="row row-lg">
                    <div class="col-sm-12">
                        <div class="row">
                            <div class="col-sm-3">
                                <#NameCon id="driverName" name="司机姓名" />
                            </div>
 
                            <div class="col-sm-3">
                                <#button name="搜索" icon="fa-search" clickFun="TDriverPromotionActivity.search()"/>
                                <#button name="重置" icon="fa-trash" clickFun="TDriverPromotionActivity.resetSearch()"
                                space="true"/>
                            </div>
                        </div>
                        <div class="hidden-xs" id="TOrderPrivateCarTableToolbar" role="group">
                            <#button name="导出Excel" icon="" clickFun="TDriverPromotionActivity.exportExcel()" space="true"/>
                        </div>
                        <#table id="TDriverPromotionActivityTable"/>
                    </div>
                </div>
            </div>
        </div>
    </div>
 
</div>
</div>
<script src="${ctxPath}/static/modular/system/tDriverPromotionActivity/tDriverPromotionActivity1.js"></script>
<script src="${ctxPath}/static/modular/system/tDriverPromotionActivity/tDriverPromotionActivity_info.js"></script>
<script>
 
 
    // 在现有的 script 标签内添加以下代码
    $(document).ready(function () {
        // 处理 duty-selector 按钮点击事件
        $('#duty-selector .duty-btn').on('click', function () {
            // 移除所有按钮的 active 类
            $('#duty-selector .duty-btn').removeClass('active');
            // 为当前点击的按钮添加 active 类
            $(this).addClass('active');
 
            // 可以根据 data-type 值执行不同的操作
            var selectedType = $(this).data('type');
            if (selectedType === 'platformAll') {
                // 处理活动基础信息选中逻辑
                console.log('活动基础信息被选中');
                $("#s1").show();
                $("#s2").hide();
            } else if (selectedType === 'driverAll') {
                // 处理推广情况选中逻辑
                console.log('推广情况被选中');
                $("#s1").hide();
                $("#s2").show();
            }
        });
    });
    $(function () {
        $("#s1").show();
        $("#s2").hide();
 
        // 初始化编辑器
        editor_1 = UE.getEditor('editor_1');
 
        // 初始化活动时间
        laydate.render({
            elem: '#time',
            range: true
        });
 
        // 回显关联业务
        var bizTypeStr = "${item.bizType!}"; // 获取业务类型字符串
        if (bizTypeStr) {
            var bizTypes = bizTypeStr.split(',');
            $('input[name="bizType"]').each(function () {
                if (bizTypes.indexOf($(this).val()) !== -1) {
                    $(this).prop('checked', true);
                }
            });
        }
 
        // 回显活动时间
        $("#time").val("${time!}");
 
        // 回显抽佣比例和绑定有效期
        $("#commissionRatio").val("${item.commissionRatio!}");
        $("#bindingDays").val("${item.bindingDays!}");
 
        // 回显活动说明
        setTimeout(function () {
            editor_1.ready(function () {
                editor_1.setContent('${item.activityDesc!}');
            });
        }, 100);
    });
 
 
    function provinceChange(e) {
        var provinceCode = $(e).val();
        var ajax = new $ax(Feng.ctxPath + "/tCompany/change", function (data) {
            if (data != null) {
                var content = '<option value="">选择市</option>';
                $.each(data, function (k, v) {
                    content += "<option value='" + v.code + "'>" + v.name + "</option>";
                });
                $("#city").empty().append(content);
                $("#area").empty().append('<option value="">选择区</option>');
            }
        });
        ajax.set("code", provinceCode);
        ajax.start();
    }
 
    function cityChage(e) {
        var cityCode = $(e).val();
        var ajax = new $ax(Feng.ctxPath + "/tCompany/change", function (data) {
            if (data != null) {
                var content = '<option value="">选择区</option>';
                $.each(data, function (k, v) {
                    content += "<option value='" + v.code + "'>" + v.name + "</option>";
                });
                $("#area").empty().append(content);
            }
        });
        ajax.set("code", cityCode);
        ajax.start();
    }
</script>
@}