Commit 204bc1fb by 潘际乾

前端需求改进

parent 344b3578
...@@ -59,6 +59,8 @@ export default { ...@@ -59,6 +59,8 @@ export default {
if(result.respCode != SUCCESS) { if(result.respCode != SUCCESS) {
this.$notify.error({title: '错误',message: result.respMsg}); this.$notify.error({title: '错误',message: result.respMsg});
} else { } else {
// 清除之前的校验状态
this.getVM().$refs.modelForm.clearValidate()
const fields = this.getVM().$refs.modelForm.fields const fields = this.getVM().$refs.modelForm.fields
const fieldErrors = result.fieldErrors; const fieldErrors = result.fieldErrors;
Utils.positioningErrorMsg(fieldErrors, fields) Utils.positioningErrorMsg(fieldErrors, fields)
......
...@@ -4,10 +4,10 @@ import commonApi from "./commonApi" ...@@ -4,10 +4,10 @@ import commonApi from "./commonApi"
import Utils from "~/utils" import Utils from "~/utils"
export default { export default {
mixins: [commonApi,commonDeclare], mixins: [commonApi, commonDeclare],
data: function () { data: function () {
return { return {
defFlag:true, defFlag: true,
// 弹框回填 // 弹框回填
promptData: { promptData: {
title: '', title: '',
...@@ -20,22 +20,22 @@ export default { ...@@ -20,22 +20,22 @@ export default {
created() { created() {
}, },
mounted() { mounted() {
if(!this.isInDisplay){ if (!this.isInDisplay) {
// this.ruleWatcher() // this.ruleWatcher()
this.ruleCheck() this.ruleCheck()
} }
}, },
methods: { methods: {
openWatch(flag){ openWatch(flag) {
this.defFlag = !!flag this.defFlag = !!flag
}, },
ruleWatcher() { ruleWatcher() {
if(!this.defaultRules) if (!this.defaultRules)
return return
const that = this; const that = this;
Object.keys(that.defaultRules).forEach(key => { Object.keys(that.defaultRules).forEach(key => {
let func = function(){ let func = function () {
if(that.defFlag){ if (that.defFlag) {
that.defaultRules[key].apply(that) that.defaultRules[key].apply(that)
} }
} }
...@@ -43,7 +43,7 @@ export default { ...@@ -43,7 +43,7 @@ export default {
}) })
}, },
ruleCheck() { ruleCheck() {
if(!this.pattern) if (!this.pattern)
return return
// const keySet = new Set(Object.keys(this.pattern).concat(Object.keys(this.checkRules).concat(Object.keys(this.defaultRules)))) // const keySet = new Set(Object.keys(this.pattern).concat(Object.keys(this.checkRules).concat(Object.keys(this.defaultRules))))
const keySet = new Set(Object.keys(this.pattern).concat(Object.keys(this.defaultRules))) const keySet = new Set(Object.keys(this.pattern).concat(Object.keys(this.defaultRules)))
...@@ -51,7 +51,7 @@ export default { ...@@ -51,7 +51,7 @@ export default {
const that = this; const that = this;
for (let key of keySet.keys()) { for (let key of keySet.keys()) {
const rule = [] const rule = []
if(that.pattern[key]){ if (that.pattern[key]) {
rule.push(...that.pattern[key]) rule.push(...that.pattern[key])
} }
const triggerType = that.getTriggerType(key) const triggerType = that.getTriggerType(key)
...@@ -77,7 +77,7 @@ export default { ...@@ -77,7 +77,7 @@ export default {
trigger: triggerType trigger: triggerType
}) })
} }
if(rule.length > 0) { if (rule.length > 0) {
res[key] = rule; res[key] = rule;
} }
} }
...@@ -98,6 +98,42 @@ export default { ...@@ -98,6 +98,42 @@ export default {
return "blur"; return "blur";
}, },
/** /**
* Tabs切换事件
* @param {VM} tab
*/
tabClick(tab) {
if (this.isInDisplay) {
return
}
const name = tab.name
let rulePath;
if (name === "setpan") {
rulePath = "setmod.setpan";
}
if (name === "glepan") {
rulePath = "setmod.glemod.glepan";
}
if (name === "docpan") {
rulePath = "trnmod.trndoc.docpan"
}
if (name === "doctre") {
rulePath = "trnmod.trndoc.doctre"
}
if (name === "engp") {
rulePath = "liaall.engp"
}
if (name === "limitbody") {
rulePath = "liaall.limmod.limitbody"
}
if (!!rulePath) {
this.executeRule(rulePath).then(res => {
if (res.respCode == SUCCESS) {
this.updateModel(res.data)
}
})
}
},
/**
* 以函数形式获取model(请求参数),保证取到的是最新赋值的 * 以函数形式获取model(请求参数),保证取到的是最新赋值的
* @param {any} params 参数 * @param {any} params 参数
* @returns * @returns
...@@ -113,7 +149,7 @@ export default { ...@@ -113,7 +149,7 @@ export default {
resolve(d) resolve(d)
}, 0) }, 0)
}) })
return {...data, params} return { ...data, params }
} }
return fn; return fn;
}, },
...@@ -124,9 +160,13 @@ export default { ...@@ -124,9 +160,13 @@ export default {
updateModel(data) { updateModel(data) {
Utils.copyValueFromVO(this.model, data); Utils.copyValueFromVO(this.model, data);
}, },
/**
* 弹出机构选择框
* @param {String} rulePath 路径
*/
showGridPromptDialog(rulePath) { showGridPromptDialog(rulePath) {
this.executeRule(rulePath).then((res) => { this.executeRule(rulePath).then((res) => {
if (res.respCode = SUCCESS){ if (res.respCode = SUCCESS) {
if (res.data.params) { if (res.data.params) {
Utils.copyValueFromVO(this.model, res.data); Utils.copyValueFromVO(this.model, res.data);
} else { } else {
...@@ -141,20 +181,33 @@ export default { ...@@ -141,20 +181,33 @@ export default {
} }
}) })
}, },
/**
* 机构回填
* @param {String} val 选种行的值(一般是首列)
* @param {String} rulePath 路径
*/
selectEty(val, rulePath) { selectEty(val, rulePath) {
const props = rulePath.replaceAll(".", "_") const props = rulePath.replaceAll(".", "_")
const obj = {} const obj = {}
obj[props] = val; obj[props] = val;
Utils.copyValueFromVO(this.model, obj); Utils.copyValueFromVO(this.model, obj);
this.executeRule(rulePath).then((res) => { this.executeRule(rulePath).then((res) => {
if (res.respCode = SUCCESS){ if (res.respCode = SUCCESS) {
Utils.copyValueFromVO(this.model, res.data); Utils.copyValueFromVO(this.model, res.data);
} }
}); });
},
/**
* 改变表单项的是否必填属性
* @param {String} property 属性
* @param {Boolean} required 是否必填
*/
changeFormItemRequired(property, required) {
this.pattern[property][0].required = required
} }
}, },
computed:{ computed: {
isInDisplay(){ isInDisplay() {
return this.$store.state.Status.mode === 'display' return this.$store.state.Status.mode === 'display'
} }
} }
......
...@@ -164,7 +164,7 @@ export default class Cptopn{ ...@@ -164,7 +164,7 @@ export default class Cptopn{
setfel:[] setfel:[]
}, },
glemod:{ glemod:{
gleshwstm: {}
} }
}, },
mtabut:{ mtabut:{
......
...@@ -187,6 +187,9 @@ export default class Ditopn{ ...@@ -187,6 +187,9 @@ export default class Ditopn{
}, },
setfeg:{ setfeg:{
setfel:[] setfel:[]
},
glemod:{
gleshwstm: {}
} }
}, },
liaall:{ liaall:{
......
...@@ -51,10 +51,6 @@ export default { ...@@ -51,10 +51,6 @@ export default {
this.$notify.error({ title: '错误', message: '服务请求失败!' }); this.$notify.error({ title: '错误', message: '服务请求失败!' });
} }
}, },
tabClick() {
},
async continueEdit(row) { async continueEdit(row) {
//let rtnmsg = await Api.post("getPendingData",{params:{'selsptinr':row[0]}}) //let rtnmsg = await Api.post("getPendingData",{params:{'selsptinr':row[0]}})
//if (rtnmsg.respCode == SUCCESS) { //if (rtnmsg.respCode == SUCCESS) {
......
...@@ -10,58 +10,58 @@ ...@@ -10,58 +10,58 @@
:validate-on-rule-change="false" :validate-on-rule-change="false"
> >
<el-tabs ref="elment" type="card" @tab-click="tabClick"> <el-tabs ref="elment" type="card" @tab-click="tabClick">
<el-tab-pane label="Overview"> <el-tab-pane label="Overview" name="opnp1">
<!--PD000020 --> <!--PD000020 -->
<m-opnp1 :model="model" :codes="codes" /> <m-opnp1 :model="model" :codes="codes" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="Settlement"> <el-tab-pane label="Settlement" name="setpan">
<!--PD000000 --> <!--PD000000 -->
<m-setpan :model="model" :codes="codes" /> <m-setpan :model="model" :codes="codes" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="Bookings"> <el-tab-pane label="Bookings" name="glepan">
<!--PD000001 --> <!--PD000001 -->
<m-glepan :model="model" :codes="codes" ref="glepan"/> <m-glepan :model="model" :codes="codes" ref="glepan"/>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="Completion"> <el-tab-pane label="Completion" name="coninfp">
<!--PD000000 --> <!--PD000000 -->
<m-coninfp :model="model" :codes="codes" /> <m-coninfp :model="model" :codes="codes" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="Messages"> <el-tab-pane label="Messages" name="docpan">
<!--PD000529 --> <!--PD000529 -->
<m-docpan :model="model" :codes="codes" /> <m-docpan :model="model" :codes="codes" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="Attachments"> <el-tab-pane label="Attachments" name="doctre">
<!--PD000546 --> <!--PD000546 -->
<m-doctre :model="model" :codes="codes" /> <m-doctre :model="model" :codes="codes" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="Finance"> <el-tab-pane label="Finance" name="finp">
<!--PD000218 --> <!--PD000218 -->
<m-finp :model="model" :codes="codes" /> <m-finp :model="model" :codes="codes" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="外管信息"> <el-tab-pane label="外管信息" name="wg">
<!--PD000009 --> <!--PD000009 -->
<m-wg :model="model" :codes="codes"/> <m-wg :model="model" :codes="codes"/>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="境内汇款申请书-基础信息" v-if="model.bopmod.szflg === '2' && model.bopmod.basflg"> <el-tab-pane label="境内汇款申请书-基础信息" name="dbe" v-if="model.bopmod.szflg === '2' && model.bopmod.basflg">
<m-dbe :model="model" :codes="codes"></m-dbe> <m-dbe :model="model" :codes="codes"></m-dbe>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="境外汇款申请书-基础信息" v-if="model.bopmod.szflg === '1' && model.bopmod.basflg"> <el-tab-pane label="境外汇款申请书-基础信息" name="dbb" v-if="model.bopmod.szflg === '1' && model.bopmod.basflg">
<m-dbb :model="model" :codes="codes"></m-dbb> <m-dbb :model="model" :codes="codes"></m-dbb>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="跨境人民币申报"> <el-tab-pane label="跨境人民币申报" name="cnyp">
<!--PD000002 --> <!--PD000002 -->
<m-cnyp :model="model" :codes="codes"/> <m-cnyp :model="model" :codes="codes"/>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="2111跨境支出信息" v-if="model.cnybop.outflg==='1'"> <el-tab-pane label="2111跨境支出信息" name="outp" v-if="model.cnybop.outflg==='1'">
<m-outp :model="model" :codes="codes"></m-outp> <m-outp :model="model" :codes="codes"></m-outp>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
...@@ -82,10 +82,7 @@ import Pattern from "~/model/Cptopn/Pattern"; ...@@ -82,10 +82,7 @@ import Pattern from "~/model/Cptopn/Pattern";
import Default from "~/model/Cptopn/Default"; import Default from "~/model/Cptopn/Default";
import Check from "~/model/Cptopn/Check"; import Check from "~/model/Cptopn/Check";
import Opnp1 from "./Opnp1"; import Opnp1 from "./Opnp1";
import Setpan from "./Setpan";
import Glepan from "./Glepan";
import Coninfp from "./Coninfp"; import Coninfp from "./Coninfp";
import Docpan from "./Docpan";
import Doctre from "./Doctre"; import Doctre from "./Doctre";
import Finp from "./Finp"; import Finp from "./Finp";
import Wg from "./Wg"; import Wg from "./Wg";
...@@ -94,6 +91,10 @@ import Dbe from "./Dbe.vue" ...@@ -94,6 +91,10 @@ import Dbe from "./Dbe.vue"
import Dbb from "./Dbb.vue" import Dbb from "./Dbb.vue"
import Outp from "./Outp.vue" import Outp from "./Outp.vue"
import Glepan from "~/views/Public/Glepan"
import Setpan from "~/views/Public/Setpan"
import Docpan from "~/views/Public/Docpan"
export default { export default {
components: { components: {
"m-opnp1": Opnp1, "m-opnp1": Opnp1,
...@@ -127,51 +128,6 @@ export default { ...@@ -127,51 +128,6 @@ export default {
}; };
}, },
methods:{ methods:{
tabClick(vm){
if(this.isInDisplay){
return
}
const label = vm.label
if (label === "Settlement") {
this.executeRule("setmod.setpan").then(res => {
if (res.respCode == SUCCESS){
const data = res.data;
Utils.copyValueFromVO(this.model, data)
}
})
}
if (label === "Bookings") {
this.executeRule("setmod.glemod.glepan").then(res => {
const data = res.data;
this.$refs.glepan.stmData.data = res.data.setmod_glemod_gleshwstm.rows;
})
}
if (label === "Messages") {
this.executeRule("trnmod.trndoc.docpan").then(res => {
if (res.respCode == SUCCESS){
const data = res.data;
Utils.copyValueFromVO(this.model, data)
var stm = [];
let k = 0;
for(let i = 0; i < res.data.trnmod_trndoc_doceot.length; i++){
if(res.data.trnmod_trndoc_doceot[i].role != ""){
stm[k++] = res.data.trnmod_trndoc_doceot[i];
}
}
this.$refs.docpan.stmData.data = stm
}
})
}
if (label === "Attachments") {
this.executeRule("trnmod.trndoc.doctre").then(res => {
if (res.respCode == SUCCESS){
const data = res.data;
Utils.copyValueFromVO(this.model, data)
}
})
}
}
}, },
created: async function () { created: async function () {
console.log("进入cptopn交易"); console.log("进入cptopn交易");
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<c-page title="汇出汇款"> <c-page title="汇出汇款">
<div class="eContainer"> <div class="eContainer">
<el-form :model="model" :rules="rules" ref="modelForm" label-width="150px" size="small"> <el-form :model="model" :rules="rules" ref="modelForm" label-width="150px" size="small">
<el-tabs v-model="activeName" type="card" @tab-click="onTabClick"> <el-tabs v-model="activeName" type="card" @tab-click="tabClick">
<el-tab-pane label="概况" name="basic"> <el-tab-pane label="概况" name="basic">
<m-basic v-bind:model="model"/> <m-basic v-bind:model="model"/>
</el-tab-pane> </el-tab-pane>
...@@ -2392,10 +2392,6 @@ export default { ...@@ -2392,10 +2392,6 @@ export default {
} }
}, },
methods:{ methods:{
onTabClick(tab, event){
},
onUsrcon(){ onUsrcon(){
this.$refs.modelForm.validate(async valid => { this.$refs.modelForm.validate(async valid => {
if(!valid) if(!valid)
......
...@@ -2007,7 +2007,6 @@ export default { ...@@ -2007,7 +2007,6 @@ export default {
}; };
}, },
methods: { methods: {
tabClick(vm) {},
}, },
created: async function () { created: async function () {
console.log("进入ditame交易"); console.log("进入ditame交易");
......
<!--
<template> <template>
<div class="eibs-tab"> <div class="eibs-tab">
<c-col :span="22" :offset="1"> <c-col :span="22" :offset="1">
...@@ -44,3 +46,5 @@ export default { ...@@ -44,3 +46,5 @@ export default {
<style> <style>
</style> </style>
-->
\ No newline at end of file
...@@ -366,8 +366,6 @@ export default { ...@@ -366,8 +366,6 @@ export default {
set:function (value) { set:function (value) {
this.$parent.$parent.dialogVisible2 =value; this.$parent.$parent.dialogVisible2 =value;
} }
} }
} }
}; };
......
...@@ -117,14 +117,15 @@ import Mt799 from "./Mt799" ...@@ -117,14 +117,15 @@ import Mt799 from "./Mt799"
import Litbenl1 from "./Litbenl1" import Litbenl1 from "./Litbenl1"
import Litapll1 from "./Litapll1" import Litapll1 from "./Litapll1"
import Litrmbl1 from "./Litrmbl1" import Litrmbl1 from "./Litrmbl1"
import Setpan from "./Setpan"
import Engp from "./Engp" import Engp from "./Engp"
import Addbcb from "./Addbcb" import Addbcb from "./Addbcb"
import Docpan from "./Docpan"
import Limitbody from "./Limitbody" import Limitbody from "./Limitbody"
import Coninfp from "./Coninfp" import Coninfp from "./Coninfp"
import Ccvpan from "./Ccvpan" import Ccvpan from "./Ccvpan"
import Glepan from "./Glepan"
import Glepan from "~/views/Public/Glepan"
import Setpan from "~/views/Public/Setpan"
import Docpan from "~/views/Public/Docpan"
export default { export default {
...@@ -170,57 +171,6 @@ export default { ...@@ -170,57 +171,6 @@ export default {
} }
}, },
methods:{ methods:{
tabClick(vm){
if(this.isInDisplay){
return
}
const name = vm.name
if (name === "engp") {
this.executeRule("liaall.engp").then(res => {
const data = res.data;
Utils.copyValueFromVO(this.model, data)
})
}
if (name === "glepan") {
this.executeRule("setmod.glemod.glepan").then(res => {
const data = res.data;
this.$refs.glepan.stmData.data = res.data.setmod_glemod_gleshwstm.rows;
//Utils.copyValueFromVO(this.model, data)
})
}
if (name === "setpan") {
this.executeRule("setmod.setpan").then(res => {
if (res.respCode == SUCCESS){
const data = res.data;
Utils.copyValueFromVO(this.model, data)
}
})
}
if (name === "docpan") {
this.executeRule("trnmod.trndoc.docpan").then(res => {
if (res.respCode == SUCCESS){
const data = res.data;
Utils.copyValueFromVO(this.model, data)
var stm = [];
let k = 0;
for(let i = 0; i < res.data.trnmod_trndoc_doceot.length; i++){
if(res.data.trnmod_trndoc_doceot[i].role != ""){
stm[k++] = res.data.trnmod_trndoc_doceot[i];
}
}
this.$refs.docpan.stmData.data = stm
}
})
}
if (name === "limitbody") {
this.executeRule("liaall.limmod.limitbody").then(res => {
if (res.respCode == SUCCESS){
const data = res.data;
Utils.copyValueFromVO(this.model, data)
}
})
}
}
}, },
mounted:async function(){ mounted:async function(){
console.log("进入ditopn交易"); console.log("进入ditopn交易");
...@@ -240,22 +190,20 @@ export default { ...@@ -240,22 +190,20 @@ export default {
this.$notify.error({title: '错误',message: '服务请求失败!'}); this.$notify.error({title: '错误',message: '服务请求失败!'});
} }
}, },
computed:{
flg(){
return this.model.didgrp.rec.elcflg
},
avbby(){
return this.model.didgrp.rec.avbby
}
},
watch:{ watch:{
flg(){ // 动态修改属性的必填属性
this.pattern["didgrp.rec.fenctg"][0].required = this.model.didgrp.rec.elcflg == "Y"; "model.didgrp.rec.elcflg": {
handler(val, oldVal) {
this.changeFormItemRequired("didgrp.rec.fenctg", val == "Y")
}, },
avbby(){ immediate: true
this.pattern["didgrp.rec.tenmaxday"][0].required = this.model.didgrp.rec.avbby == "D";
}, },
"model.didgrp.rec.avbby": {
handler(val, oldVal) {
this.changeFormItemRequired("didgrp.rec.tenmaxday", val == "D")
},
immediate: true
}
} }
} }
</script> </script>
......
...@@ -536,7 +536,6 @@ export default { ...@@ -536,7 +536,6 @@ export default {
}; };
}, },
methods: { methods: {
tabClick(){},
}, },
created: async function () { created: async function () {
console.log("进入ditsel交易"); console.log("进入ditsel交易");
......
...@@ -167,8 +167,6 @@ export default { ...@@ -167,8 +167,6 @@ export default {
} }
}, },
methods:{ methods:{
tabClick(){}
}, },
created:async function(){ created:async function(){
console.log("进入infpta交易"); console.log("进入infpta交易");
......
...@@ -185,9 +185,6 @@ export default { ...@@ -185,9 +185,6 @@ export default {
handleClick(index, row){ handleClick(index, row){
console.log(index) console.log(index)
}, },
tabClick(){
}
}, },
mounted:async function(){ mounted:async function(){
......
...@@ -542,9 +542,6 @@ export default { ...@@ -542,9 +542,6 @@ export default {
} }
}) })
}, },
tabClick(){
},
}, },
mounted:async function(){ mounted:async function(){
console.log("进入trndtl交易"); console.log("进入trndtl交易");
......
...@@ -65,9 +65,6 @@ export default { ...@@ -65,9 +65,6 @@ export default {
} }
}, },
methods:{ methods:{
tabClick(){
}
}, },
mounted:async function(){ mounted:async function(){
console.log("进入trnrel交易"); console.log("进入trnrel交易");
......
<template>
<div class="eibs-tab">
<c-col :span="22" :offset="1">
<c-istream-table :list="data" :columns="columns">
</c-istream-table>
</c-col>
</div>
</template>
<script>
import Api from "~/service/Api"
import CommonProcess from "~/mixin/CommonProcess";
import CodeTable from "~/config/CodeTable"
import Event from "~/model/Ditopn/Event"
export default {
inject: ['root'],
mixins: [CommonProcess],
props:["model","codes"],
data(){
return {
columns: [
"2 1 \"D/C\" 38 1 0",
"6 2 \"Account Number\" 140",
"3 3 \"Cur\" 60",
"4 4 \"Amount\" 135 2 8:1 2 5",
"5 5 \"Value Date\" 80",
"7 6 \"Rate Type\" 90",
"8 7 \"Rate\" 85 2 0 1 0",
"9 8 \"Term\" 60",
"0 9 \"PN\" 62 1 0"
],
data: [
]
}
},
watch: {
//this.$refs.glepan.stmData.data = res.data.setmod_glemod_gleshwstm.rows;
'model.setmod.glemod.gleshwstm': {
handler(val, oldVal) {
if (val.rows) {
this.data = val.rows
}
},
immediate: true
}
},
methods:{...Event},
created:function(){
}
}
</script>
<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