Commit d704e7b7 by 李少勇

导出excel联调

parent fcf70036
import Api from "~/service/Api"; import Api from "~/service/Api";
import getSubtyp from '~/page/Frontend/Rcvsel/event/getSubtyp.js'; import getSubtyp from '~/page/Frontend/Rcvsel/event/getSubtyp.js';
import exportExcel from '~/page/Frontend/Rcvsel/event/exportExcel.js';
import moment from "moment"; import moment from "moment";
import Msgrtm from "../model"; import Msgrtm from "../model";
import Utils from "~/utils"; import Utils from "~/utils";
export default { export default {
mixins: [getSubtyp], mixins: [getSubtyp, exportExcel],
methods: { methods: {
async handleSearch() { async handleSearch() {
let rcvdatsta = this.model.sndp.rcvdatsta; let rcvdatsta = this.model.sndp.rcvdatsta;
...@@ -36,15 +37,6 @@ export default { ...@@ -36,15 +37,6 @@ export default {
this.load = false; this.load = false;
this.stmData.data = []; this.stmData.data = [];
const { list } = rtnmsg.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.stmData.data = list;
this.pagination = { this.pagination = {
pageNum: rtnmsg.data.pageNum || 1, pageNum: rtnmsg.data.pageNum || 1,
...@@ -77,6 +69,17 @@ export default { ...@@ -77,6 +69,17 @@ export default {
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
},
exportToExcel() {
let codeKeysMap = {
sta: 'stacod'
};
let params = {
...this.model.sndp,
dir: ">",
querytyp: "rtm",
};
this.exportExcel(this.stmData.columns, '/frontend/msgsel/exportExcel', params, codeKeysMap, '人工清分');
} }
}, },
}; };
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
</c-col> </c-col>
<c-col :span="8"> <c-col :span="8">
<el-form-item label="处理状态" prop="sta" style="width: 100%"> <el-form-item label="处理状态" prop="sta" style="width: 100%">
<c-select v-model="model.sndp.sta" style="width: 100%" placeholder="请选择处理状态" :code="codes.sta1"> <c-select v-model="model.sndp.sta" style="width: 100%" placeholder="请选择处理状态" :code="codes.stacod">
</c-select> </c-select>
</el-form-item> </el-form-item>
</c-col> </c-col>
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
<c-button :disabled="isRoutingDisable" class="medium_bcs" size="medium" style="margin-left: 20" type="primary"> <c-button :disabled="isRoutingDisable" class="medium_bcs" size="medium" style="margin-left: 20" type="primary">
ReRouting ReRouting
</c-button> </c-button>
<c-button class="medium_bcs" size="medium" style="margin-left: 20" type="primary"> <c-button class="medium_bcs" size="medium" style="margin-left: 20" type="primary" @click="exportToExcel">
{{ $t('public.导出Excel') }} {{ $t('public.导出Excel') }}
</c-button> </c-button>
</el-col> </el-col>
......
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
<c-col :span="24"> <c-col :span="24">
<c-col :span="8"> <c-col :span="8">
<el-form-item label="处理状态" prop="" style="width: 100%"> <el-form-item label="处理状态" prop="" style="width: 100%">
<c-select :code="codes.sta1" :filterKey="['V']" disabled v-model="model.sndp.sta" <c-select :code="codes.stacod" :filterKey="['V']" disabled v-model="model.sndp.sta"
style="width: 100%" /> style="width: 100%" />
</el-form-item> </el-form-item>
</c-col> </c-col>
......
import Api from "@/service/Api"; import Api from "@/service/Api";
import getSubtyp from '~/page/Frontend/Rcvsel/event/getSubtyp.js'; import getSubtyp from '~/page/Frontend/Rcvsel/event/getSubtyp.js';
import exportExcel from '~/page/Frontend/Rcvsel/event/exportExcel.js';
import moment from "moment"; import moment from "moment";
import Msgsep from "../model"; import Msgsep from "../model";
import Utils from "~/utils"; import Utils from "~/utils";
export default { export default {
mixins: [getSubtyp], mixins: [getSubtyp, exportExcel],
methods: { methods: {
async handleSearch() { async handleSearch() {
let rcvdatsta = this.model.sndp.rcvdatsta; let rcvdatsta = this.model.sndp.rcvdatsta;
...@@ -36,15 +37,6 @@ export default { ...@@ -36,15 +37,6 @@ export default {
this.load = false; this.load = false;
this.stmData.data = []; this.stmData.data = [];
const { list } = rtnmsg.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.stmData.data = list;
this.pagination = { this.pagination = {
pageNum: rtnmsg.data.pageNum || 1, pageNum: rtnmsg.data.pageNum || 1,
...@@ -77,6 +69,17 @@ export default { ...@@ -77,6 +69,17 @@ export default {
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
},
exportToExcel() {
let codeKeysMap = {
sta: 'stacod'
};
let params = {
...this.model.sndp,
dir: "<",
querytyp: "sep",
};
this.exportExcel(this.stmData.columns, '/frontend/msgsel/exportExcel', params, codeKeysMap, '报文失败处理');
} }
}, },
}; };
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
</c-col> </c-col>
<c-col :span="8"> <c-col :span="8">
<el-form-item label="处理状态" prop="sndp.sta" style="width: 100%"> <el-form-item label="处理状态" prop="sndp.sta" style="width: 100%">
<c-select v-model="model.sndp.sta" style="width: 100%" placeholder="请选择处理状态" :code="codes.sta1"> <c-select v-model="model.sndp.sta" style="width: 100%" placeholder="请选择处理状态" :code="codes.stacod">
</c-select> </c-select>
</el-form-item> </el-form-item>
</c-col> </c-col>
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
<c-button :disabled="isRoutingDisable" class="medium_bcs" size="medium" style="margin-left: 20" type="primary"> <c-button :disabled="isRoutingDisable" class="medium_bcs" size="medium" style="margin-left: 20" type="primary">
ReRouting ReRouting
</c-button> </c-button>
<c-button class="medium_bcs" size="medium" style="margin-left: 20" type="primary"> <c-button class="medium_bcs" size="medium" style="margin-left: 20" type="primary" @click="exportToExcel">
{{ $t('public.导出Excel') }} {{ $t('public.导出Excel') }}
</c-button> </c-button>
</el-col> </el-col>
......
...@@ -37,15 +37,6 @@ export default { ...@@ -37,15 +37,6 @@ export default {
this.load = false; this.load = false;
this.stmData.data = []; this.stmData.data = [];
const { list } = rtnmsg.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.stmData.data = list;
this.pagination = { this.pagination = {
pageNum: rtnmsg.data.pageNum || 1, pageNum: rtnmsg.data.pageNum || 1,
......
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
<c-col :span="8"> <c-col :span="8">
<el-form-item label="处理状态" prop="sta" style="width: 100%"> <el-form-item label="处理状态" prop="sta" style="width: 100%">
<c-select v-model="model.rcvp.sta" style="width: 100%" placeholder="请选择处理状态" <c-select v-model="model.rcvp.sta" style="width: 100%" placeholder="请选择处理状态"
:code="codes.sta1"> :code="codes.stacod">
</c-select> </c-select>
</el-form-item> </el-form-item>
</c-col> </c-col>
......
...@@ -72,7 +72,7 @@ export default { ...@@ -72,7 +72,7 @@ export default {
}, },
exportToExcel() { exportToExcel() {
let codeKeysMap = { let codeKeysMap = {
sta: 'sta1' sta: 'stacod'
}; };
let params = { let params = {
...this.model.rcvp, ...this.model.rcvp,
......
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
<c-col :span="8"> <c-col :span="8">
<el-form-item label="处理状态" prop="sta" style="width: 100%"> <el-form-item label="处理状态" prop="sta" style="width: 100%">
<c-select v-model="model.rcvp.sta" style="width: 100%" placeholder="请选择处理状态" <c-select v-model="model.rcvp.sta" style="width: 100%" placeholder="请选择处理状态"
:code="codes.sta1"> :code="codes.stacod">
</c-select> </c-select>
</el-form-item> </el-form-item>
</c-col> </c-col>
...@@ -166,7 +166,7 @@ ...@@ -166,7 +166,7 @@
<el-table-column v-for="(item, key) in stmData.columns" :key="key" :label="item.label" :prop="item.prop" <el-table-column v-for="(item, key) in stmData.columns" :key="key" :label="item.label" :prop="item.prop"
:min-width="item.width"> :min-width="item.width">
<template slot-scope="scope"> <template slot-scope="scope">
<c-select-value-to-label v-if="item.prop == 'sta'" v-model="scope.row.sta" :code="codes.sta1"></c-select-value-to-label> <c-select-value-to-label v-if="item.prop == 'sta'" v-model="scope.row.sta" :code="codes.stacod"></c-select-value-to-label>
<span v-else-if="item.prop == 'amt'">{{ moneyFormat(scope.row.amt, scope.row.cur) }}</span> <span v-else-if="item.prop == 'amt'">{{ moneyFormat(scope.row.amt, scope.row.cur) }}</span>
<span v-else>{{ scope.row[item.prop] }}</span> <span v-else>{{ scope.row[item.prop] }}</span>
</template> </template>
......
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
<c-col :span="8"> <c-col :span="8">
<el-form-item label="处理状态" prop="sta" style="width: 100%"> <el-form-item label="处理状态" prop="sta" style="width: 100%">
<c-select v-model="model.rcvp.sta" style="width: 100%" placeholder="请选择处理状态" <c-select v-model="model.rcvp.sta" style="width: 100%" placeholder="请选择处理状态"
:code="codes.sta1"> :code="codes.stacod">
</c-select> </c-select>
</el-form-item> </el-form-item>
</c-col> </c-col>
......
...@@ -72,7 +72,7 @@ export default { ...@@ -72,7 +72,7 @@ export default {
}, },
exportToExcel() { exportToExcel() {
let codeKeysMap = { let codeKeysMap = {
sta: 'sta1' sta: 'stacod'
}; };
let params = { let params = {
...this.model.sndp, ...this.model.sndp,
......
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
</c-col> </c-col>
<c-col :span="8"> <c-col :span="8">
<el-form-item label="处理状态" prop="sta" style="width: 100%"> <el-form-item label="处理状态" prop="sta" style="width: 100%">
<c-select v-model="model.sndp.sta" style="width: 100%" placeholder="请选择处理状态" :code="codes.sta1"> <c-select v-model="model.sndp.sta" style="width: 100%" placeholder="请选择处理状态" :code="codes.stacod">
</c-select> </c-select>
</el-form-item> </el-form-item>
</c-col> </c-col>
...@@ -157,7 +157,7 @@ ...@@ -157,7 +157,7 @@
<el-table-column v-for="(item, key) in stmData.columns" :key="key" :label="item.label" :prop="item.prop" <el-table-column v-for="(item, key) in stmData.columns" :key="key" :label="item.label" :prop="item.prop"
:min-width="item.width"> :min-width="item.width">
<template slot-scope="scope"> <template slot-scope="scope">
<c-select-value-to-label v-if="item.prop == 'sta'" v-model="scope.row.sta" :code="codes.sta1"></c-select-value-to-label> <c-select-value-to-label v-if="item.prop == 'sta'" v-model="scope.row.sta" :code="codes.stacod"></c-select-value-to-label>
<span v-else-if="item.prop == 'amt'">{{ moneyFormat(scope.row.amt, scope.row.cur) }}</span> <span v-else-if="item.prop == 'amt'">{{ moneyFormat(scope.row.amt, scope.row.cur) }}</span>
<span v-else>{{ scope.row[item.prop] }}</span> <span v-else>{{ scope.row[item.prop] }}</span>
</template> </template>
......
...@@ -73,7 +73,7 @@ export default { ...@@ -73,7 +73,7 @@ export default {
}, },
exportToExcel() { exportToExcel() {
let codeKeysMap = { let codeKeysMap = {
sta: 'sta1' sta: 'stacod'
}; };
let params = { let params = {
...this.model.sndp, ...this.model.sndp,
......
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
</c-col> </c-col>
<c-col :span="8"> <c-col :span="8">
<el-form-item label="处理状态" prop="sta" style="width: 100%"> <el-form-item label="处理状态" prop="sta" style="width: 100%">
<c-select v-model="model.sndp.sta" style="width: 100%" placeholder="请选择处理状态" :code="codes.sta1"> <c-select v-model="model.sndp.sta" style="width: 100%" placeholder="请选择处理状态" :code="codes.stacod">
</c-select> </c-select>
</el-form-item> </el-form-item>
</c-col> </c-col>
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
<el-table-column v-for="(item, key) in stmData.columns" :key="key" :label="item.label" :prop="item.prop" <el-table-column v-for="(item, key) in stmData.columns" :key="key" :label="item.label" :prop="item.prop"
:min-width="item.width"> :min-width="item.width">
<template slot-scope="scope"> <template slot-scope="scope">
<c-select-value-to-label v-if="item.prop == 'sta'" v-model="scope.row.sta" :code="codes.sta1"></c-select-value-to-label> <c-select-value-to-label v-if="item.prop == 'sta'" v-model="scope.row.sta" :code="codes.stacod"></c-select-value-to-label>
<span v-else-if="item.prop == 'amt'">{{ moneyFormat(scope.row.amt, scope.row.cur) }}</span> <span v-else-if="item.prop == 'amt'">{{ moneyFormat(scope.row.amt, scope.row.cur) }}</span>
<span v-else>{{ scope.row[item.prop] }}</span> <span v-else>{{ scope.row[item.prop] }}</span>
</template> </template>
......
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