Commit 7e474d5c by huangshunlin

即期结售汇 前端校验

parent 8cd09e04
...@@ -83,8 +83,6 @@ export default { ...@@ -83,8 +83,6 @@ export default {
}, },
async defaultCalculateN1100() { async defaultCalculateN1100() {
console.log("defaultCalculateN1100");
if (this.model.fxdgrp.rec.rat == "") { if (this.model.fxdgrp.rec.rat == "") {
return; return;
} }
...@@ -95,6 +93,7 @@ export default { ...@@ -95,6 +93,7 @@ export default {
this.model.fxdgrp.cbs.max.amt == "" || this.model.fxdgrp.cbs.max.amt == "" ||
this.model.fxdgrp.cbs.max.amt == 0 this.model.fxdgrp.cbs.max.amt == 0
) { ) {
this.model.fxdgrp.cbs.nom1.amt = "0.00";
return; return;
} }
const loading = this.loading(); const loading = this.loading();
......
...@@ -25,7 +25,7 @@ export default function () { ...@@ -25,7 +25,7 @@ export default function () {
], ],
"fxdgrp.apl.pts.adrblk": [ "fxdgrp.apl.pts.adrblk": [
{ type: "string", required: true, message: "必输项" }, { type: "string", required: true, message: "必输项" },
{ max: 35, message: "长度不能超过35" }, { max: 140, message: "长度不能超过140" },
], ],
"fxdgrp.cbs.max.cur": [ "fxdgrp.cbs.max.cur": [
{ type: "string", required: true, message: "必输项" }, { type: "string", required: true, message: "必输项" },
......
<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" <el-form
size="small" :model="model"
:validate-on-rule-change="false"> :rules="rawRules"
<c-tabs v-model="tabVal" ref="elment" type="card" @tab-click="myTabClick"> ref="modelForm"
<el-tab-pane label="概要" name="ovwp"> label-width="150px"
<c-content> label-position="right"
<m-ovwp :model="model" :codes="codes"/> size="small"
</c-content> :validate-on-rule-change="false"
</el-tab-pane> >
<el-tab-pane label="费用/账务" name="setpan"> <c-tabs
<c-content> v-model="tabVal"
<m-setpan :codes="codes" :model="model"/> ref="elment"
</c-content> type="card"
</el-tab-pane> @tab-click="myTabClick"
<!-- <el-tab-pane label="报文/面函" name="docpan">--> >
<!-- <c-content>--> <el-tab-pane label="概要" name="ovwp">
<!-- <m-docpan :codes="codes" :model="model" />--> <c-content>
<!-- </c-content>--> <m-ovwp :model="model" :codes="codes" />
<!-- </el-tab-pane>--> </c-content>
<el-tab-pane label="结售汇申报" name="jshmod"> </el-tab-pane>
<c-content> <el-tab-pane label="费用/账务" name="setpan">
<m-jshmod :codes="codes" :model="model" ref="jshmod" /> <c-content>
</c-content> <m-setpan :codes="codes" :model="model" />
</el-tab-pane> </c-content>
</c-tabs> </el-tab-pane>
</el-form> <!-- <el-tab-pane label="报文/面函" name="docpan">-->
<c-function-btn <!-- <c-content>-->
:handleCheck="handleCheck" <!-- <m-docpan :codes="codes" :model="model" />-->
:handleStash="handleStash" <!-- </c-content>-->
:handleSubmit="handleSubmit" <!-- </el-tab-pane>-->
@handleSureWarning="handleSureWarning" <el-tab-pane label="结售汇申报" name="jshmod">
ref="commonBtn" <c-content>
></c-function-btn> <m-jshmod :codes="codes" :model="model" ref="jshmod" />
</c-page> </c-content>
</div> </el-tab-pane>
</c-tabs>
</el-form>
<c-function-btn
:handleCheck="handleCheck"
:handleStash="handleStash"
:handleSubmit="handleSubmit"
@handleSureWarning="handleSureWarning"
ref="commonBtn"
></c-function-btn>
</c-page>
</div>
</template> </template>
<script> <script>
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";
import Jshmod from "~/components/business/jshmod/views/index"; import Jshmod from "~/components/business/jshmod/views/index";
export default { export default {
name: "Fxtssb", name: "Fxtssb",
components: { components: {
"m-ovwp": Ovwp, "m-ovwp": Ovwp,
"m-setpan": Setpan, "m-setpan": Setpan,
"m-docpan": Docpan, "m-docpan": Docpan,
"m-jshmod": Jshmod, "m-jshmod": Jshmod,
},
provide() {
return {
root: this,
};
},
mixins: [operationFunc, commonDepend, event, buildFn],
computed: {
rawRules() {
return { ...this.rules, ...Check.apply(this) };
},
},
data() {
return {
tabVal: "ovwp",
trnName: "fxtssb",
trnType: "",
model: new Fxtssb().data,
rules: { },
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 { };
root: this this.init(params);
} },
}, };
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>
...@@ -93,6 +93,7 @@ export default { ...@@ -93,6 +93,7 @@ export default {
this.model.fxdgrp.cbs.max.amt == "" || this.model.fxdgrp.cbs.max.amt == "" ||
this.model.fxdgrp.cbs.max.amt == 0 this.model.fxdgrp.cbs.max.amt == 0
) { ) {
this.model.fxdgrp.cbs.nom1.amt = "0.00";
return; return;
} }
const loading = this.loading(); const loading = this.loading();
......
...@@ -25,7 +25,7 @@ export default function () { ...@@ -25,7 +25,7 @@ export default function () {
], ],
"fxdgrp.apl.pts.adrblk": [ "fxdgrp.apl.pts.adrblk": [
{ type: "string", required: true, message: "必输项" }, { type: "string", required: true, message: "必输项" },
{ max: 35, message: "长度不能超过35" }, { max: 140, message: "长度不能超过140" },
], ],
"fxdgrp.cbs.max.cur": [ "fxdgrp.cbs.max.cur": [
{ type: "string", required: true, message: "必输项" }, { type: "string", required: true, message: "必输项" },
......
<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" <el-form
size="small" :model="model"
:validate-on-rule-change="false"> :rules="rawRules"
<c-tabs v-model="tabVal" ref="elment" type="card" @tab-click="myTabClick"> ref="modelForm"
<!--fxtp PD000001 概要 --> label-width="150px"
<el-tab-pane :label="$t('fxtp.概要')" name="ovwp"> label-position="right"
<c-content> size="small"
<m-ovwp :model="model" :codes="codes"/> :validate-on-rule-change="false"
</c-content> >
</el-tab-pane> <c-tabs
<el-tab-pane label="费用/账务" name="setpan"> v-model="tabVal"
<c-content> ref="elment"
<m-setpan :codes="codes" :model="model"/> type="card"
</c-content> @tab-click="myTabClick"
</el-tab-pane> >
<!-- <el-tab-pane label="报文/面函" name="docpan">--> <!--fxtp PD000001 概要 -->
<!-- <c-content>--> <el-tab-pane :label="$t('fxtp.概要')" name="ovwp">
<!-- <m-docpan :codes="codes" :model="model"/>--> <c-content>
<!-- </c-content>--> <m-ovwp :model="model" :codes="codes" />
<!-- </el-tab-pane>--> </c-content>
<el-tab-pane label="结售汇申报" name="jshmod"> </el-tab-pane>
<c-content> <el-tab-pane label="费用/账务" name="setpan">
<m-jshmod :codes="codes" :model="model" ref="jshmod" /> <c-content>
</c-content> <m-setpan :codes="codes" :model="model" />
</el-tab-pane> </c-content>
</c-tabs> </el-tab-pane>
</el-form> <!-- <el-tab-pane label="报文/面函" name="docpan">-->
<c-function-btn <!-- <c-content>-->
:handleCheck="handleCheck" <!-- <m-docpan :codes="codes" :model="model"/>-->
:handleStash="handleStash" <!-- </c-content>-->
:handleSubmit="handleSubmit" <!-- </el-tab-pane>-->
@handleSureWarning="handleSureWarning" <el-tab-pane label="结售汇申报" name="jshmod">
ref="commonBtn" <c-content>
></c-function-btn> <m-jshmod :codes="codes" :model="model" ref="jshmod" />
</c-page> </c-content>
</div> </el-tab-pane>
</c-tabs>
</el-form>
<c-function-btn
:handleCheck="handleCheck"
:handleStash="handleStash"
:handleSubmit="handleSubmit"
@handleSureWarning="handleSureWarning"
ref="commonBtn"
></c-function-btn>
</c-page>
</div>
</template> </template>
<script> <script>
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";
import Jshmod from "~/components/business/jshmod/views/index"; import Jshmod from "~/components/business/jshmod/views/index";
export default { export default {
name: "Fxtsss", name: "Fxtsss",
components: { components: {
"m-ovwp": Ovwp, "m-ovwp": Ovwp,
"m-setpan": Setpan, "m-setpan": Setpan,
"m-docpan": Docpan, "m-docpan": Docpan,
"m-jshmod": Jshmod, "m-jshmod": Jshmod,
},
provide() {
return {
root: this,
};
},
mixins: [operationFunc, commonDepend, event, buildFn],
computed: {
rawRules() {
return { ...this.rules, ...Check.apply(this) };
},
},
data() {
return {
tabVal: "ovwp",
trnName: "fxtsss",
trnType: "",
model: new Fxtsss().data,
rules: {},
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 { };
root: this this.init(params);
} },
}, };
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