Commit 958fd3f6 by wangren

Merge branch 'development-202206' of http://192.168.0.110:11080/fukai/vue-gjjs…

Merge branch 'development-202206' of http://192.168.0.110:11080/fukai/vue-gjjs into development-202206
parents c5688153 ba674982
......@@ -112,6 +112,19 @@ export default {
loading.close()
return rtnmsg
},
async executeCustomRule(rulePath, params, delayCb) {
const loading = this.loading("正在请求数据")
//copy
Utils.copyCustomFromModel(this.customModel, this.model)
console.log(this.customModel)
let rtnmsg = await Api.post(this.requestPrefix + "/executeRule/" + rulePath, this.wrapperCustom(params, delayCb))
if (rtnmsg.respCode == SUCCESS) {
this.updateValueSet(rtnmsg.codeSet)
this.showBackendErrors(rtnmsg.fieldErrors)
}
loading.close()
return rtnmsg
},
async checkAll(params) {
const loading = this.loading("正在校验数据")
const rtnmsg = await Api.post(this.requestPrefix + "/checkAll", this.wrapper(params))
......
......@@ -130,11 +130,19 @@ export default {
rulePath = "cnybop.libp"
}
if (!!rulePath) {
this.executeRule(rulePath).then(res => {
if (res.respCode == SUCCESS) {
this.updateModel(res.data)
}
})
// if(rulePath == "setmod.setpan"){
// this.executeCustomRule(rulePath).then(res => {
// if (res.respCode == SUCCESS) {
// this.updateModel(res.data)
// }
// })
// }else{
this.executeRule(rulePath).then(res => {
if (res.respCode == SUCCESS) {
this.updateModel(res.data)
}
})
// }
}
},
/**
......@@ -159,6 +167,24 @@ export default {
}
return fn;
},
wrapperCustom(params,delayCb) {
params = params || {}
params['isCustom'] = true
const fn = async () => {
const that = this;
const data = await new Promise(resolve => {
// 保证前一次请求结果赋值VO完成
setTimeout(() => {
delayCb && delayCb()
const d = Utils.flatObject(that.customModel)
resolve(d)
}, 0)
})
params['keys'] = Object.keys(data)
return { ...data, params }
}
return fn;
},
/**
* 用于手动的触发model里属性的 executeDefault
* @param {string} rule 执行的 rule path
......
......@@ -38,6 +38,7 @@ export default class Bptsel{
},
},
cfgfil:{
btnstm:"", //按钮数据
bitmap:"", // Bitmap for folder .cfgfil.bitmap
regside1:"", // Regside .cfgfil.regside1
regside2:"", // Regside .cfgfil.regside2
......
import Api from "~/service/Api"
import Pub from "../Public"
import Rec from '../Public/Dids/Did'
import Cbs from '../Public/Dids/Did'
export default class customDitopn {
constructor() {
this.data = {
didgrp: {
rec: new Rec().data,
cbs: {
nom1: new Cbs().data.nom1,
max: new Cbs().data.max,
},
apl: {
namelc: "", // 名称 .didgrp.apl.namelc
adrelc: "", // 地址 .didgrp.apl.adrelc
// dbfadrblkcn: "", // Chinese address .didgrp.apl.dbfadrblkcn
// rolsetflg: "", // 备查表相关字段
},
},
// ditp: new Dids().data.Ditp,
// litbenl1blk: "", // XMLPanel litbenl1的内置block .litbenl1blk
// litapll1blk: "", // XMLPanel litapll1的内置block .litapll1blk
// litrmbl1blk: "", // XMLPanel litrmbl1的内置block .litrmbl1blk
setmod: new Pub().data.Setmod,
// mtabut: new Pub().data.Mtabut,
// trnmod: new Pub().data.Trnmod,
// liaall: new Pub().data.Liaall,
// litameadv: "", // 特殊规定 .litameadv
// ameadvrmk: "", // 特殊规定条件 .ameadvrmk
// godnam: "", // 槧物简称 .godnam
// bchname: "", // branch name .bchname
pageId: "" // ctx的key
}
}
}
\ No newline at end of file
......@@ -2,124 +2,118 @@ import Api from "~/service/Api"
import Utils from "~/utils"
export default {
async onInfbutSearow(){
let rtnmsg = await this.executeRule("infbut.searow")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
this.stmData.data = rtnmsg.data.infbut_dspstm.rows;
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
async onInfbutDsp(){
let rtnmsg = await this.executeRule("infbut.dsp")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
async onInfbutSearow() {
let rtnmsg = await this.executeRule("infbut.searow")
if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑
this.stmData.data = rtnmsg.data.infbut_dspstm.rows;
}
else {
this.$notify.error({ title: '错误', message: '服务请求失败!' });
}
},
async onInfbutDsp() {
let rtnmsg = await this.executeRule("infbut.dsp")
if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
async onInfbutUserow(){
let rtnmsg = await this.executeRule("infbut.userow")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
}
else {
this.$notify.error({ title: '错误', message: '服务请求失败!' });
}
},
async onInfbutUserow() {
let rtnmsg = await this.executeRule("infbut.userow")
if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
async onInfbutClr(){
let rtnmsg = await this.executeRule("infbut.clr")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
}
else {
this.$notify.error({ title: '错误', message: '服务请求失败!' });
}
},
async onInfbutClr() {
let rtnmsg = await this.executeRule("infbut.clr")
if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
async onInfbutButprt(){
let rtnmsg = await this.executeRule("infbut.butprt")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
}
else {
this.$notify.error({ title: '错误', message: '服务请求失败!' });
}
},
async onInfbutButprt() {
let rtnmsg = await this.executeRule("infbut.butprt")
if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
async onInfbutExi(){
let rtnmsg = await this.executeRule("infbut.exi")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
}
else {
this.$notify.error({ title: '错误', message: '服务请求失败!' });
}
},
async onInfbutExi() {
let rtnmsg = await this.executeRule("infbut.exi")
if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
async onInfconButshword(){
let rtnmsg = await this.executeRule("infcon.butshword")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
}
else {
this.$notify.error({ title: '错误', message: '服务请求失败!' });
}
},
async onInfconButshword() {
let rtnmsg = await this.executeRule("infcon.butshword")
if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
async onFiapDet(){
let rtnmsg = await this.executeRule("fiap.det")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
}
else {
this.$notify.error({ title: '错误', message: '服务请求失败!' });
}
},
async onFiapDet() {
let rtnmsg = await this.executeRule("fiap.det")
if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
async onInfconButshw(){
let rtnmsg = await this.executeRule("infcon.butshw")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
}
else {
this.$notify.error({ title: '错误', message: '服务请求失败!' });
}
},
async onInfconButshw() {
let rtnmsg = await this.executeRule("infcon.butshw")
if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
async handleSearch() {
let rtnmsg = await this.executeRule("infbut.searow")
if(rtnmsg.respCode == SUCCESS)
{
this.stmData.data = rtnmsg.data.infbut_dspstm.rows;
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
}
else {
this.$notify.error({ title: '错误', message: '服务请求失败!' });
}
},
async onInfconButshword() {
let rtnmsg = await this.executeRule("infcon.butshword")
if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑
}
else {
this.$notify.error({ title: '错误', message: '服务请求失败!' });
}
},
async handleReset() {
},
async handleSearch() {
let rtnmsg = await this.executeRule("infbut.searow")
if (rtnmsg.respCode == SUCCESS) {
this.stmData.data = rtnmsg.data.infbut_dspstm.rows;
}
else {
this.$notify.error({ title: '错误', message: '服务请求失败!' });
}
},
}
\ No newline at end of file
......@@ -244,5 +244,15 @@ export default class Utils {
});
return uuid;
}
static copyCustomFromModel(customModel, model){
for(let key in customModel){
if(typeof customModel[key] == "object"){
this.copyCustomFromModel(customModel[key], model[key])
}else{
customModel[key] = model[key]
}
}
}
}
\ No newline at end of file
......@@ -31,6 +31,11 @@ import Letopn from "./Letopn"
import Letame from "./Letame"
import Letrsv from './Letrsv'
import Infled from './Infled'
//import Bptsel from './Bptsel'
//import Bptopn from './Bptopn'
//import Bptset from './Bptset'
//import Bptame from './Bptame'
//import Bptcrf from './Bptcrf'
import Bptcan from './Bptcan'
import Sptrel from "./Sptrel"
......@@ -236,7 +241,12 @@ const BusRouter = [
{ path: 'letrsv', component: Letrsv, name: 'Letrsv', meta: { title: '出口信用证补通知' } },
{ path: 'letdrv', component: Letdrv, name: 'Letdrv', meta: { title: '出口信用证出口收单' } },
{ path: 'infled', component: Infled, name: 'Infled', meta: { title: '出口信用证交易查询' } },
{ path: 'Bptcan', component: Bptcan, name: 'Bptcan', meta: { title: '出口融资注销' } },
{ path: 'bptsel', component: Bptsel, name: 'Bptsel', meta: { title: '出口融资入口交易' } },
{ path: 'bptopn', component: Bptopn, name: 'Bptopn', meta: { title: '出口融资放款' } },
{ path: 'bptcan', component: Bptcan, name: 'Bptcan', meta: { title: '出口融资注销' } },
{ path: 'betacc', component: Betacc, name: 'Betacc', meta: { title: '出口信用证单据承兑' } },
{ path: 'betrcl', component: Betrcl, name: 'Betrcl', meta: { title: '出口信用证单据索汇' } },
{ path: 'betrcl', component: Betrcl, name: 'Betrcl', meta: { title: '出口信用证单据出口单据索汇' } },
......
......@@ -366,6 +366,18 @@
</c-col>
<c-col :span="24">
<c-form-item label="开证行开证类型" prop="dedgrp.rec.dkflg">
<c-select
v-model="model.dedgrp.rec.dkflg"
style="width: 100%"
placeholder="请选择"
:code="codes.dkflg"
disabled
></c-select>
</c-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="有效地点" prop="dedgrp.rec.expplc">
<c-input
v-model="model.dedgrp.rec.expplc"
......
......@@ -128,6 +128,7 @@ import Api from "~/service/Api";
import Utils from "~/utils/index";
import CodeTable from "~/config/CodeTable";
import Ditopn from "~/model/Ditopn";
import customDitopn from "~/model/Ditopn/customIndex";
import commonProcess from "~/mixin/commonProcess";
import commonFuncs from "~/mixin/commonFuncs";
import Pattern from "~/model/Ditopn/Pattern";
......@@ -187,6 +188,7 @@ export default {
tabVal: "ovwp",
trnName: "ditopn",
model: new Ditopn().data,
customModel: new customDitopn().data,
checkRules: Check,
defaultRules: Default,
pattern: Pattern,
......
<template>
<div class="busnavbar">
<div class="busnavbar-items">
<c-button style="margin-left:7px;" class="medium_bcs" size="medium" type="primary" v-for="(item,index) in codeList" v-bind:key="index" @click.native="onNarBtnClick(item.code,index)" :title="item.title" :disabled="item.isDis==='N'">{{item.label}}</c-button>
</div>
</div>
</template>
<script>
import Api from "~/service/Api"
import CodeTable from "~/config/CodeTable"
import Bptsel from "~/model/Bptsel"
import commonProcess from "~/mixin/commonProcess"
export default {
props:["ownref"],
components:{
},
mixins: [commonProcess], // 里面包含了Default、Check等的公共处理
data(){
return {
trnName:'bptsel',
model:new Bptsel().data,
navcode:[
// {code:"",label:"",isDis:"",title:""},
],
}
},
methods:{
//各入口按钮请求
async onNarBtnClick(code,i){
this.model.cfgfil.subtrn1= code
let rtnmsg = await this.executeRule("cfgfil.hotsub1")
console.log("cfgfil.code:" + this.model.cfgfil.subtrn1);
if(rtnmsg.respCode == SUCCESS){
this.navcode = []
this.$emit("onChoose",code.toLowerCase());
}else{
this.$notify.error({ title: "错误", message: "服务请求失败!" });
}
},
},
computed:{
codeList(){
//将model中的数据映射成数组
return this.navcode.map(item=>{
let entireItem = {...item}
this.navcode = [];
//TODO 根据数据判断当前的code,是否可以继续
// entireItem.enable = item.isDis
return entireItem
})
}
},
watch:{
"ownref":async function(n, o){
if(!this.ownref){
console.log("11111")
// onTigger()
return;
}
}
},
mounted(){
this.$nextTick(function(){
this.$on('childmethods',async function(){
this.navcode = []
//请求按钮数据
//this.model.bpdgrp.rec.ownref = 'KZ3500210540AA'
this.model.bpdgrp.rec.ownref = this.ownref
console.log("ownref:" + this.ownref );
// let rtnmsg = await this.executeRule("bpdgrp.rec.ownref");//bpdgrp_rec_ownref
let rtnmsg0 = await this.executeRule("bpdgrp.rec.ownref");//cfgfil.hotreg3
if(rtnmsg0.respCode == SUCCESS){
this.updateModel(rtnmsg0.data)
let rtnmsg = await this.executeRule("cfgfil.hotreg1");//cfgfil.hotreg3
if(rtnmsg.respCode == SUCCESS){
//重置数组
this.navcode = []
this.updateModel(rtnmsg.data)
//this.model.cfgfil.btnstm = rtnmsg.data.cfgfil_btnstm.rows
//给inr赋值,后面弹窗里面的按钮请求会用到
//this.model.bpdgrp.rec.inr = rtnmsg.data.bpdgrp_rec_inr
const length = this.model.cfgfil.btnstm.rows.length
let btnStr = this.model.cfgfil.btnstm.rows
for(let i=0; i < length; i++){
//获取数组中每行的数据
let arr = btnStr[i].split("\t");
let newList = {
code:arr[0],
label:arr[1],
isDis:arr[2],
//isDis:'Y',
title:arr[3]
}
//添加到navcode数组中
this.navcode.splice(i,0,newList)
}
}else{
this.navcode = []
this.$notify.error({ title: "错误", message: "服务请求失败!" });
}
}else{
this.navcode = []
this.$notify.error({ title: "错误", message: "服务请求失败!" });
}
})
})
}
}
</script>
<style>
</style>
<template>
<div class="busnavbar">
<div class="busnavbar-items">
<c-button style="margin-left:7px;" size="medium" type="primary" class="medium_bcs" v-for="(item,index) in codeList" v-bind:key="index" @click.native="onNarBtnClick(item.code,index)" :title="item.title" :disabled="item.isDis==='N'">{{item.label}}</c-button>
<c-button style="margin-left:7px;" size="medium" type="primary" class="medium_bcs" v-for="(item,index) in codeList" v-bind:key="index" @click.native="onNarBtnClick(item.code,item.index)" :title="item.title" :disabled="item.isDis==='N'">{{item.label}}</c-button>
</div>
</div>
</template>
......@@ -31,8 +31,8 @@ export default {
//各入口按钮请求
async onNarBtnClick(code,i){
this.model.cfgfil.subtrn1= code
let rtnmsg = await this.executeRule("cfgfil.hotsub1")
console.log("cfgfil.code:" + this.model.cfgfil.subtrn1);
let rtnmsg = await this.executeRule(`cfgfil.hotsub${i}`)
// console.log("cfgfil.code:" + this.model.cfgfil.subtrn1);
if(rtnmsg.respCode == SUCCESS){
this.navcode = []
this.$emit("onChoose",code.toLowerCase());
......@@ -41,6 +41,15 @@ export default {
}
},
getIndex(module){
for(let i = 1; i <= 12; i++){
var temp = this.model.cfgfil[`subtxt${i}`];
if(module == temp){
return i;
}
}
return 0;
}
},
computed:{
......@@ -48,7 +57,7 @@ export default {
//将model中的数据映射成数组
return this.navcode.map(item=>{
let entireItem = {...item}
this.navcode = [];
// this.navcode = [];
//TODO 根据数据判断当前的code,是否可以继续
// entireItem.enable = item.isDis
return entireItem
......@@ -83,30 +92,42 @@ export default {
//this.model.didgrp.rec.inr = rtnmsg.data.didgrp_rec_inr
const length = this.model.cfgfil.btnstm.rows.length
let btnStr = this.model.cfgfil.btnstm.rows
let j = 0;
let m = 0;
// let j = 0;
// let m = 0;
// const buttonIndex = ['保证金收取','保证金注销','保证金调整','开立信用证','信用证修改','减额修改接受','修改通知行','到单']
const buttonIndex = ['信用证修改','减额修改接受','到单','修改通知行']
for(let i=0; i < length; i++){
// const buttonIndex = ['信用证修改','减额修改接受','到单','修改通知行']
// for(let i=0; i < length; i++){
//获取数组中每行的数据
if(!( btnStr[i].indexOf("保证金") >= 0) && !(btnStr[i].indexOf("开立信用证") >= 0)){
let arr = btnStr[i].split("\t");
let newList = {
code:arr[0],
label:arr[1],
isDis:arr[2],
title:arr[3]
}
m++;
j = buttonIndex.indexOf(arr[1].replace(/(^\s*)|(\s*$)/g, ""));
if(j<0){
j = m;
}
// if(!( btnStr[i].indexOf("保证金") >= 0) && !(btnStr[i].indexOf("开立信用证") >= 0)){
// let arr = btnStr[i].split("\t");
// let newList = {
// code:arr[0],
// label:arr[1],
// isDis:arr[2],
// title:arr[3]
// }
// m++;
// j = buttonIndex.indexOf(arr[1].replace(/(^\s*)|(\s*$)/g, ""));
// if(j<0){
// j = m;
// }
//添加到navcode数组中
this.navcode.splice(j,0,newList)
}
// this.navcode.splice(j,0,newList)
// }
}
// }
for(let i=0; i < length; i++){
let arr = btnStr[i].split("\t");
var index = this.getIndex(arr[1])
let newList = {
code:arr[0],
label:arr[1],
isDis:arr[2],
title:arr[3],
index:index
}
this.navcode.push(newList)
}
}else{
......
......@@ -147,6 +147,11 @@ export default {
{ inifrm: "assetInfo", ininam: "资产信息管理", pntmiu: "15" },
{ inifrm: "assetPub", ininam: "资产发布信息管理", pntmiu: "15" },
{ inifrm: "fund", ininam: "资金信息管理", pntmiu: "15" },
{ inifrm: "16",ininam: "出口融资", pntmiu: "" },
{ inifrm: "infbpd", ininam: "出口融资查询", pntmiu: "16" },
],
menus: [],
menusHeight: 0,
......
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