Commit 8a865ce7 authored by 谢子梦's avatar 谢子梦

stage:文档3.3.2

parent df51e369
......@@ -51,3 +51,18 @@ export function delUnitRechargeBank(id) {
method: 'get'
})
}
//获取通道参数数据接口
export const getChannelParamAPI = (id) => {
return request({
url: '/business/company/payChannelParams/menu?companyChannelId=' + id,
method: 'get'
})
}
// 修改通道参数数据接口
export const updateChannelParamAPI = (data) => {
return request({
url: '/business/company/payChannelParams/set',
method: 'post',
data: data
})
}
......@@ -3,17 +3,12 @@
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
<el-form-item label="关联企业" prop="companyId">
<el-select v-model="queryParams.companyId" placeholder="请选择关联企业" clearable>
<el-option v-for="item in unitInfoList" :key="item.companyId"
:label="item.companyName" :value="item.companyId" />
<el-option v-for="item in unitInfoList" :key="item.companyId" :label="item.companyName"
:value="item.companyId" />
</el-select>
</el-form-item>
<el-form-item label="支付通道" prop="channelName">
<el-input
v-model="queryParams.channelName"
placeholder="请输入通道名称"
clearable
@keyup.enter.native="handleQuery"
/>
<el-input v-model="queryParams.channelName" placeholder="请输入通道名称" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
......@@ -21,18 +16,18 @@
</el-form-item>
</el-form>
<!-- <el-row :gutter="10" class="mb8">-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="warning"-->
<!-- icon="el-icon-download"-->
<!-- size="mini"-->
<!-- @click="handleExport"-->
<!-- v-hasPermi="['business:companyPayChannel:export']"-->
<!-- >导出</el-button>-->
<!-- </el-col>-->
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
<!-- </el-row>-->
<!-- <el-row :gutter="10" class="mb8">-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="warning"-->
<!-- icon="el-icon-download"-->
<!-- size="mini"-->
<!-- @click="handleExport"-->
<!-- v-hasPermi="['business:companyPayChannel:export']"-->
<!-- >导出</el-button>-->
<!-- </el-col>-->
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
<!-- </el-row>-->
<el-table v-loading="loading" :data="companyPayChannelList">
<el-table-column type="selection" width="55" align="center" />
......@@ -40,12 +35,8 @@
<el-table-column label="支付通道" align="center" prop="channelName" />
<el-table-column label="使用状态" align="center" prop="status">
<template slot-scope="scope">
<el-switch
v-model="scope.row.status"
:active-value="1"
:inactive-value="2"
@change="handleStatusChange(scope.row)"
></el-switch>
<el-switch v-model="scope.row.status" :active-value="1" :inactive-value="2"
@change="handleStatusChange(scope.row)"></el-switch>
</template>
</el-table-column>
<el-table-column label="开通状态" align="center" prop="isEnter">
......@@ -55,34 +46,19 @@
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-help"
@click="signChannel(scope.row)"
v-if="scope.row.isEnter < 3"
>开通</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-setting"
@click="goChannelSet(scope.row)"
v-if="scope.row.isEnter === 3"
>参数配置</el-button>
<el-button size="mini" type="text" icon="el-icon-help" @click="signChannel(scope.row)"
v-if="scope.row.isEnter < 3">开通</el-button>
<el-button size="mini" type="text" icon="el-icon-setting" @click="goChannelSet(scope.row)"
v-if="scope.row.isEnter === 3">参数配置</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />
<el-dialog title="扫码签约" :visible.sync="bindAcc.codePanel" width="300px" style="text-align: center">
<h3>请使用</h3>
<h3><span style="color: #00afff">{{ bindAcc.companyName}}</span>的对公支付宝</h3>
<h3><span style="color: #00afff">{{ bindAcc.companyName }}</span>的对公支付宝</h3>
<h3>扫描下方二维码</h3>
<qr-code-component :text="bindAcc.codeUrl" />
<h3>操作完成后大约5-10分钟</h3>
......@@ -217,7 +193,7 @@ export default {
handleStatusChange(row) {
const _this = this;
let text = row.status === 1 ? "启用" : "停用";
_this.$modal.confirm('确认要"' + text + '""' + row.channelName + '"支付通道吗?').then(function() {
_this.$modal.confirm('确认要"' + text + '""' + row.channelName + '"支付通道吗?').then(function () {
const updateForm = {
id: row.id,
status: row.status
......@@ -229,7 +205,7 @@ export default {
}).catch(() => {
row.status = row.status === 2 ? 1 : 2;
});
}).catch(function() {
}).catch(function () {
row.status = row.status === 2 ? 1 : 2;
});
},
......@@ -258,10 +234,11 @@ export default {
})
},
goChannelSet(row) {
this.$router.push({ path: '/business/unitRechargeBank', query: {
companyId: row.companyId,
channelCode: row.channelCode
} })
this.$router.push({
path: '/business/unitRechargeBank', query: {
id: row.id
}
})
}
}
};
......
This diff is collapsed.
<template>
<!-- 税费开关 -->
<div class="accountTax">
<h3 class="headline">税费账户</h3>
<p class="subheading">税费账户用于接收用工企业的税费,在用工企业下发时税费将自动转到此账户。</p>
<div style="margin-bottom: 12px;">
<el-radio @change="taxChange" v-model="tax_money_payee.paramsVal" :disabled="!tax_money_payee.isNormal"
label="false">关闭</el-radio>
<el-radio @change="taxChange" v-model="tax_money_payee.paramsVal" :disabled="!tax_money_payee.isNormal"
label="true">开启</el-radio>
</div>
</div>
</template>
<script>
import { getChannelParamAPI, updateChannelParamAPI } from "@/api/business/unitRechargeBank";
export default {
name: 'AccountTax',
data() {
return {
allParams: {},
// 税收账户参数
tax_money_payee: {
paramsVal: 'false',
isNormal: false
}
}
},
created() {
},
watch: {
'$route.query.id'(newValue) {
if (newValue) {
this.paymentChannelID = newValue
this.getChannelConfiguration()
}
},
},
mounted() {
this.getChannelConfiguration()
},
methods: {
taxChange() {
updateChannelParamAPI({ ...this.tax_money_payee, companyPayChannelId: this.$route.query.id }).then(res => {
if (res.code == 200) {
this.$modal.msgSuccess('修改成功')
} else {
switch (this.tax_money_payee.paramsVal) {
case 'false':
this.tax_money_payee.paramsVal = 'true'
break;
case 'true':
this.tax_money_payee.paramsVal = 'false'
break;
}
}
})
},
// 获取通道配置参数
getChannelConfiguration() {
getChannelParamAPI(this.$route.query.id).then(res => {
if (res.code == 200) {
this.allParams = res.data
this.getTaxVal('tax_money_payee') //处理税收账户参数
}
})
},
getTaxVal(key) {
const data = this.allParams[key]
if (data) {
this.tax_money_payee = data
if (!this.tax_money_payee.paramsVal) this.tax_money_payee.paramsVal = 'false'
} else {
this.tax_money_payee.paramsVal = 'false'
this.tax_money_payee.isNormal = false
}
},
}
}
</script>
<style lang="scss" scoped>
.accountTax ::v-deep {
padding: 0px 22px;
overflow: hidden;
.headline {
font-size: 16px;
font-weight: 500;
color: #000;
margin-top: 48px;
letter-spacing: 2px;
}
.headline:first-child {
margin-top: 0;
}
.subheading {
font-size: 14px;
color: #999;
}
}
</style>
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment