123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255 |
- @extends('layouts.admin.app')
- @section('plug-css')
- <link href="{{ asset('js/bootstrap-table/dist/bootstrap-table.css') }}" rel="stylesheet">
- @endsection
- @section('crumbs')
- <ol class="breadcrumb crumbs">
- <li><a href="{{ route('admin.index') }}#">后台导航</a></li>
- <li class="active">批发商列表</li>
- </ol>
- @endsection
- @section('content')
- <form id="searchForm" class="form-inline">
- <div class="">
- <div class="form-group">
- <label for="mobile" class="label-css"> 批发商账户号:</label>
- <input class="form-control" type="text" name="mobile">
- </div>
- <div class="form-group">
- <label for="member_sn" class="label-css"> 批发商编号:</label>
- <input class="form-control" type="text" name="member_sn">
- </div>
- <div class="form-group">
- <label for="shop_name" class="label-css"> 店铺名称:</label>
- <input class="form-control" type="text" name="shop_name">
- </div>
- <div class="form-group">
- <label for="status" class="label-css"> 统计省份:</label>
- <select class="form-control" name="province_id" v-model="province_id" id="province_id"
- style="margin-top: -8px;">
- <option value="0">所有省份</option>
- <option v-bind:value="province.id" v-for="province in provinces">@{{province.name}}</option>
- </select>
- </div>
- <div class="form-group">
- <label for="status" class="label-css"> 统计城市:</label>
- <select class="form-control" name="city_id" id="city_id" v-model="city_id" style="margin-top: -8px;">
- <option value="0">所有城市</option>
- <option v-bind:value="city.id" v-for="city in citys">@{{city.name}}</option>
- </select>
- </div>
- <div class="form-group">
- <label for="status" class="label-css"> 统计区域:</label>
- <select class="form-control" name="district_id" id="district_id" style="margin-top: -8px;">
- <option value="0">所有区域</option>
- <option v-bind:value="district.id" v-for="district in districts">@{{district.name}}</option>
- </select>
- </div>
- <input type="hidden" name="level_id" value="3">
-   
- <button type="button" class="btn btn-primary">查询</button>
- </div>
- </form>
- <hr class="hr-css">
- <div>
- <div id="toolbar">
- <div class="columns columns-left btn-group pull-left">
- <a href="javascript:;">
- <button class="btn btn-default" type="button" id="excel-jys">
- <span class="glyphicon glyphicon-download-alt" aria-hidden="true"></span> 批发商导出
- </button>
- </a>
- </div>
- </div>
- <table id="ContentTable"></table>
- </div>
- @endsection
- @section('plug-js')
- <script src="{{ asset('js/bootstrap-table/dist/bootstrap-table.js') }}"></script>
- <script src="{{ asset('js/bootstrap-table/dist/locale/bootstrap-table-zh-CN.js') }}"></script>
- <script src="{{ asset('js/jquery-validation1.16/dist/jquery.validate.min.js') }}"></script>
- <script src="{{ asset('js/jquery-validation1.16/dist/additional-methods.min.js') }}"></script>
- <script src="{{ asset('js/jquery-validation1.16/src/localization/messages_zh.js') }}"></script>
- @endsection
- @section('scripts')
- <script>
- $(function(){
- var vm = new Vue({
- el: '#searchForm',
- data: {
- 'province_id': 0,
- 'city_id': 0,
- 'provinces': [],
- 'citys': [],
- 'districts': [],
- },
- methods: {
- selectcity: function () {
- }
- },
- watch: {
- 'province_id': function () {
- if (this.province_id * 1 == 0) {
- this.citys = [];
- this.city_id = 0;
- } else {
- $.ajax({
- type: 'post',
- url: "{{ route('admin.good.city') }}",
- data: {'p_id': this.province_id},
- dataType: 'json',
- success: function (data) {
- if (data.code * 1 == 1) {
- vm.citys = data.data;
- }
- }
- });
- }
- },
- 'city_id': function () {
- if (this.city_id * 1 == 0) {
- this.districts = [];
- } else {
- $.ajax({
- type: 'post',
- url: "{{ route('admin.good.city') }}",
- data: {'p_id': this.city_id},
- dataType: 'json',
- success: function (data) {
- if (data.code * 1 == 1) {
- vm.districts = data.data;
- }
- }
- });
- }
- }
- },
- created: function () {
- $.ajax({
- type: 'post',
- url: "{{ route('admin.good.city') }}",
- data: {'p_id': 0},
- dataType: 'json',
- success: function (data) {
- if (data.code * 1 == 1) {
- vm.provinces = data.data;
- }
- }
- });
- }
- });
- BootStrapInit.init('tableMember','ContentTable',{
- searchForm: 'searchForm', // 表单搜索id 省略默认 'searchForm'
- url: "{{ route('admin.member.ajax.list',['level_id'=>$level_id]) }}",
- method: 'post',
- toolbar: '#toolbar',
- idField: '', // 指定主键列
- uniqueId: "id", // 这里需要指定当前查询表唯一主键字段
- columns: [
- {
- checkbox: true,
- align: 'center',
- valign: 'middle'
- },
- {
- field: 'id',
- title: 'ID',
- align: 'center',
- valign: 'middle',
- },
- {
- field: 'member_sn',
- title: '批发商编号',
- align: 'center',
- valign: 'middle',
- },
- {
- field: 'nickname',
- title: '批发商昵称',
- align: 'center',
- valign: 'middle',
- },
- {
- field: 'mobile',
- title: '批发商账户',
- align: 'center',
- valign: 'middle',
- },
- {
- field: 'recom_mobile',
- title: '推荐人账号',
- align: 'center',
- valign: 'middle',
- },
- {
- field: 'shop_name',
- title: '店铺名称',
- align: 'center',
- valign: 'middle'
- },
- {
- field: 'admin_name',
- title: '管理员',
- align: 'center',
- valign: 'middle'
- },
- {
- field: 'admin_mobile',
- title: '管理员电话',
- align: 'center',
- valign: 'middle'
- },
- {
- field: 'city_name',
- title: '城市',
- align: 'center',
- valign: 'middle'
- },
- {
- field: 'address',
- title: '地址',
- align: 'center',
- valign: 'middle'
- },
- {
- field: 'goods_num',
- title: '商品总库存',
- align: 'center',
- valign: 'middle'
- },
- {
- field: 'order_goods_num',
- title: '总批发量',
- align: 'center',
- valign: 'middle'
- },
- {
- field: 'created_at',
- title: '创建时间',
- align: 'center',
- valign: 'middle',
- },
- ]
- });
- $(document).on('click', '#excel-jys', function () {
- $('#searchForm').prop('action', "{{ route('admin.member.excel') }}");
- $('#searchForm').prop('method', 'get');
- $('#searchForm').submit();
- return false;
- });
- });
- </script>
- @endsection
|