Commit 21251e1a by LiRui

apf静态交易代码提交

parent b55138d6
import Api from "~/service/Api"
export function queryByPage(data) {
return Api.post("/manager/act/queryByPage", data)
}
export function queryDetailById(inr) {
return Api.post(`/manager/act/queryDetailById?inr=${inr}`)
}
export function add(data) {
return Api.post("/manager/act/add", data)
}
export function edit(data) {
return Api.post("/manager/act/edit", data)
}
export function deleteById(inr) {
return Api.post(`/manager/act/deleteById?inr=${inr}`)
}
......@@ -354,6 +354,13 @@ import Dbafee from "~/views/Statics/Dbafee";
import Dbefee from "~/views/Statics/Dbefee";
import Dbdfee from "~/views/Statics/Dbdfee";
import Dblapf from "~/views/Statics/Dblapf";
import Dbiapf from "~/views/Statics/Dbiapf";
import Dbaapf from "~/views/Statics/Dbaapf";
import Dbeapf from "~/views/Statics/Dbeapf";
import Dbdapf from "~/views/Statics/Dbdapf";
import Inftxm2 from "~/views/Statics/Inftxm";
import Infdia from "~/views/Statics/Infdia";
......@@ -733,5 +740,11 @@ const BusRouter = [
{ path: 'dbidia/:inr', component: Dbiact, name: 'StaticsDbiact', meta: { title: (tag) => { return '交易备忘录详情: ' + tag.params.inr } } },
{ path: 'dbedia/:inr', component: Dbeact, name: 'StaticsDbeact', meta: { title: (tag) => { return '交易备忘录修改: ' + tag.params.inr } } },
{ path: 'dbddia/:inr', component: Dbdact, name: 'StaticsDbdact', meta: { title: (tag) => { return '交易备忘录删除: ' + tag.params.inr } } },
{ path: 'dblapf', component: Dblapf, name: 'StaticsDblapf', meta: { title: '报文格式信息查询' } },
{ path: 'dbaapf', component: Dbaapf, name: 'StaticsDbaapf', meta: { title: '报文格式信息新增' } },
{ path: 'dbiapf/:inr', component: Dbiapf, name: 'StaticsDbiapf', meta: { title: (tag) => { return '报文格式信息详情: ' + tag.params.inr } } },
{ path: 'dbeapf/:inr', component: Dbeapf, name: 'StaticsDbeapf', meta: { title: (tag) => { return '报文格式信息修改: ' + tag.params.inr } } },
{ path: 'dbdapf/:inr', component: Dbdapf, name: 'StaticsDbdapf', meta: { title: (tag) => { return '报文格式信息删除: ' + tag.params.inr } } },
]
export default BusRouter
\ No newline at end of file
<template>
<m-apf ref="apf" title="dbaapf" type="add"></m-apf>
</template>
<script>
import Dbiapf from "~/views/Statics/Dbiapf";
export default {
name: "StaticsDbaapf",
components: {
"m-apf": Dbiapf
},
data() {
return {};
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<m-apf title="dbdapf" type="delete"></m-apf>
</template>
<script>
import Dbiapf from "~/views/Statics/Dbiapf";
export default {
name: "StaticsDbdapf",
components: {
"m-apf": Dbiapf
},
data() {
return {};
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<m-apf title="dbeapf" type="edit"></m-apf>
</template>
<script>
import Dbiapf from "~/views/Statics/Dbiapf";
export default {
name: "StaticsDbeapf",
components: {
"m-apf": Dbiapf
},
data() {
return {};
},
};
</script>
<style>
</style>
\ No newline at end of file
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>
<div class="eibs-tab">
<c-col :span="12" class="col-left">
<c-col :span="24">
<el-form-item label="cod" prop="cod">
<c-input v-model="model.cod" placeholder="请输入cod"> </c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="typ" prop="typ">
<c-input v-model="model.typ" placeholder="请输入typ"> </c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="cnt" prop="cnt">
<c-input v-model="model.cnt" placeholder="请输入cnt"> </c-input>
</el-form-item>
</c-col>
</c-col>
<c-col :span="12" class="col-right">
<c-col :span="24">
<el-form-item label="edtflg" prop="edtflg">
<c-input v-model="model.edtflg" placeholder="请输入edtflg"> </c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="tef" prop="tef">
<c-input v-model="model.tef" placeholder="请输入tef"> </c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="pri" prop="pri">
<c-input v-model="model.pri" placeholder="请输入pri"> </c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="ver" prop="ver">
<c-input v-model="model.ver" placeholder="请输入ver"> </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
<template>
<div class="eContainer">
<c-page :title="title">
<el-form
ref="modelForm"
label-width="160px"
size="small"
label-position="right"
:model="model"
:rules="rules"
:validate-on-rule-change="false"
:disabled="isDisabled"
>
<c-tabs v-model="tabVal" ref="elment" type="card">
<el-tab-pane label="基本信息" name="apf">
<c-content>
<m-apf-info :model="model" />
</c-content>
</el-tab-pane>
</c-tabs>
</el-form>
<div style="text-align: center">
<c-button
type="primary"
style="margin-right: 10px"
@click="commitAdd"
v-if="type === 'add'"
>提 交</c-button
>
<c-button
type="primary"
style="margin-right: 10px"
@click="commitEdit"
v-if="type === 'edit'"
>提 交</c-button
>
<c-button
type="primary"
style="margin-right: 10px"
@click="commitDelete"
v-if="type === 'delete'"
>提 交</c-button
>
<c-button type="primary" @click="goBack">返 回</c-button>
</div>
</c-page>
</div>
</template>
<script>
import Utils from "~/utils";
import Apf, { Pattern } from "./Apf.js";
import ApfInfo from "./ApfInfo.vue";
import { queryDetailById, add, edit, deleteById } from "~/service/test/apf.js";
export default {
name: "StaticsDbiapf",
components: {
"m-apf-info": ApfInfo,
},
provide() {
return {
root: this,
};
},
props: {
type: {
type: String,
default: "info"
},
title: {
type: String,
default: "dbiapf"
}
},
data() {
return {
model: new Apf().data,
tabVal: "apf",
rules: Pattern,
};
},
computed: {
isDisabled() {
return this.type === "info" || this.type === "delete";
},
},
created() {
if (this.type !== "add") {
const inr = this.$route.params.inr;
queryDetailById(inr).then((res) => {
if (res.inr) {
this.model = res;
} else {
this.$message.error("客户不存在")
}
});
}
},
methods: {
commitAdd() {
this.$refs.modelForm.validate((validated) => {
if (validated) {
add(this.model)
.then((res) => {
this.$message.success("保存成功!");
this.goBack(true)
})
.catch((err) => {
this.$message.error("保存失败!");
});
} else {
Utils.formValidateTips(this.$refs.modelForm.fields)
}
});
},
commitEdit() {
this.$refs.modelForm.validate((validated) => {
if (validated) {
edit(this.model)
.then((res) => {
this.$message.success("保存成功!");
this.goBack()
})
.catch((err) => {
this.$message.error("保存失败!");
});
} else {
Utils.formValidateTips(this.$refs.modelForm.fields)
}
});
},
commitDelete() {
this.$confirm("是否确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
deleteById(this.model.inr)
.then((res) => {
this.$message.success("删除成功!");
this.goBack(true)
})
.catch((err) => {
this.$message.error("删除失败!");
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
},
/**
* update 是否更新infapf的查询列表
*/
goBack(update) {
this.$store.dispatch("TagsView/delView", this.$route);
this.$router.push({ name: "StaticsDblapf", params: { update } });
},
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<div class="eibs-tab">
<c-col :span="12" class="col-left">
<c-col :span="24">
<el-form-item label="cod" prop="cod">
<c-input v-model="model.cod" placeholder="请输入cod"> </c-input>
</el-form-item>
</c-col>
</c-col>
<c-col :span="12" class="col-right">
<c-col :span="24">
<el-form-item label="typ" prop="typ">
<c-input v-model="model.typ" placeholder="请输入typ"> </c-input>
</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="apfAdd">新增</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="apfData"
:columns="apfColumns"
: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="apfInfo(scope.$index, scope.row)"
>详情</c-button
>
<c-button
style="margin-left: 5px"
size="small"
type="primary"
@click="apfEdit(scope.$index, scope.row)"
>修改</c-button
>
<c-button
size="small"
style="margin-left: 5px"
@click="apfDelete(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/apf.js";
export default {
name: "",
props: ["model"],
inject: ["root"],
data() {
return {
apfData: [],
apfColumns: [
{ label: 'cod', prop: 'cod', width: 'auto' },
{ label: 'typ', prop: 'typ', width: 'auto' },
{ label: 'cnt', prop: 'cnt', width: 'auto' },
{ label: 'edtflg', prop: 'edtflg', width: 'auto' },
{ label: 'tef', prop: 'tef', width: 'auto' },
{ label: 'pri', prop: 'pri', width: 'auto' },
{ label: 'ver', prop: 'ver', width: 'auto' },
],
};
},
computed: {
},
activated() {
const { update } = this.$route.params;
if (update) {
this.onInfapfSearch();
}
},
methods: {
handleReset() {
this.root.$refs.modelForm.resetFields();
},
onSearch() {
this.model.pageSize = 5;
this.model.pageNum = 1;
this.onInfapfSearch();
},
onInfapfSearch() {
queryByPage(this.model).then((res) => {
/**
* pageNumber: 0
* pageSize: 0
* total: 69
* totalPage: 0
*/
const list = res.list;
this.apfData = 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.onInfapfSearch();
},
apfAdd() {
this.$router.push(`/statics/dbaapf`);
},
apfInfo(index, row) {
this.$router.push(`/statics/dbiapf/${row.inr}`);
},
apfEdit(index, row) {
this.$router.push(`/statics/dbeapf/${row.inr}`);
},
apfDelete(index, row) {
this.$router.push(`/statics/dbdapf/${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>
\ No newline at end of file
<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">
<!--PD000039 -->
<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: "StaticsInfapf",
components: {
"m-infsea": Infsea,
},
provide() {
return {
root: this,
};
},
data() {
return {
tabVal: "infsea",
model: {
// apf
bchkey: "",
trn: "",
relcur: "",
relamt: "",
ver: "",
relflg: "",
// paging
pageNum: 1,
pageSize: 5,
total: 0,
},
};
},
};
</script>
<style></style>
\ No newline at end of file
......@@ -87,6 +87,12 @@ import Dbacup from "./Dbacup";
import Dbecup from "./Dbecup";
import Dbdcup from "./Dbdcup";
import Dblapf from "./Dblapf";
import Dbiapf from "./Dbiapf";
import Dbaapf from "./Dbaapf";
import Dbeapf from "./Dbeapf";
import Dbdapf from "./Dbdapf";
const StaticsRouter = [
{ path: 'infpty', component: Infpty, name: 'StaticsInfpty', meta: { title: '客户查询' } },
......@@ -176,6 +182,12 @@ const StaticsRouter = [
{ path: 'dbicup/:inr', component: Dbicup, name: 'StaticsDbicup', meta: { title: (tag) => { return '查看申报币种详情信息: ' + tag.params.inr } } },
{ path: 'dbecup/:inr', component: Dbecup, name: 'StaticsDbecup', meta: { title: (tag) => { return '修改申报币别信息: ' + tag.params.inr } } },
{ path: 'dbdcup/:inr', component: Dbdcup, name: 'StaticsDbdcup', meta: { title: (tag) => { return '删除申报币别信息: ' + tag.params.inr } } },
{ path: 'dblapf', component: Dblapf, name: 'StaticsDblapf', meta: { title: '报文格式信息查询' } },
{ path: 'dbaapf', component: Dbaapf, name: 'StaticsDbaapf', meta: { title: '报文格式信息新增' } },
{ path: 'dbiapf/:inr', component: Dbiapf, name: 'StaticsDbiapf', meta: { title: (tag) => { return '报文格式信息详情: ' + tag.params.inr } } },
{ path: 'dbeapf/:inr', component: Dbeapf, name: 'StaticsDbeapf', meta: { title: (tag) => { return '报文格式信息修改: ' + tag.params.inr } } },
{ path: 'dbdapf/:inr', component: Dbdapf, name: 'StaticsDbdapf', meta: { title: (tag) => { return '报文格式信息删除: ' + tag.params.inr } } },
]
export default StaticsRouter
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