Nessuna descrizione

customerServiceAfterSaleCreate.blade.php 15KB

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