Commit 6135714f by 朱继来

1.导出添加付款时间字段;

2.添加erp支付记录;
parent dc693671
...@@ -657,12 +657,12 @@ Class OrderController extends Controller ...@@ -657,12 +657,12 @@ Class OrderController extends Controller
if ($order_goods_type == 1) { if ($order_goods_type == 1) {
$file_name = '联营订单导出'; $file_name = '联营订单导出';
$source_items_id = Config('website.export_joint_source_id'); $source_items_id = Config('website.export_joint_source_id');
$headerCell = ['订单ID', '订单编号', 'ERP单号', '京东订单号', '会员账号', '收货人', '下单日期', '下单时间', '客户名称', '平台来源', 'SKUID', '商品型号', '商品分类', '制造商', '供应商', '数量', '单价', '均摊后单价', '商品小计', '币种', '客服', '商品总额', '运费', '附加费', '优惠券', '订单总额', '人民币总额', '付款类型', '订单状态', '发货状态', '收货地址', '发票类型', '发票状态', '发票抬头', '公司注册地址', '公司电话', 'adtags来源', '新用户来源', '取消原因', '推送备注', '是否为测试订单', '是否为新订单']; $headerCell = ['订单ID', '订单编号', 'ERP单号', '京东订单号', '会员账号', '收货人', '下单日期', '下单时间', '客户名称', '平台来源', 'SKUID', '商品型号', '商品分类', '制造商', '供应商', '数量', '单价', '均摊后单价', '商品小计', '币种', '客服', '商品总额', '运费', '附加费', '优惠券', '订单总额', '人民币总额', '付款类型', '订单状态', '发货状态', '收货地址', '发票类型', '发票状态', '发票抬头', '公司注册地址', '公司电话', 'adtags来源', '新用户来源', '取消原因', '推送备注', '是否为测试订单', '是否为新订单', '付款时间'];
$return_url = '/list'; $return_url = '/list';
} else { } else {
$file_name = '自营订单导出'; $file_name = '自营订单导出';
$source_items_id = Config('website.export_self_source_id'); $source_items_id = Config('website.export_self_source_id');
$headerCell = ['订单ID', '订单编号', 'ERP单号', '京东订单号', '会员账号', '收货人', '下单日期', '下单时间', '客户名称', '平台来源', 'SKUID', '商品型号', '商品分类', '制造商', '供应商', '数量', '单价', '均摊后单价', '商品小计', '币种', '客服', '商品总额', '运费', '附加费', '优惠券', '订单总额', '付款类型', '订单状态', '发货状态', '收货地址', '发票类型', '发票状态', '发票抬头', '公司注册地址', '公司电话', 'adtags来源', '新用户来源', '取消原因', '推送备注', '是否为测试订单', '销售类型', '业务类型', '自采标记', '项目需求描述','收货联系电话']; $headerCell = ['订单ID', '订单编号', 'ERP单号', '京东订单号', '会员账号', '收货人', '下单日期', '下单时间', '客户名称', '平台来源', 'SKUID', '商品型号', '商品分类', '制造商', '供应商', '数量', '单价', '均摊后单价', '商品小计', '币种', '客服', '商品总额', '运费', '附加费', '优惠券', '订单总额', '付款类型', '订单状态', '发货状态', '收货地址', '发票类型', '发票状态', '发票抬头', '公司注册地址', '公司电话', 'adtags来源', '新用户来源', '取消原因', '推送备注', '是否为测试订单', '销售类型', '业务类型', '自采标记', '项目需求描述','收货联系电话', '付款时间'];
$return_url = '/self_order'; $return_url = '/self_order';
} }
...@@ -1558,6 +1558,8 @@ Class OrderController extends Controller ...@@ -1558,6 +1558,8 @@ Class OrderController extends Controller
// 获取操作记录 // 获取操作记录
$actionLog = DB::connection('order')->table('lie_order_action_log')->where('order_id', $id)->orderBy('create_time', 'DESC')->orderBy('log_id', 'DESC')->get(); $actionLog = DB::connection('order')->table('lie_order_action_log')->where('order_id', $id)->orderBy('create_time', 'DESC')->orderBy('log_id', 'DESC')->get();
$erpPayLog = DB::connection('order')->table('lie_erp_pay_log')->where('order_id', $id)->orderBy('create_time', 'DESC')->orderBy('log_id', 'DESC')->get();
$response = [ $response = [
'user_mobile' => $mobile, 'user_mobile' => $mobile,
'order_info' => $temp['data']['order_info'], 'order_info' => $temp['data']['order_info'],
...@@ -1574,6 +1576,7 @@ Class OrderController extends Controller ...@@ -1574,6 +1576,7 @@ Class OrderController extends Controller
'order_temp_info' => $temp['data']['order_temp_info'], 'order_temp_info' => $temp['data']['order_temp_info'],
'order_shipping_inside' => $temp['data']['order_shipping_inside'], 'order_shipping_inside' => $temp['data']['order_shipping_inside'],
'actionLog' => $actionLog, 'actionLog' => $actionLog,
'erpPayLog' => $erpPayLog,
'order_refund_info' => $temp['data']['order_refund_info'], 'order_refund_info' => $temp['data']['order_refund_info'],
'order_refund_items' => $temp['data']['order_refund_items'], 'order_refund_items' => $temp['data']['order_refund_items'],
]; ];
......
...@@ -237,7 +237,7 @@ class OrderModel extends Model ...@@ -237,7 +237,7 @@ class OrderModel extends Model
}) })
->where('it.status', 1) ->where('it.status', 1)
->where('o.order_goods_type', '=', $map['order_goods_type']) ->where('o.order_goods_type', '=', $map['order_goods_type'])
->select('o.order_id', 'o.order_sn', 'o.order_type', 'o.order_pay_type', 'o.order_goods_type', 'o.order_source', 'o.create_time', 'o.status', 'o.order_amount', 'o.sale_type', 'o.currency', 'o.sale_id', 'o.cancel_reason', 'it.goods_id', 'it.goods_name', 'it.goods_number', 'it.goods_price', 'it.single_pre_price', 'it.brand_name', 'it.supplier_name', 'it.goods_class', 'it.self_supplier_type', 'i.tax_title', 'i.inv_type', 'i.invoice_status', 'i.tax_title', 'i.company_address', 'i.company_phone', 'i.tax_no', 'i.bank_name', 'i.bank_account', 'u.user_id', 'u.mobile', 'u.email', 'u.client_source', 'u.is_new', 'u.is_test', 'oe.erp_sn', 'oe.order_type as extend_order_type', 'oe.send_remark', 'oe.is_new as is_new_order', 'oe.business_type', 'oe.jd_order_id', 'oe.exchange_rate', 'oe.sample_demand_desc') ->select('o.order_id', 'o.order_sn', 'o.order_type', 'o.order_pay_type', 'o.order_goods_type', 'o.order_source', 'o.create_time', 'o.status', 'o.order_amount', 'o.sale_type', 'o.currency', 'o.sale_id', 'o.cancel_reason', 'o.advance_pay_time', 'o.pay_time', 'it.goods_id', 'it.goods_name', 'it.goods_number', 'it.goods_price', 'it.single_pre_price', 'it.brand_name', 'it.supplier_name', 'it.goods_class', 'it.self_supplier_type', 'i.tax_title', 'i.inv_type', 'i.invoice_status', 'i.tax_title', 'i.company_address', 'i.company_phone', 'i.tax_no', 'i.bank_name', 'i.bank_account', 'u.user_id', 'u.mobile', 'u.email', 'u.client_source', 'u.is_new', 'u.is_test', 'oe.erp_sn', 'oe.order_type as extend_order_type', 'oe.send_remark', 'oe.is_new as is_new_order', 'oe.business_type', 'oe.jd_order_id', 'oe.exchange_rate', 'oe.sample_demand_desc')
->groupBy('it.rec_id') ->groupBy('it.rec_id')
->orderBy('o.create_time', 'DESC') ->orderBy('o.create_time', 'DESC')
// ->get() // ->get()
...@@ -451,7 +451,14 @@ class OrderModel extends Model ...@@ -451,7 +451,14 @@ class OrderModel extends Model
$tmp[$i]['receiving_address'] = isset($current_order_addr['mobile']) ? $current_order_addr['mobile'] : ''; $tmp[$i]['receiving_address'] = isset($current_order_addr['mobile']) ? $current_order_addr['mobile'] : '';
} else { } else {
$tmp[$i]['is_new_order'] = $order[$i]['is_new_order'] == 1 ? '是' : '否'; // 是否为新订单 $tmp[$i]['is_new_order'] = $order[$i]['is_new_order'] == 1 ? '是' : '否'; // 是否为新订单
} }
// 付款时间,多条明细则只在第一行显示,预付款只显示首款付款时间
if ($i > 1) {
$tmp[$i]['pay_time'] = '';
} else {
$tmp[$i]['pay_time'] = $order[$i]['order_pay_type'] == 2 ? $order[$i]['advance_pay_time'] : $order[$i]['pay_time'];
}
} }
return $tmp; return $tmp;
......
...@@ -639,7 +639,7 @@ ...@@ -639,7 +639,7 @@
return false; return false;
} }
layer.msg(resp.errmsg); layer.alert(resp.errmsg);
}, },
}) })
}) })
......
...@@ -997,7 +997,54 @@ ...@@ -997,7 +997,54 @@
<td colspan="3" class="text-center click-up"><i class="fa fa-angle-double-up">点击收起</i></td> <td colspan="3" class="text-center click-up"><i class="fa fa-angle-double-up">点击收起</i></td>
</tr> </tr>
@endif @endif
@endforeach
</tbody>
</table>
</div>
@endif
@if (!empty($erpPayLog))
<p>ERP支付记录</p>
<div class="tabs-box table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<th>创建时间</th>
<th>收款单号</th>
<th>收款金额</th>
<th>收款时间</th>
<th>支付状态</th>
<th>取消支付时间</th>
</tr>
</thead>
<tbody>
@foreach ($erpPayLog as $k=>$v)
@if ($k < 4)
<tr>
<td width="15%">{{date('Y-m-d H:i:s', $v->create_time)}}</td>
<td width="10%">{{$v->receipt_sn}}</td>
<td width="10%">{{$v->receipt_amount}}</td>
<td width="10%">{{date('Y-m-d H:i:s', $v->receipt_time)}}</td>
<td>{{$v->status == 1 ? '已支付' : '已取消'}}</td>
<td>{{$v->cancel_time ? date('Y-m-d H:i:s', $v->cancel_time) : ''}}</td>
</tr>
@else
<tr class="other-infos">
<td width="15%">{{date('Y-m-d H:i:s', $v->create_time)}}</td>
<td width="10%">{{$v->receipt_sn}}</td>
<td width="10%">{{$v->receipt_amount}}</td>
<td width="10%">{{date('Y-m-d H:i:s', $v->receipt_time)}}</td>
<td>{{$v->status == 1 ? '已支付' : '已取消'}}</td>
<td>{{$v->cancel_time ? date('Y-m-d H:i:s', $v->cancel_time) : ''}}</td>
</tr>
@endif
@if ($k >= 4 && $k == count($erpPayLog)-1)
<tr>
<td colspan="6" class="text-center click-down"><i class="fa fa-angle-double-down">点击展开</i></td>
<td colspan="6" class="text-center click-up"><i class="fa fa-angle-double-up">点击收起</i></td>
</tr>
@endif
@endforeach @endforeach
</tbody> </tbody>
</table> </table>
......
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