Commit dddc12a9 by xiaotong

fxtlop前端改造

parent 669fd09b
......@@ -27,6 +27,15 @@ export default {
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,
......
......@@ -5,6 +5,74 @@ import commonFunctions from "~/mixin/commonFunctions.js";
export default {
mixins: [commonFunctions],
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()}/fxtlop/getRef`, this.model);
loading.close();
if (res.respCode !== SUCCESS) {
this.$message.error(res.respMsg);
return;
}
this.model.fxdgrp.rec.ownref = res.data;
},
async defaultAccAndRate() {
this.defaultRateN1000();
console.log("defaultAccAndRate")
this.defaultCalculateN1100();
},
async defaultCalculateN1100() {
console.log("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();
console.log( this.model);
let res = await Api.post(`/${this.moduleRouter()}/fxtlop/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;
},
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()}/fxtlop/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;
},
},
};
import Api from "~/service/Api";
import Pts from "~/page/Model/Common/Pts";
import Pub from "~/components/business/commonModel/index.js";
import Fxdgrp from '~/components/business/commonModel/fxdgrp';
export default class Fxtlop {
constructor() {
......@@ -8,57 +9,13 @@ export default class Fxtlop {
setmod: new Pub().data.Setmod,
docpan: new Pub().data.Docpan,
trndia: new Pub().data.Trndia,
fxdgrp: {
rec: {
ownref: "", // 业务编号 .fxdgrp.rec.ownref
nam: "", // 业务名称 .fxdgrp.rec.nam
fxtyp: "", // 平盘类型 .fxdgrp.rec.fxtyp
opndat: "", // 成交日 .fxdgrp.rec.opndat
valdat: "", // 起息日 .fxdgrp.rec.valdat
rat: "", // 平盘牌价 .fxdgrp.rec.rat
midrat: "", // 中间价 .fxdgrp.rec.midrat
},
apl: {
pts: new Pts().data,
dbfadrblkcn: "", // Chinese address .fxdgrp.apl.dbfadrblkcn
},
blk: {
remark: "", // 备注 .fxdgrp.blk.remark
},
cbs: {
max: {
cur: "", // Currency .fxdgrp.cbs.max.cur
amt: "", // Balance .fxdgrp.cbs.max.amt
},
nom1: {
cur: "", // Currency .fxdgrp.cbs.nom1.cur
amt: "", // Balance .fxdgrp.cbs.nom1.amt
},
},
},
fxdgrp: new Fxdgrp().data,
fxtp: {
amtlab: "", // Amount Label .fxtp.amtlab
cnylab: "", // Amount LabelCNY .fxtp.cnylab
frgchk: "", // 外币 .fxtp.frgchk
cnychk: "", // 人民币 .fxtp.cnychk
aplp: {
ptsget: {
sdamod: {
seainf: "", // .fxtp.aplp.ptsget.sdamod.seainf
dadsnd: "", // Drag Drop Sender .fxtp.aplp.ptsget.sdamod.dadsnd
},
},
},
usrget: {
sdamod: {
seainf: "", // .fxtp.usrget.sdamod.seainf
},
},
usr: {
extkey: "", // 业务负责人 .fxtp.usr.extkey
},
},
pageId: "", // ctx的key
};
}
}
}
}
......@@ -18,7 +18,7 @@
style="margin: 0 0"
size="small"
type="primary"
:disabled="model.fxdgrp.apl.pts.ptainr === ''"
:disabled="getOwnrefFlg"
@click="getOwnref"
>
获取
......@@ -28,11 +28,8 @@
</c-form-item>
</c-col>
<c-col :span="24">
<c-form-item label="业务负责人" prop="fxdgrp.rec.ownusr">
<c-input
v-model="model.fxdgrp.rec.ownusr"
placeholder="请输入业务负责人"
/>
<c-form-item label="业务负责人" prop="fxdgrp.rec.usr">
<c-input v-model="model.fxdgrp.rec.usr" placeholder="请输入业务负责人" disabled></c-input>
</c-form-item>
</c-col>
<c-col :span="24">
......@@ -42,6 +39,7 @@
style="width: 100%"
placeholder="请输入平盘类型"
:code="codes.fxt_fxtyp"
:filterKey="['LB', 'LS']"
>
</c-select>
</el-form-item>
......@@ -52,7 +50,8 @@
<c-select-cur
v-model="model.fxdgrp.cbs.max.cur"
style="width: 100%"
:code="codes.bopcur"
dbCode="curtxt"
@change="defaultAccAndRate"
>
</c-select-cur>
</el-form-item>
......@@ -140,7 +139,7 @@
<c-col :span="12" style="padding-right: 20px">
<c-col :span="24">
<c-form-item :label="$t('fxtlop.业务名称')" prop="fxdgrp.rec.nam">
<c-input v-model="model.fxdgrp.rec.nam" maxlength="40" ></c-input>
<c-input v-model="defaultNam950" maxlength="40" disabled></c-input>
</c-form-item>
</c-col>
<c-col :span="24">
......@@ -192,6 +191,25 @@ export default {
data() {
return {};
},
computed:{
getOwnrefFlg: function () {
let flg = this.model.fxdgrp.rec.fxtyp == '' || this.model.fxdgrp.apl.pts.ptainr == ''
|| this.model.fxdgrp.cbs.max.cur == '' || this.model.fxdgrp.rec.ownref != ''
return flg;
},
defaultNam950: function () {
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") + ","
+ this.model.fxdgrp.cbs.max.cur + " " + amount;
},
},
methods: {
//获取码值
getCodelabel(value, codenam) {
const codeobj = this.codes[codenam].find(obj => obj.value === value)
return codeobj ? codeobj.label : value;
},
},
created: function () {},
};
</script>
......
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