Commit 669fd09b by huangshunlin

即期结售汇前端调整,增加结售汇申报组件

parent d0b167ad
...@@ -24,6 +24,7 @@ export default class Fxdgrp { ...@@ -24,6 +24,7 @@ export default class Fxdgrp {
dsp: "", // 外币结算账号 fxdgrp.rec.dsp dsp: "", // 外币结算账号 fxdgrp.rec.dsp
dsp2: "", // 本币结算账号 fxdgrp.rec.dsp2 dsp2: "", // 本币结算账号 fxdgrp.rec.dsp2
usr: "", // 业务经办人 fxdgrp.rec.usr usr: "", // 业务经办人 fxdgrp.rec.usr
ownusr: "", // Clearing Department Responsible User fxdgrp.rec.ownusr
}, },
blk: { blk: {
remark: "", // 备注 fxdgrp.blk.remark remark: "", // 备注 fxdgrp.blk.remark
...@@ -31,19 +32,19 @@ export default class Fxdgrp { ...@@ -31,19 +32,19 @@ export default class Fxdgrp {
cbs: { cbs: {
max: { max: {
cur: "", // Currency fxdgrp.cbs.max.cur cur: "", // Currency fxdgrp.cbs.max.cur
amt: 0.00, // Balance fxdgrp.cbs.max.amt amt: "", // Balance fxdgrp.cbs.max.amt
}, },
nom1: { nom1: {
cur: "", // Currency fxdgrp.cbs.nom1.cur cur: "", // Currency fxdgrp.cbs.nom1.cur
amt: 0.00, // Balance fxdgrp.cbs.nom1.amt amt: "", // Balance fxdgrp.cbs.nom1.amt
}, },
opn1: { opn1: {
cur: "", // Currency fxdgrp.cbs.nom1.cur cur: "", // Currency fxdgrp.cbs.nom1.cur
amt: 0.00, // Balance fxdgrp.cbs.nom1.amt amt: "", // Balance fxdgrp.cbs.nom1.amt
}, },
opn2: { opn2: {
cur: "", // Currency fxdgrp.cbs.nom1.cur cur: "", // Currency fxdgrp.cbs.nom1.cur
amt: 0.00, // Balance fxdgrp.cbs.nom1.amt amt: "", // Balance fxdgrp.cbs.nom1.amt
}, },
}, },
apl: { apl: {
......
import commonFunctions from '~/mixin/commonFunctions.js'; import commonFunctions from "~/mixin/commonFunctions.js";
import Api from '~/service/Api'; import Api from "~/service/Api";
export default { export default {
mixins: [commonFunctions], mixins: [commonFunctions],
methods: { methods: {
async getOwnref() { async getOwnref() {
if (this.model.fxdgrp.rec.fxtyp == "") { if (this.model.fxdgrp.rec.fxtyp == "") {
this.$notify.warning({ this.$notify.warning({
title: '提示', title: "提示",
message: '请先选择结售汇类型!' message: "请先选择结售汇类型!",
}); });
return; return;
} }
const loading = this.loading(); const loading = this.loading();
let res = await Api.post(`/${this.moduleRouter()}/fxtssb/getRef`, this.model); let res = await Api.post(
loading.close(); `/${this.moduleRouter()}/fxtssb/getRef`,
if (res.respCode !== SUCCESS) { this.model
this.$message.error(res.respMsg); );
return; loading.close();
} if (res.respCode !== SUCCESS) {
this.model.fxdgrp.rec.ownref = res.data; this.$message.error(res.respMsg);
}, return;
}
this.model.fxdgrp.rec.ownref = res.data;
},
async defaultAccountsN1000() { async defaultAccountsN1000() {
if (this.model.fxdgrp.rec.fxtyp == "") { if (this.model.fxdgrp.rec.fxtyp == "") {
return; return;
} }
if (this.model.fxdgrp.cbs.max.cur == "") { if (this.model.fxdgrp.cbs.max.cur == "") {
return; return;
} }
if (this.model.fxdgrp.apl.pts.ptyinr == "") { if (this.model.fxdgrp.apl.pts.ptyinr == "") {
return; return;
} }
const loading = this.loading(); const loading = this.loading();
let res = await Api.post(`/${this.moduleRouter()}/fxtssb/defaultAccountsN1000`, this.model); let res = await Api.post(
loading.close(); `/${this.moduleRouter()}/fxtssb/defaultAccountsN1000`,
if (res.respCode !== SUCCESS) { this.model
this.$message.error(res.respMsg); );
return; loading.close();
} if (res.respCode !== SUCCESS) {
// this.updateValueSet(res.codeSet); this.$message.error(res.respMsg);
this.model.accLst = res.codeSet['accLst']; return;
this.model.accLst2 = res.codeSet['acc2Lst']; }
this.model.fxdgrp.rec.acc = res.data.fxdgrp.rec.acc; // this.updateValueSet(res.codeSet);
this.model.fxdgrp.rec.acc2 = res.data.fxdgrp.rec.acc2; this.model.accLst = res.codeSet["accLst"];
}, this.model.accLst2 = res.codeSet["acc2Lst"];
this.model.fxdgrp.rec.acc = res.data.fxdgrp.rec.acc;
this.model.fxdgrp.rec.acc2 = res.data.fxdgrp.rec.acc2;
},
async defaultRateN1000() { async defaultRateN1000() {
if (this.model.fxdgrp.rec.fxtyp == "") { if (this.model.fxdgrp.rec.fxtyp == "") {
return; return;
} }
if (this.model.fxdgrp.cbs.max.cur == "") { if (this.model.fxdgrp.cbs.max.cur == "") {
return; return;
} }
if (this.model.fxdgrp.apl.pts.ptyinr == "") { if (this.model.fxdgrp.apl.pts.ptyinr == "") {
return; return;
} }
const loading = this.loading(); const loading = this.loading();
let res = await Api.post(`/${this.moduleRouter()}/fxtssb/defaultRateN1000`, this.model); let res = await Api.post(
loading.close(); `/${this.moduleRouter()}/fxtssb/defaultRateN1000`,
if (res.respCode !== SUCCESS) { this.model
this.$message.error(res.respMsg); );
return; loading.close();
} if (res.respCode !== SUCCESS) {
this.model.fxdgrp.rec.rat = res.data.fxdgrp.rec.rat; this.$message.error(res.respMsg);
this.model.fxdgrp.rec.midrat = res.data.fxdgrp.rec.midrat; return;
}, }
this.model.fxdgrp.rec.rat = res.data.fxdgrp.rec.rat;
this.model.fxdgrp.rec.midrat = res.data.fxdgrp.rec.midrat;
},
async defaultAccAndRate() { async defaultAccAndRate() {
this.defaultAccountsN1000(); this.defaultAccountsN1000();
this.defaultRateN1000(); await this.defaultRateN1000();
console.log("defaultAccAndRate") this.defaultCalculateN1100();
this.defaultCalculateN1100(); },
},
async defaultCalculateN1100() { async defaultCalculateN1100() {
console.log("defaultCalculateN1100") console.log("defaultCalculateN1100");
if (this.model.fxdgrp.rec.rat == "") { if (this.model.fxdgrp.rec.rat == "") {
return; return;
} }
if (this.model.fxdgrp.cbs.max.cur == "") { if (this.model.fxdgrp.cbs.max.cur == "") {
return; return;
} }
if (this.model.fxdgrp.cbs.max.amt == "" || this.model.fxdgrp.cbs.max.amt == 0) { if (
return; this.model.fxdgrp.cbs.max.amt == "" ||
} this.model.fxdgrp.cbs.max.amt == 0
const loading = this.loading(); ) {
let res = await Api.post(`/${this.moduleRouter()}/fxtssb/defaultCalculateN1100`, this.model); return;
loading.close(); }
if (res.respCode !== SUCCESS) { const loading = this.loading();
this.$message.error(res.respMsg); let res = await Api.post(
return; `/${this.moduleRouter()}/fxtssb/defaultCalculateN1100`,
} this.model
this.model.fxdgrp.cbs.max.amt = res.data.fxdgrp.cbs.max.amt; );
this.model.fxdgrp.cbs.nom1.amt = res.data.fxdgrp.cbs.nom1.amt; loading.close();
}, if (res.respCode !== SUCCESS) {
} this.$message.error(res.respMsg);
} return;
\ No newline at end of file }
this.model.fxdgrp.cbs.max.amt = res.data.fxdgrp.cbs.max.amt;
this.model.fxdgrp.cbs.nom1.amt = res.data.fxdgrp.cbs.nom1.amt;
},
},
};
export default { import JshmodCheck from "~/components/business/jshmod/model/check";
export default function () {
return {
...new JshmodCheck(this).check,
"fxdgrp.rec.ownref": [ "fxdgrp.rec.ownref": [
{type: "string", required: true, message: "必输项"}, { type: "string", required: true, message: "必输项" },
{max: 16, message: "长度不能超过16"} { max: 16, message: "长度不能超过16" },
], ],
"fxdgrp.rec.nam": [ "fxdgrp.rec.nam": [
{type: "string", required: false, message: "必输项"}, { type: "string", required: false, message: "必输项" },
{max: 40, message: "长度不能超过40"} { max: 40, message: "长度不能超过40" },
], ],
"fxdgrp.apl.pts.ref": [ "fxdgrp.apl.pts.ref": [
{type: "string", required: false, message: "必输项"}, { type: "string", required: false, message: "必输项" },
{max: 20, message: "长度不能超过20"} { max: 20, message: "长度不能超过20" },
], ],
"fxdgrp.rec.usr": [ "fxdgrp.rec.usr": [
{type: "string", required: false, message: "必输项"}, { type: "string", required: false, message: "必输项" },
{max: 8, message: "长度不能超过8"} { max: 8, message: "长度不能超过8" },
], ],
"fxdgrp.apl.pts.extkey": [ "fxdgrp.apl.pts.extkey": [
{type: "string", required: false, message: "必输项"}, { type: "string", required: false, message: "必输项" },
{max: 16, message: "长度不能超过16"} { max: 16, message: "长度不能超过16" },
], ],
"fxdgrp.apl.pts.adrblk": [ "fxdgrp.apl.pts.adrblk": [
{type: "string", required: true, message: "必输项"}, { type: "string", required: true, message: "必输项" },
{max: 35, message: "长度不能超过35"} { max: 35, message: "长度不能超过35" },
],
"fxdgrp.cbs.max.cur": [
{ type: "string", required: true, message: "必输项" },
{ max: 3, message: "3" },
], ],
"fxdgrp.cbs.max.amt": [ "fxdgrp.cbs.max.amt": [
{type: "string", required: true, message: "必输项"}, { type: "string", required: true, message: "必输项" },
{max: 18, message: "整数位不能超过14位"}, { max: 18, message: "整数位不能超过14位" },
{pattern: /(^\d+$)|(^\.\d{1,3}$)|(^\d+\.\d{1,3}$)/, message: "小数位不能超过3位"} {
pattern: /(^\d+$)|(^\.\d{1,3}$)|(^\d+\.\d{1,3}$)/,
message: "小数位不能超过3位",
},
], ],
"fxdgrp.cbs.nom1.amt": [ "fxdgrp.cbs.nom1.amt": [
{type: "string", required: false, message: "必输项"}, { type: "string", required: false, message: "必输项" },
{max: 18, message: "整数位不能超过14位"}, { max: 18, message: "整数位不能超过14位" },
{pattern: /(^\d+$)|(^\.\d{1,3}$)|(^\d+\.\d{1,3}$)/, message: "小数位不能超过3位"} {
pattern: /(^\d+$)|(^\.\d{1,3}$)|(^\d+\.\d{1,3}$)/,
message: "小数位不能超过3位",
},
], ],
"fxdgrp.rec.quoref": [ "fxdgrp.rec.quoref": [
{type: "string", required: false, message: "必输项"}, { type: "string", required: false, message: "必输项" },
{max: 16, message: "长度不能超过16"} { max: 16, message: "长度不能超过16" },
], ],
"fxdgrp.rec.fudref": [ "fxdgrp.rec.fudref": [
{type: "string", required: false, message: "必输项"}, { type: "string", required: false, message: "必输项" },
{max: 16, message: "长度不能超过16"} { max: 16, message: "长度不能超过16" },
], ],
"fxdgrp.rec.opndat": [ "fxdgrp.rec.opndat": [{ required: true, message: "输入正确的日期" }],
{required: true, message: "输入正确的日期"} "fxdgrp.rec.valdat": [{ required: true, message: "输入正确的日期" }],
], "fxdgrp.rec.setdat": [{ required: false, message: "输入正确的日期" }],
"fxdgrp.rec.valdat": [ "fxdgrp.rec.setdatto": [{ required: false, message: "输入正确的日期" }],
{required: true, message: "输入正确的日期"} "fxdgrp.rec.setdatfrm": [{ required: false, message: "输入正确的日期" }],
],
"fxdgrp.rec.setdat": [
{required: false, message: "输入正确的日期"}
],
"fxdgrp.rec.setdatto": [
{required: false, message: "输入正确的日期"}
],
"fxdgrp.rec.setdatfrm": [
{required: false, message: "输入正确的日期"}
],
"fxdgrp.blk.remark": [ "fxdgrp.blk.remark": [
{type: "string", required: false, message: "必输项"}, { type: "string", required: false, message: "必输项" },
{max: 35, message: "长度不能超过35"} { max: 35, message: "长度不能超过35" },
], ],
"fxdgrp.rec.dsp": [ "fxdgrp.rec.dsp": [
{type: "string", required: true, message: "必输项"}, { type: "string", required: true, message: "必输项" },
{max: 2, message: "长度不能超过2"} { max: 2, message: "长度不能超过2" },
], ],
"fxdgrp.rec.dsp2": [ "fxdgrp.rec.dsp2": [
{type: "string", required: true, message: "必输项"}, { type: "string", required: true, message: "必输项" },
{max: 2, message: "长度不能超过2"} { max: 2, message: "长度不能超过2" },
], ],
"fxdgrp.rec.acc": [ "fxdgrp.rec.acc": [
{type: "string", required: true, message: "必输项"}, { type: "string", required: true, message: "必输项" },
{max: 21, message: "长度不能超过21"} { max: 21, message: "长度不能超过21" },
], ],
"fxdgrp.rec.acc2": [ "fxdgrp.rec.acc2": [
{type: "string", required: true, message: "必输项"}, { type: "string", required: true, message: "必输项" },
{max: 21, message: "长度不能超过21"} { max: 21, message: "长度不能超过21" },
], ],
"fxdgrp.rec.trnman": [ "fxdgrp.rec.trnman": [
{type: "string", required: true, message: "必输项"}, { type: "string", required: true, message: "必输项" },
{max: 2, message: "长度不能超过2"} { max: 2, message: "长度不能超过2" },
], ],
"fxdgrp.rec.trdint": [ "fxdgrp.rec.trdint": [
{type: "string", required: true, message: "必输项"}, { type: "string", required: true, message: "必输项" },
{max: 3, message: "长度不能超过3"} { max: 3, message: "长度不能超过3" },
], ],
} };
\ No newline at end of file }
...@@ -16,6 +16,7 @@ export default class Fxtssb { ...@@ -16,6 +16,7 @@ export default class Fxtssb {
setmod: new Pub().data.Setmod, setmod: new Pub().data.Setmod,
docpan: new Pub().data.Docpan, docpan: new Pub().data.Docpan,
trndia: new Pub().data.Trndia, trndia: new Pub().data.Trndia,
jshmod: new Pub().data.Jshmod,
} }
} }
} }
\ No newline at end of file
...@@ -250,10 +250,6 @@ ...@@ -250,10 +250,6 @@
:filterKey="['110','121','122','123','124','125','126','12X','131','132','210','220','221','222','223','231','232','240','241','242','250','260','261','262','270']"> :filterKey="['110','121','122','123','124','125','126','12X','131','132','210','220','221','222','223','231','232','240','241','242','250','260','261','262','270']">
</c-select> </c-select>
</el-form-item> </el-form-item>
<el-form-item prop="fxdgrp.rec.trdout" style="display:none">
<c-select v-model="model.fxdgrp.rec.trdout" style="width:100%">
</c-select>
</el-form-item>
</c-col> </c-col>
</c-col> </c-col>
</c-col> </c-col>
...@@ -279,9 +275,11 @@ ...@@ -279,9 +275,11 @@
return flg; return flg;
}, },
defaultNam950: function () { defaultNam950: function () {
let amount = this.moneyFormat(this.model.fxdgrp.cbs.max.amt, this.model.fxdgrp.cbs.max.cur) let amount = this.moneyFormat(this.model.fxdgrp.cbs.max.amt, this.model.fxdgrp.cbs.max.cur);
return this.getCodelabel(this.model.fxdgrp.rec.fxtyp, "fxt_fxtyp") + "," let nam = this.getCodelabel(this.model.fxdgrp.rec.fxtyp, "fxt_fxtyp") + ","
+ this.model.fxdgrp.cbs.max.cur + " " + amount; + this.model.fxdgrp.cbs.max.cur + " " + amount
this.model.fxdgrp.rec.nam = nam;
return nam;
}, },
}, },
methods: { methods: {
......
<template> <template>
<div class="eContainer"> <div class="eContainer">
<c-page title="即期结汇"> <c-page title="即期结汇">
<el-form :model="model" :rules="rules" ref="modelForm" label-width="150px" label-position="right" size="small" <el-form :model="model" :rules="rules" ref="modelForm" label-width="150px" label-position="right"
:validate-on-rule-change="false"> size="small"
<c-tabs v-model="tabVal" ref="elment" type="card" @tab-click="myTabClick"> :validate-on-rule-change="false">
<el-tab-pane label="概要" name="ovwp"> <c-tabs v-model="tabVal" ref="elment" type="card" @tab-click="myTabClick">
<c-content> <el-tab-pane label="概要" name="ovwp">
<m-ovwp :model="model" :codes="codes" /> <c-content>
</c-content> <m-ovwp :model="model" :codes="codes"/>
</el-tab-pane> </c-content>
<el-tab-pane label="费用/账务" name="setpan"> </el-tab-pane>
<c-content> <el-tab-pane label="费用/账务" name="setpan">
<m-setpan :codes="codes" :model="model" /> <c-content>
</c-content> <m-setpan :codes="codes" :model="model"/>
</el-tab-pane> </c-content>
<!-- <el-tab-pane label="报文/面函" name="docpan">--> </el-tab-pane>
<!-- <c-content>--> <!-- <el-tab-pane label="报文/面函" name="docpan">-->
<!-- <m-docpan :codes="codes" :model="model" />--> <!-- <c-content>-->
<!-- </c-content>--> <!-- <m-docpan :codes="codes" :model="model" />-->
<!-- </el-tab-pane>--> <!-- </c-content>-->
</c-tabs> <!-- </el-tab-pane>-->
</el-form> <el-tab-pane label="结售汇申报" name="jshmod">
<c-function-btn <c-content>
:handleCheck="handleCheck" <m-jshmod :codes="codes" :model="model" ref="jshmod" />
:handleStash="handleStash" </c-content>
:handleSubmit="handleSubmit" </el-tab-pane>
@handleSureWarning="handleSureWarning" </c-tabs>
ref="commonBtn" </el-form>
></c-function-btn> <c-function-btn
</c-page> :handleCheck="handleCheck"
</div> :handleStash="handleStash"
:handleSubmit="handleSubmit"
@handleSureWarning="handleSureWarning"
ref="commonBtn"
></c-function-btn>
</c-page>
</div>
</template> </template>
<script> <script>
import Api from "~/service/Api" import CodeTable from "~/config/CodeTable"
import CodeTable from "~/config/CodeTable" import Fxtssb from "../model"
import Fxtssb from "../model" import Ovwp from "./Ovwp"
import Ovwp from "./Ovwp" import Setpan from "~/components/business/setmod/views";
import Setpan from "~/components/business/setmod/views"; import Docpan from "~/components/business/docpan/views";
import Docpan from "~/components/business/docpan/views";
import operationFunc from "~/mixin/operationFunc"; import operationFunc from "~/mixin/operationFunc";
import commonDepend from "~/mixin/commonDepend"; import commonDepend from "~/mixin/commonDepend";
import event from "../event"; import event from "../event";
import buildFn from "../event/buildCommons.js"; import buildFn from "../event/buildCommons.js";
import Check from "../model/Check.js"; import Check from "../model/Check.js";
export default { import Jshmod from "~/components/business/jshmod/views/index";
name: "Fxtssb",
components: { export default {
"m-ovwp": Ovwp, name: "Fxtssb",
"m-setpan": Setpan, components: {
"m-docpan": Docpan, "m-ovwp": Ovwp,
}, "m-setpan": Setpan,
provide() { "m-docpan": Docpan,
return { "m-jshmod": Jshmod,
root: this
}
},
mixins: [operationFunc, commonDepend, event, buildFn],
data() {
return {
tabVal: "ovwp",
trnName: "fxtssb",
trnType: "",
model: new Fxtssb().data,
rules: Check,
codes: { ...CodeTable },
}
},
methods: {
myTabClick(tab) {
this.tabClick(tab)
}
},
created: async function () {
console.log("进入fxtssb交易");
let params = {
transName: this.trnName,
fxdgrp: {
rec: {
inr: this.$route.query.inr || "",
}, },
}, provide() {
}; return {
this.init(params) root: this
} }
} },
mixins: [operationFunc, commonDepend, event, buildFn],
data() {
return {
tabVal: "ovwp",
trnName: "fxtssb",
trnType: "",
model: new Fxtssb().data,
rules: Check,
codes: {...CodeTable},
}
},
methods: {
myTabClick(tab) {
this.tabClick(tab)
}
},
created: async function () {
console.log("进入fxtssb交易");
let params = {
transName: this.trnName,
fxdgrp: {
rec: {
inr: this.$route.query.inr || "",
},
},
};
this.init(params)
}
}
</script> </script>
<style></style> <style></style>
import Utils from "~/utils"; import Utils from "~/utils";
export default { export default {
methods: { methods: {
buildPtspta(ptsptaObj) { buildPtspta(ptsptaObj) {
let pts = ptsptaObj.pts; let pts = ptsptaObj.pts;
return { return {
rol: pts.rol, rol: pts.rol,
name: pts.nam, name: pts.nam,
ptyinr: pts.ptyinr, ptyinr: pts.ptyinr,
ptainr: pts.ptainr, ptainr: pts.ptainr,
extkey: pts.extkey, extkey: pts.extkey,
dftdsp: pts.dftdsp, dftdsp: pts.dftdsp,
dftcur: pts.dftcur, dftcur: pts.dftcur,
dftact: pts.dftact, dftact: pts.dftact,
dftfeecur: pts.dftfeecur, dftfeecur: pts.dftfeecur,
dftactptainr: pts.dftactptainr, dftactptainr: pts.dftactptainr,
glggrpflg: pts.glggrpflg, glggrpflg: pts.glggrpflg,
adrblk: pts.adrblk, adrblk: pts.adrblk,
pts, pts,
}; };
},
buildCommonData(model, trnName) {
let ptsptaList = Utils.formatPtspta(model.fxtp.fxdgrp, this.buildPtspta);
return {
rec: {
objtyp: "FXT",
objinr: model.fxtp.fxdgrp.rec.inr,
ownref: model.fxtp.fxdgrp.rec.ownref,
}, },
cbsMap: { buildCommonData(model, trnName) {
MAX: model.fxtp.fxdgrp.cbs.max, let ptsptaList = Utils.formatPtspta(model.fxdgrp, this.buildPtspta);
NOM1: model.fxtp.fxdgrp.cbs.nom1, return {
rec: {
objtyp: "FXD",
objinr: model.fxdgrp.rec.inr,
ownref: model.fxdgrp.rec.ownref,
fxtyp: model.fxdgrp.rec.fxtyp,
acc: model.fxdgrp.rec.acc,
acc2: model.fxdgrp.rec.acc2,
dsp: model.fxdgrp.rec.dsp,
dsp2: model.fxdgrp.rec.dsp2,
trdint: model.fxdgrp.rec.trdint,
trdout: model.fxdgrp.rec.trdout,
trnman: model.fxdgrp.rec.trnman,
rat: model.fxdgrp.rec.rat,
},
cbsMap: {
MAX: model.fxdgrp.cbs.max,
NOM1: model.fxdgrp.cbs.nom1,
},
ptsList: ptsptaList,
transName: trnName,
userId: window.sessionStorage.userId ? window.sessionStorage.userId : "ZL",
};
}, },
ptsList: ptsptaList,
transName: trnName,
userId: window.sessionStorage.userId ? window.sessionStorage.userId : "ZL",
};
}, },
},
}; };
import commonFunctions from '~/mixin/commonFunctions.js'; import commonFunctions from "~/mixin/commonFunctions.js";
import Api from '~/service/Api'; import Api from "~/service/Api";
export default { export default {
mixins: [commonFunctions], mixins: [commonFunctions],
methods: { methods: {
async getOwnref(){ async getOwnref() {
if (this.model.fxdgrp.rec.fxtyp == "") {
this.$notify.warning({
title: "提示",
message: "请先选择结售汇类型!",
});
return;
}
const loading = this.loading();
let res = await Api.post(
`/${this.moduleRouter()}/fxtsss/getRef`,
this.model
);
loading.close();
if (res.respCode !== SUCCESS) {
this.$message.error(res.respMsg);
return;
}
this.model.fxdgrp.rec.ownref = res.data;
},
} async defaultAccountsN1000() {
} if (this.model.fxdgrp.rec.fxtyp == "") {
} return;
\ No newline at end of file }
if (this.model.fxdgrp.cbs.max.cur == "") {
return;
}
if (this.model.fxdgrp.apl.pts.ptyinr == "") {
return;
}
const loading = this.loading();
let res = await Api.post(
`/${this.moduleRouter()}/fxtsss/defaultAccountsN1000`,
this.model
);
loading.close();
if (res.respCode !== SUCCESS) {
this.$message.error(res.respMsg);
return;
}
// this.updateValueSet(res.codeSet);
this.model.accLst = res.codeSet["accLst"];
this.model.accLst2 = res.codeSet["acc2Lst"];
this.model.fxdgrp.rec.acc = res.data.fxdgrp.rec.acc;
this.model.fxdgrp.rec.acc2 = res.data.fxdgrp.rec.acc2;
},
async defaultRateN1000() {
if (this.model.fxdgrp.rec.fxtyp == "") {
return;
}
if (this.model.fxdgrp.cbs.max.cur == "") {
return;
}
if (this.model.fxdgrp.apl.pts.ptyinr == "") {
return;
}
const loading = this.loading();
let res = await Api.post(
`/${this.moduleRouter()}/fxtsss/defaultRateN1000`,
this.model
);
loading.close();
if (res.respCode !== SUCCESS) {
this.$message.error(res.respMsg);
return;
}
this.model.fxdgrp.rec.rat = res.data.fxdgrp.rec.rat;
this.model.fxdgrp.rec.midrat = res.data.fxdgrp.rec.midrat;
},
async defaultAccAndRate() {
this.defaultAccountsN1000();
await this.defaultRateN1000();
this.defaultCalculateN1100();
},
async defaultCalculateN1100() {
if (this.model.fxdgrp.rec.rat == "") {
return;
}
if (this.model.fxdgrp.cbs.max.cur == "") {
return;
}
if (
this.model.fxdgrp.cbs.max.amt == "" ||
this.model.fxdgrp.cbs.max.amt == 0
) {
return;
}
const loading = this.loading();
let res = await Api.post(
`/${this.moduleRouter()}/fxtsss/defaultCalculateN1100`,
this.model
);
loading.close();
if (res.respCode !== SUCCESS) {
this.$message.error(res.respMsg);
return;
}
this.model.fxdgrp.cbs.max.amt = res.data.fxdgrp.cbs.max.amt;
this.model.fxdgrp.cbs.nom1.amt = res.data.fxdgrp.cbs.nom1.amt;
},
},
};
export default { import JshmodCheck from "~/components/business/jshmod/model/check";
"fxtp.fxdgrp.rec.ownref":[
{type: "string", required: false, message: "必输项"},
{max: 16,message:"长度不能超过16"}
],
"fxtp.fxdgrp.rec.nam":[ export default function () {
{type: "string", required: false, message: "必输项"}, return {
{max: 40,message:"长度不能超过40"} ...new JshmodCheck(this).check,
], "fxdgrp.rec.ownref": [
"fxtp.fxdgrp.apl.pts.ref":[ { type: "string", required: false, message: "必输项" },
{type: "string", required: false, message: "必输项"}, { max: 16, message: "长度不能超过16" },
{max: 20,message:"长度不能超过20"} ],
], "fxdgrp.rec.nam": [
"fxtp.usrget.usr.extkey":[ { type: "string", required: false, message: "必输项" },
{type: "string", required: false, message: "必输项"}, { max: 40, message: "长度不能超过40" },
{max: 8,message:"长度不能超过8"} ],
], "fxdgrp.apl.pts.ref": [
"fxtp.usrget.sdamod.seainf":[ { type: "string", required: false, message: "必输项" },
{type: "string", required: false, message: "必输项"}, { max: 20, message: "长度不能超过20" },
{max: 3,message:"长度不能超过3"} ],
], "fxdgrp.rec.usr": [
"fxtp.aplp.ptsget.sdamod.dadsnd":[ { type: "string", required: false, message: "必输项" },
{type: "string", required: false, message: "必输项"}, { max: 8, message: "长度不能超过8" },
{max: 16,message:"长度不能超过16"} ],
], "fxdgrp.apl.pts.extkey": [
"fxtp.aplp.ptspta.pts.extkey":[ { type: "string", required: false, message: "必输项" },
{type: "string", required: false, message: "必输项"}, { max: 16, message: "长度不能超过16" },
{max: 16,message:"长度不能超过16"} ],
], "fxdgrp.apl.pts.adrblk": [
"fxtp.aplp.ptsget.sdamod.seainf":[ { type: "string", required: true, message: "必输项" },
{type: "string", required: false, message: "必输项"}, { max: 35, message: "长度不能超过35" },
{max: 3,message:"长度不能超过3"} ],
], "fxdgrp.cbs.max.cur": [
{ type: "string", required: true, message: "必输项" },
{ max: 3, message: "3" },
"fxtp.aplp.ptspta.pts.adrblk":[ ],
{type: "string", required: true, message: "必输项"}, "fxdgrp.cbs.max.amt": [
{max: 35,message:"长度不能超过35"} { type: "string", required: true, message: "必输项" },
], { max: 18, message: "整数位不能超过14位" },
"fxtp.aplp.ptspta.dbfadrblkcn":[ {
{type: "string", required: true, message: "必输项"}, pattern: /(^\d+$)|(^\.\d{1,3}$)|(^\d+\.\d{1,3}$)/,
{max: 35,message:"长度不能超过35"} message: "小数位不能超过3位",
], },
],
"fxdgrp.cbs.nom1.amt": [
"fxtp.fxdgrp.cbs.max.amt":[ { type: "string", required: false, message: "必输项" },
{type: "number", required: false, message: "必输项"}, { max: 18, message: "整数位不能超过14位" },
{max: 18,message:"整数位不能超过14位"}, {
{pattern: /(^\d+$)|(^\.\d{1,3}$)|(^\d+\.\d{1,3}$)/, message: "小数位不能超过3位" } pattern: /(^\d+$)|(^\.\d{1,3}$)|(^\d+\.\d{1,3}$)/,
], message: "小数位不能超过3位",
},
],
"fxdgrp.rec.quoref": [
"fxtp.fxdgrp.cbs.nom1.amt":[ { type: "string", required: false, message: "必输项" },
{type: "number", required: false, message: "必输项"}, { max: 16, message: "长度不能超过16" },
{max: 18,message:"整数位不能超过14位"}, ],
{pattern: /(^\d+$)|(^\.\d{1,3}$)|(^\d+\.\d{1,3}$)/, message: "小数位不能超过3位" } "fxdgrp.rec.fudref": [
], { type: "string", required: false, message: "必输项" },
{ max: 16, message: "长度不能超过16" },
"fxtp.fxdgrp.rec.rat":[ ],
{type: "string", required: false, message: "必输项"}, "fxdgrp.rec.opndat": [{ required: true, message: "输入正确的日期" }],
{max: 12,message:"长度不能超过12"} "fxdgrp.rec.valdat": [{ required: true, message: "输入正确的日期" }],
], "fxdgrp.rec.setdat": [{ required: false, message: "输入正确的日期" }],
"fxtp.fxdgrp.rec.quoref":[ "fxdgrp.rec.setdatto": [{ required: false, message: "输入正确的日期" }],
{type: "string", required: false, message: "必输项"}, "fxdgrp.rec.setdatfrm": [{ required: false, message: "输入正确的日期" }],
{max: 16,message:"长度不能超过16"} "fxdgrp.blk.remark": [
], { type: "string", required: false, message: "必输项" },
"fxtp.fxdgrp.rec.midrat":[ { max: 35, message: "长度不能超过35" },
{type: "string", required: false, message: "必输项"}, ],
{max: 12,message:"长度不能超过12"} "fxdgrp.rec.dsp": [
], { type: "string", required: true, message: "必输项" },
{ max: 2, message: "长度不能超过2" },
"fxtp.fxdgrp.rec.fudref":[ ],
{type: "string", required: false, message: "必输项"}, "fxdgrp.rec.dsp2": [
{max: 16,message:"长度不能超过16"} { type: "string", required: true, message: "必输项" },
], { max: 2, message: "长度不能超过2" },
"fxtp.fxdgrp.rec.opndat":[ ],
{type: "date", required: false, message: "输入正确的日期"} "fxdgrp.rec.acc": [
], { type: "string", required: true, message: "必输项" },
"fxtp.fxdgrp.rec.valdat":[ { max: 21, message: "长度不能超过21" },
{type: "date", required: false, message: "输入正确的日期"} ],
], "fxdgrp.rec.acc2": [
"fxtp.fxdgrp.rec.setdat":[ { type: "string", required: true, message: "必输项" },
{type: "date", required: false, message: "输入正确的日期"} { max: 21, message: "长度不能超过21" },
], ],
"fxtp.fxdgrp.rec.setdatto":[ "fxdgrp.rec.trnman": [
{type: "date", required: false, message: "输入正确的日期"} { type: "string", required: true, message: "必输项" },
], { max: 2, message: "长度不能超过2" },
"fxtp.fxdgrp.rec.setdatfrm":[ ],
{type: "date", required: false, message: "输入正确的日期"} "fxdgrp.rec.trdout": [
], { type: "string", required: true, message: "必输项" },
"fxtp.fxdgrp.blk.remark":[ { max: 3, message: "长度不能超过3" },
{type: "string", required: true, message: "必输项"}, ],
{max: 35,message:"长度不能超过35"} };
], }
}
\ No newline at end of file
import Api from "~/service/Api"
import Pts from "~/page/Model/Common/Pts"
import Pub from "~/components/business/commonModel/index.js"; import Pub from "~/components/business/commonModel/index.js";
import Fxdgrp from '~/components/business/commonModel/fxdgrp';
export default class Fxtsss { export default class Fxtsss {
constructor() { constructor() {
this.data = { this.data = {
fxtp: { fxtp: {
fxdgrp: { amtlab: "", // Amount Label .fxtp.amtlab
rec: { cnylab: "", // Amount LabelCNY .fxtp.cnylab
ownref: "", // 结售汇业务参考号 .fxtp.fxdgrp.rec.ownref frgchk: "", // 外币 .fxtp.frgchk
nam: "", // 名称 .fxtp.fxdgrp.rec.nam cnychk: "", // 人民币 .fxtp.cnychk
fxtyp: "", // 结售汇类型 .fxtp.fxdgrp.rec.fxtyp cshflg: "", // 钞汇标志 .fxtp.cshflg
opndat: "", // 登记日期 .fxtp.fxdgrp.rec.opndat
valdat: "", // 起息日 .fxtp.fxdgrp.rec.valdat
rat: "", // 对外牌价 .fxtp.fxdgrp.rec.rat
midrat: "", // 中间价 .fxtp.fxdgrp.rec.midrat
quoref: "", // 询价编号 .fxtp.fxdgrp.rec.quoref
fudref: "", // 资金部编号 .fxtp.fxdgrp.rec.fudref
setdat: "", // 远期交割日 .fxtp.fxdgrp.rec.setdat
setdatfrm: "", // 择期交割起始日 .fxtp.fxdgrp.rec.setdatfrm
setdatto: "", // 择期交割截止日 .fxtp.fxdgrp.rec.setdatto
trnman: "", // 交易主体 .fxtp.fxdgrp.rec.trnman
trdint: "", // 结售汇类型 .fxtp.fxdgrp.rec.trdint
trdout: "", // 结售汇类型 .fxtp.fxdgrp.rec.trdout
acc: "", // 外币结算账号 .fxtp.fxdgrp.rec.acc
acc2: "", // 本币结算账号 .fxtp.fxdgrp.rec.acc2
dsp: "", // 外币结算账号 .fxtp.fxdgrp.rec.dsp
dsp2: "", // 本币结算账号 .fxtp.fxdgrp.rec.dsp2
},
cbs: {
max: {
cur: "", // Currency .fxtp.fxdgrp.cbs.max.cur
amt: "", // Balance .fxtp.fxdgrp.cbs.max.amt
}, },
nom1: { fxdgrp: new Fxdgrp().data,
cur: "", // Currency .fxtp.fxdgrp.cbs.nom1.cur setmod: new Pub().data.Setmod,
amt: "", // Balance .fxtp.fxdgrp.cbs.nom1.amt docpan: new Pub().data.Docpan,
}, trndia: new Pub().data.Trndia,
}, jshmod: new Pub().data.Jshmod,
apl: { }
pts: new Pts().data,
},
blk: {
remark: "", // 备注 .fxtp.fxdgrp.blk.remark
},
},
amtlab: "", // Amount Label .fxtp.amtlab
cnylab: "", // Amount LabelCNY .fxtp.cnylab
frgchk: "", // 外币 .fxtp.frgchk
cnychk: "", // 人民币 .fxtp.cnychk
aplp: {
ptspta: {
pts: new Pts().data,
dbfadrblkcn: "", // Chinese address .fxtp.aplp.ptspta.dbfadrblkcn
},
ptsget: {
sdamod: {
seainf: "", // .fxtp.aplp.ptsget.sdamod.seainf
dadsnd: "", // Drag Drop Sender .fxtp.aplp.ptsget.sdamod.dadsnd
},
},
},
cshflg: "", // 钞汇标志 .fxtp.cshflg
usrget: {
sdamod: {
seainf: "", // .fxtp.usrget.sdamod.seainf
},
usr: {
extkey: "", // User ID .fxtp.usrget.usr.extkey
},
},
},
fxdgrp: {
apl: {
pts: new Pts().data,
},
},
setmod: new Pub().data.Setmod,
docpan: new Pub().data.Docpan,
trndia: new Pub().data.Trndia,
} }
}
} }
\ No newline at end of file
<template> <template>
<div class="eContainer"> <div class="eContainer">
<c-page title="即期结汇"> <c-page title="即期结汇">
<el-form :model="model" :rules="rules" ref="modelForm" label-width="150px" label-position="right" size="small" <el-form :model="model" :rules="rules" ref="modelForm" label-width="150px" label-position="right"
:validate-on-rule-change="false"> size="small"
<c-tabs v-model="tabVal" ref="elment" type="card" @tab-click="myTabClick"> :validate-on-rule-change="false">
<!--fxtp PD000001 概要 --> <c-tabs v-model="tabVal" ref="elment" type="card" @tab-click="myTabClick">
<el-tab-pane :label="$t('fxtp.概要')" name="ovwp"> <!--fxtp PD000001 概要 -->
<c-content> <el-tab-pane :label="$t('fxtp.概要')" name="ovwp">
<m-ovwp :model="model" :codes="codes" /> <c-content>
</c-content> <m-ovwp :model="model" :codes="codes"/>
</el-tab-pane> </c-content>
<el-tab-pane label="费用/账务" name="setpan"> </el-tab-pane>
<c-content> <el-tab-pane label="费用/账务" name="setpan">
<m-setpan :codes="codes" :model="model" /> <c-content>
</c-content> <m-setpan :codes="codes" :model="model"/>
</el-tab-pane> </c-content>
<el-tab-pane label="报文/面函" name="docpan"> </el-tab-pane>
<c-content> <!-- <el-tab-pane label="报文/面函" name="docpan">-->
<m-docpan :codes="codes" :model="model" /> <!-- <c-content>-->
</c-content> <!-- <m-docpan :codes="codes" :model="model"/>-->
</el-tab-pane> <!-- </c-content>-->
</c-tabs> <!-- </el-tab-pane>-->
</el-form> <el-tab-pane label="结售汇申报" name="jshmod">
<c-function-btn <c-content>
:handleCheck="handleCheck" <m-jshmod :codes="codes" :model="model" ref="jshmod" />
:handleStash="handleStash" </c-content>
:handleSubmit="handleSubmit" </el-tab-pane>
@handleSureWarning="handleSureWarning" </c-tabs>
ref="commonBtn" </el-form>
></c-function-btn> <c-function-btn
</c-page> :handleCheck="handleCheck"
</div> :handleStash="handleStash"
:handleSubmit="handleSubmit"
@handleSureWarning="handleSureWarning"
ref="commonBtn"
></c-function-btn>
</c-page>
</div>
</template> </template>
<script> <script>
import Api from "~/service/Api" import CodeTable from "~/config/CodeTable"
import CodeTable from "~/config/CodeTable" import Fxtsss from "../model"
import Fxtsss from "../model" import Ovwp from "./Ovwp"
import Ovwp from "./Ovwp" import Setpan from "~/components/business/setmod/views";
import Setpan from "~/components/business/setmod/views"; import Docpan from "~/components/business/docpan/views";
import Docpan from "~/components/business/docpan/views";
import operationFunc from "~/mixin/operationFunc"; import operationFunc from "~/mixin/operationFunc";
import commonDepend from "~/mixin/commonDepend"; import commonDepend from "~/mixin/commonDepend";
import event from "../event"; import event from "../event";
import Check from "../model/Check.js"; import Check from "../model/Check.js";
import buildFn from "../event/buildCommons.js"; import buildFn from "../event/buildCommons.js";
export default { import Jshmod from "~/components/business/jshmod/views/index";
name: "Fxtsss",
components: { export default {
"m-ovwp": Ovwp, name: "Fxtsss",
"m-setpan": Setpan, components: {
"m-docpan": Docpan, "m-ovwp": Ovwp,
}, "m-setpan": Setpan,
provide() { "m-docpan": Docpan,
return { "m-jshmod": Jshmod,
root: this
}
},
mixins: [operationFunc, commonDepend, event, buildFn],
data() {
return {
tabVal: "ovwp",
trnName: "fxtsss",
trnType: "",
model: new Fxtsss().data,
rules: Check,
codes: { ...CodeTable },
}
},
methods: {
myTabClick(tab) {
this.tabClick(tab)
}
},
created: async function () {
console.log("进入fxtsss交易");
let params = {
transName: this.trnName,
fxdgrp: {
rec: {
inr: this.$route.query.inr || "",
}, },
}, provide() {
}; return {
this.init(params) root: this
} }
} },
mixins: [operationFunc, commonDepend, event, buildFn],
data() {
return {
tabVal: "ovwp",
trnName: "fxtsss",
trnType: "",
model: new Fxtsss().data,
rules: Check,
codes: {...CodeTable},
}
},
methods: {
myTabClick(tab) {
this.tabClick(tab)
}
},
created: async function () {
console.log("进入fxtsss交易");
let params = {
transName: this.trnName,
fxdgrp: {
rec: {
inr: this.$route.query.inr || "",
},
},
};
this.init(params)
}
}
</script> </script>
<style></style> <style></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