Commit 57515918 by yy

new

1 parent 1d895b63
...@@ -30,7 +30,7 @@ export default { ...@@ -30,7 +30,7 @@ export default {
line-height: 36px; line-height: 36px;
} }
#app { #app {
background: #F4F5FA; background: #f4f5fa;
padding: 0px 20px 20px 40px; padding: 0px 20px 20px 40px;
position: absolute; position: absolute;
box-sizing: border-box; box-sizing: border-box;
......
...@@ -74,11 +74,24 @@ const getSecret = params => { ...@@ -74,11 +74,24 @@ const getSecret = params => {
sign: true sign: true
}) })
} }
const getSuccess = params => {
params.method = 'scrm.api.work.wechat.config.agent.success'
params.sessionId = sessionId
return http_config({
url: '/rop-scrm-wechat/router',
method: 'POST',
data: params,
sign: true
})
}
export default { export default {
getAccess, getAccess,
getStatus, getStatus,
getCheckStatus, getCheckStatus,
getQrcode, getQrcode,
getReportStatus, getReportStatus,
getSecret getSecret,
getSuccess
} }
\ No newline at end of file \ No newline at end of file
...@@ -8,8 +8,15 @@ VueRouter.prototype.push = function push(location) { ...@@ -8,8 +8,15 @@ VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err) return originalPush.call(this, location).catch(err => err)
} }
function getRoutes(routesData) { function getRoutes(routesData) {
return routesData.reduce((routes, route) => { return routesData.reduce( (routes, route) => {
routes.push({ ...route, component: () => import('@/views' + route.compath + '.vue') }) // let status = await Vue.prototype.$apis.ww.getStatus({})
// console.log(status)
routes.push({
...route,
component: () => {
return import('@/views' + route.compath + '.vue')
}
})
return routes return routes
}, []) }, [])
} }
......
...@@ -69,6 +69,18 @@ const staticRoutes = Object.freeze([{ ...@@ -69,6 +69,18 @@ const staticRoutes = Object.freeze([{
path: '/baseInfo/relevance', path: '/baseInfo/relevance',
meta: {}, meta: {},
component: resolve => require([`@/views/baseInfo/relevance.vue`], resolve) component: resolve => require([`@/views/baseInfo/relevance.vue`], resolve)
},
{
name: 'EnterpriseWechat',
path: '/enterpriseWechat/index',
component: resolve => require([`@/views/enterpriseWechat/index.vue`], resolve),
meta: {}
},
{
name: 'FollowUp',
path: '/followUp/index',
component: resolve => require([`@/views/followUp/index.vue`], resolve),
meta: {}
} }
]) ])
export default staticRoutes export default staticRoutes
\ No newline at end of file \ No newline at end of file
...@@ -2,7 +2,7 @@ import Vue from 'vue' ...@@ -2,7 +2,7 @@ import Vue from 'vue'
// import { message } from '@/plugins/element.js' // import { message } from '@/plugins/element.js'
import { fetchConfig } from '@/config' import { fetchConfig } from '@/config'
import ElementUI from 'element-ui' import ElementUI from 'element-ui'
import { GLButton ,GLTable} from 'glsx-components' //权限按钮 (根据权限动态创建) import { GLButton, GLTable } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { getRoutes } from '@/router' import { getRoutes } from '@/router'
import render from './render' import render from './render'
Vue.use(ElementUI) Vue.use(ElementUI)
...@@ -14,7 +14,7 @@ import '@/assets/css/common.scss' ...@@ -14,7 +14,7 @@ import '@/assets/css/common.scss'
let routes = [] let routes = []
let router = null let router = null
let instance = null let instance = null
export async function bootstrap({ name, id, history, common, messenger, globalState,routerBase }) { export async function bootstrap({ name, id, history, common, messenger, globalState, routerBase }) {
const { response, request, sign, secret, request_common, request_config, sign_common } = await fetchConfig() const { response, request, sign, secret, request_common, request_config, sign_common } = await fetchConfig()
console.log(request) console.log(request)
Vue.prototype.$history = history Vue.prototype.$history = history
...@@ -31,7 +31,7 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt ...@@ -31,7 +31,7 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt
const routesData = common.utils.deepClone(globalState.routers) const routesData = common.utils.deepClone(globalState.routers)
routes = getRoutes(routesData) routes = getRoutes(routesData)
subscribe({ messenger }) subscribe({ messenger })
Vue.use(GLButton, { routes, routerBase}) Vue.use(GLButton, { routes, routerBase })
} }
export async function mount(props) { export async function mount(props) {
......
<template> <template>
<div class="scrm-main"> <div class="scrm-main">
<div <div class="form-header" v-if="$globalState.session.accountLevel == 1 && $globalState.session.merchantModel == 1">
class="form-header" <GLButton @click="handleContact" icon="el-icon-link" fn="门店账户关联企微" type="primary" size="small" mode="el-button">门店账户关联企微</GLButton>
v-if="$globalState.session.accountLevel == 1 && $globalState.session.merchantModel == 1"
>
<GLButton
@click="handleContact"
icon="el-icon-link"
fn="门店账户关联企微"
type="primary"
size="small"
mode="el-button"
>门店账户关联企微</GLButton>
<!-- <el-button type="primary" @click="handleContact" size="small" icon="el-icon-link" <!-- <el-button type="primary" @click="handleContact" size="small" icon="el-icon-link"
>门店账户关联企微</el-button >门店账户关联企微</el-button
>--> >-->
...@@ -21,23 +11,12 @@ ...@@ -21,23 +11,12 @@
<el-row> <el-row>
<el-form-item size="small" label="关联企微"> <el-form-item size="small" label="关联企微">
<el-select v-model="searchForm.isRelevance" placeholder="请选择"> <el-select v-model="searchForm.isRelevance" placeholder="请选择">
<el-option <el-option v-for="item in optionsContact" :key="item.value" :label="item.label" :value="item.value"></el-option>
v-for="item in optionsContact"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="merchant-row" size="small"> <el-form-item class="merchant-row" size="small">
<el-input <el-input size="small" v-model="searchForm.merchantLoginAccount" placeholder="请输入" v-if="searchForm.accountOrPhone == 1">
size="small"
v-model="searchForm.merchantLoginAccount"
placeholder="请输入"
v-if="searchForm.accountOrPhone == 1"
>
<el-select <el-select
class="merchant-row-input" class="merchant-row-input"
size="small" size="small"
v-model="searchForm.accountOrPhone" v-model="searchForm.accountOrPhone"
...@@ -52,14 +31,8 @@ ...@@ -52,14 +31,8 @@
<el-option label="手机号" :value="2"></el-option> <el-option label="手机号" :value="2"></el-option>
</el-select> </el-select>
</el-input> </el-input>
<el-input <el-input size="small" v-model="searchForm.merchantLegalPersonPhone" placeholder="请输入" v-if="searchForm.accountOrPhone == 2">
size="small"
v-model="searchForm.merchantLegalPersonPhone"
placeholder="请输入"
v-if="searchForm.accountOrPhone == 2"
>
<el-select <el-select
class="merchant-row-input" class="merchant-row-input"
size="small" size="small"
v-model="searchForm.accountOrPhone" v-model="searchForm.accountOrPhone"
...@@ -77,95 +50,49 @@ ...@@ -77,95 +50,49 @@
</el-form-item> </el-form-item>
<el-form-item size="small" label="账户状态"> <el-form-item size="small" label="账户状态">
<el-select size="small" v-model="searchForm.status" placeholder="请选择"> <el-select size="small" v-model="searchForm.status" placeholder="请选择">
<el-option <el-option v-for="item in merchantStatus" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue"></el-option>
v-for="item in merchantStatus"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-row> <el-row>
<el-form-item size="small" label="账户等级"> <el-form-item size="small" label="账户等级">
<el-select size="small" v-model="searchForm.merchantAccountLevel" placeholder="请选择"> <el-select size="small" v-model="searchForm.merchantAccountLevel" placeholder="请选择">
<el-option <el-option v-for="item in accountLevel" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue"></el-option>
v-for="item in accountLevel"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="merchant-wx" size="small">
<el-input size="small" v-model="searchForm.merchantName" placeholder="请输入商户名称/关联的企业微信名"></el-input>
</el-form-item>
<el-form-item size="small" label="商户号"> <el-form-item size="small" label="商户号">
<el-input <el-input size="small" class="merchant-num" v-model="searchForm.merchantNo" onkeyup="value=value.replace(/[^\d]/g,'')" placeholder="请输入商户号,仅限11位" maxlength="11"></el-input>
size="small"
v-model="searchForm.merchantNo"
onkeyup="value=value.replace(/[^\d]/g,'')"
placeholder="请输入商户号,仅限11位"
maxlength="11"
></el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item size="small" label="上级商户号" v-if="$globalState.session.accountLevel != 4">
size="small" <el-input size="small" v-model="searchForm.parentMerchantNo" onkeyup="value=value.replace(/[^\d]/g,'')" placeholder="请输入上级商户号,仅限11位" maxlength="11"></el-input>
style="float: right; margin-right: 0px" </el-form-item>
v-if="$globalState.session.accountLevel == 4" <el-form-item class="merchant-wx" size="small" v-if="$globalState.session.accountLevel == 4">
> <el-input size="small" v-model="searchForm.merchantName" placeholder="请输入商户名称/关联的企业微信名"></el-input>
</el-form-item>
<el-form-item size="small" style="float: right; margin-right: 0px" v-if="$globalState.session.accountLevel == 4">
<el-button @click="handleReset">重置</el-button> <el-button @click="handleReset">重置</el-button>
<el-button type="primary" @click="handleSearch">查询</el-button> <el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-row v-if="$globalState.session.accountLevel != 4"> <el-row v-if="$globalState.session.accountLevel != 4">
<el-form-item size="small" label="上级商户号"> <el-form-item class="merchant-wx" size="small">
<el-input <el-input size="small" v-model="searchForm.merchantName" placeholder="请输入商户名称/关联的企业微信名"></el-input>
size="small"
v-model="searchForm.parentMerchantNo"
onkeyup="value=value.replace(/[^\d]/g,'')"
placeholder="请输入上级商户号,仅限11位"
maxlength="11"
></el-input>
</el-form-item> </el-form-item>
<el-form-item :size="size" style="float: right; margin-right: 0px"> <el-form-item :size="size" style="float: right; margin-right: 0px">
<el-button @click="handleReset">重置</el-button> <el-button @click="handleReset">重置</el-button>
<el-button type="primary" @click="handleSearch">查询</el-button> <el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-form> </el-form>
<GLTable <GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch">
ref="table"
:layout="layout"
:tableData="tableData"
:tableTotal="tableTotal"
:pageConf="pageConf"
:tableParams="tableParams"
@refreshTable="handleSearch"
>
<div slot="accountTypeNames" slot-scope="scope"> <div slot="accountTypeNames" slot-scope="scope">
<div <div class="accountType-row" v-for="(item, index) in scope.scope.accountTypeNames.split(',')" :key="index">{{ item }}</div>
class="accountType-row"
v-for="(item, index) in scope.scope.accountTypeNames.split(',')"
:key="index"
>{{ item }}</div>
</div> </div>
<template slot="auth-button" slot-scope="scope" :data="scope.scope"> <template slot="auth-button" slot-scope="scope" :data="scope.scope">
<GLButton type="text" @click="handleLook(scope.scope)" fn="查看">查看</GLButton> <GLButton type="text" @click="handleLook(scope.scope)" fn="查看">查看</GLButton>
<GLButton <GLButton type="text" @click="handleEdit(scope.scope)" v-if="$globalState.session.merchantId != scope.scope.merchantNo" fn="修改" mode="el-button">修改</GLButton>
type="text" <GLButton type="text" @click="handleAdd(scope.scope)" v-if="scope.scope.status == 2 && scope.scope.merchantAccountLevel != 4" fn="创建子商户/门店" mode="el-button">创建子商户/门店</GLButton>
@click="handleEdit(scope.scope)"
v-if="$globalState.session.merchantId != scope.scope.merchantNo"
fn="修改"
mode="el-button"
>修改</GLButton>
<GLButton
type="text"
@click="handleAdd(scope.scope)"
v-if="scope.scope.status == 2 && scope.scope.merchantAccountLevel != 4"
fn="创建子商户/门店"
mode="el-button"
>创建子商户/门店</GLButton>
<!-- <el-button type="text" @click="handleLook(scope.scope)">查看</el-button> --> <!-- <el-button type="text" @click="handleLook(scope.scope)">查看</el-button> -->
<!-- <el-button type="text" @click="handleEdit(scope.scope)" v-if="$globalState.session.merchantId != scope.scope.merchantNo">修改</el-button> <!-- <el-button type="text" @click="handleEdit(scope.scope)" v-if="$globalState.session.merchantId != scope.scope.merchantNo">修改</el-button>
<el-button type="text" @click="handleAdd(scope.scope)" v-if="scope.scope.status == 2 && scope.scope.merchantAccountLevel != 4">创建子商户/门店</el-button>--> <el-button type="text" @click="handleAdd(scope.scope)" v-if="scope.scope.status == 2 && scope.scope.merchantAccountLevel != 4">创建子商户/门店</el-button>-->
...@@ -391,8 +318,8 @@ export default { ...@@ -391,8 +318,8 @@ export default {
margin-left: 20px; margin-left: 20px;
&-input { &-input {
/deep/ { /deep/ {
.el-input__inner { .el-input__inner {
width: 118px!important; width: 118px !important;
} }
} }
} }
...@@ -411,7 +338,14 @@ export default { ...@@ -411,7 +338,14 @@ export default {
margin-left: 20px; margin-left: 20px;
/deep/ { /deep/ {
.el-input--small .el-input__inner { .el-input--small .el-input__inner {
width: 325px; width: 285px;
}
}
}
.merchant-num {
/deep/ {
.el-input__inner {
width: 255px !important;
} }
} }
} }
......
...@@ -270,6 +270,12 @@ export default { ...@@ -270,6 +270,12 @@ export default {
}) })
let all = [...arrpara1, ...arrpara2, ...arrpara3] let all = [...arrpara1, ...arrpara2, ...arrpara3]
let para = Object.assign({}, ...all) let para = Object.assign({}, ...all)
this.$confirm(' 请确认是否关联当前信息?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$apis.baseInfo.toGL(para).then(res => { this.$apis.baseInfo.toGL(para).then(res => {
if (res) { if (res) {
this.$message({ this.$message({
...@@ -279,6 +285,7 @@ export default { ...@@ -279,6 +285,7 @@ export default {
this.$router.push({ path: '/account/index' }) this.$router.push({ path: '/account/index' })
} }
}) })
})
}, },
deleteLine(row) { deleteLine(row) {
let tempindex = 0 let tempindex = 0
......
...@@ -108,7 +108,7 @@ export default { ...@@ -108,7 +108,7 @@ export default {
treeDataList: [], treeDataList: [],
accountLevel: 1, accountLevel: 1,
isHaveEdit: false, isHaveEdit: false,
isChangeEdit:false isChangeEdit: false
} }
}, },
watch: { watch: {
...@@ -121,7 +121,7 @@ export default { ...@@ -121,7 +121,7 @@ export default {
}, },
methods: { methods: {
// 输入有变就触发提醒 // 输入有变就触发提醒
changeInput(){ changeInput() {
this.isChangeEdit = true this.isChangeEdit = true
}, },
// 获取角色信息 // 获取角色信息
...@@ -312,7 +312,7 @@ export default { ...@@ -312,7 +312,7 @@ export default {
}) })
}, },
toBack() { toBack() {
if ((this.isHaveEdit&&this.pageType=='create') ||(this.isChangeEdit&&this.pageType=='edit')) { if ((this.isHaveEdit && this.pageType == 'create') || (this.isChangeEdit && this.pageType == 'edit')) {
this.$confirm('当前有内容信息未保存,是否继续返回?', '提示', { this.$confirm('当前有内容信息未保存,是否继续返回?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!