123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853 |
- @extends('admin/master')
- @section('content')
- <body>
- <div class="page-container">
- <div>
- <div>
-
- <a class="btn btn-primary radius" onclick="order_add('新增', 0)" href="javascript:;"><i class="Hui-iconfont"></i> 新增订单</a>
- <input class="input-text" style="width:5%;text-align:center" type="text" value="订单编号"/>
- <input id="id" type="text" class="input-text" style="width:6%;text-align:center" name="id" value="{{$id?$id:''}}">
- @if($search_admin == 1)
- <input class="input-text" style="width:5%;text-align:center" type="text" value="所属销售"/>
- <select style="width:6%;text-align:center" id='admin_id' name="admin_id">
- <option value="0" @if($admin_id=='') selected @endif>-- 选择销售 --</option>
- @foreach($adminlist as $v)
- <option value="{{$v['id']}}" @if($admin_id==$v['id']) selected @endif>{{$v['realname']}}</option>
- @endforeach
- </select>
- @endif
- <input class="input-text" style="width:5%;text-align:center" type="text" value="开始时间"/>
- <input id="stime" type="text" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd' })" autocomplete="off" class="input-text Wdate" style="width:7%;text-align:center;margin-left: -5px" name="stime" value="{{$stime?$stime:''}}">
- <input class="input-text" style="width:5%;text-align:center" type="text" value="结束时间"/>
- <input id="etime"type="text" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd' })" autocomplete="off" class="input-text Wdate" style="width:7%;text-align:center;margin-left: -5px" name="etime" value="{{$etime?$etime:''}}">
- <input class="input-text" style="width:5%;text-align:center" type="text" value="收货人"/>
- <input id="receiverName" type="text" class="input-text" style="width:6%;text-align:center" name="receiverName" value="{{$receiverName?$receiverName:''}}">
- <input class="input-text" style="width:5%;text-align:center" type="text" value="手机号"/>
- <input id="receiverMobile" type="text" class="input-text" style="width:6%;text-align:center" name="receiverMobile" value="{{$receiverMobile?$receiverMobile:''}}">
- <input class="input-text" style="width:5%;text-align:center" type="text" value="订单状态"/>
- <select style="width:6%;text-align:center" id='status' name="status">
- <option value="-1" @if($status=='-1') selected @endif>-- 请选择--</option>
- @if($self_role !='管理员' && $self_role != '分销管理员' )<option value="0" @if($status==0) selected @endif>已录入</option> @endif
- <option value="1" @if($status==1) selected @endif>待审核</option>
- <option value="2" @if($status==2) selected @endif>已审核</option>
- <option value="3" @if($status==3) selected @endif>已发货</option>
- <option value="4" @if($status==4) selected @endif>已退款</option>
- </select>
-
- <div style="float:right">
- <a class="btn btn-primary radius" onclick="user_search()" href="javascript:;">搜索</a>
- <a class="btn btn-primary radius" onclick="order_export()" href="javascript:;"> 导出订单</a>
- <!--a class="btn btn-primary radius" onclick="order_verify_more()" href="javascript:;"><i class="Hui-iconfont"></i> 批量审核</a-->
- </div>
- </div>
- </div>
-
- <div class="mt-20">
- @if($overtime && $self_role !='销售' && $self_role != '分销销售' && $self_role != '分销管理员')
- <font color='red'>
- 超一天未发订单量:【{{$overtime['count']}}单】 订单ID:【
- @foreach($overtime['list'] as $k=>$oid)
- @if($k == $overtime['count']-1) <a style="text-decoration: underline;color:blue;" href='index?id={{$oid}}'>{{$oid}}</a> @else <a style="text-decoration: underline;color:blue;" href='index?id={{$oid}}'>{{$oid}},</a> @endif
- @endforeach
- 】
- </font>
- @endif
- <table class="table table-border table-bordered table-bg table-hover table-sort">
- <thead>
- <tr class="text-c">
- <th width="4%"><!--input type="checkbox" id="selected-all"-->订单编号</th>
- <th width="4%">卖家云订单编号</th>
- <th width="4%">买家名称</th>
- <th width="4%">收货人</th>
- <th width="4%">收货人手机号</th>
- <th width="5%">收货地址</th>
- <th width="8%">商品信息</th>
- <th width="4%">预发货时间</th>
- <th width="5%">物流单号</th>
- <th width="4%">发货时间</th>
- @if($self_role !='销售' )
- <th width="3%">货品成本</th>
- <th width="3%">运费成本</th>
- @endif
- <th width="4%">发货仓库</th>
- <th width="4%">付款金额</th>
- <th width="4%">付款方式</th>
- <th width="5%">下单时间</th>
- <th width="4%">加粉时间</th>
- <th width="2%">是否复购</th>
- <th width="2%">是否退补单</th>
- <th width="4%">应该退补差价</th>
- <th width="4%">退补付款方式</th>
- <th width="5%">退补备注</th>
- <th width="5%">退补时间</th>
- <th width="4%">所属销售</th>
- <th width="4%">订单状态</th>
- <th width="4%">审核时间</th>
- @if($self_role =='销售' || $self_role =='分销销售' )<th width="5%">驳回原因</th>@endif
- <th width="5%">买家备注</th>
- <th width="5%">卖家备注</th>
- <th width="5%">发货备注</th>
- <th width="5%">售后费用</th>
- <th width="5%">售后原因</th>
- <th width="5%">售后时间</th>
- <th width="5%">操作</th>
- </tr>
- </thead>
- <tbody>
- @if($result)
- @foreach($result as $a)
- <tr class="text-c" style=" text-align:center;">
- <td><!--input type="checkbox" name="id[]" value="{{$a['id']}}"--> {{$a['id']}}</td>
- <td>{{$a['orderCode']}}</td>
- <td>{{$a['customerName']}}</td>
- <td>{{$a['receiverName']}}</td>
- <td>{{$a['receiverMobile']}}</td>
- <td>{{$a['receiverState']}}{{$a['receiverCity']}}{{$a['receiverDistrict']}}{{$a['receiverStreet']}}{{$a['receiverAddress']}}</td>
- <td>
- @if( is_array($a['goods']) && $a['warehouse'] == 3)
- @foreach($a['goods'] as $good)
- <p>{{$good}}</p>
- @endforeach
- @else
- {{$a['goods_note']}}
- @endif
- </td>
- <td>{{$a['delivery_date']}}</td>
- @if($self_role =='销售' || $self_role =='分销销售' || ($self_role =='管理员' || $self_role =='分销管理员' && $a['status']>0) )
- <td>{{$a['logistics_id']}}</td>
- @else
- <td class ="change_logistics_id">
- <p id="logi_1{{$a['id']}}">{{$a['logistics_id']}}</p>
- <input id="logi_2{{$a['id']}}" style="display: none" type='text' autofocus="autofocus" name='logistics_id' value="{{$a['logistics_id']}}" onblur="change_logistics_id({{$a['id']}})" />
- <span class="sort_icon" hidden onClick='change_logistics_click("{{$a['id']}}","{{$a['logistics_id']}}")' style="cursor:pointer"><i class="Hui-iconfont"></i></span>
- </td>
- @endif
- <td class ="change_logistics_id">
- <p id="send_time_1{{$a['id']}}">{{$a['send_time']}}</p>
- <input id="send_time_2{{$a['id']}}" style="display: none" name='send_time' onblur="change_send_time({{$a['id']}})" value="{{$a['send_time']}}" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd' })" class=" Wdate" />
- <span class="sort_icon" hidden onClick='change_send_time_click("{{$a['id']}}","{{$a['send_time']}}")' style="cursor:pointer"><i class="Hui-iconfont"></i></span>
- </td>
-
- @if($self_role !='销售' )
- @if($self_role =='管理员' || $self_role =='分销管理员' && $a['status']>0)
- <td>{{$a['cost']}}</td>
- <td>{{$a['freight_cost']}}</td>
- @else
- <td class ="change_logistics_id">
- <p id="cost_1{{$a['id']}}">{{$a['cost']}}</p>
- <input id="cost_2{{$a['id']}}" style="display: none" type='text' name='cost' value="{{$a['cost']}}" onblur="change_cost({{$a['id']}})" />
- <span class="sort_icon" hidden onClick='change_cost_click("{{$a['id']}}","{{$a['cost']}}")' style="cursor:pointer"><i class="Hui-iconfont"></i></span>
- </td>
- <td class ="change_logistics_id">
- <p id="freight_cost_1{{$a['id']}}">{{$a['freight_cost']}}</p>
- <input id="freight_cost_2{{$a['id']}}" style="display: none" type='text' name='freight_cost' value="{{$a['freight_cost']}}" onblur="change_freight_cost({{$a['id']}})" />
- <span class="sort_icon" hidden onClick='change_freight_cost_click("{{$a['id']}}","{{$a['freight_cost']}}")' style="cursor:pointer"><i class="Hui-iconfont"></i></span>
- </td>
- @endif
- @endif
- <td>@if($a['warehouse']==1) A仓库 @elseif($a['warehouse']==2) B仓库 @elseif($a['warehouse']==3) C仓库 @else @endif</td>
- <td>{{$a['receivedAmount']}}</td>
- <td>{{$a['payment_type']}}</td>
- <td>{{$a['createTime']}}</td>
- <td>{{$a['fanTime']}}</td>
- <td>@if($a['is_fugou']==1) 是 @else 否 @endif</td>
- <td>@if($a['is_refund']==1) 是 @else 否 @endif</td>
- <td class ="change_logistics_id">
- <p id="refund_price_1{{$a['id']}}">{{$a['refund_price']}}</p>
- <input id="refund_price_2{{$a['id']}}" style="display: none" type='text' name='refund_price' value="{{$a['refund_price']}}" onblur='change_refund_price({{$a['id']}},"{{$a['refund_type']}}")' />
- <span class="sort_icon" hidden onClick='change_refund_price_click("{{$a['id']}}","{{$a['cost']}}")' style="cursor:pointer"><i class="Hui-iconfont"></i></span>
- </td>
- <td class ="change_logistics_id">
- <p id="refund_type_1{{$a['id']}}">{{$a['refund_type']}}</p>
- <select id="refund_type_2{{$a['id']}}" style="display: none" name='refund_type' value="{{$a['refund_type']}}" onchange="change_refund_type({{$a['id']}})">
- <option value='0'>-请选择-</option>
- <option value='1'>微信支付</option>
- <!--option value='2'>付款码支付</option-->
- <option value='3'>个体户支付</option>
- </select>
- <span class="sort_icon" hidden onClick='change_refund_type_click("{{$a['id']}}","{{$a['cost']}}")' style="cursor:pointer"><i class="Hui-iconfont"></i></span>
- </td>
-
- <td class ="change_logistics_id">
- <p id="refund_note_1{{$a['id']}}">{{$a['refund_note']}}</p>
- <textarea id="refund_note_2{{$a['id']}}" rows=4 style="display: none" name='refund_note' onblur="change_refund_note({{$a['id']}})" >{{$a['refund_note']}}</textarea>
- <span class="sort_icon" hidden onClick='change_refund_note_click("{{$a['id']}}","{{$a['refund_note']}}")' style="cursor:pointer"><i class="Hui-iconfont"></i></span>
- </td>
- <td class ="change_logistics_id">
- <p id="refund_time_1{{$a['id']}}">{{$a['refund_time']}}</p>
- <input id="refund_time_2{{$a['id']}}" style="display: none" name='refund_time' onblur="change_refund_time({{$a['id']}})" value="{{$a['refund_time']}}" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss' })" class=" Wdate" />
- <span class="sort_icon" hidden onClick='change_refund_time_click("{{$a['id']}}","{{$a['refund_time']}}")' style="cursor:pointer"><i class="Hui-iconfont"></i></span>
- </td>
- <td>{{$a['admin_name']}}</td>
- <td id="order_verify{{$a['id']}}">{{$a['status_name']}}</td>
- <td>{{$a['verify_time']}}</td>
- @if($self_role =='销售' || $self_role =='分销销售') <td>@if($a['status'] == 0)<font color='red'> {{$a['refuse_reason']}} </font> @endif</td> @endif
-
- <!--td id="refund{{$a['id']}}">@if($a['order_status']==2) <span class="btn btn-danger radius">退款</span> @else 正常<br><span class="btn btn-primary radius" onclick="order_refund({{$a['id']}})">设为退款</span> @endif</td -->
- @if(($self_role =='销售' || $self_role =='管理员' || $self_role =='分销销售' ) && $a['status']>0)
- <td>{{$a['buyerMemo']}}</td>
- <td>{{$a['sellerMemo']}}</td>
- <td>{{$a['send_note']}}</td>
- @else
- <td class ="change_logistics_id">
- <p id="buyerMemo_1{{$a['id']}}">{{$a['buyerMemo']}}</p>
- <input id="buyerMemo_2{{$a['id']}}" style="display: none" type='text' name='buyerMemo' value="{{$a['buyerMemo']}}" onblur="change_buyerMemo({{$a['id']}})" />
- <span class="sort_icon" hidden onClick='change_buyerMemo_click("{{$a['id']}}","{{$a['cost']}}")' style="cursor:pointer"><i class="Hui-iconfont"></i></span>
- </td>
- <td class ="change_logistics_id">
- <p id="sellerMemo_1{{$a['id']}}">{{$a['sellerMemo']}}</p>
- <input id="sellerMemo_2{{$a['id']}}" style="display: none" type='text' name='sellerMemo' value="{{$a['sellerMemo']}}" onblur="change_sellerMemo({{$a['id']}})" />
- <span class="sort_icon" hidden onClick='change_sellerMemo_click("{{$a['id']}}","{{$a['cost']}}")' style="cursor:pointer"><i class="Hui-iconfont"></i></span>
- </td>
-
- <td class ="change_logistics_id">
- <p id="send_note_1{{$a['id']}}">{{$a['send_note']}}</p>
- <textarea id="send_note_2{{$a['id']}}" rows=4 style="display: none" name='send_note' onblur="change_send_note({{$a['id']}})" >{{$a['send_note']}}</textarea>
- <span class="sort_icon" hidden onClick='change_send_note_click("{{$a['id']}}","{{$a['send_note']}}")' style="cursor:pointer"><i class="Hui-iconfont"></i></span>
- </td>
- @endif
- @if($self_role =='超级管理员' || $self_role =='售后管理员')
- <td class ="change_logistics_id">
- <p id="aftersale_fee_1{{$a['id']}}">{{$a['aftersale_fee']}}</p>
- <input id="aftersale_fee_2{{$a['id']}}" style="display: none" type='text' name='aftersale_fee' value="{{$a['aftersale_fee']}}" onblur="change_aftersale_fee({{$a['id']}})" />
- <span class="sort_icon" hidden onClick='change_aftersale_fee_click("{{$a['id']}}","{{$a['cost']}}")' style="cursor:pointer"><i class="Hui-iconfont"></i></span>
- </td>
- <td class ="change_logistics_id">
- <p id="aftersale_reason_1{{$a['id']}}">{{$a['aftersale_reason']}}</p>
- <textarea id="aftersale_reason_2{{$a['id']}}" rows=4 style="display: none" name='aftersale_reason' onblur="change_aftersale_reason({{$a['id']}})" >{{$a['aftersale_reason']}}</textarea>
- <span class="sort_icon" hidden onClick='change_aftersale_reason_click("{{$a['id']}}","{{$a['aftersale_reason']}}")' style="cursor:pointer"><i class="Hui-iconfont"></i></span>
- </td>
- <td class ="change_logistics_id">
- <p id="aftersale_time_1{{$a['id']}}">{{$a['aftersale_time']}}</p>
- <input id="aftersale_time_2{{$a['id']}}" style="display: none" name='aftersale_time' onblur="change_aftersale_time({{$a['id']}})" value="{{$a['aftersale_time']}}" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss' })" class=" Wdate" />
- <span class="sort_icon" hidden onClick='change_aftersale_time_click("{{$a['id']}}","{{$a['aftersale_time']}}")' style="cursor:pointer"><i class="Hui-iconfont"></i></span>
- </td>
- @else
- <td>{{$a['aftersale_fee']}}</td>
- <td>{{$a['aftersale_reason']}}</td>
- <td>{{$a['aftersale_time']}}</td>
- @endif
- <td>
- @if($a['enable_status'])
- @foreach($a['enable_status'] as $item)
- @if($item['status'] == 0)
- <a id="verify_refuse" style="text-decoration:none" onClick='refuse_reason("{{$a['id']}}")' href="javascript:;" title="审核驳回"><span class="btn btn-danger radius">审核驳回</span></a>
- @elseif($item['status']==3)
- @else
- <a id="verify" style="text-decoration:none" onClick='order_verify("{{$a['id']}}", "{{$item['status']}}", "{{$item['name']}}")' href="javascript:;" title="{{$item['name']}}"><span class="btn btn-primary radius">{{$item['name']}}</span></a>
- @endif
- @endforeach
- @endif
- @if(($self_role =='销售' || $self_role =='分销销售') && $a['status']>0)
- @else
- @if($self_role !='超级管理员' && $self_role !='售后管理员' && $a['status']>1 || $a['status']==4)
- @else
- <a style="text-decoration:none" onClick='order_edit("编辑","{{$a['id']}}")' href="javascript:;" title="编辑"><span class="btn btn-primary radius">编辑</span></a>
- @endif
- @if($a['status'] >= 3)
- @elseif($a['status'] == 2 && $self_role !='超级管理员' && $self_role !='售后管理员')
- @else
- <a style="text-decoration:none" onClick='order_del("删除","{{$a['id']}}","{{$a['is_cannot_del']}}")' href="javascript:;" title="删除"><span class="btn btn-danger radius">删除</span></a>
- @endif
- @endif
- @if($a['warehouse']==3 && $a['status']>=2 && $a['status']<4 && ($self_role=='超级管理员' || $self_role=='售后管理员'))
- <a style="text-decoration:none" onClick='set_refund("{{$a['id']}}")' href="javascript:;" title="设为已退款"><span class="btn btn-danger radius">设为已退款</span></a>
- @endif
- @if($a['status'] == 4)
- 已退款订单
- @endif
- </td>
-
- </tr>
- @endforeach
- @endif
- </tbody>
- </table>
- </div>
- <!--弹出层 推入分组-->
- <div id="modal-demo1" class="modal fade" tabnonautomatic_index="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
- <div class="modal-dialog">
- <div class="modal-content radius">
- <div class="modal-body" style="height:150px">
- <div id="fa2">
- <p style="font-size:14px">驳回原因:</p>
- <input id='order_id' type='hidden' name='status' value=''/>
- <textarea style="height:75px;" cols="85" id='refuse_reason'></textarea>
- </div>
-
- <div style="float:right">
- <button class="btn btn-primary radius" onclick='verify_refuse()' value=" 确定 "> 确定 </button>
- <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!--弹出层 推入分组-->
- <div id="modal-demo2" class="modal fade" tabnonautomatic_index="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
- <div class="modal-dialog">
- <div class="modal-content radius">
- <div class="modal-body" style="height:340px">
- <div class="cl pd-5 bg-1 bk-gray mt-20">
-
- <form class="form form-horizontal" method="POST" action="/admin/fxorder/setrefundinfo" enctype="multipart/form-data">
- <input type="hidden" name="_token" value="{{ csrf_token() }}" />
- <input id='refund_id' type="hidden" name="refund_id" value=""/>
- <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">
- <input type="text" class="input-text" value="" placeholder="请填写退款金额" name="refund_money">
- </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">
- <input id="ad_time" type="text" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss' })" class="input-text Wdate" style="width:70%;text-align:center;" name="refund_time" value="{{$thisTime}}">
- </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="请填写退款原因" name="refund_reason"></textarea>
- </div>
- </div>
- <div class="row cl">
- <div class="col-9 col-offset-2">
- <button type="submit" class="btn btn-primary radius">提交</button>
- <button class="btn radius" data-dismiss="modal" aria-hidden="true">关闭</button>
- </div>
- </div>
- </form>
- </div>
- <br>
- {{--<div style="float:right">--}}
- {{--<button class="btn btn-primary radius" onclick='submits(this,"{{$page}}")' value=" 确定 "> 确定 </button> --}}
- {{--<button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>--}}
- {{--</div>--}}
- </div>
- </div>
- </div>
- </div>
- <div id="page" class="page_div"></div>
- </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>
- <script type="text/javascript" src="/admin/lib/page/paging.js"></script>
- <script type="text/javascript" src="/admin/lib/My97DatePicker/4.8/WdatePicker.js"></script>
- <!--/_footer 作为公共模版分离出去-->
- <!--/_footer 作为公共模版分离出去-->
- <script type="text/javascript">
- /*广告-添加*/
- function order_add(title){
- sessionStorage.setItem('goods_o_con','');
- location.href="/admin/fxorder/create";
- }
- /*广告-编辑*/
- function order_edit(title,id){
- var page = {{$page}};
- var admin_id = $('#admin_id').val();
- var stime = $('#stime').val();
- var etime = $('#etime').val();
- var receiverName = $('#receiverName').val();
- var receiverMobile = $('#receiverMobile').val();
- var last_url = '{{$last_url}}';
- location.href="/admin/fxorder/edit/"+id+'?page='+page+'&admin_id='+admin_id+'&stime='+stime+'&etime='+etime+'&receiverName='+receiverName+'&receiverMobile='+receiverMobile+'&last_url='+last_url;
- }
- /*广告-设为首页显示*/
- function up(obj,id){
- layer.confirm('确认要设为首页显示吗?',function(index){
- location.href='/admin/fxorder/up/'+id;
- });
- }
- /*广告-移除*/
- function order_del(obj,id,is_cannot_del){
- var msg = '确认要删除吗?';
- if(is_cannot_del){
- var msg = '该订单已打单待发货,请务必联系仓库管理员确认可以删除该订单,是否继续删除?'
- }
- layer.confirm(msg,function(index){
- location.href='/admin/fxorder/delete/'+id;
- });
- }
- /*广告-移除*/
- function set_refund(id){
- $("#refund_id").val(id);
- $("#modal-demo2").modal("show");
- }
- /*广告-设为首页隐藏*/
- function down(obj,id){
- layer.confirm('确认要设为首页隐藏吗?',function(index){
- location.href='/admin/fxorder/down/'+id;
- });
- }
- function user_search(){
- var admin_id = $('#admin_id').val();
- var stime = $('#stime').val();
- var etime = $('#etime').val();
- var receiverName = $('#receiverName').val();
- var receiverMobile = $('#receiverMobile').val();
- var status = $('#status').val();
- var id = $('#id').val();
- var warehouse = $('#warehouse').val();
- //var page = {{$page}};
- location.href = 'index?admin_id='+admin_id+'&stime='+stime+'&etime='+etime+'&receiverName='+receiverName+'&receiverMobile='+receiverMobile+'&status='+status+'&id='+id + '&warehouse=' + warehouse;
- }
- //导出
- function order_export(){
- var admin_id = $('#admin_id').val();
- var stime = $('#stime').val();
- var etime = $('#etime').val();
- var receiverName = $('#receiverName').val();
- var receiverMobile = $('#receiverMobile').val();
- var status = $('#status').val();
- var id = $('#id').val();
- var warehouse = $('#warehouse').val();
- location.href = '/admin/fxorder/order_export?admin_id='+admin_id+'&stime='+stime+'&etime='+etime+'&receiverName='+receiverName+'&receiverMobile='+receiverMobile+'&status='+status+'&id='+id + '&warehouse=' + warehouse;
- }
- function change_logistics_click(id, logistics_id){
- $("#logi_1"+id).hide();
- $("#logi_2"+id).show();
- $("#logi_2"+id).focus();
- }
- function change_logistics_id(id){
- var logistics_id = $("#logi_2"+id).val();
- $.ajax({
- url: '/admin/fxorder/editLogisticsId?id='+id+'&logistics_id='+logistics_id,
- type: 'get',
- dateType: 'json',
- success:function(msg){
- $("#logi_1"+id).html(logistics_id);
- $("#logi_1"+id).show();
- $("#logi_2"+id).hide();
- }
- });
- }
- function change_cost_click(id, cost){
- $("#cost_1"+id).hide();
- $("#cost_2"+id).show();
- $("#cost_2"+id).focus();
- }
- function change_cost(id){
- var cost = $("#cost_2"+id).val();
- $.ajax({
- url: '/admin/fxorder/editLogisticsId?id='+id+'&cost='+cost,
- type: 'get',
- dateType: 'json',
- success:function(msg){
- $("#cost_1"+id).html(cost);
- $("#cost_1"+id).show();
- $("#cost_2"+id).hide();
- }
- });
- }
- function change_freight_cost_click(id, freight_cost){
- $("#freight_cost_1"+id).hide();
- $("#freight_cost_2"+id).show();
- $("#freight_cost_2"+id).focus();
- }
- function change_freight_cost(id){
- var freight_cost = $("#freight_cost_2"+id).val();
- $.ajax({
- url: '/admin/fxorder/editLogisticsId?id='+id+'&freight_cost='+freight_cost,
- type: 'get',
- dateType: 'json',
- success:function(msg){
- $("#freight_cost_1"+id).html(freight_cost);
- $("#freight_cost_1"+id).show();
- $("#freight_cost_2"+id).hide();
- }
- });
- }
- function change_buyerMemo_click(id, buyerMemo){
- $("#buyerMemo_1"+id).hide();
- $("#buyerMemo_2"+id).show();
- $("#buyerMemo_2"+id).focus();
- }
- function change_buyerMemo(id){
- var buyerMemo = $("#buyerMemo_2"+id).val();
- $.ajax({
- url: '/admin/fxorder/editLogisticsId?id='+id,
- type: 'get',
- data: {buyerMemo:buyerMemo},
- dateType: 'json',
- success:function(msg){
- $("#buyerMemo_1"+id).html(buyerMemo);
- $("#buyerMemo_1"+id).show();
- $("#buyerMemo_2"+id).hide();
- }
- });
- }
- function change_sellerMemo_click(id, sellerMemo){
- $("#sellerMemo_1"+id).hide();
- $("#sellerMemo_2"+id).show();
- $("#sellerMemo_2"+id).focus();
- }
- function change_sellerMemo(id){
- var sellerMemo = $("#sellerMemo_2"+id).val();
- $.ajax({
- url: '/admin/fxorder/editLogisticsId?id='+id,
- type: 'get',
- dateType: 'json',
- data: {sellerMemo:sellerMemo},
- success:function(msg){
- $("#sellerMemo_1"+id).html(sellerMemo);
- $("#sellerMemo_1"+id).show();
- $("#sellerMemo_2"+id).hide();
- }
- });
- }
- function change_send_note_click(id, send_note){
- $("#send_note_1"+id).hide();
- $("#send_note_2"+id).show();
- $("#send_note_2"+id).focus();
- }
- function change_send_note(id){
- var send_note = $("#send_note_2"+id).val();
- $.ajax({
- url: '/admin/fxorder/editLogisticsId?id='+id,
- type: 'get',
- data: {send_note:send_note},
- dateType: 'json',
- success:function(msg){
- $("#send_note_1"+id).html(send_note);
- $("#send_note_1"+id).show();
- $("#send_note_2"+id).hide();
- }
- });
- }
- function change_aftersale_fee_click(id, aftersale_fee){
- $("#aftersale_fee_1"+id).hide();
- $("#aftersale_fee_2"+id).show();
- $("#aftersale_fee_2"+id).focus();
- }
- function change_aftersale_fee(id){
- var aftersale_fee = $("#aftersale_fee_2"+id).val();
- $.ajax({
- url: '/admin/fxorder/editLogisticsId?id='+id+'&aftersale_fee='+aftersale_fee,
- type: 'get',
- dateType: 'json',
- success:function(msg){
- $("#aftersale_fee_1"+id).html(aftersale_fee);
- $("#aftersale_fee_1"+id).show();
- $("#aftersale_fee_2"+id).hide();
- }
- });
- }
- function change_aftersale_time_click(id, aftersale_time){
- $("#aftersale_time_1"+id).hide();
- $("#aftersale_time_2"+id).show();
- $("#aftersale_time_2"+id).focus();
- }
- function change_aftersale_time(id){
- var aftersale_time = $("#aftersale_time_2"+id).val();
- if(!aftersale_time){
- return false;
- }
- $.ajax({
- url: '/admin/fxorder/editLogisticsId?id='+id+'&aftersale_time='+aftersale_time,
- type: 'get',
- dateType: 'json',
- success:function(msg){
- $("#aftersale_time_1"+id).html(aftersale_time);
- $("#aftersale_time_1"+id).show();
- $("#aftersale_time_2"+id).hide();
- }
- });
- }
- function change_refund_time_click(id, refund_time){
- $("#refund_time_1"+id).hide();
- $("#refund_time_2"+id).show();
- $("#refund_time_2"+id).focus();
- }
- function change_refund_time(id){
- var refund_time = $("#refund_time_2"+id).val();
- if(!refund_time){
- return false;
- }
- $.ajax({
- url: '/admin/fxorder/editLogisticsId?id='+id+'&refund_time='+refund_time,
- type: 'get',
- dateType: 'json',
- success:function(msg){
- $("#refund_time_1"+id).html(refund_time);
- $("#refund_time_1"+id).show();
- $("#refund_time_2"+id).hide();
- }
- });
- }
- function change_send_time_click(id, send_time){
- $("#send_time_1"+id).hide();
- $("#send_time_2"+id).show();
- $("#send_time_2"+id).focus();
- }
- function change_send_time(id){
- var send_time = $("#send_time_2"+id).val();
- if(!send_time){
- return false;
- }
- $.ajax({
- url: '/admin/fxorder/editLogisticsId?id='+id+'&send_time='+send_time,
- type: 'get',
- dateType: 'json',
- success:function(msg){
- $("#send_time_1"+id).html(send_time);
- $("#send_time_1"+id).show();
- $("#send_time_2"+id).hide();
- }
- });
- }
- function change_aftersale_reason_click(id, aftersale_reason){
- $("#aftersale_reason_1"+id).hide();
- $("#aftersale_reason_2"+id).show();
- $("#aftersale_reason_2"+id).focus();
- }
- function change_aftersale_reason(id){
- var aftersale_reason = $("#aftersale_reason_2"+id).val();
- $.ajax({
- url: '/admin/fxorder/editLogisticsId?id='+id,
- type: 'get',
- data: {aftersale_reason:aftersale_reason},
- dateType: 'json',
- success:function(msg){
- $("#aftersale_reason_1"+id).html(aftersale_reason);
- $("#aftersale_reason_1"+id).show();
- $("#aftersale_reason_2"+id).hide();
- }
- });
- }
- function change_refund_note_click(id, refund_note){
- $("#refund_note_1"+id).hide();
- $("#refund_note_2"+id).show();
- $("#refund_note_2"+id).focus();
- }
- function change_refund_note(id){
- var refund_note = $("#refund_note_2"+id).val();
- $.ajax({
- url: '/admin/fxorder/editLogisticsId?id='+id,
- type: 'get',
- data: {refund_note:refund_note},
- dateType: 'json',
- success:function(msg){
- $("#refund_note_1"+id).html(refund_note);
- $("#refund_note_1"+id).show();
- $("#refund_note_2"+id).hide();
- }
- });
- }
- function change_refund_price_click(id, refund_price){
- $("#refund_price_1"+id).hide();
- $("#refund_price_2"+id).show();
- $("#refund_price_2"+id).focus();
- }
- function change_refund_price(id, refund_type){
- var refund_price = $("#refund_price_2"+id).val();
- $.ajax({
- url: '/admin/fxorder/editLogisticsId?id='+id+'&refund_price='+refund_price,
- type: 'get',
- dateType: 'json',
- success:function(msg){
- $("#refund_price_1"+id).html(refund_price);
- if(!refund_type){
- $("#refund_type_1"+id).html('微信支付');
- }
- $("#refund_price_1"+id).show();
- $("#refund_price_2"+id).hide();
- }
- });
- }
- function change_refund_type_click(id, refund_type){
- $("#refund_type_1"+id).hide();
- $("#refund_type_2"+id).show();
- $("#refund_type_2"+id).focus();
- }
- function change_refund_type(id){
- var refund_type = $("#refund_type_2"+id).val();
- $.ajax({
- url: '/admin/fxorder/editLogisticsId?id='+id+'&refund_type='+refund_type,
- type: 'get',
- dateType: 'json',
- success:function(msg){
- if(refund_type==1){
- refund_type = '微信支付';
- }
- if(refund_type==2){
- refund_type = '付款码支付';
- }
- if(refund_type==3){
- refund_type = '个体户支付';
- }
- if(refund_type==0){
- refund_type = '';
- }
- $("#refund_type_1"+id).html(refund_type);
- $("#refund_type_1"+id).show();
- $("#refund_type_2"+id).hide();
- }
- });
- }
- function order_refund(id){
- $.ajax({
- url: '/admin/fxorder/setrefund/'+id,
- type: 'get',
- dateType: 'json',
- success:function(msg){
- var str = '<span class="btn btn-danger radius">退款</span>';
- $("#refund"+id).html(str);
- }
- });
- }
- function order_verify(id, status, name){
- if( !confirm('确认'+name) ){
- return false;
- }
- var admin_id = $('#admin_id').val();
- var stime = $('#stime').val();
- var etime = $('#etime').val();
- var receiverName = $('#receiverName').val();
- var receiverMobile = $('#receiverMobile').val();
- var page = {{$page}};
- var str_query = 'page='+page+'&admin_id='+admin_id+'&stime='+stime+'&etime='+etime+'&receiverName='+receiverName+'&receiverMobile='+receiverMobile;
- location.href = '/admin/fxorder/setverify/'+id+'?status='+status+'&'+str_query;
- }
- function order_verify_more(){
- var ids = $(":checkbox[name='id[]']:checked").serialize();
- var idLength = $(":checkbox[name='id[]']:checked").length;
- if (idLength < 1) {
- alert("请至少选中一项");
- return false;
- }
- var ids = $(":checkbox[name='id[]']:checked").serialize();
- var admin_id = $('#admin_id').val();
- var stime = $('#stime').val();
- var etime = $('#etime').val();
- var receiverName = $('#receiverName').val();
- var receiverMobile = $('#receiverMobile').val();
- var page = {{$page}};
- location.href = '/admin/fxorder/setverifymore?'+ids+'&page='+page+'&admin_id='+admin_id+'&stime='+stime+'&etime='+etime+'&receiverName='+receiverName+'&receiverMobile='+receiverMobile;
- }
- /*弹出层-填写原因*/
- function refuse_reason(id) {
- $("#order_id").val(id);
- $("#modal-demo1").modal("show");
- }
- function verify_refuse(){
- var reason = $("#refuse_reason").val();
- var id = $("#order_id").val();
- var status = 0;
- var admin_id = $('#admin_id').val();
- var stime = $('#stime').val();
- var etime = $('#etime').val();
- var receiverName = $('#receiverName').val();
- var receiverMobile = $('#receiverMobile').val();
- var page = {{$page}};
- var str_query = 'page='+page+'&admin_id='+admin_id+'&stime='+stime+'&etime='+etime+'&receiverName='+receiverName+'&receiverMobile='+receiverMobile;
- location.href = '/admin/fxorder/setverify/'+id+'?status='+status+'&refuse_reason='+reason+'&'+str_query;
- }
- $(".change_logistics_id").mouseover(
- function(){
- $(this).children("span").show();
- $(this).children("span").addClass('f-18 c-success');
- $(this).mouseout(
- function(){
- $(this).children("span").hide();
- }
- );
- }
- );
-
- /*分页*/
-
- $("#page").paging({
- pageNo:{{$page}},
- totalPage: {{$pages}},
- totalSize: {{$count}},
- callback: function(num) {
- var admin_id = $('#admin_id').val();
- var stime = $('#stime').val();
- var etime = $('#etime').val();
- var receiverName = $('#receiverName').val();
- var receiverMobile = $('#receiverMobile').val();
- var status = $('#status').val();
- var id = $('#id').val();
- var warehouse = $('#warehouse').val();
- location.href = 'index?page='+num+'&admin_id='+admin_id+'&stime='+stime+'&etime='+etime+'&receiverName='+receiverName+'&receiverMobile='+receiverMobile+'&status='+status+'&id='+id + '&warehouse=' + warehouse;
- }
- })
-
- </script>
-
- </body>
- @endsection
|