Commit 88e9ef9e by cwq0219

merge

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