Commit 5205bbac by 李少勇

msgsel 交易优化修改

parent ecdd524f
import Api from "~/service/Api";
import moment from "moment";
import getSubtyp from '~/page/Frontend/Rcvsel/event/getSubtyp.js';
import Msgsel from '../model';
import Utils from "~/utils";
export default {
mixins: [getSubtyp],
methods: {
async handleSearch() {
let rcvdatsta = this.model.sndp.rcvdatsta;
......@@ -34,12 +36,12 @@ export default {
if (rtnmsg.respCode == SUCCESS) {
this.load = false;
this.stmData.data = [];
const {list} = rtnmsg.data;
const {codes:{stacod}} = this;
const { list } = rtnmsg.data;
const { codes: { stacod } } = this;
list.forEach(v=>{
for(let i in stacod){
if(stacod[i].value == v.sta){
list.forEach(v => {
for (let i in stacod) {
if (stacod[i].value == v.sta) {
v.sta = stacod[i].label;
}
}
......@@ -59,7 +61,9 @@ export default {
this.load = false;
},
async handleReset() {
this.model = new Msgsel().data;
let resetModel = new Msgsel().data
Utils.copyValueFromVoData(this.model, resetModel);
this.handleSearch();
},
// pageSize改变
handleSizeChange(val) {
......@@ -72,7 +76,7 @@ export default {
this.pagination.pageNum = val;
this.handleSearch();
},
handleSelectionChange(val){
handleSelectionChange(val) {
this.multipleSelection = val;
}
},
......
import Utils from "~/utils"
export default {
"sndp.rcvdatsta": [
{ type: "date", required: false, message: "输入正确的日期" }
],
"sndp.rcvdatend": [
{ type: "date", required: false, message: "输入正确的日期" }
],
"sndp.sndbak": [
{ type: "string", required: false, message: "必输项" },
{ max: 0, message: "长度不能超过0" }
],
"sndp.revbak": [
{ type: "string", required: false, message: "必输项" },
{ max: 0, message: "长度不能超过0" }
],
"sndp.actbic": [
{ type: "string", required: false, message: "必输项" },
{ max: 0, message: "长度不能超过0" }
],
"sndp.ownref": [
{ type: "string", required: false, message: "必输项" },
{ max: 0, message: "长度不能超过0" }
],
"sndp.othref": [
{ type: "string", required: false, message: "必输项" },
{ max: 0, message: "长度不能超过0" }
],
"sndp.uetr": [
{ type: "string", required: false, message: "必输项" },
{ max: 0, message: "长度不能超过0" }
],
/**
* Msgsel Check规则
*/
let checkObj = {
"sndp.othref" :null,
"sndp.msgtyp" :null,
"sndp.ownref" :null,
"sndp.uetr" :null,
"sndp.revbak" :null,
"sndp.sndbak" :null,
"sndp.actbic" :null,
}
"sndp.act": [
{ type: "string", required: false, message: "必输项" },
{ max: 0, message: "长度不能超过0" }
],
"sndp.lcnb": [
{ type: "string", required: false, message: "必输项" },
{ max: 0, message: "长度不能超过0" }
],
for (const key in checkObj) {
if (Object.hasOwnProperty.call(checkObj, key)) {
checkObj[key] = checkObj[key] ? checkObj[key] : Utils.reflectCheck(key)
}
}
export default checkObj
"sndp.amtmin": [
{ type: "string", required: false, message: "必输项" },
{ max: 18, message: "长度不能超过18" }
],
"sndp.amtmax": [
{ type: "string", required: false, message: "必输项" },
{ max: 18, message: "长度不能超过18" }
],
"sndp.usrnam": [
{ type: "string", required: false, message: "必输项" },
{ max: 0, message: "长度不能超过0" }
],
}
\ No newline at end of file
/**
* Msgsel Default规则
*/
import Api from "~/service/Api";
import Utils from "~/utils/index"
export default {
}
//你可以添加自动default处理
import Api from "~/service/Api"
import Utils from "~/utils"
export default {
async onSndpSchbtn(){
let rtnmsg = await this.executeRule("sndp.schbtn")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
async onSndpClrbtn(){
let rtnmsg = await this.executeRule("sndp.clrbtn")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
async onSndpNewmsg(){
let rtnmsg = await this.executeRule("sndp.newmsg")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
async onSndpRtn(){
let rtnmsg = await this.executeRule("sndp.rtn")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
}
\ No newline at end of file
export default {
"sndp.rcvdatsta":[
{type: "date", required: false, message: "输入正确的日期"}
],
"sndp.rcvdatend":[
{type: "date", required: false, message: "输入正确的日期"}
],
"sndp.sndbak":[
{type: "string", required: false, message: "必输项"},
{max: 0,message:"长度不能超过0"}
],
"sndp.revbak":[
{type: "string", required: false, message: "必输项"},
{max: 0,message:"长度不能超过0"}
],
"sndp.actbic":[
{type: "string", required: false, message: "必输项"},
{max: 0,message:"长度不能超过0"}
],
"sndp.ownref":[
{type: "string", required: false, message: "必输项"},
{max: 0,message:"长度不能超过0"}
],
"sndp.othref":[
{type: "string", required: false, message: "必输项"},
{max: 0,message:"长度不能超过0"}
],
"sndp.uetr":[
{type: "string", required: false, message: "必输项"},
{max: 0,message:"长度不能超过0"}
],
"sndp.act":[
{type: "string", required: false, message: "必输项"},
{max: 0,message:"长度不能超过0"}
],
"sndp.lcnb":[
{type: "string", required: false, message: "必输项"},
{max: 0,message:"长度不能超过0"}
],
"sndp.amtmin":[
{type: "string", required: false, message: "必输项"},
{max: 18,message:"长度不能超过18"}
],
"sndp.amtmax":[
{type: "string", required: false, message: "必输项"},
{max: 18,message:"长度不能超过18"}
],
"sndp.usrnam":[
{type: "string", required: false, message: "必输项"},
{max: 0,message:"长度不能超过0"}
],
}
\ No newline at end of file
......@@ -34,7 +34,6 @@ export default class Msgsel {
msggrp: {
rcvlst: [], // .msggrp.rcvlst
},
pageId: "" // ctx的key
}
}
}
\ No newline at end of file
......@@ -6,6 +6,19 @@
<el-row>
<c-col :span="24">
<c-col :span="8">
<el-form-item label="报文标准" prop="" style="width: 100%">
<c-select v-model="model.sndp.msgtyp" style="width: 100%" :code="codes.msgtyp3" @change="getSubtyp(model.sndp.msgtyp, 'sndp.subtyp')" />
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="报文类型" prop="subtype" style="width: 100%">
<el-select v-model="model.sndp.subtyp">
<el-option v-for="code in subtypCodes" :key="code.label" :label="code.label" :value="code.value">
</el-option>
</el-select>
</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.sndp.rcvdatsta" style="width: 100%"></c-date-picker>
......@@ -18,21 +31,6 @@
</c-col>
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="报文标准" prop="" style="width: 100%">
<c-select v-model="model.sndp.msgtyp" style="width: 100%"
:code="codes.msgtyp3"/>
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="报文类型" prop="subtype" style="width: 100%">
<el-select v-model="model.sndp.subtyp">
<el-option v-for="code in subtypCodes" :key="code.label" :label="code.label" :value="code.value">
</el-option>
</el-select>
</el-form-item>
</c-col>
</c-col>
</el-row>
<!-- 可控展示区 -->
......@@ -40,69 +38,58 @@
<c-col :span="24">
<c-col :span="8">
<el-form-item label="发报行BIC" prop="" style="width: 100%">
<c-input v-model="model.sndp.sndbak" style="width: 100%"/>
<c-input v-model="model.sndp.sndbak" style="width: 100%" />
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="收报行BIC" prop="" style="width: 100%">
<c-input v-model="model.sndp.revbak" style="width: 100%"/>
<c-input v-model="model.sndp.revbak" style="width: 100%" />
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="账户行BIC" prop="" style="width: 100%">
<c-input v-model="model.sndp.actbic" style="width: 100%"/>
<c-input v-model="model.sndp.actbic" style="width: 100%" />
</el-form-item>
</c-col>
</c-col>
<c-col :span="24">
<c-col :span="8">
<el-form-item label="20域编号" prop="" style="width: 100%">
<c-input v-model="model.sndp.ownref" style="width: 100%"/>
<c-input v-model="model.sndp.ownref" style="width: 100%" />
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="21域编号" prop="" style="width: 100%">
<c-input v-model="model.sndp.othref" style="width: 100%"/>
<c-input v-model="model.sndp.othref" style="width: 100%" />
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="币种" prop="" style="width: 100%">
<c-select v-model="model.sndp.cur" dbCode="curtxt" style="width: 100%"/>
<c-select v-model="model.sndp.cur" dbCode="curtxt" style="width: 100%" />
</el-form-item>
</c-col>
</c-col>
<c-col :span="24">
<c-col :span="8">
<el-form-item label="账号" prop="" style="width: 100%">
<c-input v-model="model.sndp.act" style="width: 100%"/>
<c-input v-model="model.sndp.act" style="width: 100%" />
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="费用明细" prop="" style="width: 100%">
<c-select :code="codes.dtlchg" v-model="model.sndp.dtlchg" style="width: 100%"/>
<c-select :code="codes.dtlchg" v-model="model.sndp.dtlchg" style="width: 100%" />
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item
:label="$t('lc.金额区间')"
style="width: 100%"
>
<el-form-item :label="$t('lc.金额区间')" style="width: 100%">
<c-col :span="11">
<c-input
v-model="model.sndp.amtmin"
:placeholder="$t('lc.请输入金额下限')"
style="width: 100%"
></c-input>
<c-input v-model="model.sndp.amtmin" :placeholder="$t('lc.请输入金额下限')" style="width: 100%"></c-input>
</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-input
v-model="model.sndp.amtmax"
:placeholder="$t('lc.请输入金额上限')"
style="width: 100%"
></c-input>
<c-input v-model="model.sndp.amtmax" :placeholder="$t('lc.请输入金额上限')" style="width: 100%"></c-input>
</c-col>
</el-form-item>
</c-col>
......@@ -110,12 +97,13 @@
<c-col :span="24">
<c-col :span="8">
<el-form-item label="处理状态" prop="" style="width: 100%">
<c-select :code="codes.sta1.filter(s=>s.value==='V')" disabled v-model="model.sndp.sta" style="width: 100%"/>
<c-select :code="codes.sta1" :filterKey="['V']" disabled v-model="model.sndp.sta"
style="width: 100%" />
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="操作员" prop="" style="width: 100%">
<c-input v-model="model.sndp.usrnam" style="width: 100%"/>
<c-input v-model="model.sndp.usrnam" style="width: 100%" />
</el-form-item>
</c-col>
</c-col>
......@@ -124,11 +112,11 @@
</c-list-search>
<el-col :span="24" style="margin-top: 2px;margin-bottom: 1px;">
<c-button :disabled="isFoldDisable" class="medium_bcs" size="medium" style="margin-left: 0"
type="primary">{{ $t('public.归档') }}
<c-button :disabled="isFoldDisable" class="medium_bcs" size="medium" style="margin-left: 0" type="primary">
{{ $t('public.归档') }}
</c-button>
<c-button :disabled="isRoutingDisable" class="medium_bcs" size="medium"
style="margin-left: 20" type="primary">ReRouting
<c-button :disabled="isRoutingDisable" class="medium_bcs" size="medium" style="margin-left: 20" type="primary">
ReRouting
</c-button>
<c-button class="medium_bcs" size="medium" style="margin-left: 20" type="primary">
{{ $t('public.导出Excel') }}
......@@ -138,36 +126,45 @@
<el-col :span="24" style="margin-top: 10px">
<div>
<c-col :span="24">
<el-tabs v-model="activeTab" class="y-tabs">
<el-tab-pane label="报文复核" name="fb">
<el-table :data="stmData.data" :columns="stmData.columns" v-loading="load" style="width: 100%"
@selection-change="handleSelectionChange"
size="small" :border="true" height="calc(100vh - 420px)" :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"
<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"
:min-width="item.width">
<template slot-scope="scope">
<c-select-value-to-label v-if="item.prop == 'sta'" v-model="scope.row.sta" :code="codes.stacod"></c-select-value-to-label>
<c-select-value-to-label v-else-if="item.prop == 'rspsta'" v-model="scope.row.rspsta" :code="codes.rspsta"></c-select-value-to-label>
<span v-else-if="item.prop == 'amt'">{{ moneyFormat(scope.row.amt, scope.row.cur) }}</span>
<span v-else>{{ scope.row[item.prop] }}</span>
</template>
</el-table-column>
<el-table-column fixed="right" prop="op" label="操作" width="140px">
<el-table-column fixed="right" prop="op" label="操作" width="100px">
<template slot="header">
<c-col :span="11" style="text-align: center">
<span>操作</span>
</c-col>
</template>
<template slot-scope="scope">
<c-button style="margin-left: 0" type='primary' size="small" slot="reference">复核
<c-button style="margin-left: 0" type='text' size="small" slot="reference">复核
</c-button>
</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"
<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>
</el-tab-pane>
</el-tabs>
</c-col>
</div>
</el-col>
......@@ -182,7 +179,6 @@ export default {
mixins: [event],
data() {
return {
activeTab: 'fb',
load: false,
subtypCodes: [],
multipleSelection: [],
......@@ -191,12 +187,12 @@ export default {
{
label: "起息日",
prop: "valdat",
width: "180px"
width: "120px"
},
{
label: "20域编号",
prop: "ownref",
width: "180px"
width: "120px"
},
{
label: "21域名编号",
......@@ -211,7 +207,7 @@ export default {
{
label: "币种",
prop: "cur",
width: "120px"
width: "80px"
},
{
label: "金额",
......@@ -246,17 +242,17 @@ export default {
{
label: "发报行BIC",
prop: "sndbic",
width: "120px"
width: "130px"
},
{
label: "收报行BIC",
prop: "rcvbic",
width: "120px"
width: "130px"
},
{
label: "报文标准",
prop: "msgtyp",
width: "150px"
width: "120px"
},
{
label: "报文类型",
......@@ -302,23 +298,7 @@ export default {
}
},
watch: {
'model.sndp.msgtyp': {
handler: function (newTyp, oldTyp) {
// 把已经选择的 subtyp 重置
this.model.sndp.subtyp = '';
const {codes} = this;
if (newTyp === 'sf2') {
this.subtypCodes = codes.mttyp;
} else if (newTyp === 'iso') {
this.subtypCodes = codes.isotyp;
} else if (newTyp === 'txt') {
this.subtypCodes = codes.fmttyp;
} else {
this.subtypCodes = codes.cipstyp;
}
},
deep: true
}
},
methods: {},
mounted: function () {
......
......@@ -22,19 +22,17 @@
import event from "../event"
import Msgpnl from "./Msgpnl.vue"
export default {
name: "Msgsel",
components:{
"m-msgpnl" : Msgpnl,
},
provide() {
return {
root: this
}
},
mixins: [event], // 里面包含了Default、Check等的公共处理
mixins: [event],
data(){
return {
tabVal: "msgpnl",
......
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