|
|
@ -1,95 +1,89 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-row :gutter="20"> |
|
|
|
<el-card shadow="hover" class="m-b-20"> |
|
|
|
<el-col :span="24"> |
|
|
|
<div> |
|
|
|
<el-card shadow="hover" class="m-b-20"> |
|
|
|
<div class="p-title m-b-20">筛选</div> |
|
|
|
<div> |
|
|
|
|
|
|
|
<div class="p-title m-b-20">筛选</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-form label-width="80px"> |
|
|
|
<el-form label-width="80px"> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="国家"> |
|
|
|
<el-form-item label="国家"> |
|
|
|
<el-select v-model="form.countries" clearable placeholder="请选择国家"> |
|
|
|
<el-select v-model="form.countries" clearable placeholder="请选择国家"> |
|
|
|
<el-option v-for="(item,index) in countryList" :key="index" :label="item.name" :value="item.name"></el-option> |
|
|
|
<el-option v-for="(item,index) in countryList" :key="index" :label="item.name" :value="item.name"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="省份"> |
|
|
|
<el-form-item label="省份"> |
|
|
|
<el-select v-model="form.provinces" clearable placeholder="请选择省份" @change="getCity()" @clear="clearprovince()"> |
|
|
|
<el-select v-model="form.provinces" clearable placeholder="请选择省份" @change="getCity()" @clear="clearprovince()"> |
|
|
|
<el-option v-for="(item,index) in provinceList" :key="index" :label="item.provinceName" :value="item.provinceId"></el-option> |
|
|
|
<el-option v-for="(item,index) in provinceList" :key="index" :label="item.provinceName" :value="item.provinceId"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="城市"> |
|
|
|
<el-form-item label="城市"> |
|
|
|
<el-select v-model="form.city" clearable placeholder="请选择城市" :disabled="form.provinces ? false : true" @change="getData()"> |
|
|
|
<el-select v-model="form.city" clearable placeholder="请选择城市" :disabled="form.provinces ? false : true" @change="getData()"> |
|
|
|
<el-option v-for="(item,index) in cityList" :key="index" :label="item.cityName" :value="item.cityId"></el-option> |
|
|
|
<el-option v-for="(item,index) in cityList" :key="index" :label="item.cityName" :value="item.cityId"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-input placeholder="请输入客户名称/管理员姓名/电话" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input> |
|
|
|
<el-input placeholder="请输入客户名称/管理员姓名/电话" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-card> |
|
|
|
</el-card> |
|
|
|
</el-col> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="24"> |
|
|
|
<el-card shadow="hover"> |
|
|
|
<el-card shadow="hover"> |
|
|
|
<div class="flex j-between m-b-20"> |
|
|
|
<div class="flex j-between m-b-20"> |
|
|
|
<div class="p-title">客户列表</div> |
|
|
|
<div class="p-title">客户列表</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-button type="primary" size="small" round @click="addcustomer" v-auth>新增客户</el-button> |
|
|
|
<el-button type="primary" size="small" round @click="addcustomer" v-auth>新增客户</el-button> |
|
|
|
<el-button type="primary" size="small" round @click="delAllSelection" v-auth>批量删除</el-button> |
|
|
|
<el-button type="primary" size="small" round @click="delAllSelection" v-auth>批量删除</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-table :data="customerData" ref="table" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id"> |
|
|
|
<el-table :data="customerData" ref="table" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id"> |
|
|
|
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> |
|
|
|
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> |
|
|
|
<el-table-column type="index" width="100" label="序号" align="center"> |
|
|
|
<el-table-column type="index" width="100" label="序号" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{scope.$index + (pageNo - 1) * pageSize + 1}} |
|
|
|
{{scope.$index + (pageNo - 1) * pageSize + 1}} |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="clientName" label="客户名称" align="center"> |
|
|
|
<el-table-column prop="clientName" label="客户名称" align="center"> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="provinceName" label="省份" align="center"> |
|
|
|
<el-table-column prop="provinceName" label="省份" align="center"> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="cityName" label="城市" align="center"> |
|
|
|
<el-table-column prop="cityName" label="城市" align="center"> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="contactPersonName" label="管理员姓名" align="center"> |
|
|
|
<el-table-column prop="contactPersonName" label="管理员姓名" align="center"> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="phone" label="手机号" align="center"> |
|
|
|
<el-table-column prop="phone" label="手机号" align="center"> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作" align="center"> |
|
|
|
<el-table-column label="操作" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="text" @click="show(scope.row)" v-auth>查看</el-button> |
|
|
|
<el-button type="text" @click="show(scope.row)" v-auth>查看</el-button> |
|
|
|
<el-button type="text" @click="edit(scope.row)" v-auth>编辑</el-button> |
|
|
|
<el-button type="text" @click="edit(scope.row)" v-auth>编辑</el-button> |
|
|
|
<el-button type="text" @click="handleDelete(scope.row)" v-auth>删除</el-button> |
|
|
|
<el-button type="text" @click="handleDelete(scope.row)" v-auth>删除</el-button> |
|
|
|
<el-switch |
|
|
|
<el-switch |
|
|
|
v-model="scope.row.isDisable" |
|
|
|
v-model="scope.row.isDisable" |
|
|
|
:active-value="0" |
|
|
|
:active-value="0" |
|
|
|
:inactive-value="1" |
|
|
|
:inactive-value="1" |
|
|
|
style="margin: 0 10px 0 5px" |
|
|
|
style="margin: 0 10px 0 5px" |
|
|
|
@change="switchOff($event,scope.row,scope.$index)" |
|
|
|
@change="switchOff($event,scope.row,scope.$index)" |
|
|
|
v-auth="'dashboard:禁用'" |
|
|
|
v-auth="'dashboard:禁用'" |
|
|
|
></el-switch> |
|
|
|
></el-switch> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-table> |
|
|
|
<div class="pagination"> |
|
|
|
<div class="pagination"> |
|
|
|
<el-pagination background layout="total, prev, pager, next" :total="totals" @current-change="handleCurrentChange" :current-page="pageNo"> |
|
|
|
<el-pagination background layout="total, prev, pager, next" :total="totals" @current-change="handleCurrentChange" :current-page="pageNo"> |
|
|
|
</el-pagination> |
|
|
|
</el-pagination> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-card> |
|
|
|
</el-card> |
|
|
|
</el-col> |
|
|
|
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|