Commit 2166b088 by 朱继来

fix

parent e4c815c6
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
use Request;
use Excel;
use DB;
class UserMainModel extends Model
{
protected $connection = 'order';
protected $table = 'lie_user_main';
protected $primaryKey = 'user_id';
public $timestamps = false;
// 测试帐号
public function testMobile()
{
$testId = array();
$user = $this->where(['is_test' => 1])->select('user_id')->get()->toArray();
foreach ($user as $k => $v) {
$testId[$k] = $v['user_id'];
}
return $testId;
}
}
\ No newline at end of file
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
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'),
order_pay_type = $('#order_pay_type').data('default'), order_pay_type = $('#order_pay_type').val(),
order_status = $('#order_status').val(), order_status = $('#order_status').val(),
shipping_name = $('#shipping_name').data('default'), shipping_name = $('#shipping_name').data('default'),
order_send = $('#order_send').val(), order_send = $('#order_send').val(),
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
order_source_ptag = $('input[name="order_source_ptag"]').val(), order_source_ptag = $('input[name="order_source_ptag"]').val(),
test_order = $('input[name=test_order]'), test_order = $('input[name=test_order]'),
erp_order_id = $('#erp_order_id').data('default'), erp_order_id = $('#erp_order_id').data('default'),
is_new = $('#is_new').data('default'), is_new = $('#is_new').val(),
listUrl = '/list'; listUrl = '/list';
listUrl += '?order_type=' + order_type; listUrl += '?order_type=' + order_type;
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
listUrl += '&erp_order_id=' + erp_order_id; listUrl += '&erp_order_id=' + erp_order_id;
} }
if (is_new !== '') { if (is_new) {
listUrl += '&is_new=' + is_new; listUrl += '&is_new=' + is_new;
} }
...@@ -160,15 +160,16 @@ ...@@ -160,15 +160,16 @@
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'),
order_pay_type = $('#order_pay_type').data('default'), order_pay_type = $('#order_pay_type').val() ? $('#order_pay_type').val() : '',
order_status = $('#order_status').val(), order_status = $('#order_status').val(),
shipping_name = $('#shipping_name').data('default'), shipping_name = $('#shipping_name').data('default'),
order_send = $('#order_send').val(), order_send = $('#order_send').val(),
order_source_pf = $('#order_source_pf').data('default'), order_source_pf = $('#order_source_pf').data('default'),
order_source_adtag = $('input[name="order_source_adtag"]').val(), order_source_adtag = $('input[name="order_source_adtag"]').val(),
order_source_ptag = $('input[name="order_source_ptag"]').val(), order_source_ptag = $('input[name="order_source_ptag"]').val(),
erp_order_id = $('#erp_order_id').data('default'), erp_order_id = $('#erp_order_id').data('default'),
test_order = $('input[name=test_order]'); test_order = $('input[name=test_order]'),
is_new = $('#is_new').val() ? $('#is_new').val() : '';
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 && !test_order.is(':checked')) { 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 && !test_order.is(':checked')) {
...@@ -200,7 +201,7 @@ ...@@ -200,7 +201,7 @@
test_order = ''; test_order = '';
} }
location.href = '/export?order_type='+order_type+'&order_contain='+order_contain+'&time_start='+time_start+'&time_end='+time_end+'&order_pay_type='+order_pay_type+'&order_status='+order_status+'&shipping_name='+shipping_name+'&order_send='+order_send+'&order_source_pf='+order_source_pf+'&order_source_adtag='+order_source_adtag+'&order_source_ptag='+order_source_ptag+'&erp_order_id='+erp_order_id+'&test_order='+test_order+'&order_goods_type='+1; location.href = '/export?order_type='+order_type+'&order_contain='+order_contain+'&time_start='+time_start+'&time_end='+time_end+'&order_pay_type='+order_pay_type+'&order_status='+order_status+'&shipping_name='+shipping_name+'&order_send='+order_send+'&order_source_pf='+order_source_pf+'&order_source_adtag='+order_source_adtag+'&order_source_ptag='+order_source_ptag+'&erp_order_id='+erp_order_id+'&test_order='+test_order+'&is_new='+is_new+'&order_goods_type='+1;
}) })
// 选择查看测试订单 // 选择查看测试订单
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
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_status = $('#order_status').data('default'), order_status = $('#order_status').data('default'),
order_send = $('#order_send').data('default'), // order_send = $('#order_send').data('default'),
order_source_pf = $('#order_source_pf').data('default'), order_source_pf = $('#order_source_pf').data('default'),
order_payment_mode = $('#order_payment_mode').data('default'), order_payment_mode = $('#order_payment_mode').data('default'),
order_invoice_status = $('#order_invoice_status').data('default'), order_invoice_status = $('#order_invoice_status').data('default'),
...@@ -44,9 +44,9 @@ ...@@ -44,9 +44,9 @@
listUrl += '&order_status=' + order_status; listUrl += '&order_status=' + order_status;
} }
if (order_send) { // if (order_send) {
listUrl += '&order_send=' + order_send; // listUrl += '&order_send=' + order_send;
} // }
if (order_source_pf) { if (order_source_pf) {
listUrl += '&order_source_pf=' + order_source_pf; listUrl += '&order_source_pf=' + order_source_pf;
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
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_status = $('#order_status').data('default'), order_status = $('#order_status').data('default'),
order_send = $('#order_send').data('default'), // order_send = $('#order_send').data('default'),
order_source_pf = $('#order_source_pf').data('default'), order_source_pf = $('#order_source_pf').data('default'),
order_payment_mode = $('#order_payment_mode').data('default'), order_payment_mode = $('#order_payment_mode').data('default'),
order_invoice_status = $('#order_invoice_status').data('default'), order_invoice_status = $('#order_invoice_status').data('default'),
...@@ -99,12 +99,12 @@ ...@@ -99,12 +99,12 @@
test_order = $('input[name=test_order]'); test_order = $('input[name=test_order]');
if (test_order.length) { if (test_order.length) {
if (!order_contain && !time_start && !time_end && !order_payment_mode && !order_status && !order_invoice_status && !order_send && !order_source_pf && !order_source_adtag && !order_source_ptag && !test_order.is(':checked')) { if (!order_contain && !time_start && !time_end && !order_payment_mode && !order_status && !order_invoice_status && !order_source_pf && !order_source_adtag && !order_source_ptag && !test_order.is(':checked')) {
layer.msg('请选择筛选条件,再导出!'); layer.msg('请选择筛选条件,再导出!');
return false; return false;
} }
} else { } else {
if (!order_contain && !time_start && !time_end && !order_payment_mode && !order_status && !order_invoice_status && !order_send && !order_source_pf && !order_source_adtag && !order_source_ptag) { if (!order_contain && !time_start && !time_end && !order_payment_mode && !order_status && !order_invoice_status && !order_source_pf && !order_source_adtag && !order_source_ptag) {
layer.msg('请选择筛选条件,再导出!'); layer.msg('请选择筛选条件,再导出!');
return false; return false;
} }
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
test_order = ''; test_order = '';
} }
location.href = '/export?order_type='+order_type+'&order_contain='+order_contain+'&time_start='+time_start+'&time_end='+time_end+'&order_payment_mode='+order_payment_mode+'&order_status='+order_status+'&order_invoice_status='+order_invoice_status+'&order_send='+order_send+'&order_source_pf='+order_source_pf+'&order_source_adtag='+order_source_adtag+'&order_source_ptag='+order_source_ptag+'&test_order='+test_order+'&order_goods_type='+2; location.href = '/export?order_type='+order_type+'&order_contain='+order_contain+'&time_start='+time_start+'&time_end='+time_end+'&order_payment_mode='+order_payment_mode+'&order_status='+order_status+'&order_invoice_status='+order_invoice_status+'&order_source_pf='+order_source_pf+'&order_source_adtag='+order_source_adtag+'&order_source_ptag='+order_source_ptag+'&test_order='+test_order+'&order_goods_type='+2;
}) })
// 选择查看测试订单 // 选择查看测试订单
...@@ -184,6 +184,72 @@ ...@@ -184,6 +184,72 @@
} }
}) })
}) })
// 填写订单取消原因
$('.input-cancel-reason').click(function(){
var self = $(this);
var order_id = self.data('oid');
var content = '<div class="form-group">'+
'<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="1">其他</label>'+
'</div>'+
'<div class="input-other-reason">'+
'<textarea class="form-control" name="input-other-reason" placeholder="请填写其他原因"></textarea>'+
'</div>'+
'</div>';
layer.open({
area: ['650px', '220px'],
title: '填写订单取消原因',
content: content,
btn:['确认', '取消'],
btn1:function(){
var cancel_reason = $('input[name=cancel_reason]:checked').val();
var other_reason = $('textarea[name=input-other-reason]').val();
if (cancel_reason == null) {
layer.tips('请选择取消原因', $('.input-radio'));
return false;
} else if (cancel_reason == 1) {
if (other_reason == '') {
layer.tips('请填写其他原因', $('.input-other-reason'));
return false;
} else {
cancel_reason = other_reason;
}
}
$.ajax({
url:'/ajaxInputCancelReason',
data: {order_id : order_id, cancel_reason:cancel_reason},
type:'post',
dataType: 'json',
success:function(resp){
if(resp.errcode == 0){
self.remove();
layer.msg(resp.errmsg);
layer.close();
} else {
layer.alert(resp.errmsg);
}
},
error:function(){
layer.alert('网络异常');
}
});
},
btn2:function(index){
layer.close(index);
}
})
})
} }
} }
}); });
......
...@@ -41,28 +41,25 @@ ...@@ -41,28 +41,25 @@
<dt>订单状态:</dt> <dt>订单状态:</dt>
<dd> <dd>
<select id="order_status" name="order_status" class="form-control order_status selectpicker" title="全部" multiple> <select id="order_status" name="order_status" class="form-control order_status selectpicker" title="全部" multiple>
<option class="order_status" value="-1">已取消</option> <option value="-1">已取消</option>
<option class="order_status" value="1">待审核</option> <option value="1">待审核</option>
<option class="order_status" value="2">待付款</option> <option value="2">待付款</option>
<option class="order_status" value="3">待付尾款</option> <option value="3">待付尾款</option>
<option class="order_status" value="4">待发货</option> <option value="4">待发货</option>
<option class="order_status" value="7">部分发货</option> <option value="7">部分发货</option>
<option class="order_status" value="8">待收货</option> <option value="8">待收货</option>
<option class="order_status" value="10">交易成功</option> <option value="10">交易成功</option>
</select> </select>
</dd> </dd>
</dl> </dl>
<dl> <dl>
<dt>付款类型:</dt> <dt>付款类型:</dt>
<dd style="width: 115px;"> <dd style="width: 115px;">
<div class="droplist" data-default="{{$condition['order_pay_type']}}" id="order_pay_type" name="order_pay_type" > <select id="order_pay_type" name="order_pay_type" class="form-control order_pay_type selectpicker" title="全部" multiple>
<ul class="dropdown-menu"> <option value="1">全款</option>
<li data-val="" class="active">全部</li> <option value="2">预付款</option>
<li data-val="1">全款</li> <option value="3">账期</option>
<li data-val="2">预付款</li> </select>
<li data-val="3">账期</li>
</ul>
</div>
</dd> </dd>
</dl> </dl>
<dl> <dl>
...@@ -82,6 +79,7 @@ ...@@ -82,6 +79,7 @@
<dd style="width: 115px;"> <dd style="width: 115px;">
<select id="order_send" name="order_send" class="form-control order_send selectpicker" title="全部" data-live-search="true" data-size="7"> <select id="order_send" name="order_send" class="form-control order_send selectpicker" title="全部" data-live-search="true" data-size="7">
<option value="">全部</option> <option value="">全部</option>
<option value="0">无推送</option>
<optgroup label="在职"> <optgroup label="在职">
@foreach ($sale_list as $v) @foreach ($sale_list as $v)
@if ($v->status != 4) @if ($v->status != 4)
...@@ -151,14 +149,19 @@ ...@@ -151,14 +149,19 @@
<dl> <dl>
<dt>用户标签:</dt> <dt>用户标签:</dt>
<dd> <dd>
<div class="droplist" data-default="{{$condition['is_new']}}" name="is_new" id="is_new"> <select id="is_new" name="is_new" class="form-control is_new selectpicker" title="全部" multiple>
<ul class="dropdown-menu"> <option value="0">用户</option>
<li data-val="" class="active">全部</li> <option value="1">新客户</option>
<li data-val="0">用户</li> <option value="2">老客户</option>
<li data-val="1">新客户</li> </select>
<li data-val="2">老客户</li> <!-- <div class="droplist" data-default="{{$condition['is_new']}}" name="is_new" id="is_new">
</ul> <ul class="dropdown-menu">
</div> <li data-val="" class="active">全部</li>
<li data-val="0">用户</li>
<li data-val="1">新客户</li>
<li data-val="2">老客户</li>
</ul>
</div> -->
</dd> </dd>
</dl> </dl>
...@@ -500,7 +503,9 @@ ...@@ -500,7 +503,9 @@
<script> <script>
var test_order = "{{$condition['test_order']}}"; var test_order = "{{$condition['test_order']}}";
var order_status = "{{$condition['order_status']}}"; var order_status = "{{$condition['order_status']}}";
var order_send = "{{$condition['order_send']}}"; var order_send = "{{$condition['order_send']}}";
var order_pay_type = "{{$condition['order_pay_type']}}";
var is_new = "{{$condition['is_new']}}";
if (test_order) { if (test_order) {
$('input[name=test_order]').attr('checked', true); $('input[name=test_order]').attr('checked', true);
...@@ -516,6 +521,8 @@ ...@@ -516,6 +521,8 @@
$('.order_status').selectpicker('val', order_status.split(',')).trigger("change"); $('.order_status').selectpicker('val', order_status.split(',')).trigger("change");
$('#order_send').selectpicker('val', order_send); $('#order_send').selectpicker('val', order_send);
$('.order_pay_type').selectpicker('val', order_pay_type.split(',')).trigger("change");
$('.is_new').selectpicker('val', is_new.split(',')).trigger("change");
$.lie.order.index(); $.lie.order.index();
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li data-val="" class="active">全部</li> <li data-val="" class="active">全部</li>
<li data-val="-1">已取消</li> <li data-val="-1">已取消</li>
<li data-val="1">待审核</li>
<li data-val="2">待付款</li> <li data-val="2">待付款</li>
<li data-val="4">待发货</li> <li data-val="4">待发货</li>
<li data-val="8">待收货</li> <li data-val="8">待收货</li>
...@@ -134,7 +135,7 @@ ...@@ -134,7 +135,7 @@
<dl> <dl>
<dt></dt> <dt></dt>
<dd> <dd>
<input type="checkbox" name="test_order"> 所有订单-包括测试 <label><input type="checkbox" name="test_order"> 所有订单-包括测试</label>
</dd> </dd>
</dl> </dl>
@endif @endif
...@@ -246,6 +247,10 @@ ...@@ -246,6 +247,10 @@
@if (in_array('self_order_download_contract', $userPerms)) @if (in_array('self_order_download_contract', $userPerms))
<a class="btn btn-default download-contract" data-id="{{$v['order_id']}}" href="javascript:;">下载合同</a> <a class="btn btn-default download-contract" data-id="{{$v['order_id']}}" href="javascript:;">下载合同</a>
@endif @endif
@if ($v['status'] == -1 && !$v['cancel_reason'])
<a class="btn btn-danger input-cancel-reason" href="javascript:;" data-oid="{{$v['order_id']}}">填写取消原因</a>
@endif
</div> </div>
</td> </td>
</tr> </tr>
......
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