Commit cb660fa3 by 杨北旺

Merge branch 'master' of 192.168.3.233:yangming/scrm-micro-config

2 parents 39dbd6e4 f53b7e3d
.DS_Store
node_modules
/dist
package-lock.json
# local env files
.env.local
.env.*.local
......
{
"name": "account",
"name": "home",
"version": "0.1.0",
"lockfileVersion": 1,
"requires": true,
......@@ -1974,6 +1974,7 @@
"version": "1.8.5",
"resolved": "https://registry.npmjs.org/async-validator/-/async-validator-1.8.5.tgz",
"integrity": "sha512-tXBM+1m056MAX0E8TL2iCjg8WvSyXu0Zc8LNtYqrVeyoL3+esHRZ4SieE9fKQyyU09uONjnMEjrNBMqT0mbvmA==",
"dev": true,
"requires": {
"babel-runtime": "6.x"
}
......@@ -2057,7 +2058,8 @@
"babel-helper-vue-jsx-merge-props": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz",
"integrity": "sha512-gsLiKK7Qrb7zYJNgiXKpXblxbV5ffSwR0f5whkPAaBAR4fhi6bwRZxX9wBlIc5M/v8CCkXUbXZL4N/nSE97cqg=="
"integrity": "sha512-gsLiKK7Qrb7zYJNgiXKpXblxbV5ffSwR0f5whkPAaBAR4fhi6bwRZxX9wBlIc5M/v8CCkXUbXZL4N/nSE97cqg==",
"dev": true
},
"babel-loader": {
"version": "8.0.6",
......@@ -2116,6 +2118,7 @@
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
"integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
"dev": true,
"requires": {
"core-js": "^2.4.0",
"regenerator-runtime": "^0.11.0"
......@@ -2124,12 +2127,14 @@
"core-js": {
"version": "2.6.11",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz",
"integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg=="
"integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==",
"dev": true
},
"regenerator-runtime": {
"version": "0.11.1",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
"integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg=="
"integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==",
"dev": true
}
}
},
......@@ -3713,7 +3718,8 @@
"deepmerge": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.2.tgz",
"integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ=="
"integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ==",
"dev": true
},
"default-gateway": {
"version": "5.0.5",
......@@ -4168,6 +4174,7 @@
"version": "2.15.6",
"resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.15.6.tgz",
"integrity": "sha512-rcYXEKd/j2G0AgficAOk1Zd1AsnHRkhmrK4yLHmNOiimU2JfsywgfKUjMoFuT6pQx0luhovj8lFjpE4Fnt58Iw==",
"dev": true,
"requires": {
"async-validator": "~1.8.1",
"babel-helper-vue-jsx-merge-props": "^2.0.0",
......@@ -5346,9 +5353,9 @@
}
},
"glsx-components": {
"version": "1.1.8",
"resolved": "https://registry.npmmirror.com/glsx-components/download/glsx-components-1.1.8.tgz",
"integrity": "sha512-jjo1EY6tknpi5depW9u4xD70TAUs+6Vyzsi3PJf0v3aONA6nILKxK7Yu5jRiz//CG/H7S+Fd6AnYVnJ+QoQFjQ==",
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/glsx-components/-/glsx-components-1.1.2.tgz",
"integrity": "sha512-UX2qmTqiOJqo+MEiXfkPs2Okv4R+gby1gaRWd5NR0/VECUJqiZtG2jZFrjCgctDjhu4MoUld9ML3hhLARYaepg==",
"dev": true,
"requires": {
"core-js": "^3.6.5",
......@@ -5359,28 +5366,12 @@
"dependencies": {
"core-js": {
"version": "3.19.1",
"resolved": "https://registry.npmmirror.com/core-js/download/core-js-3.19.1.tgz",
"integrity": "sha1-9vFzyuI+c6fYj6I7bp2jKSdsZkE=",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.19.1.tgz",
"integrity": "sha512-Tnc7E9iKd/b/ff7GFbhwPVzJzPztGrChB8X8GLqoYGdEOG8IpLnK1xPyo3ZoO3HsK6TodJS58VGPOxA+hLHQMg==",
"dev": true
}
}
},
"glsx-table": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/glsx-table/download/glsx-table-1.1.0.tgz",
"integrity": "sha1-rMn3yPkgwgmc5rydGJZXykySBNc=",
"requires": {
"element-ui": "^2.13.1",
"vue": "^2.6.12"
},
"dependencies": {
"vue": {
"version": "2.6.14",
"resolved": "https://registry.npmmirror.com/vue/download/vue-2.6.14.tgz",
"integrity": "sha1-5RqlJQJQ1Wmj+606ilpofWA24jU="
}
}
},
"graceful-fs": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz",
......@@ -7511,7 +7502,8 @@
"normalize-wheel": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz",
"integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU="
"integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU=",
"dev": true
},
"npm-run-path": {
"version": "2.0.2",
......@@ -9256,7 +9248,8 @@
"resize-observer-polyfill": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
"integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="
"integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==",
"dev": true
},
"resolve": {
"version": "1.14.1",
......@@ -10561,7 +10554,8 @@
"throttle-debounce": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-1.1.0.tgz",
"integrity": "sha512-XH8UiPCQcWNuk2LYePibW/4qL97+ZQ1AN3FNXwZRBNPPowo/NRU5fAlDCSNBJIYCKbioZfuYtMhG4quqoJhVzg=="
"integrity": "sha512-XH8UiPCQcWNuk2LYePibW/4qL97+ZQ1AN3FNXwZRBNPPowo/NRU5fAlDCSNBJIYCKbioZfuYtMhG4quqoJhVzg==",
"dev": true
},
"through": {
"version": "2.3.8",
......
......@@ -9,6 +9,7 @@
},
"dependencies": {
"axios": "^0.21.1",
"cnpm": "^7.1.0",
"core-js": "^3.4.4",
"glsx-common": "^1.4.6",
"glsx-components": "^1.1.8",
......@@ -33,8 +34,7 @@
"node-sass": "^4.14.1",
"prettier": "^1.19.1",
"sass-loader": "^8.0.0",
"vue-cli-plugin-element": "^1.0.1",
"vue-template-compiler": "^2.6.11"
"vue-cli-plugin-element": "^1.0.1"
},
"browserslist": [
"> 1%",
......
......@@ -531,4 +531,4 @@ export default {
z-index: 999;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
}
</style>
\ No newline at end of file
</style>
......@@ -397,7 +397,7 @@ export default {
// this.findPermissionsByMerId()
}
}
</script>
</script>
<style scoped lang="scss">
.account-body {
......
......@@ -6,21 +6,11 @@
>
</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-option
v-for="item in optionsContact"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
<el-option v-for="item in optionsContact" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item class="merchant-row" size="small">
......@@ -61,74 +51,34 @@
</el-form-item>
<el-form-item size="small" label="账户状态">
<el-select size="small" v-model="searchForm.status" placeholder="请选择">
<el-option
v-for="item in merchantStatus"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
></el-option>
<el-option v-for="item in merchantStatus" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue"></el-option>
</el-select>
</el-form-item>
</el-row>
<el-row>
<el-form-item size="small" label="账户等级">
<el-select
size="small"
v-model="searchForm.merchantAccountLevel"
placeholder="请选择"
>
<el-option
v-for="item in accountLevel"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
></el-option>
<el-select size="small" v-model="searchForm.merchantAccountLevel" placeholder="请选择">
<el-option v-for="item in accountLevel" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue"></el-option>
</el-select>
</el-form-item>
<el-form-item class="merchant-wx" size="small">
<el-input
size="small"
v-model="searchForm.merchantName"
placeholder="请输入商户名称/关联的企业微信名"
></el-input>
<el-input size="small" v-model="searchForm.merchantName" placeholder="请输入商户名称/关联的企业微信名"></el-input>
</el-form-item>
<el-form-item size="small" style="float: right">
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-row>
</el-form>
<GLTable
ref="table"
:layout="layout"
:tableData="tableData"
:tableTotal="tableTotal"
:pageConf="pageConf"
:tableParams="tableParams"
@refreshTable="handleSearch"
>
<GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch">
<div slot="accountTypeNames" slot-scope="scope">
<div
class="accountType-row"
v-for="(item, index) in scope.scope.accountTypeNames.split(',')"
:key="index"
>
<div class="accountType-row" v-for="(item, index) in scope.scope.accountTypeNames.split(',')" :key="index">
{{ item }}
</div>
</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 && scope.scope.merchantAccountLevel != 4"
>创建子商户/门店</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>
</template>
</GLTable>
</div>
......@@ -138,46 +88,46 @@
<script>
const optionsContact = [
{
value: "",
label: "全部",
value: '',
label: '全部'
},
{
value: "1",
label: "已关联",
value: '1',
label: '已关联'
},
{
value: "2",
label: "未关联",
},
];
value: '2',
label: '未关联'
}
]
export default {
name: "index",
name: 'index',
data() {
return {
drawer: false,
direction: "rtl",
direction: 'rtl',
searchForm: {
accountOrPhone: 1,
accountOrPhone: 1
},
optionsContact,
accountLevel: [],
accountType: [],
merchantStatus: [],
scope: {
scope: "",
scope: ''
},
pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "total" },
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 表格参数
tableParams: {
tableOption: {
width: "150px",
width: '150px'
},
mutiSelectName: "merchant",
mutiSelectName: 'merchant',
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
tableColumns: [
{
label: "商户名",
prop: "merchantName",
label: '商户名',
prop: 'merchantName'
},
{
label: "关联的企业微信",
......@@ -187,18 +137,18 @@ export default {
},
},
{
label: "账户类型",
prop: "accountTypeNames",
addHtml: "accountTypeNames",
label: '账户类型',
prop: 'accountTypeNames',
addHtml: 'accountTypeNames'
},
{
label: "登录账户",
prop: "merchantLoginAccount",
label: '登录账户',
prop: 'merchantLoginAccount'
},
{
label: "账户等级",
prop: "accountLevelName",
width: "80px",
label: '账户等级',
prop: 'accountLevelName',
width: '80px'
},
{
label: "上级商户",
......@@ -208,9 +158,9 @@ export default {
},
},
{
label: "账户状态",
prop: "statusName",
width: "80px",
label: '账户状态',
prop: 'statusName',
width: '80px'
},
{
label: "联系人",
......@@ -220,9 +170,9 @@ export default {
},
},
{
label: "手机号",
prop: "merchantLegalPersonPhone",
width: "120px",
label: '手机号',
prop: 'merchantLegalPersonPhone',
width: '120px'
},
{
label: "更新时间",
......@@ -230,72 +180,72 @@ export default {
},
],
},
layout: "sizes, prev, pager, next, jumper, ->, total",
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableData: [],
tableTotal: 0,
};
tableTotal: 0
}
},
methods: {
handleContact() {
this.$router.push("/baseInfo/relevance/");
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 = {
dictType,
};
this.$apis.store.findAllDictData(params).then((res) => {
dictType
}
this.$apis.store.findAllDictData(params).then(res => {
if (res) {
if (dictType == "account_level") {
this.accountLevel = [{ dictValue: "", dictLabel: "全部" }].concat(res);
}
if (dictType == "account_type") {
this.accountType = res;
if (dictType == 'account_type') {
this.accountType = res
}
if (dictType == "merchant_status") {
this.merchantStatus = [{ dictValue: "", dictLabel: "全部" }].concat(res);
}
}
});
})
},
beforeSearchFn() {
return new Promise((resolve) => {
return new Promise(resolve => {
// 调接口前,操作
resolve();
});
resolve()
})
},
handleSearch() {
var params = {
...JSON.parse(JSON.stringify(this.searchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum,
};
this.$apis.store.findMerchantByPage(params).then((res) => {
this.tableData = res.data;
this.tableTotal = res.count;
pageNum: this.$refs.table.page.pageNum
}
this.$apis.store.findMerchantByPage(params).then(res => {
this.tableData = res.data
this.tableTotal = res.count
if (res.data && res.data.length == []) {
this.$refs.table.setTableHeightFun();
this.$refs.table.setTableHeightFun()
}
});
},
})
}
},
mounted() {
this.handleSearch();
this.findAllDictData("account_level");
this.findAllDictData("account_type");
this.findAllDictData("merchant_status");
},
};
</script>
this.handleSearch()
this.findAllDictData('account_level')
this.findAllDictData('account_type')
this.findAllDictData('merchant_status')
}
}
</script>
<style scoped lang="scss">
.follow-form {
......@@ -309,7 +259,7 @@ export default {
position: relative;
padding-left: 15px;
&::before {
content: "";
content: '';
position: absolute;
width: 6px;
height: 6px;
......@@ -340,4 +290,4 @@ export default {
}
}
}
</style>
\ No newline at end of file
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!