Commit 1a5861f2 authored by wangtao's avatar wangtao

证书管理 会员管理 广告管理

parent 16e801d2
......@@ -38,16 +38,16 @@ class CertOrder extends AdminBase
$post = input();
$post['limit'] = isset($post['limit']) ? $post['limit'] : $limit;
$map[] = ['is_del', '=', 0];
$map[] = ['status', '>', 0];
$map[] = ['cert_order.is_del', '=', 0];
$map[] = ['cert_order.status', '>', 0];
$hasmap = [];
if (isset($post['kw']) && !empty($post['kw'])) {
$map[] = ['title', 'like', '%' . $post['kw'] . '%'];
$hasmap[] = ['user.username|user.mobile', 'like', '%' . $post['kw'] . '%'];
}
if (isset($post['cate_id']) && !empty($post['cate_id'])) {
$map[] = ['cate_id', '=', $post['cate_id']];
if (isset($post['status']) && !empty($post['status'])) {
$map[] = ['status', '=', $post['status']];
}
$list = $this->certorder->where($map)->with(['certdata','userprofile'])->order('createtime desc')->paginate($post['limit']);
$list = $this->certorder->hasWhere('userprofile', $hasmap)->where($map)->with(['certdata','userprofile'])->append(['status_text'])->order('createtime desc')->paginate($post['limit']);
return $this->returnMsg($list);
}
......@@ -86,14 +86,39 @@ class CertOrder extends AdminBase
}
//审核
public function shenhecertorder()
{
$post = input();
$errordesc = '';
$shstatus = 3;
if ($post['shstatus'] == 2) {
if (empty($post['errordesc'])) {
return $this->returnMsg("请输入失败原因");
}
$errordesc = $post['errordesc'];
$shstatus = 2;
}
$updatedata['status'] = $shstatus;
$updatedata['status_desc'] = $errordesc;
$result = $this->certorder->where('id', $post['id'])->update($updatedata);
if ($result) {
return $this->returnMsg("操作成功", 1);
} else {
return $this->returnMsg("操作失败");
}
}
//详情
public function detail()
{
$post = input();
$info = $this->certorder->where('id', $post['id'])->find();
$info = $this->certorder->with(['certdata','userprofile'])->append(['status_text'])->where('id', $post['id'])->find();
$this->assign('info', $info);
return $this->fetch('', '', false);
}
......
......@@ -5,94 +5,97 @@
</style>
<div style="margin: 0px 10px;">
<p style="padding-top: 10px;">学校基本信息:</p>
<p>基础信息:</p>
<table class="layui-table">
<tbody>
<tr>
<td class="widthtd"><strong>学校名称</strong></td>
<td>{$info.name}</td>
<td class="widthtd"><strong>学校类型</strong></td>
<td>{$info.type}</td>
<td class="widthtd"><strong>用户名</strong></td>
<td>{$info.userprofile.username}</td>
<td class="widthtd"><strong>用户手机号</strong></td>
<td>{$info.userprofile.mobile}</td>
</tr>
<tr>
<td class="widthtd"><strong>详细地址</strong></td>
<td>{$info.addressxx}</td>
<td class="widthtd"><strong>学校官网</strong></td>
<td>{$info.web_url}</td>
<td class="widthtd"><strong>证书名称</strong></td>
<td>{$info.certdata.title}</td>
<td class="widthtd"><strong>证书价格</strong></td>
<td>{$info.certdata.price}</td>
</tr>
</tbody>
</table>
<p>联系人信息:</p>
<p>报名信息:</p>
<table class="layui-table">
<tbody>
<tr>
<td class="widthtd"><strong>联系人姓名</strong></td>
<td>{$info.contacts_name}</td>
<td class="widthtd"><strong>联系人职位</strong></td>
<td>{$info.job}</td>
<td class="widthtd"><strong>单号</strong></td>
<td>{$info.order_sn}</td>
<td class="widthtd"><strong>姓名</strong></td>
<td>{$info.name}</td>
</tr>
<tr>
<td class="widthtd"><strong>联系人手机号</strong></td>
<td>{$info.contacts_phone}</td>
<td class="widthtd"><strong>联系人邮箱</strong></td>
<td>{$info.contacts_email}</td>
<td class="widthtd"><strong>手机号</strong></td>
<td>{$info.mobile}</td>
<td class="widthtd"><strong>身份证号</strong></td>
<td>{$info.idcard}</td>
</tr>
</tbody>
</table>
<p>资质证明材料:</p>
<table class="layui-table">
<tbody>
<tr>
<td class="widthtd"><strong>学校资质证明</strong></td>
<td class="widthtd"><strong>身份证正面</strong></td>
<td>
{if $info.schoolQualification}
{in name="info.schoolQualification.fileext" value="jpg,png,jpeg"}
<img src="{$info.schoolQualification.fileurl}" width="100" height="100" class="imgclick">
{else/}
<a href="{$info.schoolQualification.fileurl}" target="_blank">{$info.schoolQualification.filename}</a>
{/in}
{/if}
<img src="{$info.idcard_q|default=''|get_upload_file}" width="50" height="50" class="imgclick">
</td>
<td class="widthtd"><strong>合作协议</strong></td>
<td class="widthtd"><strong>身份证背面</strong></td>
<td>
{if $info.agreement}
{in name="info.agreement.fileext" value="jpg,png,jpeg"}
<img src="{$info.agreement.fileurl}" width="100" height="100" class="imgclick">
{else/}
<a href="{$info.agreement.fileurl}" target="_blank">{$info.agreement.filename}</a>
{/in}
{/if}
<img src="{$info.idcard_h|default=''|get_upload_file}" width="50" height="50" class="imgclick">
</td>
</tr>
<tr>
<td class="widthtd"><strong>导师资质证明</strong></td>
<td class="widthtd"><strong>邮箱</strong></td>
<td>{$info.email}</td>
<td class="widthtd"><strong>标准证件照</strong></td>
<td>
{if $info.teacherQualification}
{in name="info.teacherQualification.fileext" value="jpg,png,jpeg"}
<img src="{$info.teacherQualification.fileurl}" width="100" height="100" class="imgclick">
{else/}
<a href="{$info.teacherQualification.fileurl}" class="layui-font-green" target="_blank">{$info.teacherQualification.filename}</a>
{/in}
{/if}
<img src="{$info.head_img_id|default=''|get_upload_file}" width="50" height="50" class="imgclick">
</td>
<td class="widthtd"><strong>补充材料</strong></td>
<td>
{if $info.moreFile}
{in name="info.moreFile.fileext" value="jpg,png,jpeg"}
<img src="{$info.moreFile.fileurl}" width="100" height="100" class="imgclick">
</tr>
<tr>
<td class="widthtd"><strong>其他资质</strong></td>
<td colspan="3">
<table class="layui-table">
<thead>
<tr>
<th>文件名称</th>
<th>大小</th>
<th>操作</th>
</tr>
</thead>
<tbody>
{volist name="info.other_file_list" id="data"}
<tr>
<td>{$data.filename}</td>
<td>{$data.filesize}KB</td>
<td >
{in name="data.fileext" value="jpg,png,jpeg"}
<img src="{$data.fileurl}" width="50" height="50" class="imgclick">
{else/}
<a href="{$info.moreFile.fileurl}" target="_blank">{$info.moreFile.filename}</a>
<a class="layui-btn layui-btn-xs" href="/admin/course.course_work/downloadfile?fileid={$data.fileid}" target="_blank">下载</a>
{/in}
{/if}
</td>
</tr>
{/volist}
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
{/block}
{block name="script"}
......@@ -100,26 +103,6 @@
layui.use(['buildItems', 'form', 'laydate', 'util'], function () {
var form = layui.form;
/*解析顶部分组选项*/
var str = [{
"name": "cover_img_id",
"title": "上传图片",
"value": "{$data.cover_img_id|default=''|get_upload_file}",
"pathid": "{$data.cover_img_id|default=''}",
"type": "imagewt"
}];
layui.buildItems.build({
fjbid:'fjfrom',
bid: 'cover_img_id',
url: '',
map: layui.cache.maps + 'system.upload/',
gid: 1,
data: str
});
layui.buildItems.init();
form.render();
});
......
......@@ -11,13 +11,12 @@
<div class="layui-form-item">
<div class="layui-inline" style="width:250px;"><input type="text" name="kw" placeholder="用户名,用户手机号" autocomplete="off" class="layui-input" lay-affix="clear"/></div>
<div class="layui-inline" style="width:250px;"><input type="text" name="certorder" placeholder="学校名称" autocomplete="off" class="layui-input" lay-affix="clear"/></div>
<div class="layui-inline" style="width:150px;">
<select name="status">
<option value="-1">审核状态</option>
<option value="1">审核通过</option>
<option value="2">审核失败</option>
<option value="0">待审核</option>
<option value="">审核状态</option>
<option value="1">申请中</option>
<option value="2">申请失败</option>
<option value="3">申请成功</option>
</select>
</div>
<div class="layui-inline">
......@@ -53,7 +52,7 @@
<script type="text/html" id="certorderstatus-demo">
{{# if (d.status === 1) { }}
{{# if (d.status === 3) { }}
<a class="layui-btn layui-btn-xs layui-btn-normal" >{{=d.status_text}}</a>
{{# } else { }}
{{# if(d.status === 2) { }}
......@@ -175,7 +174,7 @@
title: '资料详情',
btn: ['确定', '关闭'],
fixed: false, //不固定
content: '/admin/users.certorder/detail?id='+id+'&type='+type,
content: app_root+'/detail?id='+id+'&type='+type,
yes: function(index, layero){
layer.close(index);
},
......@@ -185,7 +184,7 @@
function shajax(id,shstatus,errordesc=''){
$.ajax({
method: "post",
url: layui.cache.maps+'/users.certorder/shenhecertorder',
url: app_root+'/shenhecertorder',
data: {id:id,shstatus:shstatus,errordesc:errordesc},
dataType: "json",
success: function (res){
......
......@@ -64,7 +64,7 @@
{in name="info.businessQualification.fileext" value="jpg,png,jpeg"}
<img src="{$info.businessQualification.fileurl}" width="100" height="100" class="imgclick">
{else/}
<a href="{$info.businessQualification.fileurl}" target="_blank">{$info.businessQualification.filename}</a>
<a href="/admin/users.business/downloadfile?fileid={$info.businessQualification.fileid}" target="_blank">{$info.businessQualification.filename}</a>
{/in}
</td>
......@@ -74,7 +74,7 @@
{in name="info.businessIndustry.fileext" value="jpg,png,jpeg"}
<img src="{$info.businessIndustry.fileurl}" width="100" height="100" class="imgclick">
{else/}
<a href="{$info.businessIndustry.fileurl}" target="_blank">{$info.businessIndustry.filename}</a>
<a href="/admin/users.business/downloadfile?fileid={$info.businessIndustry.fileid}" target="_blank">{$info.businessIndustry.filename}</a>
{/in}
{/if}
</td>
......@@ -86,7 +86,7 @@
{in name="info.businessPorject.fileext" value="jpg,png,jpeg"}
<img src="{$info.businessPorject.fileurl}" width="100" height="100" class="imgclick">
{else/}
<a href="{$info.businessPorject.fileurl}" class="layui-font-green" target="_blank">{$info.businessPorject.filename}</a>
<a href="/admin/users.business/downloadfile?fileid={$info.businessPorject.fileid}" class="layui-font-green" target="_blank">{$info.businessPorject.filename}</a>
{/in}
{/if}
</td>
......@@ -96,7 +96,7 @@
{in name="info.businessLogo.fileext" value="jpg,png,jpeg"}
<img src="{$info.businessLogo.fileurl}" width="100" height="100" class="imgclick">
{else/}
<a href="{$info.businessLogo.fileurl}" target="_blank">{$info.businessLogo.filename}</a>
<a href="/admin/users.business/downloadfile?fileid={$info.businessPorject.fileid}" target="_blank">{$info.businessLogo.filename}</a>
{/in}
{/if}
</td>
......@@ -109,7 +109,7 @@
{in name="info.businessMore.fileext" value="jpg,png,jpeg"}
<img src="{$info.businessMore.fileurl}" width="100" height="100" class="imgclick">
{else/}
<a href="{$info.businessMore.fileurl}" class="layui-font-green" target="_blank">{$info.businessMore.filename}</a>
<a href="/admin/users.business/downloadfile?fileid={$info.businessMore.fileid}" class="layui-font-green" target="_blank">{$info.businessMore.filename}</a>
{/in}
{/if}
</td>
......
......@@ -53,7 +53,7 @@
{in name="info.schoolQualification.fileext" value="jpg,png,jpeg"}
<img src="{$info.schoolQualification.fileurl}" width="100" height="100" class="imgclick">
{else/}
<a href="{$info.schoolQualification.fileurl}" target="_blank">{$info.schoolQualification.filename}</a>
<a href="/admin/users.school/downloadfile?fileid={$info.schoolQualification.fileid}" target="_blank">{$info.schoolQualification.filename}</a>
{/in}
{/if}
......@@ -64,7 +64,7 @@
{in name="info.agreement.fileext" value="jpg,png,jpeg"}
<img src="{$info.agreement.fileurl}" width="100" height="100" class="imgclick">
{else/}
<a href="{$info.agreement.fileurl}" target="_blank">{$info.agreement.filename}</a>
<a href="/admin/users.school/downloadfile?fileid={$info.agreement.fileid}" target="_blank">{$info.agreement.filename}</a>
{/in}
{/if}
</td>
......@@ -76,7 +76,7 @@
{in name="info.teacherQualification.fileext" value="jpg,png,jpeg"}
<img src="{$info.teacherQualification.fileurl}" width="100" height="100" class="imgclick">
{else/}
<a href="{$info.teacherQualification.fileurl}" class="layui-font-green" target="_blank">{$info.teacherQualification.filename}</a>
<a href="/admin/users.school/downloadfile?fileid={$info.teacherQualification.fileid}" class="layui-font-green" target="_blank">{$info.teacherQualification.filename}</a>
{/in}
{/if}
</td>
......@@ -86,7 +86,7 @@
{in name="info.moreFile.fileext" value="jpg,png,jpeg"}
<img src="{$info.moreFile.fileurl}" width="100" height="100" class="imgclick">
{else/}
<a href="{$info.moreFile.fileurl}" target="_blank">{$info.moreFile.filename}</a>
<a href="/admin/users.school/downloadfile?fileid={$info.moreFile.fileid}" target="_blank">{$info.moreFile.filename}</a>
{/in}
{/if}
</td>
......
......@@ -21,7 +21,7 @@ class CertOrder extends Model
public function certdata()
{
return $this->hasOne(Cert::class, 'id', 'cert_id')
->field('id,title');
->field('id,title,price');
}
......@@ -29,11 +29,29 @@ class CertOrder extends Model
{
return $this->belongsTo(User::class, 'user_id', 'id')
->field('id,username,mobile');
}
public function getOtherFileListAttr($value, $data)
{
return get_upload_file($data['other_file_id'],'list');
}
public function getCreatetimeAttr($value)
{
return date('Y-m-d H:i:s', $value);
}
public function getStatusTextAttr($value, $data)
{
switch ($data['status']) {
case 2:
$statustxt = '申请失败';
break;
case 3:
$statustxt = '申请成功';
break;
default:
$statustxt = '申请中';
}
return $statustxt;
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment