Commit 88e9ef9e by cwq0219

merge

2 parents e15c651c 8530a60c
{ {
"name": "home", "name": "account",
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"scripts": { "scripts": {
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
"core-js": "^3.4.4", "core-js": "^3.4.4",
"glsx-common": "^1.4.6", "glsx-common": "^1.4.6",
"vue": "^2.6.11", "vue": "^2.6.11",
"glsx-components": "^1.1.2",
"glsx-table": "^1.0.9",
"vue-amap": "^0.5.10" "vue-amap": "^0.5.10"
}, },
"devDependencies": { "devDependencies": {
......
...@@ -57,6 +57,18 @@ const staticRoutes = Object.freeze([{ ...@@ -57,6 +57,18 @@ const staticRoutes = Object.freeze([{
path: '/employee/detailEmployee/:id', path: '/employee/detailEmployee/:id',
meta: {}, meta: {},
component: resolve => require([`@/views/employee/detailEmployee.vue`], resolve) component: resolve => require([`@/views/employee/detailEmployee.vue`], resolve)
},
{
name: 'baseInfo',
path: '/baseInfo/index',
meta: {},
component: resolve => require([`@/views/baseInfo/index.vue`], resolve)
},
{
name: 'relevance',
path: '/baseInfo/relevance',
meta: {},
component: resolve => require([`@/views/baseInfo/relevance.vue`], resolve)
} }
]) ])
export default staticRoutes export default staticRoutes
\ No newline at end of file \ No newline at end of file
...@@ -29,4 +29,25 @@ util.checkisCard = function(card) { ...@@ -29,4 +29,25 @@ util.checkisCard = function(card) {
let myreg = /^(^\d{15}$)|(^\d{17}([0-9]|X)$)/; let myreg = /^(^\d{15}$)|(^\d{17}([0-9]|X)$)/;
return myreg.test(card); return myreg.test(card);
} }
util.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 (obj.hasOwnProperty(attr)) {
copy[attr] = util.deepClone(obj[attr])
}
}
return copy
}
throw new Error("Unable to clone obj! Its type isn't supported.")
}
export default util export default util
\ No newline at end of file \ No newline at end of file
...@@ -184,6 +184,7 @@ ...@@ -184,6 +184,7 @@
highlight-current highlight-current
:props="defaultProps" :props="defaultProps"
:filter-node-method="filterNode" :filter-node-method="filterNode"
@check="clickDeal"
> >
</el-tree> </el-tree>
</div> </div>
...@@ -288,6 +289,9 @@ export default { ...@@ -288,6 +289,9 @@ export default {
}, },
}, },
methods: { methods: {
clickDeal() {
this.$parent.editStatus = true;
},
filterNode(value, data) { filterNode(value, data) {
if (!value) return true; if (!value) return true;
return data.label.indexOf(value) !== -1; return data.label.indexOf(value) !== -1;
......
...@@ -13,29 +13,29 @@ ...@@ -13,29 +13,29 @@
<el-row> <el-row>
<el-col :span="14"> <el-col :span="14">
<span class="itemName">登录账户名:</span> <span class="itemName">登录账户名:</span>
<span class="itemValue">{{ firstPageObj.merchantLoginAccount }}</span> <span class="itemValue">{{ firstPageObj.merchantLoginAccount || '-' }}</span>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<span class="itemName itemNameCol2">账户等级:</span> <span class="itemName itemNameCol2">账户等级:</span>
<span class="itemValue">{{ firstPageObj.accountLevelName }}</span> <span class="itemValue">{{ firstPageObj.accountLevelName || '-' }}</span>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="14"> <el-col :span="14">
<span class="itemName">开通模式:</span> <span class="itemName">开通模式:</span>
<span class="itemValue">{{ firstPageObj.merchantModelName }}</span> <span class="itemValue">{{ firstPageObj.merchantModelName || '-' }}</span>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<span class="itemName itemNameCol2">账户状态:</span> <span class="itemName itemNameCol2">账户状态:</span>
<span class="itemValue"> <span class="itemValue">
{{ firstPageObj.statusName }} {{ firstPageObj.statusName || '-' }}
</span> </span>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="14"> <el-col :span="14">
<span class="itemName">关联企业微信名:</span> <span class="itemName">关联企业微信名:</span>
<span class="itemValue">{{ firstPageObj.entmicroName }}</span> <span class="itemValue">{{ firstPageObj.entmicroName || '-' }}</span>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<span class="itemName itemNameCol2">账户有效期:</span> <span class="itemName itemNameCol2">账户有效期:</span>
...@@ -86,23 +86,23 @@ ...@@ -86,23 +86,23 @@
<el-row> <el-row>
<el-col :span="14"> <el-col :span="14">
<span class="itemName">商户名称:</span> <span class="itemName">商户名称:</span>
<span class="itemValue">{{ firstPageObj.merchantName }}</span> <span class="itemValue">{{ firstPageObj.merchantName || '-' }}</span>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<span class="itemName itemNameCol2">简称:</span> <span class="itemName itemNameCol2">简称:</span>
<span class="itemValue"> <span class="itemValue">
{{ firstPageObj.merchantAbbreviation }} {{ firstPageObj.merchantAbbreviation || '-' }}
</span> </span>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="14"> <el-col :span="14">
<span class="itemName">商户类型:</span> <span class="itemName">商户类型:</span>
<span class="itemValue">{{ firstPageObj.merchantTypeName }}</span> <span class="itemValue">{{ firstPageObj.merchantTypeName || '-' }}</span>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<span class="itemName itemNameCol2">身份证:</span> <span class="itemName itemNameCol2">身份证:</span>
<span class="itemValue">{{ firstPageObj.merchantOrgcode }}</span> <span class="itemValue">{{ firstPageObj.merchantOrgcode || '-' }}</span>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
...@@ -110,28 +110,28 @@ ...@@ -110,28 +110,28 @@
<span class="itemName">地址:</span> <span class="itemName">地址:</span>
<span class="itemValue"> <span class="itemValue">
{{ firstPageObj.merchantAddress }} {{ firstPageObj.merchantAddress || '-' }}
</span> </span>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<span class="itemName itemNameCol2">联系人:</span> <span class="itemName itemNameCol2">联系人:</span>
<span class="itemValue">{{ firstPageObj.merchantLegalPerson }}</span> <span class="itemValue">{{ firstPageObj.merchantLegalPerson || '-' }}</span>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="14"> <el-col :span="14">
<span class="itemName">联系电话:</span> <span class="itemName">联系电话:</span>
<span class="itemValue">{{ firstPageObj.merchantLegalPersonPhone }}</span> <span class="itemValue">{{ firstPageObj.merchantLegalPersonPhone || '-' }}</span>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<span class="itemName itemNameCol2">营业范围:</span> <span class="itemName itemNameCol2">营业范围:</span>
<span class="itemValue">{{ firstPageObj.businessScopName }}</span> <span class="itemValue">{{ firstPageObj.businessScopName || '-' }}</span>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<span class="itemName">主营品牌:</span> <span class="itemName">主营品牌:</span>
<span class="itemValue">{{ firstPageObj.merchantBrandName }}</span> <span class="itemValue">{{ firstPageObj.merchantBrandName || '-' }}</span>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
......
...@@ -166,6 +166,7 @@ ...@@ -166,6 +166,7 @@
</template> </template>
<script> <script>
import util from "@/utils/util";
import mapView from "@/components/mapView/index"; import mapView from "@/components/mapView/index";
import autoButton from "@/components/auto-button/index"; import autoButton from "@/components/auto-button/index";
import selectProduct from "./components/selectProduct"; import selectProduct from "./components/selectProduct";
...@@ -181,6 +182,7 @@ export default { ...@@ -181,6 +182,7 @@ export default {
data() { data() {
return { return {
editStatus: false, editStatus: false,
detailFirst: {},
tabWidth: 0, tabWidth: 0,
editInfo: {}, editInfo: {},
pwdStatus: true, pwdStatus: true,
...@@ -254,6 +256,12 @@ export default { ...@@ -254,6 +256,12 @@ export default {
}, },
deep: true, deep: true,
}, },
accountInfoForm: {
handler() {
this.editStatus = true;
},
deep: true,
},
}, },
methods: { methods: {
hanleTab(status) { hanleTab(status) {
...@@ -267,12 +275,21 @@ export default { ...@@ -267,12 +275,21 @@ export default {
this.handleNext(status); this.handleNext(status);
}) })
.catch(() => { .catch(() => {
this.handleTabs(status); this.tabCancel(status);
}); });
} else { } else {
this.handleTabs(status); this.handleTabs(status);
} }
}, },
tabCancel(status) {
if (status == 2) {
this.$refs.productForm.resetView();
} else {
this.renderView(this.detailFirst);
this.pwdStatus = true;
}
this.handleTabs(status);
},
handleTabs(status) { handleTabs(status) {
this.editStatus = false; this.editStatus = false;
if (status == 1 && this.step == "second") { if (status == 1 && this.step == "second") {
...@@ -284,18 +301,10 @@ export default { ...@@ -284,18 +301,10 @@ export default {
this.tabWidth = 124; this.tabWidth = 124;
} }
}, },
filterNode(value, data) {
if (!value) return true;
return data.label.indexOf(value) !== -1;
},
getAddress() {
this.dialogMapVisible = false;
this.accountAddForm.merchantAddress = this.$refs.mapForm.address;
console.log(this.accountAddForm.merchantAddress);
},
handleCancel() { handleCancel() {
this.$router.push("/account/index"); this.$router.push("/account/index");
}, },
//保存
handleSave(status) { handleSave(status) {
if (this.$refs.productForm.getSelectInfo().length == 0) { if (this.$refs.productForm.getSelectInfo().length == 0) {
this.$message.error("请选择产品"); this.$message.error("请选择产品");
...@@ -359,12 +368,6 @@ export default { ...@@ -359,12 +368,6 @@ export default {
}); });
this.findMerchantDetail(); this.findMerchantDetail();
}, },
addBusinessScope() {
this.businessScopeCustomize.push({ name: "" });
},
removeBusinessScope(index) {
this.businessScopeCustomize.splice(index, 1);
},
async findMerchantDetail() { async findMerchantDetail() {
this.$apis.store this.$apis.store
.findMerchantDetail({ .findMerchantDetail({
...@@ -386,6 +389,11 @@ export default { ...@@ -386,6 +389,11 @@ export default {
}; };
} }
this.$refs.productForm.accountTypeSearchRequest(para, res.parentMerchant); this.$refs.productForm.accountTypeSearchRequest(para, res.parentMerchant);
this.detailFirst = util.deepClone(res);
this.renderView(res);
});
},
renderView(res) {
let { let {
isloginName, isloginName,
bussinessBegintime, bussinessBegintime,
...@@ -415,9 +423,7 @@ export default { ...@@ -415,9 +423,7 @@ export default {
this.accountInfoForm.merchantLoginAccount = merchantLoginAccount; this.accountInfoForm.merchantLoginAccount = merchantLoginAccount;
this.accountInfoForm.merchantLoginPassword = merchantLoginPassword; this.accountInfoForm.merchantLoginPassword = merchantLoginPassword;
this.accountTypes = accountTypes; this.accountTypes = accountTypes;
this.accountAddForm.businessScope = businessScope this.accountAddForm.businessScope = businessScope ? businessScope.split(",") : [];
? businessScope.split(",")
: [];
if (this.accountAddForm.businessScope.length > 0) { if (this.accountAddForm.businessScope.length > 0) {
for (let i in this.accountAddForm.businessScope) { for (let i in this.accountAddForm.businessScope) {
this.accountAddForm.businessScope[i] = parseInt( this.accountAddForm.businessScope[i] = parseInt(
...@@ -452,12 +458,10 @@ export default { ...@@ -452,12 +458,10 @@ export default {
}); });
} }
merchantBrand = merchantBrand ? merchantBrand.split(",") : []; merchantBrand = merchantBrand ? merchantBrand.split(",") : [];
if (merchantBrand && merchantBrand.length > 0) {
for (let i in merchantBrand) { for (let i in merchantBrand) {
merchantBrand[i] = parseInt(merchantBrand[i]); merchantBrand[i] = parseInt(merchantBrand[i]);
} }
this.$refs.baseInfoForm.$refs.brandTree.setCheckedKeys(merchantBrand); this.$refs.baseInfoForm.$refs.brandTree.setCheckedKeys(merchantBrand);
}
this.accountAddForm = Object.assign(this.accountAddForm, { this.accountAddForm = Object.assign(this.accountAddForm, {
isloginName: isloginName ? true : false, isloginName: isloginName ? true : false,
lat, lat,
...@@ -477,7 +481,6 @@ export default { ...@@ -477,7 +481,6 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.editStatus = false; this.editStatus = false;
}); });
});
}, },
getCarbrandTree() { getCarbrandTree() {
this.$apis.store.getCarbrandTree({}).then((res) => { this.$apis.store.getCarbrandTree({}).then((res) => {
...@@ -485,7 +488,6 @@ export default { ...@@ -485,7 +488,6 @@ export default {
}); });
}, },
}, },
mounted() { mounted() {
this.footerLeft = document.querySelector(".base-container-right").offsetLeft; this.footerLeft = document.querySelector(".base-container-right").offsetLeft;
this.footerWidth = document.documentElement.clientWidth - this.footerLeft; this.footerWidth = document.documentElement.clientWidth - this.footerLeft;
......
...@@ -156,13 +156,13 @@ export default { ...@@ -156,13 +156,13 @@ export default {
} }
let flag = false let flag = false
this.dataList.forEach(item => { this.dataList.forEach(item => {
if (item.departmentId == this.curGLData.departmentId && item.merchantId == this.curGLData.merchantId) { if (item.departmentId == this.curGLData.departmentId || item.merchantId == this.curGLData.merchantId) {
flag = true flag = true
} }
}) })
if (flag) { if (flag) {
this.$message({ this.$message({
message: '该关联已在列表当中', message: '此商户已经绑定,请勿重复绑定',
type: 'warning' type: 'warning'
}) })
return return
...@@ -233,7 +233,6 @@ export default { ...@@ -233,7 +233,6 @@ export default {
tempindex = index tempindex = index
} }
}) })
console.log(tempindex)
this.$confirm('此操作将删除该项, 是否继续?', '提示', { this.$confirm('此操作将删除该项, 是否继续?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
...@@ -248,10 +247,10 @@ export default { ...@@ -248,10 +247,10 @@ export default {
}) })
}) })
.catch(() => { .catch(() => {
this.$message({ // this.$message({
type: 'info', // type: 'info',
message: '已取消删除' // message: '已取消删除'
}) // })
}) })
}, },
// 递归:处理层级数组 // 递归:处理层级数组
...@@ -323,6 +322,9 @@ export default { ...@@ -323,6 +322,9 @@ export default {
text-align: right; text-align: right;
} }
} }
.sel-wrap /deep/ .el-cascader-node {
max-width: 250px!important;
}
.btn-wrap { .btn-wrap {
padding-left: 20px; padding-left: 20px;
padding-top: 40px; padding-top: 40px;
......
...@@ -11,13 +11,13 @@ ...@@ -11,13 +11,13 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="所属商户" prop="merchantName" v-if="pageType == 'edit'"> <el-form-item label="所属商户" prop="merchantName" v-if="pageType == 'edit'">
<el-input disabled style="width: 40%" v-model="ruleForm.merchantName"></el-input> <el-input size="small" disabled style="width: 40%" v-model="ruleForm.merchantName"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="角色名称" prop="roleName"> <el-form-item label="角色名称" prop="roleName">
<el-input style="width: 40%" v-model="ruleForm.roleName"></el-input> <el-input size="small" style="width: 40%" v-model="ruleForm.roleName"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="角色说明" prop="roleDesc"> <el-form-item label="角色说明" prop="roleDesc">
<el-input style="width: 40%" v-model="ruleForm.roleDesc"></el-input> <el-input size="small" style="width: 40%" v-model="ruleForm.roleDesc"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="角色权限" prop="roleRoot"> <el-form-item label="角色权限" prop="roleRoot">
<div class="custom_element"> <div class="custom_element">
...@@ -32,7 +32,10 @@ ...@@ -32,7 +32,10 @@
<SelectProduct ref="productFrom" :roleType="true" title=""></SelectProduct> <SelectProduct ref="productFrom" :roleType="true" title=""></SelectProduct>
</div> </div>
<div style="height: 84px"></div> <div style="height: 84px"></div>
<div class="fixed_bottom"> <div class="fixed_bottom" :style="{
left: footerLeft + 'px',
width: footerWidth + 'px',
}">
<el-button v-if="pageType == 'create'" type="primary" @click="toCreateRole(1)">草稿</el-button> <el-button v-if="pageType == 'create'" type="primary" @click="toCreateRole(1)">草稿</el-button>
<div class="wrap_driver"> <div class="wrap_driver">
<el-button type="primary" @click="toCreateRole(0)">确定</el-button> <el-button type="primary" @click="toCreateRole(0)">确定</el-button>
...@@ -91,6 +94,10 @@ export default { ...@@ -91,6 +94,10 @@ export default {
const { session } = this.$globalState const { session } = this.$globalState
this.accountLevel = session.accountLevel this.accountLevel = session.accountLevel
}, },
mounted(){
this.footerLeft = document.querySelector(".base-container-right").offsetLeft;
this.footerWidth = document.documentElement.clientWidth - this.footerLeft;
},
methods: { methods: {
// 获取角色信息 // 获取角色信息
getRoleData(id) { getRoleData(id) {
...@@ -235,17 +242,15 @@ export default { ...@@ -235,17 +242,15 @@ export default {
} }
.fixed_bottom { .fixed_bottom {
position: fixed; position: fixed;
left: 0;
right: 0;
bottom: 0;
// width: calc(100% - 60px);
width: 100%; width: 100%;
bottom: 0px;
height: 64px; height: 64px;
background: #ffffff;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
z-index: 20; background: #ffffff;
z-index: 999;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
.wrap_driver { .wrap_driver {
margin: 0 40px; margin: 0 40px;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!