Nessuna descrizione

customerServiceAfterSaleEdit.blade.php 17KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  1. @extends('admin/master')
  2. @section('content')
  3. <body>
  4. @if(count($errors) > 0)
  5. <div class="Huialert Huialert-info" id="error">
  6. @foreach($errors->all() as $error)
  7. <li>{{$error}}</li>
  8. @endforeach
  9. </div>
  10. @endif
  11. <style type="text/css">
  12. #good_sku{
  13. position: absolute;
  14. z-index: 9;
  15. background: #ffffff;
  16. box-shadow: 1px 1px 1px 1px #ccc;
  17. width: calc(100% - 30px);
  18. }
  19. #good_sku li{
  20. font-size: 12px;
  21. line-height: 24px;
  22. cursor: pointer;
  23. padding: 5px 10px;
  24. }
  25. #good_sku li:hover{
  26. background: #eaeaea;
  27. }
  28. </style>
  29. <div class="page-container">
  30. <form id='order-form' action="/admin/customerServiceAfterSale/update" method="post" class="form form-horizontal" enctype="multipart/form-data" onkeypress="return event.keyCode != 13;">
  31. <input type="hidden" name="_token" value="{{ csrf_token() }}" />
  32. @if($order)
  33. <input type="hidden" name="id" value="{{$id}}" />
  34. <div class="row cl">
  35. <label class="form-label col-xs-4 col-sm-2">
  36. <font color='red'>* </font>买家姓名:</label>
  37. <div class="formControls col-xs-6 col-sm-6">
  38. <span>{{$order['customerName']}}</span>
  39. </div>
  40. </div>
  41. <div class="row cl">
  42. <label class="form-label col-xs-4 col-sm-2">
  43. <font color='red'>* </font>买家手机号:</label>
  44. <div class="formControls col-xs-6 col-sm-6">
  45. <span>{{$order['buyer_phone']}}</span>
  46. </div>
  47. </div>
  48. <div id='use_coupon_div' class="row cl" @if($order['use_coupon'] !='1' && $cust_info['coupons'] != '1') style="display: none" @endif>
  49. <label class="form-label col-xs-4 col-sm-2">
  50. <font color='red'>* </font>是否使用优惠券:</label>
  51. <div class="formControls col-xs-6 col-sm-6">
  52. @if($order['use_coupon']=='0') 否 @else 是 @endif
  53. </div>
  54. </div>
  55. <div class="row cl">
  56. <label class="form-label col-xs-4 col-sm-2">
  57. <font color='red'>* </font>收件人姓名:</label>
  58. <div class="formControls col-xs-6 col-sm-6">
  59. <span>{{$order['receiverName']}}</span>
  60. </div>
  61. </div>
  62. <div class="row cl">
  63. <label class="form-label col-xs-4 col-sm-2">
  64. <font color='red'>* </font>收件人手机号:</label>
  65. <div class="formControls col-xs-6 col-sm-6">
  66. <span>{{$order['receiverMobile']}}</span>
  67. </div>
  68. </div>
  69. <div class="row cl">
  70. <label class="form-label col-xs-4 col-sm-2">
  71. <font color='red'>* </font>省/直辖市:</label>
  72. <div class="formControls col-xs-6 col-sm-6">
  73. <span>{{$order['receiverState']}}</span>
  74. </div>
  75. </div>
  76. <div class="row cl">
  77. <label class="form-label col-xs-4 col-sm-2">
  78. <font color='red'>* </font>市:</label>
  79. <div class="formControls col-xs-6 col-sm-6">
  80. <span>{{$order['receiverCity']}}</span>
  81. </div>
  82. </div>
  83. <div class="row cl">
  84. <label class="form-label col-xs-4 col-sm-2">
  85. <font color='red'>* </font>详细地址:</label>
  86. <div class="formControls col-xs-6 col-sm-6">
  87. <span>{{$order['receiverAddress']}}</span>
  88. </div>
  89. </div>
  90. <div class="row cl">
  91. <label class="form-label col-xs-4 col-sm-2">
  92. <font color='red'>* </font>预发货时间:</label>
  93. <div class="formControls col-xs-6 col-sm-6">
  94. <span>{{$order['delivery_date']}}</span>
  95. </div>
  96. </div>
  97. <div class="row cl">
  98. <label class="form-label col-xs-4 col-sm-2">
  99. <font color='red'>* </font>发货仓库:</label>
  100. <div class="formControls col-xs-6 col-sm-6">
  101. <span>
  102. {{$warehouseArr[$order['warehouse']]}}
  103. </span>
  104. </div>
  105. </div>
  106. <div class="row cl">
  107. <label class="form-label col-xs-4 col-sm-2">
  108. <font color='red'>* </font>已选择商品:</label>
  109. <div id='goods_o' class="formControls col-xs-6 col-sm-6">
  110. @if($order['goods'])
  111. @foreach($order['goods'] as $k=>$good)
  112. <p>{{$good['name']}} 【 规格:{{$good['props_name']}} 库存:{{$good['quantity_str']}}】&nbsp;
  113. <input type='hidden' name='skus[]' value="{{$good['sku_id']}}" />
  114. <p>原订单@if($good['is_weigh']==0) 数量 @else重量 @endif{{$good['num']}}<input type="hidden" name="oldnums[]" value="{{$good['num']}}"></p>
  115. <font style="font-weight: bold;">修改后@if($good['is_weigh']==0) 数量 @else重量 @endif</font>
  116. <button style='width:14px;' type='button' onclick="cut_num({{$good['sku_id']}},{{$good['price']}})">-</button><input style='width:45px;' id='gnum{{$good["sku_id"]}}' class='gnums' price='{{$good["price"]}}' is_weigh='{{$good["is_weigh"]}}' quantity='{{$good["quantity"]}}' is_white='{{$good["is_white"]}}' type='text' name='gnum[]' value='{{$good["new_num"]}}' /><button style='width:14px;' type='button' onclick="add_num({{$good['sku_id']}},{{$good['price']}})">+</button>@if($good['is_weigh']==1)(斤)
  117. @if($good['is_weigh']==1) &nbsp;&nbsp;<font color='red'>(称重商品,至少0.5斤) </font> @endif @else :{{$good["new_num"]}} @if($good['is_weigh']==1)斤【称重商品】 @endif<input type='hidden' id='gnum{{$good["sku_id"]}}' class='gnums' price='{{$good["price"]}}' name='gnum[]' value='{{$good["new_num"]}}' /> @endif </p>
  118. <br>
  119. @endforeach
  120. @endif
  121. </div>
  122. </div>
  123. <div class="row cl">
  124. <label for="" class="form-label col-xs-4 col-sm-2">
  125. <font color='red'>* </font>售后类型:</label>
  126. <div class="formControls col-xs-6 col-sm-6">
  127. <input type="radio" name="service_type" value="1" @if($order['service_type'] == 1) checked @endif>退补&nbsp;&nbsp;
  128. <input type="radio" name="service_type" value="2" @if($order['service_type'] == 2) checked @endif>售后
  129. </div>
  130. </div>
  131. <div class="row cl" style='display: none'>
  132. <label class="form-label col-xs-4 col-sm-2">应收金额:</label>
  133. <div class="formControls col-xs-6 col-sm-6">
  134. <span>{{$order['should_amount']}}</span>
  135. </div>
  136. </div>
  137. <div class="row cl">
  138. <label class="form-label col-xs-4 col-sm-2">
  139. <font color='red'>* </font>实付金额:</label>
  140. <div class="formControls col-xs-6 col-sm-6">
  141. <span>{{$order['receivedAmount']}}</span>
  142. </div>
  143. </div>
  144. <div class="row cl">
  145. <label class="form-label col-xs-4 col-sm-2">
  146. <font color='red'>* </font>支付方式:</label>
  147. <div class="formControls col-xs-6 col-sm-6">
  148. <span>
  149. @if($order['payment_type']=='1') 微信支付 @endif
  150. @if($order['payment_type']=='2') 付款码支付 @endif
  151. @if($order['payment_type']=='3') 个体户支付 @endif
  152. @if($order['payment_type']=='4') 充值卡支付 @endif
  153. </span>
  154. </div>
  155. </div>
  156. @if($order['payment_type'] != 4)
  157. <div class="row cl" style="display: none" id='deposit_div'>
  158. <label class="form-label col-xs-4 col-sm-2">
  159. <font color='red'> </font>充值卡号:</label>
  160. <div class="formControls col-xs-6 col-sm-6">
  161. </div>
  162. </div>
  163. @else
  164. <div class="row cl" id='deposit_div'>
  165. <label class="form-label col-xs-4 col-sm-2">
  166. <font color='red'> </font>充值卡号:</label>
  167. <div class="formControls col-xs-6 col-sm-6">
  168. <span>{{$deposit_phone}}</span>
  169. </div>
  170. </div>
  171. @endif
  172. <div class="row cl">
  173. <label class="form-label col-xs-4 col-sm-2">
  174. <font color='red'>* </font>是否退补单:</label>
  175. <div class="formControls col-xs-6 col-sm-6">
  176. <span>
  177. @if($order['is_refund']=='0') 否 @endif
  178. @if($order['is_refund']=='1') 是 @endif
  179. </span>
  180. </div>
  181. </div>
  182. {{--<div class="row cl">--}}
  183. {{--<label class="form-label col-xs-4 col-sm-2">应该退补差价:</label>--}}
  184. {{--<div class="formControls col-xs-6 col-sm-6">--}}
  185. {{--<span>{{$order['refund_price']}}</span>--}}
  186. {{--</div>--}}
  187. {{--</div>--}}
  188. <div class="row cl">
  189. <label class="form-label col-xs-4 col-sm-2">
  190. <font color='red'>* </font>是否复购:</label>
  191. <div class="formControls col-xs-6 col-sm-6">
  192. <span>
  193. @if($order['is_fugou']=='0') 否 @endif
  194. @if($order['is_fugou']=='1') 是 @endif
  195. </span>
  196. </div>
  197. </div>
  198. <div class="row cl">
  199. <label class="form-label col-xs-4 col-sm-2">
  200. <font color='red'>* </font>是否退款:</label>
  201. <div class="formControls col-xs-6 col-sm-6">
  202. <span>
  203. @if($order['order_status']=='0') 否 @endif
  204. @if($order['order_status']=='2') 是 @endif
  205. </span>
  206. </div>
  207. </div>
  208. <div class="row cl">
  209. <label class="form-label col-xs-4 col-sm-2">
  210. <font color='red'>* </font>下单时间:</label>
  211. <div class="formControls col-xs-6 col-sm-6">
  212. <span>{{$order['createTime']}}</span>
  213. </div>
  214. </div>
  215. <div class="row cl">
  216. <label class="form-label col-xs-4 col-sm-2">买家备注:</label>
  217. <div class="formControls col-xs-6 col-sm-6">
  218. <textarea class="textarea" placeholder="填写买家备注..." readonly>{{$order['buyerMemo']}}</textarea>
  219. </div>
  220. </div>
  221. <div class="row cl">
  222. <label class="form-label col-xs-4 col-sm-2">卖家备注:</label>
  223. <div class="formControls col-xs-6 col-sm-6">
  224. <textarea class="textarea" placeholder="填写卖家备注..." readonly>{{$order['sellerMemo']}}</textarea>
  225. </div>
  226. </div>
  227. @endif
  228. <div class="row cl">
  229. <div class="col-9 col-offset-2">
  230. <button class="btn btn-primary radius" type="button" onclick="to_submit()" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">&nbsp;&nbsp;提交&nbsp;&nbsp;</button>&nbsp;
  231. <button class="btn btn-default" type="reset" onclick="return_index();">&nbsp;&nbsp;返回&nbsp;&nbsp;</button>&nbsp;
  232. </div>
  233. </div>
  234. </form>
  235. </div>
  236. <!--_footer 作为公共模版分离出去-->
  237. <script type="text/javascript" src="/admin/lib/jquery/1.9.1/jquery.min.js"></script>
  238. <script type="text/javascript" src="/admin/lib/layer/2.4/layer.js"></script>
  239. <script type="text/javascript" src="/admin/static/h-ui/js/H-ui.min.js"></script>
  240. <script type="text/javascript" src="/admin/static/h-ui.admin/js/H-ui.admin.js"></script>
  241. <!--/_footer 作为公共模版分离出去-->
  242. <!--请在下方写此页面业务相关的脚本-->
  243. <script type="text/javascript" src="/admin/lib/My97DatePicker/4.8/WdatePicker.js"></script>
  244. <script type="text/javascript">
  245. $(function(){
  246. setTimeout("$('#error').hide()",3000);
  247. });
  248. /*返回*/
  249. function return_index(){
  250. location.href='/admin/customerServiceAfterSale/index';
  251. }
  252. function add_num(sku_id, price){
  253. var gnum = $("#gnum"+sku_id).val();
  254. var n = gnum;
  255. n = parseFloat(n)+1
  256. $("#gnum"+sku_id).val(n);
  257. // sync_money()
  258. return false;
  259. }
  260. function cut_num(sku_id, price){
  261. var gnum = $("#gnum"+sku_id).val();
  262. var n = gnum;
  263. if(n <= 1){
  264. return false;
  265. }
  266. n = parseFloat(n)-1;
  267. $("#gnum"+sku_id).val(n);
  268. // sync_money()
  269. return false;
  270. }
  271. function sync_money(){
  272. var gnums = new Array();
  273. var total = 0;
  274. $('.gnums').each(function(key, value){
  275. var gnum = $(this).val();
  276. var price = $(this).attr('price');
  277. total = total + parseFloat(price) * parseFloat(gnum);
  278. });
  279. if(total>0){
  280. $("#should_amount").val(total);
  281. $("#should_amount_show").html(total);
  282. }else{
  283. $("#should_amount").val('');
  284. $("#should_amount_show").html('');
  285. }
  286. return false;
  287. }
  288. $('body').on('click', function(){
  289. $('input[name=goods_name]').on('click',function(e){
  290. e.stopPropagation();
  291. });
  292. document.getElementById('good_sku').style.display='none'
  293. })
  294. function to_submit(){
  295. if(!form_verify()){
  296. return false;
  297. }
  298. $(".btn").attr("disabled",true);
  299. $("#order-form").submit();
  300. return true;
  301. }
  302. function weigh_verify(){
  303. var if_no = 0;
  304. $('.gnums').each(function(key, value){
  305. var gnum = $(this).val();
  306. gnum = parseFloat(gnum);
  307. var is_weigh = $(this).attr('is_weigh');
  308. if(gnum<0.5){
  309. if_no = 1;
  310. return;
  311. }
  312. if(is_weigh == 0 && gnum%1 != 0){
  313. if_no = 2;
  314. return;
  315. }
  316. if(is_weigh == 1 && gnum%0.5 != 0){
  317. if_no = 3;
  318. return;
  319. }
  320. // var quantity = $(this).attr('quantity');
  321. // var is_white = $(this).attr('is_white');
  322. // if(is_white==0 && gnum>quantity){
  323. // if_no=4;
  324. // return;
  325. // }
  326. });
  327. return if_no;
  328. }
  329. function form_verify(){
  330. //验证称重>0.5
  331. var if_no = weigh_verify();
  332. if(if_no > 0){
  333. if(if_no == 1){
  334. layer.msg('商品数量填写有误!',{icon:2,time:1500});
  335. }
  336. if(if_no == 2){
  337. layer.msg('非称重商品数量必须为整数!',{icon:2,time:1500});
  338. }
  339. if(if_no == 3){
  340. layer.msg('称重商品重量必须为0.5的倍数!',{icon:2,time:1500});
  341. }
  342. if(if_no == 4){
  343. layer.msg('商品数量不得大于库存量!',{icon:2,time:1500});
  344. }
  345. return false;
  346. }
  347. return true;
  348. }
  349. </script>
  350. </body>
  351. @endsection