modals.blade.php 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640
  1. <style>
  2. .bootstrap-select{width:0;padding:0;margin:0;}
  3. .dropdown-toggle .pull-left{margin:0;line-height: 20px;height:20px;}
  4. .main .form-horizontal .form-group {
  5. margin-bottom: 15px !important;
  6. }
  7. p{
  8. margin: 0;
  9. }
  10. </style>
  11. <!-- 关闭订单 -->
  12. <div id="modal-close" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true" style="width:600px;margin:0px auto;">
  13. <form class="form-horizontal form" action="{!! yzWebUrl('order.operation.close') !!}" method="post" enctype="multipart/form-data">
  14. <input type="hidden" name="route" value="order.operation.close">
  15. <input type='hidden' name='order_id' value=''/>
  16. <div class="modal-dialog">
  17. <div class="modal-content">
  18. <div class="modal-header">
  19. <button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button>
  20. <h3>关闭订单</h3>
  21. </div>
  22. <div class="modal-body">
  23. <label>关闭订单原因</label>
  24. <textarea style="height:150px;" class="form-control" name="reson" autocomplete="off"></textarea>
  25. <div id="module-menus"></div>
  26. </div>
  27. <div class="modal-footer">
  28. <button type="submit" class="btn btn-primary" name="close" value="yes">关闭订单</button>
  29. <a href="#" class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</a>
  30. </div>
  31. </div>
  32. </div>
  33. </form>
  34. </div>
  35. <!-- 手动退款 -->
  36. <div id="modal-manual-refund" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true" style="width:600px;margin:0px auto;">
  37. <form class="form-horizontal form" action="{!! yzWebUrl('order.operation.manualRefund') !!}" method="post" enctype="multipart/form-data">
  38. <input type="hidden" name="route" value="order.operation.manualRefund">
  39. <input type='hidden' name='order_id' value=''/>
  40. <div class="modal-dialog">
  41. <div class="modal-content">
  42. <div class="modal-header">
  43. <button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button>
  44. <h3>退款并关闭订单</h3>
  45. </div>
  46. <div class="modal-body">
  47. <label>退款原因</label>
  48. <textarea style="height:150px;" class="form-control" name="reson" autocomplete="off"></textarea>
  49. <div id="module-menus"></div>
  50. </div>
  51. <div class="modal-footer">
  52. <button type="submit" class="btn btn-primary" name="close" value="yes">退款</button>
  53. <a href="#" class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</a>
  54. </div>
  55. </div>
  56. </div>
  57. </form>
  58. </div>
  59. <!-- 确认发货 -->
  60. <div id="modal-confirmsend" class="modal fade" role="dialog" style="width:600px;margin:0px auto;">
  61. <form class="form-horizontal form" action="" method="get"
  62. enctype="multipart/form-data">
  63. <input type='hidden' name='c' value='site'/>
  64. <input type='hidden' name='a' value='entry'/>
  65. <input type='hidden' name='m' value='yun_shop'/>
  66. <input type='hidden' name='do' value='{{YunShop::request()->do}}'/>
  67. <input type='hidden' name='order_id' value=''/>
  68. <input type='hidden' name='route' value='order.operation.send' id="send_form"/>
  69. <div class="modal-dialog" id="confirm_send">
  70. <div class="modal-content">
  71. <div class="modal-header">
  72. <button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button>
  73. <h3>快递信息</h3>
  74. </div>
  75. <div class="modal-body " >
  76. <div class="form-group">
  77. <label class="col-xs-10 col-sm-3 col-md-3 control-label">收件人信息</label>
  78. <div class="col-xs-12 col-sm-9 col-md-8 col-lg-8">
  79. <div class="form-control-static">
  80. 收 件 人: <span class="realname">{{$order['belongs_to_member']['realname']}}</span> / <span class="mobile">{{$order['belongs_to_member']['mobile']}}</span><br>
  81. 收货地址: <span class="address"></span>
  82. </div>
  83. </div>
  84. </div>
  85. <div class="form-group" style="overflow: visible !important;" >
  86. <label class="col-xs-10 col-sm-3 col-md-3 control-label">快递公司</label>
  87. <div class="col-xs-12 col-sm-9 col-md-8 col-lg-8">
  88. <select class="form-control selectpicker" data-live-search="true" name="express_code" id="express_company" >
  89. <option value="" data-name="">其他快递</option>
  90. @include('express.companies')
  91. </select>
  92. <select class="form-control" data-live-search="true" name="express_code" id="express_company1" style="display:none">
  93. <option value="" data-name="">其他快递</option>
  94. @include('express.companies')
  95. </select>
  96. <input type='hidden' name='express_company_name' id='expresscom'/>
  97. </div>
  98. </div>
  99. <div class="form-group">
  100. <label class="col-xs-10 col-sm-3 col-md-3 control-label">快递单号</label>
  101. <div class="col-xs-12 col-sm-9 col-md-8 col-lg-8">
  102. <input type="text" id="express_sn" name="express_sn" class="form-control" style="margin:0;width:100%;"/>
  103. </div>
  104. </div>
  105. <div id="module-menus"></div>
  106. </div>
  107. <div class="modal-footer">
  108. <button type="button" class="btn btn-primary span2" name="sendmultiplepackages" onclick="sendMultiplePackages()"
  109. value="yes">多包裹发货
  110. </button>
  111. <button type="submit" class="btn btn-primary span2" name="confirmsend" onclick="confirmSend()"
  112. value="yes">确认发货
  113. </button>
  114. <a href="#" class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</a>
  115. </div>
  116. </div>
  117. </div>
  118. <!-- 选择发货商品 -->
  119. <div class="modal-dialog hide" id="select_goods">
  120. <div class="modal-content">
  121. <div class="modal-header">
  122. <button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button>
  123. <h3>选择发货商品</h3>
  124. </div>
  125. <div class="modal-body">
  126. <div class="order-info" style="width: 100%;">
  127. <table class="table order-main">
  128. <tbody id="multiple_packagesgoods_list">
  129. {{-- <tr class="trbody">--}}
  130. {{-- <td rowspan="1" style="width: 10%;">--}}
  131. {{-- <input type="checkbox" name="multiple_packages_goods_id" value="">--}}
  132. {{-- </td>--}}
  133. {{-- <td class="goods_info" style="width: 10%;">--}}
  134. {{-- <img src="https://fjfff-1301507422.cos.ap-guangzhou.myqcloud.com/images/2/2020/06/Yj4kWdxPrXIJPDWdM8XjK4ruB4hj8v.png">--}}
  135. {{-- </td>--}}
  136. {{-- <td class="price" style="width: 50%;">--}}
  137. {{-- 原价: 玛姿宝氨基酸净颜洁面慕斯120ml--}}
  138. {{-- <br>应付: 69.00--}}
  139. {{-- <br>数量: 1--}}
  140. {{-- </td>--}}
  141. {{-- <td rowspan="1" style="width:30%;">--}}
  142. {{-- <table class="goods-price">--}}
  143. {{-- <tbody><tr>--}}
  144. {{-- <td style="">应付:</td>--}}
  145. {{-- <td style="">¥690.00--}}
  146. {{-- </td>--}}
  147. {{-- </tr>--}}
  148. {{-- <tr>--}}
  149. {{-- <td style="">原价:</td>--}}
  150. {{-- <td style="">¥0.00--}}
  151. {{-- </td>--}}
  152. {{-- </tr>--}}
  153. {{-- <tr>--}}
  154. {{-- <td style="">数量:</td>--}}
  155. {{-- <td style="color:green">¥69.00--}}
  156. {{-- </td>--}}
  157. {{-- </tr>--}}
  158. {{-- </tbody></table>--}}
  159. {{-- </td>--}}
  160. {{-- </tr>--}}
  161. </tbody></table>
  162. </div>
  163. </div>
  164. <div class="modal-footer">
  165. <button type="button" class="btn btn-primary span2" onclick="selectConfirmSend()"
  166. value="yes">确认发货
  167. </button>
  168. <a href="#" class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</a>
  169. </div>
  170. </div>
  171. </div>
  172. </form>
  173. </div>
  174. <!-- 查看商品 -->
  175. <div id="modal-seeordergoods" class="modal fade" role="dialog" style="width:600px;margin:0px auto;">
  176. <!-- 发货商品 -->
  177. <div class="modal-dialog">
  178. <div class="modal-content">
  179. <div class="modal-header">
  180. <button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button>
  181. <h3>商品列表</h3>
  182. </div>
  183. <div class="modal-body">
  184. <div class="order-info" style="width: 100%;">
  185. <table class="table order-main">
  186. @if(isset($dispatch))
  187. @foreach($dispatch as $v)
  188. <tbody class="order_express" id="order_express{{$v['order_express_id']}}">
  189. @foreach($v['goods'] as $v1)
  190. <tr class="trbody" >
  191. <td style="width: 10%;">
  192. <img src="{{$v1['thumb']}}" width="50" height="50">
  193. </td>
  194. <td class="price" style="width: 50%;">
  195. {{$v1['title']}}
  196. <br>{{$v1['goods_option_title']}}
  197. <br>{{$v1['goods_id']}}
  198. </td>
  199. <td rowspan="1" style="width:30%;">
  200. <table class="goods-price">
  201. <tbody><tr>
  202. <td style="">原价:</td>
  203. <td style="">¥{{$v1['goods_market_price']}}
  204. </td>
  205. </tr>
  206. <tr>
  207. <td style="">应付:</td>
  208. <td style="">¥{{$v1['payment_amount']}}
  209. </td>
  210. </tr>
  211. <tr>
  212. <td style="">数量:</td>
  213. <td style="color:green">{{$v1['total']}}
  214. </td>
  215. </tr>
  216. </tbody></table>
  217. </td>
  218. </tr>
  219. @endforeach
  220. </tbody>
  221. @endforeach
  222. @endif
  223. </table>
  224. </div>
  225. </div>
  226. <div class="modal-footer">
  227. <a href="#" class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</a>
  228. </div>
  229. </div>
  230. </div>
  231. </form>
  232. </div>
  233. <!-- 取消发货 -->
  234. <div id="modal-cancelsend" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true"
  235. style="width:600px;margin:0px auto;">
  236. <form class="form-horizontal form" action="{!! yzWebUrl('order.operation.cancel-send') !!}" method="post"
  237. enctype="multipart/form-data">
  238. <input type='hidden' name='order_id' value=''/>
  239. <div class="modal-dialog">
  240. <div class="modal-content">
  241. <div class="modal-header">
  242. <button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button>
  243. <h3>取消发货</h3>
  244. </div>
  245. <div class="modal-body">
  246. <label>取消发货原因</label>
  247. <textarea style="height:150px;" class="form-control" name="cancelreson"
  248. autocomplete="off"></textarea>
  249. <div id="module-menus"></div>
  250. </div>
  251. <div class="modal-footer">
  252. <button type="submit" class="btn btn-primary span2" name="cancelsend" value="yes">取消发货</button>
  253. <a href="#" class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</a>
  254. </div>
  255. </div>
  256. </div>
  257. </form>
  258. </div>
  259. </form>
  260. </div>
  261. <div id='changeprice_container'>
  262. </div>
  263. @include('refund.modal')
  264. <script language='javascript'>
  265. //查看包裹商品
  266. $(".seeordergoods").click(function () {
  267. var order_express_id = $(this).data('order_express_id');
  268. $(".order_express").hide();
  269. $("#order_express"+order_express_id).show();
  270. });
  271. //获取订单可选择的商品
  272. function sendMultiplePackages() {
  273. var order_id = $("#modal-confirmsend [name=order_id]").val();
  274. $.get("{!! yzWebUrl('order.multiple-packages-order-goods.get-order-goods') !!}",{order_id:order_id},function(data){
  275. if(data.result!=1){
  276. alert(data.msg);
  277. return false;
  278. }
  279. var goods_list = data.data;
  280. var goods_list_str = '';
  281. for (i in goods_list){
  282. goods_list_str += ' <tr class="trbody">' +
  283. ' <td rowspan="1" style="width: 10%;">' +
  284. ' <input type="checkbox" name="order_goods_ids[]" value="'+goods_list[i]['id']+'">' +
  285. ' </td>' +
  286. ' <td style="width: 15%;">' +
  287. ' <img src="'+goods_list[i]['thumb']+'" width="50" height="50">' +
  288. ' </td>' +
  289. '' +
  290. ' <td class="price" style="width: 40%;">' +
  291. ' '+goods_list[i]['title']+' '+
  292. ' <br>'+goods_list[i]['goods_option_title']+' '+
  293. ' <br>'+goods_list[i]['goods_id']+'' +
  294. ' </td>' +
  295. ' <td rowspan="1" style="width:30%;">' +
  296. ' <table class="goods-price">' +
  297. ' <tbody><tr>' +
  298. ' <td style="">原价:</td>' +
  299. ' <td style="">'+goods_list[i]['goods_market_price']+'' +
  300. ' </td>' +
  301. ' </tr>' +
  302. ' <tr>' +
  303. ' <td style="">应付:</td>' +
  304. ' <td style="">'+goods_list[i]['payment_amount']+'' +
  305. ' </td>' +
  306. ' </tr>' +
  307. ' <tr>' +
  308. ' <td style="">数量:</td>' +
  309. ' <td style="color:green">'+goods_list[i]['total']+'' +
  310. ' </td>' +
  311. ' </tr>' +
  312. ' </tbody></table>' +
  313. ' </td>' +
  314. ' </tr>';
  315. }
  316. $("#multiple_packagesgoods_list").html(goods_list_str);
  317. $("#confirm_send").addClass('hide');
  318. $("#select_goods").removeClass('hide');
  319. }, "json");
  320. //
  321. }
  322. //选择完商品确认发货
  323. function selectConfirmSend() {
  324. // name="order_goods_ids"
  325. if($("#modal-confirmsend [name='order_goods_ids[]']:checked").length<=0){
  326. alert('请选择商品!');
  327. return;
  328. }
  329. $("#confirm_send").removeClass('hide');
  330. $("#select_goods").addClass('hide');
  331. $("[name=sendmultiplepackages]").addClass('hide');
  332. }
  333. function changePrice(orderid) {
  334. $.post("{!! yzWebUrl('order.change-order-price') !!}", {order_id: orderid}, function (html) {
  335. if (html == -1) {
  336. alert('订单不能改价!');
  337. return;
  338. }
  339. $('#changeprice_container').html(html);
  340. $('#modal-changeprice').modal().on('shown.bs.modal', function () {
  341. mc_init();
  342. })
  343. });
  344. }
  345. var order_price = 0;
  346. var dispatch_price = 0;
  347. function mc_init() {
  348. order_price = parseFloat($('#changeprice-orderprice').val());
  349. dispatch_price = parseFloat($('#changeprice-dispatchprice').val());
  350. $('input', $('#modal-changeprice')).blur(function () {
  351. if ($.isNumber($(this).val())) {
  352. mc_calc();
  353. }
  354. });
  355. }
  356. function mc_calc() {
  357. var change_dispatchprice = parseFloat($('#changeprice_dispatchprice').val());
  358. if (!$.isNumber($('#changeprice_dispatchprice').val())) {
  359. change_dispatchprice = dispatch_price;
  360. }
  361. var dprice = change_dispatchprice;
  362. if (dprice <= 0) {
  363. dprice = 0;
  364. }
  365. $('#dispatchprice').html(dprice.toFixed(2));
  366. var oprice = 0;
  367. $('.changeprice_orderprice').each(function () {
  368. var p = 0;
  369. if ($.trim($(this).val()) != '') {
  370. p = parseFloat($.trim($(this).val()));
  371. }
  372. oprice += p;
  373. });
  374. if (Math.abs(oprice) > 0) {
  375. if (oprice < 0) {
  376. $('#changeprice').css('color', 'red');
  377. $('#changeprice').html(" - " + Math.abs(oprice));
  378. } else {
  379. $('#changeprice').css('color', 'green');
  380. $('#changeprice').html(" + " + Math.abs(oprice));
  381. }
  382. }
  383. var lastprice = order_price + dprice + oprice;
  384. $('#lastprice').html(lastprice.toFixed(2));
  385. }
  386. function mc_check() {
  387. var can = true;
  388. var lastprice = 0;
  389. $('.changeprice').each(function () {
  390. if ($.trim($(this).val()) == '') {
  391. return true;
  392. }
  393. var p = 0;
  394. if (!$.isNumber($(this).val())) {
  395. $(this).select();
  396. alert('请输入数字!');
  397. can = false;
  398. return false;
  399. }
  400. var val = parseFloat($(this).val());
  401. if (val <= 0 && Math.abs(val) > parseFloat($(this).parent().prev().html())) {
  402. $(this).select();
  403. alert('单个商品价格不能优惠到负数!');
  404. can = false;
  405. return false;
  406. }
  407. lastprice += val;
  408. });
  409. var op = order_price + dispatch_price + lastprice;
  410. if (op < 0) {
  411. alert('订单价格不能小于0元!');
  412. return false;
  413. }
  414. if (!can) {
  415. return false;
  416. }
  417. return true;
  418. }
  419. </script>
  420. <script language="javascript">
  421. var is_disabled = false;
  422. function confirmSend() {
  423. var numerictype = /^[a-zA-Z0-9]+$/;;
  424. if(is_disabled == true) {
  425. if ($('#express_sn').val() == '' && $('#express_company1').val() != '') {
  426. $('#send_form').val("order.list");
  427. return confirm('请填写快递单号!');
  428. }
  429. $('#expresscom').val($('#express_company1 option:selected').attr('data-name'));
  430. $('#express_company1').val($('#express_company1 option:selected').attr('value'));
  431. $('#express_company').val($('#express_company1 option:selected').attr('value'));
  432. }
  433. else {
  434. if ($('#express_sn').val() == '' && $('#express_company').val() != '') {
  435. $('#send_form').val("order.list");
  436. return confirm('请填写快递单号!');
  437. }
  438. $('#expresscom').val($('#express_company option:selected').attr('data-name'));
  439. $('#express_company1').val($('#express_company option:selected').attr('value'));
  440. $('#express_company').val($('#express_company option:selected').attr('value'));
  441. }
  442. //如果选择多包裹发货则快递单号必填
  443. if($("#modal-confirmsend [name='order_goods_ids[]']:checked").length>0 && $('#express_sn').val() == ''){
  444. $('#send_form').val("order.list");
  445. return confirm('请填写快递单号!');
  446. }
  447. if ($('#express_sn').val() != '') {
  448. if (!numerictype.test($('#express_sn').val())) {
  449. $('#send_form').val("order.list");
  450. return confirm('快递单号格式不正确!');
  451. }
  452. }
  453. //todo 当未选择其他快递的时候,不允许提交
  454. }
  455. function send(btn) {
  456. //多包裹发货
  457. $("#confirm_send").removeClass('hide');
  458. $("#select_goods").addClass('hide');
  459. $("[name=sendmultiplepackages]").removeClass('hide');//显示多包裹发货按钮
  460. var submit_url = $(btn).data('url');
  461. $("#send_form").val(submit_url);
  462. $("#modal-confirmsend [name='order_goods_ids[]']").prop('checked',false);
  463. //end
  464. var modal = $('#modal-confirmsend');
  465. var itemid = $(btn).parent().find('.itemid').val();
  466. $(".id").val(itemid);
  467. $(".bootstrap-select").css('display','block');
  468. $("#express_company1").css('display','none');
  469. is_disabled = false;
  470. $('#express_sn').attr('readonly',false);
  471. $('#express_sn').val('');
  472. var url_open = "{!! yzWebUrl('order.waybill.waybill') !!}"
  473. $.get(url_open,{id:itemid},function(data){
  474. console.log(data)
  475. console.log(data.resp.company.name)
  476. console.log(data.resp.company.value)
  477. if (data.result == "success"){
  478. $("#express_company1").css('display','block');
  479. $(".bootstrap-select").css('display','none');
  480. is_disabled = true;
  481. modal.find('#express_sn').html(data.resp.logistic_code);
  482. modal.find('#express_sn').val(data.resp.logistic_code);
  483. // modal.find('#express_sn').attr('disabled',true);
  484. modal.find('#express_sn').attr("readonly","readonly");
  485. // var str = "<option value='"+data.resp.company.value+"' data-name='"+data.resp.company.name+"' selected='selected'>"+data.resp.company.name+"</option>";
  486. // modal.find('#express_company').prepend(str)
  487. $("#express_company1").find("option[value="+data.resp.company.value+"]").attr('selected','selected');
  488. $('#expresscom').val($('#express_company1 option:selected').attr('data-name'));
  489. modal.find('#express_company1').attr('disabled','disabled');
  490. }
  491. }, "json");
  492. modal.find(':input[name=order_id]').val(itemid);
  493. if ($(btn).parent().find('.addressdata').val()) {
  494. var addressdata = JSON.parse($(btn).parent().find('.addressdata').val());
  495. if (addressdata) {
  496. modal.find('.realname').html(addressdata.realname);
  497. modal.find('.mobile').html(addressdata.mobile);
  498. modal.find('.address').html(addressdata.address);
  499. }
  500. }
  501. }
  502. </script>
  503. <!-- 查看物流 -->
  504. <div id="modal-express" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true"
  505. style="margin:0px auto; width:100%">
  506. <div class="modal-dialog" style="width: 60%">
  507. <div class="modal-content" style="">
  508. <div class="modal-header">
  509. <button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button>
  510. <h3>查看物流</h3>
  511. </div>
  512. <div class="modal-body" style='max-height:500px;width:100%'>
  513. <div class="form-group" id="module-menus-express">
  514. </div>
  515. {{--<div class="" id="data" >--}}
  516. {{--<p class='form-control-static' id="module-menus-express"></p>--}}
  517. {{--<div style=" white-space:normal; width:100%;">--}}
  518. {{--20191111-08-01 18:24:48] ]【佛山市】 快件已在 【顺德乐从】 签收, 签收人: 同事/同学, 如有疑问请电联:18688290757 / 0757-28857568, 您的快递已经妥投。风里来雨里去, 只为客官您满意--}}
  519. {{--</div>--}}
  520. {{--<p style="white-space:normal; width:100%">[20191111-08-01 18:24:48] ]【佛山市】 快件已在 【顺德乐从】 签收, 签收人: 同事/同学, 如有疑问请电联:18688290757 / 0757-28857568, 您的快递已经妥投。风里来雨里去, 只为客官您满意。上有老下有小, 赏个好评好不好?【请在评价快递员处帮忙点亮五颗星星哦~】]</p>--}}
  521. {{--</div>--}}
  522. </div>
  523. <div class="modal-footer"><a href="#" class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</a>
  524. </div>
  525. </div>
  526. </div>
  527. </div>
  528. <script language='javascript'>
  529. function express_find(btn, orderid) {
  530. $(btn).button('loading');
  531. $.ajax({
  532. url: "{!! yzWebUrl('order.detail.ajax') !!}" +"&id="+orderid,
  533. cache: false,
  534. success: function (html) {
  535. if (html.data.data != null && html.data.data.length > 0){
  536. html.data.data.forEach(v=>{
  537. $('#module-menus-express').append(` <p style="white-space:normal; width:100%">[`+v.time+`] ]`+ v.context+`]</p>`);
  538. });
  539. }
  540. // $('#module-menus-express').html(html);
  541. $('#modal-express').modal();
  542. $(btn).button('reset');
  543. }
  544. })
  545. }
  546. function refundexpress_find(btn, orderid, flag) {
  547. let refund_value = (flag == 2) ? 30 : 20;
  548. $(btn).button('loading');
  549. $.ajax({
  550. url: "{!! yzWebUrl('order.detail.refund-express') !!}" +"&order_id="+orderid +"&refund_value="+refund_value, //"{php echo $this->createWebUrl('order/list',array('op'=>'deal','to'=>'refundexpress'))}&id=" + orderid + "&flag=" + flag,
  551. cache: false,
  552. success: function (html) {
  553. console.log(html.data.data)
  554. if (html.data.data != null && html.data.data.length > 0){
  555. html.data.data.forEach(v=>{
  556. $('#data').append(` <p style="white-space:normal; width:100%">[`+v.time+`] ]`+ v.context+`]</p>`);
  557. });
  558. }
  559. // $('#module-menus-express').html(html);
  560. $('#modal-express').modal();
  561. $(btn).button('reset');
  562. }
  563. })
  564. }
  565. // function refundexpress_find(btn, orderid, flag) {
  566. // $(btn).button('loading');
  567. // $.ajax({
  568. // url: "{php echo $this->createWebUrl('order/list',array('op'=>'deal','to'=>'refundexpress'))}&id=" + orderid + "&flag=" + flag,
  569. // cache: false,
  570. // success: function (html) {
  571. // $('#module-menus-express').html(html);
  572. // $('#modal-express').modal();
  573. // $(btn).button('reset');
  574. // }
  575. // })
  576. // }
  577. </script>