|
|
|
@ -1,95 +1,89 @@ |
|
|
|
|
<template> |
|
|
|
|
<div> |
|
|
|
|
<el-row :gutter="20"> |
|
|
|
|
<el-col :span="24"> |
|
|
|
|
<el-card shadow="hover" class="m-b-20"> |
|
|
|
|
<div> |
|
|
|
|
<div class="p-title m-b-20">筛选</div> |
|
|
|
|
<el-card shadow="hover" class="m-b-20"> |
|
|
|
|
<div> |
|
|
|
|
<div class="p-title m-b-20">筛选</div> |
|
|
|
|
|
|
|
|
|
<div> |
|
|
|
|
<el-form label-width="80px"> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item label="国家"> |
|
|
|
|
<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-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item label="省份"> |
|
|
|
|
<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-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item label="城市"> |
|
|
|
|
<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-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item> |
|
|
|
|
<el-input placeholder="请输入客户名称/管理员姓名/电话" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
</el-form> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</el-card> |
|
|
|
|
</el-col> |
|
|
|
|
<div> |
|
|
|
|
<el-form label-width="80px"> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item label="国家"> |
|
|
|
|
<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-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item label="省份"> |
|
|
|
|
<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-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item label="城市"> |
|
|
|
|
<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-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item> |
|
|
|
|
<el-input placeholder="请输入客户名称/管理员姓名/电话" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
</el-form> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
<el-col :span="24"> |
|
|
|
|
<el-card shadow="hover"> |
|
|
|
|
<div class="flex j-between m-b-20"> |
|
|
|
|
<div class="p-title">客户列表</div> |
|
|
|
|
<el-card shadow="hover"> |
|
|
|
|
<div class="flex j-between m-b-20"> |
|
|
|
|
<div class="p-title">客户列表</div> |
|
|
|
|
|
|
|
|
|
<div> |
|
|
|
|
<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> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<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="index" width="100" label="序号" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
{{scope.$index + (pageNo - 1) * pageSize + 1}} |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="clientName" label="客户名称" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="provinceName" label="省份" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="cityName" label="城市" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="contactPersonName" label="管理员姓名" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="phone" label="手机号" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="操作" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<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="handleDelete(scope.row)" v-auth>删除</el-button> |
|
|
|
|
<el-switch |
|
|
|
|
v-model="scope.row.isDisable" |
|
|
|
|
:active-value="0" |
|
|
|
|
:inactive-value="1" |
|
|
|
|
style="margin: 0 10px 0 5px" |
|
|
|
|
@change="switchOff($event,scope.row,scope.$index)" |
|
|
|
|
v-auth="'dashboard:禁用'" |
|
|
|
|
></el-switch> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
<div class="pagination"> |
|
|
|
|
<el-pagination background layout="total, prev, pager, next" :total="totals" @current-change="handleCurrentChange" :current-page="pageNo"> |
|
|
|
|
</el-pagination> |
|
|
|
|
</div> |
|
|
|
|
</el-card> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
<div> |
|
|
|
|
<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> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<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="index" width="100" label="序号" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
{{scope.$index + (pageNo - 1) * pageSize + 1}} |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="clientName" label="客户名称" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="provinceName" label="省份" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="cityName" label="城市" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="contactPersonName" label="管理员姓名" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="phone" label="手机号" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="操作" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<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="handleDelete(scope.row)" v-auth>删除</el-button> |
|
|
|
|
<el-switch |
|
|
|
|
v-model="scope.row.isDisable" |
|
|
|
|
:active-value="0" |
|
|
|
|
:inactive-value="1" |
|
|
|
|
style="margin: 0 10px 0 5px" |
|
|
|
|
@change="switchOff($event,scope.row,scope.$index)" |
|
|
|
|
v-auth="'dashboard:禁用'" |
|
|
|
|
></el-switch> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
<div class="pagination"> |
|
|
|
|
<el-pagination background layout="total, prev, pager, next" :total="totals" @current-change="handleCurrentChange" :current-page="pageNo"> |
|
|
|
|
</el-pagination> |
|
|
|
|
</div> |
|
|
|
|
</el-card> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|