Commit 62c98c75 by 朱继来

fix conflicts

parents 47b47c2a 18446595
<?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
......@@ -80,10 +80,10 @@ li {
.shipping-info select {
width: 150px;
}
.shipping-info textarea {
/*.shipping-info textarea {
width: 300px;
height: 100px;
}
}*/
.order-amount select, .order-invoice select, #inv_shipping_id{
height: 28px;
......
......@@ -72,7 +72,7 @@
time_start = $('input[name="time_start"]').val(),
time_end = $('input[name="time_end"]').val(),
// 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(),
shipping_name = $('#shipping_name').data('default'),
order_send = $('#order_send').val(),
......@@ -81,7 +81,7 @@
order_source_ptag = $('input[name="order_source_ptag"]').val(),
test_order = $('input[name=test_order]'),
erp_order_id = $('#erp_order_id').data('default'),
is_new = $('#is_new').data('default'),
is_new = $('#is_new').val(),
listUrl = '/list';
listUrl += '?order_type=' + order_type;
......@@ -138,7 +138,7 @@
listUrl += '&erp_order_id=' + erp_order_id;
}
if (is_new !== '') {
if (is_new) {
listUrl += '&is_new=' + is_new;
}
......@@ -160,15 +160,16 @@
time_start = $('input[name="time_start"]').val(),
time_end = $('input[name="time_end"]').val(),
// 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(),
shipping_name = $('#shipping_name').data('default'),
order_send = $('#order_send').val(),
order_source_pf = $('#order_source_pf').data('default'),
order_source_adtag = $('input[name="order_source_adtag"]').val(),
order_source_ptag = $('input[name="order_source_ptag"]').val(),
erp_order_id = $('#erp_order_id').data('default'),
test_order = $('input[name=test_order]');
order_source_ptag = $('input[name="order_source_ptag"]').val(),
erp_order_id = $('#erp_order_id').data('default'),
test_order = $('input[name=test_order]'),
is_new = $('#is_new').val() ? $('#is_new').val() : '';
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')) {
......@@ -200,7 +201,7 @@
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;
})
// 选择查看测试订单
......
......@@ -13,7 +13,7 @@
time_end = $('input[name="time_end"]').val(),
order_status = $('#order_status').data('default'),
sale_type = $('#sale_type').data('default'),
order_send = $('#order_send').data('default'),
// order_send = $('#order_send').data('default'),
order_source_pf = $('#order_source_pf').data('default'),
order_payment_mode = $('#order_payment_mode').data('default'),
order_invoice_status = $('#order_invoice_status').data('default'),
......@@ -49,9 +49,9 @@
listUrl += '&sale_type=' + sale_type;
}
if (order_send) {
listUrl += '&order_send=' + order_send;
}
// if (order_send) {
// listUrl += '&order_send=' + order_send;
// }
if (order_source_pf) {
listUrl += '&order_source_pf=' + order_source_pf;
......@@ -81,7 +81,7 @@
listUrl += '&test_order=' + 1;
}
if (!order_contain && !time_start && !time_end && !order_payment_mode && !order_status && !sale_type && !order_invoice_status && !order_send && !order_source_pf && !order_source_adtag && !order_source_ptag && (is_new === '') && !test_order.is(':checked')) {
if (!order_contain && !time_start && !time_end && !order_payment_mode && !order_status && !sale_type && !order_invoice_status && !order_source_pf && !order_source_adtag && !order_source_ptag && (is_new === '') && !test_order.is(':checked')) {
listUrl = '/self_order';
}
......@@ -96,7 +96,7 @@
time_end = $('input[name="time_end"]').val(),
order_status = $('#order_status').data('default'),
sale_type = $('#sale_type').data('default'),
order_send = $('#order_send').data('default'),
// order_send = $('#order_send').data('default'),
order_source_pf = $('#order_source_pf').data('default'),
order_payment_mode = $('#order_payment_mode').data('default'),
order_invoice_status = $('#order_invoice_status').data('default'),
......@@ -105,12 +105,12 @@
test_order = $('input[name=test_order]');
if (test_order.length) {
if (!order_contain && !time_start && !time_end && !order_payment_mode && !order_status && !sale_type && !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 && !sale_type && !order_invoice_status && !order_source_pf && !order_source_adtag && !order_source_ptag && !test_order.is(':checked')) {
layer.msg('请选择筛选条件,再导出!');
return false;
}
} else {
if (!order_contain && !time_start && !time_end && !order_payment_mode && !order_status && !sale_type && !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 && !sale_type && !order_invoice_status && !order_source_pf && !order_source_adtag && !order_source_ptag) {
layer.msg('请选择筛选条件,再导出!');
return false;
}
......@@ -130,7 +130,7 @@
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+'&sale_type='+sale_type+'&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+'&sale_type='+sale_type+'&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;
})
// 选择查看测试订单
......@@ -190,6 +190,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);
}
})
})
}
}
});
......
......@@ -19,30 +19,41 @@
<div class="tabs-box shipping-info">
<form action="{{URL('changeShipping')}}" method="POST">
<input type="hidden" name="order_id" value="{{$detail['order_id']}}">
<table class="table">
<table class="table table-hover table-bordered">
<caption><h3>订单物流信息</h3></caption>
<tr>
<td>收货人</td>
<th width="10%">配送方式</th>
<td colspan="3">
<label class="radio-inline">
<input type="radio" name="shipping_type" class="shipping_type" value="1"> 快递配送
</label>
<label class="radio-inline">
<input type="radio" name="shipping_type" class="shipping_type" value="2"> 上门自提
</label>
</td>
</tr>
<tr>
<th width="10%">收货人</th>
<td><input type="text" name="consignee" value="{{$detail['consignee']}}"></td>
<td>联系电话</td>
<th width="10%">联系电话</th>
<td><input type="text" name="mobile" value="{{$detail['mobile']}}"></td>
</tr>
<tr class="address-info">
<td>收货地址</td>
<td><select class="address s_province" name="province" default="{{$detail['province']}}"></select></td>
<td><select class="address s_city" name="city" default="{{$detail['city']}}"></select></td>
<td><select class="address s_county" name="district" default="{{$detail['district']}}"></select></td>
<th width="10%">收货地址</th>
<td colspan="3">
<select class="address s_province" name="province" default="{{$detail['province']}}"></select>
<select class="address s_city" name="city" default="{{$detail['city']}}"></select>
<select class="address s_county" name="district" default="{{$detail['district']}}"></select>
</td>
</tr>
<tr>
<td>详细地址</td>
<td colspan="3"><textarea name="address" placeholder="请输入详细地址">{{$detail['address']}}</textarea></td>
<th width="10%">详细地址</th>
<td colspan="3"><textarea class="form-control" name="address" placeholder="请输入详细地址">{{$detail['address']}}</textarea></td>
</tr>
<tr>
<td><input type="submit" value="保存" class="btn btn-success"></td>
<td></td>
<td></td>
<td></td>
<td colspan="4"><input type="submit" value="保存" class="btn btn-success"></td>
</tr>
</table>
</form>
......@@ -52,6 +63,35 @@
<script>
var tags = "{{isset($_REQUEST['tags']) ? $_REQUEST['tags'] : ''}}";
var shipping_type = "{{isset($order_info) ? $order_info['order_shipping_type'] : 1}}";
var goods_type = "{{isset($order_info) ? $order_info['order_goods_type'] : 1}}";
$('.shipping_type').each(function() {
if ($(this).val() == shipping_type) {
$(this).attr('checked', true);
}
})
// 自提时隐藏省市区
if (shipping_type == 2) {
$('.address-info').hide();
}
if (goods_type == 2) {
var self_addr = '深圳市光明新区新湖街道楼村社区荔都路32号A栋三楼';
} else {
var self_addr = '深圳市龙岗区坂田五和大道南2号万科星火online六栋三楼猎芯科技';
}
$('.shipping_type').change(function() {
if ($(this).val() == 2) {
$('.address-info').hide();
$('textarea[name=address]').val(self_addr).attr('disabled', true);
} else {
$('.address-info').show();
$('textarea[name=address]').val('').attr('disabled', false);
}
})
$.lie.order.details();
</script>
\ No newline at end of file
......@@ -182,7 +182,7 @@
<a href="/changeShipping/{{$order_info['order_id']}}" class="btn btn-success btn-sm changeBtn">更改收货地址</a>
@endif
@elseif (isset($_REQUEST['tags']) && $_REQUEST['tags'] == 'self')
@if (in_array($order_info['status'], array(2, 4)) && in_array('self_order_update_address', $userPerms))
@if (in_array($order_info['status'], array(1, 2, 4)) && in_array('self_order_update_address', $userPerms))
<a href="/changeShipping/{{$order_info['order_id']}}?tags={{$_REQUEST['tags']}}" class="btn btn-success btn-sm changeBtn">更改收货地址</a>
@endif
@elseif (isset($_REQUEST['tags']) && $_REQUEST['tags'] == 'erp')
......
......@@ -41,28 +41,25 @@
<dt>订单状态:</dt>
<dd>
<select id="order_status" name="order_status" class="form-control order_status selectpicker" title="全部" multiple>
<option class="order_status" value="-1">已取消</option>
<option class="order_status" value="1">待审核</option>
<option class="order_status" value="2">待付款</option>
<option class="order_status" value="3">待付尾款</option>
<option class="order_status" value="4">待发货</option>
<option class="order_status" value="7">部分发货</option>
<option class="order_status" value="8">待收货</option>
<option class="order_status" value="10">交易成功</option>
<option value="-1">已取消</option>
<option value="1">待审核</option>
<option value="2">待付款</option>
<option value="3">待付尾款</option>
<option value="4">待发货</option>
<option value="7">部分发货</option>
<option value="8">待收货</option>
<option value="10">交易成功</option>
</select>
</dd>
</dl>
<dl>
<dt>付款类型:</dt>
<dd style="width: 115px;">
<div class="droplist" data-default="{{$condition['order_pay_type']}}" id="order_pay_type" name="order_pay_type" >
<ul class="dropdown-menu">
<li data-val="" class="active">全部</li>
<li data-val="1">全款</li>
<li data-val="2">预付款</li>
<li data-val="3">账期</li>
</ul>
</div>
<select id="order_pay_type" name="order_pay_type" class="form-control order_pay_type selectpicker" title="全部" multiple>
<option value="1">全款</option>
<option value="2">预付款</option>
<option value="3">账期</option>
</select>
</dd>
</dl>
<dl>
......@@ -82,6 +79,7 @@
<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">
<option value="">全部</option>
<option value="0">无推送</option>
<optgroup label="在职">
@foreach ($sale_list as $v)
@if ($v->status != 4)
......@@ -151,14 +149,19 @@
<dl>
<dt>用户标签:</dt>
<dd>
<div class="droplist" data-default="{{$condition['is_new']}}" name="is_new" id="is_new">
<ul class="dropdown-menu">
<li data-val="" class="active">全部</li>
<li data-val="0">用户</li>
<li data-val="1">新客户</li>
<li data-val="2">老客户</li>
</ul>
</div>
<select id="is_new" name="is_new" class="form-control is_new selectpicker" title="全部" multiple>
<option value="0">用户</option>
<option value="1">新客户</option>
<option value="2">老客户</option>
</select>
<!-- <div class="droplist" data-default="{{$condition['is_new']}}" name="is_new" id="is_new">
<ul class="dropdown-menu">
<li data-val="" class="active">全部</li>
<li data-val="0">用户</li>
<li data-val="1">新客户</li>
<li data-val="2">老客户</li>
</ul>
</div> -->
</dd>
</dl>
......@@ -500,7 +503,9 @@
<script>
var test_order = "{{$condition['test_order']}}";
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) {
$('input[name=test_order]').attr('checked', true);
......@@ -516,6 +521,8 @@
$('.order_status').selectpicker('val', order_status.split(',')).trigger("change");
$('#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();
......
......@@ -40,6 +40,7 @@
<ul class="dropdown-menu">
<li data-val="" class="active">全部</li>
<li data-val="-1">已取消</li>
<li data-val="1">待审核</li>
<li data-val="2">待付款</li>
<li data-val="4">待发货</li>
<li data-val="8">待收货</li>
......@@ -149,7 +150,7 @@
<dl>
<dt></dt>
<dd>
<input type="checkbox" name="test_order"> 所有订单-包括测试
<label><input type="checkbox" name="test_order"> 所有订单-包括测试</label>
</dd>
</dl>
@endif
......@@ -267,6 +268,10 @@
@if (in_array('self_order_download_contract', $userPerms))
<a class="btn btn-default download-contract" data-id="{{$v['order_id']}}" href="javascript:;">下载合同</a>
@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>
</td>
</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