Commit ca85262f by 姜鹏凯

Merge branch 'develop'

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