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
<?php
/**
* 活动列表-数据详情
* $Id: event_detail_list.inc,v 1.1 2020/01/03 11:18:46 Exp $
* @author lixq
* @access public
* @package manager.templates
*/
?>
<style type="text/css">
.m-l{
margin-left: 10px;
}
#classSetting p{
font-size: 15px;
}
#classSetting p span{
font-size: 14px;
}
#classSetting p b{
display: inline-block;
font-weight: normal;
width: 104px;
text-align: right;
margin-right: 5px;
}
</style>
<div id="classSetting">
<div class="list_title">
活动列表-数据详情
</div>
<br/>
<p><b>活动名称:</b><span><?=$event_dat->title?></span></p>
<p><b style="font-size: 14px;">完成/参与:</b><?=$finish_count?>/<?=$total_count?></p>
<h4><b style="display:inline-block;width: 104px;text-align: right;font-size: 15px;">参与详情:</b></h4>
<form id="search_form" action="event_detail_list.php" method="post" style="font-size: 14px;padding-left: 35px;">
<input type="hidden" name="circle_id" value="<?=$circle_id?>"/>
<input type="hidden" name="id" value="<?=$id?>"/>
用户姓名:<input type="text" value="<?=$name?>" name="name" class="el-input__inner input_100 m-l"/>
联系方式:<input type="text" value="<?=$mobile?>" name="mobile" class="el-input__inner input_100 m-l"/>
是否完成:
<template>
<el-radio v-model="is_finish" name="is_finish" label="1">是</el-radio>
<el-radio v-model="is_finish" name="is_finish" label="2">否</el-radio>
</template>
<br/>
是否团队参与:
<template>
<el-radio v-model="is_circle" name="is_circle" label="1">是</el-radio>
<el-radio v-model="is_circle" name="is_circle" label="2">否</el-radio>
</template>
团队名称:<el-select v-model="circle_id" size="small" style="margin-left: 10px;">
<el-option
v-for="item in circle_list"
:key="item.id"
:label="item.title"
:value="item.id">
</el-option>
</el-select>
<el-button type="primary" @click="search()" class="edit_btn search_btn" style="padding: 5px 10px;">检索</el-button>
<el-button type="primary" @click="clear()" class="edit_btn search_btn" style="padding: 5px 10px;">清空条件</el-button>
</form>
<br />
<div style="background-color:#E6E3E3;height:1px;"></div>
<br />
<form id="input_time_form" action="event_input_time.php" method="post">
<input type="hidden" name="ids" value=""/>
<input type="hidden" name="names" value=""/>
<input type="hidden" name="event_id" value="<?=$id?>"/>
</form>
<el-button type="primary" style="margin-right: 10px;padding: 5px 10px;margin-left: 37px;" @click="batchInputTime()">批量时长录入</el-button>
<div class="result_list">
<el-table :data="tableData" @selection-change="handleSelectionChange" border>
<el-table-column type="selection" label="全部" width="55"></el-table-column>
<el-table-column prop="index_no" label="编号" width=""></el-table-column>
<el-table-column prop="user_name" label="用户姓名" width=""></el-table-column>
<el-table-column prop="mobile" label="联系方式" width=""></el-table-column>
<el-table-column prop="is_circle" label="是否团队参与" width=""></el-table-column>
<el-table-column prop="circle_name" label="团队名称" width=""></el-table-column>
<el-table-column prop="user_type" label="用户身份" width=""></el-table-column>
<el-table-column prop="user_identity" label="用户类型" width=""></el-table-column>
<el-table-column prop="finish_time" label="完成时间" width=""></el-table-column>
<el-table-column prop="is_finish" label="状态" width=""></el-table-column>
<el-table-column label="操作" width="150">
<template slot-scope="scope" >
<el-button @click="handleChange(scope.row)" type="text" size="small">详情</el-button>
<el-button type="text" size="small" @click="inputTime(scope.row)">时长录入</el-button>
</template>
</el-table-column>
</el-table>
</div>
</div>
<?
if ($event_member_count > 0) {
?>
<!--page begin-->
<?
require_once("page_common.inc");
?>
<!--page end-->
<?
}
?>
<script type="text/javascript">
var list=[];
<?
foreach ($event_member_list as $tmp) {
?>
var data={
id:<?=$tmp["id"] ?>,
index_no:'<?=$tmp["index_no"]?>',
user_name:'<?=$tmp["user_name"]?>',
mobile:'<?=$tmp["mobile"]?>',
is_circle:'<?=$tmp["circle_id"]=="0"?"否":"是"?>',
circle_name:'<?=!empty($tmp["circle_title"])?$tmp["circle_title"]:"无"?>',
user_type:'<?=UserRole::getTitleById($tmp["role"])?>',
user_identity:'<?=$tmp["circle_id"]== 0?"个人":"圈子"?>',
finish_time:'<?=!empty($tmp["finish_time"])?date("Y/m/d H:i",strtotime($tmp["finish_time"])):""?>',
is_finish:'<?=$tmp["status"]=="NEW"?"参与中":($tmp["status"]=="FINISH"?"已完成":"时间已录入")?>'
};
list.push(data);
<?
}
?>
new Vue({
el:'#classSetting',
data:{
tableData: list,
is_circle:'<?=$is_circle?>',
is_finish:'<?=$is_finish?>',
circle_list:<?=json_encode($circle_list)?>,
circle_id:'<?=$circle_id?>',
multipleSelection: []
},
methods:{
handleChange(row) {
window.location.href='event_member_detail.php?id='+row.id;
},
inputTime(row){
$("input[name='ids']").val(row.id);
$("input[name='names']").val(row.user_name);
$("#input_time_form").submit();
},
batchInputTime(){
if(this.multipleSelection.length == 0){
this.$message({
type: 'error',
message: '请选择至少一个用户!'
});
return;
}
var ids = "";
var names = "";
for (i = 0; i < this.multipleSelection.length; i++) {
ids += this.multipleSelection[i].id + ",";
names += this.multipleSelection[i].user_name + ",";
}
if (ids.length > 0) {
ids = ids.substr(0,ids.length - 1);
}
if (names.length > 0) {
names = names.substr(0,names.length - 1);
}
$("input[name='ids']").val(ids);
$("input[name='names']").val(names);
$("#input_time_form").submit();
},
clear(){
$("input[name='name']").val("");
$("input[name='mobile']").val("");
this.is_circle = "";
this.is_finish = "";
this.circle_id = "";
},
search(){
$("input[name='circle_id']").val(this.circle_id);
$("#search_form").submit();
},
handleSelectionChange(val) {
this.multipleSelection = val;
}
}
})
</script>