Commit 1064ae5a by 李少勇

nxysdb 交易页面开发

parent 5f2f2eef
......@@ -17,6 +17,7 @@ const BusRouter = [
{ path: 'dblktp', component: () => import("./Dblktp/views"), name: 'Dblktp', meta: { title: '记账类型管理', module: 'frontend', keepAlive: true } },
{ path: 'dotopn', component: () => import("./Dotopn/views"), name: 'Dotopn', meta: { title: '待对账信息录入', module: 'frontend', keepAlive: true } },
{ path: 'fxdsdb', component: () => import("./Fxdsdb/views"), name: 'Fxdsdb', meta: { title: '人民币跨境基础数据查询', module: 'frontend', keepAlive: true } },
{ path: 'nxysdb', component: () => import("./Nxysdb/views"), name: 'Nxysdb', meta: { title: '农信银基础数据查询', module: 'frontend', keepAlive: true } },
{ path: 'bsnsel', component: () => import("./Bsnsel/views"), name: 'Bsnsel', meta: { title: 'CIPS业务状态查询', module: 'frontend', keepAlive: true } },
{ path: 'csnsel', component: () => import("./Csnsel/views"), name: 'Csnsel', meta: { title: '数字证书处理', module: 'frontend', keepAlive: true } },
{ path: 'patsel', component: () => import("./Patsel/views"), name: 'Patsel', meta: { title: '人民币跨境支付行号信息', module: 'frontend', keepAlive: true } },
......
import Api from "~/service/Api";
import moment from "moment";
import Nxysdb from "../model";
import Utils from "~/utils";
export default {
methods: {
async handleSearch() {
let begdat = this.model.fddp.begdat;
if (!begdat || begdat == "") {
this.$notify.error({
title: this.$t("financing.错误"),
message: this.$t("financing.导入起始日期必输!"),
});
return;
}
let enddat = this.model.fddp.enddat;
if (!enddat || enddat == "") {
this.$notify.error({
title: this.$t("financing.错误"),
message: this.$t("financing.导入结束日期必输!"),
});
return;
}
this.load = true;
let rtnmsg = await Api.post("/frontend/nxysdb/query", {
...this.model.fddp,
pageNum: this.pagination.pageNum,
pageSize: this.pagination.pageSize
});
if (rtnmsg.respCode == SUCCESS) {
this.load = false;
this.stmData.data = [];
const { list } = rtnmsg.data;
this.stmData.data = list;
this.pagination = {
pageNum: rtnmsg.data.pageNum || 1,
pageSize: rtnmsg.data.pageSize || 10,
total: parseInt(rtnmsg.data.total),
};
} else {
this.$notify.error({
title: this.$t("financing.错误"),
message: this.$t("financing.服务请求失败!"),
});
}
this.load = false;
},
async handleReset() {
let resetModel = new Nxysdb().data
Utils.copyValueFromVoData(this.model, resetModel);
this.handleSearch();
},
// pageSize改变
handleSizeChange(val) {
this.pagination.pageNum = 1;
this.pagination.pageSize = val;
this.handleSearch();
},
// 页码改变
handleCurrentChange(val) {
this.pagination.pageNum = val;
this.handleSearch();
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
handleAdd() {
this.$refs.addDialog.visible = true
}
},
};
export default {
"fddp.begdat": [
{ type: "string", required: false, message: "输入正确的日期" }
],
"fddp.enddat": [
{ type: "string", required: false, message: "输入正确的日期" }
],
"fddp.filnam": [
{ type: "string", required: false, message: "必输项" },
{ max: 0, message: "长度不能超过0" }
],
}
\ No newline at end of file
import moment from "moment";
export default class Nxysdb {
constructor() {
this.data = {
fddp: {
begdat: moment(new Date()).add(-3, 'd').format('YYYY-MM-DD'), // 导入起始日期 .fddp.begdat
enddat: moment(new Date()).format('YYYY-MM-DD'), // 导入截止日期 .fddp.enddat
filtyp: "", // 文件类型 .fddp.filtyp
filnam: "", // 文件名 .fddp.filnam
},
cpsfxdgrp: {
fxdlst: [], // .cpsfxdgrp.fxdlst
},
}
}
}
\ No newline at end of file
<template>
<div class="eibs-tab">
<c-list-search @form-reset="handleReset" @form-search="handleSearch">
<!-- 持续展示区 -->
<template v-slot="searchSlot">
<el-row>
<c-col :span="24">
<c-col :span="8">
<el-form-item label="文件类型" prop="fddp.filtyp" style="width: 100%">
<c-select v-model="model.fddp.filtyp" style="width: 100%" placeholder="请选择文件类型" dbCode="FILTYP" />
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="文件名" prop="fddp.filnam" style="width: 100%">
<c-input v-model="model.fddp.filnam" style="width: 100%" placeholder="请输入文件名" />
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="导入日期" prop="rcvdatsta" style="width: 100%">
<c-col :span="11">
<c-date-picker type="date" v-model="model.fddp.begdat" style="width: 100%"></c-date-picker>
</c-col>
<c-col :span="2" style="text-align: center">
<label style="display: inline-block; width: 100%">-</label>
</c-col>
<c-col :span="11">
<c-date-picker type="date" v-model="model.fddp.enddat" style="width: 100%"></c-date-picker>
</c-col>
</el-form-item>
</c-col>
</c-col>
</el-row>
<!-- 可控展示区 -->
<el-row v-show="searchSlot.searchToggle">
</el-row>
</template>
</c-list-search>
<el-col :span="24" style="margin-top: 2px;margin-bottom: 1px;">
<c-button class="medium_bcs" size="medium" style="margin-left: 0" type="primary" @click="handleAdd">
新增
</c-button>
<c-button :disabled="isFoldDisable" class="medium_bcs" size="medium" style="margin-left: 20px;" type="primary">
{{ $t('public.归档') }}
</c-button>
<c-button :disabled="isRoutingDisable" class="medium_bcs" size="medium" style="margin-left: 20px;" type="primary">
ReRouting
</c-button>
<c-button class="medium_bcs" size="medium" style="margin-left: 20px;" type="primary">
{{ $t('public.导出Excel') }}
</c-button>
</el-col>
<el-col :span="24" style="margin-top: 10px">
<div style="height: 90%">
<c-col :span="24">
<el-table
:data="stmData.data" :columns="stmData.columns"
v-loading="load" style="width: 100%"
@selection-change="handleSelectionChange"
size="small" :border="true"
height="calc(100vh - 310px)"
:highlight-current-row="true">
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column
v-for="(item, key) in stmData.columns"
:key="key" :label="item.label"
:prop="item.prop"
:width="item.width">
<template slot-scope="scope">
<c-select-value-to-label v-if="item.prop == 'filtyp'" v-model="scope.row.filtyp" dbCode="FILTYP"></c-select-value-to-label>
<span v-else>{{ scope.row[item.prop] }}</span>
</template>
</el-table-column>
</el-table>
<el-pagination
layout="total, sizes, prev, pager, next, jumper"
:total="pagination.total"
:page-size="pagination.pageSize"
:current-page.sync="pagination.pageNum"
@size-change="handleSizeChange"
@current-change="handleCurrentChange">
</el-pagination>
</c-col>
</div>
</el-col>
<add-dialog ref="addDialog"></add-dialog>
</div>
</template>
<script>
import event from "../event";
import addDialog from "./addDialog.vue";
export default {
inject: ["root"],
props: ["model", "codes"],
mixins: [event],
components: {
'add-dialog': addDialog
},
data() {
return {
load: false,
subtypCodes: [],
multipleSelection: [],
stmData: {
columns: [
{
label: "导入日期",
prop: "credat",
width: "120px"
},
{
label: "文件类型",
prop: "filtyp",
width: "240px"
},
{
label: "文件名称",
prop: "filnam",
width: "240px"
},
{
label: "文件保存路径",
prop: "filpth",
width: "auto"
}],
data: [],
},
pagination: {
pageNum: 1,
pageSize: 10,
total: 0,
},
};
},
computed: {
isFoldDisable: function () {
return this.multipleSelection.length == 0;
},
isRoutingDisable: function () {
return this.multipleSelection.length == 0;
}
},
methods: {},
mounted: function () {
},
};
</script>
<style lang="less" scoped>
::v-deep .c-content-scrollbar {
height: 100% !important;
}
.eibs-tabs /deep/ {
.m-table-search {
padding: 20px 0px 10px 0px;
}
}
.header-wrap {
height: 36px;
display: flex;
justify-content: space-between;
align-items: center;
.title {
font-size: 16px;
color: #000;
}
.close-btn {
padding: 3px;
cursor: pointer;
}
}
.m-list-btns {
height: 300px;
overflow: auto;
}
.medium_bcs {
border-radius: 5px;
}
.m-table-search {
padding: 20px 0px 10px 0px;
}
.pagination-box {
width: 100%;
height: 30px;
display: flex;
align-items: center;
justify-content: flex-end;
padding: 0 10px;
background: #fff;
margin-top: 5px;
}
.el-dialog__body {
padding: 10px 5px 50px;
}
.m-table-search {
padding: 20px 0px 10px 0px;
}
.btn-group-wrap {
max-height: 200px;
width: 100%;
overflow-y: auto;
display: flex;
align-items: flex-start;
justify-content: flex-start;
flex-wrap: wrap;
}
.btn-item {
margin-bottom: 10px;
margin-right: 10px;
}
</style>
<template>
<div>
<el-dialog v-if="visible" v-dialogDrag :visible="visible" :modal-append-to-body="false" :close-on-click-modal="false"
title="新增" destroy-on-close width="50%">
<div>
<el-upload
action="/webapi/frontend/fxdsdb/upload"
:before-upload="handleBeforeUpload"
:on-success="handleSuccess"
:limit="1"
:show-file-list="false"
accept=".xml"
>
<c-button slot="trigger" size="small" type="primary">导入</c-button>
</el-upload>
<el-table
v-if="isDispaly"
:data="stmData.data"
:columns="stmData.columns"
v-loading="load"
style="width: 100%;margin-top: 10px;"
size="small"
:border="true"
:highlight-current-row="true"
>
<el-table-column v-for="(item, key) in stmData.columns" :key="key" :label="item.label" :prop="item.prop" :min-width="item.width">
</el-table-column>
</el-table>
</div>
<span slot="footer" class="dialog-footer">
<el-button v-if="isDispaly" type="primary" @click="handleSubmit()">确 定</el-button>
<el-button @click="handleCancel()">取 消</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import Api from "~/service/Api"
export default {
mixins: [],
props: {
},
computed: {
},
data() {
return {
visible: false,
isDispaly: false,
load: false,
stmData: {
columns: [],
data: []
},
fxdcomlstHead:[
{
label: "公共数据代码",
prop: "comcod",
width: "120px"
},
{
label: "公共数据中文名称",
prop: "comnam",
width: "150px"
},
{
label: "公共数据值",
prop: "val",
width: "120px"
},
{
label: "生效类型",
prop: "typ",
width: "100px"
},
{
label: "生效日期",
prop: "effdat",
width: "120px"
},
{
label: "公共数据类型",
prop: "comtyp",
width: "120px"
},
{
label: "公共参数英文名称",
prop: "comengnam",
width: "150px"
},
{
label: "变更类型",
prop: "chgtyp",
width: "100px"
},
{
label: "变更期数",
prop: "changeterm",
width: "100px"
},
],
fxdriglstHead:[
{
label: "参与者机构号",
prop: "bic",
width: "100px"
},
{
label: "报文类型",
prop: "msgtyp",
width: "100px"
},
{
label: "业务方向",
prop: "sndtyp",
width: "100px"
},
],
fxdtyplstHead:[
{
label: "报文类型",
prop: "typ",
width: "100px"
},
{
label: "业务种类",
prop: "bizdtltyp",
width: "100px"
},
],
fxdsuelstHead:[
{
label: "参与者变更期数",
prop: "issueno",
width: "100px"
},
{
label: "公共参数变更期数",
prop: "comissueno",
width: "100px"
},
{
label: "直间参关系变更期数",
prop: "bdrissueno",
width: "100px"
},
],
fxdpatlstHead:[
{
label: "参与者机构代码",
prop: "cod",
width: "100px"
},
{
label: "参与者机构中文名称",
prop: "chnnam",
width: "100px"
},
{
label: "参与者英文名称",
prop: "engnam",
width: "100px"
},
{
label: "国别",
prop: "cty",
width: "100px"
},
{
label: "境内外标识",
prop: "cbtype",
width: "100px"
},
{
label: "参与者资格标识",
prop: "bakcat",
width: "100px"
},
{
label: "所属资金托管行",
prop: "ctdbak",
width: "100px"
},
{
label: "法人机构识别编码",
prop: "lei",
width: "100px"
},
{
label: "有效标识",
prop: "valflg",
width: "100px"
},
{
label: "生效日期",
prop: "effdat",
width: "100px"
},
{
label: "联系人姓名",
prop: "nam",
width: "100px"
},
{
label: "联系人电话",
prop: "tel",
width: "100px"
},
{
label: "联系人邮件地址",
prop: "mal",
width: "100px"
},
{
label: "联系人地址",
prop: "address",
width: "100px"
},
{
label: "联系人邮编",
prop: "zipcod",
width: "100px"
},
{
label: "前一次更新状态",
prop: "presta",
width: "100px"
},
{
label: "当前更新状态",
prop: "sta",
width: "100px"
},
{
label: "变更期数",
prop: "issueno",
width: "100px"
},
{
label: "办理业务状态",
prop: "bizsta",
width: "100px"
},
],
fxdrellstHead:[
{
label: "参与者机构",
prop: "cod",
width: "100px"
},
{
label: "所属直接参与机构号",
prop: "drbankcod",
width: "100px"
},
{
label: "生效日期",
prop: "effdat",
width: "100px"
},
{
label: "上次更新类型",
prop: "preupdtyp",
width: "100px"
},
{
label: "变更期数",
prop: "issueno",
width: "100px"
},
{
label: "更新类型",
prop: "updtyp",
width: "100px"
},
],
fxddcflstHead:[
{
label: "参与者机构",
prop: "cod",
width: "100px"
},
{
label: "证书DN",
prop: "dn",
width: "100px"
},
{
label: "证书SN",
prop: "sn",
width: "100px"
},
{
label: "证书有效期起始日期",
prop: "stadat",
width: "100px"
},
{
label: "证书有效期结束日期",
prop: "enddat",
width: "100px"
},
{
label: "数字证书内容",
prop: "binmsgbdy",
width: "100px"
},
],
filtyp: '',
keyCode: '',
filnam: ''
};
},
watch: {
},
methods: {
// 上传前校检大小
handleBeforeUpload(file) {
// 校检文件大小
const isLt = file.size / 1024 / 1024 < 100;
if (!isLt) {
this.$notify.error(`上传文件大小不能超过 100 MB!`);
return false;
}
this.load = true;
return true;
},
handleSuccess(res, file) {
console.log('=====', res)
if(res.respCode == SUCCESS){
this.filtyp = res.data.filtyp
this.filnam = res.data.filnam
if(res.data.filtyp=='9' || res.data.filtyp=='10'){
this.stmData.columns=this.fxdcomlstHead;
this.stmData.data = res.data.cpsfxdgrp.fxdcomlst
this.keyCode = 'fxdcomlst'
}
if(res.data.filtyp=='11'){
this.stmData.columns=this.fxdtyplstHead;
this.stmData.data = res.data.cpsfxdgrp.fxdtyplst
this.keyCode = 'fxdtyplst'
}
if(res.data.filtyp=='12'){
this.stmData.columns=this.fxdsuelstHead;
this.stmData.data = res.data.cpsfxdgrp.fxdsuelst
this.keyCode = 'fxdsuelst'
}
if(res.data.filtyp=='13' || res.data.filtyp=='14' || res.data.filtyp=='15'){
this.stmData.columns=this.fxdpatlstHead;
this.stmData.data = res.data.cpsfxdgrp.fxdpatlst
this.keyCode = 'fxdpatlst'
}
if(res.data.filtyp=='16' || res.data.filtyp=='17'){
this.stmData.columns=this.fxdrellstHead;
this.stmData.data = res.data.cpsfxdgrp.fxdrellst
this.keyCode = 'fxdrellst'
}
if(res.data.filtyp=='18'){
this.stmData.columns=this.fxddcflstHead;
this.stmData.data = res.data.cpsfxdgrp.fxddcflst
this.keyCode = 'fxddcflst'
}
if(res.data.filtyp=='19'){
this.stmData.columns=this.fxdriglstHead;
this.stmData.data = res.data.cpsfxdgrp.fxdriglst
this.keyCode = 'fxdriglst'
}
}
this.load = false;
this.isDispaly = true;
},
async handleSubmit() {
let rtnmsg = await Api.post("/frontend/fxdsdb/saveXml", {
filtyp: this.filtyp,
filnam: this.filnam,
[this.keyCode]: this.stmData.data
});
if (rtnmsg.respCode == SUCCESS) {
this.stmData.data = "";
this.stmData.columns = "";
this.visible = false;
this.$notify.success({
title: '提示',
message: '提交成功',
});
} else {
this.$notify.error({
title: this.$t("financing.错误"),
message: this.$t("financing.服务请求失败!"),
});
}
},
handleCancel() {
this.stmData.data = "";
this.stmData.columns = "";
this.visible = false;
}
}
};
</script>
<style scoped lang="less"></style>
\ No newline at end of file
<template>
<div class="eContainer-search">
<el-form
:model="model"
:rules="rules"
ref="modelForm"
label-width="100px"
label-position="right"
size="small"
:validate-on-rule-change="false"
>
<c-content>
<m-mainpanel :model="model" :codes="codes" ref="mainpanel"/>
</c-content>
</el-form>
</div>
</template>
<script>
import CodeTable from "~/config/CodeTable";
import Nxysdb from "../model";
import event from "../event"
import Mainpanel from "./Mainpanel.vue"
export default {
name: "Nxysdb",
components:{
"m-mainpanel" : Mainpanel,
},
provide() {
return {
root: this
}
},
mixins: [event],
data(){
return {
tabVal: "mainpanel",
trnName: "nxysdb",
model: new Nxysdb().data,
rules: null,
codes:{...CodeTable},
};
},
methods:{},
created:async function() {},
};
</script>
<style scoped>
</style>
\ No newline at end of file
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