Commit 599dc1eb by lei wang

tdh前端代码提交

parent d1211671
import Api from "~/service/Api"
export function queryByPage(data) {
return Api.post("/manager/tdh/queryByPage", data)
}
export function queryById(data) {
return Api.post(`/manager/tdh/queryById`, data)
}
export function queryDetailById(data) {
return Api.post(`/manager/tdh/queryDetailById`, data)
}
export function add(data) {
return Api.post("/manager/tdh/add", data)
}
export function edit(data) {
return Api.post("/manager/tdh/edit", data)
}
export function deleteById(data) {
return Api.post(`/manager/tdh/deleteById`, data)
}
\ No newline at end of file
......@@ -369,6 +369,16 @@ import Dbdapf from "~/views/Statics/Dbdapf";
import Inftxm2 from "~/views/Statics/Inftxm";
import Infdia from "~/views/Statics/Infdia";
import Dbidia from "~/views/Statics/Dbidia";
import Dbadia from "~/views/Statics/Dbadia";
import Dbedia from "~/views/Statics/Dbedia";
import Dbddia from "~/views/Statics/Dbddia";
import Inftdh from "~/views/Statics/Inftdh";
import Dbitdh from "~/views/Statics/Dbitdh";
import Dbatdh from "~/views/Statics/Dbatdh";
import Dbetdh from "~/views/Statics/Dbetdh";
import Dbdtdh from "~/views/Statics/Dbdtdh";
/**
* 带有name的才会被添加进顶部的标签页里
*/
......@@ -740,11 +750,11 @@ const BusRouter = [
{ path: 'dbefee/:inr', component: Dbefee, name: 'StaticsDbefee', meta: { title: (tag) => { return '费用代码修改: ' + tag.params.inr } } },
{ path: 'dbdfee/:inr', component: Dbdfee, name: 'StaticsDbdfee', meta: { title: (tag) => { return '费用代码删除: ' + tag.params.inr } } },
{ path: 'infdia', component: Infdia, name: 'StaticsInfact', meta: { title: '交易备忘录查询' } },
{ path: 'dbadia', component: Dbaact, name: 'StaticsDbaact', meta: { title: '交易备忘录新增' } },
{ 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: 'infdia', component: Infdia, name: 'StaticsInfdia', meta: { title: '交易备忘录查询' } },
{ path: 'dbadia', component: Dbadia, name: 'StaticsDbadia', meta: { title: '交易备忘录新增' } },
{ path: 'dbidia/:inr', component: Dbidia, name: 'StaticsDbidia', meta: { title: (tag) => { return '交易备忘录详情: ' + tag.params.inr } } },
{ path: 'dbedia/:inr', component: Dbedia, name: 'StaticsDbedia', meta: { title: (tag) => { return '交易备忘录修改: ' + tag.params.inr } } },
{ path: 'dbddia/:inr', component: Dbddia, name: 'StaticsDbddia', meta: { title: (tag) => { return '交易备忘录删除: ' + tag.params.inr } } },
{ path: 'infcup', component: Infcup, name: 'StaticsInfcup', meta: { title: '查询申报币种信息' } },
{ path: 'dbacup', component: Dbacup, name: 'StaticsDbacup', meta: { title: '新增申报币别信息' } },
......@@ -756,5 +766,11 @@ const BusRouter = [
{ 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 } } },
{ path: 'inftdh', component: Inftdh, name: 'StaticsInftdh', meta: { title: '节假日查询' } },
{ path: 'dbatdh', component: Dbatdh, name: 'StaticsDbatdh', meta: { title: '节假日新增' } },
{ path: 'dbitdh/:inr', component: Dbitdh, name: 'StaticsDbitdh', meta: { title: (tag) => { return '节假日详情: ' + tag.params.inr } } },
{ path: 'dbetdh/:inr', component: Dbetdh, name: 'StaticsDbetdh', meta: { title: (tag) => { return '节假日修改: ' + tag.params.inr } } },
{ path: 'dbdtdh/:inr', component: Dbdtdh, name: 'StaticsDbdtdh', meta: { title: (tag) => { return '节假日删除: ' + tag.params.inr } } },
]
export default BusRouter
\ No newline at end of file
......@@ -204,6 +204,7 @@ export default {
{ inifrm: "infdia", ininam: "交易备忘录查询", pntmiu: "10" },
{ inifrm: "inftxm2", ininam: "固定格式文本查询", pntmiu: "10"},
{ inifrm: "infcup", ininam: "查询申报币种信息", pntmiu: "10"},
{ inifrm: "inftdh", ininam: "节假日查询", pntmiu: "10"},
// { inifrm: "gitset", ininam: "进口保函赔付", pntmiu: "13" },
// { inifrm: "gitcrq", ininam: "进口保函索赔登记", pntmiu: "13" },
{ inifrm: "14", ininam: "服务管理", pntmiu: "" },
......
<template>
<m-tdh title="dbatdh" type="add"></m-tdh>
</template>
<script>
import Dbitdh from "~/views/Statics/Dbitdh";
export default {
name: "StaticsDbatdh",
components: {
"m-tdh": Dbitdh
},
data() {
return {};
},
mounted() {
}
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<m-tdh title="dbdtdh" type="delete"></m-tdh>
</template>
<script>
import Dbitdh from "~/views/Statics/Dbitdh";
export default {
name: "StaticsDbdtdh",
components: {
"m-tdh": Dbitdh
},
data() {
return {};
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<m-tdh title="dbetdh" type="edit"></m-tdh>
</template>
<script>
import Dbitdh from "~/views/Statics/Dbitdh";
export default {
name: "StaticsDbetdh",
components: {
"m-tdh": Dbitdh
},
data() {
return {};
},
};
</script>
<style>
</style>
\ No newline at end of file
export default class Tdh {
constructor() {
this.data = {
inr: "",
calyear: "",
calendarName: "",
calendar: "",
ver: "",
dat: "",
dateday: "",
}
}
}
export const Pattern = {
"calyear": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
],
}
<template>
<div class="eibs-tab">
<!-- =============================================左边=========================================== -->
<c-col :span="12" class="col-left">
<c-col :span="24">
<el-form-item label="日期" prop="dat">
<c-input v-model="model.dat" style="width: 100%" placeholder="请输入日期"> </c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="日历代码" prop="calendar">
<c-input :disabled="type === 'edit'" v-model="model.calendar" placeholder="请输入日历代码" style="width: 100%">
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="年份" prop="calyear">
<c-select :disabled="type === 'edit'" v-model="model.calyear" placeholder="请选择年份">
</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="dateday">
<c-input v-model="model.ownrefDesc" style="width: 100%" placeholder="请输入dateday"> </c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="日历名称" prop="ownrefDesc">
<c-input :disabled="type === 'edit'" v-model="model.ownrefDesc" style="width: 100%" placeholder="请输入日历名称"> </c-input>
</el-form-item>
</c-col>
</c-col>
</div>
</template>
<script>
import codes from "~/config/CodeTable";
export default {
name: '',
props: ['model', 'type'],
data() {
return {
}
},
mounted() {},
methods: {
getCodesByKey(key) {
return codes[key] ?? [];
},
},
}
</script>
<style></style>
<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="tdh">
<c-content>
<m-tdh-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 Tdh, { Pattern } from "./Tdh.js";
import TdhInfo from "./TdhInfo.vue";
import { queryById, add, edit, deleteById, queryDetailById } from "~/service/test/tdh.js";
export default {
name: "StaticsDbitdh",
components: {
"m-tdh-info": TdhInfo,
},
provide() {
return {
root: this,
};
},
props: {
type: {
type: String,
default: "info"
},
title: {
type: String,
default: "dbitdh"
}
},
data() {
return {
model: new Tdh().data,
tabVal: "tdh",
rules: Pattern,
};
},
computed: {
isDisabled() {
return this.type === "info" || this.type === "delete";
},
},
created() {
if (this.type !== "add") {
const data = {"inr":this.$route.params.inr};
queryDetailById(data).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) => {
console.log('返回结果'+res.messsage);
if (res.messsage !== null && Object.keys(res.messsage).length > 0) {
this.$message.error(res.messsage)
} else {
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(() => {
let data = {"inr":this.model.inr}
deleteById(data)
.then((res) => {
this.$message.success("删除成功!");
this.goBack(true)
})
.catch((err) => {
this.$message.error("删除失败!");
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
},
/**
* update 是否更新inftdh的查询列表
*/
goBack(update) {
this.$store.dispatch("TagsView/delView", this.$route);
this.$router.push({ name: "StaticsInftdh", 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="日历代码" prop="calendar">
<c-input v-model="model.calendar" placeholder="请输入日历代码" style="width: 100%">
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="年份" prop="calyear">
<c-select v-model="model.calyear" placeholder="请选择年份">
</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="calendarName">
<c-input v-model="model.calendarName" placeholder="请输入日历名称" style="width: 100%">
</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="tdhAdd">新增</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="tdhData"
:columns="tdhColumns"
: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="tdhInfo(scope.$index, scope.row)"
>详情</c-button
>
<c-button
style="margin-left: 5px"
size="small"
type="primary"
@click="tdhEdit(scope.$index, scope.row)"
>修改</c-button
>
<c-button
size="small"
style="margin-left: 5px"
@click="tdhDelete(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 { format } from "path";
import codes from "~/config/CodeTable";
import { queryByPage } from "~/service/test/tdh.js";
export default {
name: "",
props: ["model"],
inject: ["root"],
data() {
return {
tdhData: [],
tdhColumns: [
{ label: '日期', prop: 'dat', width: 'auto' },
{ label: '节日名', prop: 'dateday', width: 'auto' }
],
};
},
computed: {
},
activated() {
const { update } = this.$route.params
if (update) {
this.onInftdhSearch()
}
},
methods: {
getCodesByKey(key) {
return codes[key] ?? [];
},
handleReset() {
this.root.$refs.modelForm.resetFields();
},
onSearch() {
this.model.pageSize = 5;
this.model.pageNum = 1;
this.onInftdhSearch();
},
onInftdhSearch() {
queryByPage(this.model).then(res => {
const list = res.list
this.tdhData = 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.onInftdhSearch()
},
tdhtypeChange(val) {
this.model.fectyp = val;
},
tdhCodesByKey(key) {
return codes[key] ?? [];
},
tdhAdd() {
this.$router.push(`/statics/dbatdh`)
},
tdhInfo(index, row) {
this.$router.push(`/statics/dbitdh/${row.inr}`)
},
tdhEdit(index, row) {
this.$router.push(`/statics/dbetdh/${row.inr}`)
},
tdhDelete(index, row) {
this.$router.push(`/statics/dbdtdh/${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: "StaticsInftdh",
components: {
"m-infsea": Infsea,
},
provide() {
return {
root: this,
};
},
data() {
return {
tabVal: "infsea",
model: {
cod: "",
pageSize:5,
pageNum:1,
total:0
},
};
},
};
</script>
<style>
</style>
\ No newline at end of file
......@@ -107,6 +107,12 @@ import Dbizmqxrt from "./Dbizmqxrt";
import Infbnk from "~/views/Statics/Infbnk";
import Dbibnk from "~/views/Statics/Dbibnk";
import Inftdh from "./Inftdh";
import Dbitdh from "./Dbitdh";
import Dbatdh from "./Dbatdh";
import Dbetdh from "./Dbetdh";
import Dbdtdh from "./Dbdtdh";
const StaticsRouter = [
{ path: 'dbiptm/:inr', component:Dbiptm, name: 'StaticsDbiptm', meta: { title: (tag) => { return '客户详情: ' + tag.params.inr } } },
......@@ -217,6 +223,12 @@ const StaticsRouter = [
{ path: 'dbibtb/:inr', component: DbiBtb, name: 'StaticsDbibtb', meta: { title: (tag) => { return '清算代理行详情: ' + tag.params.inr } } },
{ path: 'Indpts', component: Indpts, name: 'StaticsDbaatx', meta: { title: '客户管户机构管理' } },
{ path: 'inftdh', component: Inftdh, name: 'StaticsInftdh', meta: { title: '节假日查询' } },
{ path: 'dbatdh', component: Dbatdh, name: 'StaticsDbatdh', meta: { title: '节假日新增' } },
{ path: 'dbitdh/:inr', component: Dbitdh, name: 'StaticsDbitdh', meta: { title: (tag) => { return '节假日详情: ' + tag.params.inr } } },
{ path: 'dbetdh/:inr', component: Dbetdh, name: 'StaticsDbetdh', meta: { title: (tag) => { return '节假日修改: ' + tag.params.inr } } },
{ path: 'dbdtdh/:inr', component: Dbdtdh, name: 'StaticsDbdtdh', 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