sunhao 5 years ago
parent
commit
9589eb656b

+ 1 - 2
app/Http/Controllers/Admin/OrderController.php

1337
         }catch (Exception $e){
1337
         }catch (Exception $e){
1338
             DB::rollback();
1338
             DB::rollback();
1339
             Log::errorLog($request,['error'=>$e->getMessage()],"order/update",0,'');
1339
             Log::errorLog($request,['error'=>$e->getMessage()],"order/update",0,'');
1340
-            var_dump($e->getMessage());
1341
-            //return redirect('/admin/order/index?'.$str_query)->with('info', $e->getMessage()); 
1340
+            return redirect('/admin/order/index?'.$str_query)->with('info', $e->getMessage()); 
1342
         }     
1341
         }     
1343
 
1342
 
1344
         if(!empty($last_url)){
1343
         if(!empty($last_url)){

+ 6 - 4
resources/views/order/ordercreate.blade.php

52
                 <label class="form-label col-xs-4 col-sm-2">
52
                 <label class="form-label col-xs-4 col-sm-2">
53
                     <font color='red'>* </font>是否使用优惠券:</label>
53
                     <font color='red'>* </font>是否使用优惠券:</label>
54
                 <div class="formControls col-xs-6 col-sm-6">
54
                 <div class="formControls col-xs-6 col-sm-6">
55
-                    <input type="radio" name="use_coupon"  value="0" disabled>
55
+                    <input type="radio" name="use_coupon"  value="0" checked disabled>
56
                     <label for="status-0" style="margin-right: 27px;">否</label>
56
                     <label for="status-0" style="margin-right: 27px;">否</label>
57
-                    <input type="radio" name="use_coupon" value="1" checked disabled>
57
+                    <input id='use_coupon_1' type="radio" name="use_coupon" value="1"  disabled>
58
                     <label for="status-1">是</label>
58
                     <label for="status-1">是</label>
59
                 </div>
59
                 </div>
60
             </div>
60
             </div>
216
                 <label class="form-label col-xs-4 col-sm-2">
216
                 <label class="form-label col-xs-4 col-sm-2">
217
                     <font color='red'> </font>是否使用生日赠品</label>
217
                     <font color='red'> </font>是否使用生日赠品</label>
218
                 <div class="formControls col-xs-6 col-sm-6">
218
                 <div class="formControls col-xs-6 col-sm-6">
219
-                    <input type="radio" name="use_b_gift"  value="0" disabled >
219
+                    <input type="radio" name="use_b_gift"  value="0" checked disabled >
220
                     <label for="status-0" style="margin-right: 27px;">否</label>
220
                     <label for="status-0" style="margin-right: 27px;">否</label>
221
-                    <input type="radio" name="use_b_gift" value="1" checked disabled>
221
+                    <input id='use_b_gift_1' type="radio" name="use_b_gift" value="1" disabled>
222
                     <label for="status-1">是</label>
222
                     <label for="status-1">是</label>
223
                 </div>
223
                 </div>
224
             </div>    
224
             </div>    
872
                         if(data.code==0){
872
                         if(data.code==0){
873
                             if(data.data.coupons == 1){
873
                             if(data.data.coupons == 1){
874
                                 $("input[name=use_coupon]").removeAttr('disabled');
874
                                 $("input[name=use_coupon]").removeAttr('disabled');
875
+                                $("#use_coupon_1").attr("checked","checked");
875
                                 $("#use_coupon_div").show();                              
876
                                 $("#use_coupon_div").show();                              
876
                             }
877
                             }
877
                             if(data.data.if_m_gift == 1){
878
                             if(data.data.if_m_gift == 1){
880
                             }
881
                             }
881
                             if(data.data.if_b_gift == 1){
882
                             if(data.data.if_b_gift == 1){
882
                                 $("input[name=use_b_gift]").removeAttr('disabled');
883
                                 $("input[name=use_b_gift]").removeAttr('disabled');
884
+                                $("#use_b_gift_1").attr("checked","checked");
883
                                 $("#b_gift_div").show();
885
                                 $("#b_gift_div").show();
884
                             }
886
                             }
885
                         }else{
887
                         }else{