Commit 14481c37 by jianglong

开发外币兑换平盘交易前端逻辑

parent 7be76906
......@@ -6,6 +6,7 @@ export default {
async handleSearch() {
console.log("serach......");
console.log(this.activeTab )
let opndatfrom = this.model.infcon.opndatfrom;
if (!opndatfrom || opndatfrom == "") {
this.$notify.error({
......@@ -24,23 +25,26 @@ export default {
}
this.load = true;
let rtnmsg = await Api.post("/funds/fxdsel/query", {
let rtnmsg = await Api.post("/funds/fxtsel/list"+this.activeTab , {
...this.model.infcon,
dir: ">",
pageNum: this.pagination.pageNum,
pageSize: this.pagination.pageSize,
pageNumber: this.pagination.pageNumber<=0?1:this.pagination.pageNumber,
pageSize: this.pagination.pageSize <=0?10: this.pagination.pageSize,
opndatfrom: moment(opndatfrom).format("YYYY-MM-DD"),
opndatto: moment(opndatto).format("YYYY-MM-DD"),
});
if (rtnmsg.respCode == SUCCESS) {
this.load = false;
this.stmData.data = [];
this.stmData.data = rtnmsg.data.list;
this.pagination = {
pageNum: rtnmsg.data.pageNum || 1,
pageSize: rtnmsg.data.pageSize || 10,
total: rtnmsg.data.total,
};
if (this.activeTab==="jsh"){
this.stmData.data = rtnmsg.data.list;
}
else if(this.activeTab==="dhpp"){
this.stmDataDh.data = rtnmsg.data.list;
}
this.pagination.total = rtnmsg.data.total;
} else {
this.$notify.error({
title: this.$t("financing.错误"),
......@@ -73,15 +77,69 @@ export default {
this.model.infcon.accmng = "";
this.model.infcon.fxtyp = "";
},
//首字母大写
toTitleCase(str){
return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase()
},
// 处理
async handler(row) {
this.handleModel = row;
this.trnUrl = 'funds';
this.inifrm = 'fxtsel';
this.initdialog = true;
},
//双击表格数据
async TableDblRow(row) {
this.handler(row)
},
//点击页签
async handleClickTab(){
switch (this.activeTab){
case 'jsh':
this.titleNam = "结售汇交易列表"
break;
case 'dhpp':
this.titleNam = "外币兑换平盘交易列表"
break;
default:
this.titleNam = "交易列表"
break;
}
},
//单击表格数据
TableRowClick(row) {
this['selectedModel' + this.toTitleCase(this.activeTab)] = row
},
changeOwnref(){
},
async handleClick (btn,row) {
this.routerPush({
path: "/business/" + btn.code.toLowerCase(),
query: { inr: row.inr,pntinr: row.pntinr }
});
this.initdialog = false;
},
// pageSize改变
handleSizeChange(val) {
this.pagination.pageNum = 1;
this.pagination.pageNumber = 1;
this.pagination.pageSize = val;
this.handleSearch();
},
// 页码改变
handleCurrentChange(val) {
this.pagination.pageNum = val;
this.pagination.pageNumber = val;
this.handleSearch();
},
......@@ -110,6 +168,139 @@ toFxtfop() {
});
},
// 详情
async details(row) {
const params = {
ownref: row.ownref,
shgref: row.shgref ? row.shgref.trim() : '',
};
const res = await Api.post('/manager/trn/getTrnListByOwnref', params);
if (res.respCode === SUCCESS) {
if (res.data.length === 1) {
if(this.oldRefId && this.$refs[this.oldRefId]){
this.$refs[this.oldRefId].showPopper = false;
}
this.display(res.data[0])
}else{
this.trnData.data = res.data;
this.oldRefId = 'popover_' + row.inr
this.$refs[this.oldRefId].showPopper = true;
}
}
},
closeDisplayDialog(){
if(this.oldRefId && this.$refs[this.oldRefId]){
this.$refs[this.oldRefId].showPopper = false;
}
},
//Info
toInfo(row,objtyp,subobjtyp){
console.log('activeTab:', this.activeTab.toLowerCase() == 'sg' ? 'br' : this.activeTab.toLowerCase() )
this.routerPush({
path: "/business/" + (this.activeTab.toLowerCase() == 'sg' ? 'br' : this.activeTab.toLowerCase()) + "dinf",
query: { inr: row.inr,objtyp:objtyp,pntinr:row.pntinr,subobjtyp:subobjtyp}
});
},
// 关闭详情弹框
closeDetailsDialog(refId) {
if(refId && this.$refs[refId]){
this.$refs[refId].showPopper = false;
}
},
// 关闭处理弹框
closeHandlerDialog() {
this.initdialog = false;
},
/**
* 打开详情页面
* @param row
*/
display(row) {
if(this.oldRefId && this.$refs[this.oldRefId]){
this.$refs[this.oldRefId].showPopper = false;
}
// 历史快照
if (row.inr.length == 8) {
this.routerPush({
path: '/business/HistoryRecord',
query: {
businessInr: row.inr,
businessType: 'TRN',
type:'view'
}
})
} else if (row.inr.length == 16) {
this.routerPush({
path: `/display/${row.inifrm.toLowerCase()}`,
query: {
businessInr: row.inr,
businessType: 'TRN'
}
});
}
},
checkData(row){
this.routerPush({
path: '/business-new/litdck',
query: {
inr: this.handleModel.inr,brdinr:row.inr
}
});
this.litdckdialog = false
this.$options.methods.closeHandlerDialog.call(this);
},
//修改弹窗状态
changeBtn(isVisible){
this.initdialog = isVisible;
},
//获取码表数据
getCodeTable(tbl,uil,value){
if(uil){
uil='EN'
}
let localCodes = localStorage.getItem('localCodes');
if (localCodes) {
let codeobj = JSON.parse(localCodes)[tbl + '_' + uil + '_COD'];
if(codeobj){
let codeobj = codeobj.filter(m => m.value === value);
return codeobj ? codeobj.label : value;
}else{
return value;
}
}else{
return value;
}
},
//获取码表数据
getCodelabel(value,codenam) {
const codeobj = this.model.dbCodes[codenam].find(obj => obj.value === value)
return codeobj ? codeobj.label : value;
},
async getdbCode(codeType, uil, codeNam) {
let params = {
codeType: codeType,
uil: uil ? uil : 'EN'
}
let rtnmsg = await Api.post("/manager/dic/listDicInfo", params)
if (rtnmsg.respCode === SUCCESS) {
let curList = rtnmsg.data.map(item => ({
value: item.codeValue,
label: item.codeName
}));
this.model.dbCodes[codeNam] = curList
}
},
},
};
......@@ -5,7 +5,7 @@ export default class inffxd {
this.data = {
infcon: {
seaownref: "", // 业务编号 .infcon.seaownref
nam: "", // 业务名称 .infcon.nam
seanam: "", // 业务名称 .infcon.nam
opndat: "", //
opndatfrom: new Date((new Date).getTime() - (7 * 24 * 60 * 60 * 1000)), // 有效日期自 .infcon.opndatfrom
opndatto: new Date(), // Open Date to .infcon.opndatto
......
......@@ -46,9 +46,9 @@
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="业务名称" prop="nam" style="width: 100%">
<el-form-item label="业务名称" prop="seanam" style="width: 100%">
<c-input
v-model="model.infcon.nam"
v-model="model.infcon.seanam"
maxlength="40"
placeholder="请填写业务名称"
>
......@@ -174,35 +174,178 @@
:min-width="item.width"
>
</el-table-column>
<el-table-column fixed="right" prop="op" label="操作" width="180px">
<template slot="header">
<c-col :span="11" style="text-align: center">
<span>操作</span>
</c-col>
</template>
<template slot-scope="scope">
<c-button style="margin-right: 5px" size="small" type="text" @click="handler(scope.row)">处理
</c-button>
<span> </span>
<el-popover
trigger="manual"
v-clickOutside="closeDisplayDialog" placement="top-end" title="历史信息" width="1200" :ref="'popover_' + scope.row.inr">
<div style="text-align: right;margin-top: -30px;margin-right: 5px;font-size: 16px;">
<span class="el-icon-close" style="cursor: pointer" @click="closeDetailsDialog('popover_' + scope.row.inr)"></span>
</div>
<el-table :data="trnData.data" :columns="trnData.columns" :showButtonFlg="true">
<el-table-column v-for="(item, key) in trnData.columns" :key="key" :label="item.label" :prop="item.prop" :width="item.width">
<template slot-scope="scope">
<div>{{ scope.row[item.prop] }}</div>
</template>
</el-table-column>
<el-table-column fixed="right" prop="op" label="操作" width="100px">
<template slot-scope="scope">
<c-button style="margin-left: 0" size="small" @click="display(scope.row)">快照
</c-button>
</template>
</el-table-column>
</el-table>
<c-button style="margin-left: 0" type="text" size="small" slot="reference" @click="details(scope.row)">
快照
</c-button>
<c-button style="margin-left: 0" type="text" size="small" slot="reference" @click="toInfo(scope.row,'FXD')">
Info
</c-button>
</el-popover>
</template>
</el-table-column>
</el-table>
<div class="pagination-box"
style="display:block">
<el-pagination
layout="total, sizes, prev, pager, next, jumper"
:total="pagination.total"
:page-size="pagination.pageSize"
:current-page.sync="pagination.pageNumber"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
>
</el-pagination>
</div>
</el-tab-pane>
<el-tab-pane label="外币兑换平盘查询" name="dhpp">
<el-table
:data="stmDataDh.data"
:columns="stmDataDh.columns"
v-loading="load"
style="width: 100%"
size="small"
:border="true"
height="calc(100vh - 480px)"
:highlight-current-row="true"
>
<el-table-column
v-for="(item, key) in stmDataDh.columns"
:key="key"
:label="item.label"
:prop="item.prop"
:min-width="item.width"
>
</el-table-column>
<el-table-column fixed="right" prop="op" label="操作" width="180px">
<template slot="header">
<c-col :span="11" style="text-align: center">
<span>操作</span>
</c-col>
</template>
<template slot-scope="scope">
<c-button style="margin-right: 5px" size="small" type="text" @click="handler(scope.row)">处理
</c-button>
<span> </span>
<el-popover
trigger="manual"
v-clickOutside="closeDisplayDialog" placement="top-end" title="历史信息" width="1200" :ref="'popover_' + scope.row.inr">
<div style="text-align: right;margin-top: -30px;margin-right: 5px;font-size: 16px;">
<span class="el-icon-close" style="cursor: pointer" @click="closeDetailsDialog('popover_' + scope.row.inr)"></span>
</div>
<el-table :data="trnData.data" :columns="trnData.columns" :showButtonFlg="true">
<el-table-column v-for="(item, key) in trnData.columns" :key="key" :label="item.label" :prop="item.prop" :width="item.width">
<template slot-scope="scope">
<div>{{ scope.row[item.prop] }}</div>
</template>
</el-table-column>
<el-table-column fixed="right" prop="op" label="操作" width="100px">
<template slot-scope="scope">
<c-button style="margin-left: 0" size="small" @click="display(scope.row)">快照
</c-button>
</template>
</el-table-column>
</el-table>
<c-button style="margin-left: 0" type="text" size="small" slot="reference" @click="details(scope.row)">
快照
</c-button>
<c-button style="margin-left: 0" type="text" size="small" slot="reference" @click="toInfo(scope.row,'FXD')">
Info
</c-button>
</el-popover>
</template>
</el-table-column>
</el-table>
<div class="pagination-box"
style="display:block">
<el-pagination
layout="total, sizes, prev, pager, next, jumper"
:total="pagination.total"
:page-size="pagination.pageSize"
:current-page.sync="pagination.pageNum"
:current-page.sync="pagination.pageNumber"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
>
</el-pagination>
</div>
</el-tab-pane>
</el-tabs>
</c-col>
</div>
</el-col>
<!-- 点击处理弹框 -->
<el-dialog v-dialogDrag v-if="initdialog" :visible.sync="initdialog" :title="titleNam" append-to-body width="70%">
<m-busbtn ref="childs" :trnUrl="trnUrl" :inifrm="inifrm" :activeTab="activeTab" :model="handleModel" @onChoose="handleClick"></m-busbtn>
</el-dialog>
<!--业务锁及待处理数据弹窗-->
<m-chklap ref="lockAndPending" @changeBtn="changeBtn"></m-chklap>
</div>
</template>
<script>
import event from "../event";
import BusNavbar from "~/components/business/BusNavbar1";
import CheckLockAndPending from "~/components/business/CheckLockAndPending";
export default {
inject: ["root"],
props: ["model", "codes"],
mixins: [event],
components: {
"m-busbtn": BusNavbar,
"m-chklap": CheckLockAndPending,
},
data() {
return {
activeTab: "jsh",
load: false,
sptVisible:false,
dealSptData:[],
selectedModelFx:{},
handleModel:{},
queryCon:{},
trnUrl:"",
inifrm:"",
oldRefId:"",
load:false,
titleNam:"结售汇/兑换平盘交易列表",
stmData: {
columns: [
{
......@@ -364,16 +507,227 @@ export default {
data: [],
},
stmDataDh: {
columns: [
{
label: "业务编号",
prop: "ownref",
width: "180px",
},
{
label: "业务名称",
prop: "nam",
width: "180px",
},
{
label: "客户名称",
prop: "ownusr",
width: "120px",
},
{
label: "资金部经办人",
prop: "usr",
width: "120px",
},
{
label: "外汇交易类型",
prop: "fxtyp",
width: "120px",
},
{
label: "成交日期",
prop: "opndat",
width: "120px",
},
{
label: "起息日",
prop: "valdat",
width: "120px",
},
{
label: "平盘牌价",
prop: "rat",
width: "120px",
},
{
label: "中间价",
prop: "midrat",
width: "120px",
},
{
label: "询价编号",
prop: "quoref",
width: "120px",
},
{
label: "资金部编号",
prop: "fudref",
width: "120px",
},
{
label: "平盘日期",
prop: "setdat",
width: "120px",
},
{
label: "择期交割起始日",
prop: "setdatfrm",
width: "160px",
},
{
label: "择期交割截止日",
prop: "setdatto",
width: "160px",
},
{
label: "结算日期",
prop: "clsdat",
width: "120px",
},
{
label: "版本",
prop: "ver",
width: "120px",
},
{
label: "分支机构编号",
prop: "branchinr",
width: "120px",
},
{
label: "分支机构关键编号",
prop: "bchkeyinr",
width: "160px",
},
{
label: "交易主体",
prop: "trnman",
width: "120px",
},
{
label: "交易内部编号",
prop: "trdint",
width: "120px",
},
{
label: "交易外部编号",
prop: "trdout",
width: "120px",
},
{
label: "外币结算账号",
prop: "acc",
width: "120px",
},
{
label: "本币结算账号",
prop: "acc2",
width: "120px",
},
{
label: "处置1",
prop: "dsp",
width: "120px",
},
{
label: "处置2",
prop: "dsp2",
width: "120px",
},
{
label: "现金覆盖率",
prop: "cshpct",
width: "120px",
},
{
label: "账户经理",
prop: "accmng",
width: "120px",
},
{
label: "汇率",
prop: "rat1",
width: "120px",
},
{
label: "账户经理部门",
prop: "hdbch",
width: "120px",
},
{
label: "实体外部键",
prop: "etyextkey",
width: "120px",
},
],
data: [],
},
// 快照
trnData: {
columns: [
{
label: "业务编号",
prop: "ownref",
width:"160"
},
{
label: "交易名称",
prop: "inifrmname",
width:"220"
},
{
label: "交易码",
prop: "inifrm",
width:"100"
},
{
label: "交易时间",
prop: "inidattim",
width:"160"
},
{
label: "状态",
prop: "relflgName",
width:"100"
},
{
label: "币种",
prop: "reloricur",
width:"100"
},
{
label: "金额",
prop: "reloriamt",
width:"150"
},
],
data: []
},
// 处理
initdialog: false,
handlerDataList: [],
pagination: {
pageNum: 1,
pageNumber: 1,
pageSize: 10,
total: 0,
total: 0
},
};
},
methods: {},
mounted: function () {},
mounted () {
this.getdbCode('lcrtyp','EN','lcrtyp');
this.getdbCode('avbby0','EN','avbby');
},
created: function() {}
};
</script>
<style lang="less" scoped>
......
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