Commit f8e28c85 by 匡雅琴

支付管理

1 parent c477dd39
...@@ -207,5 +207,41 @@ const staticRoutes = Object.freeze([{ ...@@ -207,5 +207,41 @@ const staticRoutes = Object.freeze([{
component: resolve => require([`@/views/memberCenter/record.vue`], resolve), component: resolve => require([`@/views/memberCenter/record.vue`], resolve),
meta: {} meta: {}
}, },
{
name: 'AccountList',
path: '/account/index',
component: resolve => require([`@/views/account/index.vue`], resolve),
meta: {}
},
{
name: 'AddAccount',
path: '/account/addAccount',
component: resolve => require([`@/views/account/addAccount.vue`], resolve),
meta: {}
},
{
name: 'ApplicationList',
path: '/application/index',
component: resolve => require([`@/views/application/index.vue`], resolve),
meta: {}
},
{
name: 'PaymentList',
path: '/payment/index',
component: resolve => require([`@/views/payment/index.vue`], resolve),
meta: {}
},
{
name: 'AddPayment',
path: '/payment/addPayment',
component: resolve => require([`@/views/payment/addPayment.vue`], resolve),
meta: {}
},
{
name: 'Gathering',
path: '/gathering/index',
component: resolve => require([`@/views/gathering/index.vue`], resolve),
meta: {}
}
]) ])
export default staticRoutes export default staticRoutes
\ No newline at end of file \ No newline at end of file
<template>
<div>
<el-form ref="addAccountForm" :model="addPaymentForm" :rules="addAccountRules" label-width="200px" class="addAccountForm">
<h4>基础信息</h4>
<el-divider></el-divider>
<el-form-item label="账户名称:" prop="accountName">
<el-input v-model="addPaymentForm.accountName" placeholder="请选择使用该支付方式的滴加商户" style="width: 400px"></el-input>
</el-form-item>
<el-form-item label="商户号:" prop="merchantID">
<el-input v-model="addPaymentForm.merchantID" placeholder="请选择使用该支付方式的业务应用" style="width: 400px"></el-input>
</el-form-item>
<el-form-item label="商户类型:" prop="merchantType">
<el-radio-group v-model="addPaymentForm.merchantType">
<el-radio label="0">普通商户</el-radio>
<el-radio label="1">服务商商户</el-radio>
<el-radio label="2">特约商户</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="所属上级商户:" prop="leader" label-width="200px">
<el-select v-model="addPaymentForm.leader" placeholder="请选择活动区域">
<el-option label="区域一" value="shanghai"></el-option>
<el-option label="区域二" value="beijing"></el-option>
</el-select>
</el-form-item>
<h4>配置信息</h4>
<el-divider></el-divider>
<el-form-item label="证书串:" prop="certificate">
<el-input v-model="addPaymentForm.certificate" placeholder="请选择使用该支付方式的滴加商户" style="width: 400px"></el-input>
</el-form-item>
<el-form-item label="密钥:" prop="password">
<el-input v-model="addPaymentForm.password" placeholder="请选择使用该支付方式的业务应用" style="width: 400px"></el-input>
</el-form-item>
<el-form-item label="收款账户:" prop="account">
<div class="upload">
<el-upload action="https://jsonplaceholder.typicode.com/posts/" list-type="picture-card" :on-preview="handlePictureCardPreview" :on-remove="handleRemove">
<i class="el-icon-plus"></i>
</el-upload>
<el-upload action="https://jsonplaceholder.typicode.com/posts/" list-type="picture-card" :on-preview="handlePictureCardPreview" :on-remove="handleRemove">
<i class="el-icon-plus"></i>
</el-upload>
<!-- <div><p>请上传从微信支付平台获取的两个PEM格式的文件</p></div> -->
<span>请上传从微信支付平台获取的两个PEM格式的文件</span>
</div>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="" />
</el-dialog>
</el-form-item>
</el-form>
</div>
</template>
<script>
export default {
name: 'Addaccount',
data() {
return {
addPaymentForm: {
accountName: '',
merchantID: '',
merchantType: '',
leader: '',
certificate: '',
password: '',
account: ''
},
addAccountRules: {
accountName: [{ required: true, message: '请输入活动名称', trigger: 'blur' }],
merchantID: [{ required: true, message: '请输入活动名称', trigger: 'blur' }],
merchantType: [{ required: true, message: '请选择活动资源', trigger: 'change' }],
leader: [{ type: 'array', required: true, message: '请至少选择一个活动性质', trigger: 'change' }],
certificate: [{ required: true, message: '请输入活动名称', trigger: 'blur' }],
password: [{ required: true, message: '请输入活动名称', trigger: 'blur' }]
}
}
},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped>
h4 {
margin-left: 40px;
}
.upload {
display: flex;
// position: relative;
span {
padding-top: 110px;
}
:last-child {
margin-left: 12px;
}
}
</style>
\ No newline at end of file \ No newline at end of file
<!--
* @Author: huyue
* @Date: 2022-02-11 10:20:32
* @LastEditTime: 2022-02-11 17:57:26
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \scrm-micro-pay\src\views\account\index.vue
-->
<template>
<div class="container">
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<span slot="footer" class="footer-btns">
<el-button :size="size" type="default" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
</span>
</glsx-combi-form>
<!-- :getListApi="getListApi" -->
<el-button icon="el-icon-plus" @click="openAddAccount">添加账户</el-button>
<div>
<GLTable ref="accountTable" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun" :tableData="tableData">
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" @click="btnClick('edit', scope.scope)">编辑</el-button>
<el-button type="text" @click="btnClick('delete', scope.scope)">删除</el-button>
</div>
</GLTable>
</div>
</div>
</template>
<script>
import url from '@/assets/empty.png'
export default {
name: 'AccountList',
data() {
return {
url,
searchForm: {},
searchFormData: [
{
label: '账户名称',
name: 'accountName',
type: 'input',
maxlength: 20
},
{
label: '商户号',
name: 'merchantId',
type: 'input',
maxlength: 20
},
{
label: '商户类型',
name: 'accountName',
type: 'select',
optionList: []
}
],
tableParams: {
listName: 'list',
tableOption: true,
tableColumns: [
{
label: '账户名称',
prop: 'accountName',
line: 2
},
{
label: '商户号',
prop: 'merchantId',
line: 2
},
{
label: '商户类型',
prop: 'merchantType',
line: 2
},
{
label: '创建人',
prop: 'createPer',
line: 2
},
{
label: '创建时间',
prop: 'createTime',
line: 2
},
{
label: '上次修改人',
prop: 'lastUpdatePer',
line: 2
},
{
label: '上次修改时间',
prop: 'lastUpdateTime',
line: 2
}
]
},
tableData: [
{
accountName: '小红',
merchantId: 111,
merchantType: '小红',
createPer: '小红',
createTime: '2008-03-12 20:28:52',
lastUpdatePer: '小红',
lastUpdateTime: '2008-03-12 20:28:52'
},
{
accountName: '小红',
merchantId: 222,
merchantType: '小红',
createPer: '小红',
createTime: '2008-03-12 20:28:52',
lastUpdatePer: '小红',
lastUpdateTime: '2008-03-12 20:28:52'
},
{
accountName: '小红',
merchantId: 333,
merchantType: '小红',
createPer: '小红',
createTime: '2008-03-12 20:28:52',
lastUpdatePer: '小红',
lastUpdateTime: '2008-03-12 20:28:52'
},
{
accountName: '小红',
merchantId: 444,
merchantType: '小红',
createPer: '小红',
createTime: '2008-03-12 20:28:52',
lastUpdatePer: '小红',
lastUpdateTime: '2008-03-12 20:28:52'
},
{
accountName: '小红',
merchantId: 555,
merchantType: '小红',
createPer: '小红',
createTime: '2008-03-12 20:28:52',
lastUpdatePer: '小红',
lastUpdateTime: '2008-03-12 20:28:52'
},
],
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }
}
},
mounted() {
// this.getOptionsList('searchFormData')
},
methods: {
btnClick(type, row) {
switch (type) {
case 'edit':
break
case 'delete':
break
default:
console.log(row)
}
},
handleSearch() {},
handleReset() {},
setTableFinishFun() {
console.log(this.$refs.accountTable.data, '---')
//接收到的数据为空
this.$refs.accountTable.data.length ? (this.$refs.accountTable.tableHeightValues = '') : this.$refs.accountTable.setTableHeightFun()
},
openAddAccount() {
this.$router.push('account/addAccount')
}
}
}
</script>
<style lang="scss">
.container {
background-color: #fff;
margin: 0 20px;
.glsx-combi-form {
position: relative;
padding: 8px 0 0 8px;
.footer-btns {
position: absolute;
right: 12px;
}
}
.gl-table {
padding: 0 8px 20px 8px;
}
}
</style>
<template>
<div class="container">
<div class="glsx-combi-form">
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<span slot="footer" class="footer-btns">
<el-button :size="size" type="default" @click="handleSearch">搜索</el-button>
<el-button :size="size" type="primary" @click="handleReset">重置</el-button>
</span>
</glsx-combi-form>
</div>
<div class="gl-table">
<GLTable ref="applicationTable" :tableData="tableData" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun">
</GLTable>
</div>
</div>
</template>
<script>
import url from '@/assets/empty.png'
export default {
name: 'ApplicationList',
data() {
return {
url,
searchForm: {
applicationKeywords: '',
applicationType: []
},
searchFormData: [
{
label: '应用关键字',
name: 'applicationKeywords',
type: 'input',
maxlength: 20,
placeholder: '请输入名称/ID进行搜索',
isClear: true
},
{
label: '应用类型',
name: 'applicationType',
type: 'select',
optionList: [],
placeholder: '全部',
isClear: true
}
],
// 手写表单数据
tableData:[{
applicationName: "xnsyu",
applicationId: "710000201204307871",
applicationType: "毛娟",
createPer: "邵超",
createTime: "2008-03-12 20:28:52",
lastUpdatePer: "邱秀英",
lastUpdateTime: "2016-12-03 22:09:36"
},
{
applicationName: "xnsyu",
applicationId: "710000201204307871",
applicationType: "毛娟",
createPer: "邵超",
createTime: "2008-03-12 20:28:52",
lastUpdatePer: "邱秀英",
lastUpdateTime: "2016-12-03 22:09:36"
},
{
applicationName: "xnsyu",
applicationId: "710000201204307871",
applicationType: "毛娟",
createPer: "邵超",
createTime: "2008-03-12 20:28:52",
lastUpdatePer: "邱秀英",
lastUpdateTime: "2016-12-03 22:09:36"
},
{
applicationName: "xnsyu",
applicationId: "710000201204307871",
applicationType: "毛娟",
createPer: "邵超",
createTime: "2008-03-12 20:28:52",
lastUpdatePer: "邱秀英",
lastUpdateTime: "2016-12-03 22:09:36"
},
{
applicationName: "xnsyu",
applicationId: "710000201204307871",
applicationType: "毛娟",
createPer: "邵超",
createTime: "2008-03-12 20:28:52",
lastUpdatePer: "邱秀英",
lastUpdateTime: "2016-12-03 22:09:36"
}
],
// 初始化表格数据
// getListApi: this.$apis.application.getApplicationListApi,
tableParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '应用名称',
prop: 'applicationName',
line: 2
},
{
label: '应用ID',
prop: 'applicationId',
line: 2
},
{
label: '应用类型',
prop: 'applicationType',
line: 2
},
{
label: '创建人',
prop: 'createPer',
line: 2
},
{
label: '创建时间',
prop: 'createTime',
line: 2
},
{
label: '上次修改人',
prop: 'lastUpdatePer',
line: 2
},
{
label: '上次修改时间',
prop: 'lastUpdateTime',
line: 2
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }
}
},
mounted() {
// this.getApplicationListApi('searchFormData')
console.log('111');
// console.log(this.getApplicationListApi());
},
methods: {
// getApplicationListApi() {
// this.$apis.application.getApplicationListApi
// },
setTableFinishFun() {
console.log(this.$refs.applicationTable.data, '---')
//接收到的数据为空
this.$refs.accountTable.data.length ? (this.$refs.applicationTable.tableHeightValues = '') : this.$refs.applicationTable.setTableHeightFun()
},
// 搜索
handleSearch() {
},
// 重置搜索
handleReset() {
this.searchForm = {
applicationKeywords: '',
applicationType: []
}
this.handleSearch()
}
}
}
</script>
<style lang="scss">
.container {
background-color: #fff;
margin: 0 20px;
.glsx-combi-form {
position: relative;
padding: 8px 0 0 8px;
.footer-btns {
position: absolute;
right: 12px;
}
}
.gl-table {
padding: 0 8px 20px 8px;
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="container">
<div class="glsx-combi-form">
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData1" :label-position="labelPosition" :labelWidth="auto">
<span slot="footer" class="footer-btns">
<el-button :size="size" type="default" @click="handleSearch">搜索</el-button>
<el-button :size="size" type="primary" @click="handleReset">重置</el-button>
</span>
</glsx-combi-form>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData2" :label-position="labelPosition">
</glsx-combi-form>
</div>
<el-button class="exportButton">导出</el-button>
<div class="gl-table">
<GLTable ref="applicationTable" :tableData="tableData" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun">
<template
slot="auth-button"
slot-scope="scope"
:data="scope.scope"
>
<auth-button :data="scope">
<el-button @click="openAddPayment(2, scope)" type="text" :size="size" class="editButton">编辑</el-button>
<el-button @click="handleDelete(scope)" type="text" :size="size" class="delButton">删除</el-button>
</auth-button>
</template>
<!-- <template slot-scope="scope">
<el-button @click="openAddPayment(2, scope.row)" type="text" :size="size" class="editButton">编辑</el-button>
<el-button @click="handleDelete(scope.$index, scope.row)" type="text" :size="size" class="delButton">删除</el-button>
</template> -->
</GLTable>
</div>
</div>
</template>
<script>
import url from '@/assets/empty.png'
export default {
name: 'Gathering',
data() {
return {
url,
labelPosition: 'right',
searchForm: {
runningNum: '',
accountName: '',
accountTime: '',
accountType: '',
applicationType: '',
merchantName: '',
orderNum: '',
orderCustom: '',
status: ''
},
searchFormData1: [
{
label: '流水号:',
name: 'runningNum',
type: 'input',
maxlength: 20,
labelWidth: 100,
// placeholder: '请输入名称进行搜索',
isClear: true
},
{
label: '收款账户:',
name: 'accountName',
type: 'input',
maxlength: 20,
labelWidth: 100,
// placeholder: '请输入账户名称进行搜索',
isClear: true
},
{
label: '收款时间:',
name: 'accountTime',
type: 'datePicker',
labelWidth: 100,
// optionList: [],
placeholder: '全部',
isClear: true
}
],
searchFormData2: [
{
label: '收款类型:',
name: 'accountType',
type: 'select',
labelWidth: 100,
optionList: [],
placeholder: '全部',
isClear: true
},
{
label: '业务应用:',
name: 'applicationType',
type: 'select',
labelWidth: 100,
optionList: [],
placeholder: '全部',
isClear: true
},
{
label: '滴加商户名:',
name: 'merchantName',
type: 'input',
labelWidth: 100,
isClear: true
},
{
label: '订单号:',
name: 'orderNum',
type: 'input',
labelWidth: 100,
isClear: true
},
{
label: '订单用户:',
name: 'orderCustom',
type: 'input',
labelWidth: 100,
placeholder: '请输入用户名/手机号进行搜索',
isClear: true
},
{
label: '状态:',
name: 'status',
type: 'select',
optionList: [],
labelWidth: 100,
placeholder: '全部',
isClear: true
}
],
tableParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '流水号',
prop: 'runningNum',
line: 2
},
{
label: '收款金额',
prop: 'account',
line: 2
},
{
label: '收款账户',
prop: 'accontName',
line: 2
},
{
label: '收款时间',
prop: 'accountTime',
line: 2
},
{
label: '收款类型',
prop: 'accountType',
line: 2
},
{
label: '状态',
prop: 'status',
line: 2
},
{
label: '业务应用',
prop: 'applicationType',
line: 2
},
{
label: '滴加商户名',
prop: 'merchantName',
line: 2
},
{
label: '订单号',
prop: 'orderNum',
line: 2
},
{
label: '订单用户',
prop: 'orderCustom',
line: 2
},
{
label: '订单用户手机号',
prop: 'orderCustomTel',
line: 2
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }
}
},
mounted() {
},
methods: {
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div>
<el-form ref="addPaymentForm" :model="addPaymentForm" :rules="addPaymentRules" label-width="100px" class="addPaymentForm">
<h4>商户信息</h4>
<el-divider></el-divider>
<el-form-item label="滴加商户名" prop="merchantName">
<el-input v-model="addPaymentForm.merchantName" suffix-icon="el-icon-arrow-down" placeholder="请选择使用该支付方式的滴加商户" @click.native="openSelectMerchant" style="width: 400px"></el-input>
</el-form-item>
<h4>应用信息</h4>
<el-divider></el-divider>
<el-form-item label="业务应用" prop="application">
<el-input v-model="addPaymentForm.application" suffix-icon="el-icon-arrow-down" placeholder="请选择使用该支付方式的业务应用" @click.native="openSelectApplication" style="width: 400px">
</el-input>
</el-form-item>
<h4>账户信息</h4>
<el-divider></el-divider>
<el-form-item label="收款账户" prop="account">
<el-input v-model="addPaymentForm.account" suffix-icon="el-icon-arrow-down" placeholder="请选择支付方式的收款账户" @click.native="openSelectAccount" style="width: 400px"></el-input>
</el-form-item>
<el-form-item label="结算分账" prop="settlement">
<el-radio-group v-model="addPaymentForm.settlement">
<el-radio :label="0">关闭</el-radio>
<el-radio :label="1">开启</el-radio>
</el-radio-group>
</el-form-item>
<div v-show="addPaymentForm.settlement">
<div v-for="(item, index) in counter" :key="index">
<el-form-item label="分账账户" prop="accounting">
<el-select v-model="addPaymentForm.accounting" placeholder="请选择分账账户" style="width: 400px">
<el-option label="区域一" value="shanghai"></el-option>
</el-select>
<el-button type="text" class="delcount" v-show="counter.length != 1 && index != 0" @click="delCount(index)">删除</el-button>
</el-form-item>
<el-form-item label="分账比例" prop="accounting_ratio">
<el-input v-model="addPaymentForm.accounting_ratio" placeholder="请输入分账比例,不超过30%" style="width: 400px" suffix-icon="el-icon-arrow-down"></el-input>
</el-form-item>
</div>
<el-form-item>
<el-button type="text" class="addcount" @click="addcount">添加分账账户</el-button>
</el-form-item>
</div>
<el-divider></el-divider>
<el-form-item>
<div class="footer_btns">
<el-button type="info" @click="cancelAdd">取消</el-button>
<el-button type="primary" @click="submitForm">保存</el-button>
</div>
</el-form-item>
</el-form>
<SelectMerchant ref="merchantLabel" @selectMerchant="handleCurrentChange" :dialogVisible="merchantDialogVisible"></SelectMerchant>
<SelectApplication ref="applicationLabel" :dialogVisible="applicationDialogVisible" @selectApplication="selectApplication"></SelectApplication>
<glsx-dialog :title="'选择账户'" :isVisible.sync="accountDialogVisible" :width="'900px'" @confirmDialog="handleConfirm" @closeDialog="accountDialogVisible = !accountDialogVisible">
<SelectAccount ref="accountLabel" v-if="accountDialogVisible"></SelectAccount>
</glsx-dialog>
<glsx-dialog title="'保存提示'" :isVisible.sync="isSaveDialogvisible" width="'900px'" @confirmDialog="handleConfirm" @closeDialog="isSaveDialogvisible = !isSaveDialogvisible">
<span>支付方式保存后,线上购买行为将以当前支付方式进行收款。是否确定保存?</span>
</glsx-dialog>
</div>
</template>
<script>
import SelectMerchant from './components/selectMerchant'
import SelectApplication from './components/selectApplication.vue'
import SelectAccount from './components/selectAccount.vue'
export default {
name: 'AddPayment',
components: {
SelectMerchant,
SelectApplication,
SelectAccount
},
data() {
return {
addPaymentForm: {
merchantName: '',
application: [],
account: '',
settlement: 0,
accounting: '',
accounting_ratio: ''
},
addPaymentRules: {
merchantName: [{ required: true, message: '请选择滴加用户', trigger: 'change' }],
application: [{ required: true, message: '请选择业务应用', trigger: 'change' }],
account: [{ required: true, message: '请选择收款账户', trigger: 'change' }],
settlement: [{ required: true, message: '请选择结算分账', trigger: 'change' }],
accounting: [{ required: true, message: '请选择分账账户', trigger: 'change' }],
accounting_ratio: [{ required: true, message: '请输入分账比例', trigger: 'blur' }]
},
counter: [],
// 对话框显示
merchantDialogVisible: false,
applicationDialogVisible: false,
accountDialogVisible: false
}
},
mounted() {
// console.log(this.$route.query)
this.addPaymentForm = this.$route.query
},
methods: {
// 动态添加分账账户
addcount() {
this.counter.push({})
},
// 取消添加支付方式
cancelAdd() {
this.$router.push({
path: '/payment/index'
})
},
delCount(index) {
this.counter.splice(index, 1)
},
// 提交表单
submitForm() {
this.$refs.addPaymentForm.validate((valid) => {
if (valid) {
alert('submit!')
} else {
console.log('error submit!!')
return false
}
})
},
// 打开选择滴加商户对话框
openSelectMerchant() {
this.merchantDialogVisible = true
this.$refs.merchantLabel.init()
},
// 打开选择业务应用对话框
openSelectApplication() {
this.applicationDialogVisible = !this.applicationDialogVisible
this.$refs.applicationLabel.init()
},
// 打开选择账户对话框
openSelectAccount() {
this.accountDialogVisible = !this.accountDialogVisible
this.$refs.accountLabel.init()
},
// 选择滴加商户
selectMerchant(val) {
console.log(val, 'input')
},
// 选择业务应用
selectApplication(val) {
console.log(val, 'input')
this.addPaymentForm.application = val
console.log(this.addPaymentForm.application, 'application')
},
handleConfirm() {
}
}
}
</script>
<style lang="scss" scoped>
.delcount {
margin-left: 12px;
font-weight: bold;
color: red;
}
h4 {
margin-left: 20px;
&:first-child {
padding-top: 18px;
}
}
.el-form-item {
margin-left: 28px;
}
.addPaymentForm {
background-color: #fff;
margin: 20px;
}
.footer_btns {
text-align: center;
margin-bottom: 12px;
}
.footer_btns .el-button {
padding: 12px 50px;
}
.addcount {
color: rgb(5, 173, 252);
font-weight: bold;
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div>
<span>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<span slot="footer" class="footer-btns">
<el-button :size="size" type="primary" @click="handleSearch">搜索</el-button>
</span>
</glsx-combi-form>
<GLTable ref="merchantTable" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf">
</GLTable>
</span>
</div>
</template>
<script>
import url from '@/assets/empty.png'
export default {
name: 'SelectApplication',
data() {
return {
url,
dialogVisible: false,
searchForm: {
merchantName: ''
},
searchFormData: [
{
label: '关键字:',
name: 'accountName',
type: 'input',
maxlength: 20,
placeholder: '请输入账户名称或商户号搜索',
isClear: true
},
{
label: '商户类型:',
name: 'merchantType',
type: 'select',
maxlength: 20,
placeholder: '全部',
isClear: true
}
],
tableParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '账户名称',
prop: 'accountName',
line: 2
},
{
label: '商户号',
prop: 'merchantID',
line: 2
},
{
label: '商户类型',
prop: 'merchantType',
line: 2
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }
}
},
methods: {
init() {
this.dialogVisible = true
},
handleSearch() {},
handleClose(done) {
this.$confirm('确认关闭?')
.then(_ => {
done()
})
.catch(_ => {})
}
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div>
<el-dialog title="提示" :visible.sync="dialogVisible" width="70%" :before-close="!dialogVisible">
<span>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<span slot="footer" class="footer-btns">
<el-button :size="size" type="primary" @click="handleSearch">搜索</el-button>
</span>
</glsx-combi-form>
<el-row :gutter="20">
<el-col :span="16">
<GLTable ref="merchantTable" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :tableData="tableData" @selectionTable="selectionTable"></GLTable>
</el-col>
<el-col :span="8">
<div>
<div>
<h4>已选列表</h4>
<el-card class="box-card">
<!-- 展示内容 -->
<div>
<el-tag v-for="(tag, idx) in innerTags" :key="idx" type="info" closable :disable-transitions="false" @close="remove(tag)">
{{ tag.applicationName }}-{{ tag.applicationType }}
</el-tag>
</div>
</el-card>
</div>
</div>
</el-col>
</el-row>
</span>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="handleConfirm">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import url from '@/assets/empty.png'
export default {
name: 'SelectApplication',
data() {
return {
url,
dialogVisible: false,
mutiSelectArr: {},
searchForm: {
merchantName: ''
},
innerTags: [],
searchFormData: [
{
label: '关键字:',
name: 'merchantName',
type: 'input',
maxlength: 20,
placeholder: '请输入应用名称进行搜索',
isClear: true
},
{
label: '应用类型:',
name: 'merchantName',
type: 'select',
maxlength: 20,
placeholder: '全部',
isClear: true
}
],
tableParams: {
listName: 'list',
tableOption: false,
// 行数据的key
mutiSelectUniqueKey: 'id',
// 多选ref的名称
mutiSelectName: 'list',
tableColumns: [
{
label: '应用名称',
prop: 'applicationName',
line: 2
},
{
label: '应用类型',
prop: 'applicationType',
line: 2
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableData: [
{
id: 111,
applicationName: '有点东西',
applicationType: '小程序'
},
{
id: 222,
applicationName: '有点东西',
applicationType: '小程序'
},
{
id: 333,
applicationName: '有点东西',
applicationType: '小程序'
},
{
id: 444,
applicationName: '有点东西',
applicationType: '小程序'
},
{
id: 555,
applicationName: '有点东西',
applicationType: '小程序'
}
]
}
},
methods: {
init() {
this.dialogVisible = true
this.mutiSelectArr = {}
},
handleSearch() {
this.$refs.merchantTable.refreshTable()
},
// 多选
selectionTable(val) {
console.log(val)
this.innerTags = val
},
// 提交选择业务应用
handleConfirm() {
// if (!this.mutiSelectArr.length) {
// this.$message({
// message: '请最少选择一条业务应用!',
// type: 'warning'
// })
// }
this.$emit('selectApplication', this.mutiSelectArr)
this.dialogVisible = false
}
}
}
</script>
<style lang="scss" scoped>
h4 {
margin-top: 0;
color: red;
}
.box-card {
height: 120px;
border: 1px solid rgb(61, 60, 60);
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div>
<el-dialog title="提示" :visible.sync="dialogVisible" width="50%" :before-close="!dialogVisible">
<span>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<span slot="footer" class="footer-btns">
<el-button :size="size" type="primary" @click="handleSearch">搜索</el-button>
</span>
</glsx-combi-form>
<GLTable ref="merchantTable" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :tableData="tableData" highlight-current-row @current-change="handleCurrentChange"></GLTable>
</span>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="handleConfirm">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import url from '@/assets/empty.png'
export default {
name: 'SelectMerchant',
data() {
return {
url,
dialogVisible: false,
selectData: '',
searchForm: {
merchantName: ''
},
searchFormData: [
{
label: '关键字:',
name: 'merchantName',
type: 'input',
maxlength: 20,
placeholder: '请输入滴加商户名称或商户号进行搜索',
isClear: true
}
],
tableParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '滴加商户名',
prop: 'merchantName',
line: 2
},
{
label: '滴加商户号',
prop: 'merchantID',
line: 2
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableData: [
{
merchantName: '滴滴虎',
merchantID: 111
},
{
merchantName: '滴滴虎',
merchantID: 222
},
{
merchantName: '滴滴虎',
merchantID: 333
},
{
merchantName: '滴滴虎',
merchantID: 444
}
]
}
},
methods: {
init() {
this.dialogVisible = true
},
handleSearch() {
this.$refs.merchantTable.refreshTable()
},
handleClose(done) {
this.$confirm('确认关闭?')
.then(_ => {
done()
})
.catch(_ => {})
},
// 触发单选
handleCurrentChange(val) {
// console.log(val, 'currentRow')
this.selectData = val
},
// 点击确定,传递单选数据
handleConfirm() {
alert('111')
console.log(this.selectData, '124')
this.$emit('selectMerchant', this.selectData)
this.dialogVisible = false
}
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="container">
<div class="glsx-combi-form">
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<span slot="footer" class="footer-btns">
<el-button :size="size" type="default" @click="handleSearch">搜索</el-button>
<el-button :size="size" type="primary" @click="handleReset">重置</el-button>
</span>
</glsx-combi-form>
</div>
<el-button icon="el-icon-plus" class="addPayment" @click="openAddPayment(1)">添加支付方式</el-button>
<div class="gl-table">
<GLTable ref="applicationTable" :tableData="tableData" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun">
<template
slot="auth-button"
slot-scope="scope"
:data="scope.scope"
>
<auth-button :data="scope">
<el-button @click="openAddPayment(2, scope)" type="text" :size="size" class="editButton">编辑</el-button>
<el-button @click="handleDelete(scope)" type="text" :size="size" class="delButton">删除</el-button>
</auth-button>
</template>
<!-- <template slot-scope="scope">
<el-button @click="openAddPayment(2, scope.row)" type="text" :size="size" class="editButton">编辑</el-button>
<el-button @click="handleDelete(scope.$index, scope.row)" type="text" :size="size" class="delButton">删除</el-button>
</template> -->
</GLTable>
</div>
</div>
</template>
<script>
import url from '@/assets/empty.png'
export default {
name: 'PaymentList',
data() {
return {
url,
searchForm: {
merchantName: '',
accountName: '',
application: []
},
searchFormData: [
{
label: '滴加商户名',
name: 'merchantName',
type: 'input',
maxlength: 20,
placeholder: '请输入名称进行搜索',
isClear: true
},
{
label: '账户名称',
name: 'accountName',
type: 'input',
maxlength: 20,
placeholder: '请输入账户名称进行搜索',
isClear: true
},
{
label: '业务运用',
name: 'applicationType',
type: 'select',
optionList: [],
placeholder: '全部',
isClear: true
}
],
tableParams: {
listName: 'list',
tableOption: true,
tableColumns: [
{
label: '滴加商户名',
prop: 'merchantName',
line: 2
},
{
label: '业务应用',
prop: 'application',
line: 2
},
{
label: '账户名称',
prop: 'accontName',
line: 2
},
{
label: '结算分账',
prop: 'settlement',
line: 2
},
{
label: '创建人',
prop: 'createPer',
line: 2
},
{
label: '创建时间',
prop: 'createTime',
line: 2
},
{
label: '上次修改人',
prop: 'lastUpdatePer',
line: 2
},
{
label: '上次修改时间',
prop: 'lastUpdateTime',
line: 2
}
]
},
// 手写表单数据
tableData:[{
merchantName: "xnsyu",
application: "小程序1",
accontName: "我是账户名称",
settlement: "开启",
createPer: "系统用户名",
createTime: "2016-12-03 22:09:36",
lastUpdatePer: "系统用户名",
lastUpdateTime: "2016-12-03 22:09:36"
},
{
merchantName: "xnsyu",
application: "小程序2",
accontName: "我是账户名称",
settlement: "开启",
createPer: "系统用户名",
createTime: "2016-12-03 22:09:36",
lastUpdatePer: "系统用户名",
lastUpdateTime: "2016-12-03 22:09:36"
},
{
merchantName: "xnsyu",
application: "小程序3",
accontName: "我是账户名称",
settlement: "开启",
createPer: "系统用户名",
createTime: "2016-12-03 22:09:36",
lastUpdatePer: "系统用户名",
lastUpdateTime: "2016-12-03 22:09:36"
},
{
merchantName: "xnsyu",
application: "小程序4",
accontName: "我是账户名称",
settlement: "开启",
createPer: "系统用户名",
createTime: "2016-12-03 22:09:36",
lastUpdatePer: "系统用户名",
lastUpdateTime: "2016-12-03 22:09:36"
},
{
merchantName: "xnsyu",
application: "小程序5",
accontName: "我是账户名称",
settlement: "开启",
createPer: "系统用户名",
createTime: "2016-12-03 22:09:36",
lastUpdatePer: "系统用户名",
lastUpdateTime: "2016-12-03 22:09:36"
}
],
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }
}
},
mounted() {
},
methods: {
// 跳到1-添加;2-编辑支付方式页面
openAddPayment(addOrEdit, row) {
this.$router.push({ path:'/payment/addPayment', query: {row}})
console.log(row);
},
// 搜索
handleSearch() {
this.$refs.applicationTable.refreshTable()
},
// 重置
handleReset() {
this.searchForm= {
merchantName: '',
accountName: '',
application: []
}
},
// 删除
handleDelete(row) {
// console.log(index, row)
this.$confirm('支付方式删除后,将影响正常收款。是否确定删除?', '支付方式删除', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$message({
type: 'success',
message: '删除成功!'
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
}
}
}
</script>
<style lang="scss" scoped>
.container {
background-color: #fff;
margin: 0 20px;
}
.container .glsx-combi-form {
position: relative;
padding: 8px 0 0 8px;
}
.addPayment {
margin: 0 0 8px 8px;
}
.footer-btns {
position: absolute;
right: 12px;
}
.gl-table {
padding: 0 8px 20px 8px;
}
.editButton {
color: blue;
}
.delButton {
color: red;
}
</style>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!