暫無描述

orderlist.blade.php 40KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754
  1. @extends('admin/master')
  2. @section('content')
  3. <body>
  4. <div class="page-container">
  5. <div>
  6. <div>
  7. <a class="btn btn-primary radius" onclick="order_add('新增', 0)" href="javascript:;"><i class="Hui-iconfont">&#xe600;</i> 新增订单</a>
  8. <input class="input-text" style="width:5%;text-align:center" type="text" value="订单编号"/>
  9. <input id="id" type="text" class="input-text" style="width:6%;text-align:center" name="id" value="{{$id?$id:''}}">
  10. @if($search_admin == 1)
  11. <input class="input-text" style="width:5%;text-align:center" type="text" value="所属销售"/>
  12. <select style="width:6%;text-align:center" id='admin_id' name="admin_id">
  13. <option value="0" @if($admin_id=='') selected @endif>-- 选择销售 --</option>
  14. @foreach($adminlist as $v)
  15. <option value="{{$v['id']}}" @if($admin_id==$v['id']) selected @endif>{{$v['realname']}}</option>
  16. @endforeach
  17. </select>
  18. @endif
  19. <input class="input-text" style="width:5%;text-align:center" type="text" value="开始时间"/>
  20. <input id="stime" type="text" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd' })" class="input-text Wdate" style="width:7%;text-align:center;margin-left: -5px" name="stime" value="{{$stime?$stime:''}}">
  21. <input class="input-text" style="width:5%;text-align:center" type="text" value="结束时间"/>
  22. <input id="etime"type="text" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd' })" class="input-text Wdate" style="width:7%;text-align:center;margin-left: -5px" name="etime" value="{{$etime?$etime:''}}">
  23. <input class="input-text" style="width:5%;text-align:center" type="text" value="收货人"/>
  24. <input id="receiverName" type="text" class="input-text" style="width:6%;text-align:center" name="receiverName" value="{{$receiverName?$receiverName:''}}">
  25. <input class="input-text" style="width:5%;text-align:center" type="text" value="手机号"/>
  26. <input id="receiverMobile" type="text" class="input-text" style="width:6%;text-align:center" name="receiverMobile" value="{{$receiverMobile?$receiverMobile:''}}">
  27. <input class="input-text" style="width:5%;text-align:center" type="text" value="订单状态"/>
  28. <select style="width:6%;text-align:center" id='status' name="status">
  29. <option value="-1" @if($status=='-1') selected @endif>-- 请选择--</option>
  30. @if($self_role !='管理员' )<option value="0" @if($status==0) selected @endif>已录入</option> @endif
  31. <option value="1" @if($status==1) selected @endif>待审核</option>
  32. <option value="2" @if($status==2) selected @endif>已审核</option>
  33. <option value="3" @if($status==3) selected @endif>已发货</option>
  34. </select>
  35. <div style="float:right">
  36. <a class="btn btn-primary radius" onclick="user_search()" href="javascript:;">搜索</a>
  37. <a class="btn btn-primary radius" onclick="order_export()" href="javascript:;"> 导出订单</a>
  38. <!--a class="btn btn-primary radius" onclick="order_verify_more()" href="javascript:;"><i class="Hui-iconfont">&#xe600;</i> 批量审核</a-->
  39. </div>
  40. </div>
  41. </div>
  42. <div class="mt-20">
  43. @if($overtime && $self_role !='销售')
  44. <font color='red'>
  45. 超一天未发订单量:【{{$overtime['count']}}单】&nbsp; 订单ID:【
  46. @foreach($overtime['list'] as $k=>$oid)
  47. @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
  48. @endforeach
  49. </font>
  50. @endif
  51. <table class="table table-border table-bordered table-bg table-hover table-sort">
  52. <thead>
  53. <tr class="text-c">
  54. <th width="4%"><!--input type="checkbox" id="selected-all"-->订单编号</th>
  55. <th width="4%">买家名称</th>
  56. <th width="4%">收货人</th>
  57. <th width="4%">收货人手机号</th>
  58. <th width="6%">收货地址</th>
  59. <th width="9%">商品信息</th>
  60. <th width="4%">预发货时间</th>
  61. <th width="6%">物流单号</th>
  62. <th width="4%">发货时间</th>
  63. @if($self_role !='销售' )
  64. <th width="3%">货品成本</th>
  65. <th width="3%">运费成本</th>
  66. @endif
  67. <th width="4%">发货仓库</th>
  68. <th width="4%">付款金额</th>
  69. <th width="5%">下单时间</th>
  70. <th width="4%">加粉时间</th>
  71. <th width="2%">是否复购</th>
  72. <th width="2%">是否退补单</th>
  73. <th width="4%">应该退补差价</th>
  74. <th width="4%">退补付款方式</th>
  75. <th width="5%">退补备注</th>
  76. <th width="5%">退补时间</th>
  77. <th width="4%">所属销售</th>
  78. <th width="4%">订单状态</th>
  79. <th width="4%">审核时间</th>
  80. @if($self_role =='销售' )<th width="5%">驳回原因</th>@endif
  81. <th width="5%">买家备注</th>
  82. <th width="5%">卖家备注</th>
  83. <th width="5%">发货备注</th>
  84. <th width="5%">售后费用</th>
  85. <th width="5%">售后原因</th>
  86. <th width="5%">售后时间</th>
  87. <th width="5%">操作</th>
  88. </tr>
  89. </thead>
  90. <tbody>
  91. @if($result)
  92. @foreach($result as $a)
  93. <tr class="text-c" style=" text-align:center;">
  94. <td><!--input type="checkbox" name="id[]" value="{{$a['id']}}"--> {{$a['id']}}</td>
  95. <td>{{$a['customerName']}}</td>
  96. <td>{{$a['receiverName']}}</td>
  97. <td>{{$a['receiverMobile']}}</td>
  98. <td>{{$a['receiverState']}}{{$a['receiverCity']}}{{$a['receiverDistrict']}}{{$a['receiverStreet']}}{{$a['receiverAddress']}}</td>
  99. <td>
  100. @if( is_array($a['goods']) && $a['warehouse'] == 3)
  101. @foreach($a['goods'] as $good)
  102. <p>{{$good}}</p>
  103. @endforeach
  104. @else
  105. {{$a['goods_note']}}
  106. @endif
  107. </td>
  108. <td>{{$a['delivery_date']}}</td>
  109. @if($self_role =='销售' || ($self_role =='管理员' && $a['status']>0) )
  110. <td>{{$a['logistics_id']}}</td>
  111. @else
  112. <td class ="change_logistics_id">
  113. <p id="logi_1{{$a['id']}}">{{$a['logistics_id']}}</p>
  114. <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']}})" />
  115. <span class="sort_icon" hidden onClick='change_logistics_click("{{$a['id']}}","{{$a['logistics_id']}}")' style="cursor:pointer"><i class="Hui-iconfont">&#xe647;</i></span>
  116. </td>
  117. @endif
  118. <td class ="change_logistics_id">
  119. <p id="send_time_1{{$a['id']}}">{{$a['send_time']}}</p>
  120. <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" />
  121. <span class="sort_icon" hidden onClick='change_send_time_click("{{$a['id']}}","{{$a['send_time']}}")' style="cursor:pointer"><i class="Hui-iconfont">&#xe647;</i></span>
  122. </td>
  123. @if($self_role !='销售' )
  124. @if($self_role =='管理员' && $a['status']>0)
  125. <td>{{$a['cost']}}</td>
  126. <td>{{$a['freight_cost']}}</td>
  127. @else
  128. <td class ="change_logistics_id">
  129. <p id="cost_1{{$a['id']}}">{{$a['cost']}}</p>
  130. <input id="cost_2{{$a['id']}}" style="display: none" type='text' name='cost' value="{{$a['cost']}}" onblur="change_cost({{$a['id']}})" />
  131. <span class="sort_icon" hidden onClick='change_cost_click("{{$a['id']}}","{{$a['cost']}}")' style="cursor:pointer"><i class="Hui-iconfont">&#xe647;</i></span>
  132. </td>
  133. <td class ="change_logistics_id">
  134. <p id="freight_cost_1{{$a['id']}}">{{$a['freight_cost']}}</p>
  135. <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']}})" />
  136. <span class="sort_icon" hidden onClick='change_freight_cost_click("{{$a['id']}}","{{$a['freight_cost']}}")' style="cursor:pointer"><i class="Hui-iconfont">&#xe647;</i></span>
  137. </td>
  138. @endif
  139. @endif
  140. <td>@if($a['warehouse']==1) A仓库 @elseif($a['warehouse']==2) B仓库 @elseif($a['warehouse']==3) C仓库 @else @endif</td>
  141. <td>{{$a['receivedAmount']}}</td>
  142. <td>{{$a['createTime']}}</td>
  143. <td>{{$a['fanTime']}}</td>
  144. <td>@if($a['is_fugou']==1) 是 @else 否 @endif</td>
  145. <td>@if($a['is_refund']==1) 是 @else 否 @endif</td>
  146. <td class ="change_logistics_id">
  147. <p id="refund_price_1{{$a['id']}}">{{$a['refund_price']}}</p>
  148. <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']}}")' />
  149. <span class="sort_icon" hidden onClick='change_refund_price_click("{{$a['id']}}","{{$a['cost']}}")' style="cursor:pointer"><i class="Hui-iconfont">&#xe647;</i></span>
  150. </td>
  151. <td class ="change_logistics_id">
  152. <p id="refund_type_1{{$a['id']}}">{{$a['refund_type']}}</p>
  153. <select id="refund_type_2{{$a['id']}}" style="display: none" name='refund_type' value="{{$a['refund_type']}}" onchange="change_refund_type({{$a['id']}})">
  154. <option value='0'>-请选择-</option>
  155. <option value='1'>微信支付</option>
  156. <option value='2'>付款码支付</option>
  157. </select>
  158. <span class="sort_icon" hidden onClick='change_refund_type_click("{{$a['id']}}","{{$a['cost']}}")' style="cursor:pointer"><i class="Hui-iconfont">&#xe647;</i></span>
  159. </td>
  160. <td class ="change_logistics_id">
  161. <p id="refund_note_1{{$a['id']}}">{{$a['refund_note']}}</p>
  162. <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>
  163. <span class="sort_icon" hidden onClick='change_refund_note_click("{{$a['id']}}","{{$a['refund_note']}}")' style="cursor:pointer"><i class="Hui-iconfont">&#xe647;</i></span>
  164. </td>
  165. <td class ="change_logistics_id">
  166. <p id="refund_time_1{{$a['id']}}">{{$a['refund_time']}}</p>
  167. <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" />
  168. <span class="sort_icon" hidden onClick='change_refund_time_click("{{$a['id']}}","{{$a['refund_time']}}")' style="cursor:pointer"><i class="Hui-iconfont">&#xe647;</i></span>
  169. </td>
  170. <td>{{$a['admin_name']}}</td>
  171. <td id="order_verify{{$a['id']}}">{{$a['status_name']}}</td>
  172. <td>{{$a['verify_time']}}</td>
  173. @if($self_role =='销售' ) <td>@if($a['status'] == 0)<font color='red'> {{$a['refuse_reason']}} </font> @endif</td> @endif
  174. <!--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 -->
  175. @if(($self_role =='销售' || $self_role =='管理员') && $a['status']>0)
  176. <td>{{$a['buyerMemo']}}</td>
  177. <td>{{$a['sellerMemo']}}</td>
  178. <td>{{$a['send_note']}}</td>
  179. @else
  180. <td class ="change_logistics_id">
  181. <p id="buyerMemo_1{{$a['id']}}">{{$a['buyerMemo']}}</p>
  182. <input id="buyerMemo_2{{$a['id']}}" style="display: none" type='text' name='buyerMemo' value="{{$a['buyerMemo']}}" onblur="change_buyerMemo({{$a['id']}})" />
  183. <span class="sort_icon" hidden onClick='change_buyerMemo_click("{{$a['id']}}","{{$a['cost']}}")' style="cursor:pointer"><i class="Hui-iconfont">&#xe647;</i></span>
  184. </td>
  185. <td class ="change_logistics_id">
  186. <p id="sellerMemo_1{{$a['id']}}">{{$a['sellerMemo']}}</p>
  187. <input id="sellerMemo_2{{$a['id']}}" style="display: none" type='text' name='sellerMemo' value="{{$a['sellerMemo']}}" onblur="change_sellerMemo({{$a['id']}})" />
  188. <span class="sort_icon" hidden onClick='change_sellerMemo_click("{{$a['id']}}","{{$a['cost']}}")' style="cursor:pointer"><i class="Hui-iconfont">&#xe647;</i></span>
  189. </td>
  190. <td class ="change_logistics_id">
  191. <p id="send_note_1{{$a['id']}}">{{$a['send_note']}}</p>
  192. <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>
  193. <span class="sort_icon" hidden onClick='change_send_note_click("{{$a['id']}}","{{$a['send_note']}}")' style="cursor:pointer"><i class="Hui-iconfont">&#xe647;</i></span>
  194. </td>
  195. @endif
  196. @if($self_role =='超级管理员' || $self_role =='售后管理员')
  197. <td class ="change_logistics_id">
  198. <p id="aftersale_fee_1{{$a['id']}}">{{$a['aftersale_fee']}}</p>
  199. <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']}})" />
  200. <span class="sort_icon" hidden onClick='change_aftersale_fee_click("{{$a['id']}}","{{$a['cost']}}")' style="cursor:pointer"><i class="Hui-iconfont">&#xe647;</i></span>
  201. </td>
  202. <td class ="change_logistics_id">
  203. <p id="aftersale_reason_1{{$a['id']}}">{{$a['aftersale_reason']}}</p>
  204. <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>
  205. <span class="sort_icon" hidden onClick='change_aftersale_reason_click("{{$a['id']}}","{{$a['aftersale_reason']}}")' style="cursor:pointer"><i class="Hui-iconfont">&#xe647;</i></span>
  206. </td>
  207. <td class ="change_logistics_id">
  208. <p id="aftersale_time_1{{$a['id']}}">{{$a['aftersale_time']}}</p>
  209. <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" />
  210. <span class="sort_icon" hidden onClick='change_aftersale_time_click("{{$a['id']}}","{{$a['aftersale_time']}}")' style="cursor:pointer"><i class="Hui-iconfont">&#xe647;</i></span>
  211. </td>
  212. @else
  213. <td>{{$a['aftersale_fee']}}</td>
  214. <td>{{$a['aftersale_reason']}}</td>
  215. <td>{{$a['aftersale_time']}}</td>
  216. @endif
  217. <td>
  218. @if($a['enable_status'])
  219. @foreach($a['enable_status'] as $item)
  220. @if($item['status'] == 0)
  221. <a id="verify_refuse" style="text-decoration:none" onClick='refuse_reason("{{$a['id']}}")' href="javascript:;" title="审核驳回"><span class="btn btn-danger radius">审核驳回</span></a>
  222. @else
  223. <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>
  224. @endif
  225. @endforeach
  226. @endif
  227. @if(($self_role =='销售' || $self_role =='管理员') && $a['status']>0)
  228. @else
  229. <a style="text-decoration:none" onClick='order_edit("编辑","{{$a['id']}}")' href="javascript:;" title="编辑"><span class="btn btn-primary radius">编辑</span></a>
  230. @if( $a['status'] < 3)
  231. <a style="text-decoration:none" onClick='order_del("删除","{{$a['id']}}")' href="javascript:;" title="删除"><span class="btn btn-danger radius">删除</span></a>
  232. @endif
  233. @endif
  234. </td>
  235. </tr>
  236. @endforeach
  237. @endif
  238. </tbody>
  239. </table>
  240. </div>
  241. <!--弹出层 推入分组-->
  242. <div id="modal-demo1" class="modal fade" tabnonautomatic_index="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  243. <div class="modal-dialog">
  244. <div class="modal-content radius">
  245. <div class="modal-body" style="height:150px">
  246. <div id="fa2">
  247. <p style="font-size:14px">驳回原因:</p>
  248. <input id='order_id' type='hidden' name='status' value=''/>
  249. <textarea style="height:75px;" cols="85" id='refuse_reason'></textarea>
  250. </div>
  251. <div style="float:right">
  252. <button class="btn btn-primary radius" onclick='verify_refuse()' value="&nbsp;&nbsp;确定&nbsp;&nbsp;">&nbsp;&nbsp;确定&nbsp;&nbsp;</button>&nbsp;
  253. <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
  254. </div>
  255. </div>
  256. </div>
  257. </div>
  258. </div>
  259. <div id="page" class="page_div"></div>
  260. </div>
  261. <!--_footer 作为公共模版分离出去-->
  262. <script type="text/javascript" src="/admin/lib/jquery/1.9.1/jquery.min.js"></script>
  263. <script type="text/javascript" src="/admin/lib/layer/2.4/layer.js"></script>
  264. <script type="text/javascript" src="/admin/static/h-ui/js/H-ui.min.js"></script>
  265. <script type="text/javascript" src="/admin/static/h-ui.admin/js/H-ui.admin.js"></script>
  266. <script type="text/javascript" src="/admin/lib/page/paging.js"></script>
  267. <script type="text/javascript" src="/admin/lib/My97DatePicker/4.8/WdatePicker.js"></script>
  268. <!--/_footer 作为公共模版分离出去-->
  269. <!--/_footer 作为公共模版分离出去-->
  270. <script type="text/javascript">
  271. /*广告-添加*/
  272. function order_add(title){
  273. location.href="/admin/order/create";
  274. }
  275. /*广告-编辑*/
  276. function order_edit(title,id){
  277. var page = {{$page}};
  278. var admin_id = $('#admin_id').val();
  279. var stime = $('#stime').val();
  280. var etime = $('#etime').val();
  281. var receiverName = $('#receiverName').val();
  282. var receiverMobile = $('#receiverMobile').val();
  283. var last_url = '{{$last_url}}';
  284. location.href="/admin/order/edit/"+id+'?page='+page+'&admin_id='+admin_id+'&stime='+stime+'&etime='+etime+'&receiverName='+receiverName+'&receiverMobile='+receiverMobile+'&last_url='+last_url;
  285. }
  286. /*广告-设为首页显示*/
  287. function up(obj,id){
  288. layer.confirm('确认要设为首页显示吗?',function(index){
  289. location.href='/admin/order/up/'+id;
  290. });
  291. }
  292. /*广告-移除*/
  293. function order_del(obj,id){
  294. layer.confirm('确认要删除吗?',function(index){
  295. location.href='/admin/order/delete/'+id;
  296. });
  297. }
  298. /*广告-设为首页隐藏*/
  299. function down(obj,id){
  300. layer.confirm('确认要设为首页隐藏吗?',function(index){
  301. location.href='/admin/order/down/'+id;
  302. });
  303. }
  304. function user_search(){
  305. var admin_id = $('#admin_id').val();
  306. var stime = $('#stime').val();
  307. var etime = $('#etime').val();
  308. var receiverName = $('#receiverName').val();
  309. var receiverMobile = $('#receiverMobile').val();
  310. var status = $('#status').val();
  311. var id = $('#id').val();
  312. //var page = {{$page}};
  313. location.href = 'index?admin_id='+admin_id+'&stime='+stime+'&etime='+etime+'&receiverName='+receiverName+'&receiverMobile='+receiverMobile+'&status='+status+'&id='+id;
  314. }
  315. //导出
  316. function order_export(){
  317. var admin_id = $('#admin_id').val();
  318. var stime = $('#stime').val();
  319. var etime = $('#etime').val();
  320. var receiverName = $('#receiverName').val();
  321. var receiverMobile = $('#receiverMobile').val();
  322. var status = $('#status').val();
  323. var id = $('#id').val();
  324. location.href = '/admin/order/order_export?admin_id='+admin_id+'&stime='+stime+'&etime='+etime+'&receiverName='+receiverName+'&receiverMobile='+receiverMobile+'&status='+status+'&id='+id;
  325. }
  326. function change_logistics_click(id, logistics_id){
  327. $("#logi_1"+id).hide();
  328. $("#logi_2"+id).show();
  329. $("#logi_2"+id).focus();
  330. }
  331. function change_logistics_id(id){
  332. var logistics_id = $("#logi_2"+id).val();
  333. $.ajax({
  334. url: '/admin/order/editLogisticsId?id='+id+'&logistics_id='+logistics_id,
  335. type: 'get',
  336. dateType: 'json',
  337. success:function(msg){
  338. $("#logi_1"+id).html(logistics_id);
  339. $("#logi_1"+id).show();
  340. $("#logi_2"+id).hide();
  341. }
  342. });
  343. }
  344. function change_cost_click(id, cost){
  345. $("#cost_1"+id).hide();
  346. $("#cost_2"+id).show();
  347. $("#cost_2"+id).focus();
  348. }
  349. function change_cost(id){
  350. var cost = $("#cost_2"+id).val();
  351. $.ajax({
  352. url: '/admin/order/editLogisticsId?id='+id+'&cost='+cost,
  353. type: 'get',
  354. dateType: 'json',
  355. success:function(msg){
  356. $("#cost_1"+id).html(cost);
  357. $("#cost_1"+id).show();
  358. $("#cost_2"+id).hide();
  359. }
  360. });
  361. }
  362. function change_freight_cost_click(id, freight_cost){
  363. $("#freight_cost_1"+id).hide();
  364. $("#freight_cost_2"+id).show();
  365. $("#freight_cost_2"+id).focus();
  366. }
  367. function change_freight_cost(id){
  368. var freight_cost = $("#freight_cost_2"+id).val();
  369. $.ajax({
  370. url: '/admin/order/editLogisticsId?id='+id+'&freight_cost='+freight_cost,
  371. type: 'get',
  372. dateType: 'json',
  373. success:function(msg){
  374. $("#freight_cost_1"+id).html(freight_cost);
  375. $("#freight_cost_1"+id).show();
  376. $("#freight_cost_2"+id).hide();
  377. }
  378. });
  379. }
  380. function change_buyerMemo_click(id, buyerMemo){
  381. $("#buyerMemo_1"+id).hide();
  382. $("#buyerMemo_2"+id).show();
  383. $("#buyerMemo_2"+id).focus();
  384. }
  385. function change_buyerMemo(id){
  386. var buyerMemo = $("#buyerMemo_2"+id).val();
  387. $.ajax({
  388. url: '/admin/order/editLogisticsId?id='+id,
  389. type: 'get',
  390. data: {buyerMemo:buyerMemo},
  391. dateType: 'json',
  392. success:function(msg){
  393. $("#buyerMemo_1"+id).html(buyerMemo);
  394. $("#buyerMemo_1"+id).show();
  395. $("#buyerMemo_2"+id).hide();
  396. }
  397. });
  398. }
  399. function change_sellerMemo_click(id, sellerMemo){
  400. $("#sellerMemo_1"+id).hide();
  401. $("#sellerMemo_2"+id).show();
  402. $("#sellerMemo_2"+id).focus();
  403. }
  404. function change_sellerMemo(id){
  405. var sellerMemo = $("#sellerMemo_2"+id).val();
  406. $.ajax({
  407. url: '/admin/order/editLogisticsId?id='+id,
  408. type: 'get',
  409. dateType: 'json',
  410. data: {sellerMemo:sellerMemo},
  411. success:function(msg){
  412. $("#sellerMemo_1"+id).html(sellerMemo);
  413. $("#sellerMemo_1"+id).show();
  414. $("#sellerMemo_2"+id).hide();
  415. }
  416. });
  417. }
  418. function change_send_note_click(id, send_note){
  419. $("#send_note_1"+id).hide();
  420. $("#send_note_2"+id).show();
  421. $("#send_note_2"+id).focus();
  422. }
  423. function change_send_note(id){
  424. var send_note = $("#send_note_2"+id).val();
  425. $.ajax({
  426. url: '/admin/order/editLogisticsId?id='+id,
  427. type: 'get',
  428. data: {send_note:send_note},
  429. dateType: 'json',
  430. success:function(msg){
  431. $("#send_note_1"+id).html(send_note);
  432. $("#send_note_1"+id).show();
  433. $("#send_note_2"+id).hide();
  434. }
  435. });
  436. }
  437. function change_aftersale_fee_click(id, aftersale_fee){
  438. $("#aftersale_fee_1"+id).hide();
  439. $("#aftersale_fee_2"+id).show();
  440. $("#aftersale_fee_2"+id).focus();
  441. }
  442. function change_aftersale_fee(id){
  443. var aftersale_fee = $("#aftersale_fee_2"+id).val();
  444. $.ajax({
  445. url: '/admin/order/editLogisticsId?id='+id+'&aftersale_fee='+aftersale_fee,
  446. type: 'get',
  447. dateType: 'json',
  448. success:function(msg){
  449. $("#aftersale_fee_1"+id).html(aftersale_fee);
  450. $("#aftersale_fee_1"+id).show();
  451. $("#aftersale_fee_2"+id).hide();
  452. }
  453. });
  454. }
  455. function change_aftersale_time_click(id, aftersale_time){
  456. $("#aftersale_time_1"+id).hide();
  457. $("#aftersale_time_2"+id).show();
  458. $("#aftersale_time_2"+id).focus();
  459. }
  460. function change_aftersale_time(id){
  461. var aftersale_time = $("#aftersale_time_2"+id).val();
  462. if(!aftersale_time){
  463. return false;
  464. }
  465. $.ajax({
  466. url: '/admin/order/editLogisticsId?id='+id+'&aftersale_time='+aftersale_time,
  467. type: 'get',
  468. dateType: 'json',
  469. success:function(msg){
  470. $("#aftersale_time_1"+id).html(aftersale_time);
  471. $("#aftersale_time_1"+id).show();
  472. $("#aftersale_time_2"+id).hide();
  473. }
  474. });
  475. }
  476. function change_refund_time_click(id, refund_time){
  477. $("#refund_time_1"+id).hide();
  478. $("#refund_time_2"+id).show();
  479. $("#refund_time_2"+id).focus();
  480. }
  481. function change_refund_time(id){
  482. var refund_time = $("#refund_time_2"+id).val();
  483. if(!refund_time){
  484. return false;
  485. }
  486. $.ajax({
  487. url: '/admin/order/editLogisticsId?id='+id+'&refund_time='+refund_time,
  488. type: 'get',
  489. dateType: 'json',
  490. success:function(msg){
  491. $("#refund_time_1"+id).html(refund_time);
  492. $("#refund_time_1"+id).show();
  493. $("#refund_time_2"+id).hide();
  494. }
  495. });
  496. }
  497. function change_send_time_click(id, send_time){
  498. $("#send_time_1"+id).hide();
  499. $("#send_time_2"+id).show();
  500. $("#send_time_2"+id).focus();
  501. }
  502. function change_send_time(id){
  503. var send_time = $("#send_time_2"+id).val();
  504. if(!send_time){
  505. return false;
  506. }
  507. $.ajax({
  508. url: '/admin/order/editLogisticsId?id='+id+'&send_time='+send_time,
  509. type: 'get',
  510. dateType: 'json',
  511. success:function(msg){
  512. $("#send_time_1"+id).html(send_time);
  513. $("#send_time_1"+id).show();
  514. $("#send_time_2"+id).hide();
  515. }
  516. });
  517. }
  518. function change_aftersale_reason_click(id, aftersale_reason){
  519. $("#aftersale_reason_1"+id).hide();
  520. $("#aftersale_reason_2"+id).show();
  521. $("#aftersale_reason_2"+id).focus();
  522. }
  523. function change_aftersale_reason(id){
  524. var aftersale_reason = $("#aftersale_reason_2"+id).val();
  525. $.ajax({
  526. url: '/admin/order/editLogisticsId?id='+id,
  527. type: 'get',
  528. data: {aftersale_reason:aftersale_reason},
  529. dateType: 'json',
  530. success:function(msg){
  531. $("#aftersale_reason_1"+id).html(aftersale_reason);
  532. $("#aftersale_reason_1"+id).show();
  533. $("#aftersale_reason_2"+id).hide();
  534. }
  535. });
  536. }
  537. function change_refund_note_click(id, refund_note){
  538. $("#refund_note_1"+id).hide();
  539. $("#refund_note_2"+id).show();
  540. $("#refund_note_2"+id).focus();
  541. }
  542. function change_refund_note(id){
  543. var refund_note = $("#refund_note_2"+id).val();
  544. $.ajax({
  545. url: '/admin/order/editLogisticsId?id='+id,
  546. type: 'get',
  547. data: {refund_note:refund_note},
  548. dateType: 'json',
  549. success:function(msg){
  550. $("#refund_note_1"+id).html(refund_note);
  551. $("#refund_note_1"+id).show();
  552. $("#refund_note_2"+id).hide();
  553. }
  554. });
  555. }
  556. function change_refund_price_click(id, refund_price){
  557. $("#refund_price_1"+id).hide();
  558. $("#refund_price_2"+id).show();
  559. $("#refund_price_2"+id).focus();
  560. }
  561. function change_refund_price(id, refund_type){
  562. var refund_price = $("#refund_price_2"+id).val();
  563. $.ajax({
  564. url: '/admin/order/editLogisticsId?id='+id+'&refund_price='+refund_price,
  565. type: 'get',
  566. dateType: 'json',
  567. success:function(msg){
  568. $("#refund_price_1"+id).html(refund_price);
  569. if(!refund_type){
  570. $("#refund_type_1"+id).html('微信支付');
  571. }
  572. $("#refund_price_1"+id).show();
  573. $("#refund_price_2"+id).hide();
  574. }
  575. });
  576. }
  577. function change_refund_type_click(id, refund_type){
  578. $("#refund_type_1"+id).hide();
  579. $("#refund_type_2"+id).show();
  580. $("#refund_type_2"+id).focus();
  581. }
  582. function change_refund_type(id){
  583. var refund_type = $("#refund_type_2"+id).val();
  584. $.ajax({
  585. url: '/admin/order/editLogisticsId?id='+id+'&refund_type='+refund_type,
  586. type: 'get',
  587. dateType: 'json',
  588. success:function(msg){
  589. if(refund_type==1){
  590. refund_type = '微信支付';
  591. }
  592. if(refund_type==2){
  593. refund_type = '付款码支付';
  594. }
  595. if(refund_type==0){
  596. refund_type = '';
  597. }
  598. $("#refund_type_1"+id).html(refund_type);
  599. $("#refund_type_1"+id).show();
  600. $("#refund_type_2"+id).hide();
  601. }
  602. });
  603. }
  604. function order_refund(id){
  605. $.ajax({
  606. url: '/admin/order/setrefund/'+id,
  607. type: 'get',
  608. dateType: 'json',
  609. success:function(msg){
  610. var str = '<span class="btn btn-danger radius">退款</span>';
  611. $("#refund"+id).html(str);
  612. }
  613. });
  614. }
  615. function order_verify(id, status, name){
  616. if( !confirm('确认'+name) ){
  617. return false;
  618. }
  619. var admin_id = $('#admin_id').val();
  620. var stime = $('#stime').val();
  621. var etime = $('#etime').val();
  622. var receiverName = $('#receiverName').val();
  623. var receiverMobile = $('#receiverMobile').val();
  624. var page = {{$page}};
  625. var str_query = 'page='+page+'&admin_id='+admin_id+'&stime='+stime+'&etime='+etime+'&receiverName='+receiverName+'&receiverMobile='+receiverMobile;
  626. location.href = '/admin/order/setverify/'+id+'?status='+status+'&'+str_query;
  627. }
  628. function order_verify_more(){
  629. var ids = $(":checkbox[name='id[]']:checked").serialize();
  630. var idLength = $(":checkbox[name='id[]']:checked").length;
  631. if (idLength < 1) {
  632. alert("请至少选中一项");
  633. return false;
  634. }
  635. var ids = $(":checkbox[name='id[]']:checked").serialize();
  636. var admin_id = $('#admin_id').val();
  637. var stime = $('#stime').val();
  638. var etime = $('#etime').val();
  639. var receiverName = $('#receiverName').val();
  640. var receiverMobile = $('#receiverMobile').val();
  641. var page = {{$page}};
  642. location.href = '/admin/order/setverifymore?'+ids+'&page='+page+'&admin_id='+admin_id+'&stime='+stime+'&etime='+etime+'&receiverName='+receiverName+'&receiverMobile='+receiverMobile;
  643. }
  644. /*弹出层-填写原因*/
  645. function refuse_reason(id) {
  646. $("#order_id").val(id);
  647. $("#modal-demo1").modal("show");
  648. }
  649. function verify_refuse(){
  650. var reason = $("#refuse_reason").val();
  651. var id = $("#order_id").val();
  652. var status = 0;
  653. var admin_id = $('#admin_id').val();
  654. var stime = $('#stime').val();
  655. var etime = $('#etime').val();
  656. var receiverName = $('#receiverName').val();
  657. var receiverMobile = $('#receiverMobile').val();
  658. var page = {{$page}};
  659. var str_query = 'page='+page+'&admin_id='+admin_id+'&stime='+stime+'&etime='+etime+'&receiverName='+receiverName+'&receiverMobile='+receiverMobile;
  660. location.href = '/admin/order/setverify/'+id+'?status='+status+'&refuse_reason='+reason+'&'+str_query;
  661. }
  662. $(".change_logistics_id").mouseover(
  663. function(){
  664. $(this).children("span").show();
  665. $(this).children("span").addClass('f-18 c-success');
  666. $(this).mouseout(
  667. function(){
  668. $(this).children("span").hide();
  669. }
  670. );
  671. }
  672. );
  673. /*分页*/
  674. $("#page").paging({
  675. pageNo:{{$page}},
  676. totalPage: {{$pages}},
  677. totalSize: {{$count}},
  678. callback: function(num) {
  679. var admin_id = $('#admin_id').val();
  680. var stime = $('#stime').val();
  681. var etime = $('#etime').val();
  682. var receiverName = $('#receiverName').val();
  683. var receiverMobile = $('#receiverMobile').val();
  684. var status = $('#status').val();
  685. var id = $('#id').val();
  686. location.href = 'index?page='+num+'&admin_id='+admin_id+'&stime='+stime+'&etime='+etime+'&receiverName='+receiverName+'&receiverMobile='+receiverMobile+'&status='+status+'&id='+id;
  687. }
  688. })
  689. </script>
  690. </body>
  691. @endsection