Commit 8b7161d8 by zhangliding

静态交易修改

parent ceb6ccea
export default class Oit {
constructor() {
this.data = {
inr: '',
objtyp: '',
objinr: '',
subtyp: '',
subbus: '',
inflev: '',
inftxt: '',
ver: '',
etgextkey: '',
ownref: '',
nam: '',
cod: '',
extkey: '',
}
}
}
export const Pattern = {
inr: [
{ required: true, message: '必输项', type: 'string', trigger: 'blur' },
{ max: 8, message: '最大长度8个字符', trigger: 'blur' },
],
objtyp: [
{ required: true, message: '必输项', type: 'string', trigger: 'blur' },
{ max: 6, message: '最大长度6个字符', trigger: 'blur' },
],
objinr: [
{ required: true, message: '必输项', type: 'string', trigger: 'blur' },
{ max: 8, message: '最大长度8个字符', trigger: 'blur' },
],
subtyp: [
{ required: true, message: '必输项', type: 'string', trigger: 'blur' },
{ max: 3, message: '最大长度3个字符', trigger: 'blur' },
],
subbus: [
{ required: false, message: '必输项', type: 'string', trigger: 'blur' },
{ max: 2, message: '最大长度2个字符', trigger: 'blur' },
],
inflev: [
{ required: true, message: '必输项', type: 'string', trigger: 'blur' },
{ max: 1, message: '最大长度1个字符', trigger: 'blur' },
],
inftxt: [],
}
export default class Oit {
constructor() {
this.data = {
inr: '',
objtyp: '',
objinr: '',
subtyp: '',
subbus: '',
inflev: '',
inftxt: '',
ver: '',
etgextkey: '',
ownref: '',
nam: '',
cod: '',
extkey: '',
}
}
}
export const Pattern = {
inr: [
{ required: true, message: '必输项', type: 'string', trigger: 'blur' },
{ max: 8, message: '最大长度8个字符', trigger: 'blur' },
],
objtyp: [
{ required: true, message: '必输项', type: 'string', trigger: 'blur' },
{ max: 6, message: '最大长度6个字符', trigger: 'blur' },
],
objinr: [
{ required: true, message: '必输项', type: 'string', trigger: 'blur' },
{ max: 8, message: '最大长度8个字符', trigger: 'blur' },
],
subtyp: [
{ required: true, message: '必输项', type: 'string', trigger: 'blur' },
{ max: 3, message: '最大长度3个字符', trigger: 'blur' },
],
subbus: [
{ required: false, message: '必输项', type: 'string', trigger: 'blur' },
{ max: 2, message: '最大长度2个字符', trigger: 'blur' },
],
inflev: [
{ required: true, message: '必输项', type: 'string', trigger: 'blur' },
{ max: 1, message: '最大长度1个字符', trigger: 'blur' },
],
inftxt: [],
}
<template>
<div class="eibs-tab">
<c-col :span="12" class="col-left">
<!-- <c-col :span="24">
<el-form-item label="inr" prop="inr">
<c-input
v-model="model.inr"
placeholder="请输入inr"
>
</c-input>
</el-form-item>
</c-col> -->
<c-col :span="24">
<el-form-item label="关联的表名" prop="objtyp">
<c-select
v-model="model.objtyp"
placeholder="请输入关联的表名"
:code="getCodesByKey('objtypcodetable')"
:disabled="isDisabled"
>
</c-select>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="Key" prop="ownref">
<c-input
v-model="model.ownref"
placeholder="请输入ownref"
:disabled="isDisabled"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="Name" prop="nam">
<c-input
v-model="model.nam"
placeholder="请输入nam"
:disabled="isDisabled"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="提示类型" prop="subtyp">
<c-select
v-model="model.subtyp"
placeholder="请输入提示类型"
:code="getCodesByKey('subtypcodetable')"
>
</c-select>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="相关业务品种" prop="subbus">
<c-select
v-model="model.subbus"
placeholder="请输入相关业务品种"
:code="getCodesByKey('bustxt')"
>
</c-select>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="提示信息级别" prop="inflev">
<c-select
v-model="model.inflev"
placeholder="请输入提示信息级别"
:code="getCodesByKey('inflevcodetable')"
>
</c-select>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="提示信息内容" prop="inftxt">
<c-input v-model="model.inftxt" placeholder="请输入提示信息内容">
</c-input>
</el-form-item>
</c-col>
<!-- <c-col :span="24">
<el-form-item label="机构层次" prop="lev">
<c-select style="width: 100%"
v-model="model.lev"
placeholder="请选择机构层次"
:code="getCodesByKey('lev')"
>
</c-select>
</el-form-item>
</c-col> -->
</c-col>
</div>
</template>
<script>
import codes from '~/config/CodeTable'
export default {
name: '',
props: ['model'],
data() {
return {}
},
computed: {
isDisabled() {
//return this.type === 'edit'
return false
},
},
methods: {
getCodesByKey(key) {
return codes[key] ?? []
},
},
}
</script>
<style></style>
<template>
<div class="eibs-tab">
<c-table :list="model.oitList" :columnsConfig="columns"></c-table>
</div>
</template>
<script>
export default {
props: ['model'],
data() {
return {
columns: [
{ label: 'client name', prop: 'mannam', width: 'auto' },
{ label: 'OITINR', prop: 'oitinr', width: 'auto' },
{ label: 'Default Client', prop: 'oitref', width: 'auto' },
],
}
},
}
</script>
<style></style>
<template>
<div class="eibs-tab">
<c-col :span="24">
<!-- ======================= 左边 ========================= -->
<c-col :span="17" class="col-left" style="padding-right: 20px"> </c-col>
<!-- ======================= 右边 ========================= -->
<c-col :span="7" class="col-right" style="padding-left: 20px"> </c-col>
</c-col>
</div>
</template>
<script>
export default {
props: ['model'],
data() {
return {
columns: [
{ label: '机构编码', prop: 'bchkey', width: 'auto' },
{ label: '交易代码', prop: 'trn', width: 'auto' },
{ label: '授权货币', prop: 'relcur', width: 'auto' },
{ label: '授权金额', prop: 'relamt', width: 'auto' },
{ label: '交易属性', prop: 'relflg', width: 'auto' },
],
}
},
}
</script>
<style></style>
<template>
<div class="eContainer">
<c-page title="消息及停用信息查询">
<el-form
:model="model"
ref="modelForm"
label-width="120px"
label-position="right"
size="small"
>
<c-tabs v-model="tabVal" ref="elment" type="card">
<el-tab-pane label="消息及停用信息查询" name="infsea">
<c-content>
<m-infsea :model="model" ref="infsea" />
</c-content>
</el-tab-pane>
</c-tabs>
</el-form>
</c-page>
</div>
</template>
<script>
import Infsea from './infsea'
export default {
name: 'StaticsInfoit',
components: {
'm-infsea': Infsea,
},
provide() {
return {
root: this,
}
},
data() {
return {
tabVal: 'infsea',
model: {
// oit 查询条件的字段
objtyp: '',
subtyp: '',
subbus: '',
// paging
pageNum: 1,
pageSize: 5,
total: 0,
},
}
},
}
</script>
<style></style>
<template>
<div class="eibs-tab">
<!-- ----------左 ---------->
<c-col :span="12" class="col-left">
<c-col :span="24">
<el-form-item label="关联的表名" prop="objtyp">
<c-select
v-model="model.objtyp"
placeholder="请选择关联的表名"
style="width: 100%"
:code="getCodesByKey('objtypcodetable')"
></c-select>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="提示类型" prop="subtyp">
<c-select
v-model="model.subtyp"
style="width: 100%"
placeholder="请选择提示类型"
:code="getCodesByKey('subtypcodetable')"
></c-select>
</el-form-item>
</c-col>
</c-col>
<!------------- 右 ---------->
<c-col :span="12" class="col-right">
<c-col :span="24">
<el-form-item label="相关业务品种" prop="subbus">
<c-select
v-model="model.subbus"
style="width: 100%"
placeholder="请选择相关业务品种"
:code="getCodesByKey('subbuscodetable')"
></c-select>
</el-form-item>
</c-col>
<!-- <c-col :span="24">
<el-form-item label="XXX" prop="bchtyp">
<c-select
v-model="model.bchtyp"
style="width: 100%"
placeholder="XXX"
:code="getCodesByKey('bchtyp')"
>
</c-select>
</el-form-item>
</c-col> -->
</c-col>
<c-col :span="24">
<c-col :span="12" style="text-align: left">
<el-button type="primary" size="small" @click="oitAdd">新增</el-button>
</c-col>
<c-col :span="12" style="text-align: right">
<el-button size="small" @click="handleReset">重置</el-button>
<el-button
type="primary"
icon="el-icon-search"
size="small"
@click="onSearch()"
>查询
</el-button>
</c-col>
</c-col>
<c-col :span="24">
<c-paging-table
:data="oitData"
:columns="oitColumns"
:pageNumber="model.pageNum"
:pageSize="model.pageSize"
:total="model.total"
v-on:queryFunc="queryFunc"
:border="true"
>
<c-table-column fixed="right" prop="op" label="操作" width="240px">
<template slot-scope="{ scope }">
<c-button
style="margin-left: 0"
size="small"
@click="oitInfo(scope.$index, scope.row)"
>详情</c-button
>
<c-button
style="margin-left: 5px"
size="small"
type="primary"
@click="oitEdit(scope.$index, scope.row)"
>修改</c-button
>
<c-button
size="small"
style="margin-left: 5px"
@click="oitDelete(scope.$index, scope.row)"
>删除</c-button
>
<el-popover placement="top-start" width="50" trigger="click">
<ul class="table-button-item-list">
<li>
<c-button size="small" style="margin-left: 0">指派</c-button>
</li>
<li>
<c-button size="small" style="margin-left: 0">删除</c-button>
</li>
</ul>
<a
slot="reference"
href="javascript:void(0)"
style="margin-left: 5px"
>
<i class="el-icon-more"></i>
</a>
</el-popover>
</template>
</c-table-column>
</c-paging-table>
</c-col>
</div>
</template>
<script>
import codes from '~/config/CodeTable'
import { queryByPage } from '~/service/test/oit.js'
export default {
name: '',
props: ['model'],
inject: ['root'],
data() {
return {
oitData: [],
oitColumns: [
{
label: '关联的表名',
prop: 'objtypCn',
width: '120',
},
{ label: 'Key', prop: 'ownref', width: '120' },
{ label: 'Name', prop: 'nam', width: '120' },
{ label: '提示类型', prop: 'subtypCn', width: '120' },
{ label: '相关业务品种', prop: 'subbus', width: '150' },
{ label: '提示信息级别', prop: 'inflevCn', width: '200' },
],
}
},
computed: {},
activated() {
const { update } = this.$route.params
if (update) {
this.onInfOitSearch()
}
},
methods: {
handleReset() {
this.root.$refs.modelForm.resetFields()
},
onSearch() {
this.model.pageNum = 1
this.model.pageSize = 5
this.onInfOitSearch()
},
onInfOitSearch() {
queryByPage(this.model).then((res) => {
/**
* pageNumber: 0
* pageSize: 0
* total: 69
* totalPage: 0
*/
const list = res.list
// Object.keys(list).forEach((item) => {
// let obj = list[item]
// let typArr = codes['objtypcodetable']
// console.log('testabc:' + typArr[0].label)
// obj.objtypCn = typArr[0].label
// })BDD\CLD\DID\GCD
Object.keys(list).forEach((item) => {
let obj = list[item]
let objtypArr = codes['objtypcodetable'].filter((i) => {
return i.value == obj.objtyp
})
obj.objtypCn = objtypArr[0].label
let subtypArr = codes['subtypcodetable'].filter((i) => {
return i.value == obj.subtyp
})
obj.subtypCn = subtypArr[0].label
let inflevArr = codes['inflevcodetable'].filter((i) => {
return i.value == obj.inflev
})
obj.inflevCn = inflevArr[0].label
})
this.oitData = list
this.model.pageNum = res.pageNumber
this.model.pageSize = res.pageSize
this.model.total = res.total
})
},
queryFunc(pageNumber, pageSize) {
this.model.pageNum = pageNumber
this.model.pageSize = pageSize
this.onInfOitSearch()
},
getCodesByKey(key) {
return codes[key] ?? []
},
oitAdd() {
this.$router.push(`/statics/dbaoit`)
},
oitInfo(index, row) {
this.$router.push(`/statics/dbioit/${row.inr}`)
},
oitEdit(index, row) {
this.$router.push(`/statics/dbeoit/${row.inr}`)
},
oitDelete(index, row) {
this.$router.push(`/statics/dbdoit/${row.inr}`)
},
},
}
</script>
<style scoped>
.table-button-item-list {
padding: 0;
margin: 0;
}
.table-button-item-list li {
list-style: none;
padding: 5px 0;
text-align: center;
color: #606266;
cursor: pointer;
}
</style>
export default class Apf {
constructor() {
this.data = {
inr: "",
cod: "",
typ: "",
cnt: "",
edtflg: "",
tef: "",
pri: "",
ver: "",
}
}
}
export const Pattern = {
"inr": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 8, "message": "最大长度8个字符", "trigger": "blur" }
],
"cod": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 6, "message": "最大长度6个字符", "trigger": "blur" }
],
"typ": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 3, "message": "最大长度3个字符", "trigger": "blur" }
],
"cnt": [
{ "required": true, "message": "必输项", "trigger": "blur" },
{ "pattern": /^-?\d{0,4}$/, "message": "整数不能超过4位", "trigger": "blur" }
],
"edtflg": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 1, "message": "最大长度1个字符", "trigger": "blur" }
],
"tef": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 3, "message": "最大长度3个字符", "trigger": "blur" }
],
"pri": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 2, "message": "最大长度2个字符", "trigger": "blur" }
]
}
<template>
<m-oit title="dbdoit" type="delete"></m-oit>
<m-apf ref="apf" title="dbaapf" type="add"></m-apf>
</template>
<script>
import Dbioit from '~/views/Statics/Act/views/Dbioit'
import Dbiapf from "~/views/Statics/Apf/views/Dbiapf";
export default {
name: 'StaticsDbdoit',
name: "StaticsDbaapf",
components: {
'm-oit': Dbioit,
"m-apf": Dbiapf
},
data() {
return {}
return {};
},
}
};
</script>
<style></style>
<style>
</style>
\ No newline at end of file
<template>
<m-oit title="dbeoit" type="edit"></m-oit>
<m-apf title="dbdapf" type="delete"></m-apf>
</template>
<script>
import Dbioit from '~/views/Statics/Act/views/Dbioit'
import Dbiapf from "~/views/Statics/Apf/views/Dbiapf";
export default {
name: 'StaticsDbeoit',
name: "StaticsDbdapf",
components: {
'm-oit': Dbioit,
"m-apf": Dbiapf
},
data() {
return {}
return {};
},
}
};
</script>
<style></style>
<style>
</style>
\ No newline at end of file
<template>
<m-oit ref="oit" title="dbaoit" type="add"></m-oit>
<m-apf title="dbeapf" type="edit"></m-apf>
</template>
<script>
import Dbioit from '~/views/Statics/Act/views/Dbioit'
import Dbiapf from "~/views/Statics/Apf/views/Dbiapf";
export default {
name: 'StaticsDbaoit',
name: "StaticsDbeapf",
components: {
'm-oit': Dbioit,
"m-apf": Dbiapf
},
data() {
return {}
return {};
},
mounted() {},
}
};
</script>
<style></style>
<style>
</style>
\ No newline at end of file
<template>
<div class="eibs-tab">
<c-col :span="12" style="padding-right: 20px;">
<c-col :span="24">
<el-form-item label="样式设置" prop="cod">
<c-input v-model="model.cod" placeholder="请输入样式设置"> </c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="类型" prop="typ">
<c-input v-model="model.typ" placeholder="请输入类型"> </c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="数量" prop="cnt">
<c-input v-model="model.cnt" placeholder="请输入数量"> </c-input>
</el-form-item>
</c-col>
</c-col>
<c-col :span="12" style="padding-left: 20px;">
<c-col :span="24">
<el-form-item label="编辑标志" prop="edtflg">
<c-input v-model="model.edtflg" placeholder="请输入编辑标志"> </c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="所用纸张类型" prop="tef">
<c-input v-model="model.tef" placeholder="请输入所用纸张类型"> </c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="优先级" prop="pri">
<c-input v-model="model.pri" placeholder="请输入优先级"> </c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="版本号" prop="ver">
<c-input v-model="model.ver" placeholder="请输入版本号"> </c-input>
</el-form-item>
</c-col>
</c-col>
</div>
</template>
<script>
import codes from "~/config/CodeTable";
export default {
name: "",
props: ["model"],
data() {
return {};
},
};
</script>
<style>
</style>
\ No newline at end of file
......@@ -3,7 +3,7 @@
<c-page :title="title">
<el-form
ref="modelForm"
label-width="140px"
label-width="160px"
size="small"
label-position="right"
:model="model"
......@@ -12,9 +12,9 @@
:disabled="isDisabled"
>
<c-tabs v-model="tabVal" ref="elment" type="card">
<el-tab-pane label="消息信息" name="oit">
<el-tab-pane label="基本信息" name="apf">
<c-content>
<m-oitp0 :model="model" />
<m-apf-info :model="model" />
</c-content>
</el-tab-pane>
</c-tabs>
......@@ -47,61 +47,57 @@
</div>
</template>
<script>
import Utils from '~/utils'
import Oit, { Pattern } from './Oit.js'
<script>
import Utils from "~/utils";
import Apf, { Pattern } from "../../model/Apf.js";
// import Bchp0 from "./Bchp0.vue";
import OitInfo from './OitInfo.vue'
import Oitp1 from './Oitp1.vue'
import Oitp2 from './Oitp2.vue'
import ApfInfo from "./ApfInfo.vue";
import { queryById, add, edit, deleteById } from "~/service/test/apf.js";
import { queryById, add, edit, deleteById } from '~/service/test/oit.js'
export default {
name: 'StaticsDbioit',
name: "StaticsDbiapf",
components: {
'm-oitp0': OitInfo,
'm-oitp1': Oitp1,
'm-oitp2': Oitp2,
"m-apf-info": ApfInfo,
},
provide() {
return {
root: this,
}
};
},
props: {
type: {
type: String,
default: 'info',
default: "info",
},
title: {
type: String,
default: 'dbioit',
default: "dbiapf",
},
},
data() {
return {
model: new Oit().data,
tabVal: 'oit',
model: new Apf().data,
tabVal: "apf",
rules: Pattern,
}
};
},
computed: {
isDisabled() {
return this.type === 'info' || this.type === 'delete'
return this.type === "info" || this.type === "delete";
},
},
created() {
if (this.type !== 'add') {
//const inr = this.$route.params.inr
const params = this.$route.params
queryById(params).then((res) => {
if (this.type !== "add") {
const inr = this.$route.params.inr;
const data = { inr: inr };
queryById(data).then((res) => {
if (res.inr) {
this.model = res
this.model = res;
} else {
this.$message.error('客户不存在')
this.$message.error("客户不存在");
}
})
});
}
},
methods: {
......@@ -110,65 +106,67 @@ export default {
if (validated) {
add(this.model)
.then((res) => {
this.$message.success('保存成功!')
this.goBack(true)
this.$message.success("保存成功!");
this.goBack(true);
})
.catch((err) => {
this.$message.error('保存失败!')
})
this.$message.error("保存失败!");
});
} else {
Utils.formValidateTips(this.$refs.modelForm.fields)
Utils.formValidateTips(this.$refs.modelForm.fields);
}
})
});
},
commitEdit() {
this.$refs.modelForm.validate((validated) => {
if (validated) {
edit(this.model)
.then((res) => {
this.$message.success('保存成功!')
this.goBack()
this.$message.success("保存成功!");
this.goBack();
})
.catch((err) => {
this.$message.error('保存失败!')
})
this.$message.error("保存失败!");
});
} else {
Utils.formValidateTips(this.$refs.modelForm.fields)
Utils.formValidateTips(this.$refs.modelForm.fields);
}
})
});
},
commitDelete() {
this.$confirm('是否确认删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
this.$confirm("是否确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const params = this.$route.params
deleteById(params)
const data = { inr: this.model.inr };
deleteById(data)
.then((res) => {
this.$message.success('删除成功!')
this.goBack(true)
this.$message.success("删除成功!");
this.goBack(true);
})
.catch((err) => {
this.$message.error('删除失败!')
})
this.$message.error("删除失败!");
});
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除',
})
})
type: "info",
message: "已取消删除",
});
});
},
/**
* update 是否更新infbch的查询列表
* update 是否更新infapf的查询列表
*/
goBack(update) {
this.$store.dispatch('TagsView/delView', this.$route)
this.$router.push({ name: 'StaticsInfoit', params: { update } })
this.$store.dispatch("TagsView/delView", this.$route);
this.$router.push({ name: "StaticsDblapf", params: { update } });
},
},
}
};
</script>
<style></style>
<style>
</style>
\ No newline at end of file
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