Commit d04b6c23 by 朱继来

Merge branch 'zjl_check_20200818'

parents 25e28f92 0e324bd1
......@@ -52,6 +52,30 @@ Class ExportController extends Controller
$this->commonFunc($cellData, $headerCell, $fileName, $sheetName);
}
// 工具尺邀约记录导出
public function rulesInviteExport($request)
{
$UserSampleInviteModel = new UserSampleInviteModel();
$data = $UserSampleInviteModel->where('type', 2)->get()->toArray();
foreach ($data as $k=>$v) {
$cellData[$k]['invite_id'] = $v['invite_id'];
$cellData[$k]['user_id'] = $v['user_id'];
$cellData[$k]['account'] = $v['account'];
$cellData[$k]['invitee_uid'] = $v['invitee_uid'];
$cellData[$k]['invitee_mobile'] = $v['invitee_mobile'];
$cellData[$k]['is_expire'] = $v['is_expire'] == 1 ? '是' : '否';
$cellData[$k]['create_time'] = $v['create_time'];
}
$headerCell = ['邀请ID', '用户ID', '用户账户', '受邀者ID', '受邀者账号', '是否有效', '受邀者注册时间'];
$fileName ='工具尺邀请记录导出'.date('_YmdHis');
$sheetName = '工具尺邀请';
$this->commonFunc($cellData, $headerCell, $fileName, $sheetName);
}
/**
* 导出
* @param [type] $cellData [导出数据]
......
......@@ -76,5 +76,19 @@ layui.use(['form', 'table', 'laydate'], function(){
});
})
// 工具尺邀约记录导出
$('.invite_export').click(function() {
var url = '/export/rulesInviteExport';
layer.confirm('确定导出数据吗?', {
title: '导出数据'
,btn: ['确定', '取消']
}, function(){
layer.closeAll('dialog'); // 确定时关闭弹框
window.location.href = url;
});
})
});
\ No newline at end of file
......@@ -48,6 +48,7 @@
<div class="layui-btn-container" style="text-align: center; margin-top: 10px;">
<button lay-submit lay-filter="load" class="layui-btn" data-type="search">搜索</button>
<button type="button" class="layui-btn layui-btn-normal export">导出</button>
<button type="button" class="layui-btn layui-btn-normal invite_export" style="float:right;">工具尺邀约记录导出</button>
</div>
</div>
</form>
......
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 sign in to comment