Commit f4c5eb09 by 前端

Merge branch 'xuyl_v2.8.0' into 'v2.8.0'

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

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