Commit 6d4f21e1 by 朱继来

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

parents 3b41c2e9 6b098035
...@@ -187,9 +187,9 @@ Class AddOrderController extends Controller ...@@ -187,9 +187,9 @@ Class AddOrderController extends Controller
$invoice = DB::connection('order')->table('lie_taxinfo')->where('tax_id', $tax_id)->first(); $invoice = DB::connection('order')->table('lie_taxinfo')->where('tax_id', $tax_id)->first();
$invoice->province_val = $this->getAddress($invoice->consignee_province); $invoice->province_val = $invoice->consignee_province ? $this->getAddress($invoice->consignee_province) : '';
$invoice->city_val = $this->getAddress($invoice->consignee_city); $invoice->city_val = $invoice->consignee_city ? $this->getAddress($invoice->consignee_city) : '';
$invoice->district_val = $this->getAddress($invoice->consignee_district); $invoice->district_val = $invoice->consignee_district ? $this->getAddress($invoice->consignee_district) : '';
return ['errcode' => 0, 'errmsg' => '', 'data' => $invoice]; return ['errcode' => 0, 'errmsg' => '', 'data' => $invoice];
} }
...@@ -394,17 +394,20 @@ Class AddOrderController extends Controller ...@@ -394,17 +394,20 @@ Class AddOrderController extends Controller
} }
} }
// 获取自营运费 // 确认订单信息
public function getExpressFee(Request $request) public function confirm(Request $request)
{ {
if ($request->isMethod('post')) { if ($request->isMethod('post')) {
$data['uid'] = $request->input('uid'); $data['uid'] = $request->input('uid', 0);
$data['address_id'] = $request->input('address_id'); $data['address_id'] = $request->input('address_id', 0);
$data['cart_id'] = $request->input('cart_ids', '');
$data['user_coupon_id'] = $request->input('user_coupon_id', 0);
$data['type'] = $request->input('goods_type');
$data['k1'] = time(); $data['k1'] = time();
$data['k2'] = md5(md5($data['k1']).'fh6y5t4rr351d2c3bryi'); $data['k2'] = md5(md5($data['k1']).'fh6y5t4rr351d2c3bryi');
$url = Config('website.api_domain').'cart/getExpressFeeByOrder'; $url = Config('website.api_domain').'cart/confirm';
$response = json_decode(curlApi($url, $data), true); $response = json_decode(curlApi($url, $data), true);
...@@ -425,6 +428,7 @@ Class AddOrderController extends Controller ...@@ -425,6 +428,7 @@ Class AddOrderController extends Controller
$data['address_id'] = $request->input('address_id'); $data['address_id'] = $request->input('address_id');
$data['cart_id'] = implode(',', $request->input('cart_ids')); $data['cart_id'] = implode(',', $request->input('cart_ids'));
$data['type'] = $request->input('type'); $data['type'] = $request->input('type');
$data['remark'] = $request->input('remark');
if ($data['type'] == 3) { // 自营线下订单 if ($data['type'] == 3) { // 自营线下订单
$data['address_name'] = $request->input('address_name'); $data['address_name'] = $request->input('address_name');
...@@ -437,7 +441,8 @@ Class AddOrderController extends Controller ...@@ -437,7 +441,8 @@ Class AddOrderController extends Controller
$data['k1'] = time(); $data['k1'] = time();
$data['k2'] = md5(md5($data['k1']).'fh6y5t4rr351d2c3bryi'); $data['k2'] = md5(md5($data['k1']).'fh6y5t4rr351d2c3bryi');
$url = Config('website.api_domain').'order/createByOrderSystem'; // $url = Config('website.api_domain').'order/createByOrderSystem';
$url = Config('website.api_domain').'order/create';
$response = json_decode(curlApi($url, $data), true); $response = json_decode(curlApi($url, $data), true);
......
...@@ -361,8 +361,8 @@ Class OrderController extends Controller ...@@ -361,8 +361,8 @@ Class OrderController extends Controller
{ {
$info = $this->getOrderInfo($request, 1); $info = $this->getOrderInfo($request, 1);
// 若为京东自营角色,则跳转到自营列表 // 若为京东自营、自营客服角色,则跳转到自营列表
if ($info['role'] == 6) { if (in_array($info['role'], [6, 7])) {
return redirect('self_order'); return redirect('self_order');
} }
...@@ -612,6 +612,7 @@ Class OrderController extends Controller ...@@ -612,6 +612,7 @@ Class OrderController extends Controller
array('brand_name', '制造商'), array('brand_name', '制造商'),
array('goods_number', '数量'), array('goods_number', '数量'),
array('goods_price', '单价'), array('goods_price', '单价'),
array('single_pre_price', '均摊后单价'),
array('goods_amount', '商品小计'), array('goods_amount', '商品小计'),
array('goods_sum', '商品总额'), array('goods_sum', '商品总额'),
array('shipping_fee', '运费'), array('shipping_fee', '运费'),
...@@ -772,7 +773,7 @@ Class OrderController extends Controller ...@@ -772,7 +773,7 @@ Class OrderController extends Controller
}) })
->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('it.goods_id', 'it.goods_name', 'it.goods_number', 'it.goods_price', 'it.brand_name', 'o.order_id', 'o.order_sn', 'o.order_pay_type', 'o.order_goods_type', 'o.order_source', 'o.create_time', 'o.status', 'o.order_amount', 'o.currency', 'o.sale_id', 'o.cancel_reason', 'i.tax_title', 'i.inv_type', 'i.invoice_status', 'a.consignee', 's.status as shipping_status', 'u.user_id', 'u.mobile', 'u.email', 'u.client_source', 'c.com_name', 'oe.send_remark') ->select('it.goods_id', 'it.goods_name', 'it.goods_number', 'it.goods_price', 'it.single_pre_price', 'it.brand_name', 'o.order_id', 'o.order_sn', 'o.order_pay_type', 'o.order_goods_type', 'o.order_source', 'o.create_time', 'o.status', 'o.order_amount', 'o.currency', 'o.sale_id', 'o.cancel_reason', 'i.tax_title', 'i.inv_type', 'i.invoice_status', 'a.consignee', 's.status as shipping_status', 'u.user_id', 'u.mobile', 'u.email', 'u.client_source', 'c.com_name', 'oe.send_remark')
->groupBy('it.rec_id') ->groupBy('it.rec_id')
->orderBy('o.create_time', 'DESC') ->orderBy('o.create_time', 'DESC')
->get(); ->get();
...@@ -866,6 +867,7 @@ Class OrderController extends Controller ...@@ -866,6 +867,7 @@ Class OrderController extends Controller
$tmp[$i]['goods_name'] = $order[$i]->order_goods_type == 1 ? $order[$i]->goods_name : getGoodsName($order[$i]->goods_id); $tmp[$i]['goods_name'] = $order[$i]->order_goods_type == 1 ? $order[$i]->goods_name : getGoodsName($order[$i]->goods_id);
$tmp[$i]['goods_number'] = $order[$i]->goods_number; $tmp[$i]['goods_number'] = $order[$i]->goods_number;
$tmp[$i]['goods_price'] = $order[$i]->goods_price; $tmp[$i]['goods_price'] = $order[$i]->goods_price;
$tmp[$i]['single_pre_price'] = $order[$i]->single_pre_price;
$tmp[$i]['goods_amount'] = $order[$i]->goods_number*$order[$i]->goods_price; $tmp[$i]['goods_amount'] = $order[$i]->goods_number*$order[$i]->goods_price;
$tmp[$i]['brand_name'] = $order[$i]->brand_name; $tmp[$i]['brand_name'] = $order[$i]->brand_name;
......
...@@ -55,6 +55,8 @@ ...@@ -55,6 +55,8 @@
return 5; return 5;
} else if ($department->name == '京东自营') { } else if ($department->name == '京东自营') {
return 6; return 6;
} else if ($department->name == '自营客服') {
return 7;
} else { } else {
return 0; return 0;
} }
......
...@@ -87,7 +87,7 @@ Route::group(['middleware' => 'web'], function () { ...@@ -87,7 +87,7 @@ Route::group(['middleware' => 'web'], function () {
Route::post('/ajax/getCoupon', 'AddOrderController@getCoupon'); Route::post('/ajax/getCoupon', 'AddOrderController@getCoupon');
Route::get('/add_online', 'AddOrderController@addOnline'); Route::get('/add_online', 'AddOrderController@addOnline');
Route::post('/ajax/getExpressFee', 'AddOrderController@getExpressFee'); Route::post('/ajax/confirm', 'AddOrderController@confirm');
Route::get('/add_offline', 'AddOrderController@addOffline'); Route::get('/add_offline', 'AddOrderController@addOffline');
Route::post('/ajax/getSku', 'AddOrderController@getSku'); Route::post('/ajax/getSku', 'AddOrderController@getSku');
......
...@@ -147,6 +147,14 @@ li { ...@@ -147,6 +147,14 @@ li {
text-align: right; text-align: right;
display: none; display: none;
} }
#remark {
border-radius: 4px;
padding: 5px;
resize: none;
}
.preferential_price{ /* 优惠金额 */
display: none;
}
/*提交订单成功页面*/ /*提交订单成功页面*/
.section-1, .section-3{ .section-1, .section-3{
......
...@@ -197,6 +197,8 @@ ...@@ -197,6 +197,8 @@
</thead> </thead>
<tbody></tbody> <tbody></tbody>
</table> </table>
<textarea name="remark" id="remark" class="form-control" placeholder="填写订单备注信息"></textarea>
</div> </div>
<!-- 订单金额 --> <!-- 订单金额 -->
......
...@@ -124,9 +124,9 @@ ...@@ -124,9 +124,9 @@
<label class="radio-inline"> <label class="radio-inline">
<input type="radio" name="inv_type" class="radio-inv-type" value="4"> 增值税普通发票 <input type="radio" name="inv_type" class="radio-inv-type" value="4"> 增值税普通发票
</label> </label>
<label class="radio-inline"> <!-- <label class="radio-inline">
<input type="radio" name="inv_type" class="radio-inv-type" value=""> 不开发票 <input type="radio" name="inv_type" class="radio-inv-type" value=""> 不开发票
</label> </label> -->
</div> </div>
</div> </div>
...@@ -343,6 +343,8 @@ ...@@ -343,6 +343,8 @@
</thead> </thead>
<tbody></tbody> <tbody></tbody>
</table> </table>
<textarea name="remark" id="remark" class="form-control" placeholder="填写订单备注信息"></textarea>
</div> </div>
</div> </div>
...@@ -351,11 +353,7 @@ ...@@ -351,11 +353,7 @@
<h3>订单信息</h3> <h3>订单信息</h3>
</div> </div>
<div class="ibox-content"> <div class="ibox-content">
<input type="hidden" class="currency" name="currency" value="¥">
<input type="hidden" class="goods_amount" name="goods_amount" value="0">
<input type="hidden" class="express_fee" name="express_fee" value="0">
<div class="row"> <div class="row">
<p class="con-title"><span>商品总额:</span></p> <p class="con-title"><span>商品总额:</span></p>
<p class="con-val goods_amount_val"></p> <p class="con-val goods_amount_val"></p>
...@@ -371,15 +369,20 @@ ...@@ -371,15 +369,20 @@
</p> </p>
</div> </div>
<div class="row preferential_price">
<p class="con-title"><span>优惠金额:</span></p>
<p class="con-val preferential_price_val">0.00</p>
</div>
<div class="row"> <div class="row">
<p class="con-title"><span>运费:</span></p> <p class="con-title"><span>运费:</span></p>
<p class="con-val express_fee_val">0.00</p> <p class="con-val express_fee_val">0.00</p>
</div> </div>
<div class="row"> <div class="row">
<p class="con-title"><span>应付金额:</span></p> <p class="con-title"><span>应付金额:</span></p>
<p class="con-val text-danger order_amount"></p> <p class="con-val text-danger order_amount"></p>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -361,8 +361,10 @@ ...@@ -361,8 +361,10 @@
<th width="5%">操作</th> <th width="5%">操作</th>
</tr> </tr>
</thead> </thead>
<tbody></tbody> <tbody></tbody>
</table> </table>
<textarea name="remark" id="remark" class="form-control" placeholder="填写订单备注信息"></textarea>
</div> </div>
</div> </div>
...@@ -372,9 +374,6 @@ ...@@ -372,9 +374,6 @@
</div> </div>
<div class="ibox-content"> <div class="ibox-content">
<input type="hidden" class="currency" name="currency" value="">
<input type="hidden" class="goods_amount" name="goods_amount" value="">
<div class="row"> <div class="row">
<p class="con-title"><span>商品总额:</span></p> <p class="con-title"><span>商品总额:</span></p>
<p class="con-val goods_amount_val"></p> <p class="con-val goods_amount_val"></p>
...@@ -389,11 +388,16 @@ ...@@ -389,11 +388,16 @@
</select> </select>
</p> </p>
</div> </div>
<div class="row preferential_price">
<p class="con-title"><span>优惠金额:</span></p>
<p class="con-val preferential_price_val">0.00</p>
</div>
<div class="row"> <div class="row">
<p class="con-title"><span>应付金额:</span></p> <p class="con-title"><span>应付金额:</span></p>
<p class="con-val text-danger order_amount"></p> <p class="con-val text-danger order_amount"></p>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -110,6 +110,7 @@ ...@@ -110,6 +110,7 @@
<input class="only_positive_nubme only_number num" name="change_info[{{$v['rec_id']}}][goods_number]" value="{{$v['goods_number']}}"> <input class="only_positive_nubme only_number num" name="change_info[{{$v['rec_id']}}][goods_number]" value="{{$v['goods_number']}}">
</td> </td>
<td> <td>
<span>{{$currency}}</span>
<input class="price only_number" name="change_info[{{$v['rec_id']}}][goods_price]" data-origin="{{$v['original_price']}}" value="{{$v['goods_price']}}"> <input class="price only_number" name="change_info[{{$v['rec_id']}}][goods_price]" data-origin="{{$v['original_price']}}" value="{{$v['goods_price']}}">
</td> </td>
<!-- 销售类型为预售时展示 --> <!-- 销售类型为预售时展示 -->
...@@ -160,6 +161,7 @@ ...@@ -160,6 +161,7 @@
<p class="sup_amount_val">{{$v['amount']}}</p> <p class="sup_amount_val">{{$v['amount']}}</p>
</td> </td>
<td> <td>
<span>{{$currency}}</span>
<input class="adjust_extend_fee only_number" name="change_extend_fee[{{$k}}][extend_fee]" value="{{$v['extend_fee']}}"> <input class="adjust_extend_fee only_number" name="change_extend_fee[{{$k}}][extend_fee]" value="{{$v['extend_fee']}}">
</td> </td>
......
...@@ -458,7 +458,12 @@ ...@@ -458,7 +458,12 @@
@endif @endif
</tbody> </tbody>
<tfoot> <tfoot>
@if ($order_info['order_remark'])
<tr>
<td>订单备注信息:</td>
<td colspan="8">{{$order_info['order_remark']}}</td>
</tr>
@endif
</tfoot> </tfoot>
</table> </table>
</div> </div>
......
...@@ -256,7 +256,7 @@ ...@@ -256,7 +256,7 @@
<div class="btn-group btn-group-xs"> <div class="btn-group btn-group-xs">
<a class="btn btn-primary" href="/details/{{$v['order_id']}}?tags=self" target="_blank">详情</a> <a class="btn btn-primary" href="/details/{{$v['order_id']}}?tags=self" target="_blank">详情</a>
@if (in_array('download_contract', $userPerms)) @if (in_array('self_order_download_contract', $userPerms))
<a class="btn btn-default download-contract" data-id="{{$v['order_id']}}" href="javascript:;">下载合同</a> <a class="btn btn-default download-contract" data-id="{{$v['order_id']}}" href="javascript:;">下载合同</a>
@endif @endif
</div> </div>
......
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