作者 李洪娟

Merge branch 'master' of http://114.215.101.231:8099/liuzhen/qiaohu into lihong

... ... @@ -262,6 +262,9 @@ class OrderController extends AdminBaseController
$where = [
'delete_time'=>0
];
if(!empty($param['ids'])) {
$where['id'] = ['in',$param['ids']];
}
if(isset($param['keyword'])) {
$where['order_sn|sort_name|user_login|number'] = ['like','%'.$param['keyword'].'%'];
}
... ...
... ... @@ -51,6 +51,9 @@ class MemberController extends AdminBaseController
if(!empty($param['channel'])) {
$where['channel_id'] = $param['channel'];
}
if(isset($param['is_excel']) && $param['is_excel'] >= 0) {
$where['is_excel'] = $param['is_excel'];
}
$startTime = empty($param['start_time']) ? 0 : strtotime($param['start_time']);
$endTime = empty($param['end_time']) ? 0 : strtotime($param['end_time']);
if (!empty($startTime) && !empty($endTime)) {
... ... @@ -78,6 +81,7 @@ class MemberController extends AdminBaseController
$this->assign('chan',isset($param['channel']) ? $param['channel'] : '');
$this->assign('start_time',isset($param['start_time']) ? $param['start_time'] : '');
$this->assign('end_time',isset($param['end_time']) ? $param['end_time'] : '');
$this->assign('is_excel',isset($param['is_excel']) ? $param['is_excel'] : '');
// 获取渠道列表
$channel = ['站内'];
$channelList = $this->singleData('Channel',['delete_time'=>0],1,['create_time'=>'DESC']);
... ... @@ -164,12 +168,18 @@ class MemberController extends AdminBaseController
$where = [
'delete_time'=>0
];
if(!empty($param['ids'])) {
$where['id'] = ['in',$param['ids']];
}
if(!empty($param['keyword'])) {
$where['mobile|user_login|baby_name|parent_name'] = ['like','%'.$param['keyword'].'%'];
}
if(!empty($param['channel'])) {
$where['channel_id'] = $param['channel'];
}
if(isset($param['is_excel']) && $param['is_excel'] >= 0) {
$where['is_excel'] = $param['is_excel'];
}
$startTime = empty($param['start_time']) ? 0 : strtotime($param['start_time']);
$endTime = empty($param['end_time']) ? 0 : strtotime($param['end_time']);
if (!empty($startTime) && !empty($endTime)) {
... ... @@ -236,6 +246,7 @@ class MemberController extends AdminBaseController
->setCellValue('J' . $i, $v['last_login_ip'])
->setCellValue('K' . $i, date('Y-m-d',$v['last_login_time']));
$i++;
Db::name('Member')->where(['id'=>$v['id']])->update(['is_excel'=>1,'update_time'=>time()]);
}
$filename = '用户数据导出'. date('Y-m-d').'.xls';
... ...
... ... @@ -243,7 +243,9 @@ class MemberSalesController extends HomeBaseController
if(!$id) {
$this->redirect(url('portal/MemberSales/order_type'));
}
$user_id = cmf_get_current_user_sale_id();
$order_where = [
'o.user_id' => $user_id,
'o.is_stop' => 0,
'o.delete_time' => 0
];
... ... @@ -267,6 +269,7 @@ class MemberSalesController extends HomeBaseController
public function choosetime_detail() {
if($this->request->isAjax()) {
$date = $this->request->param('date');
$sort_id = $this->request->param('sort_id');
$user_id = cmf_get_current_user_sale_id();
$order_where = [
'o.user_id' => $user_id,
... ... @@ -281,8 +284,8 @@ class MemberSalesController extends HomeBaseController
->where($order_where)
->select();
foreach ($orderList as $k=>$v) {
$orderList[$k]['detail_url'] = url('detail',['id'=>$v['id']]);
$orderList[$k]['edit_url'] = url('edit',['id'=>$v['id']]);
$orderList[$k]['detail_url'] = url('detail',['id'=>$sort_id,'order_id'=>$v['id']]);
$orderList[$k]['edit_url'] = url('edit',['id'=>$sort_id,'order_id'=>$v['id']]);
$orderList[$k]['create_time'] = date('Y-m-d',$v['create_time']);
}
$this->success('成功',strtotime($date),$orderList);
... ...
... ... @@ -121,8 +121,16 @@ class LoginController extends HomeBaseController
$where = [
'delete_time' => 0
];
$list = [];
$babyList = $baby_model->where($where)->select();
$this->assign('babyList',$babyList);
foreach ($babyList as $kg=>$vg) {
$info = [
'label' => $vg['age'],
'value' => $vg['id']
];
$list[] = $info;
}
$this->assign('babyList',json_encode($list));
return $this->fetch(':choose');
} else {
return redirect($this->request->root() . '/');
... ...
... ... @@ -149,6 +149,17 @@
var start_time = $('input[name=start_time]').val();
var end_time = $('input[name=end_time]').val();
var param = '/excel/1';
var ids = [];
$('.js-check').each(function(index,element) {
if($(this).prop('checked') == true) {
ids.push($(this).val());
}
});
console.log(ids);
if(ids.length>0) {
ids = ids.join(',');
param += '/ids/' + ids;
}
if(sort_id.length > 0) {
param += '/sort_id/'+sort_id;
}
... ...
... ... @@ -13,6 +13,12 @@
<option value="{$vo.id}" <eq name="chan" value="$vo['id']">selected</eq>>{$vo.name}</option>
</volist>
</select> &nbsp;&nbsp;
导出状态:
<select class="form-control" name="is_excel" style="width: 140px;">
<option value="-1">请选择</option>
<option value="0" <eq name="is_excel" value="0">selected</eq>>未导出</option>
<option value="1" <eq name="is_excel" value="1">selected</eq>>已导出</option>
</select>&nbsp; &nbsp;
时间:
<input type="text" class="form-control js-bootstrap-datetime" name="start_time"
value="{$start_time|default=''}"
... ... @@ -53,6 +59,7 @@
<th>家长身份</th>
<th>是否为巧虎会员</th>
<th>注册渠道</th>
<th>导出状态</th>
<th>上次登录ip</th>
<th>上次登录时间</th>
<th width="130">添加时间</th>
... ... @@ -73,6 +80,7 @@
<td>{$vo.parent_status}</td>
<td><eq name="vo.is_member" value="0"></eq><eq name="vo.is_member" value="1"></eq></td>
<td><empty name="vo.channel_name">站内<else/>{$vo.channel_name}</empty></td>
<td><eq name="vo.is_excel" value="0">未导出</eq><eq name="vo.is_excel" value="1">已导出</eq></td>
<td>{$vo.last_login_ip}</td>
<td>{:date('Y-m-d H:i',$vo.last_login_time)}</td>
<td>{:date('Y-m-d H:i',$vo.create_time)}</td>
... ... @@ -94,6 +102,7 @@
<th>家长身份</th>
<th>是否为巧虎会员</th>
<th>注册渠道</th>
<th>导出状态</th>
<th>上次登录ip</th>
<th>上次登录时间</th>
<th width="130">添加时间</th>
... ... @@ -120,15 +129,29 @@
var url2 = url1.split('.',5);
var channel = $('select[name=channel]').val();
var keyword = $('input[name=keyword]').val();
var is_excel = $('select[name=is_excel]').val();
var start_time = $('input[name=start_time]').val();
var end_time = $('input[name=end_time]').val();
var param = '';
var ids = [];
$('.js-check').each(function(index,element) {
if($(this).prop('checked') == true) {
ids.push($(this).val());
}
});
if(ids.length>0) {
ids = ids.join(',');
param += '/ids/' + ids;
}
if(channel.length > 0) {
param += '/channel/'+channel;
}
if(keyword.length > 0) {
param += '/keyword/'+keyword;
}
if(is_excel.length > 0) {
param += '/is_excel/'+is_excel;
}
if(start_time.length > 0) {
param += '/start_time/'+start_time;
}
... ...
... ... @@ -92,7 +92,8 @@
$('.choose_time').html(`<i class="iconfont icon-rili"></i>${birthday}`);
var date = result[0].value + '-' + result[1].value + '-' + result[2].value;
var data = {
date: date
date: date,
sort_id: "{$sort_id}"
};
$.ajax({
url: "{:url('choosetime_detail')}",
... ... @@ -142,15 +143,15 @@
id: 'datePicker'
});
});
$('.change_btn').click(function(event){
$('.deal_list').on('click','.change_btn',function(event){
event.stopPropagation();
location.href = $(this).data('href');
});
$('.list_style').click(function(){
$('.deal_list').on('click','.list_style',function(){
event.stopPropagation();
location.href = $(this).data('href');
});
$('.write_order').click(function(){
$('.deal_list').on('click','.write_order',function(){
location.href = "{$orderUrl}";
});
</script>
... ...
... ... @@ -10,7 +10,9 @@
<link rel="stylesheet" type="text/css" href="__TMPL__/public/mobile/css/pay/order_style.css" />
<title>选择订单类型</title>
<style type="text/css">
.container {
height: 100%;
}
</style>
</head>
... ...
... ... @@ -10,6 +10,12 @@
<link rel="stylesheet" type="text/css" href="__TMPL__/public/mobile/css/augly.css" />
<title>选择年龄</title>
<style type="text/css">
.container {
height: 100%;
}
.input_num {
position: relative;
}
.input_num p {
font-size: 0.3rem;
margin-left: 0.4rem;
... ... @@ -49,11 +55,13 @@
</div>
<div class="input_num">
<p>宝宝年龄</p>
<select name="baby_age" class="input_text">
<volist name="babyList" id="vo">
<option value="{$vo.id}">{$vo.age}</option>
</volist>
</select>
<input type="text" name="baby_age" id="age" value="" readonly class="input_text" placeholder="请选择宝宝年龄" />
<img src="__TMPL__/public/mobile/images/youjiantou.png" class="jiantou" />
<!--<select name="baby_age" class="input_text">-->
<!--<volist name="babyList" id="vo">-->
<!--<option value="{$vo.id}">{$vo.age}</option>-->
<!--</volist>-->
<!--</select>-->
<!--<input type="text" name="" id="age" value="" class="input_text" placeholder="7~35月龄" />-->
<!--<img src="__TMPL__/public/mobile/images/youjiantou.png" class="jiantou" />-->
</div>
... ... @@ -87,9 +95,29 @@
// id: 'datePicker'
// });
// })
var age_id = '';
$('#age').click(function() {
var babyList = JSON.parse(`{$babyList}`);
weui.picker(babyList, {
onChange: function(result) {
console.log(result);
},
onConfirm: function(result) {
$('#age').val(result[0].label);
age_id = result[0].value;
console.log(result);
},
id: 'multiPickerBtn'
});
});
$('.btn').click(function(){
if($('#age').val() == '') {
_error('请选择宝宝年龄');
return false;
}
var data = {
id: $('select[name=baby_age]').val()
id: age_id
};
$.ajax({
url: "{:url('user/Login/chooseSubmit')}",
... ... @@ -107,6 +135,7 @@
});
// 弹窗提示
var popup_switch = true;
function _error(test) {
if(popup_switch) {
popup_switch = false;
... ...