Commit ca85262f by 姜鹏凯

Merge branch 'develop'

2 parents ba442995 632dcb68
......@@ -4,7 +4,7 @@ const service = window.lwConfig.services.system + window.lwConfig.services.wecom
// 门店活码类型 storeCodeType 1:门店导购码 2:门店群活码
export function getCode(type) {
return request({
url: service + '/config/' + type,
url: service + '/config/' + type
})
}
......@@ -12,7 +12,7 @@ export function getCode(type) {
export function getTableList(params) {
return request({
url: service + '/storeCodes',
params,
params
})
}
......@@ -20,7 +20,7 @@ export function getTableList(params) {
export function deleteStore(ids) {
return request({
url: service + '/' + ids,
method: 'delete',
method: 'delete'
})
}
......@@ -29,7 +29,7 @@ export function updateState(ids, params) {
return request({
url: service + '/batchStartOrStop/' + ids,
method: 'put',
data: params,
data: params
})
}
......@@ -37,6 +37,7 @@ export function updateState(ids, params) {
export function downloadTemplate() {
return request({
url: service + '/importTemplate',
responseType: 'blob'
})
}
......@@ -46,7 +47,7 @@ export function uploadStore(params) {
return request({
url: service + '/importData',
method: 'post',
data: params,
data: params
})
}
......@@ -55,14 +56,14 @@ export function addOrUpdateStore(params) {
return request({
url: service + '/code/createOrUpdateStoreCode',
method: 'post',
data: params,
data: params
})
}
// 门店详情
export function storeDetail(id) {
return request({
url: service + '/getWeStoreCodeById/' + id,
url: service + '/getWeStoreCodeById/' + id
})
}
......@@ -71,14 +72,14 @@ export function addOrUpdateCodeInStore(params) {
return request({
url: service + '/config/createOrUpdate',
method: 'post',
data: params,
data: params
})
}
// 门店详情统计 头部
export function getTabTotalInStore(id) {
return request({
url: service + '/countWeStoreTab/' + id,
url: service + '/countWeStoreTab/' + id
})
}
......@@ -86,7 +87,7 @@ export function getTabTotalInStore(id) {
export function getLineDataGuideCode(params) {
return request({
url: service + '/countStoreShopGuideTrend',
params,
params
})
}
......@@ -94,7 +95,7 @@ export function getLineDataGuideCode(params) {
export function getLineDataStoreCode(params) {
return request({
url: service + '/countStoreGroupTrend',
params,
params
})
}
......@@ -103,7 +104,7 @@ export function downloadUrl(params) {
return request({
url: service + '/downloadStoreCodeConfigUrl',
params,
responseType: 'blob',
responseType: 'blob'
})
}
......@@ -111,7 +112,7 @@ export function downloadUrl(params) {
export function getGuideCodeTab(params) {
return request({
url: service + '/countWeStoreShopGuideTab',
params,
params
})
}
......@@ -119,7 +120,7 @@ export function getGuideCodeTab(params) {
export function getStoreCodeTab(params) {
return request({
url: service + '/countWeStoreGroupTab',
params,
params
})
}
......@@ -127,7 +128,7 @@ export function getStoreCodeTab(params) {
export function getBarTop10GuideCode(params) {
return request({
url: service + '/countStoreShopGuideDrum',
params,
params
})
}
......@@ -135,7 +136,7 @@ export function getBarTop10GuideCode(params) {
export function getBarTop10StoreCode(params) {
return request({
url: service + '/countStoreShopGroupDrum',
params,
params
})
}
......@@ -143,7 +144,7 @@ export function getBarTop10StoreCode(params) {
export function getTableInGuideCode(params) {
return request({
url: service + '/countShopGuideReport',
params,
params
})
}
......@@ -151,7 +152,7 @@ export function getTableInGuideCode(params) {
export function getTableGuideCodeExport(params) {
return request({
url: service + '/exportCountShopGuideReport',
params,
params
})
}
......@@ -159,7 +160,7 @@ export function getTableGuideCodeExport(params) {
export function getTableInStoreCode(params) {
return request({
url: service + '/countStoreGroupReport',
params,
params
})
}
......@@ -167,6 +168,6 @@ export function getTableInStoreCode(params) {
export function getTableStoreCodeExport(params) {
return request({
url: service + '/exportCountStoreGroupReport',
params,
params
})
}
<script>
import { getListNew, exportCustomer, lossRemind, getLossRemindStatus } from '@/api/customer'
// import { getList as getListTag } from '@/api/customer/tag'
// import { getList as getListOrganization } from '@/api/organization'
import { getListNew, exportCustomer, lossRemind, getLossRemindStatus } from '@/api/customer'
// import { getList as getListTag } from '@/api/customer/tag'
// import { getList as getListOrganization } from '@/api/organization'
import SelectTag from '@/components/SelectTag'
import SelectTag from '@/components/SelectTag'
export default {
name: 'LossRemind',
components: { SelectTag },
props: {},
data() {
return {
query: {
pageNum: 1,
pageSize: 10,
name: '', // "客户名称",
userIds: '', // "添加人id",
tagIds: '', // "标签id,多个标签,id使用逗号隔开",
beginTime: '', // "开始时间",
endTime: '', // "结束时间"
trackState: 5,
},
queryTag: [], // 搜索框选择的标签
queryUser: [], // 搜索框选择的添加人
dateRange: [], // 添加日期
loading: false,
isMoreFilter: false,
total: 0,
// 添加标签表单
form: {
gourpName: '',
weTags: [],
},
list: [], // 客户列表
listOrganization: [], // 组织架构列表
multipleSelection: [], // 多选数组
dialogVisible: false, // 选择标签弹窗显隐
dialogVisibleSelectUser: false, // 选择添加人弹窗显隐
selectedGroup: '', // 选择的标签分组
selectedTag: [], // 选择的标签
removeTag: [], // 可移除的标签
tagDialogType: {
title: '', // 选择标签弹窗标题
type: '', // 弹窗类型
},
isNotice: '0',
}
},
watch: {},
computed: {},
created() {
this.getList()
// this.getListTag()
// this.getListOrganization()
this.getLossRemindStatus()
export default {
name: 'LossRemind',
components: { SelectTag },
props: {},
data() {
return {
query: {
pageNum: 1,
pageSize: 10,
name: '', // "客户名称",
userIds: '', // "添加人id",
tagIds: '', // "标签id,多个标签,id使用逗号隔开",
beginTime: '', // "开始时间",
endTime: '', // "结束时间"
trackState: 5
},
queryTag: [], // 搜索框选择的标签
queryUser: [], // 搜索框选择的添加人
dateRange: [], // 添加日期
loading: false,
isMoreFilter: false,
total: 0,
// 添加标签表单
form: {
gourpName: '',
weTags: []
},
list: [], // 客户列表
listOrganization: [], // 组织架构列表
multipleSelection: [], // 多选数组
dialogVisible: false, // 选择标签弹窗显隐
dialogVisibleSelectUser: false, // 选择添加人弹窗显隐
selectedGroup: '', // 选择的标签分组
selectedTag: [], // 选择的标签
removeTag: [], // 可移除的标签
tagDialogType: {
title: '', // 选择标签弹窗标题
type: '' // 弹窗类型
},
isNotice: '0'
}
},
watch: {},
computed: {},
created() {
this.getList()
// this.getListTag()
// this.getListOrganization()
this.getLossRemindStatus()
this.$store.dispatch(
'app/setBusininessDesc',
`
this.$store.dispatch(
'app/setBusininessDesc',
`
<div>当企业成员被客户删除时,会在流失列表中产生一条记录,开启删除通知后,被删除的成员会收到一条推送</div>
`,
)
},
mounted() {},
methods: {
getList(page) {
// console.log(this.dateRange);
if (this.dateRange) {
this.query.beginTime = this.dateRange[0]
this.query.endTime = this.dateRange[1]
} else {
this.query.beginTime = ''
this.query.endTime = ''
}
page && (this.query.pageNum = page)
this.loading = true
getListNew(this.query)
.then(({ rows, total }) => {
this.list = rows
this.total = +total
this.loading = false
this.multipleSelection = []
`
)
},
mounted() {},
methods: {
getList(page) {
// console.log(this.dateRange);
if (this.dateRange) {
this.query.beginTime = this.dateRange[0]
this.query.endTime = this.dateRange[1]
} else {
this.query.beginTime = ''
this.query.endTime = ''
}
page && (this.query.pageNum = page)
this.loading = true
getListNew(this.query)
.then(({ rows, total }) => {
this.list = rows
this.total = +total
this.loading = false
this.multipleSelection = []
})
.catch(() => {
this.loading = false
})
},
// getListTag() {
// getListTag().then(({ rows }) => {
// this.listTagOneArray = []
// rows.forEach((element) => {
// element.weTags.forEach((d) => {
// this.listTagOneArray.push(d)
// })
// })
// })
// },
// getListOrganization() {
// getListOrganization().then(({ rows }) => {
// this.listOrganization = Object.freeze(rows)
// })
// },
getLossRemindStatus() {
getLossRemindStatus().then(({ data }) => {
this.isNotice = data
})
.catch(() => {
this.loading = false
},
showTagDialog() {
this.selectedTag = this.queryTag
this.tagDialogType = {
title: '选择标签',
type: '1'
}
this.dialogVisible = true
},
// /** 导出按钮操作 */
// exportCustomer() {
// const queryParams = this.query
// this.$confirm('是否确认导出所有客户数据项?', '警告', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
// })
// .then(function() {
// return exportCustomer(queryParams)
// })
// .then((response) => {
// this.download(response.msg)
// })
// .catch(function() {})
// },
selectedUser(list) {
this.queryUser = list
this.query.userIds = list.map((d) => d.userId) + ''
},
submitSelectTag(selected) {
if (this.tagDialogType.type === '1') {
this.query.tagIds = selected.map((d) => d.tagId) + ''
// debugger;
this.queryTag = selected
this.dialogVisible = false
}
},
resetForm() {
this.dateRange = []
this.queryTag = []
this.queryUser = []
this.$refs['queryForm'].resetFields()
this.getList(1)
},
// 多选框选中数据
handleSelectionChange(selection) {
this.multipleSelection = selection
},
// 流失提醒开关事件
remindSwitch(val) {
lossRemind(val).then(() => {
this.msgSuccess('操作成功')
})
},
// getListTag() {
// getListTag().then(({ rows }) => {
// this.listTagOneArray = []
// rows.forEach((element) => {
// element.weTags.forEach((d) => {
// this.listTagOneArray.push(d)
// })
// })
// })
// },
// getListOrganization() {
// getListOrganization().then(({ rows }) => {
// this.listOrganization = Object.freeze(rows)
// })
// },
getLossRemindStatus() {
getLossRemindStatus().then(({ data }) => {
this.isNotice = data
})
},
showTagDialog() {
this.selectedTag = this.queryTag
this.tagDialogType = {
title: '选择标签',
type: '1',
}
this.dialogVisible = true
},
// /** 导出按钮操作 */
// exportCustomer() {
// const queryParams = this.query
// this.$confirm('是否确认导出所有客户数据项?', '警告', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
// })
// .then(function() {
// return exportCustomer(queryParams)
// })
// .then((response) => {
// this.download(response.msg)
// })
// .catch(function() {})
// },
selectedUser(list) {
this.queryUser = list
this.query.userIds = list.map((d) => d.userId) + ''
},
submitSelectTag(selected) {
if (this.tagDialogType.type === '1') {
this.query.tagIds = selected.map((d) => d.tagId) + ''
// debugger;
this.queryTag = selected
this.dialogVisible = false
}
},
resetForm() {
this.dateRange = []
this.queryTag = []
this.queryUser = []
this.$refs['queryForm'].resetFields()
this.getList(1)
},
// 多选框选中数据
handleSelectionChange(selection) {
this.multipleSelection = selection
},
// 流失提醒开关事件
remindSwitch(val) {
lossRemind(val).then(() => {
this.msgSuccess('操作成功')
})
},
},
}
}
}
</script>
<template>
......@@ -187,7 +187,8 @@ export default {
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
align="right"></el-date-picker>
align="right"
></el-date-picker>
</el-form-item>
<el-form-item label="标签">
<div class="tag-input" @click="showTagDialog">
......@@ -222,7 +223,8 @@ export default {
inactive-value="0"
active-color="#07c160"
inactive-color="#ff4949"
@change="remindSwitch"></el-switch>
@change="remindSwitch"
></el-switch>
</div>
<!-- v-hasPermi="['customerManage/customer:makeTag']" -->
</div>
......@@ -232,8 +234,9 @@ export default {
ref="multipleTable"
:data="list"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange">
style="width: 100%;"
@selection-change="handleSelectionChange"
>
<!-- <el-table-column type="selection" align="center" width="55"></el-table-column> -->
<el-table-column label="客户" prop="name" align="center">
<template slot-scope="scope">
......@@ -251,6 +254,7 @@ export default {
<el-table-column prop="firstAddTime" label="添加时间" align="center">
<!-- <template slot-scope="scope">{{ scope.row.weFlowerCustomerRels[0].createTime }}</template> -->
</el-table-column>
<el-table-column label="留存天数" prop="retentionDays" align="center"> </el-table-column>
<el-table-column prop="updateTime" label="流失时间" align="center">
<!-- <template slot-scope="scope">{{ scope.row.weFlowerCustomerRels[0].createTime }}</template> -->
</el-table-column>
......@@ -275,11 +279,12 @@ export default {
path: '/customerManage/customerManage/customer/customerDetail',
query: {
externalUserid: row.externalUserid,
userId: row.firstUserId,
},
userId: row.firstUserId
}
})
"
type="text">
type="text"
>
查看
</el-button>
<!-- <el-button type="text" >编辑</el-button> -->
......@@ -292,7 +297,8 @@ export default {
:total="total"
:page.sync="query.pageNum"
:limit.sync="query.pageSize"
@pagination="getList()" />
@pagination="getList()"
/>
</div>
<!-- 选择标签弹窗 -->
......@@ -301,7 +307,8 @@ export default {
:title="tagDialogType.title"
:selected="selectedTag"
:type="tagDialogType.type"
@success="submitSelectTag"></SelectTag>
@success="submitSelectTag"
></SelectTag>
<!-- 选择添加人弹窗 -->
<SelectUser :visible.sync="dialogVisibleSelectUser" title="选择添加人" @success="selectedUser"></SelectUser>
......@@ -309,18 +316,18 @@ export default {
</template>
<style lang="scss" scoped>
.el-icon-s-custom {
font-size: 16px;
margin-left: 4px;
color: #999;
&.man {
color: #13a2e8;
.el-icon-s-custom {
font-size: 16px;
margin-left: 4px;
color: #999;
&.man {
color: #13a2e8;
}
&.woman {
color: #f753b2;
}
}
&.woman {
color: #f753b2;
.bfc-d + .bfc-d .el-checkbox:first-child {
margin-left: 10px;
}
}
.bfc-d + .bfc-d .el-checkbox:first-child {
margin-left: 10px;
}
</style>
......@@ -5,7 +5,8 @@
:show-close="false"
title="批量导入"
:visible.sync="dialogVisible"
width="500px">
width="500px"
>
<div class="download_template">
<span>请下载门店模板,按格式修改后导入</span>
<el-button size="mini" type="text" plain @click="downloadFn">下载模板</el-button>
......@@ -21,19 +22,20 @@
:on-remove="handleRemove"
:on-change="setFileData"
:auto-upload="false"
:on-exceed="handlerExceed">
:on-exceed="handlerExceed"
>
<i class="el-icon-upload"></i>
<div style="font-size: 12px">
<div style="font-size: 12px;">
将文件拖拽到此区域
<p style="margin: 3px 0">仅支持xls、xlsx格式文件</p>
<p style="margin: 3px 0;">仅支持xls、xlsx格式文件</p>
<el-button size="mini" type="primary" plain>上传文件</el-button>
</div>
</el-upload>
</div>
<div class="tip">
<div class="title">填写说明</div>
<div style="margin-bottom: 3px">1、门店名称、所属地区、门店地址必填;</div>
<div style="margin-bottom: 3px">2、门店名称不可重复,重复则自动过滤;</div>
<div style="margin-bottom: 3px;">1、门店名称、所属地区、门店地址必填;</div>
<div style="margin-bottom: 3px;">2、门店名称不可重复,重复则自动过滤;</div>
<div>3、所属地区请务必按照“xxx省xxx市xxx区/县”格式填写。</div>
</div>
<span slot="footer" class="dialog-footer">
......@@ -41,7 +43,8 @@
@click="
dialogVisible = false
file = ''
">
"
>
取 消
</el-button>
<el-button type="primary" @click="submitImport" v-loading="submitLoading">确 定</el-button>
......@@ -50,94 +53,100 @@
</div>
</template>
<script>
import { download, toFormData } from '@/utils/common'
import { downloadTemplate, uploadStore } from '@/api/drainageCode/store'
export default {
name: 'import-store',
data() {
return {
headers: window.lwConfig.headers,
submitLoading: false,
actionUrl: '',
file: '',
}
},
props: {
visible: {
type: Boolean,
default: false,
},
},
computed: {
dialogVisible: {
get() {
return this.visible
},
set(val) {
this.$emit('update:visible', val)
},
},
},
methods: {
handlerExceed() {
this.msgError('上传文件个数最大为1,请选择拖拽一份文件或删除已存在文件!')
import { download, toFormData } from '@/utils/common'
import { downloadTemplate, uploadStore } from '@/api/drainageCode/store'
export default {
name: 'import-store',
data() {
return {
headers: window.lwConfig.headers,
submitLoading: false,
actionUrl: '',
file: ''
}
},
submitImport() {
if (!this.file) {
this.msgInfo('请先上传文件!')
return false
props: {
visible: {
type: Boolean,
default: false
}
uploadStore(toFormData({ file: this.file })).then((res) => {
if (res.code === 200) {
this.msgSuccess(res.data)
this.dialogVisible = false
this.$emit('update')
}
})
},
handleRemove() {},
setFileData(f, fl) {
this.file = f.raw
computed: {
dialogVisible: {
get() {
return this.visible
},
set(val) {
this.$emit('update:visible', val)
}
}
},
downloadFn() {
downloadTemplate().then((res) => {
if (res != null) {
download(res.data)
methods: {
handlerExceed() {
this.msgError('上传文件个数最大为1,请选择拖拽一份文件或删除已存在文件!')
},
submitImport() {
if (!this.file) {
this.msgInfo('请先上传文件!')
return false
}
})
uploadStore(toFormData({ file: this.file })).then((res) => {
if (res.code === 200) {
this.msgSuccess(res.data)
this.dialogVisible = false
this.$emit('update')
}
})
},
handleRemove() {},
setFileData(f, fl) {
this.file = f.raw
},
downloadFn() {
downloadTemplate().then((res) => {
if (res != null) {
let blob = new Blob([res], { type: 'application/vnd.ms-excel' })
let url = window.URL.createObjectURL(blob)
const link = document.createElement('a') // 创建a标签
link.href = url
link.download = '门店模板.xlsx' //指定下载文件名
link.click()
URL.revokeObjectURL(url) // 释放内存
}
})
}
},
},
created() {},
}
created() {}
}
</script>
<style lang="scss" scoped>
.download_template {
padding: 5px 20px;
// color: #ebb563;
background-color: #eee;
border-radius: 4px;
display: flex;
justify-content: space-between;
align-items: center;
}
.upload_content {
margin-top: 10px;
text-align: center;
::v-deep .el-upload-dragger {
width: 460px;
.el-icon-upload {
margin: 20px 0 16px;
.download_template {
padding: 5px 20px;
// color: #ebb563;
background-color: #eee;
border-radius: 4px;
display: flex;
justify-content: space-between;
align-items: center;
}
.upload_content {
margin-top: 10px;
text-align: center;
::v-deep .el-upload-dragger {
width: 460px;
.el-icon-upload {
margin: 20px 0 16px;
}
}
}
}
.tip {
padding: 5px 20px;
margin-top: 10px;
font-size: 12px;
color: #999999;
.title {
margin-bottom: 10px;
font-size: 14px;
.tip {
padding: 5px 20px;
margin-top: 10px;
font-size: 12px;
color: #999999;
.title {
margin-bottom: 10px;
font-size: 14px;
}
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!