无关风月
3 天以前 38baf97044eeb85ab532ce910ec5510d34d9af94
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
@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: 34px;
        text-align: center;
    }
    .avatar {
        width: 100px;
        height: 100px;
        display: block;
    }
 
    .col-sm-12 {
        margin-top: 20px;
    }
 
    .col-sm-12 select {
        height: 33px;
    }
</style>
<div class="ibox float-e-margins">
    <div class="ibox-content">
        <div class="form-horizontal" id="carInfoForm">
            <div class="form-group" >
                <input type="hidden" id="vipId" value="${vip.id}">
 
                <label class="col-sm-3 control-label">*会员名称:</label>
                <div class="col-sm-9" style="display: flex;">
                    <input style="width: 300px" class="form-control"  id="vipName" value="${vip.vipName}"  placeholder="请输入会员名称" type="text">
                </div>
            </div>
            <div class="form-group" style="display: flex" >
                <label class="col-sm-3 control-label">*会员时长:</label>
                <input class="form-control" style="width: 100px" id="time" value="${vip.time}" name="time" type="number">
                <div class="col-sm-9">
                    <select style="width: 200px" class="form-control" id="timeType" name = "timeType" >
                        <option value="1" ${vip.timeType == 1 ? 'selected=selected' : ''}>天</option>
                        <option value="2" ${vip.timeType == 2 ? 'selected=selected' : ''}>月</option>
                        <option value="3" ${vip.timeType == 3 ? 'selected=selected' : ''}>年</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" value="${vip.price}"  id="price" name="price" type="number">
                </div>
            </div>
            <div class="row" id="storeSelect" >
                <div class="form-group">
                    <div class="form-group">
                        <div class="col-sm-12">
                            <label class="col-sm-3 control-label">*赠送优惠券: </label>
                            <button onclick="couponList()"
                                    style="height: 22px;width: 82px;background-color: #4a8ff1;color: white;z-index: 15;position:relative;border: none;margin-top: 1%">
                                选择优惠券
                            </button>
                        </div>
                        <div class="col-sm-12" style="margin-left: -57px;margin-top: 20px">
                            <table class="table table-bordered" style="width: 70%;margin-left: 228px;" id="couponTable">
                                <thead>
                                <tr>
                                    <td>优惠券名称</td>
                                    <td>适用范围</td>
                                    <td>优惠券类型</td>
                                    <td>有效期</td>
                                    <td>用户人群</td>
                                    <td>数量</td>
                                    <td>操作</td>
                                </tr>
                                </thead>
                                <tbody id="coun">
                                @for(obj in couponList){
                                <tr class="timeClass">
                                    <td><input type="hidden" id="id" name="id" value="${obj.id}"><input type="hidden" id="name" name="name" value="${obj.name}">${obj.name}
                                    <td><input type="hidden" id="useScope" name="useScope" value="${obj.useScope}">${obj.useScopeValue}
                                    <td><input type="hidden" id="type" name="type" value="${obj.type}">${obj.typeValue}
                                    <td><input type="hidden" id="timeValue" name="timeValue" value="${obj.timeValue}">${obj.timeValue}
                                    <td><input type="hidden" id="userPopulation" name="userPopulation" value="${obj.userPopulation}">${obj.userPopulationValue}
                                    <td><input type="number" id="count" name="count" value="${obj.count}">
                                    </td><td><button onclick="deleteSub(this)">移除</button></td>
                                </tr>
                                @}
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
 
            <div class="row" id="ticketSelect" >
                <div class="form-group">
                    <div class="form-group">
                        <div class="col-sm-12">
                            <label class="col-sm-3 control-label">*赠送门票: </label>
                            <button onclick="ticketList()"
                                    style="height: 22px;width: 82px;background-color: #4a8ff1;color: white;z-index: 15;position:relative;border: none;margin-top: 1%">
                                添加门票
                            </button>
                        </div>
                        <div class="col-sm-12" style="margin-left: -57px;margin-top: 20px">
                            <table class="table table-bordered" style="width: 70%;margin-left: 228px;" id="ticketTable">
                                <thead>
                                <tr>
                                    <td>门票名称</td>
                                    <td>领取后X天有效</td>
                                    <td>可用次数</td>
                                    <td>操作</td>
                                </tr>
                                </thead>
                                <tbody id="ticket">
                                @for(obj in ticketList){
                                <tr class="timeClass1">
                                    <td><input type="text" id="name" name="name" value="${obj.name}">
                                    <td><input type="number" id="time" name="time" value="${obj.time}">
                                    <td><input type="number" id="count" name="count" value="${obj.count}">
                                    </td><td><button onclick="deleteSub(this)">移除</button></td></tr>
                                </tr>
                                @}
                                </tbody>
                            </table>
                        </div>
                    </div>
                </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="VipInfo.editSubmit()"/>
                    <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="VipInfo.close()"/>
                </div>
            </div>
        </div>
    </div>
</div>
</div>
</div>
<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 src="${ctxPath}/modular/system/vip/vip_info.js"></script>
<script>
 
    function couponList(){
        var index = layer.open({
            type: 2,
            title: '优惠券列表',
            area: ['80%', '80%'], //宽高
            fix: false, //不固定
            maxmin: true,
            content: Feng.ctxPath + '/vip/couponList'
        });
        this.layerIndex = index;
    }
 
    // 存储门票数据的数组
    var ticketData = [];
 
    function ticketList(){
        var str="";
        str += '<tr class="timeClass1">' +
            '<td><input type="text" id="name" name="name" value="">' +
            '<td><input type="number" id="time" name="time" value="">' +
            '<td><input type="number" id="count" name="count" value=""' +
            '</td><td><button onclick="deleteSub(this)">移除</button></td></tr>';
 
        $("#ticket").append(str);
    }
    function deleteSub(e) {
        $(e).parent().parent().remove();
    }
</script>
@}