Commit 4c1d2dd2 by yuanliang

txm前端交易

parent e20aaa50
import Api from "~/service/Api";
export function queryByPage(data) {
return Api.post("/manager/txm/queryByPage", data);
}
export function queryById(inr) {
return Api.post(`/manager/txm/queryById`, { inr });
}
export function add(data) {
return Api.post("/manager/txm/add", data);
}
export function edit(data) {
return Api.post("/manager/txm/edit", data);
}
export function deleteById(inr) {
return Api.post(`/manager/txm/deleteById`, { inr });
}
...@@ -342,6 +342,8 @@ import Dbausr from "~/views/Statics/Dbausr"; ...@@ -342,6 +342,8 @@ import Dbausr from "~/views/Statics/Dbausr";
import Dbiusr from "~/views/Statics/Dbiusr"; import Dbiusr from "~/views/Statics/Dbiusr";
import Dbeusr from "~/views/Statics/Dbeusr"; import Dbeusr from "~/views/Statics/Dbeusr";
import Dbdusr from "~/views/Statics/Dbdusr"; import Dbdusr from "~/views/Statics/Dbdusr";
import Inftxm2 from "~/views/Statics/Inftxm";
/** /**
* 带有name的才会被添加进顶部的标签页里 * 带有name的才会被添加进顶部的标签页里
*/ */
...@@ -699,5 +701,7 @@ const BusRouter = [ ...@@ -699,5 +701,7 @@ const BusRouter = [
{ path: 'dbiusr/:inr', component: Dbiusr, name: 'StaticsDbiusr', meta: { title: (tag) => { return '柜员详情: ' + tag.params.inr } } }, { path: 'dbiusr/:inr', component: Dbiusr, name: 'StaticsDbiusr', meta: { title: (tag) => { return '柜员详情: ' + tag.params.inr } } },
{ path: 'dbeusr/:inr', component: Dbeusr, name: 'StaticsDbeusr', meta: { title: (tag) => { return '柜员修改: ' + tag.params.inr } } }, { path: 'dbeusr/:inr', component: Dbeusr, name: 'StaticsDbeusr', meta: { title: (tag) => { return '柜员修改: ' + tag.params.inr } } },
{ path: 'dbdusr/:inr', component: Dbdusr, name: 'StaticsDbdusr', meta: { title: (tag) => { return '柜员删除: ' + tag.params.inr } } }, { path: 'dbdusr/:inr', component: Dbdusr, name: 'StaticsDbdusr', meta: { title: (tag) => { return '柜员删除: ' + tag.params.inr } } },
{ path: 'inftxm2', component: Inftxm2, name: 'StaticsInftxm', meta: { title: '固定格式文本查询' } },
] ]
export default BusRouter export default BusRouter
\ No newline at end of file
...@@ -200,6 +200,7 @@ export default { ...@@ -200,6 +200,7 @@ export default {
{ inifrm: "infpty", ininam: "客户信息查询", pntmiu: "10" }, { inifrm: "infpty", ininam: "客户信息查询", pntmiu: "10" },
{ inifrm: "inftrl", ininam: "交易权限查询", pntmiu: "10" }, { inifrm: "inftrl", ininam: "交易权限查询", pntmiu: "10" },
{ inifrm: "infusr", ininam: "柜员信息查询", pntmiu: "10" }, { inifrm: "infusr", ininam: "柜员信息查询", pntmiu: "10" },
{ inifrm: "inftxm2", ininam: "固定格式文本查询", pntmiu: "10"},
// { inifrm: "gitset", ininam: "进口保函赔付", pntmiu: "13" }, // { inifrm: "gitset", ininam: "进口保函赔付", pntmiu: "13" },
// { inifrm: "gitcrq", ininam: "进口保函索赔登记", pntmiu: "13" }, // { inifrm: "gitcrq", ininam: "进口保函索赔登记", pntmiu: "13" },
{ inifrm: "14", ininam: "服务管理", pntmiu: "" }, { inifrm: "14", ininam: "服务管理", pntmiu: "" },
......
<template>
<m-txm ref="txm" title="dbatxm" type="add"></m-txm>
</template>
<script>
import Dbitxm from "~/views/Statics/Dbitxm";
export default {
name: "StaticsDbatxm",
components: {
"m-txm": Dbitxm
},
data() {
return {};
},
mounted() {
this.$refs.fec.rules['fecList'] = [
{ type: 'array', required: true, min: 1, message: '地址信息栏不能为空' }
]
}
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<m-txm title="dbdtxm" type="delete"></m-txm>
</template>
<script>
import Dbitxm from "~/views/Statics/Dbitxm";
export default {
name: "StaticsDbdatp",
components: {
"m-txm": Dbitxm
},
data() {
return {};
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<m-txm title="dbetxm" type="edit"></m-txm>
</template>
<script>
import Dbitxm from "~/views/Statics/Dbitxm";
export default {
name: "StaticsDbeatp",
components: {
"m-txm": Dbitxm
},
data() {
return {};
},
};
</script>
<style>
</style>
\ No newline at end of file
export default class Txm {
constructor() {
this.data = {
inr: "",
extkey: "",
nam: "",
txt: "",
uil: "",
ver: "",
etgextkey: "",
};
}
}
export const Pattern = {
inr: [
{ required: true, message: "必输项", type: "string", trigger: "blur" },
{ max: 8, message: "最大长度8个字符", trigger: "blur" },
],
};
<template>
<div class="eibs-tab">
<c-col :span="12" class="col-left">
<el-form-item label="INR" prop="inr" v-if="type !== 'add'">
<c-input v-model="model.inr" placeholder="请输入主键">
</c-input>
</el-form-item>
<el-form-item label="名称" prop="nam">
<c-input v-model="model.nam" placeholder="请输入名称">
</c-input>
</el-form-item>
<!-- <el-form-item label="实体组" prop="etgextkey" style="width:100%">
<c-select v-model="model.etgextkey" style="width:100%" placeholder="请选择实体组">
<el-option v-for="item in entyGrp" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</c-select>
</el-form-item> -->
<el-form-item label="实体组" prop="etgextkey">
<c-input v-model="model.etgextkey" placeholder="请输入实体组">
</c-input>
</el-form-item>
</c-col>
<c-col :span="12" class="col-right">
<el-form-item label="EXTKEY" prop="extkey">
<c-input v-model="model.extkey" placeholder="请输入外键">
</c-input>
</el-form-item>
<el-form-item label="语言" prop="uil" style="width:100%">
<c-select v-model="model.uil" style="width:100%" placeholder="请选择语言">
<el-option v-for="item in getCodesByKey('uiltxt')" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</c-select>
</el-form-item>
</c-col>
<c-col :span="24" class="col-left">
<el-form-item label="内容" prop="txt">
<c-input-format type="textarea" v-model="model.txt" :maxRows="6" :maxCols="35"
placeholder="请输入内容"></c-input-format>
</el-form-item>
</c-col>
</div>
</template>
<script>
import codes from "~/config/CodeTable";
export default {
name: "",
entyGrp: [],
props: ["model","type"],
data() {
return {};
},
methods: {
getCodesByKey(key) {
return codes[key] ?? [];
},
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<div class="eContainer">
<c-page :title="title">
<el-form ref="modelForm" label-width="120px" 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="txm">
<c-content>
<m-txm-info :model="model" :type="type"/>
</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 Txm, { Pattern } from "./Txm.js";
import TxmInfo from "./TxmInfo.vue";
import { queryById, add, edit, deleteById } from "~/service/test/txm.js";
export default {
name: "StaticsDbitxm",
components: {
"m-txm-info": TxmInfo,
},
provide() {
return {
root: this,
};
},
props: {
type: {
type: String,
default: "info"
},
title: {
type: String,
default: "dbitxm"
}
},
data() {
return {
model: new Txm().data,
tabVal: "txm",
rules: Pattern,
};
},
computed: {
isDisabled() {
return this.type === "info" || this.type === "delete";
},
},
created() {
if (this.type !== "add") {
const inr = this.$route.params.inr;
queryById(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(true)
})
.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: "已取消删除",
});
});
},
goBack(update) {
this.$store.dispatch("TagsView/delView", this.$route);
this.$router.push({ name: "StaticsInftxm", params: { update } });
},
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<div class="eibs-tab">
<!-- 查询条件 -->
<c-col :span="12" class="col-left">
<el-form-item label="实体组" prop="etgextkey" style="width:100%">
<c-select v-model="model.etgextkey" style="width:100%" placeholder="请选择实体组">
<el-option v-for="item in entyGrp" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</c-select>
</el-form-item>
</c-col>
<c-col :span="12" class="col-right">
<el-form-item label="名称" prop="nam">
<c-input v-model="model.nam" placeholder="请输入名称" style="width: 100%">
</c-input>
</el-form-item>
</c-col>
<c-col :span="12" class="col-left">
<el-form-item label="语言" prop="uil" style="width:100%">
<c-select v-model="model.uil" style="width:100%" placeholder="请选择语言">
<el-option v-for="item in lang" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</c-select>
</el-form-item>
</c-col>
<!-- 操作按钮 -->
<c-col :span="24">
<c-col :span="12" style="text-align: left">
<el-button type="primary" size="small" @click="txmAdd">新增</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="txmData" :columns="txmColumns" :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="txmInfo(scope.$index, scope.row)">详情</c-button>
<c-button style="margin-left: 5px" size="small" type="primary"
@click="txmEdit(scope.$index, scope.row)">修改</c-button>
<c-button size="small" style="margin-left: 5px" @click="txmDelete(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 { queryByPage } from "~/service/test/txm.js";
import CodeTable from "~/config/CodeTable";
export default {
name: "",
props: ["model"],
inject: ["root"],
data() {
return {
entyGrp: [],
lang: CodeTable['uiltxt'],
txmData: [],
txmColumns: [
{ label: "名称", prop: "nam", width: "auto" },
{ label: "语言", prop: "uil", width: "auto" },
{ label: "内容", prop: "txt", width: "auto" },
],
};
},
activated() {
const { update } = this.$route.params;
if (update) {
this.onInftxmSearch();
}
},
methods: {
handleReset() {
this.root.$refs.modelForm.resetFields();
},
onSearch() {
this.model.pageSize = 5;
this.model.pageNum = 1;
this.onInftxmSearch();
},
onInftxmSearch() {
queryByPage(this.model).then((res) => {
const list = res.list;
this.txmData = 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.onInftxmSearch();
},
txmAdd() {
this.$router.push(`/statics/dbatxm`);
},
txmInfo(index, row) {
this.$router.push(`/statics/dbitxm/${row.inr}`);
},
txmEdit(index, row) {
this.$router.push(`/statics/dbetxm/${row.inr}`);
},
txmDelete(index, row) {
this.$router.push(`/statics/dbdtxm/${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>
<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: "StaticsInftxm",
components: {
"m-infsea": Infsea,
},
provide() {
return {
root: this,
};
},
data() {
return {
tabVal: "infsea",
model: {
etgextkey: "",
nam: "",
uil: "",
pageSize: 5,
pageNum: 1,
total: 0,
},
};
},
};
</script>
<style>
</style>
...@@ -63,6 +63,12 @@ import Dbaatx from "./Dbaatx"; ...@@ -63,6 +63,12 @@ import Dbaatx from "./Dbaatx";
import Dbeatx from "./Dbeatx"; import Dbeatx from "./Dbeatx";
import Dbdatx from "./Dbdatx"; import Dbdatx from "./Dbdatx";
import Inftxm from "~/views/Statics/Inftxm";
import Dbitxm from "~/views/Statics/Dbitxm";
import Dbatxm from "~/views/Statics/Dbatxm";
import Dbetxm from "~/views/Statics/Dbetxm";
import Dbdtxm from "~/views/Statics/Dbdtxm";
const StaticsRouter = [ const StaticsRouter = [
{ path: 'infpty', component: Infpty, name: 'StaticsInfpty', meta: { title: '客户查询' } }, { path: 'infpty', component: Infpty, name: 'StaticsInfpty', meta: { title: '客户查询' } },
{ path: 'dbapty', component: Dbapty, name: 'StaticsDbapty', meta: { title: '客户新增' } }, { path: 'dbapty', component: Dbapty, name: 'StaticsDbapty', meta: { title: '客户新增' } },
...@@ -128,6 +134,11 @@ const StaticsRouter = [ ...@@ -128,6 +134,11 @@ const StaticsRouter = [
{ path: 'dbiatx/:inr', component: Dbiatx, name: 'StaticsDbiatx', meta: { title: (tag) => { return '保函文本详情: ' + tag.params.inr } } }, { path: 'dbiatx/:inr', component: Dbiatx, name: 'StaticsDbiatx', meta: { title: (tag) => { return '保函文本详情: ' + tag.params.inr } } },
{ path: 'dbeatx/:inr', component: Dbeatx, name: 'StaticsDbeatx', meta: { title: (tag) => { return '保函文本修改: ' + tag.params.inr } } }, { path: 'dbeatx/:inr', component: Dbeatx, name: 'StaticsDbeatx', meta: { title: (tag) => { return '保函文本修改: ' + tag.params.inr } } },
{ path: 'dbdatx/:inr', component: Dbdatx, name: 'StaticsDbdatx', meta: { title: (tag) => { return '保函文本删除: ' + tag.params.inr } } }, { path: 'dbdatx/:inr', component: Dbdatx, name: 'StaticsDbdatx', meta: { title: (tag) => { return '保函文本删除: ' + tag.params.inr } } },
{ path: 'dbitxm/:inr', component: Dbitxm, name: 'StaticsDbitxm', meta: { title: (tag) => { return '固定格式文详情: ' + tag.params.inr } } },
{ path: 'dbatxm', component: Dbatxm, name: 'StaticsDbatxm', meta: { title: '固定格式文本新增' } },
{ path: 'dbetxm/:inr', component: Dbetxm, name: 'StaticsDbetxm', meta: { title: (tag) => { return '固定格式文修改: ' + tag.params.inr } } },
{ path: 'dbdtxm/:inr', component: Dbdtxm, name: 'StaticsDbdtxm', meta: { title: (tag) => { return '固定格式文删除: ' + tag.params.inr } } },
] ]
export default StaticsRouter 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