Commit 68d54ebc by 前端

提交部分功能代码

1 parent 8a755858
......@@ -1895,51 +1895,6 @@
"integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
"dev": true
},
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"ssri": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz",
......@@ -1948,28 +1903,6 @@
"requires": {
"minipass": "^3.1.1"
}
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
}
}
}
},
......@@ -13414,6 +13347,75 @@
}
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-router": {
"version": "3.6.5",
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.6.5.tgz",
......
<!-- 我的开店申请弹窗 -->
<template>
<GLDialog class="apply-store" bigTitle="我的开店申请" mode="big" :visible.sync="isVisible" :before-close="handleClose" v-loading="loading" :hasFooter="false">
<div>
<slot name="search"></slot>
<GLTable ref="storeRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div class="tb-ellipsis" slot="merchantName" slot-scope="scope">
<el-popover placement="top" popper-class="base-popper" trigger="hover" :content="scope.scope.merchantName">
<span slot="reference">
{{ scope.scope.merchantName }}
</span>
</el-popover>
</div>
<div class="tb-ellipsis" slot="merchantAddress" slot-scope="scope">
<el-popover placement="top" popper-class="base-popper" trigger="hover" :content="scope.scope.merchantAddress">
<span slot="reference">
{{ scope.scope.merchantAddress }}
</span>
</el-popover>
</div>
<div slot="brand" slot-scope="scope">
<el-popover placement="top" popper-class="base-popper" trigger="hover" :content="scope.scope.merchantBrandNameList ? scope.scope.merchantBrandNameList.join('/') : '--'">
<span slot="reference" class="one-line-ellipsis">
{{ scope.scope.merchantBrandNameList ? scope.scope.merchantBrandNameList.join('/') : '--' }}
</span>
</el-popover>
</div>
<div class="tb-ellipsis" slot="yqMerchantName" slot-scope="scope">
<el-popover placement="top" popper-class="base-popper" trigger="hover" :content="scope.scope.yqMerchantName">
<span slot="reference">
{{ scope.scope.yqMerchantName }}
</span>
</el-popover>
</div>
<div slot="applyStatus" slot-scope="scope" class="flex">
<div :class="['dot', statusClass[scope.scope.reviewStatus]]"></div>
{{ reviewStatusObj[scope.scope.reviewStatus] }}
</div>
</GLTable>
</div>
</GLDialog>
</template>
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
export default {
name: 'ApplyStoreDialog',
data() {
return {
// 表格组件
userInfo: {},
tableSearchForm: {},
url: url,
getListApi: this.$apis.customer.getReviewList,
// 表格参数
tableParams: {
listName: 'list',
tableColumns: [
{
label: '客户名称',
prop: 'merchantName',
addHtml: 'merchantName',
minWidth: 120
},
{
label: '联系人',
prop: 'contactName',
width: 120,
line: 1
},
{
label: '联系电话',
prop: 'phone',
width: 130
},
{
label: '地址',
prop: 'merchantAddress',
addHtml: 'merchantAddress',
minWidth: 120
},
{
label: '主营品牌',
prop: '',
width: 140,
line: 1,
addHtml: 'brand'
},
{
label: '所属服务中心',
prop: 'yqMerchantName',
addHtml: 'yqMerchantName',
minWidth: 120
},
{
label: '申请时间',
prop: 'createdDate',
width: '180px',
formatter: cellValue => {
return cellValue.createdDate ? dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss') : '--'
}
},
{
label: '申请状态',
prop: 'reviewStatus',
width: '100px',
addHtml: 'applyStatus'
},
{
label: '说明',
prop: 'rejectedReason',
width: 100,
line: 1
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
statusClass: {
1: '',
2: 'green',
3: 'red'
},
reviewStatusObj: {
1: '审核中',
2: '已通过',
3: '已驳回'
}
}
},
props: {
isVisible: {
type: Boolean,
default: false
},
searchForm: {
type: Object,
default: () => { }
}
},
methods: {
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm.merchantType = 2
this.tableSearchForm.partnerMerchantId = this.$globalState.session.merchantId
resolve()
})
},
handleClose() {
this.$emit('handleClose')
}
}
}
</script>
<style scoped>
.flex {
display: flex;
align-items: center;
}
.dot {
width: 6px;
height: 6px;
background: #5850ff;
border-radius: 4px;
margin-right: 6px;
}
.green {
background: #4aca74;
}
.red {
background: #eb4e4e;
}
</style>
<!-- 邀请销售顾问 -->
<template>
<GLDialog title="邀请销售顾问" mode="mid" :visible.sync="isVisible" :before-close="handleClose" @onOk="handleClose" @onCancel="handleClose">
<div class="share-dialog">
<div class="box">
<div class="title">邀请方式1:二维码邀请</div>
<div class="flex">
<img style="width: 118px; height: 118px;" :src="inviteData.qrcodeUrl" />
<el-button style="padding: 8px 0;" :size="size" type="text" @click="handleSaveImg(inviteData.qrcodeUrl)">下载图片</el-button>
</div>
</div>
<div class="box">
<div class="title">邀请方式2:链接邀请</div>
<span class="txt-blue">{{ inviteData.inviteUrl }}</span>
<el-button :size="size" type="text" @click="handleSaveTxt(inviteData.inviteUrl)">复制</el-button>
</div>
</div>
</GLDialog>
</template>
<script>
export default {
name: 'InviteDialog',
data() {
return {
inviteData: {}
}
},
props: {
isVisible: {
type: Boolean,
default: false
},
inviteInfo: {
type: Object,
default: () => { }
}
// hideStatus: Boolean
},
mounted() {
this.getInviteCode()
},
methods: {
getInviteCode() {
let sceneStr = ''
let sceneToNum = {
SC001: 0,
SC002: 1,
SC003: 2,
SC004: 3
}
this.inviteInfo.sceneCodeList && this.inviteInfo.sceneCodeList.forEach(item => {
sceneStr = sceneStr + (sceneStr ? (',' + sceneToNum[item]) : sceneToNum[item])
})
let params = {
merchantId: this.inviteInfo.shopMerchantId,
staffLabel: sceneStr
}
this.$apis.customer.getInviteCode(params).then(res => {
this.inviteData = res
})
},
handleSaveImg(url, downloadTxt = '海报') {
var alink = document.createElement('a')
alink.href = url
alink.setAttribute('target', '_blank')
alink.download = downloadTxt
alink.click()
alink.remove()
},
handleSaveTxt(txt) {
this.$message({
message: '复制成功',
type: 'success',
customClass: 'message-Z-zinde'
})
const input = document.createElement('input')
document.body.appendChild(input)
input.setAttribute('value', txt)
input.select()
document.execCommand('Copy')
document.body.removeChild(input)
},
handleClose() {
this.$emit('handleClose')
}
}
}
</script>
<style scoped>
.share-dialog {
display: flex;
}
.share-dialog .flex {
display: flex;
align-items: flex-end;
}
.share-dialog .box {
box-sizing: border-box;
width: calc((100% - 16px) / 2);
height: 182px;
padding: 20px;
background: #f9f9f9;
}
.share-dialog .box:first-child {
margin-right: 16px;
}
.share-dialog .title {
font-size: 14px;
color: #333333;
font-weight: 500;
margin-bottom: 8px;
}
.txt-blue {
font-size: 14px;
color: #5092ff;
}
</style>
<template>
<div class="map-box" :style="{ height: mapHeight + 'px' }">
<div id="container" style="width: 100%; height: 100%"></div>
<div class="map-address">{{ address }}</div>
<div id="myPageTop" style="position: absolute; top: 10px; width: 50%; left: 25%">
<el-input placeholder="请输入关键字" v-model="input" class="input-with-select">
<el-button slot="append" icon="el-icon-search" @click="searchAddress"></el-button>
</el-input>
</div>
</div>
</template>
<script>
let map, marker, placeSearch
export default {
name: 'map',
props: {
mapHeight: {
type: Number,
default: 300
}
},
data() {
return {
input: '',
address: '',
lnglat: [],
geocoderAddress: {}
}
},
methods: {
mapInit() {
map = new AMap.Map('container', {
resizeEnable: true,
zoom: 20
})
AMap.plugin(['AMap.PlaceSearch'], function() {
//构造地点查询类
placeSearch = new AMap.PlaceSearch({
pageSize: 8, // 单页显示结果条数
pageIndex: 1, // 页码
citylimit: false, //是否强制限制在设置的城市内搜索
// panel: "panel", // 结果列表将在此容器中进行展示。
autoFitView: true, // 是否自动调整地图视野使绘制的 Marker点都处于视口的可见范围
renderStyle: 'default'
})
})
// 添加列表点选监听事件
map.on('click', this.getAddress)
},
searchAddress() {
let _this = this
placeSearch.search(this.input, function(status, result) {
if (status === 'complete' && result.poiList.pois.length) {
let lnglat = result.poiList.pois[0].location
_this.getAddress(lnglat)
}
})
},
addMarker(lnglat) {
let position
if (lnglat.lng) {
position = [lnglat.lng, lnglat.lat]
} else {
position = lnglat
}
marker = new AMap.Marker({
icon: new AMap.Icon({
image: '//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png',
size: new AMap.Size(27, 34), //图标大小
imageSize: new AMap.Size(27, 34)
}),
position: position,
offset: new AMap.Pixel(-10, -10)
})
map.add(marker)
map.setFitView()
},
getAddress(e) {
let self = this
let lnglat
if (e.type == 'click') {
lnglat = e.lnglat
} else {
let { lng, lat } = e
lnglat = [lng, lat]
}
if (marker) {
marker.setMap(null)
marker = null
}
self.addMarker(lnglat)
AMap.plugin('AMap.Geocoder', () => {
const geocoder = new AMap.Geocoder()
geocoder.getAddress(lnglat, (status, result) => {
self.lnglat = lnglat
self.address = result.regeocode.formattedAddress
geocoder.getLocation(self.address, (status, result) => {
if (status === 'complete' && result.info === 'OK') {
this.geocoderAddress = result.geocodes[0]
}
})
})
})
},
selectAddress(e) {
//这里获得点选地点的经纬度
this.getAddress()
}
},
mounted() {
this.mapInit()
}
}
</script>
<style scoped lang="scss">
.map-box {
position: relative;
width: 100%;
}
#container {
position: absolute;
height: 100%;
}
#panel {
position: absolute;
max-height: 90%;
overflow-y: auto;
top: 80px;
right: 10px;
width: 280px;
}
.map-address {
position: absolute;
line-height: 20px;
bottom: -30px;
}
</style>
<template>
<div class="shop">
<div class="flex">
<img class="icon" src="@/assets/icon-merchant.png" />
<div class="merchant-name">{{ detailInfo.shopMerchantName }}</div>
</div>
<div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<!-- 表格区域 开始 -->
<GLTable ref="pointRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"></GLTable>
<!-- 表格区域 end -->
</div>
</div>
</template>
<script>
import url from '@/assets/empty.png'
export default {
data() {
//这里存放数据
return {
size: 'small',
url: url,
searchForm: {
merchantNoList: []
},
detailInfo: {},
showFormData: [
{
label: '销售顾问',
name: 'employeeName',
type: 'input',
isClear: true,
maxlength: 50
},
{
label: '手机号',
name: 'phone',
type: 'input',
isClear: true,
maxlength: 11
}
],
// 表格
getListApi: this.$apis.customer.getStaffList,
tableParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '销售顾问名称',
prop: 'staffName'
},
{
label: '手机号',
prop: 'staffPhone'
},
{
label: '部门',
prop: 'departmentName'
},
{
label: '加入时间',
prop: 'createdDate',
formatter: cellValue => {
return cellValue.createdDate ? cellValue.createdDate.replaceAll('.', '/') : '--'
}
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 基本数据
baseData: {
statusList: []
}
}
},
created() {
this.detailInfo = this.$route.query.detailInfo
},
methods: {
beforeSearchFn() {
return new Promise(resolve => {
this.searchForm.merchantNoList = [this.detailInfo.shopMerchantId]
resolve()
})
},
handleSearch() {
this.$refs.pointRef.refreshTable()
},
handleReset() {
this.searchForm = {
merchantNoList: []
}
this.handleSearch()
}
}
}
</script>
<style scoped>
.flex {
display: flex;
align-items: center;
margin-bottom: 20px;
}
.icon {
width: 32px;
height: 32px;
margin-right: 8px;
}
.merchant-name {
font-weight: 500;
font-size: 16px;
color: #333333;
}
</style>
<template>
<div class="shop">
<div class="container">
<GLCombiForm ref="showSearch"
:rowNumber="1"
:formObj="searchForm"
:formData="showFormData"
@handleOk="handleSearch"
@handleRest="handleReset"></GLCombiForm>
<div class="table-header">
<h2>服务中心管理列表</h2>
<div>
<el-button size="small"
@click="handleEditService('add')"
type="primary"
plain>新增服务中心</el-button>
<el-button size="small"
@click="handleApply">我的开店申请</el-button>
</div>
</div>
<!-- 表格区域 开始 -->
<GLTable ref="pointRef"
:getListApi="getListApi"
:noDataImg="url"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun">
<div class="tb-ellipsis"
slot="shopMerchantName"
slot-scope="scope">
<el-popover placement="top"
popper-class="base-popper"
trigger="hover"
:content="scope.scope.shopMerchantName">
<span slot="reference">
{{ scope.scope.shopMerchantName }}
</span>
</el-popover>
</div>
<div class="tb-ellipsis"
slot="yqMerchantName"
slot-scope="scope">
<el-popover placement="top"
popper-class="base-popper"
trigger="hover"
:content="scope.scope.yqMerchantName">
<span slot="reference">
{{ scope.scope.yqMerchantName }}
</span>
</el-popover>
</div>
<div class="table-btns"
slot="auth-button"
slot-scope="scope">
<GLTableButton :buttonList="tableButtonList"
:buttonItem="scope.scope"
:buttonNum="3"></GLTableButton>
</div>
</GLTable>
<!-- 表格区域 end -->
</div>
<ApplyStoreDialog v-if="isApplyVisible"
:isVisible="isApplyVisible"
@handleClose="handleApply"></ApplyStoreDialog>
<InviteDialog v-if="isInviteVisible"
:isVisible="isInviteVisible"
:inviteInfo="inviteInfo"
@handleClose="handleInviteClose"></InviteDialog>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import ApplyStoreDialog from './components/ApplyStoreDialog.vue'
import InviteDialog from './components/InviteDialog.vue'
export default {
data() {
return {
size: 'small',
url: url,
userInfo: {},
searchForm: {
settlementStatus: ''
},
tableSearchForm: {},
showFormData: [
{
label: '服务中心名称',
name: 'shopMerchantName',
type: 'input',
isClear: true,
maxlength: 50
},
{
label: '商户号',
name: 'shopMerchantIdKeyword',
type: 'input',
isClear: true,
maxlength: 20
},
// {
// label: '所属服务中心',
// name: 'yqMerchantId',
// type: 'select',
// optionList: [],
// optionId: 'yqMerchantId',
// optionLabel: 'yqMerchantName',
// optionsName: 'merchantList'
// }
],
tableButtonList: [
{
type: 'GLButton',
name: '编辑',
attrs: {
type: 'text',
fn: '编辑'
},
listeners: {
click: row => this.handleEditService('edit', row)
}
},
{
type: 'GLButton',
name: '查看',
attrs: {
type: 'text',
fn: '查看'
},
listeners: {
click: row => this.handleDetail(row)
}
},
{
type: 'GLButton',
name: '邀请',
attrs: {
type: 'text',
fn: '邀请'
},
listeners: {
click: row => this.handleInvite(row)
}
}
],
// 表格
getListApi: this.$apis.customer.getList,
tableParams: {
listName: 'list',
tableOption: {
width: '150px'
},
tableColumns: [
{
label: '服务中心名称',
prop: 'shopMerchantName',
addHtml: 'shopMerchantName',
minWidth: 120
},
{
label: '商户号',
prop: 'shopMerchantId',
width: 120
},
{
label: '联系人',
prop: 'contactName',
width: 130,
line: 1
},
{
label: '联系电话',
prop: 'phone',
width: 130
},
// {
// label: '所属服务中心',
// prop: 'yqMerchantName',
// addHtml: 'yqMerchantName',
// minWidth: 120
// },
// {
// label: '销售顾问',
// prop: 'employeeNum',
// width: 100
// },
{
label: '创建时间',
prop: 'createdDate',
width: '180px',
formatter: cellValue => {
return cellValue.createdDate ? dayjs(cellValue.createdDate).format('YYYY/MM/DD HH:mm:ss') : '--'
}
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
isApplyVisible: false,
isInviteVisible: false,
inviteInfo: {},
// 基本数据
baseData: {
// merchantList: []
}
}
},
components: {
ApplyStoreDialog,
InviteDialog
},
mounted() {
this.userInfo = this.$globalState.session
// this.getServiceCenterList()
},
methods: {
// getServiceCenterList() {
// const params = {
// partnerMerchantId: this.userInfo.merchantId
// }
// this.$apis.customer.getServiceCenterList(params).then(res => {
// this.baseData.merchantList = res
// this.$utils.getOptionsList(this, 'showFormData')
// })
// },
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
return params
},
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm = this.getParams()
resolve()
})
},
handleSearch() {
this.$refs.pointRef.refreshTable()
},
handleReset() {
this.searchForm = {
settlementStatus: ''
}
this.handleSearch()
},
handleApply() {
this.isApplyVisible = !this.isApplyVisible
},
handleInviteClose() {
this.isInviteVisible = !this.isInviteVisible
},
handleInvite(row) {
this.inviteInfo = row
this.handleInviteClose()
},
handleEditService(editType, row) {
var params = {
editType: editType,
$title: encodeURI(editType == 'add' ? '新增服务中心' : '编辑服务中心')
}
editType != 'add' && (params.merchantInfo = row)
this.$router.push({
path: '/customerManage/editCustomer',
query: params
})
},
handleDetail(row) {
console.log(row)
this.$router.push({
path: '/customerManage/customerDetail',
query: {
$title: encodeURI('查看销售顾问'),
detailInfo: row
}
})
}
}
}
</script>
<style scoped>
.import-btn {
position: relative;
width: 116px;
height: 32px;
text-align: center;
background: #5850ff;
border-radius: 4px;
color: #ffffff;
font-size: 14px;
margin-right: 8px;
}
.import-input {
opacity: 0;
position: absolute;
right: 0;
top: 0;
width: 98px;
height: 36px;
cursor: pointer;
font-size: 0;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!