无关风月
3 天以前 4742874ad840d7e1e3ac79dc288b38e9a642319d
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
@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;
        display: inline-block;
    }
 
    .avatar-uploader .el-upload:hover {
        border-color: #409eff;
    }
 
    .avatar-uploader-icon {
        font-size: 28px;
        color: #8c939d;
        width: 100px;
        height: 100px;
        line-height: 110px;
        margin-top: 40px;
        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 id="b1">
                <#input id="name" name="*商品名称:" type="text" value="${item.name}" readonly="true" />
 
                <#input id="cover" name="*原价:" value="${item.price}" readonly="true" />
                <div class="form-group">
                    <label class="col-sm-3 control-label head-scu-label">*发放方式:</label>
                    <div class="col-sm-4">
                        @if(exchangeMethod == 1){
                        <input class="col-sm-1 control-label" name="userGroup" type="radio"
                               value="1" checked style="margin-top: 10px" disabled/>
                        <label class="col-sm-1" style="margin-left: -15px;width: 16%;margin-top: 7px">全部用户</label>
                        <input class="col-sm-1 control-label" name="userGroup" type="radio"
                               value="2"  style="margin-left: 5%;margin-top: 10px;width: 13px;height: 13px" disabled/>
                        <label class="col-sm-1" style="width: 16%;margin-top: 7px">年度会员</label>
                        <input class="col-sm-1 control-label" name="userGroup" type="radio"
                               value="3"  style="margin-left: 4%;margin-top: 10px;width: 13px;height: 13px" disabled/>
                        <label class="col-sm-1" style="width: 18%;margin-top: 5px">已有学员用户</label>
                        @}
 
                        @if(exchangeMethod == 2){
                        <input class="col-sm-1 control-label" name="userGroup" type="radio"
                               value="1"  style="margin-top: 10px" disabled/>
                        <label class="col-sm-1" style="margin-left: -15px;width: 16%;margin-top: 7px">全部用户</label>
                        <input class="col-sm-1 control-label" name="userGroup" type="radio"
                               value="2"  checked style="margin-left: 5%;margin-top: 10px;width: 13px;height: 13px" disabled/>
                        <label class="col-sm-1" style="width: 16%;margin-top: 7px">年度会员</label>
                        <input class="col-sm-1 control-label" name="userGroup" type="radio"
                               value="3"  style="margin-left: 4%;margin-top: 10px;width: 13px;height: 13px" disabled/>
                        <label class="col-sm-1" style="width: 18%;margin-top: 5px">已有学员用户</label>
                        @}
 
                        @if(exchangeMethod == 3){
                        <input class="col-sm-1 control-label" name="userGroup" type="radio"
                               value="1"  style="margin-top: 10px" disabled/>
                        <label class="col-sm-1" style="margin-left: -15px;width: 16%;margin-top: 7px">全部用户</label>
                        <input class="col-sm-1 control-label" name="userGroup" type="radio"
                               value="2"  style="margin-left: 5%;margin-top: 10px;width: 13px;height: 13px" disabled/>
                        <label class="col-sm-1" style="width: 16%;margin-top: 7px">年度会员</label>
                        <input class="col-sm-1 control-label" name="userGroup" type="radio"
                               value="3" checked  style="margin-left: 4%;margin-top: 10px;width: 13px;height: 13px" disabled/>
                        <label class="col-sm-1" style="width: 18%;margin-top: 5px">已有学员用户</label>
                        @}
 
                    </div>
                </div>
 
                <div class="form-group">
                    <label class="col-sm-3 control-label">兑换方式:</label>
                    <div class="col-sm-9">
                        <input type="radio" name="redemptionMethod" value="1" checked onclick="updateMethod(1)"> 积分
                        <input type="radio" name="redemptionMethod" value="2" onclick="updateMethod(2)"> 现金+积分
                    </div>
                </div>
 
                <div class="form-group" id="y3" hidden>
                    <label class="col-sm-3 control-label">所需现金:</label>
                    <div class="col-sm-9">
                        <input class="form-control" id="cash1" name="cash" type="text" value="${item.cash}">
 
                    </div>
                </div>
                <div class="form-group" id="y4">
                    <label class="col-sm-3 control-label">所需积分:</label>
                    <div class="col-sm-9">
                        <input class="form-control" id="integral1" name="integral" type="text" value="${item.integral}">
 
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label head-scu-label">*商品封面:</label>
                    <div class="col-sm-4">
                        <img height="100px" width="100px" src="${item.cover}">
                    </div>
                </div>
 
                <div class="form-group">
                    <label class="col-sm-3 control-label head-scu-label">*商品图片:</label>
                    <div class="col-sm-4">
                        @if(pictures != null){
                        @for(im in pictures){
                            <img  height="100px" width="100px" src="${im}">
                        @}
                        @}
                    </div>
                </div>
 
                <#input id="quantityIssued" name="*用户人群:" type="text" value="${item.userPopulation}" readonly="true" />
                <#input id="quantityIssued" name="*发放数量:" type="text" value="${item.quantityIssued}" readonly="true" />
                <#input id="quantityIssued" name="*限领数量:" type="text" value="${item.pickUpQuantity}" readonly="true" />
                <#input id="quantityIssued" name="*已兑换数量:" type="text" value="${item.hasPicked}" readonly="true" />
                <#input id="quantityIssued" name="*有效期:" type="text" value="${item.validTime}" readonly="true" />
 
                <#input id="quantityIssued" name="*兑换地点:" type="text" value="${item.exchangeArea}" readonly="true" />
 
                @if(item.useScope == 3){
                <table class="table table-bordered" style="width: 70%;margin-left: 228px;" >
                    <thead>
                    <tr>
                        <td>所在省市</td>
                        <td>所属账号</td>
                        <td>门店名称</td>
                        <td>闸机id</td>
                    </tr>
                    </thead>
                    @for(s in store){
                    <td>${s.num1}</td>
                    <td>${s.num2}</td>
                    <td>${s.num3}</td>
                    <td>${s.num4}</td>
                    @}
                </table>
                @}
                @if(item.useScope == 4){
                <table class="table table-bordered" style="width: 70%;margin-left: 228px;" >
                    <thead>
                    <tr>
                        <td>所在省市</td>
                        <td>所属账号</td>
                        <td>门店名称</td>
                        <td>场地名称</td>
                        <td>闸机id</td>
                    </tr>
                    </thead>
                    <tbody>
                    @for(s in sites){
                    <tr>
                    <td>${s.num1}</td>
                    <td>${s.num2}</td>
                    <td>${s.num3}</td>
                    <td>${s.num5}</td>
                    <td>${s.num4}</td>
                    </tr>
                    @}
                    </tbody>
 
                </table>
                @}
 
                @if(item.useScope == 2){
                <table class="table table-bordered" style="width: 70%;margin-left: 228px;" >
                    <thead>
                    <tr>
                        <td>所在省</td>
                        <td>所在市</td>
                    </tr>
                    </thead>
                    @for(c in city){
                    <tr>
                    <td>${c.num1}</td>
                    <td>${c.num2}</td>
                    </tr>
                    @}
                </table>
                @}
                <div class="form-group" style="margin-left:262px">
                    <label class="col-sm-3 control-label">兑换说明:</label>
                    <div class="col-sm-4">
                        <textarea type="text/plain" id="editor"  style="height: 300px;width: 800px;" readonly>${item.redemptionInstructions}</textarea>
                    </div>
                </div>
                <#input id="quantityIssued" name="*排序:" type="text" value="${item.sort}" readonly="true" />
 
            </div>
        </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="TGoodsInfoDlg.close()"/>
        </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/tGoods/tGoods_info.js"></script>
<script>
    function updateMethod(e) {
        console.log(e)
        if(e==1){
            $("#y3").hide()
            $("#y4").show()
        }else if(e==2){
            $("#y4").show()
            $("#y3").show()
        }else if(e==3){
            $("#y1").hide()
            $("#y2").show()
        }else if(e==4){
            $("#y1").show()
            $("#y2").show()
        }else if(e==5) {
            $("#y2").hide()
            $("#y1").show()
        }
 
    }
    window.onload = function(){
        var OBJradio=document.getElementsByName("redemptionMethod")
        if(OBJradio==1){
            $("#y4").show()
            $("#y3").hide()
        }
        if(OBJradio==2){
            $("#y4").show()
            $("#y3").show()
        }
        for(i=0;i<OBJradio.length;i++){//循环查找这个radio
            if($("#s1").val()==OBJradio[i].value){//判断是否与radio的值相同
                OBJradio[i].checked=true//修改选中状态
            }
        }
        var OBJradio=document.getElementsByName("userPopulation")
        for(i=0;i<OBJradio.length;i++){//循环查找这个radio
            if($("#s2").val()==OBJradio[i].value){//判断是否与radio的值相同
                OBJradio[i].checked=true//修改选中状态
            }
        }
    }
    var vue2 = new Vue({
        el: '#app',
        data: {
            autoUpload: true,//自动上传
            imageUrl1: '',//模型数据,用于上传图片完成后图片预览
            dialogVisible: false
        },
        methods: {
            handleAvatarSuccess(res, file) {
                TGoodsInfoDlg.goodsPicArray.push(file.response);
            },
            beforeAvatarUpload(file) {
                const isLt2M = file.size / 1024 / 1024 < 10;
                if (!isLt2M) {
                    this.$message.error('上传图片大小不能超过 10MB!');
                }
                return isLt2M;
            },
            handleRemove(file, fileList) {
                TGoodsInfoDlg.goodsPicArray = TGoodsInfoDlg.goodsPicArray.filter(item => {
                    return item.uid != file.uid;
                });
            },
        },
        created() {
        },
    });
</script>
@}