Zhouzhendong 5 лет назад
Родитель
Сommit
a4545c81fc

+ 14 - 0
app/Http/Controllers/TestController.php

@@ -102,6 +102,20 @@ class TestController extends Controller
             app(BatchUpdateService::class)->batchUpdate('inventory_accounts',$updateParams);
         }
     }
+    public function zzd()
+    {
+        $a = DB::connection("oracle")->select(DB::raw("select * from DOC_WAVE_DETAILS where WAVENO = 'W201210000112'"));
+        $str="";
+        $a = array_column($a,"orderno");
+        foreach ($a as $t){
+            $str.="'".$t."',";
+        }
+        dd($str);
+        $str = rtrim($str,",");
+        $c = DB::connection("oracle")->select(DB::raw("select SUM(qtyordered) s from DOC_ORDER_DETAILS where ORDERNO IN (".$str.")"));
+        dd($c);
+    }
+
     public function mergeCarrier(){
         $carriers = Carrier::query()->get();
         $logistics = [];

+ 26 - 0
resources/views/order/index/delivering.blade.php

@@ -39,6 +39,7 @@
                         <button class="btn btn-sm ml-2" :class="[checkData.length>0?'btn-dark':'btn-outline-danger']" @click="isRejectedBillExist()"
                             style="opacity: 0.7">生成退货单</button>
                     @endcan
+                    <button class="btn btn-sm ml-2 btn-primary" v-if="checkData.length>0" @click="copyLogisticNumber()">复制快递单号</button>
                 </div>
                 <div class="modal fade " style="top: 20%" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                     <div class="modal-dialog">
@@ -852,6 +853,31 @@
                 copyLogisticInfo(){
                     this.copyText(this.tagOrder.logisticInfo)
                 },
+                copyLogisticNumber(){
+                    let text="";
+                    this.checkData.forEach((code,i)=>{
+                        if (this.picktotraceidMap[code] && this.picktotraceidMap[code].length>1){console.log(1);
+                            this.picktotraceidMap[code].forEach((number,j)=>{
+                                text += number;
+                                if (i!==this.checkData.length-1 && j!==this.picktotraceidMap[code].length-1){
+                                    text += ",";
+                                }
+                            });
+                        }else{
+                            this.orders.some(order=>{
+                                if (order.orderno == code){
+                                    if (order.soreference5) {
+                                        text += order.soreference5;
+                                        if(i!==this.checkData.length-1)text += ",";
+                                    }
+                                    return true;
+                                }
+                            });
+                        }
+                    });
+                    if (!text)text = " ";
+                    this.copyText(text)
+                },
                 copyMerchantInfo(){
                     this.copyText(this.tagOrder.merchantInfo)
                 },

+ 29 - 0
resources/views/rejected/search/general.blade.php

@@ -59,6 +59,8 @@
                 @can('退货管理-编辑')
                     <a class="btn btn-sm btn-outline-dark" href="{{url('rejected/importRejectedNumber')}}" style="cursor: pointer">导入修改</a>
                 @endcan
+                <button class="btn btn-sm ml-2 btn-primary" v-if="rejectedBills_checkBoxes.length>0" @click="copyLogisticNumber()">复制快递单号</button>
+
                 <span for="checkSelectingAll" class="d-none" id="cloneCheckAll">
                     <input type="checkbox" class="form-control-sm tooltipTarget" title="全选"
                            id="checkSelectingAll" @click="checkBoxAllToggle($event)">
@@ -153,6 +155,7 @@
                 <div class="text-info h5 btn btn">{{$rejectedBills->count()}}/{{$rejectedBills->total()}}</div>
                 {{$rejectedBills->appends($paginateParams)->links()}}
             </div>
+            <label><textarea  id="clipboardDiv" style="opacity:0"></textarea></label>
         </div>
     </div>
 @endsection
@@ -307,6 +310,32 @@
                 }
             },
             methods:{
+                copyLogisticNumber(){
+                    let text="";
+                    this.rejectedBills_checkBoxes.forEach((id,i)=>{
+                        this.rejectedBills.some(bill=>{
+                            if (bill.id == id){
+                                text += bill.logistic_number_return;
+                                if (i!==this.rejectedBills_checkBoxes.length-1)text += ",";
+                                return true;
+                            }
+                        });
+                    });
+                    this.copyText(text)
+                },
+                copyText(text){
+                    try {
+                        $('#clipboardDiv').text(text).select().focus();
+                        document.execCommand("Copy");
+                        tempTip.setIndex(1052)
+                        tempTip.setDuration(2000)
+                        tempTip.showSuccess('复制成功')
+                    } catch (e) {
+                        tempTip.setIndex(1052)
+                        tempTip.setDuration(2000)
+                        tempTip.showSuccess('复制失败:'+e)
+                    }
+                },
                 updateRejectedBillRemark:function (e) {
                     let target = $(e.target);
                     let _this = this;

+ 1 - 1
resources/views/station/monitor/_svg.blade.php

@@ -1,5 +1,5 @@
 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="blue-cube"
-     viewBox="68 30 180 220" {{--style="transform: rotate3d(40,-20,-20,48deg)"--}}>
+     viewBox="68 30 180 220" {{--style="transform: rotate3d(0,0,60,40deg)"--}}>
     <defs>
         <g id="cube" style="fill-opacity: .9;stroke-miterlimit: 0;">
             <rect width="21" height="24" fill="#fff" stroke="#0079ad"

+ 2 - 2
resources/views/station/monitor/show.blade.php

@@ -40,8 +40,8 @@
                         </div>
                         <div class="row pt-2">
                             <div class="col">
-                                @include("station.monitor._svg")
-                                {{--<img src="{{asset('images/demoBin.png')}}" alt="" class="img">--}}
+                                {{--@include("station.monitor._svg")--}}
+                                <img src="{{asset('images/demoBin.png')}}" alt="" class="img">
                             </div>
                         </div>
                     </div>