Commit 53c20bf3 by 朱继来

1. 调整详情页;

2. 调整联营审单;
parent 47e0a832
......@@ -870,6 +870,7 @@ Class AddOrderController extends Controller
{
if ($request->isMethod('post')) {
$add_type = $request->input('add_type', ''); // 新增类型
$goods_type = $request->input('goods_type', 1); // 商品类型
if ($add_type) {
$data['add_goods_name'] = $request->input('add_goods_name', '');
......@@ -891,11 +892,20 @@ Class AddOrderController extends Controller
$data['add_type'] = $add_type;
$data['operator_id'] = $request->user->userId;
$url = Config('website.order_api_domain').'/order/addgoods';
if ($goods_type == 1 && !$add_type) {
$data['k1'] = time();
$data['k2'] = md5(md5($data['k1']).'fh6y5t4rr351d2c3bryi');
$response = json_decode(curlApi($url, $data, 'post'), true);
$url = Config('website.api_domain').'/order/jointaddgoods';
$res = json_decode(curlApi($url, $data, 'post'), true);
return ['errcode' => $res['err_code'], 'errmsg' => $res['err_msg'], 'data' => $res['data']];
}
$url = Config('website.order_api_domain').'/order/addgoods';
$res = json_decode(curlApi($url, $data, 'post'), true);
return ['errcode' => $response['errcode'], 'errmsg' => $response['errmsg']];
return ['errcode' => $res['errcode'], 'errmsg' => $res['errmsg']];
}
}
......
......@@ -772,19 +772,14 @@ Class OrderController extends Controller
}
} else {
$perm = new PermController;
$info['buyers'] = $perm->getRoleUsers($request, '采购员');
// $info['buyers'] = $perm->getRoleUsers($request, '采购员');
$info['buyers'] = $perm->getUserByDepartmentId(8, 0); // 采购部
}
// 账期订单跳转到详情页
if ($info['order_info']['status'] == 4) {
return redirect('/details/'.$id);
}
// 待审核才可以
if(!in_array($info['order_info']['status'], [-1, 1, 2])){
$redirect = $info['order_info']['order_goods_type'] == 1 ? '/list' : '/self_order';
return redirect('/prompt')->with(['message'=>"该订单不符合人工审单条件~【status:{$info['order_info']['status']}】",'url' =>$redirect, 'jumpTime'=>3,'status'=>false]);
// 非待审核、待付款则跳转到列表页
if(!in_array($info['order_info']['status'], [1, 2])){
$redirect_url = $info['order_info']['order_goods_type'] == 1 ? '/list' : '/self_order';
return redirect($redirect_url);
}
$data['k1'] = time();
......@@ -796,28 +791,23 @@ Class OrderController extends Controller
$info['api_dgk_config'] = $res['data']['data'];
$info['api_dgk_config_one'] = array_keys($res['data']['data']); // 一级分类
return view('detail', $info);
return view('changeOrder', $info);
}
//删除单个商品操作
public function ajaxdeletegoods(Request $request)
{
$collert = $request->input();
$collert = $request->input();
$operator_id = $request->user->userId;
if(!$request->isMethod('post') || !$collert['rec_id']){
return array('errcode'=>1, 'errmsg'=>'错误操作');
}
if(!$request->isMethod('post') || !$collert['rec_id']) return array('errcode'=>1, 'errmsg'=>'错误操作');
if(!$collert['reason']){
errorLog(Error::E_NOT_EXISTS, '请填写删除原因');
return array('errcode'=>Error::E_NOT_EXISTS,'errmsg'=>'请填写删除原因');
}
if(!$collert['reason']) return array('errcode'=>Error::E_NOT_EXISTS,'errmsg'=>'请填写删除原因');
$url = Config('website.api_domain').'order/deleteGoods';
$check['k1'] = time();
$check['k2'] = md5(md5($check['k1']).'fh6y5t4rr351d2c3bryi');
$check['k1'] = time();
$check['k2'] = md5(md5($check['k1']).'fh6y5t4rr351d2c3bryi');
$resData = array(
"reason"=>$collert['reason'],
......@@ -848,9 +838,15 @@ Class OrderController extends Controller
$pay_time_limit = $payTime == 'other' ? $payTimeOther : $payTime;
} else {
$pay_time_limit = $request->input('pay_time_limit');
}
}
$url = Config('website.api_domain').'order/changeOrder';
$is_temp_save = $request->input('is_temp_save', '');
if ($is_temp_save) { // 临时保存接口
$url = Config('website.api_domain').'order/tempSaveOrder';
} else {
$url = Config('website.api_domain').'order/changeOrder';
}
$check['k1'] = time();
$check['k2'] = md5(md5($check['k1']).'fh6y5t4rr351d2c3bryi');
......@@ -1482,13 +1478,13 @@ Class OrderController extends Controller
$temp = json_decode(curlApi($url, $userData, "POST"), true);
// 消息通知
$mobile = isset($temp['data']['order_info']['user_info']['msg_mobile']) ? $temp['data']['order_info']['user_info']['msg_mobile'] : '';
// $mobile = isset($temp['data']['order_info']['user_info']['msg_mobile']) ? $temp['data']['order_info']['user_info']['msg_mobile'] : '';
if (!$mobile) {
// $mobile = isset($temp['data']['order_info']['user_info']['mobile']) ? $temp['data']['order_info']['user_info']['mobile'] : '';
$user = DB::connection('order')->table('lie_user_main')->where('user_id', $temp['data']['order_info']['user_id'])->select('mobile')->first();
$mobile = $user ? $user->mobile : '';
}
// if (!$mobile) {
// // $mobile = isset($temp['data']['order_info']['user_info']['mobile']) ? $temp['data']['order_info']['user_info']['mobile'] : '';
// $user = DB::connection('order')->table('lie_user_main')->where('user_id', $temp['data']['order_info']['user_id'])->select('mobile')->first();
// $mobile = $user ? $user->mobile : '';
// }
// 获取操作记录
$actionLog = DB::connection('order')->table('lie_order_action_log')->where('order_id', $id)->orderBy('create_time', 'DESC')->orderBy('log_id', 'DESC')->get();
......@@ -1497,7 +1493,7 @@ Class OrderController extends Controller
$erpPayLog = DB::connection('order')->table('lie_erp_pay_log')->where('order_id', $id)->orderBy('create_time', 'DESC')->orderBy('log_id', 'DESC')->get();
$response = [
'user_mobile' => $mobile,
// 'user_mobile' => $mobile,
'order_info' => $temp['data']['order_info'],
'user_info' => $temp['data']['order_info']['user_info'],
'company_info' => $temp['data']['order_info']['company_info'],
......
+(function($){
$.lie = $.lie || {version: "v1.0.0"};
$.extend($.lie, {
track: {
orderTrack:function() {
// 查看订单明细跟踪
$('.list-item-table').off().delegate('.order-track', 'click', function () {
var rid = $(this).data('rid');
$.ajax({
url : '/ajax/getOrderItemsTrack',
type: 'post',
data: {rec_id : rid},
success: function(resp) {
if (resp.errcode == 0) {
var data = resp.data;
var content = '<table class="table">\
<tr>\
<th width="30%">时间</th>\
<th>说明</th>\
<th width="13%">负责人</th>\
</tr>';
for (var i = 0; i < data.length; i++) {
content += '<tr><td>'+data[i].create_time+'</td><td>'+data[i].track_content+',数量:'+data[i].track_num+'</td><td>'+data[i].create_name+'</td></tr>';
}
content += '</table>';
layer.open({
title: '订单明细跟踪',
area: ['600px', '400px'],
content: content,
btn: [],
})
} else {
layer.alert(resp.errmsg || '网络异常');
}
},
error: function(err) {
console.log(err);
}
})
})
},
}
})
})(jQuery)
\ No newline at end of file
......@@ -9,6 +9,8 @@
@include('orderlist.css')
@include('orderlist.js')
<script src="/js/orderamount.js"></script>
</head>
<body class="">
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>订单管理后台 | 人工审单</title>
<script>document.domain="{{ Config::get('website.domain') }}";</script>
@include('detail.css')
@include('changeOrder.js')
</head>
<body class="">
<div id="wrapper">
<!-- layouts.navigation -->
@include('layouts.navigation')
<div id="page-wrapper" class="gray-bg">
<div class="row">
@include('changeOrder.content')
</div>
</div>
</div>
</body>
<div class="tabs-box adjusted_order" style="display: none;">
<div class="order-change-main">
<form id="adjustedOrderForm" class="form-horizontal table-responsive">
<input type="hidden" name="order_id" value="{{$order_info['order_id']}}">
<input type="hidden" name="sale_id" value="{{$order_info['sale_id']}}">
<input type="hidden" name="extra_fee" value="{{$order_temp_info['extra_fee']}}">
<input type="hidden" name="freight_fee" value="{{$order_temp_info['freight_fee']}}">
<input type="hidden" name="goods_amount" value="{{$order_temp_info['goods_amount']}}">
<input type="hidden" name="deposit_amount" value="{{$order_temp_info['deposit_amount']}}">
<input type="hidden" name="order_pay_type" value="{{$order_temp_info['order_pay_type']}}">
<input type="hidden" name="pay_time_limit" value="{{$order_temp_info['pay_time_limit']}}">
<input type="hidden" name="cancel_reason" value="{{isset($order_info['cancle_reason']) ? $order_info['cancle_reason'] : ''}}">
<table class="table table-bordered table-hover">
<thead>
<tr>
<th>型号</th>
<th>调整数量</th>
<th>调整单价</th>
</tr>
</thead>
<tbody>
@if (isset($order_temp_info['change_info']))
@foreach ($order_temp_info['change_info'] as $k => $v)
<tr>
<td>
<input type="hidden" name="change_info[{{$k}}][goods_name]" value="{{$v['goods_name']}}">
<p>{{$v['goods_name']}}</p>
</td>
<td>
<input type="hidden" name="change_info[{{$k}}][goods_number]" value="{{$v['goods_number']}}">
<p>{{$v['goods_number']}}</p>
</td>
<td>
<input type="hidden" name="change_info[{{$k}}][goods_price]" value="{{$v['goods_price']}}">
<p>{{$v['goods_price']}}</p>
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
<hr>
<table class="table table-bordered table-hover">
<tr>
<th width="20%">订单类型:</th>
<td>
@if ($order_temp_info['order_pay_type'] == 1)
全款
@elseif ($order_temp_info['order_pay_type'] == 2)
预付款
@else
账期
@endif
</td>
</tr>
<tr>
<th>商品总额:</th>
<td>{{$order_temp_info['goods_amount']}}</td>
</tr>
<tr>
<th>优惠金额:</th>
<td>{{$order_price_info['discount_amount']}}</td>
</tr>
<tr>
<th>附加费:</th>
<td>{{$order_temp_info['extra_fee']}}</td>
</tr>
<tr>
<th>运费:</th>
<td>{{$order_temp_info['freight_fee']}}</td>
</tr>
<?php $order_amount_temp = $order_temp_info['goods_amount'] + $order_price_info['discount_amount'] + $order_temp_info['extra_fee'] + $order_temp_info['freight_fee']; ?>
<tr>
<th>订单总额:</th>
<td>{{$order_amount_temp}}</td>
</tr>
@if ($order_info['order_goods_type'] == 2)
<tr>
<th>支付优惠:</th>
<td>{{$order_price_info['pay_preferential'] ? $order_price_info['pay_preferential'] : 0}}</td>
</tr>
<tr>
<th>实际支付金额:</th>
<td>{{$order_amount_temp + $order_price_info['pay_preferential']}}</td>
</tr>
@endif
@if ($order_temp_info['order_pay_type'] == 2)
<tr>
<th>定金:</th>
<td>{{$order_temp_info['deposit_amount']}}</td>
</tr>
@endif
<tr>
<th>付款时间:</th>
<td>{{$order_temp_info['pay_time_limit'].'天'}}</td>
</tr>
</table>
</form>
</div>
</div>
<script src="/js/jquery-2.2.1.js"></script>
<script src="/js/jquery.form.js"></script>
<script src="/js/bootstrap.min.js"></script>
<script src="/js/bootstrap-select.min.js"></script>
<script src="/layer/layer.js"></script>
<script src="/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="/js/inspinia.min.js"></script>
<script src="/js/plugins/DatePicker/WdatePicker.js"></script>
<script src="/js/common.js"></script>
<script src="/js/change_order.js?v=<?= time() ?>"></script>
<script src="/js/goods.js?v=<?= time() ?>"></script>
<style>
#temp-save-info { display: none; }
#tempSaveForm { padding: 15px; }
</style>
<div id="temp-save-info">
<div class="order-change-main">
<form id="tempSaveForm" class="form-horizontal table-responsive">
@if (isset($order_temp_info['temp_save_info']['customer_cn']))
<table class="table table-bordered table-hover">
<tr class="caption">
<th colspan="4" style="text-align: center; background: #f9f9f9;">终端客户信息</th>
</tr>
<tr>
<th>客户名称(中文)</th>
<th>客户名称(英文)</th>
<th>客户类型</th>
<th>产品用途</th>
</tr>
<tr>
<td><?= $order_temp_info['temp_save_info']['customer_cn'] ?></td>
<td><?= $order_temp_info['temp_save_info']['customer_en'] ?></td>
<td><?= Config('params.end_user_type')[$order_temp_info['temp_save_info']['customer_type']] ?></td>
<td><?= $order_temp_info['temp_save_info']['product_use'] ?></td>
</tr>
</table>
@endif
<table class="table table-bordered table-hover">
<thead>
<tr>
<th width="40%">型号</th>
<th>调整数量</th>
<th>调整单价</th>
<th width="20%">状态</th>
</tr>
</thead>
<tbody>
@if (isset($order_temp_info['temp_save_info']['change_info']))
@foreach ($order_temp_info['temp_save_info']['change_info'] as $k => $v)
<tr>
<td>
<input type="hidden" name="change_info[{{$k}}][goods_name]" value="{{$v['goods_name']}}">
<p>{{$v['goods_name']}}</p>
</td>
<td>
<input type="hidden" name="change_info[{{$k}}][goods_number]" value="{{$v['goods_number']}}">
<p>{{$v['goods_number']}}</p>
</td>
<td>
<input type="hidden" name="change_info[{{$k}}][goods_price]" value="{{$v['goods_price']}}">
<p>{{$v['goods_price']}}</p>
</td>
<td>
{{ $v['status'] == 1 ? '正常' : '<i style="color: red;">已取消</i>' }}
@if (isset($v['is_add']))
<i style="color: green;">(新增)</i>
@endif
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
<hr>
<table class="table table-bordered table-hover">
<tr>
<th width="20%">订单类型:</th>
<td>
@if ($order_temp_info['temp_save_info']['order_pay_type'] == 1)
全款
@elseif ($order_temp_info['temp_save_info']['order_pay_type'] == 2)
预付款
@else
账期
@endif
</td>
</tr>
<tr>
<th>商品总额:</th>
<td>{{$order_temp_info['temp_save_info']['goods_amount']}}</td>
</tr>
<tr>
<th>优惠金额:</th>
<td>{{$order_price_info['discount_amount']}}</td>
</tr>
<tr>
<th>附加费:</th>
<td>{{$order_temp_info['temp_save_info']['extra_fee']}}</td>
</tr>
<tr>
<th>运费:</th>
<td>{{$order_temp_info['temp_save_info']['freight_fee']}}</td>
</tr>
<?php $order_amount_temp = $order_temp_info['temp_save_info']['goods_amount'] + $order_price_info['discount_amount'] + $order_temp_info['temp_save_info']['extra_fee'] + $order_temp_info['temp_save_info']['freight_fee']; ?>
<tr>
<th>订单总额:</th>
<td>{{$order_amount_temp}}</td>
</tr>
@if ($order_info['order_goods_type'] == 2)
<tr>
<th>支付优惠:</th>
<td>{{$order_price_info['pay_preferential'] ? $order_price_info['pay_preferential'] : 0}}</td>
</tr>
<tr>
<th>实际支付金额:</th>
<td>{{$order_amount_temp + $order_price_info['pay_preferential']}}</td>
</tr>
@endif
@if ($order_temp_info['temp_save_info']['order_pay_type'] == 2)
<tr>
<th>定金:</th>
<td>{{$order_temp_info['temp_save_info']['deposit_amount']}}</td>
</tr>
@endif
<tr>
<th>付款时间:</th>
<td>{{$order_temp_info['temp_save_info']['pay_time_limit'].'天'}}</td>
</tr>
</table>
</form>
</div>
</div>
......@@ -8,8 +8,8 @@
{{ Autograph() }}
@include('orderlist.css')
@include('orderlist.js')
@include('detail.css')
@include('detail.js')
</head>
<body class="">
......
<p style="margin-left: 5px;">取消订单</p>
<div class="tabs-box cancelPay-order">
<?php
switch($order_info['status']) {
case 2:
echo '<table class="table">
<tr>
<td width="10%">取消订单原因:</td>
<td>
<textarea name="" id="cancel-reason" class="form-control" placeholder="请输入取消原因"></textarea>
</td>
</tr>
<tr><td colspan="20"><a class="btn btn-primary submit">提交</a></td></tr>
</table>';
break;
case -1:
echo '已取消';
break;
}
?>
</div>
\ No newline at end of file
......@@ -18,7 +18,6 @@
<input type="hidden" name="goods_amount" value="{{$order_price_info['goods_price']}}">
<input type="hidden" name="order_amount" value="{{$order_info['order_amount']}}">
<input type="hidden" name="cancel_reason" value="{{isset($order_info['cancle_reason']) ? $order_info['cancle_reason'] : ''}}">
<input type="hidden" name="user_mobile" value="{{$user_mobile}}">
<input type="hidden" name="check_failed" value="">
<input type="hidden" name="check_failed_info" value="">
<input type="hidden" name="change_pay_type" value="">
......
<link href="/css/bootstrap.min.css" rel="stylesheet">
<link href="/css/bootstrap-select.min.css" rel="stylesheet">
<link href="/font-awesome/css/font-awesome.css" rel="stylesheet">
<link href="/css/style.css" rel="stylesheet">
<link href="/layer/skin/layer.css" rel="stylesheet">
<link href="/css/order.css" rel="stylesheet">
<link href="/css/detail.css" rel="stylesheet">
\ No newline at end of file
<p>操作记录</p>
<div class="tabs-box table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<th>操作时间</th>
<th>操作人</th>
<th>操作事件</th>
</tr>
</thead>
<tbody>
<?php foreach ($actionLog as $k=>$v) { ?>
<?php if ($k < 4) { ?>
<tr>
<td width="15%"><?= date('Y-m-d H:i:s', $v->create_time) ?></td>
<td width="10%"><?= App\Http\Controllers\getOperatorName($v->operator_id, $v->operator_type) ?></td>
<td><?= $v->event ?></td>
</tr>
<?php } else { ?>
<tr class="other-infos">
<td width="15%"><?= date('Y-m-d H:i:s', $v->create_time) ?></td>
<td width="10%"><?= App\Http\Controllers\getOperatorName($v->operator_id, $v->operator_type) ?></td>
<td><?= $v->event ?></td>
</tr>
<?php } ?>
<?php if ($k >= 4 && $k == count($actionLog)-1) { ?>
<tr>
<td colspan="3" class="text-center click-down"><i class="fa fa-angle-double-down">点击展开</i></td>
<td colspan="3" class="text-center click-up"><i class="fa fa-angle-double-up">点击收起</i></td>
</tr>
<?php } ?>
<?php } ?>
</tbody>
</table>
</div>
\ No newline at end of file
<table class="table table-bordered order-express">
<tr>
@if ($order_info['order_type_extend'])
<th>订单类型</th>
@endif
@if ($order_info['order_goods_type'] == 2)
<th>销售类型</th>
@endif
@if ($order_temp_info['business_type'])
<th>业务类型</th>
@endif
@if ($order_info['order_pay_type'] == 2)
<th>预付款</th>
<th>尾款</th>
@endif
<th>交易状态</th>
<th>支付方式</th>
<th>支付类型</th>
<th>支付状态</th>
<th>支付时间</th>
</tr>
<tr>
@if ($order_info['order_type_extend'])
<td>
<?php
switch ($order_info['order_type_extend']) {
case 1: echo '团购订单'; break;
}
?>
</td>
@endif
@if ($order_info['order_goods_type'] == 2)
<td>{{ $order_info['sale_type'] == 1 ? '现卖' : '预售' }}</td>
@endif
@if ($order_temp_info['business_type'])
<td>{{ Config('params.business_type')[$order_temp_info['business_type']] }}</td>
@endif
@if ($order_info['order_pay_type'] == 2)
<td>{{$currency.$order_info['advance_amount']}}</td>
<td>
{{$currency.number_format($order_info['order_amount'] - $order_info['advance_amount'], 2, '.', '')}}
</td>
@endif
<td>{{ Config('params.order_status')[$order_info['status']] }}</td>
<td>
<?php
if ($order_info['order_pay_type'] == 2) { // 预付款
if (isset($order_pay_log[1]) && $order_pay_log[1]['pay_name'] != '') {
echo $order_pay_log[1]['pay_name'];
} else if (!empty($order_pay_log) && $order_pay_log[0]['pay_name'] != '') {
echo $order_pay_log[0]['pay_name'];
} else {
echo '--';
}
} else {
if (!empty($order_pay_log) && $order_pay_log[0]['pay_name'] != '') {
echo $order_pay_log[0]['pay_name'];
} else {
echo '--';
}
}
?>
</td>
<td>
<?php
if ($order_info['order_pay_type'] == 1) {
if (!empty($order_pay_log)) {
echo '全款';
} else {
echo '--';
}
} else if ($order_info['order_pay_type'] == 2) {
if (isset($order_pay_log[1])) {
echo '尾款';
} else if (!empty($order_pay_log)) {
echo '预付款';
} else {
echo '--';
}
} else if ($order_info['order_pay_type'] == 3) {
if (!empty($order_pay_log)) {
echo '账期';
} else {
echo '--';
}
}
?>
</td>
<td>
<?php
if ($order_info['order_pay_type'] == 2) {
if (isset($order_pay_log[1]) && $order_pay_log[1]['is_paid'] != '') {
echo $order_pay_log[1]['is_paid'] == 1 ? '尾款已支付' : '未支付';
} else if (!empty($order_pay_log) && $order_pay_log[0]['is_paid'] != '') {
echo $order_pay_log[0]['is_paid'] == 1 ? '首款已支付' : '未支付';
} else {
echo '--';
}
} else {
if (!empty($order_pay_log) && $order_pay_log[0]['is_paid'] != '') {
echo $order_pay_log[0]['is_paid'] == 1 ? '已支付' : '未支付';
} else {
echo '--';
}
}
?>
</td>
<td>{{ $order_info['pay_time'] ? date('Y-m-d H:i:s', $order_info['pay_time']) : '' }}</td>
</tr>
</table>
\ No newline at end of file
<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>
<?php foreach ($erpPayLog as $k=>$v) { ?>
<?php 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>
<?php } 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>
<?php } ?>
<?php 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>
<?php } ?>
<?php } ?>
</tbody>
</table>
</div>
\ No newline at end of file
<p>物流信息</p>
<div class="tabs-box table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<th width="15%">物流时间</th>
<th>物流信息</th>
</tr>
</thead>
<tbody>
<?php if (!empty($order_shipping_info['info'])) { ?>
<?php $shippings_info = json_decode($order_shipping_info['info'], true); ?>
<?php foreach ($shippings_info as $k=>$v) { ?>
<?php if ($k < 4) { ?>
<tr>
<td><?= $v['AcceptTime'] ?></td>
<td><?= $v['AcceptStation'] ?></td>
</tr>
<?php } else { ?>
<tr class="other-infos">
<td><?= $v['AcceptTime'] ?></td>
<td><?= $v['AcceptStation'] ?></td>
</tr>
<?php } ?>
<?php if ($k >= 4 && $k == count($shippings_info)-1) { ?>
<tr>
<td colspan="2" class="text-center click-down"><i class="fa fa-angle-double-down">点击展开</i></td>
<td colspan="2" class="text-center click-up"><i class="fa fa-angle-double-up">点击收起</i></td>
</tr>
<?php } ?>
<?php } ?>
<?php } else { ?>
<?php foreach ($order_shipping_inside as $k=>$v) { ?>
<?php if ($k < 4) { ?>
<tr>
<td><?= date('Y-m-d H:i:s', $v['create_time']) ?></td>
<td><?= $v['info'] ?></td>
</tr>
<?php } else { ?>
<tr class="other-infos">
<td><?= date('Y-m-d H:i:s', $v['create_time']) ?></td>
<td><?= $v['info'] ?></td>
</tr>
<?php } ?>
<?php if ($k >= 4 && $k == count($order_shipping_inside)-1) { ?>
<tr>
<td colspan="2" class="text-center click-down"><i class="fa fa-angle-double-down">点击展开</i></td>
<td colspan="2" class="text-center click-up"><i class="fa fa-angle-double-up">点击收起</i></td>
</tr>
<?php } ?>
<?php } ?>
<?php } ?>
</tbody>
</table>
</div>
\ No newline at end of file
<script src="/js/jquery-2.2.1.js"></script>
<script src="/js/jquery.form.js"></script>
<script src="/js/bootstrap.min.js"></script>
<script src="/js/bootstrap-select.min.js"></script>
<script src="/layer/layer.js"></script>
<script src="/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="/js/inspinia.min.js"></script>
<script src="/js/plugins/DatePicker/WdatePicker.js"></script>
<script src="/js/common.js"></script>
<script src="/js/md5.js"></script>
<script src="/js/layui/layui.js"></script>
<script src="/js/details.js?v=<?= time() ?>"></script>
<script src="/js/order_track.js"></script>
<script src="/js/order_cancel.js"></script>
<script src="/js/refund.js?v=<?= time() ?>"></script>
<p style="margin-left: 5px;">订单发货</p>
<div class="tabs-box send">
<table class="table">
<input type="hidden" id="order_id" value="{{$order_info['order_id']}}">
</table>
<table class="table">
<?php
$html = '';
if ($order_info['order_shipping_type'] == 1) {
switch ($order_shipping_info['status']) {
case 1:
echo '<tr>配送中,物流单号为'.$order_shipping_info['shipping_no'].',配送方式为&nbsp;'.$ship_type[$order_shipping_info['shipping_id']].'</tr>';
break;
case 2:
echo '<tr>已签,订单完成</tr>';
break;
default:
// if (count($order_items_info) > 0) {
// foreach ($order_items_info as $k => $item) {
// $html .= '<tr>
// <td>
// <label>型号名:</label>
// <span>'.$item['goods_name'].'</span>
// </td>';
$html .= '<tr>
<td>
<label>选择快递:</label>
<select class="batch-shipping-code">';
foreach ($shippings as $v) {
$html .= '<option value="'.$v->shipping_id.'">'.$v->shipping_name.'</option>';
}
$html .= '</select>
</td>
<td>
<label>填写单号:</label>
<input type="text" class="batch-shipping-no" value="'.$order_shipping_info['shipping_no'].'" />
</td>
<td><a class="btn btn-default batch-send">确认发货</a></td>
</tr>';
// }
// }
echo $html;
break;
}
} else {
echo '<tr>
<td>线下自提</td>
</tr>';
}
?>
</table>
</div>
\ No newline at end of file
......@@ -328,7 +328,7 @@
<div class="btn-group btn-group-xs" style="width: 240px;">
<a class="btn btn-primary" href="{{URL('details', ['order_id'=>$v['order_id']])}}" target="_blank">详情</a>
@if (in_array('check_order', $userPerms) && in_array($v['status'], [1, 2, 3]))
@if (in_array('check_order', $userPerms) && in_array($v['status'], [1, 2, 3]) && $v['sale_id'])
<a class="btn btn-success" href="{{URL('change', ['order_id'=>$v['order_id']])}}" target="_blank">人工审单</a>
@endif
......@@ -436,6 +436,8 @@
$('#is_new_order').selectpicker('val', is_new_order);
$.lie.order.index();
$.lie.track.orderTrack();
$.lie.cancel.cancelorder();
// 展开菜单
$('#side-menu').children('li').eq(1).addClass('active');
......
......@@ -6,13 +6,12 @@
<script src="/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="/js/inspinia.min.js"></script>
<script src="/js/plugins/DatePicker/WdatePicker.js"></script>
<script src="/js/common.js"></script>
<script src="/js/md5.js"></script>
<script src="/js/layui/layui.js"></script>
<script src="/js/order.js?v=<?= time() ?>"></script>
<script src="/js/orderamount.js"></script>
<script src="/js/plugins/DatePicker/WdatePicker.js"></script>
<script src="/js/refund.js?v=<?= time() ?>"></script>
<script src="/js/goods.js?v=<?= time() ?>"></script>
<script src="/js/list.js?v=<?= time() ?>"></script>
<script src="/js/order_track.js"></script>
<script src="/js/order_cancel.js"></script>
......@@ -376,7 +376,7 @@
<div class="btn-group btn-group-xs" style="width: 240px;">
<a class="btn btn-primary" href="/details/{{$v['order_id']}}?tags=self" target="_blank">详情</a>
@if (in_array('self_check_order', $userPerms) && in_array($v['status'], [1, 2]))
@if (in_array('self_check_order', $userPerms) && in_array($v['status'], [1, 2]) && $v['sale_id'])
<a class="btn btn-success" href="/change/{{$v['order_id']}}?tags=self" target="_blank">人工审单</a>
@endif
......@@ -479,4 +479,6 @@
$('.business_type').selectpicker('val', business_type.split(',')).trigger("change");
$.lie.order.index();
$.lie.track.orderTrack();
$.lie.cancel.cancelorder();
</script>
\ No newline at end of file
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