| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- @extends('layouts.app')
- @section('content')
- <span id="nav2">
- @component('maintenance.menu')@endcomponent
- @component('maintenance.batch.menu')@endcomponent
- </span>
- <div class="container-fluid mt-3">
- <div class="card">
- <div class="card-body">
- @if(Session::has('successTip'))
- <div class="alert alert-success h1">{{Session::get('successTip')}}</div>
- @endif
- <table class="table table-striped table-sm" id="list">
- <tr>
- <th>波次号</th>
- <th>状态</th>
- <th>类型(WMS)</th>
- <th>创建时间</th>
- {{-- <th>操作</th>--}}
- </tr>
- <tr v-for="batch in batches">
- <td class="text-muted">@{{batch.batch_id}}</td>
- <td class="text-muted">@{{batch.status}}</td>
- <td>@{{batch.remote_type}}</td>
- <td class="text-muted">@{{batch.created_at}}</td>
- {{-- <td>--}}
- {{-- @can('物流公司-编辑')--}}
- {{-- <button class="btn btn-sm btn-outline-primary" @click="edit(batch.id)">改</button> @endcan--}}
- {{-- @can('物流公司-删除')--}}
- {{-- <button class="btn btn-sm btn-outline-dark" @click="destroy(batch)">删</button> @endcan--}}
- {{-- </td>--}}
- </tr>
- </table>
- {{$batches->links()}}
- </div>
- </div>
- </div>
- @endsection
- @section('lastScript')
- <script>
- new Vue({
- el:"#list",
- data:{
- batches:{!! json_encode($batches->toArray()['data'],true)??"\'\'" !!},
- },
- methods:{
- {{--edit:function(id){--}}
- {{-- location.href = "{{url('maintenance/batch')}}/"+id+"/edit";--}}
- {{--},--}}
- {{--destroy:function(batch){--}}
- {{-- if(!confirm('确定要删除物流公司“' + batch.name + '”吗?')){return};--}}
- {{-- let data=this;--}}
- {{-- let url = "{{url('maintenance/batch')}}/"+batch.id;--}}
- {{-- axios.delete(url,{id:batch.id})--}}
- {{-- .then(function (response) {--}}
- {{-- if(response.data.success){--}}
- {{-- for (let i = 0; i < data.batches.length; i++) {--}}
- {{-- if (data.batches[i].id===batch.id){--}}
- {{-- data.batches.splice(i,1);--}}
- {{-- break;--}}
- {{-- }--}}
- {{-- }--}}
- {{-- tempTip.setDuration(1000);--}}
- {{-- tempTip.showSuccess('删除物流公司"'+batch.name+'"成功!')--}}
- {{-- }else{--}}
- {{-- tempTip.setDuration(1000);--}}
- {{-- tempTip.show('删除物流公司"'+batch.name+'"失败!')--}}
- {{-- }--}}
- {{-- })--}}
- {{-- .catch(function (err) {--}}
- {{-- tempTip.setDuration(3000);--}}
- {{-- tempTip.show('删除物流公司失败!'+'网络错误:' + err)--}}
- {{-- console.log(err);--}}
- {{-- });--}}
- {{--},--}}
- }
- });
- </script>
- @endsection
|