diff --git a/src/router/modules/merchant.js b/src/router/modules/merchant.js index ba211cb..0db3dfb 100644 --- a/src/router/modules/merchant.js +++ b/src/router/modules/merchant.js @@ -10,126 +10,135 @@ import Layout from '@/layout' import { roterPre } from '@/settings' const merchantRouter = +{ + path: `${roterPre}/merchant`, + name: 'merchant', + meta: { + icon: 'dashboard', + title: '商户管理' + }, + alwaysShow: true, + component: Layout, + children: [ { - path: `${roterPre}/merchant`, - name: 'merchant', + path: 'system', + name: 'MerchantSystem', meta: { - icon: 'dashboard', - title: '商户管理' + title: '商户权限管理', + noCache: true }, - alwaysShow: true, - component: Layout, - children: [ - { - path: 'system', - name: 'MerchantSystem', - meta: { - title: '商户权限管理', - noCache: true - }, - component: () => import('@/views/merchant/system/index') - }, - { - path: 'list', - name: 'MerchantList', - meta: { - title: '商户列表', - noCache: true - }, - component: () => import('@/views/merchant/list/index') - }, - { - path: 'list/reconciliation/:id/:type?', - name: 'MerchantRecord', - component: () => import('@/views/merchant/list/record'), - meta: { - title: '商户对账', - noCache: true, - activeMenu: `${roterPre}/merchant/list` - }, - hidden: true - }, - { - path: 'classify', - name: 'MerchantClassify', - meta: { - title: '商户分类', - noCache: true - }, - component: () => import('@/views/merchant/classify') - }, - { - path: 'application', - name: 'MerchantApplication', - meta: { - title: '商户申请', - noCache: true - }, - component: () => import('@/views/merchant/application') - }, - { - path: 'agree', - name: 'MerchantAgreement', - meta: { - title: '入驻协议', - noCache: true - }, - component: () => import('@/views/merchant/agreement') - }, - { - path: 'type', - name: 'storeType', - meta: { - title: '店铺类型', - noCache: true - }, - component: () => import('@/views/merchant/type/index') - }, - { - path: 'applyMents', - name: 'MerchantApplyMents', - meta: { - title: '服务申请', - noCache: true - }, - component: () => import('@/views/merchant/applyments/index') - }, - { - path: 'applyList', - name: 'ApplyList', - meta: { - title: '分账商户列表' - }, - component: () => import('@/views/merchant/applyments/list') - }, - { - path: 'type/description', - name: 'MerTypeDesc', - meta: { - title: '店铺类型说明', - noCache: true - }, - component: () => import('@/views/merchant/type/description') - }, - { - path: 'deposit_list', - name: 'DepositList', - meta: { - title: '店铺保证金管理', - noCache: true - }, - component: () => import('@/views/merchant/deposit/index') - }, - { - path: 'recharge_record', - name: 'RechargeRecord', - meta: { - title: '商户充值记录', - noCache: true - }, - component: () => import('@/views/merchant/rechargeRecord/index') - }, - ] - } + component: () => import('@/views/merchant/system/index') + }, + { + path: 'list', + name: 'MerchantList', + meta: { + title: '商户列表', + noCache: true + }, + component: () => import('@/views/merchant/list/index') + }, + { + path: 'list/reconciliation/:id/:type?', + name: 'MerchantRecord', + component: () => import('@/views/merchant/list/record'), + meta: { + title: '商户对账', + noCache: true, + activeMenu: `${roterPre}/merchant/list` + }, + hidden: true + }, + { + path: 'classify', + name: 'MerchantClassify', + meta: { + title: '商户分类', + noCache: true + }, + component: () => import('@/views/merchant/classify') + }, + { + path: 'application', + name: 'MerchantApplication', + meta: { + title: '商户申请', + noCache: true + }, + component: () => import('@/views/merchant/application') + }, + { + path: 'open', + name: 'MerchantOpen', + meta: { + title: '商户开通申请', + noCache: true + }, + component: () => import('@/views/merchant/open') + }, + { + path: 'agree', + name: 'MerchantAgreement', + meta: { + title: '入驻协议', + noCache: true + }, + component: () => import('@/views/merchant/agreement') + }, + { + path: 'type', + name: 'storeType', + meta: { + title: '店铺类型', + noCache: true + }, + component: () => import('@/views/merchant/type/index') + }, + { + path: 'applyMents', + name: 'MerchantApplyMents', + meta: { + title: '服务申请', + noCache: true + }, + component: () => import('@/views/merchant/applyments/index') + }, + { + path: 'applyList', + name: 'ApplyList', + meta: { + title: '分账商户列表' + }, + component: () => import('@/views/merchant/applyments/list') + }, + { + path: 'type/description', + name: 'MerTypeDesc', + meta: { + title: '店铺类型说明', + noCache: true + }, + component: () => import('@/views/merchant/type/description') + }, + { + path: 'deposit_list', + name: 'DepositList', + meta: { + title: '店铺保证金管理', + noCache: true + }, + component: () => import('@/views/merchant/deposit/index') + }, + { + path: 'recharge_record', + name: 'RechargeRecord', + meta: { + title: '商户充值记录', + noCache: true + }, + component: () => import('@/views/merchant/rechargeRecord/index') + }, + ] +} export default merchantRouter diff --git a/src/views/merchant/application/index.vue b/src/views/merchant/application/index.vue index efc2309..bf2b9a7 100644 --- a/src/views/merchant/application/index.vue +++ b/src/views/merchant/application/index.vue @@ -5,83 +5,34 @@
- - {{ itemn.text }} + + {{ + itemn.text }} - + - - {{ itemn.text }} + + {{ + itemn.text }} - - + + - - + + - + @@ -89,14 +40,8 @@
- + @@ -107,13 +52,8 @@ @@ -128,38 +68,17 @@
- +
@@ -212,7 +131,8 @@ export default { keyword: "", mer_intention_id: this.$route.query.id ? this.$route.query.id : "", category_id: "", - type_id: "" + type_id: "", + type: 1,//入驻申请 }, mer_id: this.$route.query.id ? this.$route.query.id : "", autoUpdate: true, @@ -221,7 +141,7 @@ export default { }, watch: { mer_id(newName, oldName) { - this.getList(""); + this.getList(""); } }, mounted() { @@ -251,19 +171,19 @@ export default { }, // 商户分类; getMerCategory() { - getMerCateApi().then(res => { - this.merCateList = res.data - }).catch(res => { - this.$message.error(res.message) - }) + getMerCateApi().then(res => { + this.merCateList = res.data + }).catch(res => { + this.$message.error(res.message) + }) }, /**获取店铺类型 */ - getStoreType(){ - getstoreTypeApi().then(res => { - this.storeType = res.data - }).catch(res => { - this.$message.error(res.message) - }) + getStoreType() { + getstoreTypeApi().then(res => { + this.storeType = res.data + }).catch(res => { + this.$message.error(res.message) + }) }, // 列表 getList(num) { diff --git a/src/views/merchant/list/index.vue b/src/views/merchant/list/index.vue index 6dc8f80..4658c9e 100644 --- a/src/views/merchant/list/index.vue +++ b/src/views/merchant/list/index.vue @@ -5,91 +5,35 @@
- - {{ itemn.text }} + + {{ + itemn.text }} - + - - - + + + - + - - + + - - + + @@ -107,43 +51,19 @@ :value="item.code" /> --> - - + + - - + +
- 添加商户 + 添加商户 - + - 登录 - 编辑 - 修改管理员密码 - 删除 - 设置第三方平台商品复制次数 + 登录 + 编辑 + 修改管理员密码 + 删除 + 设置第三方平台商品复制次数 - + - - + + - + - + - + - - - + + + - - + + - - + +
- - + + - - + +
- - + + - - + +
- - + +
- - + + - - + +
- - + + - - + + - - + + - + - +
- - + + - - + + - - + + - - + + - - + +
@@ -616,7 +284,7 @@ import SettingMer from "@/libs/settingMer"; import Cookies from "js-cookie"; export default { name: "MerchantList", - data () { + data() { return { add: true, // 添加商户弹出层 @@ -720,24 +388,24 @@ export default { }; }, - created () { + created() { this.getshopList(); }, - beforeMount () { }, - mounted () { + beforeMount() { }, + mounted() { this.getHeadNum(); this.getMerCategory(); this.getStoreType(); this.getList(""); }, methods: { - close (formName) { + close(formName) { this.resetForm(formName); }, - handleChange (value) { + handleChange(value) { // console.log(value); }, - async handleChange1 (value) { + async handleChange1(value) { console.log(value); const data = { area_code: value[0] }; const promise = await getShopAddressApi_two(data); @@ -749,7 +417,7 @@ export default { } console.log(this.form.info1); }, - async handleChange2 (value, ID) { + async handleChange2(value, ID) { console.log(value, ID); if (value !== value) { this.form.info2 = 0; @@ -762,7 +430,7 @@ export default { } this.form.options2 = promise.data; }, - handleChange3 (e, val) { + handleChange3(e, val) { // let id='' // for(let item of val){ // if(item.code==e){ @@ -788,17 +456,17 @@ export default { // this.form.street_id = this.form.info1[0] // this.form.village_id = id }, - open4 (err) { + open4(err) { this.$message.error(err); }, - open2 (sus) { + open2(sus) { this.$message({ message: sus, type: "success" }); }, //提交和重置 - submitForm (formName) { + submitForm(formName) { console.log("1------------------1"); this.$refs[formName].validate(async valid => { if (valid) { @@ -872,20 +540,20 @@ export default { }); }, //重置 - resetForm (formName) { + resetForm(formName) { this.$nextTick(() => { this.$refs[formName].resetFields(); }); // this.$refs[formName].resetFields(); }, //计数器 - handleChange (value) { + handleChange(value) { console.log(value); }, //获取商户分类 - getShopClassify () { }, + getShopClassify() { }, //获取商圈 - async getshopList () { + async getshopList() { const data = { city_code: "510500" }; const promise = await getShopAddressApi(data).then( res => { @@ -900,7 +568,7 @@ export default { } ); }, - onLogo (id) { + onLogo(id) { merchantLoginApi(id) .then(res => { Cookies.set("merchantToken", res.data.token); @@ -911,21 +579,21 @@ export default { }); }, // 选择时间 - selectChange (tab) { + selectChange(tab) { this.tableFrom.date = tab; this.timeVal = []; this.tableFrom.page = 1; this.getList(""); }, // 具体日期 - onchangeTime (e) { + onchangeTime(e) { this.timeVal = e; this.tableFrom.date = this.timeVal ? this.timeVal.join("-") : ""; this.tableFrom.page = 1; this.getList(""); }, // 获取开启商户数 - getHeadNum () { + getHeadNum() { merchantCountApi() .then(res => { this.headeNum[0]["count"] = res.data.valid; @@ -934,7 +602,7 @@ export default { .catch(res => { }); }, // 商户分类; - getMerCategory () { + getMerCategory() { getMerCateApi() .then(res => { this.merCateList = res.data; @@ -943,7 +611,7 @@ export default { this.$message.error(res.message); }); }, - getStoreType () { + getStoreType() { getstoreTypeApi() .then(res => { this.storeType = res.data; @@ -953,7 +621,7 @@ export default { }); }, // 列表 - getList (num) { + getList(num) { console.log(this.tableFrom); this.listLoading = true; this.tableFrom.page = num ? num : this.tableFrom.page; @@ -970,16 +638,16 @@ export default { this.$message.error(res.message); }); }, - pageChange (page) { + pageChange(page) { this.tableFrom.page = page; this.getList(""); }, - handleSizeChange (val) { + handleSizeChange(val) { this.tableFrom.limit = val; this.getList(1); }, // 修改状态 - onchangeIsShow (row) { + onchangeIsShow(row) { const title = row.is_best === 0 ? "是否开启推荐商户" : "是否关闭推荐商户"; this.$modalSure(title).then(() => { merchantStatuseApi(row.mer_id, row.is_best === 1 ? 0 : 1) @@ -993,7 +661,7 @@ export default { }); }, // 开启关闭 - onchangeIsClose (row) { + onchangeIsClose(row) { merchantIsCloseApi(row.mer_id, row.status === 1 ? 0 : 1) .then(({ message }) => { this.$message.success(message); @@ -1004,7 +672,7 @@ export default { }); }, // 添加 - onAdd () { + onAdd() { this.add = true; this.edit = 0; this.popFormVisible = true; @@ -1021,7 +689,7 @@ export default { // this.$modalForm(merchantCreateApi()).then(() => this.getList("")); }, // 编辑 - async onEdit (id) { + async onEdit(id) { //调用获取商圈 this.popFormVisible = true; //开启编辑表单 this.add = false; @@ -1050,7 +718,7 @@ export default { let val = []; val.push(res.geo_address.area_id); this.handleChange1(val); - this.form.info1 = res.geo_address.street_id; //code + this.form.info1 = res.geo_address.street_id ? Number(res.geo_address.street_id) : ''; //code this.form.info2 = res.geo_address.village_id; //id let vala = []; let ID = res.geo_address.street_id; @@ -1091,7 +759,7 @@ export default { // this.$modalForm(merchantUpdateApi(id)).then(() => this.getList("")); }, // 删除 - handleDelete (id) { + handleDelete(id) { this.$modalSure( "该商户下有相关数据信息,删除后不可恢复,您是否确定删除" ).then(() => { @@ -1107,16 +775,16 @@ export default { }); }, // 扣除保证金 - onDeduct (id) { + onDeduct(id) { this.$modalForm(marginDeductionForm(id)).then(() => this.getList("")); }, // 设置复制次数 - handleTimes (id) { + handleTimes(id) { this.$modalForm(changeCopyApi(id)).then(() => this.getList("")); }, // 修改密码表单 - onPassword (id) { + onPassword(id) { this.$modalForm(merchantPasswordApi(id)); } } @@ -1128,16 +796,20 @@ export default { margin-top: 0 !important; width: 840px; } + .mer_phone { width: 400px; // float: left; } + .dis { display: flex; } + .switch_btn { display: flex; flex-wrap: wrap; + .mini_btn { width: 390px !important; } diff --git a/src/views/merchant/open/index.vue b/src/views/merchant/open/index.vue new file mode 100644 index 0000000..d3a887c --- /dev/null +++ b/src/views/merchant/open/index.vue @@ -0,0 +1,248 @@ + + + + +