Commit 67cd2135 by xuyl

添加防抖,lodading优化,更改样式

1 parent b1a15a8a
import request from './request' import request from './request'
const path = 'merchants.api.menu.'
const addNamelistApi = { const addNamelistApi = {
// 根据商户名称和渠道类型查询商户列表 // 根据商户名称和渠道类型查询商户列表
getMerchantsList(data = {}) { getMerchantsList(data = {}) {
// 'http://rop-merchant.dev.glsx.com.cn/rop-merchants'
data.method = 'merchants.api.open.findMerchantList' data.method = 'merchants.api.open.findMerchantList'
return request(data, 'merchants.api.open.findMerchantList', [], 'http://rop-merchant.dev.glsx.com.cn/rop-merchants') return request(data)
}, },
// 添加客户名单 // 根据商户名称和渠道类型查询商户列表-分页查询
getMerchantsListByPages(data = {}) {
// 'http://rop-merchant.dev.glsx.com.cn/rop-merchants'
data.method = 'merchants.api.menu.findMerchantByPage'
return request(data)
},
// 根据商户号查询商户详情
findMerchantDetailByMerchantNo(data = {}) {
// 'http://rop-merchant.dev.glsx.com.cn/rop-merchants'
data.method = 'merchants.api.open.findMerchantDetailByMerchantNo'
return request(data)
}
} }
export { addNamelistApi } export { addNamelistApi }
\ No newline at end of file \ No newline at end of file
...@@ -21,6 +21,11 @@ const customerApi = { ...@@ -21,6 +21,11 @@ const customerApi = {
data.method = `${path}merchant.info` data.method = `${path}merchant.info`
return request(data) return request(data)
}, },
// 客户名单查看-导入名单数据详情列表
detailsCustomerList(data = {}) {
data.method = `${path}details`
return request(data)
},
// 客户名单列表导出 // 客户名单列表导出
exportCustomerList(data = {}) { exportCustomerList(data = {}) {
data.method = `${path}export` data.method = `${path}export`
...@@ -28,9 +33,12 @@ const customerApi = { ...@@ -28,9 +33,12 @@ const customerApi = {
}, },
// 添加客户名单 // 添加客户名单
addCustomerList(data = {}) { addCustomerList(data = {}) {
data.method = `${path}get` // 'http://192.168.1.182:8561/rop-scrm-renewal'
data.method = `${path}add`
return request(data) return request(data)
} }
} }
export { customerApi }
\ No newline at end of file \ No newline at end of file
export {
customerApi
}
\ No newline at end of file \ No newline at end of file
import request from './request'
const uploadApi = {
// 多文件上传接口
multipleUpload(data = {}) {
// 'http://192.168.1.182:8561/rop-scrm-renewal'
data.method = 'scrm.api.equity.common.upload.common.multiple'
return request(data)
},
}
export { uploadApi }
\ No newline at end of file \ No newline at end of file
...@@ -299,6 +299,9 @@ export default { ...@@ -299,6 +299,9 @@ export default {
.a-click { .a-click {
cursor: pointer; cursor: pointer;
} }
.el-table{
margin-bottom: 16px;
}
.el-table .cell { .el-table .cell {
line-height: 14px; line-height: 14px;
} }
......
<template> <template>
<div> <div>
<div class="biasicInfo"> <div>
<div> <div>
基本信息 基本信息
<hr /> <hr />
</div> </div>
<el-form <div class="biasicInfo">
:model="ruleForm" <el-form
:rules="rules" size="medium"
ref="ruleForm" :model="ruleForm"
label-width="100px" :rules="rules"
class="demo-ruleForm" ref="ruleForm"
> label-width="100px"
<el-form-item label="所属商户" prop="merchant"> class="demo-ruleForm"
<el-select >
clearable <el-form-item label="所属商户" prop="merchant">
filterable <el-select
remote clearable
:remote-method="remoteMethod" filterable
v-el-select-loadmore="loadmore" remote
v-model="ruleForm.merchant" :remote-method="remoteMethod"
placeholder="请选择商户" v-el-select-loadmore="loadmore"
@change="selectChange" v-model="ruleForm.merchant"
> placeholder="请选择商户"
<el-option @change="selectChange"
v-for="(x, i) in dataItems" >
:key="i" <el-option
:label="x.merchantName" v-for="(x, i) in dataItems"
:value="x.merchantName" :key="i"
></el-option> :label="x.merchantName"
</el-select> :value="x.merchantName"
</el-form-item> ></el-option>
<div></div> </el-select>
<el-form-item label="主营品牌" prop="brand"> </el-form-item>
<el-input <div></div>
v-model="ruleForm.brand" <el-form-item label="主营品牌" prop="brand">
placeholder="请输入商户主营品牌" <el-input
maxlength="50" v-model="ruleForm.brand"
show-word-limit placeholder="请输入商户主营品牌"
></el-input> maxlength="50"
</el-form-item> show-word-limit
<el-form-item label="商户地址" prop="address"> ></el-input>
<el-input </el-form-item>
v-model="ruleForm.address" <el-form-item label="商户地址" prop="address">
placeholder="请输入商户地址" <el-input
maxlength="100" v-model="ruleForm.address"
show-word-limit placeholder="请输入商户地址"
></el-input> maxlength="100"
</el-form-item> show-word-limit
<el-form-item label="备注" prop="remarks"> ></el-input>
<el-input </el-form-item>
type="textarea" <el-form-item label="备注" prop="remarks">
v-model="ruleForm.remarks" <el-input
placeholder="请输入备注内容" type="textarea"
maxlength="100" v-model="ruleForm.remarks"
show-word-limit placeholder="请输入备注内容"
></el-input> maxlength="100"
</el-form-item> show-word-limit
</el-form> ></el-input>
</el-form-item>
</el-form>
</div>
</div> </div>
<div class="clientInfo"> <div class="clientInfo">
<div> <div>
...@@ -126,6 +129,7 @@ import { uploadApi } from '@/api/upload' ...@@ -126,6 +129,7 @@ import { uploadApi } from '@/api/upload'
export default { export default {
data() { data() {
return { return {
fullscreenLoading: false,
uploadSuccessMsg: '', uploadSuccessMsg: '',
marchantNameCopy: '', //存放搜索的商户名 marchantNameCopy: '', //存放搜索的商户名
dataItems: [], //下拉框显示的数据 dataItems: [], //下拉框显示的数据
...@@ -144,6 +148,7 @@ export default { ...@@ -144,6 +148,7 @@ export default {
hasFileName: false, hasFileName: false,
fileBaseUrl: '', fileBaseUrl: '',
merchantId: '', //商户号 merchantId: '', //商户号
timer: '',
ruleForm: { ruleForm: {
merchant: '', merchant: '',
brand: '', brand: '',
...@@ -197,12 +202,10 @@ export default { ...@@ -197,12 +202,10 @@ export default {
handler(val) { handler(val) {
if (!val) { if (!val) {
this.dataItems = [] this.dataItems = []
this.merchantList( this.merchantList({
{ pageNum: 1,
pageNum: 1, pageSize: 40,
pageSize: 40, })
}
)
} }
}, },
}, },
...@@ -239,18 +242,25 @@ export default { ...@@ -239,18 +242,25 @@ export default {
}, },
// 远程搜索 // 远程搜索
async remoteMethod(searchVal) { async remoteMethod(searchVal) {
console.log(searchVal)
if (searchVal !== '') { if (searchVal !== '') {
this.marchantNameCopy = searchVal this.marchantNameCopy = searchVal
this.merchantList(this.pageData, searchVal) if (this.timer) {
clearTimeout(this.timer)
this.timer = setTimeout(() => {
this.merchantList(this.pageData, searchVal)
}, 300)
} else {
this.timer = setTimeout(() => {
this.merchantList(this.pageData, searchVal)
}, 300)
}
console.log(this.timer)
} else { } else {
this.dataItems = [] this.dataItems = []
this.merchantList( this.merchantList({
{ pageNum: 1,
pageNum: 1, pageSize: 40,
pageSize: 40, })
}
)
} }
}, },
// 根据所选商户获取品牌和地址 // 根据所选商户获取品牌和地址
...@@ -297,11 +307,19 @@ export default { ...@@ -297,11 +307,19 @@ export default {
file: this.fileBaseUrl, file: this.fileBaseUrl,
} }
customerApi.addCustomerList(params).then((res) => { customerApi.addCustomerList(params).then((res) => {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)',
})
if (res.data.code == '0') { if (res.data.code == '0') {
loading.close()
this.dialogVisible = true this.dialogVisible = true
this.uploadStatus = 'success' this.uploadStatus = 'success'
this.uploadSuccessMsg = res.data.data this.uploadSuccessMsg = res.data.data
} else { } else {
loading.close()
this.dialogVisible = true this.dialogVisible = true
this.uploadStatus = 'fail' this.uploadStatus = 'fail'
} }
...@@ -347,6 +365,10 @@ export default { ...@@ -347,6 +365,10 @@ export default {
back() { back() {
this.$root.to(['ubi续保', '续保', '保险渠道管理', '客户名单管理']) this.$root.to(['ubi续保', '续保', '保险渠道管理', '客户名单管理'])
this.dialogVisible = false this.dialogVisible = false
if (this.uploadStatus == 'success') {
this.ruleForm = {}
this.fileName = ''
}
}, },
}, },
} }
...@@ -355,6 +377,7 @@ export default { ...@@ -355,6 +377,7 @@ export default {
<style scoped> <style scoped>
.biasicInfo { .biasicInfo {
width: 500px; width: 500px;
margin-top: 24px;
} }
.el-upload-list__item-name { .el-upload-list__item-name {
border: 1px solid yellow; border: 1px solid yellow;
...@@ -414,4 +437,7 @@ export default { ...@@ -414,4 +437,7 @@ export default {
left: 0px; left: 0px;
font-size: 0px; font-size: 0px;
} }
.el-form-item {
margin-bottom: 20px;
}
</style> </style>
<template> <template>
<div> <div style="margin:16px">
<el-button size="mini" class="addList" type="primary" @click="gotoNamelist"> <el-button size="small" class="addList" type="primary" @click="gotoNamelist">
<i class="el-icon-plus"></i>添加名单</el-button <i class="el-icon-plus"></i>添加名单</el-button
> >
<el-form <el-form
size="mini" size="small"
inline inline
ref="merchantForm" ref="merchantForm"
:model="merchantSearchForm" :model="merchantSearchForm"
...@@ -233,11 +233,15 @@ export default { ...@@ -233,11 +233,15 @@ export default {
} }
</script> </script>
<style scoped> <style scoped>
*{
margin: 0;
padding: 0;
}
.addList { .addList {
width: 112px; width: 112px;
background: #1994f9; background: #1994f9;
border-radius: 2px; border-radius: 2px;
margin-bottom: 24px; margin-bottom: 16px;
} }
.el-icon-plus { .el-icon-plus {
padding-right: 5px; padding-right: 5px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!