Commit d64fccbf by 李少勇

oftsel 导出功能开发

parent 9582dea4
...@@ -9940,7 +9940,6 @@ const CodeTable = { ...@@ -9940,7 +9940,6 @@ const CodeTable = {
], ],
kpasta: [ kpasta: [
{ label: "", value: "" },
{ label: "国际汇兑", value: "1" }, { label: "国际汇兑", value: "1" },
{ label: "国际结算", value: "2" }, { label: "国际结算", value: "2" },
{ label: "资金结算", value: "3" }, { label: "资金结算", value: "3" },
......
...@@ -74,8 +74,8 @@ export default { ...@@ -74,8 +74,8 @@ export default {
exportToExcel() { exportToExcel() {
let codeKeysMap = { let codeKeysMap = {
typ: 'kpasta', typ: 'kpasta',
sta: 'stacd1', sta: 'zfqsta',
area: 'area', area: 'stacd1',
offsta: 'offsta', offsta: 'offsta',
multimsg: 'chncod', multimsg: 'chncod',
chk: 'chncod', chk: 'chncod',
......
...@@ -122,45 +122,41 @@ ...@@ -122,45 +122,41 @@
<el-col :span="24" style="margin-top: 10px"> <el-col :span="24" style="margin-top: 10px">
<div style="height: 90%"> <div style="height: 90%">
<c-col :span="24"> <c-col :span="24">
<el-tabs v-model="activeTab" class="y-tabs"> <el-table
<el-tab-pane label="待关联报文处理" name="fb"> :data="stmData.data"
<el-table :columns="stmData.columns"
:data="stmData.data" v-loading="load" style="width: 100%"
:columns="stmData.columns" @selection-change="handleSelectionChange"
v-loading="load" style="width: 100%" @row-dblclick="dbClickRow"
@selection-change="handleSelectionChange" size="small" :border="true"
@row-dblclick="dbClickRow" height="calc(100vh - 310px)"
size="small" :border="true" :highlight-current-row="true"
height="calc(100vh - 420px)" >
:highlight-current-row="true" <el-table-column type="selection" width="55"></el-table-column>
> <el-table-column
<el-table-column type="selection" width="55"></el-table-column> v-for="(item, key) in stmData.columns"
<el-table-column :key="key" :label="item.label"
v-for="(item, key) in stmData.columns" :prop="item.prop"
:key="key" :label="item.label" :min-width="item.width"
:prop="item.prop" >
:min-width="item.width" <template slot-scope="scope">
> <c-select-value-to-label v-if="item.prop == 'typ'" v-model="scope.row.typ" dbCode="KPASTA"></c-select-value-to-label>
<template slot-scope="scope"> <c-select-value-to-label v-else-if="item.prop == 'sta'" v-model="scope.row.sta" dbCode="ZFQSTA"></c-select-value-to-label>
<c-select-value-to-label v-if="item.prop == 'typ'" v-model="scope.row.typ" dbCode="KPASTA"></c-select-value-to-label> <c-select-value-to-label v-else-if="item.prop == 'area'" v-model="scope.row.area" dbCode="STACD1"></c-select-value-to-label>
<c-select-value-to-label v-else-if="item.prop == 'sta'" v-model="scope.row.sta" dbCode="STACD1"></c-select-value-to-label> <c-select-value-to-label v-else-if="item.prop == 'offsta'" v-model="scope.row.offsta" dbCode="OFFSTA"></c-select-value-to-label>
<c-select-value-to-label v-else-if="item.prop == 'area'" v-model="scope.row.area" dbCode="AREA"></c-select-value-to-label> <c-select-value-to-label v-else-if="item.prop == 'multimsg'" v-model="scope.row.multimsg" dbCode="CHNCOD"></c-select-value-to-label>
<c-select-value-to-label v-else-if="item.prop == 'offsta'" v-model="scope.row.offsta" dbCode="OFFSTA"></c-select-value-to-label> <c-select-value-to-label v-else-if="item.prop == 'chk'" v-model="scope.row.chk" dbCode="CHNCOD"></c-select-value-to-label>
<c-select-value-to-label v-else-if="item.prop == 'multimsg'" v-model="scope.row.multimsg" dbCode="CHNCOD"></c-select-value-to-label> <c-select-value-to-label v-else-if="item.prop == 'kpatyp'" v-model="scope.row.kpatyp" dbCode="CHNCOD"></c-select-value-to-label>
<c-select-value-to-label v-else-if="item.prop == 'chk'" v-model="scope.row.chk" dbCode="CHNCOD"></c-select-value-to-label> <span v-else-if="item.prop == 'amt'">{{ moneyFormat(scope.row.amt, scope.row.cur) }}</span>
<c-select-value-to-label v-else-if="item.prop == 'kpatyp'" v-model="scope.row.kpatyp" dbCode="CHNCOD"></c-select-value-to-label> <span v-else>{{ scope.row[item.prop] }}</span>
<span v-else-if="item.prop == 'amt'">{{ moneyFormat(scope.row.amt, scope.row.cur) }}</span> </template>
<span v-else>{{ scope.row[item.prop] }}</span> </el-table-column>
</template> </el-table>
</el-table-column>
</el-table>
<el-pagination layout="total, sizes, prev, pager, next, jumper" :total="pagination.total" <el-pagination layout="total, sizes, prev, pager, next, jumper" :total="pagination.total"
:page-size="pagination.pageSize" :current-page.sync="pagination.pageNum" @size-change="handleSizeChange" :page-size="pagination.pageSize" :current-page.sync="pagination.pageNum" @size-change="handleSizeChange"
@current-change="handleCurrentChange"> @current-change="handleCurrentChange">
</el-pagination> </el-pagination>
</el-tab-pane>
</el-tabs>
</c-col> </c-col>
</div> </div>
</el-col> </el-col>
...@@ -175,7 +171,6 @@ export default { ...@@ -175,7 +171,6 @@ export default {
mixins: [event], mixins: [event],
data() { data() {
return { return {
activeTab: 'fb',
load: false, load: false,
subtypCodes: [], subtypCodes: [],
multipleSelection: [], multipleSelection: [],
......
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 Oftsel from '../model'; import Oftsel 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 rsptims = this.model.oftp.rel.rsptims; let rsptims = this.model.oftp.rel.rsptims;
...@@ -112,5 +113,24 @@ export default { ...@@ -112,5 +113,24 @@ export default {
} }
// loading.close(); // loading.close();
}, },
exportToExcel() {
let codeKeysMap = {
typ: 'kpasta',
sta: 'zfqsta',
area: 'stacd1',
offsta: 'offsta',
multimsg: 'chncod',
chk: 'chncod',
kpatyp: 'chncod',
};
let rsptims = this.model.oftp.rel.rsptims;
let rsptime = this.model.oftp.rel.rsptime;
let params = {
...this.model.oftp.rel,
rsptims: rsptims ? moment(rsptims).format("YYYY-MM-DD") + ' 00:00:00' : "",
rsptime: moment(rsptime).format("YYYY-MM-DD") + ' 23:59:59',
}
this.exportExcel(this.stmData.columns, '/frontend/oftsel/exportExcel', params, codeKeysMap, '已关联报文查询');
}
}, },
}; };
...@@ -111,45 +111,41 @@ ...@@ -111,45 +111,41 @@
<el-col :span="24" style="margin-top: 10px"> <el-col :span="24" style="margin-top: 10px">
<div style="height: 90%"> <div style="height: 90%">
<c-col :span="24"> <c-col :span="24">
<el-tabs v-model="activeTab" class="y-tabs"> <el-table
<el-tab-pane label="已关联报文查询" name="fb"> :data="stmData.data"
<el-table :columns="stmData.columns"
:data="stmData.data" v-loading="load" style="width: 100%"
:columns="stmData.columns" @selection-change="handleSelectionChange"
v-loading="load" style="width: 100%" @row-dblclick="dbClickRow"
@selection-change="handleSelectionChange" size="small" :border="true"
@row-dblclick="dbClickRow" height="calc(100vh - 310px)"
size="small" :border="true" :highlight-current-row="true"
height="calc(100vh - 420px)" >
:highlight-current-row="true" <el-table-column type="selection" width="55"></el-table-column>
> <el-table-column
<el-table-column type="selection" width="55"></el-table-column> v-for="(item, key) in stmData.columns"
<el-table-column :key="key" :label="item.label"
v-for="(item, key) in stmData.columns" :prop="item.prop"
:key="key" :label="item.label" :min-width="item.width"
:prop="item.prop" >
:min-width="item.width" <template slot-scope="scope">
> <c-select-value-to-label v-if="item.prop == 'typ'" v-model="scope.row.typ" dbCode="KPASTA"></c-select-value-to-label>
<template slot-scope="scope"> <c-select-value-to-label v-else-if="item.prop == 'sta'" v-model="scope.row.sta" dbCode="ZFQSTA"></c-select-value-to-label>
<c-select-value-to-label v-if="item.prop == 'typ'" v-model="scope.row.typ" dbCode="KPASTA"></c-select-value-to-label> <c-select-value-to-label v-else-if="item.prop == 'area'" v-model="scope.row.area" dbCode="STACD1"></c-select-value-to-label>
<c-select-value-to-label v-else-if="item.prop == 'sta'" v-model="scope.row.sta" dbCode="STACD1"></c-select-value-to-label> <c-select-value-to-label v-else-if="item.prop == 'offsta'" v-model="scope.row.offsta" dbCode="OFFSTA"></c-select-value-to-label>
<c-select-value-to-label v-else-if="item.prop == 'area'" v-model="scope.row.area" dbCode="AREA"></c-select-value-to-label> <c-select-value-to-label v-else-if="item.prop == 'multimsg'" v-model="scope.row.multimsg" dbCode="CHNCOD"></c-select-value-to-label>
<c-select-value-to-label v-else-if="item.prop == 'offsta'" v-model="scope.row.offsta" dbCode="OFFSTA"></c-select-value-to-label> <c-select-value-to-label v-else-if="item.prop == 'chk'" v-model="scope.row.chk" dbCode="CHNCOD"></c-select-value-to-label>
<c-select-value-to-label v-else-if="item.prop == 'multimsg'" v-model="scope.row.multimsg" dbCode="CHNCOD"></c-select-value-to-label> <c-select-value-to-label v-else-if="item.prop == 'kpatyp'" v-model="scope.row.kpatyp" dbCode="CHNCOD"></c-select-value-to-label>
<c-select-value-to-label v-else-if="item.prop == 'chk'" v-model="scope.row.chk" dbCode="CHNCOD"></c-select-value-to-label> <span v-else-if="item.prop == 'amt'">{{ moneyFormat(scope.row.amt, scope.row.cur) }}</span>
<c-select-value-to-label v-else-if="item.prop == 'kpatyp'" v-model="scope.row.kpatyp" dbCode="CHNCOD"></c-select-value-to-label> <span v-else>{{ scope.row[item.prop] }}</span>
<span v-else-if="item.prop == 'amt'">{{ moneyFormat(scope.row.amt, scope.row.cur) }}</span> </template>
<span v-else>{{ scope.row[item.prop] }}</span> </el-table-column>
</template> </el-table>
</el-table-column>
</el-table>
<el-pagination layout="total, sizes, prev, pager, next, jumper" :total="pagination.total" <el-pagination layout="total, sizes, prev, pager, next, jumper" :total="pagination.total"
:page-size="pagination.pageSize" :current-page.sync="pagination.pageNum" @size-change="handleSizeChange" :page-size="pagination.pageSize" :current-page.sync="pagination.pageNum" @size-change="handleSizeChange"
@current-change="handleCurrentChange"> @current-change="handleCurrentChange">
</el-pagination> </el-pagination>
</el-tab-pane>
</el-tabs>
</c-col> </c-col>
</div> </div>
</el-col> </el-col>
...@@ -164,7 +160,6 @@ export default { ...@@ -164,7 +160,6 @@ export default {
mixins: [event], mixins: [event],
data() { data() {
return { return {
activeTab: 'fb',
load: false, load: false,
subtypCodes: [], subtypCodes: [],
multipleSelection: [], multipleSelection: [],
......
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