Commit 0c53a5a8 by 杨北旺

角色管理/创建角色/修改角色

2 parents 3e06ae54 a9d049a6
......@@ -6,46 +6,46 @@
* @param {*} params
* @returns
*/
import { http } from '@/main'
import { http_config } from '@/main'
const getMerchantTree = params => {
params.method = 'org.ore.api.common.findMerchantTreeByMerchantNo.list'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
params.method = 'org.ore.api.common.findMerchantTreeByMerchantNo.list'
return http_config({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const getDepartment = params => {
params.method = 'cn.com.glsx.entmicro.department.listDepartmentTree'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
params.method = 'cn.com.glsx.entmicro.department.listDepartmentTree'
return http_config({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const toGL = params => {
params.method = 'org.ore.api.common.relevanceEntmicro.list'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
params.method = 'org.ore.api.common.relevanceEntmicro.list'
return http_config({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const merchantInfo = params => {
params.method = 'org.ore.api.common.findMerchantInfoByMerchantNo.list'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
params.method = 'org.ore.api.common.findMerchantInfoByMerchantNo.list'
return http_config({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
getMerchantTree,
getDepartment,
toGL,
merchantInfo
getMerchantTree,
getDepartment,
toGL,
merchantInfo
}
\ No newline at end of file
<template>
<div disabled class="btn-unselect" :class="{ 'selectd-type': typeStatus }" @click="tabType">
<div disabled class="btn-unselect" :class="{ 'selectd-type': typeStatus,'no_click': stopClick }" @click="tabType">
<span class="select-type-title">{{ btnLabel }}</span
><i class="btn-icon" :class="{ 'el-icon-check': typeStatus }"></i>
</div>
......@@ -64,6 +64,9 @@ export default {
background: #5850ff;
}
}
&.no_click {
cursor: not-allowed!important;
}
.select-type-title {
display: inline-block;
padding: 0 16px;
......
......@@ -11,7 +11,6 @@
</template>
<script>
import AMap from "AMap";
let map, placeSearch;
export default {
name: "map",
......
......@@ -27,4 +27,5 @@ start()
export { bootstrap, mount, unmount }
from '@/setup'
export const http = params => Vue.prototype.$http(params)
export const http_common = params => Vue.prototype.$http_common(params)
\ No newline at end of file
export const http_common = params => Vue.prototype.$http_common(params)
export const http_config = params => Vue.prototype.$http_config(params)
\ No newline at end of file
......@@ -13,7 +13,7 @@ let routes = []
let router = null
let instance = null
export async function bootstrap({ name, id, history, common, messenger, globalState }) {
const { response, request, sign, secret, request_common } = await fetchConfig()
const { response, request, sign, secret, request_common, request_config } = await fetchConfig()
console.log(request)
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
......@@ -22,6 +22,7 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt
Vue.prototype.$common = common
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
Vue.prototype.$http_common = new common.Http({ response, request: request_common, sign, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
Vue.prototype.$http_config = new common.Http({ response, request: request_config, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
const routesData = common.utils.deepClone(globalState.routers)
......
......@@ -3,14 +3,12 @@
<div v-show="step == 1">
<div class="account-header scrm-flex-between scrm-box-f">
<span>创建子商户/门店</span>
<el-select v-model="status" slot="prepend" placeholder="请选择">
<el-option label="门店" :value="1"></el-option>
<el-option label="商户" :value="2"></el-option>
</el-select>
</div>
<div class="account-body scrm-box-f">
<div class="form-title">企业基本信息</div>
<el-form
<base-info ref="baseInfoForm" :brandData="brandData" :accountAddForm="accountAddForm" :businessScopeCustomize="businessScopeCustomize" :businessOption="businessOption"></base-info>
<!-- <el-form
ref="baseForm"
:model="accountAddForm"
class="account-body-form"
......@@ -39,9 +37,9 @@
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="商户类型" class="merchant-row">
<el-form-item
size="small" label="商户类型" class="merchant-row">
<el-input
size="small"
v-model="accountAddForm.merchantOrgcode"
placeholder="请输入组织机构号码"
v-if="accountAddForm.merchantType == 2"
......@@ -75,10 +73,11 @@
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-col :span="24">
<el-form-item size="small" label="商户地址" class="form-row">
<el-input v-model="accountAddForm.merchantAddress"> </el-input>
<el-button
readonly
type="primary"
class="form-btn"
@click="dialogMapVisible = true"
......@@ -239,7 +238,7 @@
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-form> -->
</div>
<div class="account-body scrm-box-f">
<div class="form-title">账户信息</div>
......@@ -373,12 +372,14 @@ import util from "@/utils/util";
import mapView from "@/components/mapView/index";
import autoButton from "@/components/auto-button/index";
import selectProduct from "./components/selectProduct";
import baseInfo from "./components/baseInfo";
export default {
name: "index",
components: {
mapView,
autoButton,
selectProduct,
baseInfo
},
data() {
const validatePhone = (rule, value, callback) => {
......@@ -406,7 +407,7 @@ export default {
businessScopeCustomize: [{ name: "" }],
accountAddForm: {
status: 1,
merchantType: "1",
merchantType: 1,
businessScope: [],
parentId: "",
isloginName: false,
......@@ -519,7 +520,7 @@ export default {
//下一步
handleNext() {
const pm1 = new Promise((resolve, reject) => {
this.$refs.baseForm.validate((valid) => {
this.$refs.baseInfoForm.$refs.baseForm.validate((valid) => {
if (valid) resolve();
});
});
......@@ -548,7 +549,8 @@ export default {
if (params.businessScope) {
params.businessScope = params.businessScope.join(",");
}
params.merchantBrand = this.$refs.brandTree.getCheckedKeys().join(",");
console.log(this.$refs.baseInfoForm)
params.merchantBrand = this.$refs.baseInfoForm.$refs.brandTree.getCheckedKeys().join(",");
params.isloginName ? (params.isloginName = 1) : (params.isloginName = 0);
params.merchantAccountLevel = this.accountDetail.merchantAccountLevel;
let businessScopeCustomize = this.businessScopeCustomize.map((item) => item.name);
......@@ -568,7 +570,7 @@ export default {
this.nextStatus = true;
if (typeof res == "number") {
this.parentId = res;
this.findMenuFunTreeByMerId();
this.$refs.productForm.findMenuFunTreeByMerId();
}
this.twoMerchantDetail(this.parentId);
}
......
......@@ -75,7 +75,8 @@
</div>
<div class="account-body scrm-box-f">
<div class="form-title">修改企业信息</div>
<el-form
<base-info ref="baseInfoForm" :brandData="brandData" :accountAddForm="accountAddForm" :businessScopeCustomize="businessScopeCustomize" :businessOption="businessOption"></base-info>
<!-- <el-form
ref="baseForm"
:model="accountAddForm"
class="account-body-form"
......@@ -299,7 +300,7 @@
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-form> -->
</div>
</div>
<div v-show="step == 'first'">
......@@ -326,12 +327,14 @@
import mapView from "@/components/mapView/index";
import autoButton from "@/components/auto-button/index";
import selectProduct from "./components/selectProduct";
import baseInfo from "./components/baseInfo";
export default {
name: "index",
components: {
mapView,
autoButton,
selectProduct
selectProduct,
baseInfo
},
data() {
return {
......@@ -449,7 +452,7 @@ export default {
//下一步
handleNext() {
const pm1 = new Promise((resolve, reject) => {
this.$refs.baseForm.validate((valid) => {
this.$refs.baseInfoForm.$refs.baseForm.validate((valid) => {
if (valid) resolve();
});
});
......@@ -466,7 +469,7 @@ export default {
if (params.businessScope) {
params.businessScope = params.businessScope.join(",");
}
params.merchantBrand = this.$refs.brandTree.getCheckedKeys().join(",");
params.merchantBrand = this.$refs.baseInfoForm.$refs.brandTree.getCheckedKeys().join(",");
params.isloginName ? (params.isloginName = 1) : (params.isloginName = 0);
let businessScopeCustomize = this.businessScopeCustomize.map((item) => item.name);
params.businessScopeCustomize = businessScopeCustomize.join(",");
......@@ -540,7 +543,7 @@ export default {
for (let i in merchantBrand) {
merchantBrand[i] = parseInt(merchantBrand[i]);
}
this.$refs.brandTree.setCheckedKeys(merchantBrand);
this.$refs.baseInfoForm.$refs.brandTree.setCheckedKeys(merchantBrand);
});
},
getCarbrandTree() {
......
<template>
<div class="scrm-main">
<div class="form-header">
<el-button type="primary" @click="handleSearch" size="small" icon="el-icon-link"
>门店账户关联企微</el-button
>
</div>
<div class="form-header">
<el-button type="primary" @click="handleContact" size="small" icon="el-icon-link"
>门店账户关联企微</el-button
>
</div>
<div class="follow-form">
<el-form :inline="true" :model="searchForm" class="follow-form-item" label-width="80px">
<el-form
:inline="true"
:model="searchForm"
class="follow-form-item"
label-width="80px"
>
<el-row>
<el-form-item size="small" label="关联企微">
<el-select v-model="searchForm.isRelevance" placeholder="请选择">
<el-select v-model="searchForm.isRelevance" placeholder="请选择">
<el-option
v-for="item in optionsContact"
:key="item.value"
......@@ -18,8 +23,13 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item class="merchant-row" size="small">
<el-input size="small" v-model="searchForm.merchantLoginAccount" placeholder="请输入" v-if="searchForm.accountOrPhone == 1">
<el-form-item class="merchant-row" size="small">
<el-input
size="small"
v-model="searchForm.merchantLoginAccount"
placeholder="请输入"
v-if="searchForm.accountOrPhone == 1"
>
<el-select
size="small"
v-model="searchForm.accountOrPhone"
......@@ -30,7 +40,12 @@
<el-option label="手机号" :value="2"></el-option>
</el-select>
</el-input>
<el-input size="small" v-model="searchForm.merchantLegalPersonPhone" placeholder="请输入" v-if="searchForm.accountOrPhone == 2">
<el-input
size="small"
v-model="searchForm.merchantLegalPersonPhone"
placeholder="请输入"
v-if="searchForm.accountOrPhone == 2"
>
<el-select
size="small"
v-model="searchForm.accountOrPhone"
......@@ -75,7 +90,7 @@
placeholder="请输入商户名称/关联的企业微信名"
></el-input>
</el-form-item>
<el-form-item size="small" style="float:right">
<el-form-item size="small" style="float: right">
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-row>
......@@ -100,8 +115,16 @@
</div>
<template slot="auth-button" slot-scope="scope" :data="scope.scope">
<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="handleAdd(scope.scope)" v-if="scope.scope.status == 2 && $globalState.session.accountLevel != 4"
<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 && $globalState.session.accountLevel != 4"
>创建子商户/门店</el-button
>
</template>
......@@ -157,6 +180,9 @@ export default {
{
label: "关联的企业微信",
prop: "entmicroName",
formatter: (cellValue) => {
return cellValue.entmicroName ? cellValue.entmicroName : "--";
},
},
{
label: "账户类型",
......@@ -184,6 +210,9 @@ export default {
{
label: "联系人",
prop: "merchantLegalPerson",
formatter: (cellValue) => {
return cellValue.merchantLegalPerson ? cellValue.merchantLegalPerson : "--";
},
},
{
label: "手机号",
......@@ -198,14 +227,17 @@ export default {
};
},
methods: {
handleContact() {
this.$router.push("/baseInfo/relevance/");
},
handleLook(scope) {
this.$router.push("/account/detailAccount/"+scope.id);
this.$router.push("/account/detailAccount/" + scope.id);
},
handleEdit(scope) {
this.$router.push("/account/editAccount/"+scope.id);
this.$router.push("/account/editAccount/" + scope.id);
},
handleAdd(scope) {
this.$router.push("/account/addAccount/"+scope.id);
this.$router.push("/account/addAccount/" + scope.id);
},
findAllDictData(dictType) {
var params = {
......
......@@ -20,7 +20,7 @@
<div class="tittle1 text_w">门店名称</div>
<div class="tittle2 text_w">有效期</div>
</div>
<div class="line_body">
<div class="line_body" :style="{height: tableHeight+ 'px'}">
<template v-if="list.length">
<div v-for="(item, index) in list" :key="index" class="line_wrapper">
<div class="tittle">{{ index + 1 }}</div>
......@@ -66,9 +66,16 @@
<script>
export default {
name: '',
props: {
list: Array,
bloc: null
},
data() {
return {
curOpenIndex: 0,
tableHeight: 0,
dataList: [],
leftData: [],
rightData: [],
......@@ -88,10 +95,7 @@ export default {
isOpen: false
}
},
props: {
list: Array,
bloc: null
},
methods: {
// changeLeftOpenStatus(item, index) {
// this.leftData[index].open = !item.open
......@@ -116,9 +120,14 @@ export default {
// console.log(right)
// }
},
mounted() {}
}
</script>
mounted() {
let clientHeight = document.documentElement.clientHeight;
this.tableHeight = clientHeight - 475;
}
};
</script>
<style lang="scss" scoped>
.bloc-info-module {
box-sizing: border-box;
......@@ -167,10 +176,6 @@ export default {
height: 0;
// transition: height 0.1s ease-in-out;
}
.table_wrapper_open {
height: 378px;
// transition: height 0.1s ease-in-out;
}
.line_wrapper {
width: 100%;
min-height: 54px;
......@@ -211,7 +216,6 @@ export default {
}
.line_body {
width: 100%;
height: 324px;
overflow-y: auto;
overflow-x: hidden;
}
......
......@@ -40,9 +40,12 @@
</div>
</div>
<div style="height: 64px"></div>
<div class="fixed-footer">
<div class="fixed-footer" :style="{
left: footerLeft + 'px',
width: footerWidth + 'px',
}">
<div :style="{ width: customWidth + 'px' }" class="btn-custom" @click="closeCurRouter">取消</div>
<div style="width: 40px"></div>
<div style="width: 20px"></div>
<div :style="{ width: customWidth + 'px' }" ref="btnWidth" class="btn-custom pruple" @click="handleMutiGL">确定关联({{ dataList.length }})</div>
</div>
</div>
......@@ -51,6 +54,7 @@
<script>
export default {
name: '',
data() {
return {
departmentList: [],
......@@ -89,11 +93,7 @@ export default {
selectedDepartment: ''
}
},
created() {
this.getDepartmentList()
this.getMerchantList()
},
mounted() {},
methods: {
// 设置底部按钮宽度
setBtnWidth() {
......@@ -270,9 +270,20 @@ export default {
return arr1
}
},
created() {
this.getDepartmentList()
this.getMerchantList()
},
mounted() {
this.footerLeft = document.querySelector(".base-container-right").offsetLeft;
this.footerWidth = document.documentElement.clientWidth - this.footerLeft;
}
}
</script>
};
</script>
<style lang="scss" scoped>
.gl-page {
box-sizing: border-box;
......@@ -319,7 +330,7 @@ export default {
}
.tbale-wrapper {
width: 100%;
height: 590px;
min-height: 200px;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
box-sizing: border-box;
......@@ -358,7 +369,7 @@ export default {
border-radius: 4px;
cursor: pointer;
text-align: center;
padding: 8px 0;
padding: 12px 0;
}
.pruple {
background: #5850ff;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!