Commit 4122ed9d by 朱继来

Merge branch 'master' of http://119.23.72.7/zhujilai/Order into zjl_order_msg_20180402

parents 43640a5b 39661fc2
...@@ -244,6 +244,7 @@ Class OrderController extends Controller ...@@ -244,6 +244,7 @@ Class OrderController extends Controller
// $map['order_pay_status'] = $request->input('order_pay_status', ''); // $map['order_pay_status'] = $request->input('order_pay_status', '');
$map['order_source_pf'] = $request->input('order_source_pf', ''); $map['order_source_pf'] = $request->input('order_source_pf', '');
$map['order_source_adtag'] = $request->input('order_source_adtag', ''); $map['order_source_adtag'] = $request->input('order_source_adtag', '');
$map['order_erp_syn'] = $request->input('order_erp_syn', '');
} }
// 若没有'查看线下订单'权限,则仅查看线上订单 // 若没有'查看线下订单'权限,则仅查看线上订单
...@@ -394,30 +395,11 @@ Class OrderController extends Controller ...@@ -394,30 +395,11 @@ Class OrderController extends Controller
$map['test_order'] = $request->input('test_order', ''); $map['test_order'] = $request->input('test_order', '');
$map['order_pay_type'] = $request->input('order_pay_type', ''); $map['order_pay_type'] = $request->input('order_pay_type', '');
$map['order_type_a'] = $request->input('order_type_a', ''); $map['order_type_a'] = $request->input('order_type_a', '');
// $map['order_pay_status'] = $request->input('order_pay_status', '');
$map['order_source_pf'] = $request->input('order_source_pf', ''); $map['order_source_pf'] = $request->input('order_source_pf', '');
$map['order_source_adtag'] = $request->input('order_source_adtag', ''); $map['order_source_adtag'] = $request->input('order_source_adtag', '');
$map['order_erp_syn'] = $request->input('order_erp_syn', '');
} }
// 订单查看权限
// switch ($info['role']) {
// case 2:
// // 经理:若没有'查看线下订单'权限,则仅查看线上订单
// if (!in_array('check_offline_order', $info['userPerms'])) {
// $map['online_order'] = 1;
// }
// break;
// case 3:
// // 交易员: 若没有'查看线下订单'权限,则仅查看线上订单
// if (!in_array('check_offline_order', $info['userPerms'])) {
// $map['online_order'] = 1;
// }
// // 筛选自己的订单
// $data['sale_id'] = $request->user->userId;
// break;
// }
// 若没有'查看线下订单'权限,则仅查看线上订单 // 若没有'查看线下订单'权限,则仅查看线上订单
if (!in_array('check_offline_order', $info['userPerms'])) { if (!in_array('check_offline_order', $info['userPerms'])) {
$map['online_order'] = 1; $map['online_order'] = 1;
...@@ -426,12 +408,6 @@ Class OrderController extends Controller ...@@ -426,12 +408,6 @@ Class OrderController extends Controller
/* 临时添加 所有人只能查看线上订单 */ /* 临时添加 所有人只能查看线上订单 */
$map['online_order'] = 1; $map['online_order'] = 1;
// 订单查看权限---交易员
if ($info['role'] == 3) {
// 筛选自己的订单
$data['sale_id'] = $request->user->userId;
}
// 格式 // 格式
$xlsCell = array( $xlsCell = array(
array('order_id', '订单ID'), array('order_id', '订单ID'),
...@@ -458,25 +434,228 @@ Class OrderController extends Controller ...@@ -458,25 +434,228 @@ Class OrderController extends Controller
$map['is_fake'] = 0; $map['is_fake'] = 0;
} }
//获取订单列表 $orderIds = array();
$url = Config('website.api_domain').'order/getAllOrder'; // 型号名称
if ($map['order_type'] == 2) {
$data['k1'] = time(); $goods = DB::connection('order')->table('lie_order_items')->where('goods_name', '=', $map['order_contain'])->select('order_id')->get();
$data['k2'] = md5(md5($data['k1']).'fh6y5t4rr351d2c3bryi');
$data['map'] = $map; if ($goods) {
$data['export'] = 1; // 导出数据 foreach ($goods as $v) {
$orderIds[] = $v->order_id;
}
}
}
$list = DB::connection('order')
->table('lie_order_items as it')
->leftJoin('lie_order as o', 'it.order_id', '=', 'o.order_id')
->leftJoin('lie_order_invoice as i', 'it.order_id', '=', 'i.order_id')
->leftJoin('lie_order_address as a', function($join) {
$join->on('it.order_id', '=', 'a.order_id')->where('a.address_type', '=', 1);
})
->leftJoin('lie_order_shipping as s', function($join) {
$join->on('it.order_id', '=', 's.order_id')->where('s.shipping_type', '=', 1);
})
->leftJoin('lie_user_main as u', 'it.user_id', '=', 'u.user_id')
->leftJoin('lie_user_company as c', 'it.user_id', '=', 'c.user_id')
->where(function ($query) use ($map, $orderIds) {
// 查询类型
if (!empty($map['order_contain'])) {
if ($map['order_type'] == 1) { // 订单编号
$query->where('o.order_sn', '=', $map['order_contain']);
} else if ($map['order_type'] == 2) { // 型号名称
$query->whereIn('o.order_id', $orderIds);
} else { // 会员账号
if (preg_match('/@/', $map['order_contain'])) {
$query->where('u.email', '=', $map['order_contain']);
} else {
$query->where('u.mobile', '=', $map['order_contain']);
}
}
}
})
->where(function ($query) use ($map) {
// 创建时间
if (!empty($map['time_start']) && !empty($map['time_end'])) {
$query->whereBetween('o.create_time', [$map['time_start'], $map['time_end']]);
} else if (!empty($map['time_start'])) {
$query->where('o.create_time', '>', $map['time_start']);
} else if (!empty($map['time_end'])) {
$query->where('o.create_time', '<', $map['time_end']);
}
})
->where(function ($query) use ($map) {
// 订单状态
if (!empty($map['order_status'])) {
$query->where('o.status', '=', $map['order_status']);
}
})
->where(function ($query) use ($map) {
// 配送方式
if (!empty($map['shipping_name'])) {
$query->where('o.order_shipping_type', '=', $map['shipping_name']);
}
})
->where(function ($query) use ($map) {
// 订单推送业务员
if (!empty($map['order_send'])) {
$query->where('o.sale_id', '=', $map['order_send']);
}
})
->where(function ($query) use ($map) {
// 订单类型
if (!empty($map['order_pay_type'])) {
$query->where('o.order_pay_type', '=', $map['order_pay_type']);
}
})
->where(function ($query) use ($map) {
// 测试订单
if (empty($map['test_order'])) {
$query->whereNotIn('o.user_id', $this->testMobile());
}
})
->where(function ($query) use ($map) {
// 订单来源
if (!empty($map['order_source_pf'])) {
if ($map['order_source_pf'] == 1) {
$query->whereRaw("FIND_IN_SET('pf=1', o.order_source)");
} else {
$query->whereRaw("FIND_IN_SET('pf=2', o.order_source)");
}
}
})
->where(function ($query) use ($map) {
// adtags来源
if (!empty($map['order_source_adtag'])) {
$query->whereRaw('FIND_IN_SET("adtag='.$map['order_source_adtag'].'", o.order_source)');
}
})
->where(function ($query) use ($map) {
// 线上订单
if (isset($map['online_order'])) {
$query->where('o.order_type', '=', $map['online_order']);
}
})
->where(function ($query) use ($map) {
// 同步状态
if (!empty($map['order_erp_syn'])) {
$query->where('o.erp_syn', '=', $map['order_erp_syn']);
}
})
->where(function ($query) use ($map) {
// 竞调数据
if (isset($map['is_fake'])) {
$query->where('o.is_type', '=', $map['is_fake']);
}
})
->where('it.status', '<>', -1)
->select('it.goods_name', 'it.goods_number', 'it.goods_price', 'it.supplier_name', 'o.order_id', 'o.order_sn', 'o.order_pay_type', 'o.create_time', 'o.status', 'o.currency', 'o.sale_id', 'i.invoice_status', 'a.consignee', 's.status as shipping_status', 'u.user_id', 'u.mobile', 'u.email', 'c.com_name')
->groupBy('it.rec_id')
->orderBy('o.create_time', 'DESC')
->get();
$response = json_decode(curlApi($url, $data), true); if (!empty($list)) {
// 订单数据处理
$export = $this->exportList($list);
if(is_array($response['data'])){
$xlsName = '订单数据导出'; $xlsName = '订单数据导出';
$xlslist = exportExcel($xlsName, $xlsCell, $response['data']); $xlslist = exportExcel($xlsName, $xlsCell, $export);
$this->$xlslist; $this->$xlslist;
} else { } else {
return redirect('/prompt')->with(['message'=>"数据为空无法导出!",'url' =>$_SERVER['HTTP_REFERER'], 'jumpTime'=>3,'status'=>false]); return redirect('/prompt')->with(['message'=>"数据为空无法导出!",'url' =>$_SERVER['HTTP_REFERER'], 'jumpTime'=>3,'status'=>false]);
} }
} }
// 测试帐号
public function testMobile()
{
$testId = array();
$user = DB::connection('order')->table('lie_user_main')->select('user_id')->where(['is_test' => 1])->get();
foreach ($user as $k => $v) {
$testId[$k] = $v->user_id;
}
return $testId;
}
/**
* 导出到Excel
* @param [type] $order [查询出的订单数据]
* @return [type] [description]
*/
public function exportList($order)
{
// 订单类型
$order_type = array(
'1' => '全款',
'2' => '预付款',
'3' => '账期支付',
);
// 订单状态
$order_status = array(
'-1' => '已取消',
'1' => '待审核',
'2' => '待付款',
'3' => '待付尾款',
'4' => '待发货',
'7' => '部分发货',
'8' => '待收货',
'10' => '交易成功',
);
// 订单发货状态
$shipping_status = array(
'-1' => '未配送',
'1' => '配送中',
'2' => '已签',
);
// 发票状态
$invoice_status = array(
'-1' => '待确认',
'1' => '已开票',
'2' => '已发货',
'3' => '已签收',
);
$i = 0;
$tmp = array();
foreach ($order as $val) {
// 推送人
if ($val->sale_id) {
$sales = DB::table('user_info')->where(['userId' => $val->sale_id])->select('name')->first();
}
$tmp[$i]['order_id'] = $val->order_id;
$tmp[$i]['order_sn'] = $val->order_sn;
$tmp[$i]['user_account'] = $val->mobile ? $val->mobile : $val->email;
$tmp[$i]['consignee'] = isset($val->consignee) ? $val->consignee : '';
$tmp[$i]['create_time'] = date('Y-m-d H:i:s', $val->create_time);
$tmp[$i]['com_name'] = isset($val->com_name) ? $val->com_name : '';
$tmp[$i]['goods_name'] = $val->goods_name;
$tmp[$i]['goods_number'] = $val->goods_number;
$tmp[$i]['goods_price'] = $val->goods_price;
$tmp[$i]['order_amount'] = $val->goods_number * $val->goods_price;
$tmp[$i]['currency'] = $val->currency == 1 ? 'RMB' : 'USD';
$tmp[$i]['order_type'] = $order_type[$val->order_pay_type];
$tmp[$i]['order_status'] = $order_status[$val->status];
// 发货状态
$tmp[$i]['shipping_status'] = !empty($val->shipping_status) ? $shipping_status[$val->shipping_status] : '无发货信息';
$tmp[$i]['invoice_status'] = !empty($val->invoice_status) ? $invoice_status[$val->invoice_status] : '无发票信息'; // 发票状态
$tmp[$i]['company_name'] = $val->supplier_name;
$tmp[$i]['sale_name'] = isset($sales) ? $sales->name : ''; // 推送业务员
$i++;
}
return $tmp;
}
// 详情页 // 详情页
public function details(Request $request, $id) public function details(Request $request, $id)
{ {
...@@ -587,6 +766,32 @@ Class OrderController extends Controller ...@@ -587,6 +766,32 @@ Class OrderController extends Controller
} }
} }
// 人工审单后再次调价 --- 20180404
public function adjustPrice(Request $request, $id)
{
$info = $this->orderDetail($request, $id);
//总共允许2次调价(以点击审核按钮次数来统计)
if ($info['order_info']['adjust_count'] >= 2) {
return redirect('/prompt')->with(['message'=>"该订单无法再进行调价操作",'url' =>'/details/'.$id, 'jumpTime'=>3,'status'=>false]);
}
$data['confirm_time'] = 0;
$data['status'] = 1;
$data['sale_id'] = 0; // 再次调价调整sale_id
$update = DB::connection('order')
->table('lie_order')
->where('order_id', '=', $id)
->update($data);
if ($update) {
return redirect('/change/'.$id);
} else {
return redirect('/prompt')->with(['message'=>"调价操作更新数据失败!",'url' =>'/details/'.$id, 'jumpTime'=>3,'status'=>false]);
}
}
// 申请再次调价 // 申请再次调价
public function applyAdjust(Request $request, $id) public function applyAdjust(Request $request, $id)
{ {
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
/** 公用函数 */ /** 公用函数 */
//导出数据 //导出数据
//导出数据
function exportExcel($expTitle, $expCellName, $expTableData) function exportExcel($expTitle, $expCellName, $expTableData)
{ {
$xlsTitle = iconv('utf-8', 'gb2312', $expTitle);//文件名称 $xlsTitle = iconv('utf-8', 'gb2312', $expTitle);//文件名称
...@@ -13,6 +14,13 @@ ...@@ -13,6 +14,13 @@
$objPHPExcel = new PHPExcel(); $objPHPExcel = new PHPExcel();
include_once(__DIR__."/../../vendor/PHPExcel/PHPExcel/IOFactory.php"); include_once(__DIR__."/../../vendor/PHPExcel/PHPExcel/IOFactory.php");
set_time_limit(0);//不对php(主要是写数据)执行时间做限制
ini_set("memory_limit", "1024M");//设置内存(防爆内存)
$cacheMethod = \PHPExcel_CachedObjectStorageFactory::cache_in_memory_serialized;//设置缓存策略(减少内存占用)
//判断缓存策略是否可用
if (!\PHPExcel_Settings::setCacheStorageMethod($cacheMethod)) {
die($cacheMethod . " 缓存方法不可用" . EOL);
}
$cellName = array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','AA','AB','AC','AD','AE','AF','AG','AH','AI','AJ','AK','AL','AM','AN','AO','AP','AQ','AR','AS','AT','AU','AV','AW','AX','AY','AZ'); $cellName = array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','AA','AB','AC','AD','AE','AF','AG','AH','AI','AJ','AK','AL','AM','AN','AO','AP','AQ','AR','AS','AT','AU','AV','AW','AX','AY','AZ');
//显示导出名称和导出时间 //显示导出名称和导出时间
...@@ -29,9 +37,11 @@ ...@@ -29,9 +37,11 @@
} }
header('pragma:public'); header('pragma:public');
header('Content-type:application/vnd.ms-excel;charset=utf-8;name="'.$xlsTitle.'.xls"'); header('Content-type:application/vnd.ms-excel;charset=utf-8;name="'.$xlsTitle.'.csv"');
header("Content-Disposition:attachment;filename=$fileName.xls");//attachment新窗口打印inline本窗口打印 header("Content-Disposition:attachment;filename=$fileName.csv");//attachment新窗口打印inline本窗口打印
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); //输出bom
print(chr(0xEF).chr(0xBB).chr(0xBF));
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'CSV');
$objWriter->save('php://output'); $objWriter->save('php://output');
exit; exit;
} }
......
...@@ -44,6 +44,7 @@ Route::group(['middleware' => 'web'], function () { ...@@ -44,6 +44,7 @@ Route::group(['middleware' => 'web'], function () {
Route::match(['get', 'post'], '/applyAdjust/{id}', 'OrderController@applyAdjust'); Route::match(['get', 'post'], '/applyAdjust/{id}', 'OrderController@applyAdjust');
Route::match(['get', 'post'], '/send/{id}', 'OrderController@send'); Route::match(['get', 'post'], '/send/{id}', 'OrderController@send');
Route::post('/ajaxCheck', 'OrderController@ajaxCheck'); Route::post('/ajaxCheck', 'OrderController@ajaxCheck');
Route::match(['get', 'post'], '/adjustPrice/{id}', 'OrderController@adjustPrice');
Route::match(['get', 'post'], '/cancelPay/{id}', 'OrderController@cancelPay'); Route::match(['get', 'post'], '/cancelPay/{id}', 'OrderController@cancelPay');
Route::match(['get', 'post'], '/checkPay/{id}', 'OrderController@checkPay'); Route::match(['get', 'post'], '/checkPay/{id}', 'OrderController@checkPay');
Route::match(['get', 'post'], '/invShipping/{id}', 'OrderController@invShipping'); Route::match(['get', 'post'], '/invShipping/{id}', 'OrderController@invShipping');
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
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(),
test_order = $('input[name=test_order]'), test_order = $('input[name=test_order]'),
order_erp_syn = $('#order_erp_syn').data('default'),
listUrl = '/list'; listUrl = '/list';
listUrl += '?order_type=' + order_type; listUrl += '?order_type=' + order_type;
...@@ -75,11 +76,15 @@ ...@@ -75,11 +76,15 @@
listUrl += '&order_source_adtag=' + order_source_adtag; listUrl += '&order_source_adtag=' + order_source_adtag;
} }
if (order_erp_syn) {
listUrl += '&order_erp_syn=' + order_erp_syn;
}
if (test_order.is(':checked')) { if (test_order.is(':checked')) {
listUrl += '&test_order=' + 1; listUrl += '&test_order=' + 1;
} }
if (!order_contain && !time_start && !time_end && !order_pay_type && !order_status && !shipping_name && !order_send && !order_source_pf && !order_source_adtag && !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_erp_syn && !test_order.is(':checked')) {
listUrl = '/list'; listUrl = '/list';
} }
...@@ -99,15 +104,16 @@ ...@@ -99,15 +104,16 @@
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_source_adtag = $('input[name="order_source_adtag"]').val(), order_source_adtag = $('input[name="order_source_adtag"]').val(),
order_erp_syn = $('#order_erp_syn').data('default'),
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_pay_type && !order_status && !shipping_name && !order_send && !order_source_pf && !order_source_adtag && !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_erp_syn && !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) { if (!order_contain && !time_start && !time_end && !order_pay_type && !order_status && !shipping_name && !order_send && !order_source_pf && !order_source_adtag && !order_erp_syn) {
layer.msg('请选择筛选条件,再导出!'); layer.msg('请选择筛选条件,再导出!');
return false; return false;
} }
...@@ -127,7 +133,7 @@ ...@@ -127,7 +133,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+'&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_erp_syn='+order_erp_syn+'&test_order='+test_order;
}) })
// 选择查看测试订单 // 选择查看测试订单
......
...@@ -176,6 +176,10 @@ ...@@ -176,6 +176,10 @@
@if ($order_info['status'] == 2) @if ($order_info['status'] == 2)
<p>交易状态:&nbsp;审核通过,请联系客户及时付款!</p> <p>交易状态:&nbsp;审核通过,请联系客户及时付款!</p>
@if ($order_info['adjust_count'] < 2)
<a class="btn btn-default" href="{{URL('adjustPrice', ['order_id'=>$order_info['order_id']])}}">再次调价</a><span class="warn-tip">每笔订单仅有一次“再次调价”机会</span>
@endif
@endif @endif
@if ($order_info['status'] == -1) @if ($order_info['status'] == -1)
......
...@@ -409,11 +409,6 @@ ...@@ -409,11 +409,6 @@
@include('detail.invShipping') @include('detail.invShipping')
@endif @endif
<if condition="ACTION_NAME eq 'cancel'">
<!--取消订单-->
<include file="cancel"/>
</if>
@if ($action_name == 'cancelPay') @if ($action_name == 'cancelPay')
<!--取消订单 (支付前)--> <!--取消订单 (支付前)-->
@include('detail.cancelPay') @include('detail.cancelPay')
...@@ -429,16 +424,6 @@ ...@@ -429,16 +424,6 @@
@include('detail.check') @include('detail.check')
@endif @endif
<if condition="ACTION_NAME eq 'account'">
<!--账期设置-->
<include file="account"/>
</if>
<if condition="ACTION_NAME eq 'recovery'">
<!--账期设置-->
<include file="recovery"/>
</if>
<!-- 查看ERP订单详情时去掉操作按钮 --> <!-- 查看ERP订单详情时去掉操作按钮 -->
@if (!isset($_REQUEST['tags'])) @if (!isset($_REQUEST['tags']))
<!-- 人工审单时去掉操作按钮 --> <!-- 人工审单时去掉操作按钮 -->
...@@ -449,9 +434,9 @@ ...@@ -449,9 +434,9 @@
@if (($role == 1 || $role ==2) && $order_info['status'] == 1 && in_array('check_order', $userPerms)) @if (($role == 1 || $role ==2) && $order_info['status'] == 1 && in_array('check_order', $userPerms))
<a class="btn btn-success" href="{{URL('change', ['order_id'=>$order_info['order_id']])}}" class="btn btn-default">人工审单</a> <a class="btn btn-success" href="{{URL('change', ['order_id'=>$order_info['order_id']])}}" class="btn btn-default">人工审单</a>
@endif @endif
<!-- <a href="{:U('account', 'order_id='.$order_info['order_id'])}" class="btn btn-default">账期设置</a> -->
@if (($role == 1 || $role ==2) && in_array($order_info['status'], array(1, 2)) && in_array('check_order', $userPerms)) @if (($role == 1 || $role ==2) && $order_info['status'] == 2 && in_array('adjust_price', $userPerms))
<!-- <a href="{{URL('check', ['order_id'=>$order_info['order_id']])}}" class="btn btn-default">审单</a> --> <!-- <a href="{{URL('adjustPrice', ['order_id'=>$order_info['order_id']])}}" class="btn btn-default">调价</a> -->
@endif @endif
@if ($order_info['status'] == 2 && in_array('cancel_order', $userPerms)) @if ($order_info['status'] == 2 && in_array('cancel_order', $userPerms))
......
...@@ -129,6 +129,19 @@ ...@@ -129,6 +129,19 @@
<input type="text" name="order_source_adtag" value="{{$condition['order_source_adtag']}}" placeholder="请输入内容"> <input type="text" name="order_source_adtag" value="{{$condition['order_source_adtag']}}" placeholder="请输入内容">
</dd> </dd>
</dl> </dl>
<dl>
<dt>同步状态:</dt>
<dd>
<div class="droplist" data-default="{{$condition['order_erp_syn']}}" id="order_erp_syn" name="order_erp_syn">
<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>
</ul>
</div>
</dd>
</dl>
@if (in_array('check_test_order', $userPerms)) @if (in_array('check_test_order', $userPerms))
<dl> <dl>
<dt></dt> <dt></dt>
...@@ -163,7 +176,7 @@ ...@@ -163,7 +176,7 @@
<th class="pl30">支付方式</th> <th class="pl30">支付方式</th>
<th class="pl30">推送业务员</th> <th class="pl30">推送业务员</th>
<th class="pl30">发货状态</th> <th class="pl30">发货状态</th>
<th class="pl30">配送方式</th> <th class="pl30">同步状态</th>
<th class="pl30">下单时间</th> <th class="pl30">下单时间</th>
<th class="pl30">操作</th> <th class="pl30">操作</th>
</tr> </tr>
...@@ -236,13 +249,16 @@ ...@@ -236,13 +249,16 @@
?> ?>
</td> </td>
<td class="show-list"> <td class="show-list">
@if ($v['order_shipping_type'] == '1') <?php
快递配送 switch ($v['erp_syn']) {
@else case -2: echo '同步失败'; break;
自提 case -1: echo '不同步'; break;
@endif case 1: echo '已同步'; break;
default: echo '未配送'; break;
}
?>
</td> </td>
<td class="show-list">{{date('Y-m-d', $v['create_time'])}}</td> <td class="show-list">{{$username != 'vpadmin@ichunt.com' ? date('Y-m-d h:i:s', $v['create_time']) : date('Y-m-d', $v['create_time'])}}</td>
<td> <td>
<div class="btn-group btn-group-xs"> <div class="btn-group btn-group-xs">
<a class="btn btn-primary" href="{{URL('details', ['order_id'=>$v['order_id']])}}">详情</a> <a class="btn btn-primary" href="{{URL('details', ['order_id'=>$v['order_id']])}}">详情</a>
...@@ -280,14 +296,14 @@ ...@@ -280,14 +296,14 @@
<?php <?php
if ($v['order_pay_time'] != 0) { if ($v['order_pay_time'] != 0) {
if ($username != 'vpadmin@ichunt.com') { if ($username != 'vpadmin@ichunt.com') {
echo date('Y-m-d', $v['order_pay_time']); echo date('Y-m-d h:i:s', $v['order_pay_time']);
} else { } else {
echo date('Y-m-d', $v['order_pay_time']); echo date('Y-m-d', $v['order_pay_time']);
} }
} else { } else {
if ($v['advance_pay_time'] != 0) { if ($v['advance_pay_time'] != 0) {
if ($username != 'vpadmin@ichunt.com') { if ($username != 'vpadmin@ichunt.com') {
echo date('Y-m-d', $v['advance_pay_time']); echo date('Y-m-d h:i:s', $v['advance_pay_time']);
} else { } else {
echo date('Y-m-d', $v['advance_pay_time']); echo date('Y-m-d', $v['advance_pay_time']);
} }
...@@ -316,13 +332,23 @@ ...@@ -316,13 +332,23 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="table-list-title">Adtag或其它</td> <td class="table-list-title">配送方式</td>
<td class="table-list-content"> <td class="table-list-content">
<p class="show-title" title="{{$v['order_source']}}">{{$v['order_source']}}</p> @if ($v['order_shipping_type'] == '1')
快递配送
@else
自提
@endif
</td> </td>
<td class="table-list-title">优惠金额</td> <td class="table-list-title">优惠金额</td>
<td class="table-list-content"><?php echo App\Http\Controllers\getCoupon($v['order_id']); ?></td> <td class="table-list-content"><?php echo App\Http\Controllers\getCoupon($v['order_id']); ?></td>
</tr> </tr>
<tr>
<td class="table-list-title">Adtag或其它</td>
<td class="table-list-content" colspan="3">
<p class="show-title" title="{{$v['order_source']}}">{{$v['order_source']}}</p>
</td>
</tr>
</table> </table>
</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