Commit 15c8d93b by FuYuXi

1.xrt

parent 4c1d2dd2
import Api from "~/service/Api"
export function queryByPage(data) {
return Api.post("/manager/xrt/queryByPage", data)
}
export function queryById(data) {
return Api.post(`/manager/xrt/queryById`,data)
}
export function add(data) {
return Api.post("/manager/xrt/add", data)
}
export function edit(data) {
return Api.post("/manager/xrt/edit", data)
}
export function deleteById(data) {
return Api.post(`/manager/xrt/deleteById`,data)
}
export function queryByCUR(data){
return Api.post("/manager/xrt/edit",data)
}
...@@ -344,6 +344,7 @@ import Dbeusr from "~/views/Statics/Dbeusr"; ...@@ -344,6 +344,7 @@ import Dbeusr from "~/views/Statics/Dbeusr";
import Dbdusr from "~/views/Statics/Dbdusr"; import Dbdusr from "~/views/Statics/Dbdusr";
import Inftxm2 from "~/views/Statics/Inftxm"; import Inftxm2 from "~/views/Statics/Inftxm";
import Infxrt from "~/views/Statics/Infxrt";
/** /**
* 带有name的才会被添加进顶部的标签页里 * 带有name的才会被添加进顶部的标签页里
*/ */
...@@ -703,5 +704,6 @@ const BusRouter = [ ...@@ -703,5 +704,6 @@ const BusRouter = [
{ 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: '固定格式文本查询' } }, { path: 'inftxm2', component: Inftxm2, name: 'StaticsInftxm', meta: { title: '固定格式文本查询' } },
{ path: 'infxrt', component: Infxrt, name: 'StaticsInfxrt', meta: { title: '牌价查询' } },
] ]
export default BusRouter export default BusRouter
\ No newline at end of file
...@@ -201,6 +201,8 @@ export default { ...@@ -201,6 +201,8 @@ export default {
{ 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: "inftxm2", ininam: "固定格式文本查询", pntmiu: "10"},
{ inifrm: "infxrt", 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-xrt ref="xrt" title="dbaxrt" type="add"></m-xrt>
</template>
<script>
import Dblxrt from "~/views/Statics/Dblxrt";
export default {
name: "StaticsDbaxrt",
components: {
"m-xrt": Dblxrt
},
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-xrt title="dbdxrt" type="delete"></m-xrt>
</template>
<script>
import Dblxrt from "~/views/Statics/Dblxrt";
export default {
name: "StaticsDbdxrt",
components: {
"m-xrt": Dblxrt
},
data() {
return {};
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<m-xrt title="dbexrt" type="edit"></m-xrt>
</template>
<script>
import Dblxrt from "~/views/Statics/Dblxrt";
export default {
name: "StaticsDbexrt",
components: {
"m-xrt": Dblxrt
},
data() {
return {};
},
};
</script>
<style>
</style>
\ No newline at end of file
export default class Xrt {
constructor() {
this.data = {
// inr: "",
// extkey: "",
// nam: "",
// txt: "",
// uil: "",
// ver: "",
// etgextkey: "",
inr:"",
cur:"",
buyrat:"",
midrat:"",
selrat:"",
xrttim:"",
midrat:"",
selrat:"",
buyrat:"",
sel1rat:"",
buy1rat:"",
ttrrat:"",
odrrat:"",
resrat:"",
rebrat:"",
ibrrat:"",
};
}
}
export const Pattern = {
cur: [
{ required: true, message: "必输项", type: "string", trigger: "blur" },
{ max: 8, message: "最大长度8个字符", trigger: "blur" },
],
midrat: [
{ required: true, message: "必输项", type: "number", trigger: "blur" },
{ max: 8, message: "最大长度8位", trigger: "blur" },
],
selrat: [
{ required: true, message: "必输项", type: "number", trigger: "blur" },
{ max: 8, message: "最大长度8位", trigger: "blur" },
],
buyrat: [
{ required: true, message: "必输项", type: "number", trigger: "blur" },
{ max: 8, message: "最大长度8位", trigger: "blur" },
],
sel1rat: [
{ required: true, message: "必输项", type: "number", trigger: "blur" },
{ max: 8, message: "最大长度8位", trigger: "blur" },
],
buy1rat: [
{ required: true, message: "必输项", type: "number", trigger: "blur" },
{ max: 8, message: "最大长度8位", trigger: "blur" },
],
ttrrat: [
{ required: true, message: "必输项", type: "number", trigger: "blur" },
{ max: 8, message: "最大长度8位", trigger: "blur" },
],
odrrat: [
{ required: true, message: "必输项", type: "number", trigger: "blur" },
{ max: 8, message: "最大长度8位", trigger: "blur" },
],
resrat: [
{ required: true, message: "必输项", type: "number", trigger: "blur" },
{ max: 8, message: "最大长度8位", trigger: "blur" },
],
rebrat: [
{ required: true, message: "必输项", type: "number", trigger: "blur" },
{ max: 8, message: "最大长度8位", trigger: "blur" },
],
ibrrat: [
{ required: true, message: "必输项", type: "number", trigger: "blur" },
{ max: 8, message: "最大长度8位", trigger: "blur" },
],
}
;
<template>
<div class="eibs-tab">
<c-col :span="16" class="col-left" v-if="type != 'add'">
<!-- 绑定的数据 -->
<!-- <el-table
:data="tableData"
style="width: 100%"
:default-sort = "{prop: 'date', order: 'descending'}"
>
<el-table-column
prop="model."
label="日末牌价"
width="">
</el-table-column>
<el-table-column
prop="date"
label="中间汇率"
sortable
width="100px">
</el-table-column>
<el-table-column
prop="name"
label="卖出汇率"
sortable
width="100px">
</el-table-column>
<el-table-column
prop="name"
label="买入汇率"
sortable
width="100px">
</el-table-column>
</el-table> -->
<c-paging-table
:data="xrtCURData"
:columns="xrtCURColumns"
v-on:queryFunc="queryFunc"
:border="true"
>
</c-paging-table>
</c-col>
<c-col :span="8" class="col-right">
<el-form-item label="货币名称" prop="cur" v-if="type == 'add'">
<c-input v-model="model.cur" placeholder="请输入货币名称">
</c-input>
</el-form-item>
<el-form-item label="中间价" prop="midrat">
<c-input v-model="model.midrat" placeholder="请输入中间价">
</c-input>
</el-form-item>
<el-form-item label="买入价" prop="selrat">
<c-input v-model="model.selrat" placeholder="请输入买入价">
</c-input>
</el-form-item>
<el-form-item label="卖出价" prop="buyrat">
<c-input v-model="model.buyrat" placeholder="请输入卖出价">
</c-input>
</el-form-item>
<el-form-item label="现钞卖出价" prop="sel1rat">
<c-input v-model="model.sel1rat" placeholder="请输入现钞卖出价">
</c-input>
</el-form-item>
<el-form-item label="现钞买入价" prop="buy1rat">
<c-input v-model="model.buy1rat" placeholder="请输入现钞买入价">
</c-input>
</el-form-item>
<el-form-item label="指定买价" prop="ttrrat">
<c-input v-model="model.ttrrat" placeholder="请输入指定买价">
</c-input>
</el-form-item>
<el-form-item label="票据买断汇款" prop="odrrat">
<c-input v-model="model.odrrat" placeholder="请输入票据买断汇款">
</c-input>
</el-form-item>
<el-form-item label="卖出参考汇率" prop="resrat">
<c-input v-model="model.resrat" placeholder="请输入卖出参考汇率">
</c-input>
</el-form-item>
<el-form-item label="卖出参考汇率" prop="rebrat">
<c-input v-model="model.rebrat" placeholder="请输入卖出参考汇率">
</c-input>
</el-form-item>
<el-form-item label="报表折算价" prop="ibrrat">
<c-input v-model="model.ibrrat" placeholder="请输入报表折算价">
</c-input>
</el-form-item>
</c-col>
</div>
</template>
<script>
import codes from "~/config/CodeTable";
import { queryByCUR } from "~/service/test/xrt.js";
export default {
name: "",
entyGrp: [],
props: ["model","type"],
data() {
return {
xrtCURData: [],
xrtCURColumns: [
{ label: '货币名称', prop: 'cur', width: '120' },
{ label: '日期时间', prop: 'xrttim', width: '120' },
{ label: '中间汇率', prop: 'midrat', width: '120' },
{ label: '买入汇率', prop: 'buyrat', width: '120' },
{ label: '卖出汇率', prop: 'selrat', width: '120' },
],
};
},
methods: {
getCodesByKey(key) {
return codes[key] ?? [];
},
queryFunc(){
queryByCUR(this.model).then(res =>{
console.log(res)
})
}
},
};
</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="xrt">
<c-content>
<m-xrt-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 Xrt, { Pattern } from "./Xrt.js";
import XrtInfo from "./XrtInfo.vue";
import { queryById, add, edit, deleteById,queryByCUR} from "~/service/test/xrt.js";
export default {
name: "StaticsDblxrt",
components: {
"m-xrt-info": XrtInfo,
},
provide() {
return {
root: this,
};
},
props: {
type: {
type: String,
default: "info"
},
title: {
type: String,
default: "dblxrt"
}
},
data() {
return {
model: new Xrt().data,
tabVal: "xrt",
rules: Pattern,
};
},
computed: {
isDisabled() {
return this.type === "info" || this.type === "delete";
},
},
created() {
if (this.type !== "add") {
const params = this.$route.params;
// queryById(inr).then((res) => {
queryById(params).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(() => {
const params = this.$route.params;
deleteById(params)
.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: "StaticsInfxrt", params: { update } });
},
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<div class="eibs-tab">
<!-- ----------左 ---------->
<c-col :span="8" class="col-left">
<c-col :span="24">
<el-form-item label="货币类型" prop="cur">
<c-select
v-model="model.cur"
style="height:30px;"
placeholder="请选择货币类型"
:code="getCodesByKey('curtxt1')"
>
</c-select>
</el-form-item>
</c-col>
</c-col>
<!------------- 右 ---------->
<c-col :span="16" class="col-right">
<c-col :span="24">
<el-form-item label="时间区间" prop="opndatfrom" style="width: 100%">
<c-col :span="11">
<c-date-picker type="date" v-model="model.opndatfrom" value-format="yyyy-MM-dd" style="width: 100%" placeholder="请选择开始时间">
</c-date-picker>
</c-col>
<c-col :span="2" style="text-align: center">
<label style="display: inline-block; width: 100%">-</label>
</c-col>
<c-col :span="11">
<c-date-picker type="date" v-model="model.opndatto" value-format="yyyy-MM-dd" style="width: 100%" placeholder="请选择结束时间"></c-date-picker>
</c-col>
</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="xrtAdd">新增</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="xrtData"
:columns="xrtColumns"
: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="xrtInfo(scope.$index, scope.row)"
>详情</c-button
>
<c-button
style="margin-left: 5px"
size="small"
type="primary"
@click="xrtEdit(scope.$index, scope.row)"
>修改</c-button
>
<c-button
size="small"
style="margin-left: 5px"
@click="xrtDelete(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/xrt.js";
export default {
name: "",
props: ["model"],
inject: ["root"],
data() {
return {
xrtData: [],
xrtColumns: [
{ label: '货币名称', prop: 'cur', width: '120' },
{ label: '日期时间', prop: 'xrttim', width: '120' },
{ label: '中间汇率', prop: 'midrat', width: '120' },
{ label: '买入汇率', prop: 'buyrat', width: '120' },
{ label: '卖出汇率', prop: 'selrat', width: '120' },
],
};
},
computed: {
},
activated() {
const { update } = this.$route.params
if (update) {
this.onInfXrtSearch()
}
},
methods: {
handleReset() {
this.root.$refs.modelForm.resetFields();
},
onSearch(){
this.model.pageNum = 1;
this.model.pageSize = 5;
this.onInfXrtSearch();
},
onInfXrtSearch() {
queryByPage(this.model).then(res => {
const list = res.list
this.xrtData = 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.onInfXrtSearch()
},
getCodesByKey(key) {
return codes[key] ?? [];
},
xrtAdd() {
this.$router.push(`/statics/dbaxrt`)
},
xrtInfo(index, row) {
this.$router.push(`/statics/dblxrt/${row.inr}`)
},
xrtEdit(index, row) {
this.$router.push(`/statics/dbexrt/${row.inr}`)
},
xrtDelete(index, row) {
this.$router.push(`/statics/dbdxrt/${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: "StaticsInfxrt",
components: {
"m-infsea": Infsea,
},
provide() {
return {
root: this,
};
},
data() {
return {
tabVal: "infsea",
model: {
// // bch
// branch: "",
// etyexkey: "",
// bchkey: "",
// bchtyp: "",
//xrt
inr:"",
cur:"",
buyrat:"",
midrat:"",
selrat:"",
xrttim:"",
midrat:"",
selrat:"",
buyrat:"",
sel1rat:"",
buy1rat:"",
ttrrat:"",
odrrat:"",
resrat:"",
rebrat:"",
ibrrat:"",
opndatfrom:"",
opndatto:"",
// paging
pageNum: 1,
pageSize: 5,
total: 0
},
};
},
};
</script>
<style></style>
...@@ -69,6 +69,12 @@ import Dbatxm from "~/views/Statics/Dbatxm"; ...@@ -69,6 +69,12 @@ import Dbatxm from "~/views/Statics/Dbatxm";
import Dbetxm from "~/views/Statics/Dbetxm"; import Dbetxm from "~/views/Statics/Dbetxm";
import Dbdtxm from "~/views/Statics/Dbdtxm"; import Dbdtxm from "~/views/Statics/Dbdtxm";
import Dblxrt from "~/views/Statics/Dblxrt";
import Dbaxrt from "~/views/Statics/Dbaxrt";
import Dbexrt from "~/views/Statics/Dbexrt";
import Dbdxrt from "~/views/Statics/Dbdxrt";
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: '客户新增' } },
...@@ -139,6 +145,12 @@ const StaticsRouter = [ ...@@ -139,6 +145,12 @@ const StaticsRouter = [
{ path: 'dbatxm', component: Dbatxm, name: 'StaticsDbatxm', meta: { title: '固定格式文本新增' } }, { path: 'dbatxm', component: Dbatxm, name: 'StaticsDbatxm', meta: { title: '固定格式文本新增' } },
{ path: 'dbetxm/:inr', component: Dbetxm, name: 'StaticsDbetxm', meta: { title: (tag) => { return '固定格式文修改: ' + tag.params.inr } } }, { 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 } } }, { path: 'dbdtxm/:inr', component: Dbdtxm, name: 'StaticsDbdtxm', meta: { title: (tag) => { return '固定格式文删除: ' + tag.params.inr } } },
{ path: 'dblxrt/:inr', component: Dblxrt, name: 'StaticsDblxrt', meta: { title: (tag) => { return '牌价详情: ' + tag.params.inr } } },
{ path: 'dbaxrt', component: Dbaxrt, name: 'StaticsDbaxrt', meta: { title: '牌价新增' } },
{ path: 'dbexrt/:inr', component: Dbexrt, name: 'StaticsDbexrt', meta: { title: (tag) => { return '牌价修改: ' + tag.params.inr } } },
{ path: 'dbdxrt/:inr', component: Dbdxrt, name: 'StaticsDbdxrt', 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