Commit 944e6f03 by chengzhuoshen

表外保证金前端代码

parent 8fdfdfa2
......@@ -118,6 +118,105 @@ export default {
return liaccvRequest;
},
buildLiaccv(obj) {
let liaccvRequest = new LiaccvRequest().data;
let rec = {};
let cbsMap = {};
if (obj.trnName === "litopn") {
rec.objtyp = "LID";
rec.ownref = obj.model.lidgrp.rec.ownref;
rec.opndat = obj.model.lidgrp.rec.opndat;
rec.branchInr = obj.model.lidgrp.rec.branchinr;
liaccvRequest.rec = rec;
cbsMap.NOM1 = {
"cur":obj.model.lidgrp.cbs.nom1.cur,
"amt":obj.model.lidgrp.cbs.nom1.amt,
};
cbsMap.OPN1 = {};
cbsMap.OPN2 = {
"cur":obj.model.lidgrp.cbs.opn2.cur,
"amt":obj.model.lidgrp.cbs.opn2.amt,
};
cbsMap.MAX = {
"cur":obj.model.lidgrp.cbs.max.cur,
"amt":obj.model.lidgrp.cbs.max.amt,
};
cbsMap.MAX2 = {
"cur":obj.model.lidgrp.cbs.max2.cur,
"amt":obj.model.lidgrp.cbs.max2.amt,
};
liaccvRequest.cbsMap = cbsMap;
let ptsptaList = [];
if (obj.model.lidgrp.apl.pts.extkey !== "") {
ptsptaList.push(obj.buildPtspta(obj.model.lidgrp.apl));
}
if (obj.model.lidgrp.adv.pts.extkey !== "") {
ptsptaList.push(obj.buildPtspta(obj.model.lidgrp.adv));
}
if (obj.model.lidgrp.ben.pts.extkey !== "") {
ptsptaList.push(obj.buildPtspta(obj.model.lidgrp.ben));
}
liaccvRequest.ptsList = ptsptaList;
} else if (obj.trnName === "gitopn") {
rec.objtyp = "GID";
rec.ownref = obj.model.gidgrp.rec.ownref;
rec.opndat = obj.model.gidgrp.rec.opndat;
rec.expdat = obj.model.gidgrp.rec.expdat;
rec.branchInr = obj.model.gidgrp.rec.branchinr;
rec.hndtyp = obj.model.gidgrp.rec.hndtyp;
rec.gartyp = obj.model.gidgrp.rec.gartyp;
rec.fingua = obj.model.gidgrp.rec.fingua;
rec.segtyp = obj.model.gidgrp.ghd.segtyp;
rec.fromflg = obj.model.gidgrp.rec.fromflg;
rec.othersno= obj.model.gidgrp.rec.othersno;
rec.sndto = obj.model.gidgrp.rec.sndto;
rec.swiftflg = obj.model.gitp.swiftflg;
rec.giduil = obj.model.gidgrp.rec.giduil;
rec.purpos = obj.model.gidgrp.rec.purpos;
rec.revflg = obj.model.gidgrp.rec.revflg;
rec.cnfsta = obj.model.gidgrp.rec.cnfsta;
liaccvRequest.rec = rec;
cbsMap.MAX = obj.model.gidgrp.cbs.max;
cbsMap.OPN1 = obj.model.gidgrp.cbs.opn1;
cbsMap.MAC = obj.model.gidgrp.cbs.mac;
cbsMap.MAC2 = obj.model.gidgrp.cbs.mac2;
cbsMap.OPC2 = obj.model.gidgrp.cbs.opc2;
cbsMap.CNF = obj.model.gidgrp.cbs.cnf;
liaccvRequest.cbsMap = cbsMap;
let ptsptaList = [];
if (obj.model.gidgrp.apl.pts.extkey !== "") {
ptsptaList.push(obj.buildPtspta(obj.model.gidgrp.apl));
}
if (obj.model.gidgrp.adv.pts.extkey !== "") {
ptsptaList.push(obj.buildPtspta(obj.model.gidgrp.adv));
}
if (obj.model.gidgrp.ben.pts.extkey !== "") {
ptsptaList.push(obj.buildPtspta(obj.model.gidgrp.ben));
}
liaccvRequest.ptsList = ptsptaList;
}
liaccvRequest.transName = obj.trnName;
if (!!window.sessionStorage.userId) {
liaccvRequest.userId = window.sessionStorage.userId;
} else {
liaccvRequest.userId = "ZL";
}
liaccvRequest.liaccvg = obj.model.liaccv.liaccvg;
liaccvRequest.oldamt = obj.model.liaccv.oldamt;
liaccvRequest.chgamt = obj.model.liaccv.chgamt;
liaccvRequest.concur = obj.model.liaccv.concur;
return liaccvRequest;
},
async processLiaccv() {
//组数据,发post请求
const loading = this.loading("正在请求数据")
......
......@@ -31,7 +31,11 @@ export default class LiaccvRequest {
}
},
ptsList: [],
liaccvg: []
liaccvg: [],
fcdVo: {},
oldamt: "",
chgamt: "",
concur: ""
}
}
}
\ No newline at end of file
export default class Liaccv {
constructor() {
this.data = {
oldamt: "",
chgamt: "",
newamt: "", // 合同金额 .liaall.liaccv.newamt
concur: "", // 应付保证金金额 .liaall.liaccv.concur
totcovamt: "", // 金额总和 .liaall.liaccv.totcovamt
......
......@@ -170,13 +170,18 @@
<template>
<el-dialog :visible.sync="dialogTableVisible" width="60%" center>
<c-istream-table
:list="stmData.data"
:columns="stmData.columns"
:paginationShow="true"
:total="stmData.data.length"
:tableData="stmData.data"
<el-table
:data="stmData.data"
:columns="stmData.columns"
:showButtonFlg="true"
>
<el-table-column
v-for="(item, key) in stmData.columns"
:key="key"
:label="item.label"
:prop="item.prop"
:width="item.width"
></el-table-column>
<el-table-column prop="op" label="OP" width="80" fixed="right">
<template slot-scope="scope">
<c-button
......@@ -189,7 +194,7 @@
</c-button>
</template>
</el-table-column>
</c-istream-table>
</el-table>
</el-dialog>
</template>
<c-col :span="24">
......@@ -304,6 +309,7 @@
</div>
</template>
<script>
import Event from "../event"
import Api from "~/service/Api";
import commonProcess from "~/mixin/commonProcess";
import CodeTable from "~/config/CodeTable";
......@@ -318,20 +324,43 @@
dialogTableVisible: false,
stmData: {
columns: [
'1 1:1 "编号" 150',
'2 2:1 "用户" 80',
'3 3:1 "申请人" 100',
'4 4:1 "账户" 200',
'5 5:1 "币种" 200',
'6 6:1 "金额" 100 2 0 1 18.3',
'7 7:1 "开立日期" 80 4 7',
'8 8:1 "标志" 150',
'9 9:1 "备注" 250',
"P COLORED TRUE",
"P VERTLINES TRUE",
"P HORZLINES TRUE",
"P MULTISELECT FALSE",
"P COLUMNSIZING TRUE",
{
label: '编号',
prop: 'ownref'
},
{
label: '用户',
prop: 'ownusr'
},
{
label: '申请人',
prop: 'aplnam',
width: 180
},
{
label: '账户',
prop: 'engact'
},
{
label: '币种',
prop: 'cur'
},
{
label: '金额',
prop: 'amt'
},
{
label: '开立日期',
prop: 'opndat'
},
{
label: '标志',
prop: 'gleflg'
},
{
label: '备注',
prop: 'reason'
}
],
data: [],
},
......@@ -339,41 +368,40 @@
};
},
methods: {
...Event,
async onLiaccvAdd() {
let rtnmsg = await this.executeRule("liaall.liaccv.add");
//const that = this.root;
let rulePath = "/service/liaccv/getFcdList";
let liaccvRequest = this.buildLiaccv(this.root);
let rtnmsg = await Api.post(rulePath, liaccvRequest);
if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑
if (typeof rtnmsg.data.vals != "undefined") {
this.stmData.data = rtnmsg.data.vals.rows;
} else {
this.stmData.data = [];
}
this.dialogTableVisible = true;
} else {
this.$notify.error({ title: "错误", message: "服务请求失败!" });
this.dialogTableVisible = true;
this.stmData.data = rtnmsg.data;
}
},
async pickDepItem(idx, row) {
var params = { selDst: "", selIds: [idx + 1] };
let rtnmsg = await this.executeRule("liaall.liaccv.add", params);
let rulePath = "/service/liaccv/addLiaccvg";
let liaccvRequest = this.buildLiaccv(this.root);
liaccvRequest.fcdVo = row;
let rtnmsg = await Api.post(rulePath, liaccvRequest);
if (rtnmsg.respCode == SUCCESS) {
this.dialogTableVisible = false;
Utils.copyValueFromVO(this.model, rtnmsg.data);
Utils.copyValueFromVO(this.model.liaccv, rtnmsg.data);
}
},
async onLiaccvDel(index, row) {
let ids = [index + 1];
let params = { selDst: "liaall.liaccv.liaccvg", selIds: ids };
let rtnmsg = await this.executeRule("liaall.liaccv.del", params);
let fcdVo = {
inr : row.fcdinr
}
let rulePath = "/service/liaccv/deleteLiaccvg";
let liaccvRequest = this.buildLiaccv(this.root);
liaccvRequest.fcdVo = fcdVo;
let rtnmsg = await Api.post(rulePath, liaccvRequest);
if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑
Utils.copyValueFromVO(this.model.liaccv, rtnmsg.data);
this.$message({
type: "success",
message: "删除成功!",
});
//this.model.liaall.liaccv.liaccvg = [];
Utils.copyValueFromVO(this.model, rtnmsg.data);
} else {
this.$notify.error({ title: "错误", message: "服务请求失败!" });
}
......
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