Commit 1cd9e78e by 李少勇

cpswjz 交易优化修改

parent 0cd920d8
import Api from "~/service/Api";
import moment from "moment";
import Cpswjz from "../model";
import Utils from "~/utils";
export default {
methods: {
async handleSearch() {
let rcvdatsta = this.model.sndp.rcvdatsta;
if (!rcvdatsta || rcvdatsta == "") {
this.$notify.error({
title: this.$t("financing.错误"),
message: this.$t("financing.查询开始日期必输!"),
});
return;
}
let rcvdatend = this.model.sndp.rcvdatend;
if (!rcvdatend || rcvdatend == "") {
this.$notify.error({
title: this.$t("financing.错误"),
message: this.$t("financing.查询结束日期必输!"),
});
return;
}
methods: {
async handleSearch() {
let stadat = this.model.wlzp.stadat;
if (!stadat || stadat == "") {
this.$notify.error({
title: this.$t("financing.错误"),
message: this.$t("financing.查询开始日期必输!"),
});
return;
}
let enddat = this.model.wlzp.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/msgsel/query", {
...this.model.sndp,
dir: ">",
pageNum: this.pagination.pageNum,
pageSize: this.pagination.pageSize,
rcvdatsta: moment(rcvdatsta).format("YYYY-MM-DD"),
rcvdatend: moment(rcvdatend).format("YYYY-MM-DD"),
});
if (rtnmsg.respCode == SUCCESS) {
this.load = false;
this.stmData.data = [];
const {list} = rtnmsg.data;
const {codes:{sta1}} = this;
list.forEach(v=>{
for(let i in sta1){
if(sta1[i].value == v.sta){
v.sta = sta1[i].label;
}
}
})
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() {
this.model.sndp.msgtyp = "";
this.model.sndp.rcvdatsta = new Date();
this.model.sndp.rcvdatend = new Date();
this.model.sndp.subtyp = "";
this.model.sndp.sndbak = "";
this.model.sndp.revbak = "";
this.model.sndp.actbic = "";
this.model.sndp.othref = "";
this.model.sndp.ownref = "";
this.model.sndp.cur = "";
this.model.sndp.act = "";
this.model.sndp.amtmin = "";
this.model.sndp.amtmax = "";
this.model.sndp.chnipt = "";
this.model.sndp.rspsta = "";
this.model.sndp.dtlchg = "";
this.model.sndp.sta = "";
},
// 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;
}
this.load = true;
let rtnmsg = await Api.post("/frontend/cpswjz/query", {
...this.model.wlzp,
dir: ">",
pageNum: this.pagination.pageNum,
pageSize: this.pagination.pageSize,
stadat: moment(stadat).format("YYYY-MM-DD"),
enddat: moment(enddat).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: parseInt(rtnmsg.data.total),
};
} else {
this.$notify.error({
title: this.$t("financing.错误"),
message: this.$t("financing.服务请求失败!"),
});
}
this.load = false;
},
async handleReset() {
let resetModel = new Cpswjz().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;
}
},
};
import Utils from "~/utils"
/**
* Cpssxf Check规则
*/
let checkObj = {
}
for (const key in checkObj) {
if (Object.hasOwnProperty.call(checkObj, key)) {
checkObj[key] = checkObj[key] ? checkObj[key] : Utils.reflectCheck(key)
}
}
export default checkObj
export default {
"sxfp.stadat": [
{ type: "date", required: false, message: "输入正确的日期" }
],
"sxfp.enddat": [
{ type: "date", required: false, message: "输入正确的日期" }
],
}
\ No newline at end of file
/**
* Cpssxf 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 onSxfpSel(){
let rtnmsg = await this.executeRule("sxfp.sel")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
async onSxfpClr(){
let rtnmsg = await this.executeRule("sxfp.clr")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
async onSxfpAdd(){
let rtnmsg = await this.executeRule("sxfp.add")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
async onSxfpDvd(){
let rtnmsg = await this.executeRule("sxfp.dvd")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
async onSxfpPfa(){
let rtnmsg = await this.executeRule("sxfp.pfa")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
}
\ No newline at end of file
export default {
"sxfp.stadat":[
{type: "date", required: false, message: "输入正确的日期"}
],
"sxfp.enddat":[
{type: "date", required: false, message: "输入正确的日期"}
],
}
\ No newline at end of file
import Api from "~/service/Api"
import Pts from "~/page/Model/Common/Pts"
export default class Cpssxf{
constructor () {
this.data = {
wlzp:{
stadat:"", // 收报日期(查询) .wlzp.stadat
enddat:"", // 发报日期(查询) .wlzp.enddat
exp:"", // 导出 .sxfp.exp
},
sxfgrp:{
sxflst:[], // .sxfgrp.sxflst
},
pageId: "" // ctx的key
}
export default class Cpswjz {
constructor() {
this.data = {
wlzp: {
stadat: "",
enddat: "",
msgtyp: "",
subtyp: "",
sndbic: "",
rcvbic: "",
bwbzh: "",
glckh: "",
cur: "",
act: "",
amtmin: "",
amtmax: "",
rspsta: "",
chnipt: "",
exp: "",
},
sxfgrp: {
sxflst: [],
},
}
}
}
\ No newline at end of file
......@@ -18,7 +18,7 @@
<el-form-item label="发报日期" prop="rcvdatsta" style="width: 100%">
<c-date-picker
type="date"
v-model="model.wlzp.stadat"
v-model="model.wlzp.enddat"
style="width: 100%"
></c-date-picker>
</el-form-item>
......@@ -90,15 +90,13 @@
</c-col>
<c-col :span="24">
<c-col :span="8">
<el-form-item label="消息处理状态" prop="" style="width: 100%">
<c-select v-model="model.wlzp.rspsta" style="width: 100%"
:code="codes.rspsta"/>
<el-form-item label="处理状态" prop="" style="width: 100%">
<c-select v-model="model.wlzp.rspsta" style="width: 100%" :code="codes.rspsta"/>
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="行内系统" prop="" style="width: 100%">
<c-select v-model="model.wlzp.chnipt" style="width: 100%"
:code="codes.chnipt"/>
<c-select v-model="model.wlzp.chnipt" style="width: 100%" :code="codes.chnipt"/>
</el-form-item>
</c-col>
</c-col>
......@@ -134,43 +132,46 @@
</el-col>
<el-col :span="24" style="margin-top: 10px">
<div style="height: 90%">
<div>
<c-col :span="24">
<el-tabs v-model="activeTab" class="y-tabs">
<el-tab-pane label="CIPS未记账记录查询" 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 - 480px)"
: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"
>
</el-table-column>
</el-table>
<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 == 'msgtyp'" v-model="scope.row.msgtyp" :code="codes.msgtyp3"></c-select-value-to-label>
<c-select-value-to-label v-if="item.prop == 'rspsta'" v-model="scope.row.rspsta" :code="codes.rspsta"></c-select-value-to-label>
<c-select-value-to-label v-if="item.prop == 'chnipt'" v-model="scope.row.chnipt" :code="codes.chnipt"></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>
<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>
<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>
......@@ -185,7 +186,6 @@ export default {
mixins: [event],
data() {
return {
activeTab: "fb",
load: false,
subtypCodes: [],
multipleSelection: [],
......@@ -193,82 +193,77 @@ export default {
columns: [
{
label: "起始日",
prop: "sta",
prop: "valdat",
width: "120px",
},
{
label: "报文标识号",
prop: "amt",
prop: "bwbzh",
width: "120px",
},
{
label: "关联参考号",
prop: "stadat",
prop: "glckh",
width: "120px",
},
{
label: "币种",
prop: "enddat",
width: "120px",
prop: "cur",
width: "80px",
},
{
label: "金额",
prop: "enddat",
prop: "amt",
width: "120px",
},
{
label: "账号",
prop: "enddat",
prop: "act",
width: "120px",
},
{
label: "子系统",
prop: "enddat",
prop: "zxt",
width: "120px",
},
{
label: "行内系统",
prop: "enddat",
width: "120px",
},
{
label: "收发方",
prop: "enddat",
prop: "chnipt",
width: "120px",
},
{
label: "处理状态",
prop: "enddat",
prop: "rspsta",
width: "120px",
},
{
label: "发报行BIC",
prop: "enddat",
prop: "sndbic",
width: "120px",
},
{
label: "收报行BIC",
prop: "enddat",
prop: "rcvbic",
width: "120px",
},
{
label: "报文标",
prop: "enddat",
label: "报文标",
prop: "msgtyp",
width: "120px",
},
{
label: "报文标",
prop: "enddat",
label: "GPI标识",
prop: "gpi",
width: "120px",
},
{
label: "报文类",
prop: "enddat",
label: "报文类",
prop: "subtyp",
width: "120px",
},
{
label: "日夜间标",
prop: "enddat",
prop: "ryjb",
width: "120px",
},
],
......
<template>
<div class="eContainer-search">
<el-form
:model="model"
:rules="rules"
ref="modelForm"
label-width="120px"
label-position="right"
size="small"
:validate-on-rule-change="false"
:model="model"
:rules="rules"
ref="modelForm"
label-width="120px"
label-position="right"
size="small"
:validate-on-rule-change="false"
>
<c-content>
<m-mainpl :model="model" :codes="codes" ref="mainpl"/>
......@@ -16,30 +16,26 @@
</div>
</template>
<script>
import CodeTable from "~/config/CodeTable";
import Cpssxf from "../model";
import Cpswjz from "../model";
import event from "../event"
import Mainplwjz from "./Mainplwjz.vue"
export default {
name: "Cpswjz",
components:{
"m-mainpl" : Mainplwjz,
},
provide() {
return {
root: this
}
},
mixins: [event], // 里面包含了Default、Check等的公共处理
mixins: [event],
data(){
return {
tabVal: "mainpl",
trnName: "cpssxf",
model: new Cpssxf().data,
trnName: "cpswjz",
model: new Cpswjz().data,
rules: null,
codes:{...CodeTable},
};
......
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