Commit 662355ef by 杨北旺

合并解决冲突

2 parents e2e6348d 9e08eb6c
......@@ -8,11 +8,13 @@
*/
import { http_common } from '@/main'
const pictureUpload = params => {
params.method = "glsx.accounts.biz.common.pictureUpload"
return http_common({
url: '/router?method=glsx.accounts.biz.common.pictureUpload',
method: 'POST',
data: params,
sign: true
sign: true,
noSignAttr: ['file']
})
}
export default {
......
......@@ -71,4 +71,4 @@ const getDetailLogApi = params => {
})
}
export { getListApi, getAllMerchantListApi, getRoleListApi, getAllDictApi, getMerchantTreeApi, getDetailInfoApi, getDetailLogApi }
export default { getListApi, getAllMerchantListApi, getRoleListApi, getAllDictApi, getMerchantTreeApi, getDetailInfoApi, getDetailLogApi }
......@@ -64,8 +64,16 @@ const updateMerchant = params => {
sign: true
})
}
//功能权限
const accountTypeSearchRequest = params => {
params.method = 'cn.com.glsx.merchants.merchant.accountTypeSearchRequest'
return http({
url: '/rop-merchants/router',
method: 'POST',
data: params,
sign: true
})
}
//功能权限
const findPermissionsByMerId = params => {
params.method = 'cn.com.glsx.merchants.merchant.findPermissionsByMerId'
return http({
......@@ -104,5 +112,6 @@ export default {
updateMerchant,
findPermissionsByMerId,
findMenuFunTreeByMerId,
updatePermissions
updatePermissions,
accountTypeSearchRequest
}
\ No newline at end of file
......@@ -89,6 +89,11 @@ export default {
.map-box {
position: relative;
width: 100%;
/deep/ {
.el-dialog__body {
padding: 20px 10px;
}
}
}
#container {
position: absolute;
......
......@@ -13,6 +13,7 @@ import './public-path'
// import 'glsx-components/dist/glsx-components.css'
import { start } from '@/setup'
import VueAMap from "vue-amap";
import filters from './utils/filters' //新增过滤器
Vue.use(VueAMap);
// 初始化vue-amap
VueAMap.initAMapApiLoader({
......@@ -28,4 +29,7 @@ export { bootstrap, mount, unmount }
from '@/setup'
export const http = params => Vue.prototype.$http(params)
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
export const http_config = params => Vue.prototype.$http_config(params)
Object.keys(filters).forEach(key => {
Vue.filter(key, filters[key]);
});
\ 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, request_config } = await fetchConfig(globalState.configSwitch)
const { response, request, sign, secret, request_common, request_config, sign_common } = await fetchConfig()
console.log(request)
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
......@@ -21,7 +21,7 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt
console.log(globalState)
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_common = new common.Http({ response, signWay: "md5", request: request_common, sign: sign_common, 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'] })
......
/**
* 省略多余字符,用...显示
* @param {String} value
* @param {number} len
*/
const ellipsis=(value, len)=> {
if (!value) return ''
if (value.length > len) {
return value.slice(0, len) + '...'
}
return value
}
//过滤器
/* eslint-disable */
const overThousandFilter = (val) => {
if(typeof(val)!='number'){
return false;
}
if (val < 1000) return val;
let a = val + "";
let b = a.split("");
b.splice(-3, 0, ",");
return b.join("");
};
//来源 value值转为对应label(来源)
const toLabel=(value)=> {
if (value!==0 && !value) {
return
}
let sourceList=JSON.parse(window.localStorage.getItem('sourceList'));
let curElement =sourceList.find(item => {
return item.value === value
})
return curElement.label
}
export default {
overThousandFilter,
toLabel,
ellipsis
};
......@@ -5,9 +5,14 @@
<span>创建子商户/门店</span>
</div>
<div class="account-body scrm-box-f">
<div class="form-title">企业基本信息</div>
<base-info ref="baseInfoForm" :brandData="brandData" :accountAddForm="accountAddForm" :businessScopeCustomize="businessScopeCustomize" :businessOption="businessOption"></base-info>
<base-info
ref="baseInfoForm"
:brandData="brandData"
:accountAddForm="accountAddForm"
:businessScopeCustomize="businessScopeCustomize"
:businessOption="businessOption"
></base-info>
<!-- <el-form
ref="baseForm"
:model="accountAddForm"
......@@ -306,7 +311,7 @@
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-col :span="16">
<div data-v-995a4ff0="" class="el-form-item is-required">
<label
for="merchantLoginAccount"
......@@ -338,9 +343,7 @@
<select-product
v-show="step == 2"
ref="productForm"
:parentId="parentId"
:pid="accountAddForm.parentId"
:accountlevel="accountDetail.merchantAccountLevel"
title="功能权限"
></select-product>
<div
class="footer-panel"
......@@ -379,7 +382,7 @@ export default {
mapView,
autoButton,
selectProduct,
baseInfo
baseInfo,
},
data() {
const validatePhone = (rule, value, callback) => {
......@@ -407,6 +410,7 @@ export default {
businessScopeCustomize: [{ name: "" }],
accountAddForm: {
status: 1,
merchantFiles: [],
merchantType: 1,
businessScope: [],
parentId: "",
......@@ -549,13 +553,16 @@ export default {
if (params.businessScope) {
params.businessScope = params.businessScope.join(",");
}
console.log(this.$refs.baseInfoForm)
params.merchantBrand = this.$refs.baseInfoForm.$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);
params.businessScopeCustomize = businessScopeCustomize.join(",");
params.accounttypeId = this.accounttypeId.join(",");
params.merchantFiles = JSON.stringify(params.merchantFiles)
let merchant;
if (this.nextStatus) {
merchant = "updateMerchant";
......@@ -570,7 +577,12 @@ export default {
this.nextStatus = true;
if (typeof res == "number") {
this.parentId = res;
this.$refs.productForm.findMenuFunTreeByMerId();
let para = {
accountlevel: this.accountDetail.merchantAccountLevel,
id: this.parentId,
parentId: this.accountAddForm.parentId,
};
this.$refs.productForm.findMenuFunTreeByMerId(para);
}
this.twoMerchantDetail(this.parentId);
}
......@@ -583,9 +595,6 @@ export default {
};
this.$apis.store.findAllDictData(params).then((res) => {
if (res) {
if (dictType == "account_level") {
this.accountLevel = res;
}
if (dictType == "business_scope") {
this.businessOption = res;
}
......@@ -602,6 +611,16 @@ export default {
this.accountDetail = await this.$apis.store.findMerchantDetail({
id: this.accountAddForm.parentId,
});
this.$apis.store.findAllDictData({ dictType: "account_level" }).then((res) => {
this.accountLevel = res
// if (this.accountDetail.merchantAccountLevel == 1) {
// this.accountLevel = res.filter((item) => {
// item.dictValue != 1 && item.dictValue != 3;
// });
// console.log
// this.accountDetail.merchantAccountLevel = 2;
// }
});
},
twoMerchantDetail(pid) {
this.$apis.store
......@@ -625,7 +644,6 @@ export default {
this.accountAddForm.parentId = this.$route.params.id;
this.findMerchantDetail();
this.getCarbrandTree();
this.findAllDictData("account_level");
this.findAllDictData("business_scope");
},
};
......
......@@ -275,7 +275,7 @@ export default {
label: "label",
},
dialogMapVisible: false,
mapHeight: 300,
mapHeight: 380,
baseRules: {
merchantName: [{ required: true, message: "请输入商户名称", trigger: "blur" }],
merchantLegalPersonPhone: [
......@@ -288,8 +288,15 @@ export default {
methods: {
getAddress() {
if(!this.$refs.mapForm.address) {
this.$message.error("请选择地址");
return;
}
this.dialogMapVisible = false;
this.accountAddForm.merchantAddress = this.$refs.mapForm.address;
let lnglat = this.$refs.mapForm.lnglat
this.accountAddForm.lat = lnglat.lat
this.accountAddForm.lng = lnglat.lng
},
delImg(index) {
this.accountAddForm.merchantFiles.splice(index, 1);
......@@ -321,7 +328,7 @@ export default {
console.log(file);
let type = fileName.split(".")[1];
let imgUrl = img.target.result.split(",")[1];
self.loadingImg = true;
// self.loadingImg = true;
self.$apis.common
.pictureUpload({
file: `${type}@${imgUrl}`,
......@@ -330,7 +337,9 @@ export default {
if (res) {
self.accountAddForm.merchantFiles.push({
fileUrl: res,
fileName: ''
});
console.log(self.accountAddForm.merchantFiles)
}
});
};
......
......@@ -131,6 +131,7 @@ export default {
this.$nextTick(() => {
this.addStyle();
});
console.log(this.tabMenu);
this.accountTypes = tabMenu.map((item) => {
return {
products: null,
......@@ -162,6 +163,7 @@ export default {
this.$nextTick(() => {
this.addStyle();
});
console.log(this.tabMenu);
this.accountTypes = tabMenu.map((item) => {
return {
products: null,
......
......@@ -60,7 +60,7 @@
</div>
</div>
<div class="content">
<div class="subTitleWrap">
<div class="subTitleWrap" v-if="products.length > 0">
<div class="subTitle" :class="{ acitveSubTitle: subCurrentIndex == sindex }" v-for="(ele, sindex) in products" :key="sindex" @click="powerSubTabClick(sindex)">
{{ ele.productName }}
</div>
......@@ -164,7 +164,14 @@
<el-button type="primary" size="small" @click="filterTreeListFun">查询</el-button>
</div>
<div class="secondTreeWrap">
<el-tree ref="tree" :default-expanded-keys="expandedIds" :data="secondTreeList" node-key="id" :filter-node-method="filterNode"></el-tree>
<el-tree ref="tree" :default-expanded-keys="expandedIds" :data="secondTreeList" node-key="id" :filter-node-method="filterNode">
<!--知识点过长处理,鼠标悬浮文字弹框显示全部内容-->
<span slot-scope="{ node }" class="custom-tree-node">
<el-tooltip class="item" effect="dark" :content="node.label" placement="top-start">
<span>{{ node.label | ellipsis(20) }}</span>
</el-tooltip>
</span>
</el-tree>
</div>
<!-- <form class="layui-form" action="">
<div class="layui-inline">
......@@ -292,7 +299,7 @@ export default {
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
// layout: 'sizes, prev, pager, next, jumper, ->, total',
tableTotal: 0,
merchantId: 58 //this.$route.params.id //需要从外面传进来
merchantId: this.$route.params.id //this.$route.params.id //需要从外面传进来
}
},
computed: {
......@@ -577,8 +584,10 @@ export default {
}
.contentTree {
padding: 20px;
min-height: 250px;
max-height: 250px;
position: relative;
overflow: auto;
.noDataContent {
width: 64px;
height: 64px;
......
......@@ -54,7 +54,7 @@
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-col :span="16">
<el-form-item label="账户类型">
<auto-button
v-for="(item, index) in accountTypes"
......@@ -63,9 +63,7 @@
:btnValue="item.accounttypeId"
stopClick="true"
:typeStatus="
accounttypeId.indexOf(item.accounttypeId) == -1
? true
: false
accounttypeId.indexOf(item.accounttypeId) == -1 ? true : false
"
></auto-button>
</el-form-item>
......@@ -310,7 +308,7 @@
</div>
</div>
<div v-show="step == 'first'">
<select-product></select-product>
<select-product title="功能权限" ref="productForm"></select-product>
</div>
<div
class="footer-panel"
......@@ -319,8 +317,12 @@
width: footerWidth + 'px',
}"
>
<el-button type="primary" @click="handleSave" v-show="step == 'first'">确定</el-button>
<el-button type="primary" @click="handleNext" v-show="step == 'second'">确定</el-button>
<el-button type="primary" @click="handleSave" v-show="step == 'first'"
>确定</el-button
>
<el-button type="primary" @click="handleNext" v-show="step == 'second'"
>确定</el-button
>
<el-button type="primary" @click="handleCancel">取消</el-button>
</div>
<el-dialog :visible.sync="dialogMapVisible" width="60%">
......@@ -348,6 +350,7 @@ export default {
},
data() {
return {
editInfo: {},
pwdStatus: true,
step: "first",
filterText: "",
......@@ -466,7 +469,7 @@ export default {
handleCancel() {
this.$router.push("/account/index");
},
handleSave() {
handleSave() {
if (this.$refs.productForm.getSelectInfo().length == 0) {
this.$message.error("请选择产品");
return;
......@@ -475,7 +478,7 @@ export default {
let params = {
accountTypes,
status: 2,
merchantId: this.parentId,
merchantId: this.accountAddForm.id,
};
this.$apis.store.updatePermissions(params).then((res) => {
if (res) {
......@@ -509,6 +512,7 @@ export default {
params.isloginName ? (params.isloginName = 1) : (params.isloginName = 0);
let businessScopeCustomize = this.businessScopeCustomize.map((item) => item.name);
params.businessScopeCustomize = businessScopeCustomize.join(",");
params.merchantFiles = JSON.stringify(params.merchantFiles)
Promise.all([pm1, pm2]).then(() => {
this.$apis.store.updateMerchant(params).then((res) => {
if (res) {
......@@ -540,6 +544,21 @@ export default {
id: this.accountAddForm.id,
})
.then((res) => {
let para;
if(res.parentMerchant) {
para = {
id: this.accountAddForm.id,
parentId: res.parentId,
accountLevel: res.merchantAccountLevel,
};
}else {
para = {
ids: res.accountType,
merchantId: res.id,
accountLevel: res.merchantAccountLevel,
};
}
this.$refs.productForm.accountTypeSearchRequest(para,res.parentMerchant);
let {
isloginName,
bussinessBegintime,
......@@ -564,12 +583,12 @@ export default {
merchantFileResponses,
merchantModel,
accountTypes,
accounttypeId
accounttypeId,
} = res;
this.accountInfoForm.merchantLoginAccount = merchantLoginAccount;
this.accountInfoForm.merchantLoginPassword = merchantLoginPassword;
this.accountTypes = accountTypes;
businessScope = businessScope?businessScope.split(','): []
businessScope = businessScope ? businessScope.split(",") : [];
if (businessScope.length > 0) {
for (let i in this.accountAddForm.businessScope) {
this.accountAddForm.businessScope[i] = parseInt(
......@@ -578,7 +597,9 @@ export default {
}
}
this.accountAddForm.bussinessTime = [bussinessBegintime, bussinessEndtime];
businessScopeCustomize = businessScopeCustomize?businessScopeCustomize.split(','): []
businessScopeCustomize = businessScopeCustomize
? businessScopeCustomize.split(",")
: [];
if (businessScopeCustomize.length > 0) {
this.businessScopeCustomize = businessScopeCustomize.map((item) => {
return {
......@@ -586,7 +607,7 @@ export default {
};
});
}
accounttypeId = accounttypeId?accounttypeId.split(','): []
accounttypeId = accounttypeId ? accounttypeId.split(",") : [];
if (accounttypeId.length > 0) {
this.accounttypeId = accounttypeId.map((item) => {
return {
......@@ -601,7 +622,7 @@ export default {
};
});
}
merchantBrand = merchantBrand?merchantBrand.split(','): []
merchantBrand = merchantBrand ? merchantBrand.split(",") : [];
if (merchantBrand && merchantBrand.length > 0) {
for (let i in merchantBrand) {
merchantBrand[i] = parseInt(merchantBrand[i]);
......
......@@ -17,7 +17,6 @@
</template>
<script>
import { getAllMerchantListApi } from '@/api/modules/employee'
export default {
name: 'selectPage',
data() {
......@@ -85,7 +84,7 @@ export default {
this.currList = this.allMerchantList.slice((this.page.pageNum - 1) * this.page.pageSize, this.page.pageNum * this.page.pageSize)
},
getAllMerchantList() {
getAllMerchantListApi({}).then(res => {
this.$apis.employee.getAllMerchantListApi({}).then(res => {
this.allMerchantList = res
this.page.total = res.length
this.page.totalPage = Math.ceil(res.length / this.page.pageSize)
......
......@@ -16,7 +16,7 @@
</template>
<script>
import { getDetailInfoApi } from '@/api/modules/employee'
// import { getDetailInfoApi } from '@/api/modules/employee'
export default {
name: 'info',
data() {
......@@ -57,7 +57,7 @@ export default {
methods: {
getInfo() {
getDetailInfoApi({ id: this.id }).then(res => {
this.$apis.employee.getDetailInfoApi({ id: this.id }).then(res => {
console.log(res)
this.info = res
})
......
......@@ -15,14 +15,14 @@
</template>
<script>
import { getDetailLogApi } from '@/api/modules/employee'
// import { getDetailLogApi } from '@/api/modules/employee'
export default {
name: 'record',
data() {
return {
searchForm: {},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
getListApi: getDetailLogApi,
getListApi: this.$apis.employee.getDetailLogApi,
tableParams: {
listName: 'data',
tableColumns: [
......
......@@ -12,7 +12,7 @@
</template>
<template slot="visibleInferiorMer" slot-scope="item">
<el-input :style="{ width: item.width || '360px' }" placeholder="可见商户" v-model="filterText"></el-input>
<el-tree show-checkbox check-on-click-node check-strictly class="filter-tree" :data="baseData.merchantTree" :props="defaultProps" default-expand-all :filter-node-method="filterNode" ref="tree" @check="handleClickNode"></el-tree>
<el-tree show-checkbox check-on-click-node check-strictly class="filter-tree" node-key="id" :data="baseData.merchantTree" :props="defaultProps" default-expand-all :filter-node-method="filterNode" ref="tree" @check="handleClickNode"></el-tree>
</template>
</glsx-combi-form>
</div>
......@@ -27,7 +27,7 @@
import { utils } from 'glsx-common'
import selectPage from './components/selectPage'
import glsxCombiForm from './glsx-combi-form'
import { getAllMerchantListApi, getRoleListApi, getMerchantTreeApi } from '@/api/modules/employee'
// import { getAllMerchantListApi, getRoleListApi, getMerchantTreeApi } from '@/api/modules/employee'
export default {
name: 'editEmployee',
data() {
......@@ -60,7 +60,8 @@ export default {
password: '',
visibleInferiorMer: '',
roleId: '',
merhcnatImg: ''
merhcnatImg: '',
fileName: ''
},
editRule: {
merchantId: [{ required: true, message: '请选择所属商户', trigger: 'change' }],
......@@ -126,11 +127,18 @@ export default {
name: 'merhcnatImg',
type: 'upload',
maxPhotoNum: 1,
wdithLt: 800,
heightLt: 640,
// wdithLt: 800,
// heightLt: 640,
noPixel: true,
handleUpload: (e, file, targetItem) => {
const imgFile = e.target.result
const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
this.$apis.common.pictureUpload({ file: base64}).then((res) => {
if (res) {
console.log(res)
// fileName
}
})
// uploadImg({ file: base64, fileType: 'image' }).then(res => {
// this.editForm[targetItem.name] = res
// this.$refs.editFormRef.$refs[this.editChildRef].validateField(targetItem.name)
......@@ -176,29 +184,49 @@ export default {
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.routeInfo = this.$route.params
this.getAllMerchantList()
this.routeInfo.addOrEdit != 1 ? this.getInfo() : ''
},
methods: {
getAllMerchantList() {
getAllMerchantListApi({}).then(res => {
this.$apis.employee.getAllMerchantListApi({}).then(res => {
this.baseData.allMerchantList = res
})
},
handleChangeMerchant(e) {
console.log(e)
this.editForm.roleId = ''
this.editForm.visibleInferiorMer = ''
getInfo() {
this.$apis.employee.getDetailInfoApi({ id: this.routeInfo.id }).then(res => {
this.editForm = res
this.editForm.roleId = res.roleIds[0]
if (res.merchantFileResponse) {
this.editForm.merhcnatImg = res.merchantFileResponse.fileUrl
this.editForm.fileName = res.merchantFileResponse.fileName
}
console.log(this.editForm)
this.handleChangeMerchant(this.editForm.merchantId, true)
})
},
handleChangeMerchant(e, editRecovery = false) {
// console.log(e)
if (!editRecovery) {
this.editForm.roleId = ''
this.editForm.visibleInferiorMer = ''
}
if (!e) {
this.baseData.merchantTree = []
this.baseData.roleList = []
this.getOptionsList('editFormData', false, 'roleId')
}
this.getRoleList(e)
this.getMerchantTree(e)
this.getMerchantTree(e, editRecovery)
},
setCheckedTree() {
var checkedList = this.editForm.visibleInferiorMer.split(',').map(item => +item)
this.$refs.tree.setCheckedKeys(checkedList)
},
getMerchantTree(value) {
getMerchantTreeApi({ id: value }).then(res => {
getMerchantTree(value, editRecovery) {
this.$apis.employee.getMerchantTreeApi({ id: value }).then(res => {
this.baseData.merchantTree = res
editRecovery && this.setCheckedTree()
})
},
filterNode(value, data) {
......@@ -206,7 +234,7 @@ export default {
return data.label.indexOf(value) !== -1
},
getRoleList(value) {
getRoleListApi({ id: value }).then(res => {
this.$apis.employee.getRoleListApi({ id: value }).then(res => {
this.baseData.roleList = res
this.getOptionsList('editFormData', false, 'roleId')
})
......@@ -247,7 +275,13 @@ export default {
console.log(this.editForm)
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
this.editForm.roleIds = [this.editForm.roleId]
var params = this.$common.utils.deepClone(this.editForm)
// merchantFileRequest
params.roleIds = [this.editForm.roleId]
params.merchantFileRequest = {
fileName: this.editForm.fileName,
fileUrl: this.editForm.merhcnatImg
}
console.log(this.editForm)
this.handleCancel()
}
......@@ -272,7 +306,7 @@ export default {
padding: 20px;
}
.config-employee .p-rl-20 {
padding: 0 20px;
padding: 20px 20px 0;
}
.config-employee .flex {
display: flex;
......@@ -330,4 +364,7 @@ export default {
overflow: hidden;
text-overflow: ellipsis;
}
/* .config-employee .el-checkbox:last-of-type {
margin-right: 8px !important;
} */
</style>
......@@ -183,7 +183,7 @@ export default {
image.onload = () => {
var imgWidth = image.width
var imgHeight = image.height
if (imgWidth > wdithLt || imgHeight > heightLt) {
if (!targetItem.noPixel && ( imgWidth > wdithLt || imgHeight > heightLt)) {
this.$message.error('图片尺寸最大为' + wdithLt + '像素*' + heightLt + '像素')
} else {
targetItem.handleUpload(e, file, targetItem)
......@@ -207,9 +207,9 @@ export default {
/* .glsx-combi-form {
min-width: 922px;
} */
.glsx-combi-form .glsx-combi-form-block {
/* .glsx-combi-form .glsx-combi-form-block {
padding: 16px 40px 0;
}
} */
.glsx-combi-form .isBlock {
display: block;
}
......@@ -282,8 +282,8 @@ export default {
color: #999999;
}
.glsx-combi-form .img-w-h {
width: 88px;
height: 74px;
width: 80px;
height: 80px;
}
.glsx-combi-form .activity-img {
position: relative;
......@@ -322,8 +322,8 @@ export default {
display: none;
height: 100%;
position: absolute;
width: 88px;
height: 74px;
width: 80px;
height: 80px;
left: 0;
top: 0;
z-index: 2;
......
<!-- 员工管理 -->
<template>
<div class="config-employee">
<div class="config-employee employee-list">
<!-- <div class="container"> -->
<div style="margin: 16px 0;">
<el-button :size="size" type="primary" @click="handleEdit(1)">创建员工</el-button>
<el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">创建员工</el-button>
</div>
<!-- </div> -->
<div class="container">
......@@ -12,10 +12,10 @@
<template slot="merchantId" slot-scope="item">
<select-page :form="searchForm" width="200px" :targetItem="item.scope" @handleChange="handleChangeMerchant"></select-page>
</template>
<template slot="footer">
<span slot="footer" class="footer-btns">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="primary">导出</el-button>
</template>
</span>
</glsx-combi-form>
</div>
......@@ -34,7 +34,7 @@
<script>
import { utils } from 'glsx-common'
import { getListApi, getAllMerchantListApi, getRoleListApi, getAllDictApi } from '@/api/modules/employee'
// import { getListApi, getAllMerchantListApi, getRoleListApi, getAllDictApi } from '@/api/modules/employee'
import glsxCombiForm from './glsx-combi-form'
import selectPage from './components/selectPage'
export default {
......@@ -92,7 +92,7 @@ export default {
selectName: 'staffNameOrPhone',
isClear: true,
maxlength: 15,
inputWidth: '280px',
inputWidth: '320px',
selectWidth: '100px',
selectOption: [
{
......@@ -110,7 +110,7 @@ export default {
}
],
// 表格
getListApi: getListApi,
getListApi: this.$apis.employee.getListApi,
tableParams: {
listName: 'data',
tableOption: true,
......@@ -178,14 +178,14 @@ export default {
methods: {
getAllMerchantList() {
getAllMerchantListApi({}).then(res => {
this.$apis.employee.getAllMerchantListApi({}).then(res => {
this.baseData.allMerchantList = res
})
},
getBaseData() {
// 1.product(产品) 2.account_type(账户类型) 3.(functional_attributes) 功能属性 4.(owned_customer_group)所属客户群 5.channel渠道 6.account_level(商户层级)
return new Promise(resolve => {
Promise.all([getAllMerchantListApi({}), getAllDictApi({ dictType: 'staff_status' })]).then(([allMerchant, staffStatus]) => {
Promise.all([this.$apis.employee.getAllMerchantListApi({}), this.$apis.employee.getAllDictApi({ dictType: 'staff_status' })]).then(([allMerchant, staffStatus]) => {
this.baseData.allMerchantList = allMerchant
this.baseData.staffStatusList = staffStatus
resolve()
......@@ -223,7 +223,7 @@ export default {
this.baseData.roleList = []
this.getOptionsList('searchFormData', true, 'roleId')
value &&
getRoleListApi({ id: value }).then(res => {
this.$apis.employee.getRoleListApi({ id: value }).then(res => {
this.baseData.roleList = res
this.getOptionsList('searchFormData', true, 'roleId')
})
......@@ -284,6 +284,9 @@ export default {
.config-employee {
margin-bottom: 0;
}
.employee-list .footer-btns {
float: right;
}
.config-employee .container {
margin-top: 20px;
background: #ffffff;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!