Parcourir la source

货主组别 删除 德邦默认参数+ 打印机

king il y a 4 ans
Parent
commit
c8ecb9af19

+ 4 - 17
app/Http/Controllers/OwnerController.php

@@ -30,7 +30,7 @@ class OwnerController extends Controller
         if (!Gate::allows('货主-查询')) {
             return redirect(url('/'));
         }
-        $query = Owner::with(['ownerGroup'])
+        $query = Owner::query()
             ->orderBy('id', 'desc')
             ->whereNull('deleted_at');
         if ($request->has('name')) {
@@ -53,19 +53,8 @@ class OwnerController extends Controller
                 $query->where('code','like',$code.'%');
             }
         }
-        if($request->has('owner_group_id')){
-            $owner_group_id = $request->input('owner_group_id');
-            if (strpos($owner_group_id, ',') || strpos($owner_group_id, ',') || strpos($owner_group_id, ' ')) {
-                $arr = array_filter(preg_split('/[,, ]+/is', $owner_group_id));
-                $query->whereIn('owner_group_id', $arr);
-                unset($owner_group_id);
-            } else {
-                $query->where('owner_group_id',$owner_group_id);
-            }
-        }
         $owners = $query->paginate($request->paginate);
-        $group = app('OwnerGroupService')->getSelection();
-        return view('maintenance.owner.index', ['owners' => $owners, 'groups'=>$group]);
+        return view('maintenance.owner.index', ['owners' => $owners]);
     }
 
     public function create()
@@ -73,8 +62,7 @@ class OwnerController extends Controller
         if (!Gate::allows('货主-录入')) {
             return redirect(url('/'));
         }
-        $group = app('OwnerGroupService')->getSelection();
-        return view('maintenance.owner.create',['groups' => $group]);
+        return view('maintenance.owner.create');
     }
 
     public function store(Request $request)
@@ -160,8 +148,7 @@ class OwnerController extends Controller
         if (!Gate::allows('货主-编辑')) {
             return redirect(url('/'));
         }
-        $group = app('OwnerGroupService')->getSelection();
-        return view('maintenance.owner.edit', ['owner' => $owner, 'groups'=>$group]);
+        return view('maintenance.owner.edit', ['owner' => $owner]);
     }
 
     /**

+ 3 - 6
app/Http/Controllers/UserController.php

@@ -3,6 +3,7 @@
 namespace App\Http\Controllers;
 
 use App\Components\AsyncResponse;
+use App\Owner;
 use App\OwnerGroup;
 use App\Role;
 use App\Supplier;
@@ -80,8 +81,7 @@ class UserController extends Controller
         $logistics=app('LogisticService')->getSelection(["id","name"],"物流");
         $userWorkgroups=UserWorkgroup::query()->get();
         $suppliers=Supplier::query()->get();
-        $ownerGroups=app('OwnerGroupService')->getSelection();
-        return view('maintenance.user.create',['rolesAll'=>$roles,'logistics'=>$logistics,'userWorkgroups'=>$userWorkgroups,'suppliers'=>$suppliers, 'ownerGroups'=>$ownerGroups]);
+        return view('maintenance.user.create',['rolesAll'=>$roles,'logistics'=>$logistics,'userWorkgroups'=>$userWorkgroups,'suppliers'=>$suppliers]);
     }
 
 
@@ -117,10 +117,7 @@ class UserController extends Controller
         $userWorkgroup=$user->userWorkgroups()->first();
         $supplierUser=$user->suppliers()->get();
         $suppliers=Supplier::query()->get();
-        $ownerGroups=app('OwnerGroupService')->getSelection();
-//        $ownerGroup=$user->ownerGroups()->get();
-        $ownerGroup=[];
-        return view('maintenance.user.edit',compact('user','rolesAll','roles','logistics','logisticUser','userWorkgroups','userWorkgroup','suppliers','supplierUser','ownerGroups','ownerGroup'));
+        return view('maintenance.user.edit',compact('user','rolesAll','roles','logistics','logisticUser','userWorkgroups','userWorkgroup','suppliers','supplierUser'));
     }
 
     /**

+ 9 - 1
app/Http/Controllers/WaybillController.php

@@ -15,6 +15,8 @@ use App\Services\UnitService;
 use App\Services\WaybillPayoffService;
 use App\Services\WaybillPriceModelService;
 use App\Services\WaybillService;
+use App\Terminal;
+use App\TerminalPrinter;
 use App\UploadFile;
 use App\WaybillAuditLog;
 use App\WaybillOnTop;
@@ -58,13 +60,19 @@ class WaybillController extends Controller
         if(!Gate::allows('运输管理-运单-查询')){ return view("exception.authority");  }
         $paginateParams = $request->input();
         $waybills=app('waybillService')->paginate($request->input());
+        $mac_addr = getMacAddr();
+        $print = TerminalPrinter::with(['terminal','logistics'])
+            ->whereHas('terminal',function ($query)use($mac_addr){$query->where('ip',$mac_addr);})
+            ->whereHas('logistics',function ($query){$query->where('logistic_id',15);})
+            ->first();
+        $print = $print->printer_name??0;
         return view('transport.waybill.index', [
             'waybills' => $waybills,
             'logistics' => $logisticService->getSelection(["id","name"],"物流"),
             'owners' => $ownerService->getIntersectPermitting(),
             "carTypes" => CarType::query()->get(),
             'paginateParams'=>$paginateParams,
-            'uriType'=>$request->uriType??'']);
+            'uriType'=>$request->uriType??'','print_name'=> $print]);
     }
 
 

+ 0 - 6
app/Owner.php

@@ -227,10 +227,4 @@ class Owner extends Model
     {   //角色
         return $this->belongsToMany(Role::class);
     }
-
-    //所属组别
-    public function ownerGroup()
-    {   //工作组
-        return $this->belongsTo(OwnerGroup::class,"owner_group_id","id");
-    }
 }

+ 0 - 50
app/Services/OwnerGroupService.php

@@ -1,50 +0,0 @@
-<?php
-
-namespace App\Services;
-
-use App\Traits\ServiceAppAop;
-use App\OwnerGroup;
-
-class OwnerGroupService
-{
-    use ServiceAppAop;
-    protected $modelClass=OwnerGroup::class;
-
-    public function getSelection($column = ['id', 'name'])
-    {
-        return OwnerGroup::query()->select($column)->get();
-    }
-
-    public function paginate($params = [])
-    {
-        $query = OwnerGroup::query()->orderByDesc('id');
-        if (isset($params['name']) && trim($params['name'])) $query->where('name', 'like', '%'.trim($params['name']).'%');
-        return $query->paginate($params['paginate']??50);
-    }
-
-    public function create(array $params)
-    {
-        return OwnerGroup::query()->create($params);
-    }
-
-
-    public function find($id)
-    {
-        return OwnerGroup::query()->find($id);
-    }
-
-    public function update(array $params, array $values)
-    {
-        $query = OwnerGroup::query();
-        foreach ($params as $column => $value){
-            $query->where($column,$value);
-        }
-        return $query->update($values);
-    }
-
-    public function destroy($id)
-    {
-        return OwnerGroup::destroy($id);
-    }
-
-}

+ 0 - 3
app/User.php

@@ -96,9 +96,6 @@ class User extends Authenticatable
     function suppliers(){
         return $this->belongsToMany('App\Supplier','supplier_user','user_id','supplier_id');
     }
-    function ownerGroups(){
-        return $this->belongsToMany('App\UserRole','user_role','id_user','id_role');
-    }
 
     function authorities(){
         $authorities = new Collection([]);

+ 31 - 0
app/Utils/helpers.php

@@ -78,3 +78,34 @@ function httpPost($uri = '', $body = '', $header = ''):array
     $data = $res->getBody()->getContents();
     return json_decode($data,  true);
 }
+
+function getMacAddr($type = PHP_OS):string
+{
+    $return_array = []; $mac_addr = '';
+    switch (strtolower($type)){
+        case 'linux' :
+            @exec('ifconfig -a', $return_array);
+            break;
+        case 'solaris' :
+        case 'unix' :
+        case 'aix' : break;
+        default:
+            @exec('ipconfig /all', $return_array);
+            if (empty($return_array)){
+                $ipconfig = $_SERVER['WINDIR'].'system32ipconfig.exe';
+                if (is_file($ipconfig)) @exec($ipconfig.' /all', $return_array);
+                else @exec($_SERVER['WINDIR'].'systemipconfig.exe /all', $return_array);
+            }
+            break;
+
+    }
+    $temp_array = [];
+    foreach ($return_array as $value){
+        if (preg_match('/[0-9a-f][0-9a-f][:-]'.'[0-9a-f][0-9a-f][:-]'.'[0-9a-f][0-9a-f][:-]'.'[0-9a-f][0-9a-f][:-]'.'[0-9a-f][0-9a-f][:-]'.'[0-9a-f][0-9a-f]/i', $value, $temp_array)){
+            $mac_addr = $temp_array[0];
+            break;
+        }
+    }
+    unset($temp_array);
+    return $mac_addr;
+}

+ 0 - 32
database/migrations/2021_08_23_141519_create_owner_groups_table.php

@@ -1,32 +0,0 @@
-<?php
-
-use Illuminate\Database\Migrations\Migration;
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Support\Facades\Schema;
-
-class CreateOwnerGroupsTable extends Migration
-{
-    /**
-     * Run the migrations.
-     *
-     * @return void
-     */
-    public function up()
-    {
-        Schema::create('owner_groups', function (Blueprint $table) {
-            $table->id();
-            $table->string('name')->nullable(false)->comment('组名');
-            $table->timestamps();
-        });
-    }
-
-    /**
-     * Reverse the migrations.
-     *
-     * @return void
-     */
-    public function down()
-    {
-        Schema::dropIfExists('owner_groups');
-    }
-}

+ 0 - 32
database/migrations/2021_08_24_133631_add_owner_group_id_column_in_owners_table.php

@@ -1,32 +0,0 @@
-<?php
-
-use Illuminate\Database\Migrations\Migration;
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Support\Facades\Schema;
-
-class AddOwnerGroupIdColumnInOwnersTable extends Migration
-{
-    /**
-     * Run the migrations.
-     *
-     * @return void
-     */
-    public function up()
-    {
-        Schema::table('owners', function (Blueprint $table) {
-            $table->unsignedInteger('owner_group_id')->comment('货主组别 id');
-        });
-    }
-
-    /**
-     * Reverse the migrations.
-     *
-     * @return void
-     */
-    public function down()
-    {
-        Schema::table('owners', function (Blueprint $table) {
-            $table->dropColumn('owner_group_id');
-        });
-    }
-}

+ 1 - 1
resources/js/vue/tree.vue

@@ -76,4 +76,4 @@
         border-width: 0.05em;
         border-color: #aaa;
     }
-</style>
+</style>

+ 0 - 15
resources/views/maintenance/owner/create.blade.php

@@ -34,21 +34,6 @@
                             @enderror
                         </div>
                     </div>
-                    <div class="form-group row">
-                        <label for="name" class="col-2 col-form-label text-right">所属名称</label>
-                        <div class="col-8">
-                            <select id="owner_group_id" type="text"  class="form-control" name="owner_group_id" autocomplete="off"  >
-                                @foreach($groups as $v)
-                                    <option value="{{$v->id}}">{{$v->name}}</option>
-                                @endforeach
-                            </select>
-                            @error('name')
-                            <span class="invalid-feedback" role="alert">
-                                <strong>{{ $message }}</strong>
-                            </span>
-                            @enderror
-                        </div>
-                    </div>
                     <div class="form-group row">
                         <div class="col-8 offset-2">
                             <input type="submit" class="btn btn-success form-control">

+ 0 - 15
resources/views/maintenance/owner/edit.blade.php

@@ -35,21 +35,6 @@
                             @enderror
                         </div>
                     </div>
-                    <div class="form-group row">
-                        <label for="name" class="col-2 col-form-label text-right">所属名称</label>
-                        <div class="col-8">
-                            <select id="owner_group_id" type="text"  class="form-control" name="owner_group_id" autocomplete="off"  >
-                                @foreach($groups as $v)
-                                    <option value="{{$v->id}}">{{$v->name}}</option>
-                                @endforeach
-                            </select>
-                            @error('name')
-                            <span class="invalid-feedback" role="alert">
-                                <strong>{{ $message }}</strong>
-                            </span>
-                            @enderror
-                        </div>
-                    </div>
                     <div class="form-group row">
                         <div class="col-8 offset-2">
                             <input type="submit" class="btn btn-outline-dark form-control">

+ 0 - 9
resources/views/maintenance/owner/index.blade.php

@@ -15,7 +15,6 @@
                         <th>ID</th>
                         <th>货主编码</th>
                         <th>货主名</th>
-                        <th>所属组名</th>
                         <th>创建时间</th>
                         <th>操作</th>
                     </tr>
@@ -23,7 +22,6 @@
                         <td class="text-muted">@{{owner.id}}</td>
                         <td>@{{owner.code}}</td>
                         <td>@{{owner.name}}</td>
-                        <td>@{{owner.group}}</td>
                         <td class="text-muted">@{{owner.created_at}}</td>
                         <td>
                             @can('货主-编辑')
@@ -50,11 +48,6 @@
                     {id:'{{$owner->id}}',code:'{{$owner->code}}',name:'{{$owner->name}}',group:'{{$owner->ownerGroup->name??''}}',created_at:'{{$owner->created_at}}'},
                     @endforeach
                 ],
-                owner_group: [
-                        @foreach($groups as $group)
-                    {name:'{{$group->id}}',value:'{{$group->name}}'},
-                    @endforeach
-                ],
                 selectTr:0
             },
             mounted:function(){
@@ -62,8 +55,6 @@
                    [
                     {name: 'code', type: 'input',tip:'可支持多货主编码,模糊搜索可在两侧添加百分号(%)进行',placeholder:'货主编码'},
                     {name: 'name', type: 'input',tip:'可支持多货主名称,模糊搜索可在两侧添加百分号(%)进行',placeholder:'货主名称'},
-                   {name:'owner_group_id',type:'select_multiple_select',tip:['输入关键词快速定位下拉列表,回车确定','选择要显示的货主组名'],
-                       placeholder:['货主组名','定位或多选货主组名'],data:this.owner_group},
                    ]
                 ];
                 this.from =new query({

+ 0 - 25
resources/views/maintenance/ownerGroup/create.blade.php

@@ -1,25 +0,0 @@
-@extends('layouts.app')
-@section('title')编辑-货主组@endsection
-
-@section('content')
-<div class="container-fluid card">
-    <div class="card-body offset-3 mt-2">
-        <form method="post" action="{{isset($group) ? url('maintenance/ownerGroup').'/'.$group->id : url('maintenance/ownerGroup')}}">
-            @csrf
-            @if(isset($group)) @method('PUT') @endif
-            <div class="row mt-3">
-                <label class="col-2" for="name">货主组名称</label>
-                <input class="form-control col-6 @error("name") is-invalid @enderror" id="name" name="name"
-                value="{{old("name") ?? (isset($group) ? $group->name : '')}}">
-                @error("name")<span class="offset-2 mt-0 invalid-feedback">
-                        <strong>{{$message}}</strong>
-                    </span>@enderror
-            </div>
-            <div class="row mt-3 offset-1">
-                <button class="btn btn-success col-7">提交</button>
-            </div>
-        </form>
-    </div>
-</div>
-@stop
-

+ 0 - 81
resources/views/maintenance/ownerGroup/index.blade.php

@@ -1,81 +0,0 @@
-@extends('layouts.app')
-@section('title')查询-货主组别@endsection
-
-@section('content')
-    <div class="container-fluid card" id="container">
-        <div id="form_div"></div>
-
-        @if(Session::has('successTip'))
-            <div class="alert alert-success h1">{{Session::get('successTip')}}</div>
-        @endif
-        <table class="table table-hover table-striped text-nowrap card-body mt-2">
-            <tr>
-                <th>序号</th>
-                <th>名称</th>
-                <th>创建时间</th>
-                <th>操作</th>
-            </tr>
-            <tr v-for="(group,i) in groups"  @click="selectTr===i+1?selectTr=0:selectTr=i+1" :class="selectTr===i+1?'focusing' : ''">
-                <td>@{{ i+1 }}</td>
-                <td>@{{ group.name }}</td>
-                <td>@{{ group.created_at }}</td>
-                <td>
-                    @can("货主组别-编辑")<a :href="'{{url('maintenance/ownerGroup')}}/'+group.id+'/edit'"><button class="btn btn-sm btn-outline-info">改</button></a>@endcan
-                    @can("货主组别-删除")<button class="btn btn-sm btn-outline-danger" @click="destroy(group.id,i,group.name)">删</button>@endcan
-                </td>
-            </tr>
-        </table>
-        {{$groups->withQueryString()->links()}}
-    </div>
-@stop
-
-@section("lastScript")
-    <script type="text/javascript" src="{{mix('js/queryForm/queryForm.js')}}"></script>
-    <script>
-        new Vue({
-            el:"#container",
-            data:{
-                groups : [
-                        @foreach($groups as $group)
-                    {
-                        id:"{{$group->id}}",
-                        name:"{{$group->name}}",
-                        created_at:"{{$group->created_at}}",
-                    },
-                    @endforeach
-                ],
-                selectTr:0
-            },
-            mounted:function(){
-                let data = [
-                    [{name: 'name', type: 'input',tip:'可支持多货主组别名称,模糊搜索可在两侧添加百分号(%)进行',placeholder:'货主组别'}]
-                ];
-                this.from =new query({
-                    el: '#form_div',
-                    condition: data,
-                });
-                this.from.init();
-            },
-            methods:{
-                destroy(id,index,name){
-                    window.tempTip.confirm("确定要删除"+name+"吗?",()=>{
-                        window.axios.delete("{{url('maintenance/ownerGroup')}}/"+id)
-                            .then(res=>{
-                                if (res.data.success){
-                                    this.$delete(this.groups,index);
-                                    window.tempTip.setDuration(2000);
-                                    window.tempTip.showSuccess("删除"+name+"成功");
-                                    return;
-                                }
-                                window.tempTip.setDuration(3000);
-                                window.tempTip.show(res.data.data);
-                            }).catch(err=>{
-                            window.tempTip.setDuration(3000);
-                            window.tempTip.show("网络错误:"+err);
-                        })
-                    })
-                }
-            },
-        });
-    </script>
-@stop

+ 1 - 140
resources/views/maintenance/user/edit.blade.php

@@ -140,37 +140,6 @@
                             </div>
                         </div>
                     </div>
-
-{{--                    货主分组开始--}}
-                    <hr class="col-8 offset-2 border-info">
-                    <div class="form-group row">
-                        <label for="supplier" class="col-md-3 col-form-label text-md-right">货主分组</label>
-                        <div class="col-md-7">
-                            <input type="text"  class="form-control tooltipTarget" placeholder="定位货主组"
-                                   @input="seekOwnerGroup($event)" title="输入关键词快速定位"></div>
-                    </div>
-                    <div class="form-group row">
-                        <label class="col-md-3"></label>
-                        <div class="col-md-4">
-                            <input name="ownerGroup" hidden    v-model="ownerGroups" >
-                            <div class="input-group" style="max-height: 190px; overflow-y: scroll;border-radius:5px;opacity:0.5;text-align: center;">
-                                <ul class="list-group tooltipTarget" style="width: 100%" onselectstart="return false;">
-                                    <li  :data-original-title="ownerGroup.style ? '双击删除货主组' :'双击添加货主组'"    v-for="ownerGroup in ownerGroupsFilter" :id="ownerGroup.name" class="list-group-item list-group-item-action pt-0 pb-0"
-                                         @dblclick="selectedOwnerGroup(ownerGroup)" :class="ownerGroup.style ? 'active' :''"><span style="cursor: default;" :id="ownerGroup.name"> @{{ ownerGroup.name }}  </span></li>
-                                </ul>
-                            </div>
-                        </div>
-                        <div class="col-md-3">
-                            <div class="input-group" style="max-height: 190px; overflow-y: scroll;border-radius:5px;text-align: center;">
-                                <ul class="list-group" style="width: 100%" onselectstart="return false;">
-                                    <li  title="双击删除货主组"    v-for="ownerGroup in ownerGroupsList" :id="ownerGroup.name" class="list-group-item list-group-item-action pt-0 pb-0"
-                                         @dblclick="selectedOwnerGroup(ownerGroup)" ><span style="cursor: default;" > @{{ ownerGroup.name }}  </span></li>
-                                </ul>
-                            </div>
-                        </div>
-                    </div>
-{{--                    货主分组结束--}}
-
                     <hr class="col-8 offset-2 border-info">
                     <div class="form-group row">
                         <div class="col-8 offset-2">
@@ -257,29 +226,6 @@
                     @endif
                 ],
                 suppliersList: [],
-
-
-                ownerGroupsAll: [
-                        @foreach($ownerGroups as $ownerGroup)
-                    {id: '{{$ownerGroup->id}}', name: '{{$ownerGroup->name}}', style: false},
-                    @endforeach
-                ],
-                ownerGroupsFilter: [
-                        @foreach($ownerGroups as $ownerGroup)
-                    {id: '{{$ownerGroup->id}}', name: '{{$ownerGroup->name}}', style: false},
-                    @endforeach
-                ],
-                ownerGroups: [
-                    @if(old('ownerGroup'))
-                        {{ old('ownerGroup') }}
-                        @else
-                        @foreach( $ownerGroup as $group )
-                        {{$group->id??''}},
-                    @endforeach
-                    @endif
-                ],
-                ownerGroupsList: [],
-
             },
             mounted:function(){
                 $(".tooltipTarget").tooltip({'trigger':'hover'});
@@ -328,22 +274,6 @@
                         });
                     }
                 }
-
-                if (this.ownerGroups.length>0){
-                    let ownerGroupsAll=this.ownerGroupsAll;
-                    let ownerGroups=this.ownerGroups;
-                    let ownerGroupsList=this.ownerGroupsList;
-                    for (let i = 0; i < ownerGroups.length; i++) {
-                        ownerGroupsAll.every(function (ownerGroupAll) {
-                            if (ownerGroupAll.id == ownerGroups[i]) {
-                                ownerGroupAll.style = true;
-                                ownerGroupsList.push({'id':ownerGroupAll.id,'name':ownerGroupAll.name});
-                                return false;
-                            }
-                            return true;
-                        });
-                    }
-                }
             },
             methods:{
                 selectedLogistic:function (e) {
@@ -551,76 +481,7 @@
                         }
                     }
                 },
-
-                selectedOwnerGroup:function (e) {
-                    let ownerGroups=this.ownerGroups;
-                    let ownerGroupsAll=this.ownerGroupsAll;
-                    let ownerGroupsList=this.ownerGroupsList;
-                    let isOwnerGroup=true;
-                    if (ownerGroups&&ownerGroupsAll) {
-                        for (let i = 0; i < ownerGroups.length; i++) {
-                            if (ownerGroups[i] == e.id) {
-                                ownerGroups.splice(i,1);
-                                ownerGroupsAll.every(function (ownerGroupAll) {
-                                    if (ownerGroupAll.id == e.id) {
-                                        ownerGroupAll.style = false;
-                                        return false;
-                                    }
-                                    return true;
-                                });
-                                ownerGroupsList.every(function (ownerGroup,i) {
-                                    if (ownerGroup.id==e.id){
-                                        ownerGroupsList.splice(i,1);
-                                        return false;
-                                    }
-                                    return true;
-                                });
-                                isOwnerGroup= false;
-                                break;
-                            }
-                            isOwnerGroup= true;
-                        }
-                    }
-                    if (isOwnerGroup || !ownerGroups){
-                        ownerGroups.push(e.id);
-                        ownerGroupsAll.every(function (ownerGroupAll) {
-                            if (ownerGroupAll.id==e.id){
-                                ownerGroupAll.style=true;
-                                ownerGroupsList.push({'id':ownerGroupAll.id,'name':ownerGroupAll.name});
-                                return false;
-                            }
-                            return  true;
-                        });
-                    }
-                    setTimeout(function(){
-                        $(".tooltipTarget").tooltip({'trigger':'hover'});
-                    },10)
-                },
-                seekOwnerGroup:function (e) {
-                    let $val=e.target.value;
-                    let ownerGroupsAll=this.suppliersAll;
-                    let bool = false;
-                    ownerGroupsAll.every(function (ownerGroupAll) {
-                        let name=ownerGroupAll.name;
-                        if (name.includes($val)){
-                            bool = true;
-                            return false;
-                        }
-                        return  true;
-                    });
-                    if($val === '' ){
-                        this.ownerGroupsFilter = this.ownerGroupsAll;
-                    }else if(bool){
-                        this.ownerGroupsFilter = [];
-                        for (let i = 0; i <ownerGroupsAll.length ; i++) {
-                            let ownerGroup = ownerGroupsAll[i];
-                            if(ownerGroup.name.includes($val)){
-                                this.ownerGroupsFilter.push(ownerGroup);
-                            }
-                        }
-                    }
-                },
-            },
+            }
         });
 
     </script>

+ 13 - 2
resources/views/transport/waybill/edit.blade.php

@@ -34,7 +34,7 @@
                                     <div class="h5 mb-3 col-8">
                                         <button type="button" @click="waybill.type='专线'" class="btn" :class="waybill.type=='专线'?'btn-primary':'btn-outline-primary'">专线</button>
                                         <button type="button" @click="waybill.type='直发车'" class="btn ml-2" :class="waybill.type=='直发车'?'btn-primary':'btn-outline-primary'">直发车</button>
-                                        <button type="button" @click="waybill.type='德邦物流'" class="btn ml-2" :class="waybill.type=='德邦物流'?'btn-primary':'btn-outline-primary'">德邦物流</button>
+                                        <button type="button" v-on:click="dbwl" @click="waybill.type='德邦物流'" class="btn ml-2" :class="waybill.type=='德邦物流'?'btn-primary':'btn-outline-primary'">德邦物流</button>
                                     </div>
                                     <input name="type" id="type" :value="waybill.type" hidden>
                                 </div>
@@ -71,7 +71,7 @@
                                 <label for="inquire_tel" class="col-2 col-form-label text-right text-primary">查件电话 *</label>
                                 <div class="col-8">
                                     <input id="inquire_tel" name="inquire_tel" type="text" class="form-control col-8 @error('inquire_tel') is-invalid @enderror"
-                                           value="@if(old('inquire_tel')){{ old('inquire_tel') }}@else{{$waybill->inquire_tel}}@endif">
+                                           v-model="waybill.inquire_tel" >
                                 </div>
                             </div>
                             <div v-if="waybill.logistic_id == 15 || waybill.type=='德邦物流'" style="background: black">
@@ -518,6 +518,7 @@
                     pay_type: '{{ old("pay_type") ?? $waybill->pay_type}}',
                     back_sign_bill: '{{ old("back_sign_bill") ?? $waybill->back_sign_bill}}',
                     package_service: '{{ old("package_service") ?? $waybill->package_service}}',
+                    inquire_tel: '{{ old("inquire_tel") ?? $waybill->inquire_tel}}',
                 },
                 order:{!! $waybill->order ?? '{}' !!},
                 waybillTemp:{!! $waybill !!},
@@ -739,6 +740,16 @@
                             this.waybill.destination_city_id = res.id;
                             $("#selectedProvince").modal("hide");
                         });
+                },
+                dbwl:function () {
+                    this.waybill.logistic_id = 15;
+                    this.waybill.logistic_id = 15;
+                    this.waybill.amount = 1;
+                    this.waybill.amount_unit_id = 5;
+                    this.waybill.inquire_tel = '13761413262';
+                    let  date = new Date();
+                    this.deliver_at_date = date.toLocaleDateString();
+                    this.deliver_at_time = date.getTime();
                 }
             },
             created(){

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

@@ -1448,7 +1448,6 @@
          */
         function printEWaybill(data, serialNo, barcode, wayNum){
             //打印内容
-            console.log(barcode);
             var printHtml = htmlTemplateObj.find("div#expressPrintArea").html();
 
             LODOP.PRINT_INIT("二级模板");
@@ -1460,7 +1459,8 @@
             LODOP.ADD_PRINT_BARCODE("117mm","45mm","50mm","8mm","128Auto", barcode);
 
             //设定固定打印机
-            if(LODOP.SET_PRINTER_INDEX('EK100B'))LODOP.SET_PRINTER_INDEX('EK100B');
+            let print_name = "{{$print_name}}";
+            if(print_name && LODOP.SET_PRINTER_INDEX(print_name))LODOP.SET_PRINTER_INDEX(print_name);
 
             //打印
             // LODOP.PREVIEW();

+ 0 - 1
routes/web.php

@@ -320,7 +320,6 @@ Route::group(['middleware'=>'auth'],function ($route){
         Route::resource('user', 'UserController');
         Route::resource('role', 'RoleController');
         Route::resource('owner', 'OwnerController');
-        Route::resource('ownerGroup', 'OwnerGroupController');
         Route::resource('logistic', 'LogisticController');
         Route::resource('qualityLabel', 'QualityLabelController');
         Route::resource('carrier', 'CarriersController');