Commit 8e112925 by suwenhao

待复核列表详情页;

parent 7f8ed9eb
...@@ -640,4 +640,17 @@ margin-left: 120px; ...@@ -640,4 +640,17 @@ margin-left: 120px;
} }
.el-input--prefix .el-input__inner{ .el-input--prefix .el-input__inner{
padding-left: 30px; padding-left: 30px;
}
/* 分页pagination样式调整 */
.el-pagination {
margin-top: 5px;
display: flex;
justify-content: flex-end;
}
.el-pagination .el-icon-arrow-right:before {
display: none;
}
.el-pagination .el-input--small .el-input__inner {
padding-left: 0;
} }
\ No newline at end of file
import Utils from '~/utils/index'; import Utils from '~/utils/index';
import Api from "~/service/Api"; import Api from '~/service/Api';
export default { export default {
methods: { methods: {
//重置 //重置
async handleReset() { async handleReset() {
this.model.bchcon = ''; this.model.bchcon = '';
this.model.trncorco.ownref = ''; this.model.trncorco.ownref = '';
this.model.trncorco.relflg = 'ALL'; this.model.trncorco.relflg = '0';
this.model.usrcon = ''; this.model.usrcon = '';
this.model.trncorco.inidatfro = ''; this.model.trncorco.inidatfro = '';
this.model.trncorco.inidattil = ''; this.model.trncorco.inidattil = '';
this.model.atp.cod = ''; this.model.atp.cod = '';
this.model.trncorco.dflg = 'ALL'; this.model.trncorco.dflg = '1';
this.model.atptxt = ''; this.model.atptxt = '';
this.model.searchAllUsers = false; this.model.searchAllUsers = false;
}, },
// 获取transaction弹框表格数据 // 获取transaction弹框表格数据
async queryGridEtyPromptDialogData(cod) { async queryGridDialog(cod) {
let params = { let params = {
inr: "", inr: '',
oldkey: "", oldkey: '',
dissel: "", dissel: '',
usrcon: "", usrcon: '',
rouflg: "", rouflg: '',
sepflg: "", sepflg: '',
cod: cod, cod: cod,
dtaflg: "", dtaflg: '',
lnkobj: "", lnkobj: '',
pageNum: 1,
pageSize: 10,
}; };
const loading = this.loading(); const loading = this.loading();
let res = await Api.post('/service/trnrel/findAtpCod', params); let res = await Api.post('/service/trnrel/findAtpCod', params);
if (res.respCode == SUCCESS) { if (res.respCode == SUCCESS) {
this.root.$refs['etyDialog'].show = true; this.$refs['gridSelectDialog'].show = true;
this.root.promptData.data = res.data && res.data.atpList; this.$refs['gridSelectDialog'].cod = cod;
this.$refs['gridSelectDialog'].tableData = res.data && res.data.atpList.list;
this.$refs['gridSelectDialog'].pagination.total = Number((res.data && res.data.atpList.total) || 0);
} }
loading.close(); loading.close();
}, },
// 选中transaction弹框表格的行数据 // 选中transaction弹框表格的行数据
async selectGridEtyPromptData(row) { async selectGridEtyPromptData(val) {
this.$set(this.model.atp, 'cod', row.cod) this.$emit('changeModel', val)
}, },
//查询列表 //查询列表
async handleSearch() { async handleSearch() {
...@@ -69,12 +73,15 @@ export default { ...@@ -69,12 +73,15 @@ export default {
bchtyp: '', bchtyp: '',
iniusr: '', iniusr: '',
userId: 'ZL', userId: 'ZL',
pageNum: this.pagination.pageIndex,
pageSize: this.pagination.pageSize
}; };
//查询接口 //查询接口
const loading = this.loading() const loading = this.loading();
const res = await Api.post('/service/trnrel/getTenrelList', params); const res = await Api.post('/service/trnrel/getTenrelList', params);
if(res.respCode === "AAAAAA") { if (res.respCode === 'AAAAAA') {
this.stmData.data = res.data; this.stmData.data = res.data.list;
this.pagination.total = Number(res.data.total);
this.$store.commit('setTaskList', { this.$store.commit('setTaskList', {
key: 'trnrel', key: 'trnrel',
val: this.stmData.data && this.stmData.data.length, val: this.stmData.data && this.stmData.data.length,
...@@ -89,23 +96,22 @@ export default { ...@@ -89,23 +96,22 @@ export default {
//交易详情 //交易详情
async onWaitDetail(idx, row) { async onWaitDetail(idx, row) {
let viewurl = 'business/inftrnpsDetail'; let viewurl = 'business/inftrnpsDetail';
const selIds = [idx + 1]; let params = {
const selDst = 'trncorco.trnstm'; //列表对应后台模型中的stream inr: row.inr,
let params = { selDst, selIds }; };
this.executeRule('dsp', params).then((res) => { const res = await Api.post('/service/trnrel/getTenrelDetailData', params);
if (res.respCode == SUCCESS) { if (res.respCode === 'AAAAAA') {
Utils.copyValueFromVO(this.model, res.data); let model = res.data;
sessionStorage.setItem('InftrnpsDetail', JSON.stringify(this.model)); sessionStorage.setItem('InftrnpsDetail', JSON.stringify(model));
this.$router.push({ path: viewurl, query: {} }); this.$router.push({ path: viewurl, query: {} });
} else { } else {
const h = this.$createElement; const h = this.$createElement;
const msg = res.respMsg || '请求执行失败!'; const msg = res.respMsg || '请求执行失败!';
this.$notify.error({ this.$notify.error({
title: '错误', title: '错误',
message: h('p', { style: 'word-break:break-all;' }, msg), message: h('p', { style: 'word-break:break-all;' }, msg),
}); });
} }
});
}, },
//处理 //处理
...@@ -124,5 +130,17 @@ export default { ...@@ -124,5 +130,17 @@ export default {
params: { prePageId: this.model.pageId }, params: { prePageId: this.model.pageId },
}); });
}, },
// pageSize改变
handleSizeChange(val) {
this.pagination.pageIndex = 1
this.pagination.pageSize = val
this.handleSearch()
},
// 页码改变
handleCurrentChange(val) {
this.pagination.pageIndex = val
this.handleSearch()
}
}, },
}; };
...@@ -3,11 +3,11 @@ export default class Inftrnps { ...@@ -3,11 +3,11 @@ export default class Inftrnps {
this.data = { this.data = {
trncorco: { trncorco: {
ownref: '', // Reference .trncorco.ownref ownref: '', // Reference .trncorco.ownref
relflg: '', // Status .trncorco.relflg relflg: '0', // Status .trncorco.relflg
inidatfro: '', // Date of entry of Transaction .trncorco.inidatfro inidatfro: '', // Date of entry of Transaction .trncorco.inidatfro
inidattil: new Date(), // Date of entry of Transaction until .trncorco.inidattil inidattil: new Date(), // Date of entry of Transaction until .trncorco.inidattil
trnstm: '', // List of transaction sfor display .trncorco.trnstm trnstm: '', // List of transaction sfor display .trncorco.trnstm
dflg: '', // 国内证标志 .trncorco.dflg dflg: '1', // 国内证标志 .trncorco.dflg
selinr: {}, selinr: {},
}, },
atp: { atp: {
......
<template>
<el-dialog
:title="promptData.title"
:visible.sync="show"
custom-class="grid-ety"
:highlight-current-row="true"
width="60%"
:before-close="beforeClose"
>
<el-table
:data="tableData"
border
@row-dblclick="selectEty"
>
<el-table-column
v-for="(item, idx) in promptData.columns"
:key="idx"
:property="item.prop"
:label="item.label"
:width="item.width"
>
</el-table-column>
</el-table>
<el-pagination
layout="prev, pager, next, total, jumper"
:total="pagination.total"
:page-sizes="pagination.pageSizes"
:page-size="pagination.pageSize"
:current-page="pagination.currentPage"
@current-change="currentChange"
@size-change="handleSizeChange"
>
</el-pagination>
</el-dialog>
</template>
<script>
import Api from "~/service/Api";
import commonApi from '~/mixin/commonApi';
export default {
mixins: [commonApi],
data() {
return {
show: false,
cod: '',
tableData: [],
pagination: {
currentPage: 1,
pageSizes: [10, 20, 50, 100, 500],
pageSize: 10,
total: 0,
},
promptData: {
title: 'Select a Transaction',
columns: [
{
prop: 'cod',
label: 'Description'
},
{
prop: 'bus',
label: 'Bus. Sector'
},
{
prop: 'bustrnflg',
label: 'Business Trn.'
},
{
prop: 'reltyp',
label: 'Release Method'
},
{
prop: 'relamt',
label: 'Real. Amount'
},
{
prop: 'ccstyp',
label: 'Compliance Check'
},
{
prop: 'subflg',
label: 'Subcontr. -creating Trn.'
},
{
prop: 'sepflg',
label: 'Temp. Settl. allowed'
},
{
prop: 'rouflg',
label: 'Routing allowed'
},
{
prop: 'concreflg',
label: 'Allocate New Contract'
},
{
prop: 'negflg',
label: 'Need pass. Data to Exec.'
},
{
prop: 'jobflg',
label: 'Job operation allowed'
}
]
}
};
},
methods: {
async handleSearch() {
let params = {
inr: '',
oldkey: '',
dissel: '',
usrcon: '',
rouflg: '',
sepflg: '',
cod: this.cod,
dtaflg: '',
lnkobj: '',
pageNum: this.pagination.currentPage,
pageSize: this.pagination.pageSize,
};
const loading = this.loading();
let res = await Api.post('/service/trnrel/findAtpCod', params);
if (res.respCode == SUCCESS) {
this.tableData = res.data && res.data.atpList.list;
this.pagination.total = Number((res.data && res.data.atpList.total) || 0);
}
loading.close();
},
currentChange(val) {
this.pagination.currentPage = val;
this.handleSearch()
},
handleSizeChange(val) {
this.pagination.currentPage = 1;
this.pagination.pageSize = val;
this.handleSearch();
},
selectEty(row) {
this.$emit("selectEty", {
...row,
role: this.promptData.type
});
this.show = false;
this.currentPage = 1;
},
beforeClose(done) {
this.show = false;
this.currentPage = 1;
done();
},
},
};
</script>
<style>
.grid-ety .el-table .cell {
white-space: pre-wrap;
}
</style>
\ No newline at end of file
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<c-col :span="24"> <c-col :span="24">
<c-col :span="20"> <c-col :span="20">
<c-input v-model="model.atp.cod" maxlength="6" style="width: 95%" placeholder="请输入交易代码" <c-input v-model="model.atp.cod" maxlength="6" style="width: 95%" placeholder="请输入交易代码"
@keyup.enter.native="queryGridEtyPromptDialogData(model.atp.cod)"></c-input> @keyup.enter.native="queryGridDialog(model.atp.cod)"></c-input>
</c-col> </c-col>
<c-col :span="4"> <c-col :span="4">
<c-button size="small" style="width:100%;margin-left:0" type="primary" @click="onSeainf" <c-button size="small" style="width:100%;margin-left:0" type="primary" @click="onSeainf"
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
<el-row> <el-row>
<c-col :span="24" style=""> <c-col :span="24" style="">
<el-table :data="stmData.data" :columns="stmData.columns" style="width:100%" :showButtonFlg="true"> <el-table :data="stmData.data" :columns="stmData.columns" style="width:100%" :max-height="maxHeight">
<el-table-column <el-table-column
v-for="(item, key) in stmData.columns" v-for="(item, key) in stmData.columns"
:key="key" :key="key"
...@@ -122,19 +122,33 @@ ...@@ -122,19 +122,33 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pagination.pageIndex"
:page-sizes="[10, 20, 50, 100, 500]"
:page-size="pagination.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="pagination.total">
</el-pagination>
</c-col> </c-col>
</el-row> </el-row>
<!-- 交易代码选择弹框 -->
<grid-select-dialog ref="gridSelectDialog" @selectEty="selectGridEtyPromptData"></grid-select-dialog>
</div> </div>
</template> </template>
<script> <script>
import commonApi from "~/mixin/commonApi" import commonApi from "~/mixin/commonApi"
import event from "../event"; import event from "../event";
import GridSelectDialog from "./GridSelectDialog";
export default { export default {
inject: ["root"], inject: ["root"],
props: ["codes", "model"], props: ["codes", "model"],
mixins: [commonApi, event], mixins: [commonApi, event],
components: {}, components: {
GridSelectDialog,
},
data() { data() {
return { return {
initdialog: false, initdialog: false,
...@@ -162,8 +176,20 @@ ...@@ -162,8 +176,20 @@
], ],
data: [], data: [],
}, },
maxHeight: 0,
pagination: {
pageIndex: 1,
pageSize: 10,
total: 0,
},
relrowDisabled: true, relrowDisabled: true,
relflgCodes: [], relflgCodes: [
{ label: "全部", value: "0" },
{ label: "已修改", value: "C" },
{ label: "已拾取", value: "P" },
{ label: "已拒绝", value: "N" },
{ label: "等待", value: "W" },
],
Trnp0Visible: false, Trnp0Visible: false,
}; };
}, },
...@@ -177,20 +203,13 @@ ...@@ -177,20 +203,13 @@
created() { created() {
this.getInidatfro(); this.getInidatfro();
}, },
async mounted() { created() {
//适配不同页面下的table高度
this.relflgCodes = [ //其中159为form表单高度,不同页面高度不同,可以考虑获取dom高度
{ label: "全部", value: "0" }, //待复核列表业务状态All this.maxHeight = (document.body.clientHeight || document.documentElement.clientHeight) - 60 - 40 - 40 - 42 - 40 - 159 - 10 - 37 - 60;
{ label: "已修改", value: "C" }, }
{ label: "已拾取", value: "P" },
{ label: "已拒绝", value: "N" },
{ label: "等待", value: "W" },
];
},
}; };
</script> </script>
<style> <style>
</style> </style>
\ No newline at end of file
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
<c-col :span="24"> <c-col :span="24">
<c-col :span="22"> <c-col :span="22">
<el-form-item label="业务编号"> <el-form-item label="业务编号">
<c-input v-model="model.trn.ownref" maxlength="16" disabled placeholder="请输入业务编号"></c-input> <c-input v-model="model.trncorco.ownref" maxlength="16" disabled placeholder="请输入业务编号"></c-input>
</el-form-item> </el-form-item>
</c-col> </c-col>
<c-col :span="2" style="text-align: right"> <c-col :span="2" style="text-align: right">
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<c-col :span="24"> <c-col :span="24">
<c-col :span="22"> <c-col :span="22">
<el-form-item label="交易代码"> <el-form-item label="交易代码">
<c-input v-model="model.recpan.atp.cod" maxlength="6" disabled placeholder="请输入交易代码"></c-input> <c-input v-model="model.atp.cod" maxlength="6" disabled placeholder="请输入交易代码"></c-input>
</el-form-item> </el-form-item>
</c-col> </c-col>
<c-col :span="2" style="text-align: right"> <c-col :span="2" style="text-align: right">
...@@ -521,27 +521,16 @@ ...@@ -521,27 +521,16 @@
model: new Trnrel().data, model: new Trnrel().data,
documentsData: { documentsData: {
columns: [ columns: [
// "1 1 \"类型\" 300 1 0:0 1 CORTYP", { label: '收报人', prop: 'cortyp' },
// "2 2 \"外部密钥\" 300", { label: '描述', prop: 'extkey' },
// "3 3 \"文档\" auto",
'1 4 "收报人" 90',
'2 5 "描述" 200',
], ],
data: [], data: [],
}, },
SignaturesData: { SignaturesData: {
columns: [ columns: [
'1 2:1 "用户" 300', { label: '类型', prop: 'sigidx' },
// '2 3:1 "Date / Time" 300', { label: '用户', prop: 'nam' },
{ { label: '日期/时间', prop: 'dattim' },
index: 2,
position: 3,
width: 300,
pattern: "time",
label: "日期/时间",
},
// '3 5:1 "Action" 400',
'4 1:1 "类型" 300',
], ],
data: [], data: [],
}, },
...@@ -555,9 +544,8 @@ ...@@ -555,9 +544,8 @@
}, },
stmData: { stmData: {
columns: [ columns: [
'1 1 "编号" 100', { label: '编号', prop: '' },
'2 2 "服务" 100', { label: '服务', prop: '' },
// '3 3 "交易状态" 100',
{ {
index: 3, index: 3,
position: 3, position: 3,
...@@ -566,11 +554,10 @@ ...@@ -566,11 +554,10 @@
label: "交易状态", label: "交易状态",
code: CodeTable.wfetrssta, code: CodeTable.wfetrssta,
}, },
'4 4 "最新更新" 120', { label: '最新更新', prop: '' },
'5 5 "重试" 100', { label: '重试', prop: '' },
'6 6 "文本" 200', { label: '文本', prop: '' },
'7 7 "相反文本" 200', { label: '相反文本', prop: '' },
// '8 8 "Target Time" auto'
{ {
index: 8, index: 8,
position: 8, position: 8,
...@@ -578,6 +565,7 @@ ...@@ -578,6 +565,7 @@
pattern: "dateFormat", pattern: "dateFormat",
label: "目标时间", label: "目标时间",
}, },
], ],
data: [], data: [],
}, },
...@@ -606,51 +594,12 @@ ...@@ -606,51 +594,12 @@
this.index = row.idx; this.index = row.idx;
} }
}, },
//加载数据
loadData() { loadData() {
// const { data } = this.$route.query let model = JSON.parse(sessionStorage.getItem("InftrnpsDetail"));
this.model = JSON.parse(sessionStorage.getItem("InftrnpsDetail")); this.documentsData.data = model.smh;
this.documentsData.data = this.model.recpan.smhstm.rows; this.SignaturesData.data = model.trs;
this.SignaturesData.data = this.model.recpan.trsstm.rows; this.stmData.data = model.stm;
this.stmData.data = this.model.recpan.wfestm.rows;
this.flg = this.ArrCalCode(this.SignaturesData.data, this.codes.flg, 3);
this.atptxt = this.strCalCode(
this.model.recpan.atp.cod,
this.codes.atptxt
);
this.relstaEN = this.strCalCode(
this.model.trn.relflg,
this.codes.relstaEN
);
this.usgtxt = this.strCalCode(this.model.trn.usg, this.codes.usgtxt);
},
strCalCode(str, code) {
var result = "";
for (let i = 0; i < code.length; i++) {
if (code[i].value === code) {
result = code[i].label;
continue;
}
}
if (result === "") {
return str;
} else {
return result;
}
},
ArrCalCode(table, code, index) {
var result = [];
for (let i = 0; i < table.length; i++) {
const d = table[i];
const items = d.split("\t");
result[i] = items[index];
for (let j = 0; j < code.length; j++) {
if (code[j].value === result[i]) {
result[i] = code[j].label;
continue;
}
}
}
return result;
}, },
exit() { exit() {
this.$store.dispatch("TagsView/delView", this.$route); this.$store.dispatch("TagsView/delView", this.$route);
......
...@@ -10,14 +10,8 @@ ...@@ -10,14 +10,8 @@
size="small" size="small"
> >
<c-content> <c-content>
<m-inftrnps :model="model" :codes="codes" ref="inftrnps" /> <m-inftrnps :model="model" :codes="codes" ref="inftrnps" @changeModel="changeModel" />
</c-content> </c-content>
<c-grid-ety-prompt-dialog
ref="etyDialog"
:promptData="promptData"
v-on:select-ety="selectGridEtyPromptData"
>
</c-grid-ety-prompt-dialog>
</el-form> </el-form>
</div> </div>
</template> </template>
...@@ -27,11 +21,10 @@ ...@@ -27,11 +21,10 @@
import Inftrnps from "./Inftrnps"; import Inftrnps from "./Inftrnps";
import Trnrel from "../model"; import Trnrel from "../model";
import event from "../event"; import event from "../event";
export default { export default {
name: "Trnrel", name: "Trnrel",
components: { components: {
"m-inftrnps": Inftrnps, "m-inftrnps": Inftrnps
}, },
mixins: [commonApi, event], mixins: [commonApi, event],
provide() { provide() {
...@@ -44,61 +37,6 @@ ...@@ -44,61 +37,6 @@
trnName: "trnrel", trnName: "trnrel",
model: new Trnrel().data, model: new Trnrel().data,
rules: null, rules: null,
promptData: {
title: 'Select a Transaction',
columns: [
{
prop: 'cod',
label: 'Description'
},
{
prop: 'bus',
label: 'Bus. Sector'
},
{
prop: 'bustrnflg',
label: 'Business Trn.'
},
{
prop: 'reltyp',
label: 'Release Method'
},
{
prop: 'relamt',
label: 'Real. Amount'
},
{
prop: 'ccstyp',
label: 'Compliance Check'
},
{
prop: 'subflg',
label: 'Subcontr. -creating Trn.'
},
{
prop: 'sepflg',
label: 'Temp. Settl. allowed'
},
{
prop: 'rouflg',
label: 'Routing allowed'
},
{
prop: 'concreflg',
label: 'Allocate New Contract'
},
{
prop: 'negflg',
label: 'Need pass. Data to Exec.'
},
{
prop: 'jobflg',
label: 'Job operation allowed'
}
],
data: []
},
codes: { codes: {
dflg: CodeTable.dflg, dflg: CodeTable.dflg,
bchtyp: CodeTable.bchtyp, bchtyp: CodeTable.bchtyp,
...@@ -106,6 +44,13 @@ ...@@ -106,6 +44,13 @@
}, },
}; };
}, },
methods: {
// 子组件改变model字段值
changeModel(val) {
let { cod } = val;
this.$set(this.model.atp, 'cod', cod)
}
}
}; };
</script> </script>
<style> <style>
......
...@@ -8,9 +8,7 @@ ...@@ -8,9 +8,7 @@
:before-close="beforeClose" :before-close="beforeClose"
> >
<el-table <el-table
:data=" :data="tableData"
tableData.slice((currentPage - 1) * pageSize, currentPage * pageSize)
"
border border
@row-dblclick="selectEty" @row-dblclick="selectEty"
> >
......
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