Commit 75bee767 by 朱继来

Merge branch 'zjl_action_log_20190116' into development

parents bd6b8ce5 97fb1f12
......@@ -624,12 +624,16 @@ Class AddOrderController extends Controller
$type_val = '自营';
}
if (count($map) != count($excel[0])) return ['errcode' => 1, 'errmsg' => '导入模板错误,需导入'.$type_val.'模板'];
if (count($map) != count($excel[0])) {
errorLog(Error::E_IMPORT_TEMP_ERR, '导入模板错误,需导入'.$type_val.'模板');
return ['errcode' => 1, 'errmsg' => '导入模板错误,需导入'.$type_val.'模板'];
}
// 验证excel内容
$valid = $this->excelValid($excel);
if ($valid['errcode'] != 0) {
errorLog(Error::E_IMPORT_VALID_FAILED, $valid['errmsg']);
return $valid;
}
......
......@@ -17,4 +17,6 @@ class Error
const E_ADD_FAILED = -10011; // 添加失败
const E_UPDATE_FAILED = -10012; // 更新失败
const E_IMPORT_TEMP_ERR = -10013; // 导入模板错误
const E_IMPORT_VALID_FAILED = -10014; // 导入验证失败
};
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
use Request;
use Excel;
use DB;
class OrderActionLogModel extends Model
{
protected $connection = 'order';
protected $table = 'lie_order_action_log';
protected $primaryKey = 'log_id';
public $timestamps = false;
/**
* 操作记录
* @param [Integer] $order_id [订单ID]
* @param [Integer] $operator_id [操作人]
* @param [Integer] $operator_type [操作人类型:1.网站用户,2.CMS用户, 3-系统定时任务,4-ERP,5-WMS,6-中金]
* @param [string] $event [操作事件]
* @return [type] [description]
*/
public function addLog($order_id, $operator_id, $operator_type = 1, $event='')
{
$log['order_id'] = $order_id;
$log['operator_id'] = $operator_id;
$log['operator_type'] = $operator_type;
$log['event'] = $event;
$log['ip'] = get_client_ip(0, true);
$log['create_time'] = time();
$actionLog = $this->insert($log);
if (!$actionLog) return false;
return $actionLog;
}
}
\ No newline at end of file
......@@ -8,15 +8,15 @@
$('.update_express').click(function(){
var content = '<div class="form-group">'+
'<label>深圳市内:</label>'+
'<input type="text" name="sz_inside" class="sz_inside" value="" placeholder="输入快递费用,如20.00" style="width:70%;">'+
'<input type="text" name="sz_inside" class="sz_inside" value="'+express_fee.sz_inside+'" placeholder="输入快递费用,如20.00" style="width:70%;">'+
'</div>'+
'<div class="form-group">'+
'<label>广东省内:</label>'+
'<input type="text" name="gd_inside" class="gd_inside" value="" placeholder="输入快递费用,如20.00" style="width:70%;">'+
'<input type="text" name="gd_inside" class="gd_inside" value="'+express_fee.gd_inside+'" placeholder="输入快递费用,如20.00" style="width:70%;">'+
'</div>'+
'<div class="form-group">'+
'<label>广东省外:</label>'+
'<input type="text" name="gd_outside" class="gd_outside" value="" placeholder="输入快递费用,如20.00" style="width:70%;">'+
'<input type="text" name="gd_outside" class="gd_outside" value="'+express_fee.gd_outside+'" placeholder="输入快递费用,如20.00" style="width:70%;">'+
'</div>';
layer.open({
......
......@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>订单管理后台 | 首页</title>
<title>订单管理后台 | 账期申请列表</title>
<script>document.domain="{{ Config::get('website.domain') }}";</script>
<link href="/js/layui/css/layui.css" rel="stylesheet">
@include('index.css')
......
......@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>订单管理后台 | 首页</title>
<title>订单管理后台 | PCB首页</title>
<script>document.domain="{{ Config::get('website.domain') }}";</script>
<link href="/js/layui/css/layui.css" rel="stylesheet">
@include('index.css')
......
......@@ -15,7 +15,7 @@
</div>
<div class="layui-inline">
<label class="layui-form-label">是否包括测试:</label>
<div class="layui-input-inline">
<div class="layui-input-inline" style="top:9px">
<input type="checkbox" lay-ignore name="test_order" <?php if (@$_GET['test_order']) echo "checked='checked'" ?> >
</div>
</div>
......
......@@ -568,7 +568,7 @@
</div>
<?php $client_source = App\Http\Controllers\clientSource($order_info['user_id']); ?>
@if (!empty($client_source) || $order_info['status'] == -1)
@if (!empty($client_source))
<div class="tabs-box table-responsive">
<table class="table table-bordered table-hover">
@if (!empty($client_source))
......@@ -577,13 +577,6 @@
<td colspan="3">{{ $client_source }}</td>
</tr>
@endif
@if ($order_info['status'] == -1)
<tr>
<td width="10%">订单取消原因:</td>
<td colspan="3">{{ $order_info['cancel_reason'] }}</td>
</tr>
@endif
</table>
</div>
@endif
......
......@@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>订单管理后台 | 订单统计</title>
<title>订单管理后台 | 快递费用配置</title>
<script>document.domain="{{ Config::get('website.domain') }}";</script>
@include('express_set.css')
......
......@@ -34,5 +34,8 @@
</div>
<script>
var express_fee = '<?= json_encode($express_fee) ?>';
express_fee = eval('('+express_fee+')');
$.lie.express.index();
</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