Browse Source

Merge branch 'sh/20'

sunhao 5 years ago
parent
commit
fe201af76f

+ 7 - 7
app/Http/Controllers/Admin/OrderController.php

498
             'receiverCity'           => 'required|between:1,10', 
498
             'receiverCity'           => 'required|between:1,10', 
499
             'receiverAddress'           => 'required', 
499
             'receiverAddress'           => 'required', 
500
             'delivery_date'           => 'required|date', 
500
             'delivery_date'           => 'required|date', 
501
-            'createTime'           => 'required|date', 
501
+            //'createTime'           => 'required|date', 
502
             'receivedAmount'           => 'required|numeric|min:1', 
502
             'receivedAmount'           => 'required|numeric|min:1', 
503
             //'goods_note'           => 'required|min:1',  
503
             //'goods_note'           => 'required|min:1',  
504
             'warehouse'           => 'required|integer|min:1',  
504
             'warehouse'           => 'required|integer|min:1',  
517
             'receiverCity.between'           => '市填写有误',   
517
             'receiverCity.between'           => '市填写有误',   
518
             'receiverAddress.required'           => '详细地址不能为空',             
518
             'receiverAddress.required'           => '详细地址不能为空',             
519
             'delivery_date.required'           => '预发货时间不能为空',   
519
             'delivery_date.required'           => '预发货时间不能为空',   
520
-            'createTime.required'           => '下单时间不能为空',   
520
+            //'createTime.required'           => '下单时间不能为空',   
521
             'receivedAmount.required'           => '付款金额不能为空',                   
521
             'receivedAmount.required'           => '付款金额不能为空',                   
522
             'receivedAmount.numeric'           => '付款金额必须为数字',                   
522
             'receivedAmount.numeric'           => '付款金额必须为数字',                   
523
             'goods_note.required'           => '商品信息不能为空',                   
523
             'goods_note.required'           => '商品信息不能为空',                   
575
         $order['receivedAmount'] = trim($request->input('receivedAmount')); //付款金额        
575
         $order['receivedAmount'] = trim($request->input('receivedAmount')); //付款金额        
576
         $order['buyerMemo'] = trim($request->input('buyerMemo', '')); // 买家备注
576
         $order['buyerMemo'] = trim($request->input('buyerMemo', '')); // 买家备注
577
         $order['sellerMemo'] = trim($request->input('sellerMemo', '')); // 卖家备注
577
         $order['sellerMemo'] = trim($request->input('sellerMemo', '')); // 卖家备注
578
-        $order['createTime'] = !empty($request->input('createTime')) ? $request->input('createTime') : date('Y-m-d H:i:s'); // 订单创建时间
578
+        $order['createTime'] = date('Y-m-d H:i:s'); // 订单创建时间
579
         $order['modifyTime'] = date('Y-m-d H:i:s'); // 订单修改时间
579
         $order['modifyTime'] = date('Y-m-d H:i:s'); // 订单修改时间
580
         $order['should_amount'] = $request->input('should_amount');
580
         $order['should_amount'] = $request->input('should_amount');
581
         if(!$order['should_amount']) $order['should_amount'] = null;
581
         if(!$order['should_amount']) $order['should_amount'] = null;
773
             'receiverCity'           => 'required|between:1,10', 
773
             'receiverCity'           => 'required|between:1,10', 
774
             'receiverAddress'           => 'required', 
774
             'receiverAddress'           => 'required', 
775
             'delivery_date'           => 'required|date', 
775
             'delivery_date'           => 'required|date', 
776
-            'createTime'           => 'required|date', 
776
+            //'createTime'           => 'required|date', 
777
             'receivedAmount'           => 'required|numeric|min:1', 
777
             'receivedAmount'           => 'required|numeric|min:1', 
778
             //'goods_note'           => 'required|min:1',  
778
             //'goods_note'           => 'required|min:1',  
779
             'warehouse'           => 'required|integer|min:1',    
779
             'warehouse'           => 'required|integer|min:1',    
790
             'receiverCity.between'           => '市填写有误',   
790
             'receiverCity.between'           => '市填写有误',   
791
             'receiverAddress.required'           => '详细地址不能为空',             
791
             'receiverAddress.required'           => '详细地址不能为空',             
792
             'delivery_date.required'           => '预发货时间不能为空',   
792
             'delivery_date.required'           => '预发货时间不能为空',   
793
-            'createTime.required'           => '下单时间不能为空',   
793
+            //'createTime.required'           => '下单时间不能为空',   
794
             'receivedAmount.required'           => '付款金额不能为空',                   
794
             'receivedAmount.required'           => '付款金额不能为空',                   
795
             'receivedAmount.numeric'           => '付款金额必须为数字',                   
795
             'receivedAmount.numeric'           => '付款金额必须为数字',                   
796
             'goods_note.required'           => '商品信息不能为空',                   
796
             'goods_note.required'           => '商品信息不能为空',                   
827
         $order['is_fugou'] = (int)$request->input('is_fugou'); //是否复购
827
         $order['is_fugou'] = (int)$request->input('is_fugou'); //是否复购
828
         $order['warehouse'] = (int)$request->input('warehouse'); //仓库
828
         $order['warehouse'] = (int)$request->input('warehouse'); //仓库
829
         $order['delivery_date'] = !empty($request->input('delivery_date')) ? $request->input('delivery_date') : date('Y-m-d'); //发货日期
829
         $order['delivery_date'] = !empty($request->input('delivery_date')) ? $request->input('delivery_date') : date('Y-m-d'); //发货日期
830
-        if(!empty($request->input('createTime'))) $order['createTime'] = $request->input('createTime'); // 订单创建时间
830
+        //if(!empty($request->input('createTime'))) $order['createTime'] = $request->input('createTime'); // 订单创建时间
831
         $order['order_status'] = (int)$request->input('order_status');
831
         $order['order_status'] = (int)$request->input('order_status');
832
         $order['payment_type'] = (int)$request->input('payment_type'); //支付方式
832
         $order['payment_type'] = (int)$request->input('payment_type'); //支付方式
833
         //$order['status'] = (int)$request->input('status');
833
         //$order['status'] = (int)$request->input('status');
893
             $orderSkus['receivedAmount'] = $order['receivedAmount'];
893
             $orderSkus['receivedAmount'] = $order['receivedAmount'];
894
             $orderSkus['buyerMemo'] = $order['buyerMemo'];
894
             $orderSkus['buyerMemo'] = $order['buyerMemo'];
895
             $orderSkus['sellerMemo'] = $order['sellerMemo'];
895
             $orderSkus['sellerMemo'] = $order['sellerMemo'];
896
-            $orderSkus['createTime'] = $order['createTime'];
896
+            $orderSkus['createTime'] = $old_order->createTime;
897
             $orderSkus['modifyTime'] = $old_order->modifyTime;
897
             $orderSkus['modifyTime'] = $old_order->modifyTime;
898
             
898
             
899
         }
899
         }

File diff suppressed because it is too large
+ 30 - 8
app/Http/Controllers/Admin/StatisticsController.php


+ 104 - 32
app/Http/Controllers/Admin/TemplateController.php

459
      */
459
      */
460
     public function sourcestore(Request $request)
460
     public function sourcestore(Request $request)
461
     {
461
     {
462
+        $t_id = intval($request->input('t_id'));
463
+        $back_vali_str = '';
464
+        if($t_id != 4){
465
+            $back_vali_str = 'required';
466
+        }
462
         $this->validate($request, [
467
         $this->validate($request, [
463
             't_id' => 'required',           
468
             't_id' => 'required',           
464
-            'back_img' => 'required',           
469
+            'back_img' => $back_vali_str,           
465
         ], [
470
         ], [
466
             't_id.required' => '模板不能为空',
471
             't_id.required' => '模板不能为空',
467
             'back_img.required' => '背景图不能为空',
472
             'back_img.required' => '背景图不能为空',
468
             
473
             
469
         ]);
474
         ]);
470
         $template = new TemplatesSource();
475
         $template = new TemplatesSource();
471
-        $template->t_id = intval($request->input('t_id'));
476
+        $template->t_id = $t_id;
472
         $template->note = trim($request->input('note'));
477
         $template->note = trim($request->input('note'));
473
     
478
     
474
         $template->back_img = trim($request->input('back_img'));
479
         $template->back_img = trim($request->input('back_img'));
486
         }
491
         }
487
         */
492
         */
488
 
493
 
494
+        //新模板数据
495
+        if($template->t_id == 4){
496
+            $arr = array();
497
+            $arr['title'] = trim($request->input('title'));
498
+            $arr['text1'] = trim($request->input('text1'));
499
+            $arr['text2'] = trim($request->input('text2'));
500
+            $arr['text3'] = trim($request->input('text3'));
501
+            $arr['img1'] = '';
502
+            $arr['img2_1'] = '';
503
+            $arr['img2_2'] = '';
504
+            $arr['img3'] = '';
505
+            if ($request->hasFile('img1') && $request->file('img1')->isValid()) {
506
+                $file = $request->file('img1');
507
+                $ossClient=new oss();
508
+                // 上传阿里云
509
+                $file = $ossClient->upload($file->getClientOriginalExtension(), $file->getRealPath(), 'upload/seafoodPic'.date("Y-m-d",time()).'/'.date('His'));
510
+                $img=$file['oss-request-url'];
511
+                $arr['img1']=str_replace("kx-youhuiquan.oss-cn-beijing.aliyuncs.com","imgs.726p.com",$img);
512
+            }
513
+            if ($request->hasFile('img2_1') && $request->file('img2_1')->isValid()) {
514
+                $file = $request->file('img2_1');
515
+                $ossClient=new oss();
516
+                // 上传阿里云
517
+                $file = $ossClient->upload($file->getClientOriginalExtension(), $file->getRealPath(), 'upload/seafoodPic'.date("Y-m-d",time()).'/'.date('His'));
518
+                $img=$file['oss-request-url'];
519
+                $arr['img2_1']=str_replace("kx-youhuiquan.oss-cn-beijing.aliyuncs.com","imgs.726p.com",$img);
520
+            }
521
+            if ($request->hasFile('img2_2') && $request->file('img2_2')->isValid()) {
522
+                $file = $request->file('img2_2');
523
+                $ossClient=new oss();
524
+                // 上传阿里云
525
+                $file = $ossClient->upload($file->getClientOriginalExtension(), $file->getRealPath(), 'upload/seafoodPic'.date("Y-m-d",time()).'/'.date('His'));
526
+                $img=$file['oss-request-url'];
527
+                $arr['img2_2']=str_replace("kx-youhuiquan.oss-cn-beijing.aliyuncs.com","imgs.726p.com",$img);
528
+            }
529
+            if ($request->hasFile('img3') && $request->file('img3')->isValid()) {
530
+                $file = $request->file('img3');
531
+                $ossClient=new oss();
532
+                // 上传阿里云
533
+                $file = $ossClient->upload($file->getClientOriginalExtension(), $file->getRealPath(), 'upload/seafoodPic'.date("Y-m-d",time()).'/'.date('His'));
534
+                $img=$file['oss-request-url'];
535
+                $arr['img3']=str_replace("kx-youhuiquan.oss-cn-beijing.aliyuncs.com","imgs.726p.com",$img);
536
+            }
537
+
538
+            $template->new_context = json_encode($arr);
539
+        }
489
         if($template->save()){
540
         if($template->save()){
490
             //生成连接
541
             //生成连接
491
             $template->url = $this->createSourceUrl($template->t_id, $template->id);
542
             $template->url = $this->createSourceUrl($template->t_id, $template->id);
504
         $templates = Templates::where('is_del', 0)->whereNotNull('url')->get();      
555
         $templates = Templates::where('is_del', 0)->whereNotNull('url')->get();      
505
         $template = TemplatesSource::findOrFail($id);
556
         $template = TemplatesSource::findOrFail($id);
506
         $back_imgs = TemplatesBackimg::where('is_del', 0)->whereNotNull('back_img')->where('t_id', $template->t_id)->lists('back_img');
557
         $back_imgs = TemplatesBackimg::where('is_del', 0)->whereNotNull('back_img')->where('t_id', $template->t_id)->lists('back_img');
507
-        return view('template/sourceedit', ['template' => $template, 'id'=>$id, 'templates' => $templates, 'back_imgs'=>$back_imgs]);
558
+        $new_context = array();
559
+        if($template->t_id==4){
560
+            $new_context = json_decode($template->new_context,true);
561
+        }
562
+        return view('template/sourceedit', ['template' => $template, 'id'=>$id, 'templates' => $templates, 'back_imgs'=>$back_imgs, 'new_context'=>$new_context]);
508
     }
563
     }
509
 
564
 
510
     /**
565
     /**
514
     public function sourceupdate(Request $request)
569
     public function sourceupdate(Request $request)
515
     {
570
     {
516
         $id = (int)$request->input('id');
571
         $id = (int)$request->input('id');
517
-        $this->validate($request, [
518
-            //'t_id' => 'required',           
519
-            'back_img' => 'required',           
520
-        ], [
521
-            //'t_id.required' => '模板不能为空',
522
-            'back_img.required' => '背景图不能为空',
523
-            
524
-        ]);
525
-
572
+       
526
         $template = TemplatesSource::findOrFail($id);
573
         $template = TemplatesSource::findOrFail($id);
527
-        /*
528
-        $t_id = (int)$request->input('t_id');
529
-        if( $template->t_id != $t_id ){
530
-            //模板更改,生成新连接
531
-            $template->t_id = $t_id;
532
-            $template->url = $this->createSourceUrl($t_id, $template->id);
533
-        }
534
-        */
535
         $template->note = trim($request->input('note'));
574
         $template->note = trim($request->input('note'));
536
         $template->back_img = trim($request->input('back_img'));
575
         $template->back_img = trim($request->input('back_img'));
537
-        //图片上传 阿里云oss 
538
-        /*      
539
-        if ($request->hasFile('img') && $request->file('img')->isValid()) {
540
-            $file = $request->file('img');
541
-            $ossClient=new oss();
542
-            // 上传阿里云
543
-            $file = $ossClient->upload($file->getClientOriginalExtension(), $file->getRealPath(), 'upload/seafoodPic'.date("Y-m-d",time()).'/'.date('His'));
544
-            $img=$file['oss-request-url'];
545
-            $template->back_img=str_replace("kx-youhuiquan.oss-cn-beijing.aliyuncs.com","imgs.726p.com",$img);
546
-            #保存背景图
547
-            TemplatesBackimg::insert(['back_img'=>$template->back_img]);
576
+
577
+        //是否是新图文模板
578
+        //新模板数据
579
+        if($template->t_id == 4){
580
+            $new_context = json_decode($template->new_context, true);
581
+            $arr = $new_context;
582
+            $arr['title'] = trim($request->input('title'));
583
+            $arr['text1'] = trim($request->input('text1'));
584
+            $arr['text2'] = trim($request->input('text2'));
585
+            $arr['text3'] = trim($request->input('text3'));
586
+
587
+            if ($request->hasFile('img1') && $request->file('img1')->isValid()) {
588
+                $file = $request->file('img1');
589
+                $ossClient=new oss();
590
+                // 上传阿里云
591
+                $file = $ossClient->upload($file->getClientOriginalExtension(), $file->getRealPath(), 'upload/seafoodPic'.date("Y-m-d",time()).'/'.date('His'));
592
+                $img=$file['oss-request-url'];
593
+                $arr['img1']=str_replace("kx-youhuiquan.oss-cn-beijing.aliyuncs.com","imgs.726p.com",$img);
594
+            }
595
+            if ($request->hasFile('img2_1') && $request->file('img2_1')->isValid()) {
596
+                $file = $request->file('img2_1');
597
+                $ossClient=new oss();
598
+                // 上传阿里云
599
+                $file = $ossClient->upload($file->getClientOriginalExtension(), $file->getRealPath(), 'upload/seafoodPic'.date("Y-m-d",time()).'/'.date('His'));
600
+                $img=$file['oss-request-url'];
601
+                $arr['img2_1']=str_replace("kx-youhuiquan.oss-cn-beijing.aliyuncs.com","imgs.726p.com",$img);
602
+            }
603
+            if ($request->hasFile('img2_2') && $request->file('img2_2')->isValid()) {
604
+                $file = $request->file('img2_2');
605
+                $ossClient=new oss();
606
+                // 上传阿里云
607
+                $file = $ossClient->upload($file->getClientOriginalExtension(), $file->getRealPath(), 'upload/seafoodPic'.date("Y-m-d",time()).'/'.date('His'));
608
+                $img=$file['oss-request-url'];
609
+                $arr['img2_2']=str_replace("kx-youhuiquan.oss-cn-beijing.aliyuncs.com","imgs.726p.com",$img);
610
+            }
611
+            if ($request->hasFile('img3') && $request->file('img3')->isValid()) {
612
+                $file = $request->file('img3');
613
+                $ossClient=new oss();
614
+                // 上传阿里云
615
+                $file = $ossClient->upload($file->getClientOriginalExtension(), $file->getRealPath(), 'upload/seafoodPic'.date("Y-m-d",time()).'/'.date('His'));
616
+                $img=$file['oss-request-url'];
617
+                $arr['img3']=str_replace("kx-youhuiquan.oss-cn-beijing.aliyuncs.com","imgs.726p.com",$img);
618
+            }
619
+
620
+            $template->new_context = json_encode($arr);
548
         }
621
         }
549
-        */
550
 
622
 
551
         $template->save();
623
         $template->save();
552
         return redirect('/admin/template/sourceindex')->with('info', '修改成功');
624
         return redirect('/admin/template/sourceindex')->with('info', '修改成功');

+ 14 - 1
app/Http/Controllers/Api/TemplateController.php

35
         $_open_ids = Admin::where('is_use', 1)->where('is_qrcode_use', 1)->lists('id');
35
         $_open_ids = Admin::where('is_use', 1)->where('is_qrcode_use', 1)->lists('id');
36
         //获取背景图
36
         //获取背景图
37
         $back_img = TemplatesSource::where('id', $t_id)->pluck('back_img');
37
         $back_img = TemplatesSource::where('id', $t_id)->pluck('back_img');
38
+        $new_context = TemplatesSource::where('id', $t_id)->pluck('new_context');
39
+        $new_data = array();
40
+        $title = '';
41
+        if(!empty($new_context)){
42
+            $new_context = json_decode($new_context, true);
43
+            $title = $new_context['title'];
44
+            $new_data[0]['text'] = $new_context['text1'];
45
+            $new_data[0]['img'] = [$new_context['img1']];
46
+            $new_data[1]['text'] = $new_context['text2'];
47
+            $new_data[1]['img'] = [$new_context['img2_1'], $new_context['img2_2']];
48
+            $new_data[2]['text'] = $new_context['text3'];
49
+            $new_data[2]['img'] = [$new_context['img3']];
50
+        }
38
         $result = TemplatesSourceSalers::where('s_id', $t_id)->where('is_del', 0)->where('weight','>',0)->whereIn('admin_id', $_open_ids)->orderBy('weight', 'asc')->lists('weight', 'admin_id');
51
         $result = TemplatesSourceSalers::where('s_id', $t_id)->where('is_del', 0)->where('weight','>',0)->whereIn('admin_id', $_open_ids)->orderBy('weight', 'asc')->lists('weight', 'admin_id');
39
         if(empty($result)){
52
         if(empty($result)){
40
             return self::returnValue([],1001);
53
             return self::returnValue([],1001);
68
 
81
 
69
         $qrcode = Admin::where('id', $saler_id)->pluck('qrcode');
82
         $qrcode = Admin::where('id', $saler_id)->pluck('qrcode');
70
         $qrcodes = Admin::whereIn('id', $saler_ids)->lists('qrcode');
83
         $qrcodes = Admin::whereIn('id', $saler_ids)->lists('qrcode');
71
-        return self::returnValue(['qrcode'=>$qrcode, 'ip'=>$ip, 'saler_id'=>$saler_id, 'qrcodes'=>$qrcodes, 'back_img'=>$back_img]);
84
+        return self::returnValue(['qrcode'=>$qrcode, 'ip'=>$ip, 'saler_id'=>$saler_id, 'qrcodes'=>$qrcodes, 'back_img'=>$back_img, 'title'=>$title, 'new_context'=>$new_data]);
72
     }
85
     }
73
 
86
 
74
      /**
87
      /**

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

228
                 <label class="form-label col-xs-4 col-sm-2">
228
                 <label class="form-label col-xs-4 col-sm-2">
229
                     <font color='red'>* </font>下单时间:</label>
229
                     <font color='red'>* </font>下单时间:</label>
230
                 <div class="formControls col-xs-6 col-sm-6">
230
                 <div class="formControls col-xs-6 col-sm-6">
231
-                    <input id="createTime" type="text" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss' })" autocomplete="off"  class="input-text Wdate" style="width:22%;text-align:center;" name="createTime" value="{{old('createTime')}}"> <font color='red'> *默认今天 </font>                  
231
+                    <input id="createTime" type="text" autocomplete="off"  class="input-text" style="width:22%;text-align:center;" name="createTime" value="{{$createTime}}" disabled> <font color='red'> *默认当前时间 </font>                                    
232
                 </div>
232
                 </div>
233
             </div>
233
             </div>
234
 
234
 
676
             layer.msg('预发货时间不能为空!',{icon:2,time:1500});
676
             layer.msg('预发货时间不能为空!',{icon:2,time:1500});
677
             return false;
677
             return false;
678
         }
678
         }
679
-        var createTime = $("input[name=createTime]").val();
680
-        if(!createTime){
681
-            layer.msg('下单时间不能为空!',{icon:2,time:1500});
682
-            return false;
683
-        }
679
+        
684
         var warehouse = $("#warehouse").val();
680
         var warehouse = $("#warehouse").val();
685
         if(warehouse<1){
681
         if(warehouse<1){
686
             layer.msg('仓库必须选择!',{icon:2,time:1500});
682
             layer.msg('仓库必须选择!',{icon:2,time:1500});

+ 4 - 2
resources/views/order/orderedit.blade.php

232
                 <div class="formControls col-xs-6 col-sm-6">
232
                 <div class="formControls col-xs-6 col-sm-6">
233
                     <input type="radio" name="payment_type"  value="1" @if($order['payment_type']=='1') checked  @endif>
233
                     <input type="radio" name="payment_type"  value="1" @if($order['payment_type']=='1') checked  @endif>
234
                     <label for="status-1" style="margin-right: 27px;">微信支付</label>
234
                     <label for="status-1" style="margin-right: 27px;">微信支付</label>
235
-                    <input type="radio" name="payment_type" value="2" @if($order['payment_type']=='2') checked @endif>
235
+                    @if($order['payment_type']=='2')
236
+                    <input type="radio" name="payment_type" value="2"  checked >
236
                     <label for="status-0" style="margin-right: 27px;">付款码支付</label>
237
                     <label for="status-0" style="margin-right: 27px;">付款码支付</label>
238
+                    @endif
237
                     <input type="radio" name="payment_type" value="3" @if($order['payment_type']=='3') checked @endif>
239
                     <input type="radio" name="payment_type" value="3" @if($order['payment_type']=='3') checked @endif>
238
                     <label for="status-0" style="margin-right: 27px;">个体户支付</label>
240
                     <label for="status-0" style="margin-right: 27px;">个体户支付</label>
239
                 </div>
241
                 </div>
284
                 <label class="form-label col-xs-4 col-sm-2">
286
                 <label class="form-label col-xs-4 col-sm-2">
285
                     <font color='red'>* </font>下单时间:</label>
287
                     <font color='red'>* </font>下单时间:</label>
286
                 <div class="formControls col-xs-6 col-sm-6">
288
                 <div class="formControls col-xs-6 col-sm-6">
287
-                    <input id="createTime" type="text" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss' })" class="input-text Wdate" style="width:22%;text-align:center;" name="createTime" value="{{$order['createTime']}}"> <font color='red'>  </font>                  
289
+                    <input id="createTime" type="text"  class="input-text" style="width:22%;text-align:center;" name="createTime" value="{{$order['createTime']}}" disabled> <font color='red'> *不可变更 </font>                  
288
                 </div>
290
                 </div>
289
             </div>
291
             </div>
290
 
292
 

+ 5 - 1
resources/views/order/orderlist.blade.php

172
                                 <select id="refund_type_2{{$a['id']}}" style="display: none" name='refund_type' value="{{$a['refund_type']}}" onchange="change_refund_type({{$a['id']}})">
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>
173
                                     <option value='0'>-请选择-</option>
174
                                     <option value='1'>微信支付</option>
174
                                     <option value='1'>微信支付</option>
175
-                                    <option value='2'>付款码支付</option>
175
+                                    <!--option value='2'>付款码支付</option-->
176
+                                    <option value='3'>个体户支付</option>
176
                                 </select>
177
                                 </select>
177
                                 <span class="sort_icon" hidden  onClick='change_refund_type_click("{{$a['id']}}","{{$a['cost']}}")' style="cursor:pointer"><i class="Hui-iconfont">&#xe647;</i></span>
178
                                 <span class="sort_icon" hidden  onClick='change_refund_type_click("{{$a['id']}}","{{$a['cost']}}")' style="cursor:pointer"><i class="Hui-iconfont">&#xe647;</i></span>
178
                             </td>
179
                             </td>
684
                     if(refund_type==2){
685
                     if(refund_type==2){
685
                         refund_type = '付款码支付';
686
                         refund_type = '付款码支付';
686
                     }
687
                     }
688
+                    if(refund_type==3){
689
+                        refund_type = '个体户支付';
690
+                    }
687
                     if(refund_type==0){
691
                     if(refund_type==0){
688
                         refund_type = '';
692
                         refund_type = '';
689
                     }
693
                     }

+ 15 - 7
resources/views/statistics/teamFinanceTotal.blade.php

28
                 <tr class="text-c">
28
                 <tr class="text-c">
29
                     <th width="5%">团队</th>
29
                     <th width="5%">团队</th>
30
                     <th width="5%">时间</th>
30
                     <th width="5%">时间</th>
31
-                    <th width="5%">总单数</th>
31
+                    <th width="4%">总单数</th>
32
                     <th width="5%">成交金额</th>
32
                     <th width="5%">成交金额</th>
33
                     <th width="5%">微信支付金额</th>
33
                     <th width="5%">微信支付金额</th>
34
                     <th width="5%">付款码支付金额</th>
34
                     <th width="5%">付款码支付金额</th>
35
-                    <th width="5%">售后单数</th>
35
+                    <th width="5%">个体户支付金额</th>
36
+                    <th width="4%">售后单数</th>
36
                     <th width="5%">售后金额</th>
37
                     <th width="5%">售后金额</th>
37
-                    <th width="5%">微信退补单数</th>
38
-                    <th width="5%">微信退补差价</th>
38
+                    <th width="4%">微信退补单数</th>
39
+                    <th width="4%">微信退补差价</th>
39
                     <th width="5%">微信实际金额</th>
40
                     <th width="5%">微信实际金额</th>
40
-                    <th width="5%">付款码退补单数</th>
41
-                    <th width="5%">付款码退补差价</th>
41
+                    <th width="4%">付款码退补单数</th>
42
+                    <th width="4%">付款码退补差价</th>
42
                     <th width="5%">付款码实际金额</th>
43
                     <th width="5%">付款码实际金额</th>
43
-                    <th width="5%">发货单数</th>
44
+                    <th width="4%">个体户退补单数</th>
45
+                    <th width="4%">个体户退补差价</th>
46
+                    <th width="5%">个体户实际金额</th>
47
+                    <th width="4%">发货单数</th>
44
                     <th width="5%">货品成本</th>
48
                     <th width="5%">货品成本</th>
45
                     <th width="5%">物流成本</th>
49
                     <th width="5%">物流成本</th>
46
                     <th width="5%">毛利</th>
50
                     <th width="5%">毛利</th>
57
                             <td>{{$a['receivedAmount']}}</td>
61
                             <td>{{$a['receivedAmount']}}</td>
58
                             <td>{{$a['wx_money']}}</td>
62
                             <td>{{$a['wx_money']}}</td>
59
                             <td>{{$a['zfm_money']}}</td>
63
                             <td>{{$a['zfm_money']}}</td>
64
+                            <td>{{$a['gth_money']}}</td>
60
                             <td>{{$a['aftersale_count']}}</td>
65
                             <td>{{$a['aftersale_count']}}</td>
61
                             <td>{{$a['aftersale_fee']}}</td>
66
                             <td>{{$a['aftersale_fee']}}</td>
62
                             <td>{{$a['wx_refund_count']}}</td>
67
                             <td>{{$a['wx_refund_count']}}</td>
65
                             <td>{{$a['zfm_refund_count']}}</td>
70
                             <td>{{$a['zfm_refund_count']}}</td>
66
                             <td>{{$a['zfm_refund_price']}}</td>
71
                             <td>{{$a['zfm_refund_price']}}</td>
67
                             <td>{{$a['zfm_true_amount']}}</td>
72
                             <td>{{$a['zfm_true_amount']}}</td>
73
+                            <td>{{$a['gth_refund_count']}}</td>
74
+                            <td>{{$a['gth_refund_price']}}</td>
75
+                            <td>{{$a['gth_true_amount']}}</td>
68
                             <td>{{$a['send_count']}}</td>
76
                             <td>{{$a['send_count']}}</td>
69
                             <td>{{$a['cost']}}</td>
77
                             <td>{{$a['cost']}}</td>
70
                             <td>{{$a['freight_cost']}}</td>
78
                             <td>{{$a['freight_cost']}}</td>

+ 89 - 1
resources/views/template/sourcecreate.blade.php

51
     .clear {
51
     .clear {
52
         zoom: 1;
52
         zoom: 1;
53
     }
53
     }
54
+    .new_tuwen{
55
+        display: none;
56
+    }
54
 </style>
57
 </style>
55
     <body>
58
     <body>
56
     @if(count($errors) > 0)
59
     @if(count($errors) > 0)
82
                     @endif
85
                     @endif
83
                 </div>
86
                 </div>
84
             </div>
87
             </div>
85
-            <div class="row cl">
88
+            <div class="row cl" id='back_c'>
86
                 <label class="form-label col-xs-4 col-sm-2">
89
                 <label class="form-label col-xs-4 col-sm-2">
87
                     选择背景图:</label>
90
                     选择背景图:</label>
88
                 <div class="formControls col-xs-6 col-sm-7">
91
                 <div class="formControls col-xs-6 col-sm-7">
117
                     <input type="text" class="input-text" value="{{old('note')}}" placeholder="" name="note">
120
                     <input type="text" class="input-text" value="{{old('note')}}" placeholder="" name="note">
118
                 </div>
121
                 </div>
119
             </div>
122
             </div>
123
+
124
+            <div class="row cl new_tuwen">
125
+                <label class="form-label col-xs-4 col-sm-2">
126
+                    文章标题:</label>
127
+                <div class="formControls col-xs-6 col-sm-7">
128
+                    <input type="text" class="input-text" value="{{old('title')}}" placeholder="" name="title">
129
+                </div>
130
+            </div>
131
+            <div class="row cl new_tuwen">
132
+                <label class="form-label col-xs-4 col-sm-2">
133
+                段一文字:</label>
134
+                <div class="formControls col-xs-6 col-sm-7">
135
+                    <textarea type="text" class="textarea"  placeholder="" name="text1">{{old('text1')}}</textarea>
136
+                </div>
137
+            </div>
138
+            <div class="row cl new_tuwen">
139
+                <label class="form-label col-xs-4 col-sm-2">
140
+                    段一图片:</label>
141
+                <div class="formControls col-xs-6 col-sm-6">
142
+                        <span class="btn-upload">
143
+                          <input class="input-text upload-url radius" type="text" name="uploadfile-1" id="uploadfile-1" readonly><a href="javascript:void();" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe642;</i> 上传图片</a>
144
+                          <input type="file" multiple name="img1" class="input-file">
145
+                        </span><br>
146
+                    文件类型支持:jpg ,png ,ico ,文件大小不能超过1M
147
+                </div>
148
+            </div>
149
+
150
+            <div class="row cl new_tuwen">
151
+                <label class="form-label col-xs-4 col-sm-2">
152
+                段二文字:</label>
153
+                <div class="formControls col-xs-6 col-sm-7">
154
+                    <textarea type="text" class="textarea"  placeholder="" name="text2">{{old('text2')}}</textarea>
155
+                </div>
156
+            </div>
157
+            <div class="row cl new_tuwen">
158
+                <label class="form-label col-xs-4 col-sm-2">
159
+                    段二图一:</label>
160
+                <div class="formControls col-xs-6 col-sm-6">
161
+                        <span class="btn-upload">
162
+                          <input class="input-text upload-url radius" type="text" name="uploadfile-1" id="uploadfile-1" readonly><a href="javascript:void();" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe642;</i> 上传图片</a>
163
+                          <input type="file" multiple name="img2_1" class="input-file">
164
+                        </span><br>
165
+                    文件类型支持:jpg ,png ,ico ,文件大小不能超过1M
166
+                </div>
167
+            </div>
168
+            <div class="row cl new_tuwen">
169
+                <label class="form-label col-xs-4 col-sm-2">
170
+                    段二图二:</label>
171
+                <div class="formControls col-xs-6 col-sm-6">
172
+                        <span class="btn-upload">
173
+                          <input class="input-text upload-url radius" type="text" name="uploadfile-1" id="uploadfile-1" readonly><a href="javascript:void();" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe642;</i> 上传图片</a>
174
+                          <input type="file" multiple name="img2_2" class="input-file">
175
+                        </span><br>
176
+                    文件类型支持:jpg ,png ,ico ,文件大小不能超过1M
177
+                </div>
178
+            </div>
179
+
180
+            <div class="row cl new_tuwen">
181
+                <label class="form-label col-xs-4 col-sm-2">
182
+                段三文字:</label>
183
+                <div class="formControls col-xs-6 col-sm-7">
184
+                    <textarea type="text" class="textarea"  placeholder="" name="text3">{{old('text3')}}</textarea>
185
+                </div>
186
+            </div>
187
+            <div class="row cl new_tuwen">
188
+                <label class="form-label col-xs-4 col-sm-2">
189
+                    段三图片:</label>
190
+                <div class="formControls col-xs-6 col-sm-6">
191
+                        <span class="btn-upload">
192
+                          <input class="input-text upload-url radius" type="text" name="uploadfile-1" id="uploadfile-1" readonly><a href="javascript:void();" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe642;</i> 上传图片</a>
193
+                          <input type="file" multiple name="img3" class="input-file">
194
+                        </span><br>
195
+                    文件类型支持:jpg ,png ,ico ,文件大小不能超过1M
196
+                </div>
197
+            </div>
198
+
120
             
199
             
121
             <div class="row cl">
200
             <div class="row cl">
122
                 <div class="col-9 col-offset-2">
201
                 <div class="col-9 col-offset-2">
183
 
262
 
184
         function getTback(){
263
         function getTback(){
185
             var t_id = $("input[type='radio'][name='t_id']:checked").val();
264
             var t_id = $("input[type='radio'][name='t_id']:checked").val();
265
+            if(t_id==4){
266
+                $(".new_tuwen").show();
267
+                $("#back_c").hide();
268
+                return false;
269
+            }
270
+            else{
271
+                $(".new_tuwen").hide();
272
+                $("#back_c").show();
273
+            }
186
             if(t_id>0){
274
             if(t_id>0){
187
                 $.ajax({
275
                 $.ajax({
188
                     url:'/admin/template/getTempback/'+t_id,
276
                     url:'/admin/template/getTempback/'+t_id,

+ 83 - 0
resources/views/template/sourceedit.blade.php

84
                     @endif
84
                     @endif
85
                 </div>
85
                 </div>
86
             </div>
86
             </div>
87
+            @if($template['t_id'] !=4)
87
             <div class="row cl">
88
             <div class="row cl">
88
                 <label class="form-label col-xs-4 col-sm-2">
89
                 <label class="form-label col-xs-4 col-sm-2">
89
                     选择背景图:</label>
90
                     选择背景图:</label>
112
                     @endif
113
                     @endif
113
                 </div>
114
                 </div>
114
             </div>
115
             </div>
116
+            @endif
115
 
117
 
116
             <div class="row cl">
118
             <div class="row cl">
117
                 <label class="form-label col-xs-4 col-sm-2">
119
                 <label class="form-label col-xs-4 col-sm-2">
120
                     <input type="text" class="input-text" value="{{$template['note']}}" placeholder="" name="note">
122
                     <input type="text" class="input-text" value="{{$template['note']}}" placeholder="" name="note">
121
                 </div>
123
                 </div>
122
             </div>
124
             </div>
125
+
126
+            @if($template['t_id'] ==4)
127
+            <div class="row cl new_tuwen">
128
+                <label class="form-label col-xs-4 col-sm-2">
129
+                    文章标题:</label>
130
+                <div class="formControls col-xs-6 col-sm-7">
131
+                    <input type="text" class="input-text" value="{{$new_context['title']}}" placeholder="" name="title">
132
+                </div>
133
+            </div>
134
+            <div class="row cl new_tuwen">
135
+                <label class="form-label col-xs-4 col-sm-2">
136
+                段一文字:</label>
137
+                <div class="formControls col-xs-6 col-sm-7">
138
+                    <textarea type="text" class="textarea"  placeholder="" name="text1">{{$new_context['text1']}}</textarea>
139
+                </div>
140
+            </div>
141
+            <div class="row cl new_tuwen">
142
+                <label class="form-label col-xs-4 col-sm-2">
143
+                    段一图片:</label>
144
+                <div class="formControls col-xs-6 col-sm-6">
145
+                    <div><img width="100" src="{{$new_context['img1']?$new_context['img1']:'/empty.png'}}"/></div><br>
146
+                        <span class="btn-upload">
147
+                          <input class="input-text upload-url radius" type="text" name="uploadfile-1" id="uploadfile-1" readonly><a href="javascript:void();" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe642;</i> 上传图片</a>
148
+                          <input type="file" multiple name="img1" class="input-file">
149
+                        </span><br>
150
+                    文件类型支持:jpg ,png ,ico ,文件大小不能超过1M
151
+                </div>
152
+            </div>
153
+
154
+            <div class="row cl new_tuwen">
155
+                <label class="form-label col-xs-4 col-sm-2">
156
+                段二文字:</label>
157
+                <div class="formControls col-xs-6 col-sm-7">
158
+                    <textarea type="text" class="textarea"  placeholder="" name="text2">{{$new_context['text2']}}</textarea>
159
+                </div>
160
+            </div>
161
+            <div class="row cl new_tuwen">
162
+                <label class="form-label col-xs-4 col-sm-2">
163
+                    段二图一:</label>
164
+                <div class="formControls col-xs-6 col-sm-6">
165
+                    <div><img width="100" src="{{$new_context['img2_1']?$new_context['img2_1']:'/empty.png'}}"/></div><br>
166
+                        <span class="btn-upload">
167
+                          <input class="input-text upload-url radius" type="text" name="uploadfile-1" id="uploadfile-1" readonly><a href="javascript:void();" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe642;</i> 上传图片</a>
168
+                          <input type="file" multiple name="img2_1" class="input-file">
169
+                        </span><br>
170
+                    文件类型支持:jpg ,png ,ico ,文件大小不能超过1M
171
+                </div>
172
+            </div>
173
+            <div class="row cl new_tuwen">
174
+                <label class="form-label col-xs-4 col-sm-2">
175
+                    段二图二:</label>
176
+                <div class="formControls col-xs-6 col-sm-6">
177
+                    <div><img width="100" src="{{$new_context['img2_2']?$new_context['img2_2']:'/empty.png'}}"/></div><br>
178
+                        <span class="btn-upload">
179
+                          <input class="input-text upload-url radius" type="text" name="uploadfile-1" id="uploadfile-1" readonly><a href="javascript:void();" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe642;</i> 上传图片</a>
180
+                          <input type="file" multiple name="img2_2" class="input-file">
181
+                        </span><br>
182
+                    文件类型支持:jpg ,png ,ico ,文件大小不能超过1M
183
+                </div>
184
+            </div>
185
+
186
+            <div class="row cl new_tuwen">
187
+                <label class="form-label col-xs-4 col-sm-2">
188
+                段三文字:</label>
189
+                <div class="formControls col-xs-6 col-sm-7">
190
+                    <textarea type="text" class="textarea"  placeholder="" name="text3">{{$new_context['text3']}}</textarea>
191
+                </div>
192
+            </div>
193
+            <div class="row cl new_tuwen">
194
+                <label class="form-label col-xs-4 col-sm-2">
195
+                    段三图片:</label>
196
+                <div class="formControls col-xs-6 col-sm-6">
197
+                    <div><img width="100" src="{{$new_context['img3']?$new_context['img3']:'/empty.png'}}"/></div><br>
198
+                        <span class="btn-upload">
199
+                          <input class="input-text upload-url radius" type="text" name="uploadfile-1" id="uploadfile-1" readonly><a href="javascript:void();" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe642;</i> 上传图片</a>
200
+                          <input type="file" multiple name="img3" class="input-file">
201
+                        </span><br>
202
+                    文件类型支持:jpg ,png ,ico ,文件大小不能超过1M
203
+                </div>
204
+            </div>
205
+            @endif
123
             
206
             
124
             <div class="row cl">
207
             <div class="row cl">
125
                 <div class="col-9 col-offset-2">
208
                 <div class="col-9 col-offset-2">