No Description

predictorderlist.blade.php 33KB

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