Commit 3312433b by WF1020

修改infgid的详情与处理

parent 5d8297a9
import Api from '~/service/Api'; import Api from '~/service/Api';
import { getTrnNameByInr } from "~/service/business/common";
export default { export default {
methods: { methods: {
async handleSearch() { async handleSearch() {
...@@ -21,13 +22,13 @@ export default { ...@@ -21,13 +22,13 @@ export default {
cmtflg: this.model.cmtflg, cmtflg: this.model.cmtflg,
fingua: this.model.fingua, fingua: this.model.fingua,
pageIndex: this.pagination.pageIndex, pageIndex: this.pagination.pageIndex,
pageSize: this.pagination.pageSize pageSize: this.pagination.pageSize,
}; };
let rtnmsg = await Api.post('/service/infgid/getList', params); let rtnmsg = await Api.post('/service/infgid/getList', params);
if (rtnmsg.respCode == SUCCESS) { if (rtnmsg.respCode == SUCCESS) {
this.stmData.data = []; this.stmData.data = [];
this.stmData.data = rtnmsg.data.list; this.stmData.data = rtnmsg.data.list;
this.pagination.total = rtnmsg.data.total this.pagination.total = rtnmsg.data.total;
} else { } else {
this.$notify.error({ title: '错误', message: '服务请求失败!' }); this.$notify.error({ title: '错误', message: '服务请求失败!' });
} }
...@@ -63,15 +64,61 @@ export default { ...@@ -63,15 +64,61 @@ export default {
// pageSize改变 // pageSize改变
handleSizeChange(val) { handleSizeChange(val) {
console.log(`每页 ${val} 条`); console.log(`每页 ${val} 条`);
this.pagination.pageIndex = 1 this.pagination.pageIndex = 1;
this.pagination.pageSize = val this.pagination.pageSize = val;
this.handleSearch() this.handleSearch();
}, },
// 页码改变 // 页码改变
handleCurrentChange(val) { handleCurrentChange(val) {
console.log(`当前页: ${val}`); console.log(`当前页: ${val}`);
this.pagination.pageIndex = val this.pagination.pageIndex = val;
this.handleSearch() this.handleSearch();
},
toGitpop() {
this.$router.history.push('/business/gitpop');
},
toGitopn() {
this.$router.history.push('/business-new/gitopn');
},
toGetopn() {
this.$router.history.push('/business/getopn');
},
// 详情
async details(row) {
const params = {
//根据xx字段 查询详情表的数据
ownref: row.ownref,
};
const res = await Api.post('/service/infgid/getDetailByOwnref', params);
if (res.respCode === SUCCESS) {
this.trnData.data = res.data;
}
},
// 关闭详情弹框
closeDetailsDialog(refId) {
this.$refs[refId].doClose();
console.log('close');
},
// 处理
handler() {
this.initdialog = true;
},
// 关闭处理弹框
closeHandlerDialog() {
this.initdialog = false;
},
/**
* 打开详情页面
* @param {string} inr
*/
display(inr) {
getTrnNameByInr({ inr }).then((res) => {
if (res.respCode == SUCCESS) {
const trnName = res.data.toLowerCase();
let viewurl = "/#/display/" + trnName + "?trn=" + inr
window.open(viewurl, 'newwindow', 'height=1500,width=1200,top=100,left=100,toolbar=no,resizable=no,menubar=no,location=no, status=no');
}
});
} }
}, },
}; };
...@@ -487,34 +487,39 @@ ...@@ -487,34 +487,39 @@
@click="closeDetailsDialog('popover_' + scope.row.IDX)" @click="closeDetailsDialog('popover_' + scope.row.IDX)"
></span> ></span>
</div> </div>
<c-istream-table <el-table
:list="trnData.data" :data="trnData.data"
:columns="trnData.columns" :columns="trnData.columns"
:showButtonFlg="true"
> >
<el-table-column <el-table-column
prop="op" v-for="(item, key) in trnData.columns"
label="操作" :key="key"
width="0" :label="item.label"
fixed="right" :prop="item.prop"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<div>{{ scope.row[item.prop] }}</div>
</template>
</el-table-column>
<el-table-column fixed="right" prop="op" label="操作" width="250px" >
<template slot-scope="scope">
<c-button <c-button
style="margin-left: 0" style="margin-left: 0"
size="small" size="small"
@click="display(scope.row['INR'])" @click="display(scope.row['inr'])"
>详情</c-button >详情</c-button
> >
</template> </template>
</el-table-column> </el-table-column>
</c-istream-table> </el-table>
<c-button <c-button
style="margin-left: 0" style="margin-left: 0"
size="small" size="small"
slot="reference" slot="reference"
@click="details" @click="details(scope.row)">
> 详情
详情</c-button </c-button>
>
</el-popover> </el-popover>
<c-button <c-button
style="margin-left: 5px" style="margin-left: 5px"
...@@ -553,7 +558,7 @@ ...@@ -553,7 +558,7 @@
:key="index" :key="index"
type="primary" type="primary"
:disabled="item.disabled" :disabled="item.disabled"
></el-button> >{{ item.name }}</el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
...@@ -572,7 +577,7 @@ export default { ...@@ -572,7 +577,7 @@ export default {
// 表格相关 // 表格相关
stmData: { stmData: {
columns: [ columns: [
{ {
label: '保函编号', label: '保函编号',
prop: 'ownref' prop: 'ownref'
}, },
...@@ -607,21 +612,38 @@ export default { ...@@ -607,21 +612,38 @@ export default {
// 详情 // 详情
trnData: { trnData: {
columns: [ columns: [
'0 1 "交易ID" 100',
'1 2 "保函编号" 200',
'2 3 "交易名称" 200',
'3 4 "条目" 200',
{ {
index: 4, label: '交易id',
position: 5, prop: 'inr'
width: 100, },
pattern: "code", {
label: "状态", label: '保函编号',
code: this.codes.relflg, prop: 'ownref'
},
{
label: '交易名称',
prop: 'ininam'
},
{
label: '条目',
prop: 'inidattim'
},
{
label: '状态',
prop: 'relflg'
},
{
label: '币种',
prop: 'reloricur'
},
{
label: '相关金额',
prop: 'reloriamt'
},
{
label: '标识',
prop: 'relres'
}, },
'5 6 "币种" 80',
'6 7 "相关金额" 150',
'7 8 "标识" 100',
], ],
data: [], data: [],
}, },
...@@ -631,32 +653,7 @@ export default { ...@@ -631,32 +653,7 @@ export default {
}; };
}, },
methods: { methods: {
toGitpop() {
this.$router.history.push("/business/gitpop");
},
toGitopn() {
this.$router.history.push("/business-new/gitopn");
},
toGetopn() {
this.$router.history.push("/business/getopn");
},
// 详情
async details(idx, row) {
},
// 关闭详情弹框
closeDetailsDialog(refId) {
this.$refs[refId].doClose();
console.log('close')
},
// 处理
handler () {
this.initdialog = true
},
// 关闭处理弹框
closeHandlerDialog () {
this.initdialog = false
}
}, },
mounted () {}, mounted () {},
}; };
......
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