Commit 7f4a5bf7 by 李少勇

优化处理报文类型联动获取码表的问题

parent 64fcf3f9
......@@ -3,6 +3,21 @@ import moment from "moment";
export default {
methods: {
async getSubtyp() {
let rtnmsg = await Api.post("/frontend/common/subtyp ", {
mty: 'CIPS'
});
if (rtnmsg.respCode == SUCCESS) {
if (rtnmsg.data && rtnmsg.data.length > 0) {
this.subtypCodes = rtnmsg.data.map((item) => {
return {
label: item,
value: item
}
})
}
}
},
async handleSearch() {
let rcvdatsta = this.model.sndp.rcvdatsta;
if (!rcvdatsta || rcvdatsta == "") {
......@@ -33,12 +48,12 @@ export default {
if (rtnmsg.respCode == SUCCESS) {
this.load = false;
this.stmData.data = [];
const {list} = rtnmsg.data;
const {codes:{sta1}} = this;
const { list } = rtnmsg.data;
const { codes: { sta1 } } = this;
list.forEach(v=>{
for(let i in sta1){
if(sta1[i].value == v.sta){
list.forEach(v => {
for (let i in sta1) {
if (sta1[i].value == v.sta) {
v.sta = sta1[i].label;
}
}
......@@ -87,7 +102,7 @@ export default {
this.pagination.pageNum = val;
this.handleSearch();
},
handleSelectionChange(val){
handleSelectionChange(val) {
this.multipleSelection = val;
}
},
......
......@@ -7,23 +7,20 @@
<c-col :span="24">
<c-col :span="8">
<el-form-item label="系统名称" prop="" style="width: 100%">
<c-select v-model="model.mgsp.stadat" style="width: 100%" placeholder="请选择报文标准"
:code="codes.subtyp"/>
<c-select v-model="model.mgsp.stadat" style="width: 100%" placeholder="请选择报文标准" :code="codes.subtyp" />
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="报文类型" prop="" style="width: 100%">
<c-select v-model="model.mgsp.stadat" style="width: 100%" placeholder="请选择报文标准"
:code="codes.subtyp"/>
<c-select v-model="model.mgsp.stadat" style="width: 100%" placeholder="请选择报文标准">
<el-option v-for="code in subtypCodes" :key="code.label" :label="code.label" :value="code.value">
</el-option>
</c-select>
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="起始日期" prop="rcvdatsta" style="width: 100%">
<c-date-picker
type="date"
v-model="model.mgsp.stadat"
style="width: 100%"
></c-date-picker>
<c-date-picker type="date" v-model="model.mgsp.stadat" style="width: 100%"></c-date-picker>
</el-form-item>
</c-col>
</c-col>
......@@ -33,11 +30,7 @@
<c-col :span="24">
<c-col :span="8">
<el-form-item label="截止日期" prop="rcvdatsta" style="width: 100%">
<c-date-picker
type="date"
v-model="model.mgsp.stadat"
style="width: 100%"
></c-date-picker>
<c-date-picker type="date" v-model="model.mgsp.stadat" style="width: 100%"></c-date-picker>
</el-form-item>
</c-col>
......@@ -47,12 +40,7 @@
</c-list-search>
<el-col :span="24" style="margin-top: 2px; margin-bottom: 1px">
<c-button
class="medium_bcs"
size="medium"
style="margin-left: 0"
type="primary"
>{{ $t("public.导出") }}
<c-button class="medium_bcs" size="medium" style="margin-left: 0" type="primary">{{ $t("public.导出") }}
</c-button>
</el-col>
......@@ -61,36 +49,18 @@
<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 - 480px)"
:highlight-current-row="true"
>
<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 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-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 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>
......@@ -173,7 +143,9 @@ export default {
},
},
methods: {},
mounted: function () {},
mounted () {
this.getSubtyp()
},
};
</script>
<style lang="less" scoped>
......
......@@ -3,6 +3,21 @@ import moment from "moment";
export default {
methods: {
async getSubtyp() {
let rtnmsg = await Api.post("/frontend/common/subtyp ", {
mty: 'CIPS'
});
if (rtnmsg.respCode == SUCCESS) {
if (rtnmsg.data && rtnmsg.data.length > 0) {
this.subtypCodes = rtnmsg.data.map((item) => {
return {
label: item,
value: item
}
})
}
}
},
async handleSearch() {
},
async handleReset() {
......@@ -18,7 +33,7 @@ export default {
this.pagination.pageNum = val;
this.handleSearch();
},
handleSelectionChange(val){
handleSelectionChange(val) {
this.multipleSelection = val;
}
},
......
......@@ -16,12 +16,12 @@
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="报文类型:" prop="" style="width: 100%">
<c-select v-model="model.cpyp.subtyp" style="width: 100%" placeholder="请选择报文类型:"
:code="codes.subtyp"/>
<el-form-item label="报文类型" prop="" style="width: 100%">
<c-select v-model="model.cpyp.subtyp" style="width: 100%" placeholder="请选择报文类型">
<el-option v-for="code in subtypCodes" :key="code.label" :label="code.label" :value="code.value"></el-option>
</c-select>
</el-form-item>
</c-col>
</c-col>
</el-row>
<!-- 可控展示区 -->
......@@ -147,7 +147,8 @@ export default {
}
},
methods: {},
mounted: function () {
mounted () {
this.getSubtyp()
},
};
</script>
......
......@@ -3,6 +3,21 @@ import moment from "moment";
export default {
methods: {
async getSubtyp() {
let rtnmsg = await Api.post("/frontend/common/subtyp ", {
mty: 'CIPS'
});
if (rtnmsg.respCode == SUCCESS) {
if (rtnmsg.data && rtnmsg.data.length > 0) {
this.subtypCodes = rtnmsg.data.map((item) => {
return {
label: item,
value: item
}
})
}
}
},
async handleSearch() {
},
async handleReset() {
......@@ -18,7 +33,7 @@ export default {
this.pagination.pageNum = val;
this.handleSearch();
},
handleSelectionChange(val){
handleSelectionChange(val) {
this.multipleSelection = val;
}
},
......
......@@ -12,7 +12,10 @@
</c-col>
<c-col :span="8">
<el-form-item label="报文类型" prop="" style="width: 100%">
<c-select v-model="model.cpzp.subtyp" style="width: 100%" placeholder="请选择报文类型" :code="codes.subtyp" />
<c-select v-model="model.cpzp.subtyp" style="width: 100%" placeholder="请选择报文类型">
<el-option v-for="code in subtypCodes" :key="code.label" :label="code.label" :value="code.value">
</el-option>
</c-select>
</el-form-item>
</c-col>
<c-col :span="8">
......@@ -153,7 +156,8 @@ export default {
},
methods: {
},
mounted: function () {
mounted () {
this.getSubtyp()
},
};
</script>
......
import Api from "~/service/Api";
import getSubtyp from '~/page/Frontend/Rcvsel/event/getSubtyp.js';
import moment from "moment";
export default {
mixins: [getSubtyp],
methods: {
async handleSearch() {
let rcvdatsta = this.model.sndp.rcvdatsta;
......@@ -33,12 +35,12 @@ export default {
if (rtnmsg.respCode == SUCCESS) {
this.load = false;
this.stmData.data = [];
const {list} = rtnmsg.data;
const {codes:{sta1}} = this;
const { list } = rtnmsg.data;
const { codes: { sta1 } } = this;
list.forEach(v=>{
for(let i in sta1){
if(sta1[i].value == v.sta){
list.forEach(v => {
for (let i in sta1) {
if (sta1[i].value == v.sta) {
v.sta = sta1[i].label;
}
}
......@@ -87,7 +89,7 @@ export default {
this.pagination.pageNum = val;
this.handleSearch();
},
handleSelectionChange(val){
handleSelectionChange(val) {
this.multipleSelection = val;
}
},
......
......@@ -7,7 +7,7 @@
<c-col :span="24">
<c-col :span="8">
<el-form-item label="报文标准" prop="msgtyp" style="width: 100%">
<c-select v-model="model.sndp.msgtyp" style="width: 100%" placeholder="请选择货押标识" :code="codes.msgtyp3">
<c-select v-model="model.sndp.msgtyp" style="width: 100%" placeholder="请选择货押标识" :code="codes.msgtyp3" @change="getSubtyp(model.sndp.msgtyp, 'sndp.subtyp')">
</c-select>
</el-form-item>
</c-col>
......@@ -291,23 +291,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: {
},
......
import Api from "@/service/Api";
import getSubtyp from '~/page/Frontend/Rcvsel/event/getSubtyp.js';
import moment from "moment";
export default {
mixins: [getSubtyp],
methods: {
async handleSearch() {
let rcvdatsta = this.model.sndp.rcvdatsta;
......@@ -33,12 +35,12 @@ export default {
if (rtnmsg.respCode == SUCCESS) {
this.load = false;
this.stmData.data = [];
const {list} = rtnmsg.data;
const {codes:{sta1}} = this;
const { list } = rtnmsg.data;
const { codes: { sta1 } } = this;
list.forEach(v=>{
for(let i in sta1){
if(sta1[i].value == v.sta){
list.forEach(v => {
for (let i in sta1) {
if (sta1[i].value == v.sta) {
v.sta = sta1[i].label;
}
}
......@@ -87,7 +89,7 @@ export default {
this.pagination.pageNum = val;
this.handleSearch();
},
handleSelectionChange(val){
handleSelectionChange(val) {
this.multipleSelection = val;
}
},
......
......@@ -7,7 +7,7 @@
<c-col :span="24">
<c-col :span="8">
<el-form-item label="报文标准" prop="msgtyp" style="width: 100%">
<c-select v-model="model.sndp.msgtyp" style="width: 100%" placeholder="请选择货押标识" :code="codes.msgtyp3">
<c-select v-model="model.sndp.msgtyp" style="width: 100%" placeholder="请选择货押标识" :code="codes.msgtyp3" @change="getSubtyp(model.sndp.msgtyp, 'sndp.subtyp')">
</c-select>
</el-form-item>
</c-col>
......@@ -291,23 +291,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: {
},
......
import Api from "~/service/Api";
import moment from "moment";
import _ from 'lodash';
export default {
methods: {
async getSubtyp(firstKey, currentKey) {
let mapData = {
sf2: 'MT',
iso: 'MX',
txt: 'FXPS',
xml: 'CIPS',
}
let rtnmsg = await Api.post("/frontend/common/subtyp ", {
mty: mapData[firstKey]
});
if (rtnmsg.respCode == SUCCESS) {
_.set(this.model, currentKey, '')
if (rtnmsg.data && rtnmsg.data.length > 0) {
this.subtypCodes = rtnmsg.data.map((item) => {
return {
label: item,
value: item
}
})
}
}
},
},
};
import Api from "~/service/Api";
import getSubtyp from '~/page/Frontend/Rcvsel/event/getSubtyp.js';
import moment from "moment";
export default {
mixins: [getSubtyp],
methods: {
async handleSearch() {
let rcvdatsta = this.model.rcvp.rcvdatsta;
......@@ -33,12 +35,12 @@ export default {
if (rtnmsg.respCode == SUCCESS) {
this.load = false;
this.stmData.data = [];
const {list} = rtnmsg.data;
const {codes:{sta1}} = this;
const { list } = rtnmsg.data;
const { codes: { sta1 } } = this;
list.forEach(v=>{
for(let i in sta1){
if(sta1[i].value == v.sta){
list.forEach(v => {
for (let i in sta1) {
if (sta1[i].value == v.sta) {
v.sta = sta1[i].label;
}
}
......@@ -75,7 +77,7 @@ export default {
this.model.rcvp.rspsta = "";
this.model.rcvp.dtlchg = "";
this.model.rcvp.sta = "";
this.model.rcvp.gpi="";
this.model.rcvp.gpi = "";
},
// pageSize改变
handleSizeChange(val) {
......@@ -88,7 +90,7 @@ export default {
this.pagination.pageNum = val;
this.handleSearch();
},
handleSelectionChange(val){
handleSelectionChange(val) {
this.multipleSelection = val;
}
},
......
......@@ -7,7 +7,7 @@
<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>
......@@ -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) {
......
import Api from "~/service/Api";
import getSubtyp from '~/page/Frontend/Rcvsel/event/getSubtyp.js';
import moment from "moment";
export default {
mixins: [getSubtyp],
methods: {
async handleSearch() {
let rcvdatsta = this.model.rcvp.rcvdatsta;
......@@ -34,12 +36,12 @@ export default {
if (rtnmsg.respCode == SUCCESS) {
this.load = false;
this.stmData.data = [];
const {list} = rtnmsg.data;
const {codes:{sta1}} = this;
const { list } = rtnmsg.data;
const { codes: { sta1 } } = this;
list.forEach(v=>{
for(let i in sta1){
if(sta1[i].value == v.sta){
list.forEach(v => {
for (let i in sta1) {
if (sta1[i].value == v.sta) {
v.sta = sta1[i].label;
}
}
......@@ -76,7 +78,7 @@ export default {
this.model.rcvp.rspsta = "";
this.model.rcvp.dtlchg = "";
this.model.rcvp.sta = "";
this.model.rcvp.gpi="";
this.model.rcvp.gpi = "";
},
// pageSize改变
handleSizeChange(val) {
......@@ -89,7 +91,7 @@ export default {
this.pagination.pageNum = val;
this.handleSearch();
},
handleSelectionChange(val){
handleSelectionChange(val) {
this.multipleSelection = val;
}
},
......
......@@ -7,7 +7,7 @@
<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>
......@@ -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) {
......
import Api from "~/service/Api";
import getSubtyp from '~/page/Frontend/Rcvsel/event/getSubtyp.js';
import moment from "moment";
export default {
mixins: [getSubtyp],
methods: {
async handleSearch() {
let rcvdatsta = this.model.sndp.rcvdatsta;
......@@ -33,12 +35,12 @@ export default {
if (rtnmsg.respCode == SUCCESS) {
this.load = false;
this.stmData.data = [];
const {list} = rtnmsg.data;
const {codes:{sta1}} = this;
const { list } = rtnmsg.data;
const { codes: { sta1 } } = this;
list.forEach(v=>{
for(let i in sta1){
if(sta1[i].value == v.sta){
list.forEach(v => {
for (let i in sta1) {
if (sta1[i].value == v.sta) {
v.sta = sta1[i].label;
}
}
......@@ -87,7 +89,7 @@ export default {
this.pagination.pageNum = val;
this.handleSearch();
},
handleSelectionChange(val){
handleSelectionChange(val) {
this.multipleSelection = val;
}
},
......
......@@ -7,7 +7,7 @@
<c-col :span="24">
<c-col :span="8">
<el-form-item label="报文标准" prop="msgtyp" style="width: 100%">
<c-select v-model="model.sndp.msgtyp" style="width: 100%" placeholder="请选择报文标准" :code="codes.msgtyp3">
<c-select v-model="model.sndp.msgtyp" style="width: 100%" placeholder="请选择报文标准" :code="codes.msgtyp3" @change="getSubtyp(model.sndp.msgtyp, 'sndp.subtyp')">
</c-select>
</el-form-item>
</c-col>
......@@ -292,23 +292,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: {
dbClickRow(row) {
......
import Api from "~/service/Api";
import getSubtyp from '~/page/Frontend/Rcvsel/event/getSubtyp.js';
import moment from "moment";
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:{sta1}} = this;
const { list } = rtnmsg.data;
const { codes: { sta1 } } = this;
list.forEach(v=>{
for(let i in sta1){
if(sta1[i].value == v.sta){
list.forEach(v => {
for (let i in sta1) {
if (sta1[i].value == v.sta) {
v.sta = sta1[i].label;
}
}
......@@ -88,7 +90,7 @@ export default {
this.pagination.pageNum = val;
this.handleSearch();
},
handleSelectionChange(val){
handleSelectionChange(val) {
this.multipleSelection = val;
}
},
......
......@@ -7,7 +7,7 @@
<c-col :span="24">
<c-col :span="8">
<el-form-item label="报文标准" prop="msgtyp" style="width: 100%">
<c-select v-model="model.sndp.msgtyp" style="width: 100%" placeholder="请选择报文标准" :code="codes.msgtyp3">
<c-select v-model="model.sndp.msgtyp" style="width: 100%" placeholder="请选择报文标准" :code="codes.msgtyp3" @change="getSubtyp(model.sndp.msgtyp, 'sndp.subtyp')">
</c-select>
</el-form-item>
</c-col>
......@@ -292,23 +292,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: {
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