123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366 |
- @extends('admin/master')
- @section('content')
- <body>
- @if(count($errors) > 0)
- <div class="Huialert Huialert-info" id="error">
- @foreach($errors->all() as $error)
- <li>{{$error}}</li>
- @endforeach
- </div>
- @endif
- <style type="text/css">
- #good_sku{
- position: absolute;
- z-index: 9;
- background: #ffffff;
- box-shadow: 1px 1px 1px 1px #ccc;
- width: calc(100% - 30px);
- }
- #good_sku li{
- font-size: 12px;
- line-height: 24px;
- cursor: pointer;
- padding: 5px 10px;
- }
- #good_sku li:hover{
- background: #eaeaea;
- }
- </style>
- <div class="page-container">
- <form id='order-form' action="/admin/customerServiceAfterSale/update" method="post" class="form form-horizontal" enctype="multipart/form-data" onkeypress="return event.keyCode != 13;">
- <input type="hidden" name="_token" value="{{ csrf_token() }}" />
- @if($order)
- <input type="hidden" name="id" value="{{$id}}" />
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2">
- <font color='red'>* </font>买家姓名:</label>
- <div class="formControls col-xs-6 col-sm-6">
- <span>{{$order['customerName']}}</span>
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2">
- <font color='red'>* </font>买家手机号:</label>
- <div class="formControls col-xs-6 col-sm-6">
- <span>{{$order['buyer_phone']}}</span>
- </div>
- </div>
- <div id='use_coupon_div' class="row cl" @if($order['use_coupon'] !='1' && $cust_info['coupons'] != '1') style="display: none" @endif>
- <label class="form-label col-xs-4 col-sm-2">
- <font color='red'>* </font>是否使用优惠券:</label>
- <div class="formControls col-xs-6 col-sm-6">
- @if($order['use_coupon']=='0') 否 @else 是 @endif
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2">
- <font color='red'>* </font>收件人姓名:</label>
- <div class="formControls col-xs-6 col-sm-6">
- <span>{{$order['receiverName']}}</span>
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2">
- <font color='red'>* </font>收件人手机号:</label>
- <div class="formControls col-xs-6 col-sm-6">
- <span>{{$order['receiverMobile']}}</span>
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2">
- <font color='red'>* </font>省/直辖市:</label>
- <div class="formControls col-xs-6 col-sm-6">
- <span>{{$order['receiverState']}}</span>
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2">
- <font color='red'>* </font>市:</label>
- <div class="formControls col-xs-6 col-sm-6">
- <span>{{$order['receiverCity']}}</span>
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2">
- <font color='red'>* </font>详细地址:</label>
- <div class="formControls col-xs-6 col-sm-6">
- <span>{{$order['receiverAddress']}}</span>
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2">
- <font color='red'>* </font>预发货时间:</label>
- <div class="formControls col-xs-6 col-sm-6">
- <span>{{$order['delivery_date']}}</span>
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2">
- <font color='red'>* </font>发货仓库:</label>
- <div class="formControls col-xs-6 col-sm-6">
- <span>
- {{$warehouseArr[$order['warehouse']]}}
- </span>
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2">
- <font color='red'>* </font>已选择商品:</label>
- <div id='goods_o' class="formControls col-xs-6 col-sm-6">
- @if($order['goods'])
- @foreach($order['goods'] as $k=>$good)
- <p>{{$good['name']}} 【 规格:{{$good['props_name']}} 库存:{{$good['quantity_str']}}】
- <input type='hidden' name='skus[]' value="{{$good['sku_id']}}" />
- <p>原订单@if($good['is_weigh']==0) 数量 @else重量 @endif{{$good['num']}}<input type="hidden" name="oldnums[]" value="{{$good['num']}}"></p>
- <font style="font-weight: bold;">修改后@if($good['is_weigh']==0) 数量 @else重量 @endif</font>
- <button style='width:14px;' type='button' onclick="cut_num({{$good['sku_id']}},{{$good['price']}})">-</button><input style='width:45px;' id='gnum{{$good["sku_id"]}}' class='gnums' price='{{$good["price"]}}' is_weigh='{{$good["is_weigh"]}}' quantity='{{$good["quantity"]}}' is_white='{{$good["is_white"]}}' type='text' name='gnum[]' value='{{$good["new_num"]}}' /><button style='width:14px;' type='button' onclick="add_num({{$good['sku_id']}},{{$good['price']}})">+</button>@if($good['is_weigh']==1)(斤)
- @if($good['is_weigh']==1) <font color='red'>(称重商品,至少0.5斤) </font> @endif @else :{{$good["new_num"]}} @if($good['is_weigh']==1)斤【称重商品】 @endif<input type='hidden' id='gnum{{$good["sku_id"]}}' class='gnums' price='{{$good["price"]}}' name='gnum[]' value='{{$good["new_num"]}}' /> @endif </p>
- <br>
- @endforeach
- @endif
- </div>
- </div>
- <div class="row cl">
- <label for="" class="form-label col-xs-4 col-sm-2">
- <font color='red'>* </font>售后类型:</label>
- <div class="formControls col-xs-6 col-sm-6">
- <input type="radio" name="service_type" value="1" @if($order['service_type'] == 1) checked @endif>退补
- <input type="radio" name="service_type" value="2" @if($order['service_type'] == 2) checked @endif>售后
- </div>
- </div>
- <div class="row cl" style='display: none'>
- <label class="form-label col-xs-4 col-sm-2">应收金额:</label>
- <div class="formControls col-xs-6 col-sm-6">
- <span>{{$order['should_amount']}}</span>
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2">
- <font color='red'>* </font>实付金额:</label>
- <div class="formControls col-xs-6 col-sm-6">
- <span>{{$order['receivedAmount']}}</span>
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2">
- <font color='red'>* </font>支付方式:</label>
- <div class="formControls col-xs-6 col-sm-6">
- <span>
- @if($order['payment_type']=='1') 微信支付 @endif
- @if($order['payment_type']=='2') 付款码支付 @endif
- @if($order['payment_type']=='3') 个体户支付 @endif
- @if($order['payment_type']=='4') 充值卡支付 @endif
- </span>
- </div>
- </div>
- @if($order['payment_type'] != 4)
- <div class="row cl" style="display: none" id='deposit_div'>
- <label class="form-label col-xs-4 col-sm-2">
- <font color='red'> </font>充值卡号:</label>
- <div class="formControls col-xs-6 col-sm-6">
- </div>
- </div>
- @else
- <div class="row cl" id='deposit_div'>
- <label class="form-label col-xs-4 col-sm-2">
- <font color='red'> </font>充值卡号:</label>
- <div class="formControls col-xs-6 col-sm-6">
- <span>{{$deposit_phone}}</span>
- </div>
- </div>
- @endif
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2">
- <font color='red'>* </font>是否退补单:</label>
- <div class="formControls col-xs-6 col-sm-6">
- <span>
- @if($order['is_refund']=='0') 否 @endif
- @if($order['is_refund']=='1') 是 @endif
- </span>
- </div>
- </div>
- {{--<div class="row cl">--}}
- {{--<label class="form-label col-xs-4 col-sm-2">应该退补差价:</label>--}}
- {{--<div class="formControls col-xs-6 col-sm-6">--}}
- {{--<span>{{$order['refund_price']}}</span>--}}
- {{--</div>--}}
- {{--</div>--}}
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2">
- <font color='red'>* </font>是否复购:</label>
- <div class="formControls col-xs-6 col-sm-6">
- <span>
- @if($order['is_fugou']=='0') 否 @endif
- @if($order['is_fugou']=='1') 是 @endif
- </span>
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2">
- <font color='red'>* </font>是否退款:</label>
- <div class="formControls col-xs-6 col-sm-6">
- <span>
- @if($order['order_status']=='0') 否 @endif
- @if($order['order_status']=='2') 是 @endif
- </span>
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2">
- <font color='red'>* </font>下单时间:</label>
- <div class="formControls col-xs-6 col-sm-6">
- <span>{{$order['createTime']}}</span>
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2">买家备注:</label>
- <div class="formControls col-xs-6 col-sm-6">
- <textarea class="textarea" placeholder="填写买家备注..." readonly>{{$order['buyerMemo']}}</textarea>
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2">卖家备注:</label>
- <div class="formControls col-xs-6 col-sm-6">
- <textarea class="textarea" placeholder="填写卖家备注..." readonly>{{$order['sellerMemo']}}</textarea>
- </div>
- </div>
- @endif
- <div class="row cl">
- <div class="col-9 col-offset-2">
- <button class="btn btn-primary radius" type="button" onclick="to_submit()" value=" 提交 "> 提交 </button>
- <button class="btn btn-default" type="reset" onclick="return_index();"> 返回 </button>
- </div>
- </div>
- </form>
- </div>
- <!--_footer 作为公共模版分离出去-->
- <script type="text/javascript" src="/admin/lib/jquery/1.9.1/jquery.min.js"></script>
- <script type="text/javascript" src="/admin/lib/layer/2.4/layer.js"></script>
- <script type="text/javascript" src="/admin/static/h-ui/js/H-ui.min.js"></script>
- <script type="text/javascript" src="/admin/static/h-ui.admin/js/H-ui.admin.js"></script>
- <!--/_footer 作为公共模版分离出去-->
- <!--请在下方写此页面业务相关的脚本-->
- <script type="text/javascript" src="/admin/lib/My97DatePicker/4.8/WdatePicker.js"></script>
- <script type="text/javascript">
- $(function(){
- setTimeout("$('#error').hide()",3000);
- });
- /*返回*/
- function return_index(){
- location.href='/admin/customerServiceAfterSale/index';
- }
- function add_num(sku_id, price){
- var gnum = $("#gnum"+sku_id).val();
- var n = gnum;
- n = parseFloat(n)+1
- $("#gnum"+sku_id).val(n);
- // sync_money()
- return false;
- }
- function cut_num(sku_id, price){
- var gnum = $("#gnum"+sku_id).val();
- var n = gnum;
- if(n <= 1){
- return false;
- }
- n = parseFloat(n)-1;
- $("#gnum"+sku_id).val(n);
- // sync_money()
- return false;
- }
- function sync_money(){
- var gnums = new Array();
- var total = 0;
- $('.gnums').each(function(key, value){
- var gnum = $(this).val();
- var price = $(this).attr('price');
- total = total + parseFloat(price) * parseFloat(gnum);
- });
- if(total>0){
- $("#should_amount").val(total);
- $("#should_amount_show").html(total);
- }else{
- $("#should_amount").val('');
- $("#should_amount_show").html('');
- }
- return false;
- }
- $('body').on('click', function(){
- $('input[name=goods_name]').on('click',function(e){
- e.stopPropagation();
- });
- document.getElementById('good_sku').style.display='none'
- })
- function to_submit(){
- if(!form_verify()){
- return false;
- }
- $(".btn").attr("disabled",true);
- $("#order-form").submit();
- return true;
- }
- function weigh_verify(){
- var if_no = 0;
- $('.gnums').each(function(key, value){
- var gnum = $(this).val();
- gnum = parseFloat(gnum);
- var is_weigh = $(this).attr('is_weigh');
- if(gnum<0.5){
- if_no = 1;
- return;
- }
- if(is_weigh == 0 && gnum%1 != 0){
- if_no = 2;
- return;
- }
- if(is_weigh == 1 && gnum%0.5 != 0){
- if_no = 3;
- return;
- }
- // var quantity = $(this).attr('quantity');
- // var is_white = $(this).attr('is_white');
- // if(is_white==0 && gnum>quantity){
- // if_no=4;
- // return;
- // }
- });
- return if_no;
- }
- function form_verify(){
- //验证称重>0.5
- var if_no = weigh_verify();
- if(if_no > 0){
- if(if_no == 1){
- layer.msg('商品数量填写有误!',{icon:2,time:1500});
- }
- if(if_no == 2){
- layer.msg('非称重商品数量必须为整数!',{icon:2,time:1500});
- }
- if(if_no == 3){
- layer.msg('称重商品重量必须为0.5的倍数!',{icon:2,time:1500});
- }
- if(if_no == 4){
- layer.msg('商品数量不得大于库存量!',{icon:2,time:1500});
- }
- return false;
- }
- return true;
- }
- </script>
- </body>
- @endsection
|