Commit 9b8d3f77 by 朱继来

Merge branch 'zjl_iteration_20190416' into development

parents d46ea5f0 c95f35bb
......@@ -632,8 +632,8 @@ Class AddOrderController extends Controller
Excel::load($filePath, function($reader) use(&$excel){
$data = $reader->getSheet(0);
$excel = $data->toArray();
});
}, 'GBK');
if (empty($excel)) return ['errcode' => 1, 'errmsg' => '未获取到模板内容,请检查模板内容数据格式'];
$type = $request->input('type'); // 1.联营 2.自营
......@@ -651,6 +651,8 @@ Class AddOrderController extends Controller
return ['errcode' => 1, 'errmsg' => '导入模板错误,需导入'.$type_val.'模板'];
}
$excel = $this->handleData($excel, $map); // 处理数据
// 验证excel内容
$valid = $this->excelValid($excel);
......@@ -661,10 +663,8 @@ Class AddOrderController extends Controller
array_shift($excel); // 删除第一行
$goods_info = $this->handleData($excel, $map); // 处理数据
// 推送到API
$data['data'] = $goods_info;
$data['data'] = $excel;
$data['operator_id'] = $request->user->userId;
$data['type'] = 3; // 后台批量添加标记
$data['uid'] = $request->input('user_id');
......@@ -709,6 +709,14 @@ Class AddOrderController extends Controller
break;
}
}
// 自营ID、采购数量和单价为数字类型
if ($k == 'id' || $k == 'num' || $k == 'goods_price') {
if (!preg_match('/\d/', $v)) {
$err = ['errcode' => 2, 'errmsg' => $required[$k].'列,第'.$key.'行格式错误'];
break;
}
}
}
}
});
......
......@@ -731,27 +731,28 @@ Class OrderController extends Controller
$client_source = $request->input('client_source') == 1 ? $request->input('input-other-source') : $request->input('client_source');
$resData = [
"user_id" => $request->input('user_id', ''),
"cancel_reason" => $request->input('cancel_reason', ''),
"sale_id" => $request->input('sale_id', ''),
"order_pay_type" => $request->input('order_pay_type', '') ? $request->input('order_pay_type') : 1,
"status" => $request->input('order_status', '') ? $request->input('order_status') : 2,
"deposit_amount" => $request->input('deposit_amount', ''),
"goods_amount" => $request->input('goods_amount', ''),
"order_amount" => $request->input('order_amount', ''),
"extra_fee" => $request->input('extra_fee', ''),
"change_info" => $request->input('change_info', ''),
"pay_time_limit" => $pay_time_limit,
"check_failed" => $request->input('check_failed', ''),
"user_id" => $request->input('user_id', ''),
"cancel_reason" => $request->input('cancel_reason', ''),
"sale_id" => $request->input('sale_id', ''),
"order_pay_type" => $request->input('order_pay_type', '') ? $request->input('order_pay_type') : 1,
"status" => $request->input('order_status', '') ? $request->input('order_status') : 2,
"deposit_amount" => $request->input('deposit_amount', ''),
"goods_amount" => $request->input('goods_amount', ''),
"order_amount" => $request->input('order_amount', ''),
"extra_fee" => $request->input('extra_fee', ''),
"change_info" => $request->input('change_info', ''),
"pay_time_limit" => $pay_time_limit,
"check_failed" => $request->input('check_failed', ''),
"check_failed_info" => $request->input('check_failed_info', ''),
"change_pay_type" => $request->input('change_pay_type', ''),
"order_id" => $order_id,
'operator_id' => $request->user->userId,
"pf" => 1,
"k1" => $check['k1'],
"k2" => $check['k2'],
"client_source" => $client_source,
"change_pay_type" => $request->input('change_pay_type', ''),
"order_id" => $order_id,
'operator_id' => $request->user->userId,
"pf" => 1,
"k1" => $check['k1'],
"k2" => $check['k2'],
"client_source" => $client_source,
"change_extend_fee" => $request->input('change_extend_fee', ''),
"kefu_remark" => $request->input('kefu_remark', ''),
];
$temp = json_decode(curlApi($url, $resData, "POST"), true);
......
......@@ -582,7 +582,7 @@
// 上传文件
var form = $('<form id="formUpload" method="post" enctype="multipart/form-data">\
<input type="file" name="upload" id="fileInput" accept="application/vnd.ms-excel, application/x-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet">\
<input type="file" name="upload" id="fileInput" accept="application/vnd.ms-excel, application/x-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, .csv">\
</form>');
var type = $(this).data('type'); // 1-联营模板,2-自营模板
......
......@@ -93,7 +93,7 @@
<div class="batch-btn">
<a class="btn btn-success goods_import" data-type="2">批量导入物料</a>
<a class="btn btn-info" href="http://img.ichunt.com/doc/excel/template/%E8%87%AA%E8%90%A5%E8%AE%A2%E5%8D%95%E6%89%B9%E9%87%8F%E6%B7%BB%E5%8A%A0%E6%A8%A1%E6%9D%BF.xlsx">自营物料模板下载</a>
<a class="btn btn-info" href="http://img.ichunt.com/doc/excel/template/%E8%87%AA%E8%90%A5%E8%AE%A2%E5%8D%95%E6%89%B9%E9%87%8F%E6%B7%BB%E5%8A%A0%E6%A8%A1%E6%9D%BF.csv">自营物料模板下载</a>
</div>
</div>
</div>
......
......@@ -228,7 +228,7 @@
<div class="batch-btn">
<a class="btn btn-success goods_import" data-type="2">批量导入物料</a>
<a class="btn btn-info" href="http://img.ichunt.com/doc/excel/template/%E8%87%AA%E8%90%A5%E8%AE%A2%E5%8D%95%E6%89%B9%E9%87%8F%E6%B7%BB%E5%8A%A0%E6%A8%A1%E6%9D%BF.xlsx">自营物料模板下载</a>
<a class="btn btn-info" href="http://img.ichunt.com/doc/excel/template/%E8%87%AA%E8%90%A5%E8%AE%A2%E5%8D%95%E6%89%B9%E9%87%8F%E6%B7%BB%E5%8A%A0%E6%A8%A1%E6%9D%BF.csv">自营物料模板下载</a>
</div>
</div>
</div>
......
......@@ -247,7 +247,7 @@
<div class="batch-btn">
<a class="btn btn-success goods_import" data-type="1">批量导入物料</a>
<a class="btn btn-info" href="http://img.ichunt.com/doc/excel/template/%E8%81%94%E8%90%A5%E8%AE%A2%E5%8D%95%E6%89%B9%E9%87%8F%E6%B7%BB%E5%8A%A0%E6%A8%A1%E6%9D%BF.xlsx">联营物料模板下载</a>
<a class="btn btn-info" href="http://img.ichunt.com/doc/excel/template/%E8%81%94%E8%90%A5%E8%AE%A2%E5%8D%95%E6%89%B9%E9%87%8F%E6%B7%BB%E5%8A%A0%E6%A8%A1%E6%9D%BF.csv">联营物料模板下载</a>
</div>
</div>
</div>
......
......@@ -146,6 +146,8 @@
@endforeach
</tbody>
</table>
<textarea name="kefu_remark" id="kefu_remark" class="form-control" placeholder="客服备注信息" style="resize: none;">{{$order_temp_info['kefu_remark']}}</textarea>
@if ($order_info['order_goods_type'] == 2)
<table class="table table-bordered table-hover">
......
......@@ -478,6 +478,13 @@
<td colspan="10">{{$order_info['order_remark']}}</td>
</tr>
@endif
@if ($order_temp_info['kefu_remark'])
<tr>
<td>客服备注信息:</td>
<td colspan="10">{{$order_temp_info['kefu_remark']}}</td>
</tr>
@endif
</tfoot>
</table>
......
......@@ -18,8 +18,8 @@
<dd style="width:auto !important;">
<div class="droplist" data-default="{{$condition['order_type']}}" id="order_type" name="order_type">
<ul class="dropdown-menu">
<li class="order_type_tab active" data-val="">会员账</li>
<li class="order_type_tab" data-val="1">订单编</li>
<li class="order_type_tab active" data-val="">订单编</li>
<li class="order_type_tab" data-val="1">会员账</li>
<li class="order_type_tab" data-val="2">型号名称</li>
</ul>
</div>
......
......@@ -17,9 +17,9 @@
<dt>查询类型:</dt>
<dd style="width:auto !important;">
<div class="droplist" data-default="{{$condition['order_type']}}" id="order_type" name="order_type">
<ul class="dropdown-menu">
<li class="order_type_tab active" data-val="">会员账号</li>
<li class="order_type_tab" data-val="1">订单编号</li>
<ul class="dropdown-menu">
<li class="order_type_tab active" data-val="">订单编号</li>
<li class="order_type_tab" data-val="1">会员账号</li>
<li class="order_type_tab" data-val="2">型号名称</li>
</ul>
</div>
......
......@@ -17,9 +17,9 @@
<dt>查询类型:</dt>
<dd style="width:auto !important;">
<div class="droplist" data-default="{{$condition['order_type']}}" id="order_type" name="order_type">
<ul class="dropdown-menu">
<li class="order_type_tab active" data-val="">会员账号</li>
<li class="order_type_tab" data-val="1">订单编号</li>
<ul class="dropdown-menu">
<li class="order_type_tab active" data-val="">订单编号</li>
<li class="order_type_tab" data-val="1">会员账号</li>
<li class="order_type_tab" data-val="2">型号名称</li>
<li class="order_type_tab" data-val="3">发票抬头</li>
</ul>
......
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