jyy
2021-03-12 baa79615425b71521e67ec8a9344b88ce53fc5de
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
<!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"/>
    <LINK rel="Bookmark" href="../images/favicon.ico">
    <!-- 本框架基本脚本和样式 -->
 
    <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"/>
</head>
<body>
<div class="ibox-content" id="app" v-cloak>
    <table  class="table table-bordered">
 
        <tr>
            <td colspan="60" class="warning"><label> 可退套餐 </label></td>
        </tr>
        <tr class="active">
            <th></th>
            <th>套餐名称</th>
            <th>余次</th>
            <th>余额</th>
            <th>来源</th>
        </tr>
 
        <template v-for="item in taocanProj"  >
            <tr v-if="item.type=='套餐卡'" >
                <td>  <input type="checkbox" name="ids" :value="item.id" v-model="ids" /> </td>
                <td>{{item.tcName}}  <sapn class="label label-primary" v-if="item.type=='套餐卡'" >套餐卡</sapn> </td>
                <td>{{item.surplusCount}}</td>
                <td>{{item.balance}}</td>
                <td>{{item.source}}</td>
            </tr>
 
 
            <tr v-if="item.type=='套餐'" >
                <td></td>
                <td class="success" colspan="6">{{item.tcName}}  <sapn class="label label-primary" v-if="item.type=='套餐'" >套餐</sapn> </td>
            </tr>
 
            <template v-if="item.type=='套餐'" >
                <tr v-for="projUse in item.taocanProjUse " >
                    <td>  <input type="checkbox" name="ids" :value="projUse.id" v-model="ids" /> </td>
                    <td>{{projUse.name}}</td>
                    <td>{{projUse.surplusCount}}</td>
                    <td>{{projUse.balance}}</td>
                    <td>{{projUse.source}}</td>
                </tr>
            </template>
 
 
        </template>
 
        <tr>
            <td colspan="60" class="warning"><label> 可退项目 </label></td>
        </tr>
        <tr class="active">
            <th></th>
            <th>项目名称</th>
            <th>余次</th>
            <th>余额</th>
            <th>来源</th>
        </tr>
        <tr  v-for="projUse in projList" >
            <td>  <input type="checkbox" name="ids" :value="projUse.id" v-model="ids" /> </td>
            <td>{{projUse.name}}</td>
            <td>{{projUse.surplusCount}}</td>
            <td>{{projUse.balance}}</td>
            <td>{{projUse.source}}</td>
        </tr>
        <tr>
            <td colspan="60" class="text-center" >
 
                <el-button type="primary"   @click="submit()"  >确认</el-button>
                <el-button type="default" @click="close()"  >取消</el-button>
            </td>
        </tr>
    </table>
</div>
</div>
<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/layer/layer.js}"  ></script>
<script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script>
<script type="text/javascript">
 
    var vipId = $.query.get("vipId");
 
    var app = new Vue({
        el: '#app',
        data: {
            projList:[],
            taocanProj:[],
            vipId:vipId,
            ids:[],
        },
        created: function () {
            this.loadInfo();
        },
 
        mounted: function () {
 
        },
 
        methods: {
 
 
            loadInfo: function () {
 
                console.log('加载客户信息数据');
                var _this = this;
 
                var param="vipId="+_this.vipId+"&limit=10000&isOver=N";
 
                AjaxProxy.requst({
                    app: _this,
                    async: false,
                    data:param,
                    url: basePath + '/admin/projUser/showList?'+param,
                    callback: function (data) {
                        _this.projList = data.rows;
                    }
                });
 
                AjaxProxy.requst({
                    app: _this,
                    async: false,
                    data:param,
                    url: basePath + '/admin/taoCanUser/showTc?'+param,
                    callback: function (data) {
                        _this.taocanProj = data.rows;
                    }
                });
 
 
            }
            ,
            close:function(){
                parent.layer.close(parent.layer.getFrameIndex(window.name));
            }
            ,
            submit:function(){
                if(this.ids.length<1){
                    this.$message({
                        message: "您还没选择要退款的项目",
                        type: 'warning'
                    });
                    return false;
                }
                parent.app.selectTaocan(this.ids);
                this.close();
            }
 
 
        },
        filters:
            {
                format: function (value, patten) {
                    if (!value) return '';
                    return MTools.formatDate(value, patten)
                }
                ,
            }
        ,
 
    })
 
 
</script>
</body>
</html>