Commit 27389ee3 by chenwenbin

Merge remote-tracking branch 'origin/settle-test-20230110' into settle-test-20230110

parents 93e4fc43 bf0072d4
......@@ -15,70 +15,40 @@ export default {
...engp,
...docpan,
...ccvpan,
// 提交
handleSubmit() {
console.log('提交', this.model);
},
// 检核
async handleCheck() {
const loading = this.loading('正在校验数据');
const rtnmsg = await Api.post('/service/gitopn/checkAll', {
...this.model,
async init () {
const params = {
spt: this.toHandleRowData
}
const res = await Api.post('/service/gitopn/init', {
...params,
transName: this.trnName,
userId: window.sessionStorage.userId || 'ZL',
});
if (rtnmsg.respCode === SUCCESS) {
let errorRules = rtnmsg.data;
Object.keys(errorRules).map((ruleKey) => {
// 此处判断是为了区分,如果在前端做了校验后端也校验了就不采用自定义校验规则
if (!this.rules[ruleKey]) {
this.rules[ruleKey] = [
{
validator: (rule, value, callback) => {
callback(new Error(errorRules[ruleKey]));
},
trigger: ['change', 'blur'],
},
];
}
});
console.log('rules', this.rules);
this.$refs['modelForm'].validate((valid) => {
console.log('valid', valid);
});
if (!res.data) {
return
}
// this.$notify({
// title: '成功',
// message: '校验成功',
// type: 'success',
// });
loading.close();
},
// 暂存
async handleStash() {
const loading = this.loading('正在暂存数据');
let params = {
transName: this.trnName.toUpperCase(),
userId: window.sessionStorage.userId || 'ZL',
liaccvg: this.model.liaccv.liaccvg,
liaallg: this.model.liaall.liaallg,
setfog: this.model.setmod.setfog,
setfeg: this.model.setmod.setfeg,
setglg: this.model.setmod.setglg,
doceot: this.model.docpan.doceot,
gidgrp: this.model.gidgrp,
gitp: this.model.gitp,
if (res.data.addbcb) {
this.$set(this.model, 'addbcb', res.data.addbcb)
}
const res = await Api.post('/service/gitopn/txnHold', params);
if (res.respCode === SUCCESS) {
this.$notify({
title: '成功',
message: '暂存成功',
type: 'success',
});
loading.close();
this.$router.push('/taskList')
if (res.data.gitp) {
this.$set(this.model, 'gitp', res.data.gitp)
}
if (res.data.gidgrp) {
this.$set(this.model, 'gidgrp', res.data.gidgrp)
}
if (res.data.cfagit) {
this.$set(this.model, 'cfagit', res.data.cfagit)
}
if (res.data.cnybop) {
this.$set(this.model, 'cnybop', res.data.cnybop)
}
this.$set(this.model, 'setmod', {
...this.model.setmod,
setfeg: res.data.setfeg,
setfog: res.data.setfog,
setglg: res.data.setglg,
})
console.log(res)
},
async tabClick(tab) {
if (this.isInDisplay) {
......
......@@ -182,6 +182,10 @@ export default class Gitopn {
cur: '', // Guarantee Amount .gidgrp.cbs.max.cur
amt: '0.00', // Guarantee Amount .gidgrp.cbs.max.amt
},
max2: {
cur: '',
amt: '0.00',
},
opc2: {
cur: '',
amt: '0.00',
......
......@@ -109,7 +109,7 @@
</template>
<script>
import event from '../event'
import commonProcess from "~/mixin/commonProcess";
import operationFunc from "~/mixin/operationFunc";
import formRules from '../model/check'
import CodeTable from "~/config/CodeTable";
import Gitopn from "../model";
......@@ -142,7 +142,6 @@ import Coninfp from "~/views/Public/Coninfp";
import Docpan from "~/components/business/docpan/views";
import Doctre from "~/views/Public/Doctre";
import Limitbody from "~/views/Public/Limitbody";
import moment from "moment";
import { mapState } from 'vuex';
export default {
......@@ -180,7 +179,7 @@ export default {
},
computed: {
...mapState({
toHandleRowData: (state) => state.toHandleRowData
toHandleRowData: (state) => state.gitopn.toHandleRowData
})
},
provide() {
......@@ -189,8 +188,7 @@ export default {
activeNames: ["ovwp"],
};
},
// 里面包含了Default、Check等的公共处理
mixins: [commonProcess, event],
mixins: [operationFunc, event],
data() {
return {
tabVal: "ovwp",
......@@ -245,84 +243,11 @@ export default {
}
};
},
methods: {
// 初始化给model赋值
initModelData () {
this.model.label1 = '1、申请人与我行已签署贸易融资协议(如需);'
this.model.label2 = '2、申请人已提交全套业务所需资料;'
this.model.label3 = '3、申请书要素齐全并已签章,签章已经核符;'
this.model.label4 = '4、占用授信额度的开证业务;'
this.model.cfagit.recgrp.bas.actiontype = 'A'
this.model.cfagit.recgrp.bas.guaranamount = '0.00'
this.model.cfagit.recgrp.bas.intrat = '0.0000000'
this.model.cfagit.recgrp.bas.maindebtamount = '0.00'
this.model.cfagit.recgrp.bas.maindebtdate = -1
this.model.cfagit.recgrp.bas.thje = '0.00'
this.model.cnybop.cnyflg = '2'
this.model.cnybop.cnyvou.fvouchamt = '0.000'
this.model.cnybop.libflg = '2'
this.model.cnybop.outflg = '2'
this.model.cnybop.traflg = '2'
this.model.cnybop.vouflg = '2'
this.model.gidgrp.blk.apprul = 'URDG'
this.model.gidgrp.blk.apprulc = 'NONE'
this.model.gidgrp.cbs.cnf.amt = '0.000'
this.model.gidgrp.cbs.mac2.amt = '0.000'
this.model.gidgrp.cbs.mac.amt = '0.000'
this.model.gidgrp.cbs.max.amt = '0.000'
this.model.gidgrp.cbs.opc2.amt = '0.000'
this.model.gidgrp.cbs.opn1.amt = '0.000'
this.model.gidgrp.gidcxm.cxmflg = 'N'
this.model.gidgrp.rec.bilvvv = '0.00000'
this.model.gidgrp.rec.cnfdat = moment(new Date()).format("YYYY-MM-DD")
this.model.gidgrp.rec.cnfsta = 'Y'
this.model.gidgrp.rec.guaflg = '0'
this.model.gidgrp.rec.legfrm = 'DGAR'
this.model.gidgrp.rec.legfrm = '0.000 .'
this.model.gidgrp.rec.opndat = moment(new Date()).format("YYYY-MM-DD")
this.model.gidgrp.rec.orcamt = '0.000'
this.model.gidgrp.rec.orcamtc = '0.000'
this.model.gidgrp.rec.orcrat = '0.000000'
this.model.gidgrp.rec.orcratc = '0.000000'
this.model.gidgrp.rec.orddat = moment(new Date()).format("YYYY-MM-DD")
this.model.gidgrp.rec.partcon = '100.00'
this.model.gitp.bantyp = 'Adv\\Rcv bank Ref'
this.model.gitp.labissbak = 'Issuing Bank'
this.model.gitp.labissref = 'Issuing Bank\'s Ref.'
this.model.gitp.laborcdat = 'Contract Date'
this.model.gitp.letterlabel = '面函标题'
this.model.gitp.usr.extkey = window.sessionStorage.userId || 'ZL'
this.model.liaall.exttotamt = '0.000'
this.model.liaall.exttotoldamt = '0.000'
this.model.liaccv.cshpct = '0.00'
this.model.liaccv.newamt = '0.000'
this.model.liaccv.newresamt = '0.000'
this.model.liaccv.pctresamt = '0.000'
this.model.liaccv.relcshpct = '0.00'
this.model.liaccv.totcovamt = '0.000'
this.model.liaall.limmod.ccvamt = '0.000'
this.model.liaall.limmod.comamt = '0.000'
this.model.liaall.misamt = '0.000'
this.model.setmod.dspflg = 'CG'
},
async init () {
const params = {
...this.toHandleRowData
}
const res = await Api.post('/service/xxx/xxx', {
...params,
transName: this.trnName,
userId: window.sessionStorage.userId || 'ZL',
});
console.log(res)
}
},
created () {
// this.initModelData()
// this.init()
methods: {},
mounted () {
this.init()
this.queryHndtypCodeTableList(this.trnName)
},
mounted () {},
};
</script>
<style scoped>
......
......@@ -471,9 +471,6 @@
<c-col :span="11" style="text-align: center">
<span>操作</span>
</c-col>
<!-- <c-col :span="12" style="text-align: right">
<c-button icon="el-icon-s-tools"></c-button>
</c-col> -->
</template>
<template slot-scope="scope">
<el-popover
......@@ -486,8 +483,9 @@
<div style="text-align: right;margin-top: -30px;margin-right: 5px;font-size: 16px;">
<span
class="el-icon-close"
@click="closeTrn('popover_' + scope.row.IDX)"
/>
style="cursor: pointer"
@click="closeDetailsDialog('popover_' + scope.row.IDX)"
></span>
</div>
<c-istream-table
:list="trnData.data"
......@@ -512,8 +510,8 @@
<c-button
style="margin-left: 0"
size="small"
@click="getTrnInfo(scope.$index, scope.row)"
slot="reference"
@click="details"
>
详情</c-button
>
......@@ -522,10 +520,8 @@
style="margin-left: 5px"
size="small"
type="primary"
@click="
getButtons(scope.row['保函编号'], scope.row['保函效期'])
"
>处理
@click="handler(scope.row['保函编号'], scope.row['保函效期'])"
>处理
</c-button>
</template>
</el-table-column>
......@@ -544,43 +540,36 @@
</div>
</c-col>
</div>
<!-- 点击处理弹框 -->
<el-dialog
:visible.sync="initdialog"
title="交易列表"
append-to-body
width="60%"
>
<div class="dialog-wrap">
<el-button
v-for="(item, index) in handlerDataList"
:key="index"
type="primary"
:disabled="item.disabled"
></el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import event from '../event'
import BusNavbar from "~/views/Public/BusNavbar";
export default {
inject: ["root"],
props: ["model", "codes"],
mixins: [event],
components: { "m-busbtn": BusNavbar },
components: {},
data() {
return {
ownref: "",
dialogTableVisible: false,
dialogFlag: true,
isGuarantee: "",
trnData: {
columns: [
'0 1 "交易ID" 100',
'1 2 "保函编号" 200',
'2 3 "交易名称" 200',
'3 4 "条目" 200',
{
index: 4,
position: 5,
width: 100,
pattern: "code",
label: "状态",
code: this.codes.relflg,
},
'5 6 "币种" 80',
'6 7 "相关金额" 150',
'7 8 "标识" 100',
],
data: [],
},
// 表格相关
stmData: {
columns: [
{
......@@ -614,37 +603,34 @@ export default {
pageIndex: 1,
pageSize: 10,
total: 0
}
},
// 详情
trnData: {
columns: [
'0 1 "交易ID" 100',
'1 2 "保函编号" 200',
'2 3 "交易名称" 200',
'3 4 "条目" 200',
{
index: 4,
position: 5,
width: 100,
pattern: "code",
label: "状态",
code: this.codes.relflg,
},
'5 6 "币种" 80',
'6 7 "相关金额" 150',
'7 8 "标识" 100',
],
data: [],
},
// 处理
initdialog: false,
handlerDataList: []
};
},
methods: {
async onChoose(code, prePageId) {
//跳转交易
// this.$router.history.push("/business/" + code);
this.$router.push({ name: code.charAt(0).toUpperCase() + code.substring(1), params: { prePageId } });
this.$refs.childs.initdialog = false;
},
async getDitSelInfo(code) {
//跳转交易
this.$router.history.push("/business/" + code);
this.$refs.childs.initdialog = false;
},
async getTrnInfo(idx, row) {
this.model.infcon.objinr = row["INR"];
this.model.gidgrp.rec.inr = row["INR"];
this.model.infcon.chksubcon = "X";
this.dialogTableVisible = true;
let rtnmsg = await this.executeDefault("infcon.chksubcon");
if ((rtnmsg.respCode = SUCCESS)) {
this.trnData.data = rtnmsg.data.infcon_trnstm.rows;
}
},
closeTrn(refId) {
this.$refs[refId].doClose();
},
toGitpop() {
this.$router.history.push("/business/gitpop");
},
......@@ -654,11 +640,25 @@ export default {
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
}
},
created: function () {},
watch: {
"model.gidgrp.rec.ownref": function () {},
},
mounted () {},
};
</script>
<style scoped>
......
......@@ -513,6 +513,15 @@ export default {
],
data: [],
},
gitopn:{
"gidgrp":{},
"gitp":{},
"trnmodVo":{},
"addbcb":{},
"cnybop":{},
"codcny":{},
"doceot":{}
},
suppress: false,
};
},
......@@ -589,12 +598,19 @@ export default {
// // this.model.docpan.cortyp = cortyp
// }
const params = {
index: row.idx,
let params = {
docVo: row,
};
this.gitopn.gidgrp = this.model.gidgrp
this.gitopn.gitp = this.model.gitp
this.gitopn.trnmodVo = this.model.trnmod
this.gitopn.addbcb = this.model.addbcb
this.gitopn.cnybop = this.model.cnybop
this.gitopn.doceot = this.model.docpan.doceot
console.log(this.gitopn)
rtnmsg = await Api.post(
`${this.requestPrefix}/executeDocpan`,
this.wrapper(params)
this.gitopn
);
if (rtnmsg.respCode == SUCCESS) {
if (cortyp == 'SWT' || cortyp == 'FMT' || cortyp == 'CMT') {
......@@ -628,6 +644,19 @@ export default {
} else {
this.title = '面函';
let viewurl = '/#/docpan/show';
let base64Str = rtnmsg.data.executeDocpan;
let bstr = window.atob(base64Str); // 解码 base-64 编码的字符串,base-64 编码使用方法是 btoa()
let length = bstr.length;
let u8arr = new Uint8Array(length); // 创建初始化为0的,包含length个元素的无符号整型数组
while (length--) {
u8arr[length] = bstr.charCodeAt(length); // 返回在指定的位置的字符的 Unicode 编码
}
let blob = new Blob([u8arr]);
let param={
blob:blob,
docnam:row.docnam
}
window["params"] = param;
window.open(
viewurl,
'newwindow',
......
// 此文件存放交易流转的一些公共方法
import Api from '~/service/Api';
export default {
methods: {
// 提交
handleSubmit() {
console.log('提交', this.model);
},
// 检核
async handleCheck() {
const loading = this.loading('正在校验数据');
const rtnmsg = await Api.post('/service/gitopn/checkAll', {
...this.model,
transName: this.trnName,
userId: window.sessionStorage.userId || 'ZL',
});
if (rtnmsg.respCode === SUCCESS) {
let errorRules = rtnmsg.data;
Object.keys(errorRules).map((ruleKey) => {
// 此处判断是为了区分,如果在前端做了校验后端也校验了就不采用自定义校验规则
if (!this.rules[ruleKey]) {
this.rules[ruleKey] = [
{
validator: (rule, value, callback) => {
callback(new Error(errorRules[ruleKey]));
},
trigger: ['change', 'blur'],
},
];
}
});
console.log('rules', this.rules);
this.$refs['modelForm'].validate((valid) => {
console.log('valid', valid);
});
}
// this.$notify({
// title: '成功',
// message: '校验成功',
// type: 'success',
// });
loading.close();
},
// 暂存
async handleStash() {
const loading = this.loading('正在暂存数据');
let params = {
transName: this.trnName.toUpperCase(),
userId: window.sessionStorage.userId || 'ZL',
liaccvg: this.model.liaccv.liaccvg,
liaallg: this.model.liaall.liaallg,
setfog: this.model.setmod.setfog,
setfeg: this.model.setmod.setfeg,
setglg: this.model.setmod.setglg,
doceot: this.model.docpan.doceot,
gidgrp: this.model.gidgrp,
gitp: this.model.gitp,
}
const res = await Api.post('/service/gitopn/txnHold', params);
if (res.respCode === SUCCESS) {
this.$notify({
title: '成功',
message: '暂存成功',
type: 'success',
});
loading.close();
this.$router.push('/taskList')
}
},
}
}
\ No newline at end of file
......@@ -4,7 +4,7 @@ const store = {
},
mutations: {
updateToHandleRowData(state, params) {
state.toBehandleRowData = params
state.toHandleRowData = params
}
}
}
......
......@@ -25,56 +25,28 @@ export default {
},
methods: {
async goPreview () {
let routeQuery = this.$route.query
const params = {
index: routeQuery.idx,
};
let res = await Api.post('/service/gitopn/executeDocpan', this.wrapper(params));
if (res.respCode == SUCCESS) {
let base64Str = res.data.executeDocpan;
let bstr = window.atob(base64Str); // 解码 base-64 编码的字符串,base-64 编码使用方法是 btoa()
let length = bstr.length;
let u8arr = new Uint8Array(length); // 创建初始化为0的,包含length个元素的无符号整型数组
while (length--) {
u8arr[length] = bstr.charCodeAt(length); // 返回在指定的位置的字符的 Unicode 编码
}
let blob = new Blob([u8arr]);
renderAsync(blob, this.$refs.file)
}
let params = window.opener["params"];
let blob = params.blob
renderAsync(blob, this.$refs.file)
this.$nextTick(() => {
let dom = document.querySelector('.docWrap')
dom.style.height = '100vh'
dom.style.overflow = 'auto'
})
},
async downLoad () {
let routeQuery = this.$route.query
const params = {
index: routeQuery.idx,
};
let res = await Api.post('/service/gitopn/executeDocpan', this.wrapper(params));
if (res.respCode == SUCCESS) {
let base64Str = res.data.executeDocpan;
let bstr = window.atob(base64Str); // 解码 base-64 编码的字符串,base-64 编码使用方法是 btoa()
let length = bstr.length;
let u8arr = new Uint8Array(length); // 创建初始化为0的,包含length个元素的无符号整型数组
while (length--) {
u8arr[length] = bstr.charCodeAt(length); // 返回在指定的位置的字符的 Unicode 编码
}
let blob = new Blob([u8arr]);
var a = document.createElement("a"); //创建一个<a></a>标
a.href = URL.createObjectURL(blob); // 将流文件写入a标签的href属性值
a.download = "gitopn.docx"; //设置文件名
a.style.display = "none"; // 障眼法藏起来a标签
document.body.appendChild(a); // 将a标签追加到文档对象中
a.click(); // 模拟点击了a标签,会触发a标签的href的读取,浏览器就会自动下载了
a.remove(); // 一次性的,用完就删除a标签
}
let params = window.opener["params"];
let blob = params.blob
let docnam = params.docnam
var a = document.createElement("a"); //创建一个<a></a>标
a.href = URL.createObjectURL(blob); // 将流文件写入a标签的href属性值
a.download = docnam; //设置文件名
a.style.display = "none"; // 障眼法藏起来a标签
document.body.appendChild(a); // 将a标签追加到文档对象中
a.click(); // 模拟点击了a标签,会触发a标签的href的读取,浏览器就会自动下载了
a.remove(); // 一次性的,用完就删除a标签
}
}
};
</script>
<style scoped>
::v-deep .docx-wrapper {
width: 100%;
height: 100vh;
padding: 0;
overflow: auto;
}
</style>
<style scoped></style>
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