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 {
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;
}
mixins: [getSubtyp],
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;
}
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:{stacod}} = this;
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: { stacod } } = this;
list.forEach(v=>{
for(let i in stacod){
if(stacod[i].value == v.sta){
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.服务请求失败!"),
});
list.forEach(v => {
for (let i in stacod) {
if (stacod[i].value == v.sta) {
v.sta = stacod[i].label;
}
this.load = false;
},
async handleReset() {
this.model = new Msgsel().data;
},
// 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.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 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" }
],
/**
* 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
<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-msgpnl :model="model" :codes="codes" ref="msgpnl"/>
......@@ -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