Commit 55919015 by jianglong

修改Fxtlop交易界面联动功能,及利率计算事件

parent 0ef37ea3
......@@ -77,7 +77,7 @@ export default {
},
async onMaxamtChange(){
debugger
if (this.model.fxdgrp.cbs.max.amt > 0 && this.model.fxdgrp.rec.rat >0 ) {
this.defaultCalculateN1100();
......@@ -85,7 +85,7 @@ export default {
},
async onRatChange(){
debugger
if (this.model.fxdgrp.cbs.max.amt > 0 && this.model.fxdgrp.rec.rat >0 ) {
this.defaultCalculateN1100();
}
......
......@@ -23,56 +23,72 @@ export default {
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;
}
async defaultRateN1000() {
if (this.model.fxdgrp.cbs.max.cur == "") {
return;
return;
}
if (this.model.fxdgrp.cbs.max.amt == "" || this.model.fxdgrp.cbs.max.amt == 0) {
return;
if (this.model.fxdgrp.cbs.nom1.cur == "") {
return;
}
const loading = this.loading();
console.log( this.model);
let res = await Api.post(`/${this.moduleRouter()}/fxtlop/defaultCalculateN1100`, this.model);
let res = await Api.post(`/${this.moduleRouter()}/fxtlop/defaultRateN1000`, this.model);
loading.close();
if (res.respCode !== SUCCESS) {
this.$message.error(res.respMsg);
return;
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;
},
// this.updateValueSet(res.codeSet);
this.model.fxdgrp.rec.midrat =res.data.fxdgrp.rec.midrat;
},
async defaultRateN1000() {
if (this.model.fxdgrp.rec.fxtyp == "") {
return;
}
async defaultCalculateN1100() {
if (this.model.fxdgrp.cbs.max.cur == "") {
return;
return;
}
if (this.model.fxdgrp.apl.pts.ptyinr == "") {
return;
if (this.model.fxdgrp.cbs.nom1.cur == "") {
return;
}
const loading = this.loading();
let res = await Api.post(`/${this.moduleRouter()}/fxtlop/defaultRateN1000`, 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.$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;
},
// this.updateValueSet(res.codeSet);
this.model.fxdgrp.cbs.nom1.amt =res.data.fxdgrp.cbs.nom1.amt;
},
async onMaxcurChange(){
console.log(this.model);
if (this.model.fxdgrp.cbs.max.cur !== "" && this.model.fxdgrp.cbs.nom1.cur !== null) {
console.log("@@@");
this.defaultRateN1000();
}
},
async onNom1curChange(){
if (this.model.fxdgrp.cbs.max.cur !== "" && this.model.fxdgrp.cbs.nom1.cur !== null) {
this.defaultRateN1000();
}
},
async onMaxamtChange(){
if (this.model.fxdgrp.cbs.max.amt > 0 && this.model.fxdgrp.rec.rat >0 ) {
this.defaultCalculateN1100();
}
},
async onRatChange(){
if (this.model.fxdgrp.cbs.max.amt > 0 && this.model.fxdgrp.rec.rat >0 ) {
this.defaultCalculateN1100();
}
},
},
};
......@@ -51,7 +51,7 @@
v-model="model.fxdgrp.cbs.max.cur"
style="width: 100%"
dbCode="curtxt"
@change="defaultAccAndRate"
@change="onMaxcurChange"
>
</c-select-cur>
</el-form-item>
......@@ -61,6 +61,7 @@
<c-input-currency
:currency="model.fxdgrp.cbs.max.cur"
v-model="model.fxdgrp.cbs.max.amt"
@change="onMaxamtChange"
></c-input-currency>
</el-form-item>
</c-col>
......@@ -73,6 +74,7 @@
style="width: 100%"
:code="codes.bopcur"
disabled
>
</c-select-cur>
</el-form-item>
......@@ -91,6 +93,7 @@
<c-form-item label="平盘牌价" prop="fxdgrp.rec.rat">
<c-input-currency
v-model="model.fxdgrp.rec.rat"
@change="onRatChange"
style="width: 100%"
:precision="6"
placeholder="请输入平盘牌价"
......@@ -199,8 +202,10 @@ export default {
},
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") + ","
let nam=this.getCodelabel(this.model.fxdgrp.rec.fxtyp, "fxt_fxtyp") + ","
+ this.model.fxdgrp.cbs.max.cur + " " + amount;
this.model.fxdgrp.rec.nam=nam;
return nam;
},
},
methods: {
......
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