Commit 837beeaf by nanrui

cfasel初始化以及cfasel侧边栏和路由的添加

parent 73537a65
import Utils from "~/utils"
/**
* Cfasel Check规则
*/
let checkObj = {
}
for (const key in checkObj) {
if (Object.hasOwnProperty.call(checkObj, key)) {
checkObj[key] = checkObj[key] ? checkObj[key] : Utils.reflectCheck(key)
}
}
export default checkObj
/**
* Cfasel Default规则
*/
import Api from "~/service/Api";
import Utils from "~/utils/index"
export default {
"cfaquep.cfatyp" :Utils.defaultFunction,
"eafstm" :Utils.defaultFunction,
"ecastm" :Utils.defaultFunction,
"ebastm" :Utils.defaultFunction,
"eadstm" :Utils.defaultFunction,
"eblstm" :Utils.defaultFunction,
"cfaquep.frmdat" :Utils.defaultFunction,
"errcfa.msgstm" :Utils.defaultFunction,
"cfaquep.ownextkey" :Utils.defaultFunction,
"cfaquep.tildat" :Utils.defaultFunction,
}
//你可以添加自动default处理
import Api from "~/service/Api"
import Utils from "~/utils"
export default {
async onSerbut(){
let rtnmsg = await this.executeRule("serbut")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
async onDtlbut(){
let rtnmsg = await this.executeRule("dtlbut")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
async onAddbut(){
let rtnmsg = await this.executeRule("addbut")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
async onAmebut(){
let rtnmsg = await this.executeRule("amebut")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
async onDelbut(){
let rtnmsg = await this.executeRule("delbut")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
async onExpbut(){
let rtnmsg = await this.executeRule("expbut")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
async onAddbut2(){
let rtnmsg = await this.executeRule("addbut2")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
async onAmelixi(){
let rtnmsg = await this.executeRule("amelixi")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
async onExi(){
let rtnmsg = await this.executeRule("exi")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
async onErrcfaSerbut(){
let rtnmsg = await this.executeRule("errcfa.serbut")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
async onErrcfaCorbut(){
let rtnmsg = await this.executeRule("errcfa.corbut")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
async onExi(){
let rtnmsg = await this.executeRule("exi")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
}
\ No newline at end of file
export default {
"cfaquep.frmdat":[
{type: "date", required: false, message: "输入正确的日期"}
],
"cfaquep.tildat":[
{type: "date", required: false, message: "输入正确的日期"}
],
"cfaquep.staflg":[
{type: "string", required: false, message: "必输项"},
{max: 1,message:"长度不能超过1"}
],
"cfaquep.rptno":[
{type: "string", required: false, message: "必输项"},
{max: 28,message:"长度不能超过28"}
],
"cfaquep.dattyp":[
{type: "string", required: false, message: "必输项"},
{max: 1,message:"长度不能超过1"}
],
"cfaquep.ownref":[
{type: "string", required: false, message: "必输项"},
{max: 16,message:"长度不能超过16"}
],
"cfaquep.sum":[
{type: "string", required: false, message: "必输项"},
{max: 8,message:"长度不能超过8"}
],
"eblstm":[
{type: "string", required: false, message: "必输项"},
{max: 1,message:"长度不能超过1"}
],
"eadstm":[
{type: "string", required: false, message: "必输项"},
{max: 1,message:"长度不能超过1"}
],
"eafstm":[
{type: "string", required: false, message: "必输项"},
{max: 1,message:"长度不能超过1"}
],
"ebastm":[
{type: "string", required: false, message: "必输项"},
{max: 1,message:"长度不能超过1"}
],
"ecastm":[
{type: "string", required: false, message: "必输项"},
{max: 1,message:"长度不能超过1"}
],
"errcfa.rptno":[
{type: "string", required: false, message: "必输项"},
{max: 33,message:"长度不能超过33"}
],
"cfaquep.frmdat":[
{type: "date", required: false, message: "输入正确的日期"}
],
"cfaquep.tildat":[
{type: "date", required: false, message: "输入正确的日期"}
],
"errcfa.msgstm":[
{type: "string", required: false, message: "必输项"},
{max: 40,message:"长度不能超过40"}
],
}
\ No newline at end of file
import Api from "~/service/Api"
import Pts from "../Common/Pts"
export default class Cfasel{
constructor () {
this.data = {
eblstm:"", // Selection .eblstm
cfaquep:{
cfatyp:"", // 申报类型 .cfaquep.cfatyp
frmdat:"", // From .cfaquep.frmdat
tildat:"", // Until .cfaquep.tildat
ownextkey:"", // Initial Code .cfaquep.ownextkey
staflg:"", // 至 .cfaquep.staflg
dattyp:"", // 查询日期类型 .cfaquep.dattyp
rptno:"", // 申报号码 .cfaquep.rptno
sum:"", // 笔数 .cfaquep.sum
ownref:"", // 业务编号 .cfaquep.ownref
},
eadstm:"", // EAD Selection .eadstm
eafstm:"", // EAF Selection .eafstm
ebastm:"", // EBA Selection .ebastm
ecastm:"", // ECA Selection .ecastm
errcfa:{
msgstm:"", // Select Error Message .errcfa.msgstm
rptno:"", // 申报编号 .errcfa.rptno
},
pageId: "" // ctx的key
}
}
}
\ No newline at end of file
......@@ -217,6 +217,8 @@ import Infact from "./Infact"
import Dbcinf from "./Dbcinf"
import Dbcadd from "./Dbcadd"
import Cfasel from "./Cfasel"
/**
* 带有name的才会被添加进顶部的标签页里
*/
......@@ -448,6 +450,8 @@ const BusRouter = [
{ path: 'Dbcinf', component: Dbcinf, name: 'Dbcinf', meta: { title: '对外付款/承兑通知书(查询)' } },
{ path: 'Dbcadd', component: Dbcadd, name: 'Dbcadd', meta: { title: '对外付款/承兑通知书(新建)' } },
{ path: 'Cfasel', component: Cfasel, name: 'Cfasel', meta: { title: '申报查询入口' } },
{ path: 'dzsys/:path', name: 'DzSys', meta: { title: (tag) => { return '电证 - ' + tag.params.title } } },
]
export default BusRouter
\ No newline at end of file
<template>
<div class="eibs-tab">
<el-form class="m-table-search-form" ref="paramsForm" label-position="right" label-width="110px" size="small">
<c-col :span="8">
<c-form-item label="申报编号" prop="errcfa.rptno" style="width: 100%">
<c-input v-model="model.errcfa.rptno" maxlength="33"
:placeholder="$t('other.please_enter') + '申报编号'">
</c-input>
</c-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="开立日期" prop="cfaquep.frmdat" style="width: 100%">
<c-col :span="11">
<c-date-picker type="date" v-model="model.cfaquep.frmdat" style="width:100%"
placeholder="请选择开立日期"></c-date-picker>
</c-col>
<c-col :span="2" style="text-align: center">
<label style="display: inline-block; width: 100%">-</label>
</c-col>
<c-col :span="11">
<c-date-picker type="date" v-model="model.cfaquep.tildat" style="width:100%"
placeholder="请选择截至日期"></c-date-picker>
</c-col>
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="业务所属行" prop="cfaquep.ownextkey" style="width: 100%">
<c-select v-model="model.cfaquep.ownextkey" style="width:100%" placeholder="请选择业务所属行">
</c-select>
</el-form-item>
</c-col>
</el-form>
<c-col :span="24" style="text-align:right;padding-right:20px">
<el-button type="primary" size="small">查询</el-button>
</c-col>
<div style="height:90%">
<c-col :span="24">
<c-istream-table :list="stmData.data" :columns="stmData.columns" :showButtonFlg="true">
<!-- 自定义组件里加了最右边的一列”操作“ -->
<el-table-column fixed="right" prop="op" label="操作" width="140px">
<template slot="header">
<c-col :span="11" style="text-align: center"><span>操作</span></c-col>
</template>
<template slot-scope="scope">
<!-- 申请一个弹出主键放在插槽,加工已渲染的数据 -->
<el-popover placement="top-start" title="历史信息" width="800" trigger="click"
:ref="'popover_' + scope.row.IDX">
<div style=" text-align: right; margin-top: -30px; margin-right: 5px; font-size: 16px;">
<span class="el-icon-close" @click="closeTrn('popover_' + scope.row.IDX)" />
</div>
<c-istream-table :list="trnData.data" :columns="trnData.columns">
<el-table-column prop="op" label="操作" width="0">
<template slot-scope="scope">
<c-button style="margin-left: 0" size="small"
@click="display(scope.row['INR'])">
详情
</c-button>
</template>
</el-table-column>
</c-istream-table>
<c-button style="margin-left: 0" size="small"
@click="getTrnInfo(scope.$index, scope.row)" slot="reference">
详情
</c-button>
</el-popover>
<c-button style="margin-left: 5px" size="small" type="primary"
@click="getButtons(scope.row['业务参考号'])">
处理
</c-button>
</template>
</el-table-column>
</c-istream-table>
</c-col>
</div>
<!-- <c-col :span="12">
<c-button size="small" type="primary" @click="onErrcfaSerbut">
{{ $t('errcfa.C0000011') }}
</c-button>
</c-col>
<c-col :span="12">
<c-form-item label="Select Error Message" prop="errcfa.msgstm">
<c-input v-model="model.errcfa.msgstm" :placeholder="$t('other.please_enter') + 'Select Error Message'">
</c-input>
</c-form-item>
</c-col>
<c-col :span="12">
<c-button size="small" type="primary" @click="onErrcfaCorbut">
{{ $t('errcfa.C0000010') }}
</c-button>
</c-col>
<c-col :span="12">
<c-button size="small" type="primary" @click="onExi">
{{ $t('errcfa.C0000012') }}
</c-button>
</c-col> -->
</div>
</template>
<script>
import Api from "~/service/Api"
import commonProcess from "~/mixin/commonProcess";
import CodeTable from "~/config/CodeTable"
import Event from "~/model/Cfasel/Event"
export default {
inject: ['root'],
props: ["model", "codes"],
mixins: [commonProcess],
data() {
return {
stmData: {
columns: [
"0 1 \"申报编号\" 200 1 0:0 1",
"1 2 \"反馈日期\" 150 4 7:2 1 ",
"5 3 \"业务编号\" 150 1 0:0 1",
"4 4 \"错误信息\" 250 1 0:0 1",
"2 5 \"接口反馈文件\" 325 1 0:0 1",
],
data: [],
},
}
},
methods: {
...Event,
async handleSearch() {
this.stmData.data = [];
let frmdat = this.model.cfaquep.frmdat;
if (!frmdat || frmdat == '') {
this.$notify.error({ title: '错误', message: '查询开始日期必输!' });
return;
}
let tildat = this.model.cfaquep.tildat;
if (!tildat || tildat == '') {
this.$notify.error({ title: '错误', message: '查询结束日期必输!' });
return;
}
let rtnmsg = await this.executeRule("infbut.searow")
if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑
this.stmData.data = rtnmsg.data.errcfa_msgstm.rows;
// this.updateModel(rtnmsg.data);
// this.stmData.data = rtnmsg.data.infbut_dspstm.rows;
//this.model.infbut.dspstm = rtnmsg.data.infbut_dspstm
}
else {
this.$notify.error({ title: '错误', message: '服务请求失败!' });
}
},
},
created: function () {
}
}
</script>
<style>
</style>
<template>
<div class="eContainer">
<el-form :model="model" :rules="rules" ref="modelForm" label-width="150px" label-position="right" size="small"
:validate-on-rule-change="false">
<c-tabs v-model="tabVal" ref="elment" type="card" @tab-click="myTabClick">
<!--cfasel PD000000 接口信息 -->
<el-tab-pane label="接口信息" name="selp">
<content>
<m-selp :model="model" :codes="codes" />
</content>
</el-tab-pane>
<!--errcfa PD000001 接口反馈文件差错返回 -->
<el-tab-pane label="接口反馈文件差错返回" name="errp">
<content>
<m-errp :model="model" :codes="codes" />
</content>
</el-tab-pane>
</c-tabs>
</el-form>
</div>
</template>
<script>
import Api from "~/service/Api"
import CodeTable from "~/config/CodeTable"
import Cfasel from "~/model/Cfasel"
import commonProcess from "~/mixin/commonProcess"
import Check from "~/model/Cfasel/Check"
import Default from "~/model/Cfasel/Default"
import Pattern from "~/model/Cfasel/Pattern"
import Selp from "./Selp"
import Errp from "./Errp"
export default {
name: "Cfasel",
components: {
"m-selp": Selp,
"m-errp": Errp,
},
provide() {
return {
root: this
}
},
mixins: [commonProcess], // 里面包含了Default、Check等的公共处理
data() {
return {
tabVal: "selp",
trnName: "cfasel",
trnType: "",
model: new Cfasel().data,
checkRules: Check,
defaultRules: Default,
pattern: Pattern,
rules: null,
codes: {
},
}
},
methods: {
myTabClick(tab) {
this.tabClick(tab)
/**
* do it yourself
**/
}
},
created: async function () {
console.log("进入cfasel交易");
let rtnmsg = await this.init({})
if (rtnmsg.respCode == SUCCESS) {
this.updateModel(rtnmsg.data)
//TODO 处理数据逻辑
}
else {
this.$notify.error({ title: '错误', message: '服务请求失败!' });
}
}
}
</script>
<style>
</style>
......@@ -202,6 +202,13 @@ export default {
{ inifrm: "12", ininam: "智能审单", pntmiu: "" },
{ inifrm: "examRule", ininam: "智能审单规则配置", pntmiu: "12" },
{ inifrm: "28", ininam: "资本项目申报", pntmiu: "" },
{ inifrm: "cfasel", ininam: "申报查询入口", pntmiu: "28" },
// { inifrm: "3", ininam: "出口信用证", pntmiu: "" },
// { inifrm: "infled", ininam: "出口信用证交易查询", pntmiu: "3" },
// { inifrm: "infbed", ininam: "出口信用证单据查询", pntmiu: "3" },
],
......
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