Kaynağa Gözat

Merge branch 'sh/20'

sunhao 5 yıl önce
ebeveyn
işleme
fe201af76f

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

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

Dosya farkı çok büyük olduğundan ihmal edildi
+ 30 - 8
app/Http/Controllers/Admin/StatisticsController.php


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

@@ -459,16 +459,21 @@ class TemplateController extends Controller
459 459
      */
460 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 467
         $this->validate($request, [
463 468
             't_id' => 'required',           
464
-            'back_img' => 'required',           
469
+            'back_img' => $back_vali_str,           
465 470
         ], [
466 471
             't_id.required' => '模板不能为空',
467 472
             'back_img.required' => '背景图不能为空',
468 473
             
469 474
         ]);
470 475
         $template = new TemplatesSource();
471
-        $template->t_id = intval($request->input('t_id'));
476
+        $template->t_id = $t_id;
472 477
         $template->note = trim($request->input('note'));
473 478
     
474 479
         $template->back_img = trim($request->input('back_img'));
@@ -486,6 +491,52 @@ class TemplateController extends Controller
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 540
         if($template->save()){
490 541
             //生成连接
491 542
             $template->url = $this->createSourceUrl($template->t_id, $template->id);
@@ -504,7 +555,11 @@ class TemplateController extends Controller
504 555
         $templates = Templates::where('is_del', 0)->whereNotNull('url')->get();      
505 556
         $template = TemplatesSource::findOrFail($id);
506 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,39 +569,56 @@ class TemplateController extends Controller
514 569
     public function sourceupdate(Request $request)
515 570
     {
516 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 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 574
         $template->note = trim($request->input('note'));
536 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 623
         $template->save();
552 624
         return redirect('/admin/template/sourceindex')->with('info', '修改成功');

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

@@ -35,6 +35,19 @@ class TemplateController extends Controller {
35 35
         $_open_ids = Admin::where('is_use', 1)->where('is_qrcode_use', 1)->lists('id');
36 36
         //获取背景图
37 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 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 52
         if(empty($result)){
40 53
             return self::returnValue([],1001);
@@ -68,7 +81,7 @@ class TemplateController extends Controller {
68 81
 
69 82
         $qrcode = Admin::where('id', $saler_id)->pluck('qrcode');
70 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,7 +228,7 @@
228 228
                 <label class="form-label col-xs-4 col-sm-2">
229 229
                     <font color='red'>* </font>下单时间:</label>
230 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 232
                 </div>
233 233
             </div>
234 234
 
@@ -676,11 +676,7 @@
676 676
             layer.msg('预发货时间不能为空!',{icon:2,time:1500});
677 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 680
         var warehouse = $("#warehouse").val();
685 681
         if(warehouse<1){
686 682
             layer.msg('仓库必须选择!',{icon:2,time:1500});

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

@@ -232,8 +232,10 @@
232 232
                 <div class="formControls col-xs-6 col-sm-6">
233 233
                     <input type="radio" name="payment_type"  value="1" @if($order['payment_type']=='1') checked  @endif>
234 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 237
                     <label for="status-0" style="margin-right: 27px;">付款码支付</label>
238
+                    @endif
237 239
                     <input type="radio" name="payment_type" value="3" @if($order['payment_type']=='3') checked @endif>
238 240
                     <label for="status-0" style="margin-right: 27px;">个体户支付</label>
239 241
                 </div>
@@ -284,7 +286,7 @@
284 286
                 <label class="form-label col-xs-4 col-sm-2">
285 287
                     <font color='red'>* </font>下单时间:</label>
286 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 290
                 </div>
289 291
             </div>
290 292
 

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

@@ -172,7 +172,8 @@
172 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 173
                                     <option value='0'>-请选择-</option>
174 174
                                     <option value='1'>微信支付</option>
175
-                                    <option value='2'>付款码支付</option>
175
+                                    <!--option value='2'>付款码支付</option-->
176
+                                    <option value='3'>个体户支付</option>
176 177
                                 </select>
177 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 179
                             </td>
@@ -684,6 +685,9 @@
684 685
                     if(refund_type==2){
685 686
                         refund_type = '付款码支付';
686 687
                     }
688
+                    if(refund_type==3){
689
+                        refund_type = '个体户支付';
690
+                    }
687 691
                     if(refund_type==0){
688 692
                         refund_type = '';
689 693
                     }

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

@@ -28,19 +28,23 @@
28 28
                 <tr class="text-c">
29 29
                     <th width="5%">团队</th>
30 30
                     <th width="5%">时间</th>
31
-                    <th width="5%">总单数</th>
31
+                    <th width="4%">总单数</th>
32 32
                     <th width="5%">成交金额</th>
33 33
                     <th width="5%">微信支付金额</th>
34 34
                     <th width="5%">付款码支付金额</th>
35
-                    <th width="5%">售后单数</th>
35
+                    <th width="5%">个体户支付金额</th>
36
+                    <th width="4%">售后单数</th>
36 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 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 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 48
                     <th width="5%">货品成本</th>
45 49
                     <th width="5%">物流成本</th>
46 50
                     <th width="5%">毛利</th>
@@ -57,6 +61,7 @@
57 61
                             <td>{{$a['receivedAmount']}}</td>
58 62
                             <td>{{$a['wx_money']}}</td>
59 63
                             <td>{{$a['zfm_money']}}</td>
64
+                            <td>{{$a['gth_money']}}</td>
60 65
                             <td>{{$a['aftersale_count']}}</td>
61 66
                             <td>{{$a['aftersale_fee']}}</td>
62 67
                             <td>{{$a['wx_refund_count']}}</td>
@@ -65,6 +70,9 @@
65 70
                             <td>{{$a['zfm_refund_count']}}</td>
66 71
                             <td>{{$a['zfm_refund_price']}}</td>
67 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 76
                             <td>{{$a['send_count']}}</td>
69 77
                             <td>{{$a['cost']}}</td>
70 78
                             <td>{{$a['freight_cost']}}</td>

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

@@ -51,6 +51,9 @@
51 51
     .clear {
52 52
         zoom: 1;
53 53
     }
54
+    .new_tuwen{
55
+        display: none;
56
+    }
54 57
 </style>
55 58
     <body>
56 59
     @if(count($errors) > 0)
@@ -82,7 +85,7 @@
82 85
                     @endif
83 86
                 </div>
84 87
             </div>
85
-            <div class="row cl">
88
+            <div class="row cl" id='back_c'>
86 89
                 <label class="form-label col-xs-4 col-sm-2">
87 90
                     选择背景图:</label>
88 91
                 <div class="formControls col-xs-6 col-sm-7">
@@ -117,6 +120,82 @@
117 120
                     <input type="text" class="input-text" value="{{old('note')}}" placeholder="" name="note">
118 121
                 </div>
119 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 200
             <div class="row cl">
122 201
                 <div class="col-9 col-offset-2">
@@ -183,6 +262,15 @@
183 262
 
184 263
         function getTback(){
185 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 274
             if(t_id>0){
187 275
                 $.ajax({
188 276
                     url:'/admin/template/getTempback/'+t_id,

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

@@ -84,6 +84,7 @@
84 84
                     @endif
85 85
                 </div>
86 86
             </div>
87
+            @if($template['t_id'] !=4)
87 88
             <div class="row cl">
88 89
                 <label class="form-label col-xs-4 col-sm-2">
89 90
                     选择背景图:</label>
@@ -112,6 +113,7 @@
112 113
                     @endif
113 114
                 </div>
114 115
             </div>
116
+            @endif
115 117
 
116 118
             <div class="row cl">
117 119
                 <label class="form-label col-xs-4 col-sm-2">
@@ -120,6 +122,87 @@
120 122
                     <input type="text" class="input-text" value="{{$template['note']}}" placeholder="" name="note">
121 123
                 </div>
122 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 207
             <div class="row cl">
125 208
                 <div class="col-9 col-offset-2">