Procházet zdrojové kódy

Merge branch 'zzd' of ssh://was.baoshi56.com:10022/var/git/bswas

LD před 5 roky
rodič
revize
87f643e8c1

+ 7 - 3
app/Http/Controllers/DeliveryAppointmentController.php

@@ -300,7 +300,10 @@ class DeliveryAppointmentController extends Controller
         foreach (DeliveryAppointment::PERIOD as $key=>$period){
             $arr = explode("-",$period);
             if (count($arr)!=2)continue;
-            if ($hour<$arr[1])$index = $key;
+            if ($hour<$arr[1]){
+                $index = $key;
+                break;
+            }
         }
         if ($index===null)$this->success([]);
         DeliveryAppointmentCar::query()->whereHas("deliveryAppointment",function (Builder $query)use($index){
@@ -347,6 +350,7 @@ html;
 
     /**
      * 检查key有效性
+     * 21-4-2 切换永久二维码 取消时段校验
      *
      * @param string $key
      * @param int $offset
@@ -359,11 +363,11 @@ html;
         $key = base64_decode($key);
         $ch = app("DeliveryAppointmentService")->getKey();
         $len = strlen($ch);
-        $timeLen = strlen($key)-$len;
         if (substr($key,0,$len)!=$ch)return false;
+        /*$timeLen = strlen($key)-$len;
         $time = substr($key,$len)+$offset;
         $thisTime = (integer)substr(time(),$timeLen*-1);
-        if ($thisTime>$time)return false;
+        if ($thisTime>$time)return false;*/
         return true;
     }
     /**

+ 2 - 9
app/Http/Controllers/TestController.php

@@ -163,15 +163,8 @@ class TestController extends Controller
 
     public function test()
     {
-        $waybills = Waybill::query()->with("order")->where("created_at","<=","2021-03-31 23:59:59")
-            ->whereNotNull("order_id")->get();
-        foreach ($waybills as $waybill){
-            if ($waybill->order){
-                $result = DB::connection("oracle")->selectOne(DB::raw("SELECT 1 FROM WMS_USER.DOC_ORDER_HEADER where orderno = ? and carrierid like '%DF%'"),[$waybill->order->code]);
-                if ($result && $waybill->is_to_pay==0)$waybill->update(["is_to_pay"=>1]);
-            }
-        }
-        dd("OK");
+        $a = new DeliveryAppointmentController();
+        dd($a->getExhibitionList());
         return view("test");
     }
 

+ 4 - 4
app/Services/DeliveryAppointmentService.php

@@ -100,15 +100,15 @@ class DeliveryAppointmentService
     }
 
     /**
-     * 获取一个KEY值用于验证二维码
+     * 获取一个KEY值用于验证二维码 21-4-2 切换为永久二维码
      *
      * @return string
      */
     public function getKey()
     {
-        $y = date("y");
-        $m = date("m");
-        $d = date("d");
+        $y = 'w';//date("y");
+        $m = 'a';//date("m");
+        $d = 's';//date("d");
         $k1 = substr(env("APP_KEY"),7,2);
         $k2 = substr(env("APP_KEY"),10,2);
         $k3 = substr(env("APP_KEY"),15,2);

+ 25 - 23
resources/js/queryForm/header.js

@@ -40,7 +40,7 @@ window.Header = function getHeader(object) {
         div.style.position = "sticky";
         div.style.position = "-webkit-sticky";
         div.style.top = _fixedTop+"px";
-        div.style.backgroundColor = "white";
+        table.style.backgroundColor = "white";
         div.style.zIndex = "999";
         table.className = "table table-bordered mb-0 text-center";
         let tr = document.createElement("tr");
@@ -57,32 +57,34 @@ window.Header = function getHeader(object) {
             check.type = "checkbox";
             check.id = "checkAll";
             let trs = _targetDom.children;
-            while(trs[0].tagName !== 'TR')trs = trs[0].children;
-            check.onchange = function () {
-                if (event.target.checked){
-                    for (let i=0;i<trs.length;i++){
-                        let checkbox = getTargetChildNode(trs[i].children[0]);
-                        if (checkbox && !checkbox.checked){
-                            checkData.push(checkbox.value);
-                            checkbox.checked = true;
+            if (firstTr){
+                while(trs[0].tagName !== 'TR')trs = trs[0].children;
+                check.onchange = function () {
+                    if (event.target.checked){
+                        for (let i=0;i<trs.length;i++){
+                            let checkbox = getTargetChildNode(trs[i].children[0]);
+                            if (checkbox && !checkbox.checked){
+                                checkData.push(checkbox.value);
+                                checkbox.checked = true;
+                            }
+                        }
+                    }else{
+                        checkData = [];
+                        for (let i=0;i<trs.length;i++){
+                            let checkbox = getTargetChildNode(trs[i].children[0]);
+                            if (checkbox && checkbox.checked)checkbox.checked = false;
                         }
                     }
-                }else{
-                    checkData = [];
-                    for (let i=0;i<trs.length;i++){
-                        let checkbox = getTargetChildNode(trs[i].children[0]);
-                        if (checkbox && checkbox.checked)checkbox.checked = false;
+                };
+                for (let i=0;i<trs.length;i++){
+                    let checkbox = getTargetChildNode(trs[i].children[0]);
+                    if (checkbox) checkbox.onchange = function () {
+                        if (event.target.checked)checkData.push(checkbox.value);
+                        else checkData.splice(checkData.indexOf(checkbox.value),1);
+                        if (checkData.length === _data.length && !check.checked)check.checked=true;
+                        if (checkData.length !== _data.length && check.checked) check.checked=false;
                     }
                 }
-            };
-            for (let i=0;i<trs.length;i++){
-                let checkbox = getTargetChildNode(trs[i].children[0]);
-                if (checkbox) checkbox.onchange = function () {
-                    if (event.target.checked)checkData.push(checkbox.value);
-                    else checkData.splice(checkData.indexOf(checkbox.value),1);
-                    if (checkData.length === _data.length && !check.checked)check.checked=true;
-                    if (checkData.length !== _data.length && check.checked) check.checked=false;
-                }
             }
             th.appendChild(check);
             tr.appendChild(th);

+ 8 - 7
resources/views/personnel/laborReport/index.blade.php

@@ -479,13 +479,14 @@
                         {name:'remove',value: '操作'},
                         @endcan
                     ];
-                    new Header({
-                        el: "table",
-                        column: column,
-                        data: this.laborReports,
-                        restorationColumn: 'id',
-                        fixedTop:($('#form_div').height())+2,
-                    }).init();
+                    if (window.innerWidth > 543){
+                        new Header({
+                            el: "table",
+                            column: column,
+                            data: this.laborReports,
+                            fixedTop:($('#form_div').height())+2,
+                        }).init();
+                    }
                     setTimeout(function () {
                         let $dom_thisRecordWorkingTime=$('#dom_thisRoundRecordWorkingTime');
                         $dom_thisRecordWorkingTime.attr('title','用工总工时:'+_this.totalWorkingHours);

+ 1 - 1
resources/views/rejected/search/general.blade.php

@@ -47,7 +47,7 @@
                 @endcan
                 <button class="btn btn-sm ml-2 btn-primary" @click="copyLogisticNumber()">复制快递单号</button>
                 <table class="table table-striped table-sm table-bordered table-hover text-nowrap table-body td-min-width-80"  style="background: #fff;" id="table">
-                    <tr v-for="(rejectedBill,i) in rejectedBills" :data-id="rejectedBill.id" @click="selectTableRow(rejectedBill.id,$event)">
+                    <tr v-for="(rejectedBill,i) in rejectedBills" :data-id="rejectedBill.id"  @click="selectTr===i+1?selectTr=0:selectTr=i+1" :class="selectTr===i+1?'focusing' : ''">
                         <td>
                             <input type="checkbox" :value="rejectedBill.id"/>
                         </td>

+ 9 - 9
resources/views/store/deliveryAppointment/exhibition.blade.php

@@ -84,7 +84,7 @@
         <div class="offset-1 h1 font-weight-bold h-100">
             <div class="h-5"></div>
             <div class="w-100 h-40">
-                <div class="row h-20 mt-0" v-for="(data,i) in list" :class="data.is_delivery ? 'text-success' : 'text-primary'" v-if="i<5">
+                <div class="row h-20 mt-0" v-for="(data,i) in list" :class="data.is_delivery ? 'text-success' : 'text-primary'" {{--v-if="i<5"--}}>
                     <div class="col-3 text-line">@{{ data.license_plate_number }}</div>
                     <div class="col-2 text-line">@{{ data.driver_name }}</div>
                     <div class="col-3 text-line">@{{ data.driver_phone }}</div>
@@ -93,7 +93,7 @@
                     </div>
                 </div>
             </div>
-            <div class="row h-40 mt-0">
+            {{--<div class="row h-40 mt-0">
                 <div class="col-5">
                     <div class="h-20 mt-0 row" v-for="(data,i) in list" :class="data.is_delivery ? 'text-success' : 'text-primary'" v-if="i>4">
                         <div class="col-7 text-line">@{{ data.license_plate_number }}</div>
@@ -105,7 +105,7 @@
                 <div class="col-6">
                     <div class="mt-4" id="code"></div>
                 </div>
-            </div>
+            </div>--}}
         </div>
     </div>
 </body>
@@ -148,15 +148,15 @@
         mounted(){
             $("#container").removeClass("d-none");
             this._initData();
-            this._getKey();
             this._broadcast();
+            /*this._getKey();
             setTimeout(()=>{
                 //刷新密匙
                 this._getKey()
             },this._getDiffDate());
             setInterval(()=>{
                 this._createQrCode(this.baseUrl+this.base64());
-            },60000);
+            },60000);*/
         },
         methods:{
             _broadcast(){
@@ -214,7 +214,7 @@
                     },refreshVal);
                 });
             },
-            //获取密匙
+            /*//获取密匙
             _getKey(){
                 let url = "{{url('store/deliveryAppointment/getKey')}}";
                 window.tempTip.postBasicRequest(url,{},res=>{
@@ -239,7 +239,7 @@
                     this.QrCode.clear();
                     this.QrCode.makeCode(text);
                 }
-            },
+            },*/
             //获取当前时间距离明天0点的时间差  毫秒
             _getDiffDate(){
                 let now = new Date();
@@ -255,7 +255,7 @@
                 let timestamp = new Date(clock).getTime()+(24*60*60*1000);
                 return timestamp-dateTime;
             },
-            //加密
+            /*//加密
             base64(){
                 let _keyStr= "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
                 let output = "";
@@ -300,7 +300,7 @@
                     }
                 }
                 return utftext;
-            }
+            }*/
         },
     });
 </script>

+ 7 - 1
resources/views/transport/waybill/create.blade.php

@@ -73,12 +73,17 @@
                             @enderror
                         </div>
                     </div>
+                    <div class="col-8" style="margin-left: 15%">
+                        <button type="button" class="btn btn-outline-primary btn-sm" @click="destination='松江区泗砖仓'" style="transform: scale(0.9)">松江泗砖仓</button>
+                        <button type="button" class="btn btn-outline-primary btn-sm" @click="destination='松江区九干仓'" style="transform: scale(0.9)">松江九干仓</button>
+                        <button type="button" class="btn btn-outline-primary btn-sm" @click="destination='嘉定区武乡仓'" style="transform: scale(0.9)">嘉定武乡仓</button>
+                    </div>
                     <div class="form-group row">
                         <label for="destination" class="col-2 col-form-label text-right text-primary">目的地址 *</label>
                         <div class="col-8">
                             <input id="destination" type="text" class="form-control @error('destination') is-invalid @enderror" autocomplete="off"
                                    :readonly="!!model.order_id" required
-                                   :name="model.order_id ? '' : 'destination'" :value="model.order_id ? order.address : '{{ old('destination') }}'" >
+                                   :name="model.order_id ? '' : 'destination'" :value="model.order_id ? order.address : destination">
                             @error('destination')
                             <span class="invalid-feedback" role="alert">
                                 <strong>{{ $message }}</strong>
@@ -200,6 +205,7 @@
                     @endforeach
                 ],
                 origination:'{{old('origination')}}',
+                destination:'{{old('destination')}}',
                 model:{
                     order_id : "{{old("order_id")}}",
                     owner_id:'{{old('owner_id')}}',

+ 3 - 3
resources/views/transport/waybill/index.blade.php

@@ -56,13 +56,13 @@
                                 <button class="btn btn-outline-primary btn-sm" @click="waybillAudit(waybill.id,waybill.waybill_number)">审核</button>
                             @endcan
                             @can('运输管理-编辑')
-                                <a target="_blank" class="btn btn-outline-secondary btn-sm" :href= "('{{url('waybill/waybillEdit')}}/'+waybill.id)">修改</a>
+                                <a target="_blank" class="btn btn-outline-secondary btn-sm" :href= "('{{url('waybill/transport/waybillEdit')}}/'+waybill.id)">修改</a>
                             @endcan
                         </span>
                         <span v-if=waybill.status==="已审核">
                             @can('运输管理-运单-调度')
                                 <button class="btn btn-outline-secondary btn-sm" @click="waybillRetreatAudit(waybill.id,waybill.waybill_number)">取消审核</button>
-                                <a target="_blank" class="btn btn-outline-secondary btn-sm" :href= "('{{url('waybill')}}/'+waybill.id+'/edit')">调度</a>
+                                <a target="_blank" class="btn btn-outline-secondary btn-sm" :href= "('{{url('waybill/transport')}}/'+waybill.id+'/edit')">调度</a>
                             @endcan
                         </span>
                         <span v-if=waybill.status==="待终审">
@@ -70,7 +70,7 @@
                                 <button class="btn btn-outline-success btn-sm" @click="waybillEndAudit(waybill.id,waybill.waybill_number)">完结</button>
                             @endcan
                             @can('运输管理-运单-调度')
-                                <a target="_blank" class="btn btn-outline-secondary btn-sm" :href= "('{{url('waybill')}}/'+waybill.id+'/edit')">改调度</a>
+                                <a target="_blank" class="btn btn-outline-secondary btn-sm" :href= "('{{url('waybill/transport')}}/'+waybill.id+'/edit')">改调度</a>
                             @endcan
                         </span>
                     </td>