Commit be47bd44 by 前端

27.0版本功能代码提交

1 parent 82825d87
import { http } from '@/main'
// 批量下发
const batchIssueApi = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = 'dj.api.smarcarlife.employeePerformanceResult.batchIssue'
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 查看明细
const getDetailApi = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = 'dj.api.smarcarlife.employeePerformanceResult.detail'
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 绩效校正
const correctApi = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = 'dj.api.smarcarlife.employeePerformanceResult.correct'
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 导出明细表
const exportDetailApi = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = 'dj.api.smarcarlife.employeePerformanceResult.exportDetail'
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 导出汇总表
const exportSummaryApi = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = 'dj.api.smarcarlife.employeePerformanceResult.exportSummary'
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 分页查询员工绩效
const getListApi = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = 'dj.api.smarcarlife.employeePerformanceResult.page'
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
export default { batchIssueApi, getDetailApi, correctApi, exportDetailApi, exportSummaryApi, getListApi }
import { http } from '@/main'
// 分页查询服务中心信息
const getList = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = 'dj.api.smartcarlife.serviceCenter.page'
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 分页查询开店审核记录
const getReviewList = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = 'dj.api.smartcarlife.createMerchant.review.page'
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 查询商户详情
const getMerchantInfo = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = 'dj.api.smartcarlife.merchantCustomer.merchantInfo'
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 创建服务中心
const saveServiceCenter = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = 'dj.api.smartcarlife.serviceCenter.save'
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 更新服务中心
const updateServiceCenter = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = 'dj.api.smartcarlife.serviceCenter.update'
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// // 根据场景查询产品
// const findProByScene = params => {
// params.method = `scrm.api.busassistant.activity.productByscene`
// return http({
// url: 'rop-scrm-busassistant/router',
// method: 'POST',
// data: params,
// sign: true
// })
// }
// // 查询场景和产品的开通状态
// const getSceneProStatus = params => {
// params.method = `scrm.api.busassistant.activity.findSceneProductStatus`
// return http({
// url: 'rop-scrm-busassistant/router',
// method: 'POST',
// data: params,
// sign: true
// })
// }
// // 查看客户销售顾问:
// const getStaffList = params => {
// params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
// params.routerMethod = 'dj.api.smartcarlife.staff.searchStaffPage'
// return http({
// url: 'rop-scrm-boutiquecoupon/router',
// method: 'POST',
// data: params,
// sign: true
// })
// }
// // 创建邀请销售顾问二维码
// const getInviteCode = params => {
// params.method = `scrm.api.busassistant.merchantCustomer.inviteCode`
// return http({
// url: 'rop-scrm-busassistant/router',
// method: 'POST',
// data: params,
// sign: true
// })
// }
export default { getList, getReviewList, saveServiceCenter, updateServiceCenter, getMerchantInfo }
......@@ -7,12 +7,18 @@ export function getCurrentSixMonth(n = 5) {
export function limitPrice(newValue, oldValue, intergerDigit, pointDigit, minValue, maxValue, regRule) {
var reg = {
priceReg: /^\d[\d\.]*$/, // eslint-disable-line
numReg: /^[1-9]\d*$/
numReg: /^[1-9]\d*$/,
burdenNumReg: /^([-+])?\d+(\.[0-9]{1,2})?$/ //允许负数
// burdenNumReg: /^[+-]?\d+(\.\d+)?$/ //允许负数
}
regRule = regRule || 'priceReg'
if (newValue && ((minValue && newValue < minValue) || (maxValue && newValue > maxValue))) {
return oldValue || ''
}
console.log(regRule)
console.log(reg[regRule])
console.log(reg[regRule].test(newValue + ''))
if (newValue && reg[regRule].test(newValue + '')) {
if (/\./.test(newValue)) {
newValue = newValue + ''
......
// import Vue from 'vue'
import { Message, MessageBox, Loading } from 'element-ui'
// import moment from 'moment'
import dayjs from 'dayjs'
let loadingInstance = ''
export const Util = {
/**
* 简单alert
* title 标题
* message 内容
* className 自定义class
* showCancelButton 是否展示取消按钮
* confirmButtonText 确认按钮文案
* cancelButtonText 取消按钮文案
* confirmButtonColor 确认按钮颜色
* cancelButtonColor 取消按钮颜色
*/
msg: function(options) {
MessageBox({
title: options.title || '',
type: options.type || 'error',
message: options.message || '',
className: options.className || '',
showCancelButton: options.showCancelButton || false,
confirmButtonText: options.confirmButtonText || '确认',
cancelButtonText: options.cancelButtonText || '取消',
confirmButtonColor: options.confirmButtonColor || '#1989fa',
cancelButtonColor: options.cancelButtonColor || '#000',
dangerouslyUseHTMLString: true,
callback: function(action, done) {
if (action == 'confirm') {
if (options.success) {
options.success(done)
}
} else {
console.log(done)
// done()
}
}
})
/* Vue.$vux.alert.show({
title: options.title||'',
content: options.message||'',
onShow() {
options.onShow?(options.onShow)():'';
},
onHide() {
options.onHide?(options.onHide)():'';
}
}) */
},
/**
* 提示框
*/
Info: function(options) {
Message({
message: options.message || '提示',
type: options.type || 'error',
duration: options.time || 2000,
onClose: options.onClose || ''
})
},
/**
* 轻提示
*/
Tips: function(options) {
Message({
message: options.message || '提示',
duration: options.duration || 3000,
type: options.type || 'text',
icon: options.icon || ''
})
},
/**
* loading
*/
loading: function(message) {
loadingInstance = Loading.service({
text: message || '加载中...'
})
},
/**
* 关闭loading
*/
closeLoading: function() {
loadingInstance.close()
},
/**
* 校验手机号码格式
*/
checkPhone: function(mobile) {
const myreg = /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/
return myreg.test(mobile)
},
/**
* 校验固定电话
*/
validationTel: function(tel) {
const reg = /^0[\d]{2,3}-[\d]{7,8}$/
return reg.test(tel)
},
/**
* 是否特殊字符
*/
isSpecialLetter: function(str) {
const reg = new RegExp("[`~!@#$^&*=|{}':;',\\[\\]<>?~!@#¥……&*——|{}【】‘;:”“'。,、? ]")
return reg.test(str)
},
/**
* 只能输入英文字母和数字,不能输入中文
*/
validationInput: function(str) {
const reg = /[^\w\.\/]/gi // eslint-disable-line
return reg.test(str)
},
/**
* 获取当前时间
*/
getCurrentDate: function() {
const time = new Date()
const y = time.getFullYear()
const m = time.getMonth() + 1
const d = time.getDate()
return {
date: y + '/' + m + '/' + d
}
},
/**
* 获取浏览器参数
*/
getUrlParams: function(name) {
const vars = []
let hash
const oParams = {}
const hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&')
for (let i = 0; i < hashes.length; i++) {
hash = hashes[i].split('=')
vars.push(hash[0])
oParams[hash[0]] = hash[1]
}
console.log(vars)
if (name) {
return oParams[name]
} else {
return oParams
}
},
/**
* 根据当前时间,计算往后30天的日期
*/
getAfterDate: function(day) {
const date1 = new Date()
const date2 = new Date(date1)
let time = 30
if (day) {
time = day
}
date2.setDate(date1.getDate() + time)
const _date = date2.getFullYear() + '-' + (date2.getMonth() + 1) + '-' + date2.getDate()
return {
date: _date,
year: date2.getFullYear(),
month: date2.getMonth() + 1,
day: date2.getDate()
}
},
/**
* 日期格式转换
*/
dateFormate: function(str, type) {
let txt = 'YYYY-MM-DD'
if (type) {
txt = type
}
const m = dayjs(str).format(txt)
return m
},
/**
* 字段截取
*/
cutStr: function(str, num) {
if (!str) {
return ''
}
let m = 10
let n = str
if (num) {
m = num
}
if (str.length > m) {
n = str.slice(0, m) + '...'
}
return n
},
// /**
// * 深克隆 所有原型链上的对象和属性
// * 例: const bar=deepClone(foo)
// * console.log(bar===foo) false
// * @param {*} obj
// */
// deepClone: function(obj) {
// const clone = require('rfdc')({ proto: false, circles: false })
// return clone(obj)
// },
// deepClone: function (obj) {
// // Handle the 3 simple types, and null or undefined or function
// if (obj == null || typeof obj !== "object") return obj
// // Handle Date
// if (obj instanceof Date) {
// const copy = new Date()
// copy.setTime(obj.getTime())
// return copy
// }
// // Handle Array or Object
// if ((obj instanceof Array) | (obj instanceof Object)) {
// const copy = obj instanceof Array ? [] : {}
// for (var attr in obj) {
// // if (Object.prototype.hasOwnProperty.call(attr)) {
// if (obj.hasOwnProperty(attr)) {
// copy[attr] = Util.deepClone(obj[attr])
// // console.log("copy[attr] ", copy[attr])
// }
// }
// return copy
// }
// throw new Error("Unable to clone obj! Its type isn't supported.")
// },
/**
* url下载文件
*
*/
downLoadFile: function(url) {
// console.log(row)
// return
const Temp = document.createElement('a')
// Temp.href = process.env.VUE_APP_BASE_URL + '/article/export.do?articleId=' + row.id
Temp.href = url + '?timestamp=' + new Date().getTime()
// console.log(url)
// console.log(Temp.href)
document.body.append(Temp)
Temp.click()
document.body.removeChild(Temp)
},
/**
* @param {Object} json
* @param {Object} type: 默认不传 ==>全部小写;传1 ==>全部大写;传2 ==>首字母大写
* 将json的key值进行大小写转换
*/
jsonKeysToCase: function(json, type) {
if (typeof json == 'object') {
var tempJson = JSON.parse(JSON.stringify(json))
toCase(tempJson)
return tempJson
} else {
return json
}
function toCase(json) {
if (typeof json == 'object') {
if (Array.isArray(json)) {
json.forEach(function(item) {
toCase(item)
})
} else {
for (var key in json) {
var item = json[key]
if (typeof item == 'object') {
toCase(item)
}
delete json[key]
switch (type) {
case 1:
// key值全部大写
json[key.toLocaleUpperCase()] = item
break
case 2:
// key值首字母大写,其余小写
json[key.substring(0, 1).toLocaleUpperCase() + key.substring(1).toLocaleLowerCase()] = item
break
default:
// 默认key值全部小写
json[key.toLocaleLowerCase()] = item
break
}
}
}
}
}
},
// 判断字段为空时显示
fieldShow: function(field, show) {
return field || show
},
// 整数补零显示两位小数
returnFloat: function(num) {
num = num.toString()
if (num.indexOf('.') != -1) {
let newVal = num.split('.')
if (newVal[1].length == 1) {
newVal = newVal.join('.')
newVal += '0'
num = newVal
}
} else {
num += '.00'
}
return num
}
}
export const showModal = Util.msg
export const showToast = Util.Info
export const showLoading = Util.loading
export const hideLoading = Util.closeLoading
export const deepClone = Util.deepClone
export const downLoadFile = Util.downLoadFile
export const returnFloat = Util.returnFloat
<!-- 驻店绩效-校正弹窗 -->
<template>
<GLDialog title="校正"
mode="mid"
:visible.sync="isVisible"
:before-close="handleClose"
v-loading="loading"
@onOk="handleConfirm"
@onCancel="handleClose">
<div>
<glsx-combi-form class="edit-form-container m-r-20"
ref="editFormRef"
:labelWidth="defaultLabelWidth"
:isBlock="true"
:formRef="editChildRef"
:formObj="editForm"
:formData="editFormData"
:formRules="editRule">
</glsx-combi-form>
</div>
</GLDialog>
</template>
<script>
import { limitPrice } from '@/common/format'
export default {
name: 'ResidentCorrectionDialog',
data() {
return {
editChildRef: 'editChildRef',
editForm: {
customerUnitPrice: '',
successRate: '',
otherExpenses: '',
},
oldVal: {
customerUnitPrice: '',
successRate: '',
otherExpenses: '',
},
editRule: {
customerUnitPrice: [{ required: true, message: '请输入当月平均客单价', trigger: 'change' }],
successRate: [{ required: true, message: '请输入当月成交率', trigger: 'change' }],
otherExpenses: [{ required: true, message: '请输入其他费用', trigger: 'change' }],
},
editFormData: [
{
label: '当月平均客单价/元',
name: 'customerUnitPrice',
type: 'input',
width: '432px',
inputFn: (value, item) => {
this.handleCustomerUnitPrice(value)
}
},
{
label: '当月成交率/%',
name: 'successRate',
type: 'input',
width: '432px',
inputFn: (value, item) => {
this.handleSuccessRatee(value)
}
},
{
label: '其他费用/元',
name: 'otherExpenses',
type: 'input',
width: '432px',
inputFn: (value, item) => {
this.handleOtherExpenses(value)
}
},
],
}
},
props: {
isVisible: {
type: Boolean,
default: false
},
recordInfo: {
type: Object,
default: () => { }
}
},
methods: {
handleCustomerUnitPrice(newVal) {
this.editForm.customerUnitPrice = limitPrice(newVal, this.oldVal.customerUnitPrice, 9, 2, 0, 999999)
this.oldVal.customerUnitPrice = this.editForm.customerUnitPrice
},
handleSuccessRatee(newVal) {
this.editForm.successRate = limitPrice(newVal, this.oldVal.successRate, 6, 2, 0, 100)
this.oldVal.successRate = this.editForm.successRate
},
handleOtherExpenses(newVal) {
this.editForm.otherExpenses = limitPrice(newVal, this.oldVal.otherExpenses, 10, 2, -999999, 999999, 'burdenNumReg')
this.oldVal.otherExpenses = this.editForm.otherExpenses
},
handleConfirm() {
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
var params = this.$common.utils.deepClone(this.editForm)
console.log('this.recordInfo', this.recordInfo);
params.id = this.recordInfo.id
console.log(params);
// // // 商户类型 1-服务中心 2-客户
// // params.merchantType = 2
// if (this.routeInfo.editType == 'edit') {
// params.yqMerchantId = this.editForm.merchantId
// // params.serviceCenterMerchantId = this.editForm.yqMerchantId
// }
// // 判断省市地址填写
// if (!params.provinceName || !params.cityName || !params.merchantAddress || !params.latitude || !params.longitude) {
// this.$message({
// message: '请选择省市地址',
// type: 'error'
// })
// return
// }
// if (!this.editForm.merchantBrandList?.length) {
// this.$message({
// message: '请选择主营品牌',
// type: 'error'
// })
// return
// }
// params.merchantBrandListJson = JSON.stringify(this.$common.utils.deepClone(this.editForm.merchantBrandList))
// delete params.merchantBrandList
// delete params.merchantBrandIds
// // params.sceneList = []
// // this.baseData.sceneList.forEach(item => {
// // const productCodeIds = item.productList.map(k => k.productCode)
// // if (this.hasDuplicate(productCodeIds, this.editForm.productCodeList)) {
// // params.sceneList.push(item.sceneCode)
// // }
// // })
// this.$confirm('<strong>是否确定提交?</strong> <div>提交服务中心开通申请,进入开店审核,审核通过后将为您自动' + (this.routeInfo.editType == 'add' ? '创建' : '编辑') + '服务中心</div> ', '提示', {
// dangerouslyUseHTMLString: true,
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
// })
// .then(() => {
// const apiName = this.routeInfo.editType == 'edit' ? 'updateServiceCenter' : 'saveServiceCenter'
// this.loading = true
this.$apis.performanceManage.correctApi(params)
.then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
this.handleClose()
}
})
// .finally(() => {
// this.loading = false
// })
// })
// .catch(() => { })
}
})
},
handleClose() {
this.$emit('handleClose')
}
}
}
</script>
<style scoped>
</style>
<!-- 驻店绩效-查看明细弹窗 -->
<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="customerName"
slot-scope="scope">
<el-popover placement="top"
popper-class="base-popper"
trigger="hover"
:content="scope.scope.customerName">
<span slot="reference">
{{ scope.scope.customerName }}
</span>
</el-popover>
</div>
</GLTable>
</div>
</GLDialog>
</template>
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
export default {
name: 'ResidentDetailDialog',
data() {
return {
// 表格组件
userInfo: {},
tableSearchForm: {},
url: url,
getListApi: this.$apis.performanceManage.getDetailApi,
// 表格参数
tableParams: {
listName: 'list',
tableColumns: [
{
label: '订单编码',
prop: 'orderCode',
width: 180
},
{
label: '支付时间',
prop: 'orderTime',
width: '180px',
formatter: cellValue => {
return cellValue.orderTime ? dayjs(cellValue.orderTime).format('YYYY-MM-DD HH:mm:ss') : '--'
}
},
{
label: '客户名称',
prop: 'customerName',
addHtml: 'customerName',
minWidth: 120
},
{
label: '客户手机号',
prop: 'customerPhone',
width: 130
},
{
label: '订单产值',
prop: 'orderMoney',
width: 100,
formatter: cellValue => {
return cellValue.orderMoney || cellValue.orderMoney == 0 ? cellValue.orderMoney.toFixed(2) : '-'
}
},
{
label: '提成奖励',
prop: 'commissionBonus',
width: 100,
formatter: cellValue => {
return cellValue.commissionBonus || cellValue.commissionBonus == 0 ? cellValue.commissionBonus.toFixed(2) : '-'
}
},
{
label: '高客单奖励',
prop: 'highCustomerUnitBonus',
width: 120,
formatter: cellValue => {
return cellValue.highCustomerUnitBonus || cellValue.highCustomerUnitBonus == 0 ? cellValue.highCustomerUnitBonus.toFixed(2) : '-'
}
},
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
}
},
props: {
isVisible: {
type: Boolean,
default: false
},
searchForm: {
type: Object,
default: () => { }
},
recordInfo: {
type: Object,
default: () => { }
}
},
methods: {
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm.staffUuid = this.recordInfo.staffUuid
this.tableSearchForm.performanceMonth = this.recordInfo.performanceMonth
resolve()
})
},
handleClose() {
this.$emit('handleClose')
}
}
}
</script>
<style scoped>
</style>
<!-- 技师绩效-校正弹窗 -->
<template>
<GLDialog title="校正"
mode="mid"
:visible.sync="isVisible"
:before-close="handleClose"
v-loading="loading"
@onOk="handleConfirm"
@onCancel="handleClose">
<div>
<glsx-combi-form class="edit-form-container m-r-20"
ref="editFormRef"
:labelWidth="defaultLabelWidth"
:isBlock="true"
:formRef="editChildRef"
:formObj="editForm"
:formData="editFormData"
:formRules="editRule">
</glsx-combi-form>
</div>
</GLDialog>
</template>
<script>
import { limitPrice } from '@/common/format'
export default {
name: 'TechnicianCorrectionDialog',
data() {
return {
editChildRef: 'editChildRef',
editForm: {
otherExpenses: '',
},
oldVal: {
otherExpenses: '',
},
editRule: {
otherExpenses: [{ required: true, message: '请输入其他费用', trigger: 'change' }],
},
editFormData: [
{
label: '其他费用/元',
name: 'otherExpenses',
type: 'input',
width: '432px',
inputFn: (value, item) => {
this.handleOtherExpenses(value)
}
},
],
}
},
props: {
isVisible: {
type: Boolean,
default: false
},
recordInfo: {
type: Object,
default: () => { }
}
},
methods: {
handleOtherExpenses(newVal) {
this.editForm.otherExpenses = limitPrice(newVal, this.oldVal.otherExpenses, 10, 2, -999999, 999999, 'burdenNumReg')
this.oldVal.otherExpenses = this.editForm.otherExpenses
},
handleConfirm() {
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
var params = this.$common.utils.deepClone(this.editForm)
console.log('this.recordInfo', this.recordInfo);
params.id = this.recordInfo.id
console.log(params);
// // // 商户类型 1-服务中心 2-客户
// // params.merchantType = 2
// if (this.routeInfo.editType == 'edit') {
// params.yqMerchantId = this.editForm.merchantId
// // params.serviceCenterMerchantId = this.editForm.yqMerchantId
// }
// // 判断省市地址填写
// if (!params.provinceName || !params.cityName || !params.merchantAddress || !params.latitude || !params.longitude) {
// this.$message({
// message: '请选择省市地址',
// type: 'error'
// })
// return
// }
// if (!this.editForm.merchantBrandList?.length) {
// this.$message({
// message: '请选择主营品牌',
// type: 'error'
// })
// return
// }
// params.merchantBrandListJson = JSON.stringify(this.$common.utils.deepClone(this.editForm.merchantBrandList))
// delete params.merchantBrandList
// delete params.merchantBrandIds
// // params.sceneList = []
// // this.baseData.sceneList.forEach(item => {
// // const productCodeIds = item.productList.map(k => k.productCode)
// // if (this.hasDuplicate(productCodeIds, this.editForm.productCodeList)) {
// // params.sceneList.push(item.sceneCode)
// // }
// // })
// this.$confirm('<strong>是否确定提交?</strong> <div>提交服务中心开通申请,进入开店审核,审核通过后将为您自动' + (this.routeInfo.editType == 'add' ? '创建' : '编辑') + '服务中心</div> ', '提示', {
// dangerouslyUseHTMLString: true,
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
// })
// .then(() => {
// const apiName = this.routeInfo.editType == 'edit' ? 'updateServiceCenter' : 'saveServiceCenter'
// this.loading = true
this.$apis.performanceManage.correctApi(params)
.then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
this.handleClose()
}
})
// .finally(() => {
// this.loading = false
// })
// })
// .catch(() => { })
}
})
},
handleClose() {
this.$emit('handleClose')
}
}
}
</script>
<style scoped>
</style>
<!-- 技师绩效-查看明细弹窗 -->
<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="customerName"
slot-scope="scope">
<el-popover placement="top"
popper-class="base-popper"
trigger="hover"
:content="scope.scope.customerName">
<span slot="reference">
{{ scope.scope.customerName }}
</span>
</el-popover>
</div>
</GLTable>
</div>
</GLDialog>
</template>
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
export default {
name: 'TechnicianDetailDialog',
data() {
return {
// 表格组件
userInfo: {},
tableSearchForm: {},
url: url,
getListApi: this.$apis.performanceManage.getDetailApi,
// 表格参数
tableParams: {
listName: 'list',
tableColumns: [
{
label: '订单编码',
prop: 'orderCode',
width: 180
},
{
label: '订单类型',
prop: 'upgradeFlag',
width: 100,
formatter: cellValue => {
return this.baseData.upgradeFlagList.find((item) => item.confId === cellValue.upgradeFlag).confName || "-"
}
},
{
label: '支付时间',
prop: 'orderTime',
width: '180px',
formatter: cellValue => {
return cellValue.orderTime ? dayjs(cellValue.orderTime).format('YYYY-MM-DD HH:mm:ss') : '--'
}
},
{
label: '客户名称',
prop: 'customerName',
addHtml: 'customerName',
minWidth: 120
},
{
label: '客户手机号',
prop: 'customerPhone',
width: 130
},
{
label: '订单产值',
prop: 'orderMoney',
width: 100,
formatter: cellValue => {
return cellValue.orderMoney || cellValue.orderMoney == 0 ? cellValue.orderMoney.toFixed(2) : '-'
}
},
{
label: '施工奖励',
prop: 'constructionBonus',
width: 100,
formatter: cellValue => {
return cellValue.constructionBonus || cellValue.constructionBonus == 0 ? cellValue.constructionBonus.toFixed(2) : '-'
}
}
],
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 基本数据
baseData: {
upgradeFlagList: [{
confId: 'Y',
confName: '升级'
},
{
confId: 'N',
confName: '战败'
}]
},
}
},
props: {
isVisible: {
type: Boolean,
default: false
},
searchForm: {
type: Object,
default: () => { }
},
recordInfo: {
type: Object,
default: () => { }
}
},
methods: {
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm.staffUuid = this.recordInfo.staffUuid
this.tableSearchForm.performanceMonth = this.recordInfo.performanceMonth
resolve()
})
},
handleClose() {
this.$emit('handleClose')
}
}
}
</script>
<style scoped>
</style>
<template>
<div class="activity">
<GLTabs v-model="activeName"
:tabPaneList="tabPaneList"
@tab-click="handleClick"></GLTabs>
<components :is="tabName"></components>
</div>
</template>
<script>
import ResidentPerformance from "./components/residentPerformance.vue"
import TechnicianPerformance from "./components/technicianPerformance.vue"
export default {
components: {
ResidentPerformance,
TechnicianPerformance
},
data() {
return {
activeName: "1",
tabPaneList: [
{
label: "驻店绩效",
name: "1"
},
{
label: "技师绩效",
name: "2"
}
],
tabName: "ResidentPerformance"
}
},
mounted() {
},
computed: {
},
watch: {
},
methods: {
handleClick() {
let arr = {
1: "residentPerformance",
2: "technicianPerformance"
}
this.tabName = arr[+this.activeName]
console.log('this.tabName', this.tabName);
},
}
}
</script>
<style scoped lang="scss">
.activity {
/deep/ {
.el-select .el-tag {
max-width: 60% !important;
}
.el-form-item__content {
overflow: inherit !important;
}
}
.container {
margin-top: 16px;
.title {
height: 32px;
line-height: 32px;
margin-bottom: 10px;
.title-text {
font-weight: 600;
font-size: 16px;
color: #333333;
margin-left: 4px;
}
}
}
.empty-btn {
position: absolute;
right: -40px;
top: 0px;
font-size: 14px;
color: #5850ff;
}
.config-pannel {
background: #f9f9f9;
width: 520px;
height: 168px;
display: flex;
.config-item {
padding: 26px 20px;
}
.clear-btn {
cursor: pointer;
background: #f1f1f1;
width: 40px;
height: 100%;
line-height: 20px;
font-size: 14px;
color: #666666;
padding: 60px 13px;
box-sizing: border-box;
}
}
.input-tag-wrapper {
position: relative;
font-size: 14px;
background-color: #fff;
background-image: none;
border-radius: 4px;
border: 1px solid #dcdfe6;
box-sizing: border-box;
color: #666;
display: inline-block;
outline: none;
padding: 5px;
max-height: 68px;
overflow: auto;
flex-wrap: wrap;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 450px;
display: flex;
align-items: center;
margin-top: 6px;
font-size: 14px;
i {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
/deep/ .el-tag {
background-color: #fff !important;
margin-bottom: 4px;
}
}
.select-wrap {
.common {
margin: 4px 0;
height: 40px !important;
overflow: hidden;
/deep/ .el-input {
height: 40px !important;
line-height: 40px !important;
}
/deep/ .el-input__suffix {
height: 40px !important;
margin-top: -4px;
.is-reverse {
transform: rotate(180deg);
}
}
}
}
}
.search-groomname {
width: 252px;
margin: 12px 16px 0;
/deep/.el-input {
width: 252px;
}
}
.filter-tree {
padding: 0 16px;
}
.empty {
padding: 10px 0;
margin: 0;
text-align: center;
color: #999;
font-size: 13px;
}
.placeholder {
font-size: 14px;
color: #c0c6ce;
line-height: 20px;
}
</style>
<!-- 我的开店申请弹窗 -->
<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>
<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>
<GLDialog class="apply-store" bigTitle="我的开店申请" mode="big" :visible.sync="isVisible" :before-close="handleClose" v-loading="loading" :hasFooter="false">
<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">
<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">
<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">
<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 slot="applyStatus"
slot-scope="scope"
class="flex">
<div :class="['dot', statusClass[scope.scope.reviewStatus]]"></div>
{{ reviewStatusObj[scope.scope.reviewStatus] }}
</div>
......@@ -58,7 +81,7 @@ export default {
listName: 'list',
tableColumns: [
{
label: '客户名称',
label: '服务中心名称',
prop: 'merchantName',
addHtml: 'merchantName',
minWidth: 120
......@@ -88,12 +111,6 @@ export default {
addHtml: 'brand'
},
{
label: '所属服务中心',
prop: 'yqMerchantName',
addHtml: 'yqMerchantName',
minWidth: 120
},
{
label: '申请时间',
prop: 'createdDate',
width: '180px',
......@@ -143,7 +160,7 @@ export default {
methods: {
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm.merchantType = 2
this.tableSearchForm.merchantType = 1
this.tableSearchForm.partnerMerchantId = this.$globalState.session.merchantId
resolve()
})
......
<template>
<div class="map-box" :style="{ height: mapHeight + 'px' }">
<div id="container" style="width: 100%; height: 100%"></div>
<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>
<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>
......@@ -36,7 +43,7 @@ export default {
resizeEnable: true,
zoom: 20
})
AMap.plugin(['AMap.PlaceSearch'], function() {
AMap.plugin(['AMap.PlaceSearch'], function () {
//构造地点查询类
placeSearch = new AMap.PlaceSearch({
pageSize: 8, // 单页显示结果条数
......@@ -52,7 +59,7 @@ export default {
},
searchAddress() {
let _this = this
placeSearch.search(this.input, function(status, result) {
placeSearch.search(this.input, function (status, result) {
if (status === 'complete' && result.poiList.pois.length) {
let lnglat = result.poiList.pois[0].location
_this.getAddress(lnglat)
......
<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>
......@@ -29,18 +29,18 @@
:beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun">
<div class="tb-ellipsis"
slot="shopMerchantName"
slot="merchantName"
slot-scope="scope">
<el-popover placement="top"
popper-class="base-popper"
trigger="hover"
:content="scope.scope.shopMerchantName">
:content="scope.scope.merchantName">
<span slot="reference">
{{ scope.scope.shopMerchantName }}
{{ scope.scope.merchantName }}
</span>
</el-popover>
</div>
<div class="tb-ellipsis"
<!-- <div class="tb-ellipsis"
slot="yqMerchantName"
slot-scope="scope">
<el-popover placement="top"
......@@ -51,7 +51,7 @@
{{ scope.scope.yqMerchantName }}
</span>
</el-popover>
</div>
</div> -->
<div class="table-btns"
slot="auth-button"
slot-scope="scope">
......@@ -65,10 +65,6 @@
<ApplyStoreDialog v-if="isApplyVisible"
:isVisible="isApplyVisible"
@handleClose="handleApply"></ApplyStoreDialog>
<InviteDialog v-if="isInviteVisible"
:isVisible="isInviteVisible"
:inviteInfo="inviteInfo"
@handleClose="handleInviteClose"></InviteDialog>
</div>
</template>
......@@ -76,7 +72,6 @@
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 {
......@@ -84,20 +79,21 @@ export default {
url: url,
userInfo: {},
searchForm: {
settlementStatus: ''
yqMerchantNameKeyword: '',
yqMerchantIdKeyword: ''
},
tableSearchForm: {},
showFormData: [
{
label: '服务中心名称',
name: 'shopMerchantName',
name: 'yqMerchantNameKeyword',
type: 'input',
isClear: true,
maxlength: 50
maxlength: 20
},
{
label: '商户号',
name: 'shopMerchantIdKeyword',
name: 'yqMerchantIdKeyword',
type: 'input',
isClear: true,
maxlength: 20
......@@ -124,31 +120,31 @@ export default {
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)
}
}
// {
// 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,
getListApi: this.$apis.serviceCenter.getList,
tableParams: {
listName: 'list',
tableOption: {
......@@ -157,13 +153,13 @@ export default {
tableColumns: [
{
label: '服务中心名称',
prop: 'shopMerchantName',
addHtml: 'shopMerchantName',
prop: 'merchantName',
addHtml: 'merchantName',
minWidth: 120
},
{
label: '商户号',
prop: 'shopMerchantId',
prop: 'merchantId',
width: 120
},
{
......@@ -177,17 +173,6 @@ export default {
prop: 'phone',
width: 130
},
// {
// label: '所属服务中心',
// prop: 'yqMerchantName',
// addHtml: 'yqMerchantName',
// minWidth: 120
// },
// {
// label: '销售顾问',
// prop: 'employeeNum',
// width: 100
// },
{
label: '创建时间',
prop: 'createdDate',
......@@ -200,8 +185,8 @@ export default {
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
isApplyVisible: false,
isInviteVisible: false,
inviteInfo: {},
// isInviteVisible: false,
// inviteInfo: {},
// 基本数据
baseData: {
// merchantList: []
......@@ -210,7 +195,7 @@ export default {
},
components: {
ApplyStoreDialog,
InviteDialog
// InviteDialog
},
mounted() {
this.userInfo = this.$globalState.session
......@@ -241,41 +226,44 @@ export default {
},
handleReset() {
this.searchForm = {
settlementStatus: ''
yqMerchantNameKeyword: '',
yqMerchantIdKeyword: ''
}
this.handleSearch()
},
handleApply() {
this.isApplyVisible = !this.isApplyVisible
},
handleInviteClose() {
this.isInviteVisible = !this.isInviteVisible
},
handleInvite(row) {
this.inviteInfo = row
this.handleInviteClose()
},
// 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)
console.log(params);
this.$router.push({
path: '/customerManage/editCustomer',
path: '/serviceCenter/editService',
query: params
})
},
handleDetail(row) {
console.log(row)
this.$router.push({
path: '/customerManage/customerDetail',
query: {
$title: encodeURI('查看销售顾问'),
detailInfo: row
}
})
}
// handleDetail(row) {
// console.log(row)
// this.$router.push({
// path: '/customerManage/customerDetail',
// query: {
// $title: encodeURI('查看销售顾问'),
// detailInfo: row
// }
// })
// }
}
}
</script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!