Commit 41b609ef by cwq0219

菜单,全局样式,路由,我的分账

1 parent 2ce5893e
...@@ -329,7 +329,7 @@ ...@@ -329,7 +329,7 @@
overflow-y: scroll; overflow-y: scroll;
.d2-container-full__header { .d2-container-full__header {
// padding: 10px 10px; // padding: 10px 10px;
margin-bottom: 20px; // margin-bottom: 20px;
border-radius: 5px; border-radius: 5px;
} }
.d2-container-full__body { .d2-container-full__body {
...@@ -341,6 +341,7 @@ ...@@ -341,6 +341,7 @@
position: relative; position: relative;
.d2-container-content { .d2-container-content {
padding: 20px 40px; padding: 20px 40px;
margin-top: 20px;
} }
} }
.d2-container-full__footer { .d2-container-full__footer {
......
...@@ -340,8 +340,10 @@ ...@@ -340,8 +340,10 @@
background: $theme-container-header-footer-background-color; background: $theme-container-header-footer-background-color;
} }
.d2-container-full__body { .d2-container-full__body {
.d2-container-content {
background: $theme-container-background-color; background: $theme-container-background-color;
} }
}
.d2-container-full__footer { .d2-container-full__footer {
border-top: $theme-container-border-inner; border-top: $theme-container-border-inner;
background: $theme-container-header-footer-background-color; background: $theme-container-header-footer-background-color;
...@@ -358,8 +360,10 @@ ...@@ -358,8 +360,10 @@
background: $theme-container-header-footer-background-color; background: $theme-container-header-footer-background-color;
} }
.d2-container-full-bs__body { .d2-container-full-bs__body {
.d2-container-content {
background: $theme-container-background-color; background: $theme-container-background-color;
} }
}
.d2-container-full-bs__footer { .d2-container-full-bs__footer {
border-top: $theme-container-border-inner; border-top: $theme-container-border-inner;
background: $theme-container-header-footer-background-color; background: $theme-container-header-footer-background-color;
......
...@@ -53,6 +53,11 @@ ...@@ -53,6 +53,11 @@
:picker-options="pickerOption[item.pickerOptions]" :picker-options="pickerOption[item.pickerOptions]"
> >
</el-date-picker> </el-date-picker>
<slot
v-if="item.addHtml"
:name="item.addHtml"
:scope="item"
></slot>
</el-form-item> </el-form-item>
</el-col> </el-col>
<slot></slot> <slot></slot>
......
...@@ -14,7 +14,7 @@ export default { ...@@ -14,7 +14,7 @@ export default {
props: { collapse: this.asideCollapse, uniqueOpened: true, defaultActive: this.active }, props: { collapse: this.asideCollapse, uniqueOpened: true, defaultActive: this.active },
ref: 'menu', ref: 'menu',
on: { select: this.handleMenuSelect } on: { select: this.handleMenuSelect }
}, this.aside.map(menu => (menu.children === undefined ? elMenuItem : elSubmenu).call(this, createElement, menu))), }, this.aside.map(menu => ((menu.children === undefined || menu.children.every(i => i.sideHidden === true)) ? elMenuItem : elSubmenu).call(this, createElement, menu))),
...this.aside.length === 0 && !this.asideCollapse ? [ ...this.aside.length === 0 && !this.asideCollapse ? [
createElement('div', { attrs: { class: 'd2-layout-header-aside-menu-empty', flex: 'dir:top main:center cross:center' } }, [ createElement('div', { attrs: { class: 'd2-layout-header-aside-menu-empty', flex: 'dir:top main:center cross:center' } }, [
createElement('d2-icon', { props: { name: 'inbox' } }), createElement('d2-icon', { props: { name: 'inbox' } }),
......
...@@ -664,29 +664,31 @@ export const resources = { ...@@ -664,29 +664,31 @@ export const resources = {
}], }],
component: _import('systemConfig/serviceStore') component: _import('systemConfig/serviceStore')
}, },
'908': { '90801': {
path: '/myAccount', path: '/myAccount',
name: 'myAccount', name: 'myAccount',
icon: 's-tools', icon: 's-tools',
meta: { meta: {
title: '我的分账', title: '我的分账',
authId: '908', authId: '90801',
parentId: '1', parentId: '1',
cache: false cache: false
}, },
component: _import('account/myAccount') component: _import('account/myAccount')
}, },
'90801': { '90802': {
path: '/myAccount', path: '/myAccountRecord',
name: 'myAccount', name: 'myAccountRecord',
icon: 's-tools', icon: 's-tools',
meta: { meta: {
title: '我的分账', title: '提现记录',
authId: '90801', authId: '90802',
parentId: '908', parentId: '90801',
cache: false cache: false,
sideHidden: true,
activePath: '/myAccount'
}, },
component: _import('account/myAccount') component: _import('account/myAccountRecord')
} }
} }
......
<!-- 提现弹窗 -->
<template>
<d2-dialog
title="提现"
:isVisible.sync="cashVisible"
width="60%"
@confirmDialog="handleCashConfirm"
@closeDialog="handleCashClose"
>
<el-form
ref="cashDialog"
:model="cashForm"
:rules="cashRules"
label-width="120px"
>
<el-form-item label="可提现余额:">
<span>¥ 180000</span>
</el-form-item>
<el-form-item label="提现金额:">
<span>¥ 179998</span><span>注:每提现一笔会扣除2元手续费</span>
</el-form-item>
<el-form-item label="到账账户:">
<p>张三</p>
<p>中国银行(654646446446)<span>预计24小时内到账</span></p>
</el-form-item>
<el-form-item
label="验证码:"
prop="smsCode"
>
<el-input
v-model="cashForm.smsCode"
placeholder="请输入验证码"
style="width: 200px"
></el-input>
<el-button
type="primary"
size="small"
@click="handleSend"
:disabled="isSend"
class="cash-btn"
>{{isSend ? sendMsg + '秒后,重试' : '获取验证码'}}</el-button>
<p v-show="showtips">已向尾号为2345的手机号发送验证码,验证码5分钟内有效</p>
</el-form-item>
</el-form>
</d2-dialog>
</template>
<script>
import { sendSms } from '@api/merchant'
export default {
data() {
return {
cashRules: {
smsCode: [{ required: true, message: '请输入验证码', trigger: 'change' }]
},
// 验证码
showtips: false,
isSend: false,
sendMsg: '获取验证码',
time: ''
}
},
props: {
cashVisible: {
type: Boolean,
default: false
},
cashForm: {
type: Object,
default: () => { }
}
},
watch: {
cashVisible(newVal, val) {
newVal ? this.reset() : this.closeReset()
}
},
mounted() { },
methods: {
reset() {
this.$refs.cashDialog && this.$refs.cashDialog.resetFields()
},
closeReset() {
this.isSend = false
this.showtips = false
this.time && clearTimeout(this.time)
},
handleCashConfirm() {
this.$refs.cashDialog.validate(valid => {
if (valid) {
this.$emit('handleCashConfirm')
}
})
},
handleCashClose() {
this.$emit('handleCashClose')
},
handleSend() {
sendSms({}).then((res) => {
this.notice.okTips('已发送,5分钟内有效')
this.isSend = true
this.showtips = true
this.sendMsg = 60
this.msgDown()
})
},
msgDown() {
this.time = setTimeout(() => {
clearTimeout(this.time)
if (this.sendMsg > 1) {
--this.sendMsg
this.msgDown()
} else {
this.isSend = false
}
}, 1000)
}
}
}
</script>
<style scoped>
p {
margin: 0 0;
}
.cash-btn {
margin-left: 20px;
}
</style>
<!-- 我的分账 --> <!-- 我的分账 -->
<template> <template>
<div></div> <d2-container class="my-account">
<div
class="header"
slot="header"
>
<p class="header-balance">
可提现余额
<el-button
type="text"
size="mini"
class="balance-btn"
@click="handleRecord"
>提现记录></el-button>
</p>
<p class="balance-num">500,000元</p>
<el-button
type="primary"
size="mini"
@click="handleCash"
>提现></el-button>
</div>
<div class="d2-container-content">
<d2-search
ref="showSearch"
class="show-search"
:searchForm="searchForm"
:formData="showFormData"
>
<div
slot="accountType"
style="display: flex; justify-content: space-between;"
>
<!-- <span>{{scope.scope}}</span> -->
<el-select v-model="searchForm.accountType">
<el-option></el-option>
</el-select>
<el-select v-model="searchForm.accountType">
<el-option></el-option>
</el-select>
</div>
</d2-search>
<div class="up-btns">
<el-button
:id="tableParams.btnId"
size="small"
type="primary"
>查询</el-button>
<el-button
size="small"
@click="handleReset"
>重置</el-button>
</div>
</div>
<div class="d2-container-content">
<d2-table-header>
<span slot="left">共 50 笔订单,累计分账金额 9400 元,分账成功金额 9400 元,分账中金额 0 元,分账失败金额 0 元。</span>
<el-button
type="primary"
size="mini"
>导出</el-button>
</d2-table-header>
<d2-table
ref="merchantTable"
:getListApi="getListApi"
:searchForm="searchForm"
:tableParams="tableParams"
>
</d2-table>
</div>
<cash-dialog
:cashForm="cashForm"
:cashVisible="cashVisible"
@handleCashConfirm="handleCashConfirm"
@handleCashClose="handleCashClose"
></cash-dialog>
</d2-container>
</template> </template>
<script> <script>
import cashDialog from './cashDialog'
import { getParkStore } from '@api/editCustomer'
export default { export default {
name: 'myAccount', name: 'myAccount',
data() { data() {
return { return {
searchForm: {},
showFormData: [{
label: '分账时间',
name: '',
type: 'datePicker'
}, {
label: '园区店',
name: 'sellerMerchantId',
type: 'select',
optionList: [],
optionId: 'merchantId',
optionLabel: 'merchantName',
optionsName: 'parkServiceList'
}, {
label: '分账类型',
name: '',
type: 'slot',
addHtml: 'accountType'
}, {
label: '订单编号',
name: '',
type: 'input',
palcehodler: '请输入查询的订单编号'
}],
// 表格
getListApi: '',
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: true,
tableColumns: [{
label: '序号',
prop: ''
}, {
label: '订单编号',
prop: ''
}, {
label: '园区店名',
prop: ''
}, {
label: '分账类型',
prop: ''
}, {
label: '分账金额(元)',
prop: ''
}, {
label: '分账状态',
prop: ''
}, {
label: '分账时间',
prop: ''
}]
},
// 提现弹窗
cashVisible: false,
cashForm: {
smsCode: ''
},
baseData: {
parkServiceList: []
}
} }
}, },
components: {}, components: {
cashDialog
computed: {}, },
mounted() {}, mounted() {
getParkStore({}).then(res => {
this.baseData.parkServiceList = res
// this.getOptionsList()
})
},
methods: {} methods: {
handleRecord() {
this.$router.push({
name: 'myAccountRecord'
})
},
// 提现弹窗
handleCash() {
this.handleCashClose()
},
handleCashClose() {
this.cashVisible = !this.cashVisible
this.cashForm = { smsCode: '' }
},
handleCashConfirm() {
this.handleCashClose()
}
}
} }
</script> </script>
<style scoped> <style scoped>
.my-account .header {
padding: 0 37px 20px;
}
.my-account .header .header-balance {
position: relative;
}
.my-account .header .header-balance .balance-btn {
position: absolute;
right: 0;
}
.my-account .header .balance-num {
font-size: 28px;
font-weight: 400px;
margin: 16px 0;
}
</style> </style>
<!-- 我的分账-提现记录 -->
<template>
<d2-container class="my-account-record">
<div
class="header"
slot="header"
>
<d2-search
ref="showSearch"
:searchForm="searchForm"
:formData="showFormData"
>
</d2-search>
<div class="up-btns">
<el-button
:id="tableParams.btnId"
size="small"
type="primary"
>查询</el-button>
<el-button
size="small"
@click="handleReset"
>重置</el-button>
</div>
</div>
<div class="d2-container-content">
<d2-table-header>
<span slot="left">共提现 388 次,累计提现金额 10000 元。</span>
</d2-table-header>
<d2-table
ref="merchantTable"
:getListApi="getListApi"
:searchForm="searchForm"
:tableParams="tableParams"
>
</d2-table>
</div>
</d2-container>
</template>
<script>
export default {
name: 'myAccountRecord',
data() {
return {
searchForm: {},
showFormData: [{
label: '提现时间',
name: '',
type: 'datePicker'
}, {
label: '提现结果',
name: '',
type: 'select',
optionList: [],
optionId: '',
optionLabel: '',
optionsName: ''
}, {
label: '提现渠道',
name: '',
type: 'select',
optionList: [],
optionId: '',
optionLabel: '',
optionsName: ''
}],
// 表格
getListApi: '',
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: true,
tableColumns: [{
label: '序号',
prop: ''
}, {
label: '提现时间',
prop: ''
}, {
label: '登录账号',
prop: ''
}, {
label: '提现金额(元)',
prop: ''
}, {
label: '到账账户名',
prop: ''
}, {
label: '到账银行',
prop: ''
}, {
label: '到账卡号',
prop: ''
}, {
label: '验证手机号',
prop: ''
}, {
label: '提现结果',
prop: ''
}, {
label: '到账金额(元)',
prop: ''
}, {
label: '提现渠道',
prop: ''
}]
}
}
},
mounted() { },
methods: {}
}
</script>
<style scoped>
</style>
...@@ -145,7 +145,7 @@ export default { ...@@ -145,7 +145,7 @@ export default {
label: '商户名称', label: '商户名称',
name: 'merchantName', name: 'merchantName',
type: 'input', type: 'input',
placeholder: '请输入服务商/4S店名称', placeholder: '请输入服务商/园区店名称',
isClear: true, isClear: true,
keyFn: this.keyDowmGetList keyFn: this.keyDowmGetList
}, { }, {
...@@ -153,7 +153,7 @@ export default { ...@@ -153,7 +153,7 @@ export default {
name: '', name: '',
type: 'input', type: 'input',
inputType: 'number', inputType: 'number',
placeholder: '请输入服务商/4S店编号', placeholder: '请输入服务商/园区店编号',
isClear: true, isClear: true,
keyFn: this.keyDowmGetList keyFn: this.keyDowmGetList
}], }],
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!