无关风月
2025-04-11 1d9f7b0cf4251f3058badb07dd7a2bc06b6bc09a
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
@layout("/common/_container.html"){
<div class="row" id="app0">
    <div class="col-sm-12">
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <h5>惠民卡管理</h5>
            </div>
            <div class="ibox-content">
                <el-form :inline="true" :model="query">
                    <el-form-item label="惠民卡名称:">
                        <el-input v-model="query.name" placeholder="请输入"></el-input>
                    </el-form-item>
 
                    <el-form-item label="惠民卡类型:">
                        <el-select v-model="query.type" placeholder="全部">
                            <el-option label="全部" value=""></el-option>
                            <el-option label="年度卡" value="year"></el-option>
                            <el-option label="季度卡" value="quarter"></el-option>
                        </el-select>
                    </el-form-item>
 
                    <el-form-item label="有效期:">
                        <el-date-picker
                                v-model="query.dateRange"
                                type="daterange"
                                range-separator="至"
                                start-placeholder="开始日期"
                                end-placeholder="结束日期">
                        </el-date-picker>
                    </el-form-item>
 
                    <el-form-item label="可售状态:">
                        <el-select v-model="query.status" placeholder="全部">
                            <el-option label="全部" value=""></el-option>
                            <el-option label="已上架" value="1"></el-option>
                            <el-option label="已下架" value="0"></el-option>
                        </el-select>
                    </el-form-item>
                </el-form>
                <div class="row">
                    <div class="col-sm-12">
                        <el-button type="primary" size="medium" style="background-color:#1ab394;color: #ffffff;border:#1ab394;" v-on:click="handleSearch" icon="el-icon-search">搜索</el-button>
                        <el-button type="primary" size="medium" style="background-color:#1ab394;color: #ffffff;border:#1ab394;" v-on:click="handleAdd" icon="el-icon-circle-plus-outline">添加</el-button>
                        <el-button type="primary" size="medium" style="background-color:#1ab394;color: #ffffff;border:#1ab394;"  v-on:click="handleEdit" icon="el-icon-edit">编辑</el-button>
                        <el-button type="primary" size="medium" style="background-color:#1ab394;color: #ffffff;border:#1ab394;"  v-on:click="handleDelete" icon="el-icon-delete">删除</el-button>
                        <el-button type="primary" size="medium" style="background-color:#1ab394;color: #ffffff;border:#1ab394;"  v-on:click="handleShelves(1)" icon="el-icon-upload2">上架</el-button>
                        <el-button type="primary" size="medium" style="background-color:#1ab394;color: #ffffff;border:#1ab394;"  v-on:click="handleShelves(2)" icon="el-icon-download">下架</el-button>
                        <el-button type="primary" size="medium" style="background-color:#1ab394;color: #ffffff;border:#1ab394;"  v-on:click="handleViewDetail" icon="el-icon-tickets">查看详情</el-button>
                    </div>
                </div>
                <el-table
                        :data="tableData"
                        :v-loading="loading"
                        stripe
                        style="width: 100%"
                        v-on:selection-change="handleSelectionChange">
                    <el-table-column type="selection" width="55"></el-table-column>
                    <el-table-column prop="huiMinName" label="惠民卡名称"></el-table-column>
                    <el-table-column prop="huiMinType" label="类型">
                        <template slot-scope="scope">
                            <span v-if="scope.row.huiMinType === '1'">年度卡</span>
                            <span v-else-if="scope.row.huiMinType === '2'">年内卡</span>
                            <span v-else>未知类型</span>
                        </template>
                    </el-table-column>
                    <el-table-column prop="salesMoney" label="售卖金额">
                        <template slot-scope="scope">
                            ¥{{ scope.row.salesMoney }}
                        </template>
                    </el-table-column>
                    <el-table-column prop="date" min-width="200px" label="有效期">
                        <template slot-scope="scope">
                            {{ scope.row.startTime }}至{{ scope.row.endTime }}
                        </template>
                    </el-table-column>
                    <el-table-column prop="grantCount" label="发放数量">
                        <template slot-scope="scope">
                            {{ scope.row.grantCount == null ? '无限制' : scope.row.grantCount }}
                        </template>
                    </el-table-column>
                    <el-table-column prop="limitCount" label="限购数量">
                        <template slot-scope="scope">
                            {{ scope.row.limitCount == null ? '无限制' : scope.row.limitCount }}
                        </template>
                    </el-table-column>
                    <el-table-column prop="buyCount" label="已购数量">
                        <template slot-scope="scope">
                            {{ scope.row.buyCount == null ? 0 : scope.row.buyCount }}
                        </template>
                    </el-table-column>
                    <el-table-column prop="sort" label="排序"></el-table-column>
                    <el-table-column prop="flag" label="活动状态" >
                        <template slot-scope="scope">
                            <span v-if="scope.row.flag === 1">未开始</span>
                            <span v-else-if="scope.row.flag === 2">已开始</span>
                            <span v-else-if="scope.row.flag === 3">已结束</span>
                            <span v-else>未知类型</span>
                        </template>
                    </el-table-column>
                    <el-table-column prop="status" label="可售状态">
                        <template slot-scope="scope">
                            <span v-if="scope.row.status === 1">已上架</span>
                            <span v-else-if="scope.row.status === 2">已下架</span>
                            <span v-else-if="scope.row.status === 3">已删除</span>
                            <span v-else>未知类型</span>
                        </template>
                    </el-table-column>
                    <el-table-column label="操作">
                        <template slot-scope="scope">
                            <el-button type="text" v-on:click="handleViewDetail(scope.row)">查看详情</el-button>
                        </template>
                    </el-table-column>
                </el-table>
 
                <!-- 分页 -->
                <el-pagination
                        v-on:size-change="handleSizeChange"
                        v-on:current-change="handleCurrentChange"
                        :current-page="currentPage"
                        :page-sizes="[10, 20, 50, 100]"
                        :page-size="pageSize"
                        layout="total, sizes, prev, pager, next, jumper"
                        :total="total">
                </el-pagination>
            </div>
        </div>
    </div>
</div>
<script src="${ctxPath}/js/vue/vue.js"></script>
<script src="${ctxPath}/js/elementui/index.js"></script>
<script src="${ctxPath}/modular/system/tHuiminCard/tHuiminCard2.js"></script>
<link rel="stylesheet" href="${ctxPath}/js/elementui/index.css">
<script src="${ctxPath}/modular/system/tHuiminCard/tHuiminCard.js"></script>
<script src="${ctxPath}/modular/system/tHuiminAgreement/tHuiminAgreement.js"></script>
<script>
 
</script>
@}