Commit 3d71feab by 李少勇

收报查询功能修改

parent 7c9ac51c
......@@ -24,7 +24,7 @@ import Schpnl from "./Schpnl.vue"
export default {
name: "Sndsel",
name: "Msgrtm",
components:{
"m-schpnl" : Schpnl,
......
import Api from "~/service/Api";
import getSubtyp from '~/page/Frontend/Rcvsel/event/getSubtyp.js';
import moment from "moment";
export default {
methods: {
async handleSearch() {
let rcvdatsta = this.model.rcvp.rcvdatsta;
if (!rcvdatsta || rcvdatsta == "") {
this.$notify.error({
title: this.$t("financing.错误"),
message: this.$t("financing.查询开始日期必输!"),
});
return;
}
let rcvdatend = this.model.rcvp.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.rcvp.rcvdatsta;
if (!rcvdatsta || rcvdatsta == "") {
this.$notify.error({
title: this.$t("financing.错误"),
message: this.$t("financing.查询开始日期必输!"),
});
return;
}
let rcvdatend = this.model.rcvp.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.rcvp,
dir: "<",
querytyp: "rcvblk",
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;
this.load = true;
let rtnmsg = await Api.post("/frontend/msgsel/query", {
...this.model.rcvp,
dir: "<",
querytyp: "rcvblk",
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.服务请求失败!"),
});
list.forEach(v => {
for (let i in sta1) {
if (sta1[i].value == v.sta) {
v.sta = sta1[i].label;
}
this.load = false;
},
async handleReset() {
this.model.rcvp.msgtyp = "";
this.model.rcvp.rcvdatsta = new Date();
this.model.rcvp.rcvdatend = new Date();
this.model.rcvp.subtyp = "";
this.model.rcvp.sndbak = "";
this.model.rcvp.revbak = "";
this.model.rcvp.actbic = "";
this.model.rcvp.othref = "";
this.model.rcvp.ownref = "";
this.model.rcvp.cur = "";
this.model.rcvp.act = "";
this.model.rcvp.amtmin = "";
this.model.rcvp.amtmax = "";
this.model.rcvp.chnipt = "";
this.model.rcvp.rspsta = "";
this.model.rcvp.dtlchg = "";
this.model.rcvp.sta = "";
this.model.rcvp.gpi="";
},
// 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() {
this.model.rcvp.msgtyp = "";
this.model.rcvp.rcvdatsta = new Date();
this.model.rcvp.rcvdatend = new Date();
this.model.rcvp.subtyp = "";
this.model.rcvp.sndbak = "";
this.model.rcvp.revbak = "";
this.model.rcvp.actbic = "";
this.model.rcvp.othref = "";
this.model.rcvp.ownref = "";
this.model.rcvp.cur = "";
this.model.rcvp.act = "";
this.model.rcvp.amtmin = "";
this.model.rcvp.amtmax = "";
this.model.rcvp.chnipt = "";
this.model.rcvp.rspsta = "";
this.model.rcvp.dtlchg = "";
this.model.rcvp.sta = "";
this.model.rcvp.gpi = "";
},
// 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;
}
},
};
......@@ -7,11 +7,19 @@
<c-col :span="24">
<c-col :span="8">
<el-form-item label="报文标准" prop="msgtyp" style="width: 100%">
<c-select v-model="model.rcvp.msgtyp" style="width: 100%" placeholder="请选择货押标识" :code="codes.msgtyp3">
<c-select v-model="model.rcvp.msgtyp" style="width: 100%" placeholder="请选择货押标识" :code="codes.msgtyp3" @change="getSubtyp(model.rcvp.msgtyp, 'rcvp.subtyp')">
</c-select>
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="报文类型" prop="subtype" style="width: 100%">
<el-select v-model="model.rcvp.subtyp" placeholder="请选择报文类型">
<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.rcvp.rcvdatsta" style="width: 100%"></c-date-picker>
......@@ -24,14 +32,6 @@
</c-col>
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="报文类型" prop="subtype" style="width: 100%">
<el-select v-model="model.rcvp.subtyp" placeholder="请选择报文类型">
<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>
<!-- 可控展示区 -->
......@@ -306,23 +306,7 @@ export default {
}
},
watch: {
'model.rcvp.msgtyp': {
handler: function (newTyp, oldTyp) {
// 把已经选择的 subtyp 重置
this.model.rcvp.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: {
dbClickRow(row) {
......
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