Açıklama Yok

orderlist.blade.php 48KB

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