| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- @extends('layouts.app')
- @section('title')客户@endsection
- @section('content')
- <div id="nav2">
- @component('customer.menu')@endcomponent
- @component('customer.customer.menu')@endcomponent
- </div>
- <div class="d-none container-fluid" id="container">
- <div class="card">
- <div class="card-body">
- @include("customer.customerLogStatus._edit")
- <div class="row pull-right">
- @can("客户管理-客户-客户状态-录入")<button class="btn btn-outline-info mb-1 mr-3" @click="openModal()"><span class="fa fa-plus"></span> 新 增</button>@endcan
- </div>
- <table class="table table-striped table-bordered table-hover">
- <tr>
- <th>序号</th>
- <th>名称</th>
- <th>说明</th>
- <th>创建时间</th>
- <th>修改时间</th>
- <th>操作</th>
- </tr>
- <tr v-for="(model,i) in models">
- <td>@{{ i+1 }}</td>
- <td>@{{ model.name }}</td>
- <td>@{{ model.description }}</td>
- <td>@{{ model.createdAt }}</td>
- <td>@{{ model.updatedAt }}</td>
- <td>
- @can("客户管理-客户-客户状态-编辑")<button class="btn btn-sm btn-outline-info" @click="openModal(model)">改</button>@endcan
- @can("客户管理-客户-客户状态-删除")<button class="btn btn-sm btn-outline-danger" @click="deleteModel(model)">删</button>@endcan
- </td>
- </tr>
- </table>
- </div>
- </div>
- </div>
- @stop
- @section("lastScript")
- <script>
- new Vue({
- el:"#container",
- data:{
- status:{},
- models:[
- @foreach($customerLogStatuses as $customerLogStatus)
- {id:"{{$customerLogStatus->id}}",'name':"{{$customerLogStatus->name}}", 'description':"{{$customerLogStatus->description}}"
- , 'createdAt':"{{$customerLogStatus->created_at}}"
- , 'updatedAt':"{{$customerLogStatus->updated_at}}"},
- @endforeach
- ],
- },
- mounted(){
- $("#container").removeClass("d-none");
- },
- methods:{
- openModal(model){
- if (model) this.status={id:model.id,name:model.name,description:model.description};
- else this.status={id:"",name:"",description:""};
- $("#modal").modal("show");
- },
- deleteModel(model){
- window.tempTip.postBasicRequest();
- },
- },
- });
- </script>
- @endsection
|