Commit 3ceda9fc by 闫泽浩

Txm静态交易更新

parent aa1c2eb8
import Api from "~/service/Api";
export function queryByPage(data) {
return Api.post("/service/txm/queryByPage", data);
}
export function queryById(inr) {
return Api.post(`/service/txm/queryById`, { inr });
}
export function add(data) {
return Api.post("/service/txm/add", data);
}
export function edit(data) {
return Api.post("/service/txm/edit", data);
}
export function deleteById(inr) {
return Api.post(`/service/txm/deleteById`, { inr });
}
......@@ -95,7 +95,6 @@ import Botdcr from "./Botdcr"
import Botset from "./Botset"
import Botcan from "./Botcan"
import Infbpd from "./Infbpd"
import Inftxm from "./Inftxm"
import Bctdav from "./Bctdav"
import Bctcan from "./Bctcan"
import Infbcd from "./Infbcd"
......@@ -391,6 +390,13 @@ import Dbiswm from "~/views/Statics/Swm/views/Dbiswm";
import Infswm from "~/views/Statics/Swm/views/Infswm";
import Inftxm from "~/views/Statics/Txm/views/Inftxm";
import Dbitxm from "~/views/Statics/Txm/views/Dbitxm";
import Dbatxm from "~/views/Statics/Txm/views/Dbatxm";
import Dbetxm from "~/views/Statics/Txm/views/Dbetxm";
import Dbdtxm from "~/views/Statics/Txm/views/Dbdtxm";
/**
* 带有name的才会被添加进顶部的标签页里
......@@ -523,7 +529,7 @@ const BusRouter = [
{ path: 'brtcan', component: Brtcan, name: 'Brtcan', meta: { title: '进口信用证单据注销' } },
{ path: 'brtsnd', component: Brtsnd, name: 'Brtsnd', meta: { title: '进口信用证单据寄单' } },
{ path: 'inftxm', component: Inftxm, name: 'Inftxm', meta: { title: '条式语句查询' } },
// { path: 'inftxm', component: Inftxm, name: 'Inftxm', meta: { title: '条式语句查询' } },
// { path: 'infdet', component: Infdet, name: 'Infdet', meta: { title: 'Infdet' } },
{ path: 'infbod', component: Infbod, name: 'Infbod', meta: { title: '出口托收查询' } },
{ path: 'botsel', component: Botsel, name: 'Botsel', meta: { title: '出口托收入口交易Botsel' } },
......@@ -795,5 +801,11 @@ const BusRouter = [
{ path: 'dbeety/:inr', component: Dbeety, name: 'StaticsDbeety', meta: { title: (tag) => { return '实体修改: ' + tag.params.inr } } },
{ path: 'dbdety/:inr', component: Dbdety, name: 'StaticsDbdety', meta: { title: (tag) => { return '实体删除: ' + tag.params.inr } } },
{ path: 'inftxm', component: Inftxm, name: 'StaticsInftxm', meta: { title: '查询固定格式文本' } },
{ 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 BusRouter
\ No newline at end of file
......@@ -78,6 +78,12 @@ import Dbafec from "./Fec/views/Dbafec";
import Dbefec from "./Fec/views/Dbefec";
import Dbdfec from "./Fec/views/Dbdfec";
import Inftxm from "./Txm/views/Inftxm";
import Dbitxm from "./Txm/views/Dbitxm";
import Dbatxm from "./Txm/views/Dbatxm";
import Dbetxm from "./Txm/views/Dbetxm";
import Dbdtxm from "./Txm/views/Dbdtxm";
import Infgtx from "./Gtx/views/Infgtx";
import Dbigtx from "./Gtx/views/Dbigtx";
import Dbagtx from "./Gtx/views/Dbagtx";
......@@ -273,6 +279,12 @@ const StaticsRouter = [
{ path: 'dbeety/:inr', component: Dbeety, name: 'StaticsDbeety', meta: { title: (tag) => { return '实体修改: ' + tag.params.inr } } },
{ path: 'dbdety/:inr', component: Dbdety, name: 'StaticsDbdety', meta: { title: (tag) => { return '实体删除: ' + tag.params.inr } } },
{ path: 'inftxm', component: Inftxm, name: 'StaticsInftxm', meta: { title: '查询固定格式文本' } },
{ 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
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 });
}
<template>
<m-txm ref="txm" title="dbatxm" type="add"></m-txm>
</template>
<script>
import Dbitxm from "~/views/Statics/Txm/views/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/Txm/views/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/Txm/views/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" },
],
extkey: [
{ required: true, message: "必输项", type: "string", trigger: "blur" },
{ max: 17, message: "最大长度8个字符", trigger: "blur" },
],
nam: [
{ required: true, message: "必输项", type: "string", trigger: "blur" },
{ max: 40, message: "最大长度40个字符", trigger: "blur" },
],
uil: [
{ required: true, message: "必输项", type: "string", trigger: "blur" },
{ max: 2, message: "最大长度2个字符", trigger: "blur" },
],
etgextkey: [
{ 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="请输入主键" :disabled="type === 'edit'">
</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="条款模板关键字" prop="extkey">
<c-input v-model="model.extkey" placeholder="请输入条款模板关键字" :disabled="type === 'edit'">
</c-input>
</el-form-item>
<el-form-item label="语言" prop="uil" style="width:100%">
<c-select v-model="model.uil" style="width:100%" placeholder="请选择语言" :disabled="type === 'edit'">
<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) => {
if (res.inr) {
this.$message.success("修改成功!");
this.goBack(true)
} else {
this.$message.error("修改失败!");
}
})
.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) => {
if (res === true) {
this.$message.success("删除成功!");
this.goBack(true)
} else {
this.$message.error("删除失败,请刷新后再试");
}
})
.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="extkey" style="width:100%">
<c-input v-model="model.extkey" placeholder="请输入条款模板关键字" style="width: 100%">
</c-input>
</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 {
lang: CodeTable['uiltxt'],
txmData: [],
txmColumns: [
{ label: "条款模板关键字", prop: "extkey", width: "auto" },
{ label: "条款模板名称", prop: "nam", width: "auto" },
{ label: "条款模板内容", prop: "uil", width: "auto" },
{ label: "版本号", prop: "ver", 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();
},
langValue(key) {
return this.lang.filter(item => item.value === key)[0]?.label;
},
onInftxmSearch() {
this.model.etgextkey = 'CEBGRP';
queryByPage(this.model).then((res) => {
const list = res.list ?? [];
list.map(item => item.uil = this.langValue(item.uil) ?? item.uil);
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>
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