Nav apraksta

orderlist.blade.php 41KB

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