Explorar o código

德邦打印--剔除权限 + 称重优化(当天不可选)

king %!s(int64=4) %!d(string=hai) anos
pai
achega
f8e5aca950

+ 5 - 6
app/Http/Controllers/ControlPanelController.php

@@ -155,12 +155,11 @@ class ControlPanelController extends Controller
             foreach (CarbonPeriod::create($start,$end) as $date){
                 /** @var $date Carbon */
                 $str = $date->format("Y-m-d");
-                if (strtotime($str) <= strtotime(now())){
-                    $arr = $this->getTargetData($str, $owner);
-                    if ($arr) {
-                        $data[] = $arr;
-                        $title[] = $str;
-                    }
+                if (strtotime($str) >= strtotime(date("Y-m-d"))) continue;
+                $arr = $this->getTargetData($str, $owner);
+                if ($arr) {
+                    $data[] = $arr;
+                    $title[] = $str;
                 }
             }
             $start = date('Y-m-d', strtotime($start));

+ 2 - 0
app/Http/Controllers/WaybillController.php

@@ -123,7 +123,9 @@ class WaybillController extends Controller
         if (!$request->warehouse_weight_other && $request->warehouse_weight_unit_id_other)$request->offsetUnset('warehouse_weight_unit_id_other');
         if (!$request->carrier_weight && $request->carrier_weight_unit_id)$request->offsetUnset('carrier_weight_unit_id');
         if (!$request->carrier_weight_other && $request->carrier_weight_unit_id_other)$request->offsetUnset('carrier_weight_unit_id_other');
+        if ($request->type == '德邦物流' && empty($request->carrier_bill)) $request->offsetSet('carrier_bill', 'dbwl');
         $this->validatorWaybillDispatch($request,$id)->validate();
+        if ($request->carrier_bill == 'dbwl')$request->offsetSet('carrier_bill', '');
         $waybillPayoffParam = [];
         $waybillPayoffParam['total_receivable']=0;
         /** @var WaybillService */

+ 2 - 3
resources/views/control/panel.blade.php

@@ -365,7 +365,7 @@
                                     <label class="col-3">
                                         <select class="form-control rounded" v-model="searchOption.weightSelect"
                                                 @change="switchWeightDate()">
-                                            <option v-for="(date,i) in dateOptions" :value="i">@{{ date.text }}</option>
+                                            <option v-for="(date,i) in dateOptions" :value="i" v-bind:disabled="i==0">@{{ date.text }}</option>
                                         </select>
                                     </label>
                                     <el-select class="col-3" placeholder="请选择对应货主" multiple v-model="selectWeightOwners"
@@ -1059,7 +1059,7 @@
                                 });
                             }
                         });
-                        myechart.setOption(option);
+                        myechart.setOption(option,1,0);
                     });
                 },
                 loadOrderPackageReceivedSyncRecordInfo() {
@@ -1143,7 +1143,6 @@
                             tooltip: title
                         }
                     });
-                    console.log(temp)
                     return {
                         legend: {},
                         tooltip: {