Commit 28041436 by 前端

fixed

1 parent c2954580
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-10-10 09:44:10
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-10-18 13:35:46
* @FilePath: \scrm-micro-provider\src\api\modules\application.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
/**
* 新增参数sign 判断接口是否需要sign签名
*/
/**
* 用法 : this.$apis.demo.GETLISTDEVICEFILEUNSTOCK(...)
* @param {*} params
* @returns
*/
import { http, http_merchant } from '@/main'
const findAllByPage = params => {
params.method = 'entmicro.api.dracIm.findAllByPage'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
//确认开通活动
const activityConfirm = params => {
params.method = 'scrm.api.busassistant.activity.confirm'
return http({
url: 'rop-scrm-busassistant/router',
method: 'POST',
data: params,
sign: true
})
}
//申请开通活动
const activityApply = params => {
params.method = 'scrm.api.busassistant.activity.apply'
return http({
url: 'rop-scrm-busassistant/router',
method: 'POST',
data: params,
sign: true
})
}
//申请活动列表
const activityPage = params => {
params.method = 'scrm.api.busassistant.activity.page'
return http({
url: 'rop-scrm-busassistant/router',
method: 'POST',
data: params,
sign: true
})
}
//查找可开通的产品
const findNotOpenProducts = params => {
params.method = 'scrm.api.busassistant.activity.findNotOpenProducts'
return http({
url: 'rop-scrm-busassistant/router',
method: 'POST',
data: params,
sign: true
})
}
//查找已开通的产品记录--运营后台
const findOpenedProductRecord = params => {
params.method = 'scrm.api.busassistant.activity.findOpenedProductRecord'
return http({
url: 'rop-scrm-busassistant/router',
method: 'POST',
data: params,
sign: true
})
}
//申请门店列表
const merchantPage = params => {
params.method = 'scrm.api.busassistant.merchant.page'
return http({
url: 'rop-scrm-busassistant/router',
method: 'POST',
data: params,
sign: true
})
}
//确认申请门店
const merchantConfirm = params => {
params.method = 'scrm.api.busassistant.merchant.confirm'
return http({
url: 'rop-scrm-busassistant/router',
method: 'POST',
data: params,
sign: true
})
}
//根据商户号查询商户详情
const findMerchantDetailByMerchantNo = params => {
params.method = 'merchants.api.open.findMerchantDetailByMerchantNo'
return http_merchant({
url: 'rop-merchants/router',
method: 'POST',
data: params,
sign: true
})
}
//根据场景查询产品
const productByscene = params => {
params.method = 'scrm.api.busassistant.activity.productByscene'
return http({
url: 'rop-scrm-busassistant/router',
method: 'POST',
data: params,
sign: true
})
}
//根据场景查询已开通的商户
const getScene = params => {
params.method = 'scrm.api.busassistant.merchant.getScene'
return http({
url: 'rop-scrm-busassistant/router',
method: 'POST',
data: params,
sign: true
})
}
//获取活动信息
const activityDetail = params => {
params.method = 'scrm.api.shopmall.activity.detail'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
findAllByPage,
findOpenedProductRecord,
findNotOpenProducts,
activityPage,
activityApply,
activityConfirm,
merchantPage,
merchantConfirm,
findMerchantDetailByMerchantNo,
productByscene,
getScene,
activityDetail
}
/**
* 新增参数sign 判断接口是否需要sign签名
*/
/**
* 用法 : this.$apis.demo.GETLISTDEVICEFILEUNSTOCK(...)
* @param {*} params
* @returns
*/
import { http } from '@/main'
const GETLISTDEVICEFILEUNSTOCK = params => {
return http({
url: 'base/apps',
method: 'GET',
data: params,
sign: true
})
}
const GETLISTDEVICEFILEUNSTOCK1 = params => {
return http({
url: 'base/apps',
method: 'POST',
data: params,
sign: true
})
}
export default {
GETLISTDEVICEFILEUNSTOCK,
GETLISTDEVICEFILEUNSTOCK1
}
......@@ -9,3 +9,15 @@
.align-right {
text-align: right;
}
.flex-center {
display: flex;
justify-content: center;
align-items: center;
}
.flex-center-align {
display: flex;
align-items: center;
}
.cursor-pointer {
cursor: pointer;
}
......@@ -4,7 +4,7 @@
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-10-10 10:32:32
* @LastEditTime: 2022-10-17 17:25:11
*/
// 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js')
......@@ -12,13 +12,13 @@ let cfg = require('./conf.js')
import { Http } from 'glsx-common'
let timeout = 30000 //超时时间
export const fetchConfig = function(isEnv = true) {
if (isEnv) {
let { request } = cfg
Object.assign(request, { timeout })
return Promise.resolve(cfg)
}
// if (isEnv) {
// let { request } = cfg
// Object.assign(request, { timeout })
// return Promise.resolve(cfg)
// }
//return window.fetch('https://', {}).then(res => res.json())
return new Http().get('https://oss-config.dev.glsx.com.cn/mock/616d28231072f92988f059fb/home/config')
return new Http().get('https://oss-config.dev.glsx.com.cn/mock/634d1efe02322627d6b83e86/provider/config')
}
export const config = {
install(vue, cfg) {
......
......@@ -3,8 +3,8 @@
* @version: 1.0.0
* @Author: limin
* @Date: 2021-08-13 14:12:11
* @LastEditors: limin
* @LastEditTime: 2021-09-24 10:41:31
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-10-17 17:28:23
* @FilePath: \scrm\scrm-sub-blog\src\main.js
*/
import Vue from 'vue'
......@@ -17,3 +17,4 @@ Vue.prototype.$apis = apis
start()
export { bootstrap, mount, unmount } from '@/setup'
export const http = params => Vue.prototype.$http(params)
export const http_merchant = params => Vue.prototype.$http_merchant(params)
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-10-10 09:44:10
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-10-17 17:34:25
* @FilePath: \scrm-micro-provider\src\mixins\index.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
const STORE_STATUS = [
{
label: '未开通',
value: 0
},
{
label: '已开通',
value: 1
}
]
const ACTIVITY_STATUS = [
{
label: '未开通',
value: 0
},
{
label: '待开展业务',
value: 1
},
{
label: '已开通',
value: 2
}
]
export default {
data() {
return {
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' }
}
},
computed: {},
props: {
activeItem: String
},
created() {
const idx = this.searchFormData.findIndex(item => item.name == 'status')
this.searchFormData[idx].optionList = [
{
label: '全部',
value: ''
}
].concat(this.activeItem == 0 ? STORE_STATUS : ACTIVITY_STATUS)
},
methods: {
handleSearch() {
this.$refs.table.refreshTable()
},
handleReset() {
this.tableSearchForm = {}
this.$refs.table.refreshTable()
},
taskStatus(status) {
const statusItem = this.activeItem == 0 ? STORE_STATUS : ACTIVITY_STATUS
return statusItem.find(item => item.value == status).label
}
}
}
......@@ -2,16 +2,16 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-10-10 09:44:10
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-10-10 10:28:16
* @LastEditTime: 2022-10-10 14:29:27
* @FilePath: \scrm-micro-provider\src\router\routes.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
const staticRoutes = Object.freeze([
{
name: 'home',
name: 'application',
path: '/',
meta: {},
component: resolve => require([`@/views/home/index.vue`], resolve)
component: resolve => require([`@/views/application/index.vue`], resolve)
}
])
export default staticRoutes
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-10-10 09:44:10
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-10-10 10:35:50
* @LastEditTime: 2022-10-20 09:46:09
* @FilePath: \scrm-micro-provider\src\setup\qiankun.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -21,12 +21,13 @@ let routes = []
let router = null
let instance = null
export async function bootstrap({ name, id, history, common, messenger, globalState, routerBase }) {
const { response, request, sign, secret, request_common, sign_common } = await fetchConfig()
const { response, request, sign, secret, request_common, sign_common, request_merchant } = await fetchConfig()
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState
Vue.prototype.$common = common
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_merchant = new common.Http({ response, request: request_merchant, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
const routesData = common.utils.deepClone(globalState.routers)
routes = getRoutes(routesData)
......
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-10-10 10:56:40
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-10-25 10:21:06
* @FilePath: \scrm-micro-provider\src\views\home\components\activityList.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="srcm-main">
<GLCombiForm ref="formSearch" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLTable v-loading="loading" ref="table" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<template slot="optionBtns" slot-scope="scope">
<el-button type="text" v-if="scope.scope.status == 2" @click="handleLook(scope.scope)">查看</el-button>
<el-button type="text" v-else @click="handleOpen(scope.scope)">去处理</el-button>
</template>
<template slot="status" slot-scope="scope">
<div :class="['task_icon', `task_icon_${scope.scope.status == 2 ? 'green' : 'grey'}`]">{{ taskStatus(scope.scope.status) }}</div>
</template>
</GLTable>
<GLDialog title="已开通业务" :hasFooter="false" :visible.sync="detailVisible">
<div class="dialog-body-panel" v-for="(item, index) in productList" :key="index">
<template v-if="item.stage != '12个月以上'">
<div class="dialog-body-title">{{ item.stage }}:</div>
<div class="dialog-body-content" v-for="act in item.list" :key="act.productCode">{{ act.productName }}</div>
</template>
<template v-else>
<div class="dialog-body-title">12个月以上:</div>
<div class="dialog-body-activity" v-for="act in item.list" :key="act.productCode">
<div class="activity-row">
<div class="activity-item">活动名称:{{ act.productName }}</div>
</div>
<div class="activity-row">
<div class="activity-item">开始时间:{{ act.beginTime }}</div>
<div class="activity-item">结束时间:{{ act.endTime }}</div>
</div>
<div class="activity-row">
<div class="activity-item">活动链接:{{ act.activityUrl }}</div>
</div>
</div>
</template>
</div>
</GLDialog>
<activity-open ref="activityRef"></activity-open>
</div>
</template>
<script>
const numText = ['一', '二', '三', '四', '五']
import mixi from '@/mixins'
import activityOpen from './activityOpen.vue'
export default {
name: 'activityList',
mixins: [mixi],
components: {
activityOpen
},
data() {
return {
numText,
getListApi: this.$apis.application.activityPage,
tableSearchForm: {},
searchFormData: [
{
label: '服务商名称',
name: 'serviceMerchantName',
type: 'input'
},
{
label: '服务商号',
name: 'serviceMerchantId',
type: 'input'
},
{
label: '状态',
name: 'status',
type: 'select',
placeholder: '请选择',
optionId: 'value',
optionLabel: 'label',
optionList: []
},
{
label: '门店名称',
name: 'applyMerchantName',
type: 'input'
},
{
label: '门店商户号',
name: 'merchantId',
type: 'input'
}
],
tableParams: {
listName: 'data',
tableOption: false,
tableColumns: [
{
label: '服务商名称',
prop: 'serviceMerchantName',
minwidth: 120
},
{
label: '服务商号',
prop: 'serviceMerchantId',
width: '120px'
},
{
label: '门店名称',
prop: 'merchantName',
width: 200,
line: 1
},
{
label: '门店号',
prop: 'merchantId',
width: '180px'
},
{
label: '开通活动',
prop: 'productName',
width: '220px'
},
{
label: '状态',
prop: 'status',
width: '120px',
addHtml: 'status'
},
{
label: '申请时间',
prop: 'createdTime',
width: '180px'
},
{
label: '操作',
prop: 'optionBtns',
width: '80px',
addHtml: 'optionBtns',
fixed: 'right'
}
]
},
detailVisible: false,
productList: [],
openVisible: false,
activityList: [1],
maxActivityNum: 5
}
},
computed: {
activityNum() {
return this.activityList.length
}
},
methods: {
handleLook(scope) {
console.log(scope)
const { merchantId, sceneCode, serviceMerchantId } = scope
this.detailVisible = true
this.$apis.application.findOpenedProductRecord({ sceneCode, serviceMerchantId, merchant4sId: merchantId }).then(res => {
this.productList = res || []
})
},
handleOpen(scope) {
this.$refs.activityRef.init(scope)
}
}
}
</script>
<style lang="scss" scoped>
.srcm-main {
padding: 16px;
background: #fff;
min-height: calc(100vh - 174px);
.task_icon {
position: relative;
&::after {
content: '';
position: absolute;
top: 4px;
left: -10px;
width: 6px;
height: 6px;
border-radius: 4px;
}
&.task_icon_grey {
&::after {
background: #999;
}
}
&.task_icon_green {
&::after {
background: #2cca74;
}
}
}
.dialog-body-title {
font-weight: 600;
font-size: 14px;
color: #333333;
margin-bottom: 10px;
}
.dialog-body-content {
height: 44px;
line-height: 44px;
background: #f9f9f9;
padding-left: 16px;
margin-bottom: 20px;
}
.dialog-body-activity {
background: #f9f9f9;
padding: 12px 16px;
margin-bottom: 10px;
.activity-row {
display: flex;
margin-bottom: 10px;
.activity-item {
width: 50%;
margin-bottom: 6px;
}
}
}
}
</style>
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-10-10 10:56:40
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-10-24 14:37:09
* @FilePath: \scrm-micro-provider\src\views\home\components\activityList.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<GLDialog bigTitle="活动开通" :hasFooter="true" :visible.sync="openVisible" mode="big">
<div class="activity-body-panel">
<div class="activity-body-title">
请输入
<label style="font-weight: 600">{{ selectActivity.merchantName }}</label>
门店活动开通信息?
</div>
<div class="activity-item-form">
<div class="activity-item">
<label>开通业务场景:</label>
<el-select v-model="sceneCode" placeholder="请选择" size="small">
<el-option v-for="item in sceneList" :key="item.sceneCode" :label="item.stage" :value="item.sceneCode"></el-option>
</el-select>
</div>
<div class="activity-item" v-if="activityStatus === false">
<label>产品名称:</label>
<el-radio-group v-model="productCode">
<el-radio :label="item.productCode" v-for="item in productList" :key="item.productCode">{{ item.productName }}</el-radio>
</el-radio-group>
</div>
<template v-if="activityStatus === true">
<div class="activity-item">
<label>活动{{ numText[index] }}:</label>
<div class="activity-form-box">
<div class="activity-item flex-center-align">
<label>活动编号:</label>
<el-input type="text" size="small" v-model.trim="activityId" @blur="getActivity"></el-input>
<img src="@/assets/image/icon-check.png" v-if="activity.productName" />
</div>
<div class="activity-item">
<label>活动名称:</label>
<el-input type="text" size="small" readonly v-model="activity.productName"></el-input>
</div>
<div class="activity-item">
<label>活动时间:</label>
<el-date-picker size="small" readonly v-model="createTime" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</div>
<div class="activity-item">
<label>活动链接:</label>
<el-input type="text" size="small" readonly v-model="activity.activityUrl"></el-input>
</div>
<!-- <div class="activity-item-footer" v-if="index == activityNum - 1 && index < 4">
<div class="flex-center-align cursor-pointer" @click="addActivity">
<img src="@/assets/image/icon-add.png" />
增加开通活动
</div>
</div>
<div class="activity-item-right flex-center" v-if="index != 0"><img class="cursor-pointer" src="@/assets/image/icon-del.png" @click="delActivity(index)" /></div> -->
</div>
</div>
</template>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="openVisible = false">取消</el-button>
<el-button size="small" type="primary" @click="sendSubmit">推送服务商</el-button>
</span>
</GLDialog>
</template>
<script>
const stageText = ['12个月以上', '新车洽谈场景']
const numText = ['一', '二', '三', '四', '五']
export default {
name: 'activityOpen',
data() {
return {
numText,
openVisible: false,
productCode: '',
activityId: '',
activity: {
productCode: '',
productName: '',
activityUrl: ''
},
createTime: [],
activityStatus: null,
selectActivity: '',
maxActivityNum: 5,
sceneCode: '',
stage: '',
sceneList: [],
productList: []
}
},
computed: {
activityNum() {
return this.activity.length
}
},
watch: {
sceneCode(value) {
this.productCode = ''
this.activity = {}
const sceneList = this.sceneList.length && this.sceneList.find(item => item.sceneCode == value)
this.createTime = []
this.productList = sceneList.productList || []
this.stage = sceneList.stage
this.activityStatus = sceneList.stage == '12个月以上'
}
},
methods: {
init(item) {
this.selectActivity = item
this.openVisible = true
this.productByscene()
this.sceneCode = ''
this.productList = []
this.activityId = ''
this.activityStatus = null
},
//获取开通场景
productByscene() {
const { sceneCode } = this.selectActivity
this.$apis.application.productByscene({ sceneCode }).then(res => {
this.sceneList = res || []
})
},
//失去焦点获取活动详情
getActivity() {
if (!this.activityId) {
this.activity = {}
this.createTime = []
return
}
this.$apis.application.activityDetail({ id: this.activityId }).then(res => {
if (res) {
const { activityName, endTime, startTime, linkUrl, goodsCategoryCode } = res
this.activity.productName = activityName
this.createTime = [startTime, endTime]
this.activity.activityUrl = linkUrl
this.activity.productCode = goodsCategoryCode
} else {
this.activity = {}
this.createTime = []
}
})
},
//开通活动
sendSubmit() {
const { merchantId, id, serviceMerchantId, serviceMerchantName, merchantName } = this.selectActivity
const { activity, createTime, productCode } = this
if (createTime) {
activity.beginTime = createTime[0]
activity.endTime = createTime[1]
}
let params = { productCode, serviceMerchantId, serviceMerchantName, merchant4sName: merchantName, merchant4sId: merchantId, id, status: stageText.includes(this.stage) ? 2 : 1 }
if (this.activityStatus) {
params = { ...params, ...activity }
}
if (!params.productCode) {
this.$message.error('请选择产品')
return
}
this.$apis.application.activityConfirm(params).then(res => {
if (res) {
this.openVisible = false
this.$parent.handleSearch()
}
})
},
addActivity() {
this.activity.push({
productCode: '',
productName: '',
activityUrl: '',
time: []
})
},
delActivity(index) {
this.activity.splice(index, 1)
}
}
}
</script>
<style lang="scss" scoped>
.activity-item-form {
padding-top: 20px;
/deep/ {
.el-input,
.el-date-editor {
width: 334px;
}
}
.activity-item {
display: flex;
margin-bottom: 20px;
img {
width: 20px;
height: 20px;
}
label {
width: 100px;
line-height: 32px;
text-align: right;
}
}
.activity-form-box {
position: relative;
background: #f9f9f9;
padding: 20px 100px 40px;
box-sizing: border-box;
flex: 1;
.activity-item-footer {
position: absolute;
bottom: 0px;
left: 0px;
width: 100%;
height: 40px;
line-height: 40px;
padding-left: 20px;
box-sizing: border-box;
border-top: 1px dashed rgba(0, 0, 0, 0.15);
font-size: 12px;
color: #5850ff;
img {
width: 20px;
height: 20px;
margin-right: 4px;
}
}
.activity-item-right {
position: absolute;
top: 0px;
right: 0px;
width: 40px;
height: 100%;
background: #f1f1f1;
img {
width: 20px;
height: 20px;
}
}
}
}
</style>
import Vue from 'vue'
const componentsFiles = require.context(`./`, true, /.vue$/)
componentsFiles.keys().forEach(path => {
const component = componentsFiles(path).default
Vue.component(component.name, component)
})
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-10-10 10:56:40
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-10-28 12:28:17
* @FilePath: \scrm-micro-provider\src\views\home\components\activityList.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="srcm-main">
<GLCombiForm :rowNumber="1" ref="formSearch" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLTable v-loading="loading" ref="table" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<template slot="optionBtns" slot-scope="scope">
<el-button type="text" v-if="scope.scope.status == 0" @click="handleSure(scope.scope)">确认账号已开通</el-button>
</template>
<template slot="status" slot-scope="scope">
<div :class="['task_icon', `task_icon_${scope.scope.status == 1 ? 'green' : 'grey'}`]">{{ taskStatus(scope.scope.status) }}</div>
</template>
</GLTable>
<GLDialog title="门店状态变更" :hasFooter="true" :visible.sync="openVisible">
<div class="dialog-body-panel">
<div class="dialog-tips">请确认该门店账号已开通?</div>
<div class="dialog-body-form">
<label>输入已开通门店商户号:</label>
<div class="dialog-body-content">
<div class="body-input flex-center-align">
<el-input size="small" type="text" v-model="merchantId" @blur="handleBlur" @change="loadingM = false"></el-input>
<img v-if="merchantDetail.merchantName" src="@/assets/image/icon-check.png" />
</div>
<div class="input-tips" v-if="merchantDetail.merchantName">门店名称:{{ merchantDetail.merchantName }}</div>
</div>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="openVisible = false">取消</el-button>
<el-button size="small" type="primary" @click="handleOpen">已开通</el-button>
</span>
</GLDialog>
</div>
</template>
<script>
import mixi from '@/mixins'
export default {
name: 'storeList',
mixins: [mixi],
data() {
return {
loadingM: false,
merchantId: '',
merchantDetail: {},
selectStore: '',
getListApi: this.$apis.application.merchantPage,
tableSearchForm: {},
searchFormData: [
{
label: '服务商名称',
name: 'serviceMerchantName',
type: 'input'
},
{
label: '服务商号',
name: 'serviceMerchantId',
type: 'input'
},
{
label: '开通门店',
name: 'applyMerchantName',
type: 'input'
},
{
label: '状态',
name: 'status',
type: 'select',
placeholder: '请选择',
optionId: 'value',
optionLabel: 'label',
optionList: []
}
],
tableParams: {
listName: 'data',
tableOption: false,
tableColumns: [
{
label: '服务商名称',
prop: 'serviceMerchantName',
minwidth: 120
},
{
label: '服务商商号',
prop: 'serviceMerchantId',
width: '120px'
},
{
label: '手机号码',
prop: 'serviceMerchantPhone',
width: '150px'
},
{
label: '开通门店名称',
prop: 'applyMerchantName',
width: 200,
line: 1
},
{
label: '门店联系人',
prop: 'merchantContact',
width: '220px'
},
{
label: '门店联系手机',
prop: 'phone',
width: '150px'
},
{
label: '状态',
prop: 'status',
width: '120px',
addHtml: 'status'
},
{
label: '申请时间',
prop: 'createdTime',
width: '180px'
},
{
label: '操作',
prop: 'optionBtns',
width: '140px',
addHtml: 'optionBtns',
fixed: 'right'
}
]
},
openVisible: false
}
},
methods: {
handleSure(scope) {
this.openVisible = true
this.selectStore = scope
this.merchantId = ''
this.merchantDetail = {}
},
async handleOpen() {
if (!this.loadingM) {
await this.handleBlur()
}
const { merchantName } = this.merchantDetail
if (!merchantName) {
this.$message.error('商户号错误')
return
}
const { merchantId } = this
const { phone, id } = this.selectStore
this.$apis.application.merchantConfirm({ merchantName, merchantId, phone, id }).then(res => {
if (res) {
this.$message.success('操作成功')
this.openVisible = false
this.handleSearch()
}
})
},
handleBlur() {
const { merchantId } = this
return new Promise(resolve => {
if (!merchantId) {
this.merchantDetail = {}
return
}
this.$apis.application.findMerchantDetailByMerchantNo({ merchantId }).then(res => {
resolve()
this.loadingM = true
this.merchantDetail = res || {}
})
})
}
}
}
</script>
<style lang="scss" scoped>
.srcm-main {
padding: 16px;
background: #fff;
min-height: calc(100vh - 174px);
.task_icon {
position: relative;
&::after {
content: '';
position: absolute;
top: 4px;
left: -10px;
width: 6px;
height: 6px;
border-radius: 4px;
}
&.task_icon_grey {
&::after {
background: #999;
}
}
&.task_icon_green {
&::after {
background: #2cca74;
}
}
}
.dialog-tips {
font-weight: 600;
font-size: 16px;
color: #333333;
}
.dialog-body-form {
display: flex;
margin-top: 20px;
label {
line-height: 32px;
}
.dialog-body-content {
flex: 1;
img {
width: 20px;
}
/deep/ {
.el-input,
.el-date-editor {
width: 284px;
}
}
.input-tips {
height: 40px;
line-height: 40px;
background: #f9f9f9;
padding: 0px 6px;
box-sizing: border-box;
margin-top: 6px;
width: 80%;
}
}
}
}
</style>
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-10-10 10:28:01
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-10-24 09:41:49
* @FilePath: \scrm-micro-provider\src\views\application\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="channel-main">
<GLTabs v-model="activeItem" :tabPaneList="tabPaneList" class="tabs-panel"></GLTabs>
<components :is="tabName" :activeItem="activeItem"></components>
</div>
</template>
<script>
const tabPaneList = [
{
label: '门店开通申请',
name: '0'
},
{
label: '活动开通申请',
name: '1'
}
]
import './components'
export default {
name: 'businessCard',
data() {
return {
activeItem: '0',
tabPaneList
}
},
computed: {
tabName() {
return ['storeList', 'activityList'][+this.activeItem]
}
}
}
</script>
<style lang="scss" scoped>
.channel-main {
.tabs-panel {
margin-bottom: 16px;
}
}
</style>
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-10-10 10:28:01
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-10-10 10:31:16
* @FilePath: \scrm-micro-provider\src\views\home\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="scrm-main">11</div>
</template>
<script>
export default {
name: 'report-app',
data() {
return {}
}
}
</script>
<style lang="scss"></style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!