Commit b2f94467 by 朱继来

Merge branch 'zjl_iteration_20190916' into development

parents 397fb35f 399e1d56
...@@ -252,7 +252,7 @@ class CronController extends Controller ...@@ -252,7 +252,7 @@ class CronController extends Controller
* *
* 条件:前一天注册,未下单的用户或下单未支付一笔订单的用户 * 条件:前一天注册,未下单的用户或下单未支付一笔订单的用户
* *
* 推送时间:每天上午10点 (0 10 * * * /usr/bin/curl http://order.ichunt.net/act/useramoumt) * 推送时间:每天上午10点 (0 10 * * * /usr/bin/curl http://order.ichunt.net/act/sendactmsg)
*/ */
public function sendActMsg() public function sendActMsg()
{ {
......
...@@ -400,6 +400,8 @@ Class OrderController extends Controller ...@@ -400,6 +400,8 @@ Class OrderController extends Controller
// 页面参数 // 页面参数
$map['order_type'] = $request->input('order_type', ''); $map['order_type'] = $request->input('order_type', '');
$map['order_contain'] = $request->input('order_contain', ''); $map['order_contain'] = $request->input('order_contain', '');
$map['order_sn'] = $request->input('order_sn', '');
$map['goods_name'] = $request->input('goods_name', '');
$map['time_start'] = $request->input('time_start', ''); $map['time_start'] = $request->input('time_start', '');
$map['time_end'] = $request->input('time_end', ''); $map['time_end'] = $request->input('time_end', '');
$map['order_status'] = $request->input('order_status', ''); $map['order_status'] = $request->input('order_status', '');
...@@ -415,7 +417,7 @@ Class OrderController extends Controller ...@@ -415,7 +417,7 @@ Class OrderController extends Controller
$map['order_source_ptag'] = $request->input('order_source_ptag', ''); $map['order_source_ptag'] = $request->input('order_source_ptag', '');
$map['erp_order_id'] = $request->input('erp_order_id', ''); $map['erp_order_id'] = $request->input('erp_order_id', '');
$map['order_payment_mode'] = $request->input('order_payment_mode', ''); $map['order_payment_mode'] = $request->input('order_payment_mode', '');
$map['order_invoice_status']= $request->input('order_invoice_status', ''); $map['order_invoice_status'] = $request->input('order_invoice_status', '');
$map['is_new'] = $request->input('is_new', ''); $map['is_new'] = $request->input('is_new', '');
$map['is_new_order'] = $request->input('is_new_order', ''); $map['is_new_order'] = $request->input('is_new_order', '');
$map['business_type'] = $request->input('business_type', ''); $map['business_type'] = $request->input('business_type', '');
......
...@@ -29,6 +29,8 @@ class OrderModel extends Model ...@@ -29,6 +29,8 @@ class OrderModel extends Model
if ($request->isMethod('get')) { if ($request->isMethod('get')) {
$map['order_type'] = $request->input('order_type', ''); $map['order_type'] = $request->input('order_type', '');
$map['order_contain'] = $request->input('order_contain', ''); $map['order_contain'] = $request->input('order_contain', '');
$map['order_sn'] = $request->input('order_sn', '');
$map['goods_name'] = $request->input('goods_name', '');
$map['time_start'] = $request->input('time_start', ''); $map['time_start'] = $request->input('time_start', '');
$map['time_end'] = $request->input('time_end', ''); $map['time_end'] = $request->input('time_end', '');
$map['order_status'] = $request->input('order_status', ''); $map['order_status'] = $request->input('order_status', '');
...@@ -80,24 +82,32 @@ class OrderModel extends Model ...@@ -80,24 +82,32 @@ class OrderModel extends Model
->where(function ($query) use ($map) { ->where(function ($query) use ($map) {
// 查询类型 // 查询类型
if (!empty($map['order_contain'])) { if (!empty($map['order_contain'])) {
if ($map['order_type'] == 1) { // 会员账号 if ($map['order_type'] == 3) { // 发票抬头
$query->where('i.tax_title', '=', $map['order_contain']);
} else if($map['order_type'] == 4) { // 会员ID
$query->where('o.user_id', '=', $map['order_contain']);
} else { // 会员账号
if (preg_match('/@/', $map['order_contain'])) { if (preg_match('/@/', $map['order_contain'])) {
$query->where('u.email', '=', $map['order_contain']); $query->where('u.email', '=', $map['order_contain']);
} else { } else {
$query->where('u.mobile', '=', $map['order_contain']); $query->where('u.mobile', '=', $map['order_contain']);
} }
} else if ($map['order_type'] == 2) { // 型号名称
$query->where('it.goods_name', '=', $map['order_contain']);
} else if ($map['order_type'] == 3) { // 发票抬头
$query->where('i.tax_title', '=', $map['order_contain']);
} else if($map['order_type'] == 4) {
$query->where('o.user_id', '=', $map['order_contain']);
} else { // 订单编号
$query->where('o.order_sn', '=', $map['order_contain']);
} }
} }
}) })
->where(function ($query) use ($map) { ->where(function ($query) use ($map) {
// 订单编号
if (!empty($map['order_sn'])) {
$query->whereIn('o.order_sn', explode(',', $map['order_sn']));
}
})
->where(function ($query) use ($map) {
// 型号
if (!empty($map['goods_name'])) {
$query->where('it.goods_name', '=', $map['goods_name']);
}
})
->where(function ($query) use ($map) {
// 创建时间 // 创建时间
if (!empty($map['time_start']) && !empty($map['time_end'])) { if (!empty($map['time_start']) && !empty($map['time_end'])) {
$query->whereBetween('o.create_time', [$map['time_start'], $map['time_end']]); $query->whereBetween('o.create_time', [$map['time_start'], $map['time_end']]);
......
...@@ -74,6 +74,8 @@ ...@@ -74,6 +74,8 @@
function orderListCommon(url, type) { // type-订单类型 function orderListCommon(url, type) { // type-订单类型
var order_type = $('#order_type').data('default'), var order_type = $('#order_type').data('default'),
order_contain = $('input[name=order_contain]').val(), order_contain = $('input[name=order_contain]').val(),
order_sn = $('input[name=order_sn]').val(),
goods_name = $('input[name=goods_name]').val(),
time_start = $('input[name="time_start"]').val(), time_start = $('input[name="time_start"]').val(),
time_end = $('input[name="time_end"]').val(), time_end = $('input[name="time_end"]').val(),
// order_type_a = $('#order_type_a').data('default'), // order_type_a = $('#order_type_a').data('default'),
...@@ -96,24 +98,24 @@ ...@@ -96,24 +98,24 @@
if (url == '/export') { if (url == '/export') {
if (type == 1) { // 联营 if (type == 1) { // 联营
if (test_order.length) { if (test_order.length) {
if (!order_contain && !time_start && !time_end && !order_pay_type && !order_status && !shipping_name && !order_send && !order_source_pf && !order_source_adtag && !order_source_ptag && !erp_order_id && !is_new && !is_new_order && !order_payment_mode && !test_order.is(':checked')) { if (!order_contain && !order_sn && !goods_name && !time_start && !time_end && !order_pay_type && !order_status && !shipping_name && !order_send && !order_source_pf && !order_source_adtag && !order_source_ptag && !erp_order_id && !is_new && !is_new_order && !order_payment_mode && !test_order.is(':checked')) {
layer.msg('请选择筛选条件,再导出!'); layer.msg('请选择筛选条件,再导出!');
return false; return false;
} }
} else { } else {
if (!order_contain && !time_start && !time_end && !order_pay_type && !order_status && !shipping_name && !order_send && !order_source_pf && !order_source_adtag && !order_source_ptag && !erp_order_id && !is_new && !is_new_order && !order_payment_mode) { if (!order_contain && !order_sn && !goods_name && !time_start && !time_end && !order_pay_type && !order_status && !shipping_name && !order_send && !order_source_pf && !order_source_adtag && !order_source_ptag && !erp_order_id && !is_new && !is_new_order && !order_payment_mode) {
layer.msg('请选择筛选条件,再导出!'); layer.msg('请选择筛选条件,再导出!');
return false; return false;
} }
} }
} else { // 自营 } else { // 自营
if (test_order.length) { if (test_order.length) {
if (!order_contain && !time_start && !time_end && !order_pay_type && !order_payment_mode && !order_status && !sale_type && !order_invoice_status && !order_source_pf && !order_source_adtag && !order_source_ptag && !is_new && !business_type && !test_order.is(':checked')) { if (!order_contain && !order_sn && !goods_name && !time_start && !time_end && !order_pay_type && !order_payment_mode && !order_status && !sale_type && !order_invoice_status && !order_source_pf && !order_source_adtag && !order_source_ptag && !is_new && !business_type && !test_order.is(':checked')) {
layer.msg('请选择筛选条件,再导出!'); layer.msg('请选择筛选条件,再导出!');
return false; return false;
} }
} else { } else {
if (!order_contain && !time_start && !time_end && !order_pay_type && !order_payment_mode && !order_status && !sale_type && !order_invoice_status && !order_source_pf && !order_source_adtag && !order_source_ptag && !is_new && !business_type) { if (!order_contain && !order_sn && !goods_name && !time_start && !time_end && !order_pay_type && !order_payment_mode && !order_status && !sale_type && !order_invoice_status && !order_source_pf && !order_source_adtag && !order_source_ptag && !is_new && !business_type) {
layer.msg('请选择筛选条件,再导出!'); layer.msg('请选择筛选条件,再导出!');
return false; return false;
} }
...@@ -129,6 +131,14 @@ ...@@ -129,6 +131,14 @@
listUrl += '&order_contain=' + specialStr(order_contain); listUrl += '&order_contain=' + specialStr(order_contain);
} }
if (order_sn) {
listUrl += '&order_sn=' + order_sn;
}
if (goods_name) {
listUrl += '&goods_name=' + specialStr(goods_name);
}
if(time_start){ if(time_start){
time_start = Date.parse(time_start) / 1000; time_start = Date.parse(time_start) / 1000;
...@@ -506,31 +516,68 @@ ...@@ -506,31 +516,68 @@
} }
var content = '<div class="form-group">'+ var content = '<div class="form-group">'+
'<label>常见原因:</label>'+ '<label>附加费选项:</label>'+
'<div class="input-radio">'+ '<div class="input-radio">'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="测试订单">测试订单</label>'+ '<label class="radio-inline"><input type="radio" name="cancel_reason" value="产地税">产地税</label>'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="客户没需求">客户没需求</label>'+ '<label class="radio-inline"><input type="radio" name="cancel_reason" value="关税">关税</label>'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="审核太久">审核太久</label>'+ '<label class="radio-inline"><input type="radio" name="cancel_reason" value="3C商检">3C商检</label>'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="订单信息填错">订单信息填错</label>'+ '<label class="radio-inline"><input type="radio" name="cancel_reason" value="运费">运费</label>'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="需用优惠券">需用优惠券</label>'+
'</div>'+ '</div>'+
'</div>'+ '</div>'+
'<div class="form-group">'+ '<div class="form-group">'+
'<label>数据不准:</label>'+ '<label>信息错误需重新下单选项:</label>'+
'<div class="input-radio">'+ '<div class="input-radio">'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="库存不准">库存不准</label>'+ '<label class="radio-inline"><input type="radio" name="cancel_reason" value="更改客户基本信息">更改客户基本信息</label>'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="单价不准">单价不准</label>'+ '<label class="radio-inline"><input type="radio" name="cancel_reason" value="更改料号/数量/单价">更改料号/数量/单价</label>'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="批次不准">批次不准</label>'+ '<label class="radio-inline"><input type="radio" name="cancel_reason" value="更改支付方式">更改支付方式</label>'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="起订量不准">起订量不准</label>'+ '<label class="radio-inline"><input type="radio" name="cancel_reason" value="更改交易方式">更改交易方式</label>'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="更改使用优惠券">更改使用优惠券</label>'+
'</div>'+ '</div>'+
'</div>'+ '</div>'+
'<div class="form-group">'+ '<div class="form-group">'+
'<label>不接受附加费:</label>'+ '<label>不满足选项:</label>'+
'<div class="input-radio">'+ '<div class="input-radio">'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="有关税">有关税</label>'+ '<label class="radio-inline"><input type="radio" name="cancel_reason" value="交期问题">交期问题</label>'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="产地税">产地税</label>'+ '<label class="radio-inline"><input type="radio" name="cancel_reason" value="批次问题">批次问题</label>'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="商检费">商检费</label>'+ '<label class="radio-inline"><input type="radio" name="cancel_reason" value="包装问题">包装问题</label>'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="采购运费">采购运费</label>'+ '<label class="radio-inline"><input type="radio" name="cancel_reason" value="代购渠道不出货">代购渠道不出货</label>'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="价格无法满足">价格无法满足</label>'+
'</div>'+
'</div>'+
'<div class="form-group">'+
'<label>报关问题选项:</label>'+
'<div class="input-radio">'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="无法归类">无法归类</label>'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="禁运物料">禁运物料</label>'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="无法操作报关物料">无法操作报关物料</label>'+
'</div>'+
'</div>'+
'<div class="form-group">'+
'<label>代购渠道问题选项:</label>'+
'<div class="input-radio">'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="货已出">货已出</label>'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="库存不够">库存不够</label>'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="采购漏下单">采购漏下单</label>'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="供应商漏发货">供应商漏发货</label>'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="渠道涨价">渠道涨价</label>'+
'</div>'+
'</div>'+
'<div class="form-group">'+
'<label>客户问题选项:</label>'+
'<div class="input-radio">'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="客户找到更优货源">客户找到更优货源</label>'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="客户需求变动">客户需求变动</label>'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="客户测试">客户测试</label>'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="更改相关信息(支付方式,优惠券)">更改相关信息(支付方式,优惠券)</label>'+
'</div>'+
'</div>'+
'<div class="form-group">'+
'<label>非代购渠道选项:</label>'+
'<div class="input-radio">'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="价格上涨">价格上涨</label>'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="库存变动">库存变动</label>'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="订单审核过久">订单审核过久</label>'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="测试订单">测试订单</label>'+
'<label class="radio-inline"><input type="radio" name="cancel_reason" value="1">其他</label>'+ '<label class="radio-inline"><input type="radio" name="cancel_reason" value="1">其他</label>'+
'</div>'+ '</div>'+
...@@ -540,7 +587,7 @@ ...@@ -540,7 +587,7 @@
'</div>'; '</div>';
layer.open({ layer.open({
area: ['650px'], area: ['800px'],
title: title, title: title,
content: content, content: content,
btn:['确认', '取消'], btn:['确认', '取消'],
......
...@@ -18,16 +18,26 @@ ...@@ -18,16 +18,26 @@
<dd style="width:auto !important;"> <dd style="width:auto !important;">
<div class="droplist" data-default="{{$condition['order_type']}}" id="order_type" name="order_type"> <div class="droplist" data-default="{{$condition['order_type']}}" id="order_type" name="order_type">
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li class="order_type_tab active" data-val="">订单编号</li> <li class="order_type_tab" data-val="">会员账号</li>
<li class="order_type_tab" data-val="1">会员账号</li>
<li class="order_type_tab" data-val="4">会员ID</li> <li class="order_type_tab" data-val="4">会员ID</li>
<li class="order_type_tab" data-val="2">型号名称</li>
</ul> </ul>
</div> </div>
</dd> </dd>
<dd class="order_contain"><input type="text" name="order_contain" value="{{$condition['order_contain']}}" placeholder="请输入内容"></dd> <dd class="order_contain"><input type="text" name="order_contain" value="{{$condition['order_contain']}}" placeholder="请输入内容"></dd>
</dl> </dl>
<dl> <dl>
<dt>订单编号:</dt>
<dd>
<input type="text" name="order_sn" value="{{$condition['order_sn']}}" placeholder="请输入订单编号">
</dd>
</dl>
<dl>
<dt>型号名称:</dt>
<dd>
<input type="text" name="goods_name" value="{{$condition['goods_name']}}" placeholder="请输入型号名称">
</dd>
</dl>
<dl>
<dt>创建日期: </dt> <dt>创建日期: </dt>
<dd style="width:auto !important;"> <dd style="width:auto !important;">
<input type="text" name="time_start" value="{{ !empty($condition['time_start']) ? date('Y/m/d', $condition['time_start']) : '' }}" class="Wdate " onfocus="WdatePicker({dateFmt:'yyyy/MM/dd'})" placeholder="开始时间" autocomplete="off" /> <input type="text" name="time_start" value="{{ !empty($condition['time_start']) ? date('Y/m/d', $condition['time_start']) : '' }}" class="Wdate " onfocus="WdatePicker({dateFmt:'yyyy/MM/dd'})" placeholder="开始时间" autocomplete="off" />
...@@ -138,18 +148,6 @@ ...@@ -138,18 +148,6 @@
</dl> </dl>
@endif @endif
<dl>
<dt>adtag来源:</dt>
<dd>
<input type="text" name="order_source_adtag" value="{{$condition['order_source_adtag']}}" placeholder="请输入内容">
</dd>
</dl>
<dl>
<dt>ptag来源:</dt>
<dd>
<input type="text" name="order_source_ptag" value="{{$condition['order_source_ptag']}}" placeholder="请输入内容">
</dd>
</dl>
@if ($username != 'vpadmin@ichunt.com') @if ($username != 'vpadmin@ichunt.com')
<dl> <dl>
<dt>同步状态:</dt> <dt>同步状态:</dt>
...@@ -256,7 +254,18 @@ ...@@ -256,7 +254,18 @@
<td class="show-list"><?php print_r(App\Http\Controllers\getAccountName($v['user_id'])); ?></td> <td class="show-list"><?php print_r(App\Http\Controllers\getAccountName($v['user_id'])); ?></td>
<td class="show-list"> <td class="show-list">
@if ($v['order_type'] == 1) @if ($v['order_type'] == 1)
<p class="show-title" title="{{App\Http\Controllers\getCompanyName($v['order_id'], $v['user_id'])}}" style="width: 200px;">{{App\Http\Controllers\getCompanyName($v['order_id'], $v['user_id'])}}</p> <p class="show-title" title="{{App\Http\Controllers\getCompanyName($v['order_id'], $v['user_id'])}}" style="width: 200px;">
<?php
$company_name = App\Http\Controllers\getCompanyName($v['order_id'], $v['user_id']);
$mb_strlen = mb_strlen($company_name);
if ($mb_strlen > 8) {
echo mb_substr($company_name, 0, 8).'...'; // 截取8个字符
} else {
echo $company_name;
}
?>
</p>
@endif @endif
</td> </td>
<td class="show-list">{{$v['order_sn']}}</td> <td class="show-list">{{$v['order_sn']}}</td>
......
...@@ -18,10 +18,8 @@ ...@@ -18,10 +18,8 @@
<dd style="width:auto !important;"> <dd style="width:auto !important;">
<div class="droplist" data-default="{{$condition['order_type']}}" id="order_type" name="order_type"> <div class="droplist" data-default="{{$condition['order_type']}}" id="order_type" name="order_type">
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li class="order_type_tab active" data-val="">订单编号</li> <li class="order_type_tab" data-val="">会员账号</li>
<li class="order_type_tab" data-val="1">会员账号</li>
<li class="order_type_tab" data-val="4">会员ID</li> <li class="order_type_tab" data-val="4">会员ID</li>
<li class="order_type_tab" data-val="2">型号名称</li>
<li class="order_type_tab" data-val="3">发票抬头</li> <li class="order_type_tab" data-val="3">发票抬头</li>
</ul> </ul>
</div> </div>
...@@ -29,6 +27,18 @@ ...@@ -29,6 +27,18 @@
<dd class="order_contain"><input type="text" name="order_contain" value="{{$condition['order_contain']}}" placeholder="请输入内容"></dd> <dd class="order_contain"><input type="text" name="order_contain" value="{{$condition['order_contain']}}" placeholder="请输入内容"></dd>
</dl> </dl>
<dl> <dl>
<dt>订单编号:</dt>
<dd>
<input type="text" name="order_sn" value="{{$condition['order_sn']}}" placeholder="请输入订单编号">
</dd>
</dl>
<dl>
<dt>型号名称:</dt>
<dd>
<input type="text" name="goods_name" value="{{$condition['goods_name']}}" placeholder="请输入型号名称">
</dd>
</dl>
<dl>
<dt>创建日期: </dt> <dt>创建日期: </dt>
<dd style="width:auto !important;"> <dd style="width:auto !important;">
<input type="text" name="time_start" value="{{ !empty($condition['time_start']) ? date('Y/m/d', $condition['time_start']) : '' }}" class="Wdate " onfocus="WdatePicker({dateFmt:'yyyy/MM/dd'})" placeholder="开始时间" autocomplete="off" /> <input type="text" name="time_start" value="{{ !empty($condition['time_start']) ? date('Y/m/d', $condition['time_start']) : '' }}" class="Wdate " onfocus="WdatePicker({dateFmt:'yyyy/MM/dd'})" placeholder="开始时间" autocomplete="off" />
...@@ -245,7 +255,18 @@ ...@@ -245,7 +255,18 @@
</td> </td>
<td class="show-list"> <td class="show-list">
@if ($v['order_type'] == 1) @if ($v['order_type'] == 1)
<p class="show-title" title="{{App\Http\Controllers\getCompanyName($v['order_id'], $v['user_id'])}}" style="width: 200px;">{{App\Http\Controllers\getCompanyName($v['order_id'], $v['user_id'])}}</p> <p class="show-title" title="{{App\Http\Controllers\getCompanyName($v['order_id'], $v['user_id'])}}" style="width: 200px;">
<?php
$company_name = App\Http\Controllers\getCompanyName($v['order_id'], $v['user_id']);
$mb_strlen = mb_strlen($company_name);
if ($mb_strlen > 8) {
echo mb_substr($company_name, 0, 8).'...'; // 截取8个字符
} else {
echo $company_name;
}
?>
</p>
@endif @endif
</td> </td>
<td class="show-list">{{$v['order_sn']}}</td> <td class="show-list">{{$v['order_sn']}}</td>
......
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