xiaoyong931011
2021-04-12 a13a93a493e7e94e28b2225c26e7e13b52d3288c
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
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <!-- 本框架基本脚本和样式 -->
    <script type="text/javascript" th:src="@{/js/systools/MBaseVue.js}"></script>
    <link rel="stylesheet" th:href="@{/plugin/element-ui/index.css}">
    <link rel="stylesheet" th:href="@{/plugin/bootstrap-3.3.5/css/bootstrap.min.css}">
    <link th:href="@{/css/styleOne/style.min.css}" rel="stylesheet" type="text/css"/>
 
    <!-- 富文本编辑器 -->
    <script type="text/javascript" charset="utf-8"
            th:src="@{/plugin/beditor/ueditor.config.js}"></script>
    <script type="text/javascript" charset="utf-8"
            th:src="@{/plugin/beditor/ueditor.all.js}">
    </script>
    <script type="text/javascript" charset="utf-8"
            th:src="@{/plugin/beditor/lang/zh-cn/zh-cn.js}"></script>
    <style>
        .panel-body{
            overflow: hidden;
        }
        .paginationStyle{
            background: #ffffff;
            padding: 10px 10px;
            margin: 0px 0px 10px 0px;
            text-align: right;
        }
    </style>
</head>
 
<body>
<div class="panel-body" id="app" v-cloak>
    <el-row>
        <el-row style="display:flex;">
            <el-col>
                <el-form ref="form" :model="form" inline >
                    <el-form-item label="中奖人名称" prop="yhmc" >
                        <el-input v-model="form.yhmc" placeholder="中奖人名称"></el-input>
                    </el-form-item>
                    <el-form-item label="输入活动名称/编码" prop="hdmcbm" >
                        <el-input v-model="form.hdmcbm" placeholder="输入活动名称/编码"></el-input>
                    </el-form-item>
                    <el-button type="primary" @click="searchFormSignReceive" >搜索</el-button>
                    <el-button @click="resetFormSignReceive('form')">重置</el-button>
                </el-form>
            </el-col>
        </el-row>
 
        <el-row class="table-style" >
            <el-table ref="multipleTable"
                      :data="signWriteoffList.rows"
                      :height="height"
                      stripe:true
                      @sort-change="sortChange">
                <el-table-column
                        prop="writeoffTime"
                        label="核销时间"
                        show-overflow-tooltip>
                </el-table-column>
                <el-table-column
                        prop="writeoffUser"
                        label="核销员"
                        show-overflow-tooltip>
                </el-table-column>
                <el-table-column
                        label="兑奖码"
                        show-overflow-tooltip>
                    <template slot-scope="scope">
                        <span v-if="scope.row.state == 3">{{scope.row.writeoffCode}}</span>
                    </template>
                </el-table-column>
                <el-table-column
                        prop="actName"
                        label="活动名称"
                        show-overflow-tooltip>
                </el-table-column>
                <el-table-column
                        prop="awardName"
                        label="奖品名称"
                        show-overflow-tooltip>
                </el-table-column>
                <el-table-column
                        prop="winTime"
                        label="中奖时间"
                        show-overflow-tooltip>
                </el-table-column>
                <el-table-column
                        label="状态">
                    <template slot-scope="scope">
                        <span v-if="scope.row.state == 1">待兑换</span>
                        <span v-if="scope.row.state == 2">待发货</span>
                        <span v-if="scope.row.state == 3">已兑换</span>
                    </template>
                </el-table-column>
                <el-table-column
                        label="兑奖方式">
                    <template slot-scope="scope">
                        <span v-if="scope.row.awardWay == 1">线下兑换</span>
                        <span v-if="scope.row.awardWay == 2">物流配送</span>
                        <span v-if="scope.row.awardWay == 3">客服兑换</span>
                    </template>
                </el-table-column>
                <el-table-column
                        prop="receiveName"
                        label="中奖者"
                        show-overflow-tooltip>
                </el-table-column>
                <el-table-column
                        prop="receiveAddress"
                        label="收货地址"
                        show-overflow-tooltip>
                </el-table-column>
                <el-table-column label="操作" width="200">
                    <template slot-scope="scope">
                        <el-button type="primary" v-if="scope.row.awardWay == 2 && scope.row.state == 2"  @click="jumpTologistics(scope.row)" size="mini">发货</el-button>
                        <el-button type="primary" v-if="scope.row.awardWay != 2 && scope.row.state == 1"  @click="jumpToWriteOff(scope.row)" size="mini">核销</el-button>
 
                        <el-button type="primary" v-if="scope.row.awardWay == 2"  @click="jumpTologistics(scope.row)" size="mini">查看</el-button>
                        <el-button type="primary" v-if="scope.row.awardWay != 2"  @click="jumpToWriteOff(scope.row)" size="mini">查看</el-button>
                    </template>
                </el-table-column>
 
            </el-table>
        </el-row>
        <el-row class="paginationStyle"  >
            <el-pagination background
                           @size-change="changePageSignReceive"
                           @current-change="changeCurrentPageSignReceive"
                           :current-page="signWriteoffList.currentPage"
                           :page-sizes="[10, 20, 30, 50]"
                           :page-size="signWriteoffList.pageSize"
                           layout="total, sizes, prev, pager, next, jumper"
                           :total="signWriteoffList.total">
            </el-pagination>
        </el-row>
    </el-row>
</div>
</body>
<script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
<script type="text/javascript" th:src="@{/js/plugin/jquery.query.js}"></script>
<script type="text/javascript" th:src="@{/plugin/bootstrap-3.3.5/js/bootstrap.min.js}"></script>
<script type="text/javascript" th:src="@{/js/systools/AjaxProxyVue.js}"></script>
<script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script>
<script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script>
<script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script>
<script type="text/javascript" th:src="@{/plugin/layer/layer.js}"></script>
<script type="text/javascript" th:src="@{/plugin/moment.min.js}"></script>
 
<script>
    //获取传输的活动对象
    var actId = $.query.get("actId");
 
    var app = new Vue({
        el: '#app',
        data: {
            height:'calc(100vh - 200px)',
            //--时间选择
            pickerOptions: {
                shortcuts: [{
                    text: '最近一周',
                    onClick(picker) {
                        const end = new Date();
                        const start = new Date();
                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
                        picker.$emit('pick', [start, end]);
                    }
                }, {
                    text: '最近一个月',
                    onClick(picker) {
                        const end = new Date();
                        const start = new Date();
                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
                        picker.$emit('pick', [start, end]);
                    }
                }, {
                    text: '最近三个月',
                    onClick(picker) {
                        const end = new Date();
                        const start = new Date();
                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
                        picker.$emit('pick', [start, end]);
                    }
                }]
            },
            // 条件查询
            form:{
                yhmc:'',
                hdmcbm:'',
                order:'',
                sort:''
            },
            //核销列表
            signWriteoffList:{
                rows:[],
                total:0,
                pageSize:10,
                currentPage:1,
            },
        },
        created: function () {
            this.loadInfo();
        },
        mounted: function () {
        },
        methods: {
            //加载分类
            loadInfo() {
                let _this = this;
                _this.loadSignWriteoffList();
            },
            //跳转到核销
            jumpToWriteOff(row){
                layer.full(layer.open({
                    type: 2,
                    title: "核销",
                    maxmin: true,
                    area: [MUI.SIZE_L, '500px'],
                    content : [ basePath + '/admin/redirect/activity/activity-sign-writeoff-info?writeoffId=' + row.id]
                }));
            },
            //跳转到发货
            jumpTologistics(row){
                layer.full(layer.open({
                    type: 2,
                    title: "发货",
                    maxmin: true,
                    area: [MUI.SIZE_L, '500px'],
                    content : [ basePath + '/admin/redirect/activity/activity-sign-logistics-info?writeoffId=' + row.id]
                }));
            },
            //--列表
            loadSignWriteoffList() {
                let _this = this;
                let data=_this.getRequestParamSignWriteoff();
                data.pageSize=_this.signWriteoffList.pageSize;
                data.pageNum=_this.signWriteoffList.currentPage;
                AjaxProxy.requst({
                    app: _this,
                    data:data,
                    url: basePath + '/admin/activitySignWriteoff/findSignWriteoffList',
                    callback: function (data) {
                        _this.signWriteoffList.rows = data.rows;
                        _this.signWriteoffList.total = data.total;
                    }
                });
            },
            //查询参数
            getRequestParamSignWriteoff(){
                let _this = this;
                return   {
                    zjzxm:_this.form.yhmc,
                    hdmcbm:_this.form.hdmcbm,
                    order:_this.form.order,
                    sort:_this.form.sort,
                }
            },
            //查询
            searchFormSignReceive:function(){
                this.signWriteoffList.currentPage=1;
                this.loadSignWriteoffList();
            },
            //重置
            resetFormSignReceive(formName) {
                this.$refs[formName].resetFields();
            },
            changePageSignReceive(val) {
                this.signWriteoffList.pageSize = val;
                this.loadSignWriteoffList();
            },
            changeCurrentPageSignReceive(val) {
                this.signWriteoffList.currentPage = val;
                this.loadSignWriteoffList();
            },
            //排序
            sortChange:function (column){
                if(column.order){
                    if(column.order.indexOf("desc")){
                        this.form.order="desc";
                    }else{
                        this.form.order="asc";
                    }
                    this.form.sort=column.prop;
                    this.loadInfo();
                }
            },
        }
    })
</script>
 
</body>
</html>