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
<?php
/**
* 用户申请证书管理
* $Id: certificate_apply_list.inc,v 1.1 2015/10/08 11:18:50 wanggb Exp $
* @author netvillage
* @access public
* @package manager.templates
*/
?>
<style type="text/css">
.result_list{
width: 701px;
}
.m-l{margin-left:5px;}
</style>
<div id="classSetting">
<div class="list_title">
用户证书申请管理
</div>
<br/>
<form id="form" action="certificate_apply_list.php" method="post" style="font-size:14px;padding-left:40px">
<input type="hidden" name="status" value="<?=$status?>"/>
申请人姓名:<input type="text" value="<?=$user_name?>" name="user_name" class="el-input__inner input_100 m-l"/>
申请证书名:<input type="text" value="<?=$certificate_title?>" name="certificate_title" class="el-input__inner input_100 m-l"/>
收货人姓名:<input type="text" value="<?=$name?>" name="name" class="el-input__inner input_100 m-l"/>
状态:<el-select v-model="status" size="small" style="width:100px;margin-left: 10px;">
<el-option
v-for="item in status_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>
</form>
<br />
<div class="result_list">
<el-table :data="tableData" border style="width: 100%">
<el-table-column
prop="user_name"
label="申请人姓名"
width="150">
</el-table-column>
<el-table-column
prop="certificate_title"
label="申请证书名"
width="200">
</el-table-column>
<el-table-column
prop="name"
label="收货人姓名"
width="150">
</el-table-column>
<el-table-column
prop="status"
label="状态"
width="100">
</el-table-column>
<el-table-column
label="操作"
width="100">
<template slot-scope="scope">
<el-button @click="handleChange(scope.row)" type="text" size="small">编辑</el-button>
<el-button type="text" size="small" @click.native.prevent="deleteRow(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
</div>
<?
if ($user_certificate_count > 0) {
?>
<!--page begin-->
<?
require_once("page_common.inc");
?>
<!--page end-->
<?
}
?>
<script type="text/javascript">
var list=[];
<?
foreach ($user_certificate_list as $tmp) {
?>
var data={
id:<?=$tmp["id"] ?>,
name:'<?=$tmp["name"]?>',
user_name:'<?=$tmp["user_name"]?>',
certificate_title:'<?=$tmp["certificate_title"]?>',
status:'<?=$tmp["status"]=="WAITING"?"制作中":($tmp["status"]=="SENDING"?"配送中":"已签收")?>'
};
list.push(data);
<?
}
?>
new Vue({
el:'#classSetting',
data:{
tableData: list,
status:'<?=$status?>',
status_list:[{"title":"请选择",id:""},{"title":"制作中",id:"WAITING"},{"title":"配送中",id:"SENDING"},{"title":"已签收",id:"FINISH"}]
},
methods:{
handleChange(row) {
console.log(row);
window.location.href='certificate_apply_edit_input.php?id='+row.id;
},
deleteRow(rows) {
this.$confirm('是否删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$message({
type: 'success',
message: '删除成功!'
});
// rows.splice(index, 1);
window.location.href='certificate_apply_delete_result.php?id='+rows.id;
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
},
search(){
$("input[name='status']").val(this.status);
$("#form").submit();
}
}
})
</script>