Commit 5205bbac by 李少勇

msgsel 交易优化修改

parent ecdd524f
import Api from "~/service/Api"; import Api from "~/service/Api";
import moment from "moment"; import moment from "moment";
import getSubtyp from '~/page/Frontend/Rcvsel/event/getSubtyp.js';
import Msgsel from '../model'; import Msgsel from '../model';
import Utils from "~/utils";
export default { export default {
methods: { mixins: [getSubtyp],
async handleSearch() { methods: {
let rcvdatsta = this.model.sndp.rcvdatsta; async handleSearch() {
if (!rcvdatsta || rcvdatsta == "") { let rcvdatsta = this.model.sndp.rcvdatsta;
this.$notify.error({ if (!rcvdatsta || rcvdatsta == "") {
title: this.$t("financing.错误"), this.$notify.error({
message: this.$t("financing.查询开始日期必输!"), title: this.$t("financing.错误"),
}); message: this.$t("financing.查询开始日期必输!"),
return; });
} return;
let rcvdatend = this.model.sndp.rcvdatend; }
if (!rcvdatend || rcvdatend == "") { let rcvdatend = this.model.sndp.rcvdatend;
this.$notify.error({ if (!rcvdatend || rcvdatend == "") {
title: this.$t("financing.错误"), this.$notify.error({
message: this.$t("financing.查询结束日期必输!"), title: this.$t("financing.错误"),
}); message: this.$t("financing.查询结束日期必输!"),
return; });
} return;
}
this.load = true; this.load = true;
let rtnmsg = await Api.post("/frontend/msgsel/query", { let rtnmsg = await Api.post("/frontend/msgsel/query", {
...this.model.sndp, ...this.model.sndp,
dir: "<", dir: "<",
pageNum: this.pagination.pageNum, pageNum: this.pagination.pageNum,
pageSize: this.pagination.pageSize, pageSize: this.pagination.pageSize,
rcvdatsta: moment(rcvdatsta).format("YYYY-MM-DD"), rcvdatsta: moment(rcvdatsta).format("YYYY-MM-DD"),
rcvdatend: moment(rcvdatend).format("YYYY-MM-DD"), rcvdatend: moment(rcvdatend).format("YYYY-MM-DD"),
}); });
if (rtnmsg.respCode == SUCCESS) { if (rtnmsg.respCode == SUCCESS) {
this.load = false; this.load = false;
this.stmData.data = []; this.stmData.data = [];
const {list} = rtnmsg.data; const { list } = rtnmsg.data;
const {codes:{stacod}} = this; const { codes: { stacod } } = this;
list.forEach(v=>{ list.forEach(v => {
for(let i in stacod){ for (let i in stacod) {
if(stacod[i].value == v.sta){ if (stacod[i].value == v.sta) {
v.sta = stacod[i].label; v.sta = stacod[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.stmData.data = list;
this.model = new Msgsel().data; this.pagination = {
}, pageNum: rtnmsg.data.pageNum || 1,
// pageSize改变 pageSize: rtnmsg.data.pageSize || 10,
handleSizeChange(val) { total: parseInt(rtnmsg.data.total),
this.pagination.pageNum = 1; };
this.pagination.pageSize = val; } else {
this.handleSearch(); this.$notify.error({
}, title: this.$t("financing.错误"),
// 页码改变 message: this.$t("financing.服务请求失败!"),
handleCurrentChange(val) { });
this.pagination.pageNum = val; }
this.handleSearch(); this.load = false;
}, },
handleSelectionChange(val){ async handleReset() {
this.multipleSelection = val; let resetModel = new Msgsel().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" 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": [
* Msgsel Check规则 { type: "string", required: false, message: "必输项" },
*/ { max: 0, message: "长度不能超过0" }
let checkObj = { ],
"sndp.othref" :null, "sndp.lcnb": [
"sndp.msgtyp" :null, { type: "string", required: false, message: "必输项" },
"sndp.ownref" :null, { max: 0, message: "长度不能超过0" }
"sndp.uetr" :null, ],
"sndp.revbak" :null,
"sndp.sndbak" :null,
"sndp.actbic" :null,
}
for (const key in checkObj) { "sndp.amtmin": [
if (Object.hasOwnProperty.call(checkObj, key)) { { type: "string", required: false, message: "必输项" },
checkObj[key] = checkObj[key] ? checkObj[key] : Utils.reflectCheck(key) { max: 18, message: "长度不能超过18" }
} ],
} "sndp.amtmax": [
export default checkObj { 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 { ...@@ -34,7 +34,6 @@ export default class Msgsel {
msggrp: { msggrp: {
rcvlst: [], // .msggrp.rcvlst rcvlst: [], // .msggrp.rcvlst
}, },
pageId: "" // ctx的key
} }
} }
} }
\ No newline at end of file
<template> <template>
<div class="eContainer-search"> <div class="eContainer-search">
<el-form <el-form
:model="model" :model="model"
:rules="rules" :rules="rules"
ref="modelForm" ref="modelForm"
label-width="120px" label-width="120px"
label-position="right" label-position="right"
size="small" size="small"
:validate-on-rule-change="false" :validate-on-rule-change="false"
> >
<c-content> <c-content>
<m-msgpnl :model="model" :codes="codes" ref="msgpnl"/> <m-msgpnl :model="model" :codes="codes" ref="msgpnl"/>
...@@ -22,19 +22,17 @@ ...@@ -22,19 +22,17 @@
import event from "../event" import event from "../event"
import Msgpnl from "./Msgpnl.vue" import Msgpnl from "./Msgpnl.vue"
export default { export default {
name: "Msgsel", name: "Msgsel",
components:{ components:{
"m-msgpnl" : Msgpnl, "m-msgpnl" : Msgpnl,
}, },
provide() { provide() {
return { return {
root: this root: this
} }
}, },
mixins: [event], // 里面包含了Default、Check等的公共处理 mixins: [event],
data(){ data(){
return { return {
tabVal: "msgpnl", 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