Commit 9d270f40 by WH

dbizmq修改

parent dd92526e
import Api from "~/service/Api"
export function queryByPage(data) {
return Api.post("/service/xrt/queryByPage", data)
}
export function queryById(data) {
return Api.post(`/service/xrt/queryById`,data)
}
export function add(data) {
return Api.post("/service/xrt/add", data)
}
export function edit(data) {
return Api.post("/service/xrt/edit", data)
}
export function deleteById(data) {
return Api.post(`/service/xrt/deleteById`,data)
}
export function queryByCUR(data){
return Api.post("/service/xrt/queryByCUR",data)
}
import Api from "~/service/Api"
export function queryByPage(data) {
return Api.post("/service/zmqxrt/queryByPage", data)
}
export function queryById(inr) {
return Api.post(`/service/zmqxrt/queryById?inr=${inr}`)
}
export function add(data) {
return Api.post("/service/zmqxrt/add", data)
}
export function edit(data) {
return Api.post("/service/zmqxrt/edit", data)
}
export function deleteById(inr) {
return Api.post(`/service/zmqxrt/deleteById?inr=${inr}`)
}
export function queryDetailById(inr) {
return Api.post(`/service/zmqxrt/queryDetailById?inr=${inr}`)
}
\ No newline at end of file
......@@ -329,6 +329,18 @@ import Dbausr from "~/views/Statics/Dbausr";
import Dbiusr from "~/views/Statics/Dbiusr";
import Dbeusr from "~/views/Statics/Dbeusr";
import Dbdusr from "~/views/Statics/Dbdusr";
import Dbazmq from "~/views/Statics/Zmqxrt/views/Dbazmq";
import Dbdzmq from "~/views/Statics/Zmqxrt/views/Dbdzmq";
import Dbezmq from "~/views/Statics/Zmqxrt/views/Dbezmq";
import Dbizmqxrt from "~/views/Statics/Zmqxrt/views/Dbizmqxrt";
import Dblzmq from "~/views/Statics/Zmqxrt/views/Dblzmq";
import Infxrt from "~/views/Statics/Xrt/views/Infxrt";
import Dblxrt from "~/views/Statics/Xrt/views/Dblxrt";
import Dbaxrt from "~/views/Statics/Xrt/views/Dbaxrt";
import Dbexrt from "~/views/Statics/Xrt/views/Dbexrt";
import Dbdxrt from "~/views/Statics/Xrt/views/Dbdxrt";
/**
* 带有name的才会被添加进顶部的标签页里
*/
......@@ -673,5 +685,17 @@ const BusRouter = [
{ 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: 'dbdusr/:inr', component: Dbdusr, name: 'StaticsDbdusr', meta: { title: (tag) => { return '柜员删除: ' + tag.params.inr } } },
{ path: 'dblzmq', component: Dblzmq, name: 'StaticsDblzmq', meta: { title: '自贸区牌价查询' } },
{ path: 'dbazmq', component: Dbazmq, name: 'StaticsDbazmq', meta: { title: '自贸区牌价新增' } },
{ path: 'dbizmqxrt/:inr', component: Dbizmqxrt, name: 'StaticsDbizmqxrt', meta: { title: (tag) => { return '自贸区牌价详情: ' + tag.params.inr } } },
{ path: 'dbezmq/:inr', component: Dbezmq, name: 'StaticsDbezmq', meta: { title: (tag) => { return '自贸区牌价编辑: ' + tag.params.inr } } },
{ path: 'dbdzmq/:inr', component: Dbdzmq, name: 'StaticsDbdzmq', meta: { title: (tag) => { return '自贸区牌价删除: ' + tag.params.inr } } },
{ path: 'infxrt', component: Infxrt, name: 'StaticsInfxrt', meta: { title: '牌价查询' } },
{ 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 BusRouter
\ No newline at end of file
......@@ -63,6 +63,18 @@ import Dbaatx from "./Dbaatx";
import Dbeatx from "./Dbeatx";
import Dbdatx from "./Dbdatx";
import Dbazmq from "./Zmqxrt/views/Dbazmq";
import Dbdzmq from "./Zmqxrt/views/Dbdzmq";
import Dbezmq from "./Zmqxrt/views/Dbezmq";
import Dbizmqxrt from "./Zmqxrt/views/Dbizmqxrt";
import Dblzmq from "./Zmqxrt/views/Dblzmq";
import Infxrt from "./Xrt/views/Infxrt";
import Dblxrt from "./Xrt/views/Dblxrt";
import Dbaxrt from "./Xrt/views/Dbaxrt";
import Dbexrt from "./Xrt/views/Dbexrt";
import Dbdxrt from "./Xrt/views/Dbdxrt";
const StaticsRouter = [
{ path: 'infpty', component: Infpty, name: 'StaticsInfpty', meta: { title: '客户查询' } },
{ path: 'dbapty', component: Dbapty, name: 'StaticsDbapty', meta: { title: '客户新增' } },
......@@ -87,6 +99,12 @@ const StaticsRouter = [
{ path: 'dbecty/:inr', component: Dbecty, name: 'StaticsDbecty', meta: { title: (tag) => { return '国家代码修改: ' + tag.params.inr } } },
{ path: 'dbdcty/:inr', component: Dbdcty, name: 'StaticsDbdcty', meta: { title: (tag) => { return '国家代码删除: ' + tag.params.inr } } },
{ path: 'dblzmq', component: Dblzmq, name: 'StaticsDblzmq', meta: { title: '自贸区牌价查询' } },
{ path: 'dbazmq', component: Dbazmq, name: 'StaticsDbazmq', meta: { title: '自贸区牌价新增' } },
{ path: 'dbizmqxrt/:inr', component: Dbizmqxrt, name: 'StaticsDbizmqxrt', meta: { title: (tag) => { return '自贸区牌价详情: ' + tag.params.inr } } },
{ path: 'dbezmq/:inr', component: Dbezmq, name: 'StaticsDbezmq', meta: { title: (tag) => { return '自贸区牌价编辑: ' + tag.params.inr } } },
{ path: 'dbdzmq/:inr', component: Dbdzmq, name: 'StaticsDbdzmq', meta: { title: (tag) => { return '自贸区牌价删除: ' + tag.params.inr } } },
{ path: 'inffec', component: Inffec, name: 'StaticsInffec', meta: { title: '费率查询' } },
{ path: 'dbafec', component: Dbafec, name: 'StaticsDbafec', meta: { title: '费率新增' } },
{ path: 'dbifec/:inr', component: Dbifec, name: 'StaticsDbifec', meta: { title: (tag) => { return '费率详情: ' + tag.params.inr } } },
......@@ -128,6 +146,12 @@ const StaticsRouter = [
{ 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: 'dbdatx/:inr', component: Dbdatx, name: 'StaticsDbdatx', meta: { title: (tag) => { return '保函文本删除: ' + tag.params.inr } } },
{ path: 'infxrt', component: Infxrt, name: 'StaticsInfxrt', meta: { title: '牌价查询' } },
{ 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 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: "string", trigger: "blur" },
{ max: 8, message: "最大长度8位", trigger: "blur" },
],
selrat: [
{ required: true, message: "必输项", type: "string", trigger: "blur" },
{ max: 8, message: "最大长度8位", trigger: "blur" },
],
buyrat: [
{ required: true, message: "必输项", type: "string", trigger: "blur" },
{ max: 8, message: "最大长度8位", trigger: "blur" },
],
sel1rat: [
{ required: true, message: "必输项", type: "string", trigger: "blur" },
{ max: 8, message: "最大长度8位", trigger: "blur" },
],
buy1rat: [
{ required: true, message: "必输项", type: "string", trigger: "blur" },
{ max: 8, message: "最大长度8位", trigger: "blur" },
],
ttrrat: [
{ required: true, message: "必输项", type: "string", trigger: "blur" },
{ max: 8, message: "最大长度8位", trigger: "blur" },
],
odrrat: [
{ required: true, message: "必输项", type: "string", trigger: "blur" },
{ max: 8, message: "最大长度8位", trigger: "blur" },
],
resrat: [
{ required: true, message: "必输项", type: "string", trigger: "blur" },
{ max: 8, message: "最大长度8位", trigger: "blur" },
],
rebrat: [
{ required: true, message: "必输项", type: "string", trigger: "blur" },
{ max: 8, message: "最大长度8位", trigger: "blur" },
],
ibrrat: [
{ required: true, message: "必输项", type: "string", trigger: "blur" },
{ max: 8, message: "最大长度8位", trigger: "blur" },
],
}
;
<template>
<m-xrt ref="xrt" title="dbaxrt" type="add"></m-xrt>
</template>
<script>
import Dblxrt from "../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 "../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 "../Dblxrt";
export default {
name: "StaticsDbexrt",
components: {
"m-xrt": Dblxrt
},
data() {
return {};
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<div class="eibs-tab">
<c-col :span="16" class="col-left" v-if="type != 'add'">
<!-- 绑定的数据 -->
<el-table
:data="xrtCURData"
style="width: 100%"
>
<!--:default-sort = "{prop: 'date', order: 'descending'}"-->
<el-table-column
prop="xrttim"
label="日末牌价"
width="auto">
</el-table-column>
<el-table-column
prop="midrat"
label="中间汇率"
sortable
width="auto">
</el-table-column>
<el-table-column
prop="selrat"
label="卖出汇率"
sortable
width="auto">
</el-table-column>
<el-table-column
prop="buyrat"
label="买入汇率"
sortable
width="aoto">
</el-table-column>
</el-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";
export default {
name: "",
entyGrp: [],
props: ["model","type"],
data() {
return {
xrtCURData: [],
};
},
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="xrt">
<c-content>
<m-xrt-info ref="xrt" :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 "../../model/Xrt";
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;
queryByCUR(this.model).then(res =>{
this.$refs.xrt.xrtCURData = 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: 'auto' },
{ label: '日期时间', prop: 'xrttim', width: 'auto' },
{ label: '中间汇率', prop: 'midrat', width: 'auto' },
{ label: '买入汇率', prop: 'buyrat', width: 'auto' },
{ label: '卖出汇率', prop: 'selrat', width: 'auto' },
],
};
},
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>
export default class Zmqxrt {
constructor() {
this.data = {
inr: "",
cur: "",
begdat: "",
enddat: "",
buyrat: "",
midrat: "",
selrat: "",
ttrrat: "",
odrrat: "",
ver: "",
resrat: "",
rebrat: "",
ibrrat: "",
sel1rat: "",
buy1rat: "",
etgextkey: "CEBGRP",
xrttim: "",
caozbz: "",
canssm: "",
}
}
}
export const Pattern = {
"inr": [
{ "type": "string", "trigger": "blur" },
{ "max": 8, "message": "最大长度8个字符", "trigger": "blur" }
],
"cur": [
{ "type": "string", "trigger": "blur" },
{ "max": 3, "message": "最大长度3个字符", "trigger": "blur" }
],
"begdat": [
{ "type": "date", "trigger": "blur" }
],
"enddat": [
{ "type": "date", "trigger": "blur" }
],
"buyrat": [
{ "trigger": "blur" },
{ "pattern": /^-?\d{0,14}(\.\d{1,6})?$/, "message": "整数不能超过14位,小数不能超过6位", "trigger": "blur" }
],
"midrat": [
{ "trigger": "blur" },
{ "pattern": /^-?\d{0,14}(\.\d{1,6})?$/, "message": "整数不能超过14位,小数不能超过6位", "trigger": "blur" }
],
"selrat": [
{ "trigger": "blur" },
{ "pattern": /^-?\d{0,14}(\.\d{1,6})?$/, "message": "整数不能超过14位,小数不能超过6位", "trigger": "blur" }
],
"ttrrat": [
{ "trigger": "blur" },
{ "pattern": /^-?\d{0,14}(\.\d{1,6})?$/, "message": "整数不能超过14位,小数不能超过6位", "trigger": "blur" }
],
"odrrat": [
{ "trigger": "blur" },
{ "pattern": /^-?\d{0,14}(\.\d{1,6})?$/, "message": "整数不能超过14位,小数不能超过6位", "trigger": "blur" }
],
"ver": [
{ "type": "string", "trigger": "blur" },
{ "max": 4, "message": "最大长度4个字符", "trigger": "blur" }
],
"resrat": [
{ "trigger": "blur" },
{ "pattern": /^-?\d{0,14}(\.\d{1,6})?$/, "message": "整数不能超过14位,小数不能超过6位", "trigger": "blur" }
],
"rebrat": [
{ "trigger": "blur" },
{ "pattern": /^-?\d{0,14}(\.\d{1,6})?$/, "message": "整数不能超过14位,小数不能超过6位", "trigger": "blur" }
],
"ibrrat": [
{ "trigger": "blur" },
{ "pattern": /^-?\d{0,14}(\.\d{1,6})?$/, "message": "整数不能超过14位,小数不能超过6位", "trigger": "blur" }
],
"sel1rat": [
{ "trigger": "blur" },
{ "pattern": /^-?\d{0,14}(\.\d{1,6})?$/, "message": "整数不能超过14位,小数不能超过6位", "trigger": "blur" }
],
"buy1rat": [
{ "trigger": "blur" },
{ "pattern": /^-?\d{0,14}(\.\d{1,6})?$/, "message": "整数不能超过14位,小数不能超过6位", "trigger": "blur" }
],
"etgextkey": [
{ "type": "string", "trigger": "blur" },
{ "max": 8, "message": "最大长度8个字符", "trigger": "blur" }
],
"xrttim": [
{ "type": "string", "trigger": "blur" },
{ "max": 20, "message": "最大长度20个字符", "trigger": "blur" }
],
"caozbz": [
{ "type": "string", "trigger": "blur" },
{ "max": 1, "message": "最大长度1个字符", "trigger": "blur" }
],
// "zmqxrt_cur": [
// ],
}
<template>
<m-zmqxrt ref="zmq" title="dbazmq" type="add"></m-zmqxrt>
</template>
<script>
import Dbizmqxrt from "../Dbizmqxrt";
export default {
name: "StaticsDbizmqxrt",
components: {
"m-zmqxrt": Dbizmqxrt
},
data() {
return {};
},
mounted() {
// this.$refs.pty.rules['ptaList'] = [
// { type: 'array', required: true, min: 1, message: '地址信息栏不能为空' }
// ]
}
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<m-zmqxrt ref="zmq" title="dbezmq" type="delete"></m-zmqxrt>
</template>
<script>
import Dbizmqxrt from "../Dbizmqxrt";
export default {
name: "StaticsDbezmq",
components: {
"m-zmqxrt": Dbizmqxrt
},
data() {
return {};
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<m-zmqxrt ref="zmq" title="dbezmq" type="edit"></m-zmqxrt>
</template>
<script>
import Dbizmqxrt from "../Dbizmqxrt";
export default {
name: "StaticsDbezmq",
components: {
"m-zmqxrt": Dbizmqxrt
},
data() {
return {
rules:{required:false}
};
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<div class="eibs-tab">
<c-row>
<c-col :span="12" class="col-left">
<c-col :span="24">
<el-form-item label="币种" prop="cur">
<c-select
v-model="model.cur"
style="width: 100%"
placeholder="请选择币种类型"
:code="getCodesByKey('cur')"
></c-select>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item
label="开始日期"
prop="model.begdat"
style="width: 100%"
>
<c-col :span="11">
<c-date-picker
type="date"
v-model="model.begdat"
style="width: 100%"
placeholder="请选择起始日期"
value-format="yyyy-MM-dd"
></c-date-picker>
</c-col>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item
label="终止日期"
prop="model.enddat"
style="width: 100%"
>
<c-col :span="11">
<c-date-picker
type="date"
v-model="model.enddat"
style="width: 100%"
placeholder="请选择终止日期"
value-format="yyyy-MM-dd"
></c-date-picker>
</c-col>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="买入价" prop="buyrat">
<c-input-currency
v-model="model.buyrat"
placeholder="请输入买入价"
>
</c-input-currency>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="中间价" prop="midrat">
<c-input-currency
v-model="model.midrat"
placeholder="请输入中间价"
>
</c-input-currency>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="卖出价" prop="selrat">
<c-input-currency
v-model="model.selrat"
placeholder="请输入卖出价"
>
</c-input-currency>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="ttrrat" prop="ttrrat">
<c-input-currency
v-model="model.ttrrat"
placeholder="请输入ttrrat"
>
</c-input-currency>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="odrrat" prop="odrrat">
<c-input-currency
v-model="model.odrrat"
placeholder="请输入odrrat"
>
</c-input-currency>
</el-form-item>
</c-col>
</c-col>
<c-col :span="12" class="col-right">
<c-col :span="24">
<el-form-item label="resrat" prop="resrat">
<c-input-currency
v-model="model.resrat"
placeholder="请输入resrat"
>
</c-input-currency>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="rebrat" prop="rebrat">
<c-input-currency
v-model="model.rebrat"
placeholder="请输入rebrat"
>
</c-input-currency>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="ibrrat" prop="ibrrat">
<c-input-currency
v-model="model.ibrrat"
placeholder="请输入ibrrat"
>
</c-input-currency>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="sel1rat" prop="sel1rat">
<c-input-currency
v-model="model.sel1rat"
placeholder="请输入sel1rat"
>
</c-input-currency>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="buy1rat" prop="buy1rat">
<c-input-currency
v-model="model.buy1rat"
placeholder="请输入buy1rat"
>
</c-input-currency>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="实体组代码" prop="etgextkey">
<c-input
v-model="model.etgextkey"
placeholder="请输入实体组代码"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="牌价时间" prop="xrttim">
<c-input
v-model="model.xrttim"
placeholder="请输入牌价时间"
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="caozbz" prop="caozbz">
<c-select
v-model="model.caozbz"
placeholder="请输入caozbz"
:code="getCodesByKey('caozbz')"
>
</c-select>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="canssm" prop="canssm">
<c-input
v-model="model.canssm"
placeholder="请输入canssm"
>
</c-input>
</el-form-item>
</c-col>
</c-col>
</c-row>
<!-- <c-col :span="24">-->
<!-- </c-col>-->
</div>
</template>
<script>
import codes from "~/config/CodeTable";
export default {
name: "zmqxrt",
props: ["model"],
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="180px"
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" @tab-click="changePosition">
<el-tab-pane label="自贸区牌价信息" name="zmqxrt">
<c-content>
<m-zmqxrt-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 Zmqxrt, { Pattern } from "../../model/Zmqxrt";
import ZmqxrtInfo from "./ZmqxrtInfo.vue";
import {queryDetailById, queryByPage, queryById, add, edit, deleteById } from "~/service/test/zmqxrt.js";
export default {
name: "StaticsDbizmqxrt",
components: {
"m-zmqxrt-info": ZmqxrtInfo,
},
provide() {
return {
root: this,
};
},
props: {
type: {
type: String,
default: "info"
},
title: {
type: String,
default: "dbizmqxrt"
}
},
data() {
return {
model: new Zmqxrt().data,
tabVal: "zmqxrt",
rules: Pattern,
tabPosition:"tab-zmqxrt",
};
},
computed: {
isDisabled() {
return this.type === "info" || this.type === "delete";
},
},
created() {
debugger
if (this.type !== "add") {
const inr = this.$route.params.inr;
this.model.inr = this.$route.params.inr;
console.log(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) {
if(this.tabPosition===`tab-zmqxrt`){
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(() => {
if(this.tabPosition===`tab-zmqxrt`){
deleteById(this.model.inr)
.then((res) => {
debugger
this.$message.success("自贸区牌价信息删除成功!");
this.goBack(true)
})
.catch((err) => {
this.$message.error("自贸区牌价信息删除失败!");
})};
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
},
/**
* update 是否更新dblzmq的查询列表
*/
goBack(update) {
this.$store.dispatch("TagsView/delView", this.$route);
this.$router.push({ name: "StaticsDblzmq", params: { update } });
},
changePosition(tab,event){
this.tabPosition=event.target.getAttribute('id');
console.log(this.tabPosition)
},
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<div class="eibs-tab">
<!-- ----------左 ---------->
<c-col :span="24">
<el-form-item label="币种" prop="cur">
<c-select
v-model="model.cur"
placeholder="请选择币种"
:code="getCodesByKey('cur')"
></c-select>
</el-form-item>
</c-col>
<c-col :span="12" class="col-left">
<!-- <c-col :span="24">-->
<!-- <el-form-item label="BEGDAT" prop="BEGDAT">-->
<!-- <c-input-->
<!-- v-model="model.BEGDAT"-->
<!-- placeholder="请输入BEGDAT"-->
<!-- ></c-input>-->
<!-- </el-form-item>-->
<!-- </c-col>-->
<c-col :span="24">
<el-form-item
label="开始日期"
prop="model.begdat"
style="width: 100%"
>
<c-col :span="11">
<c-date-picker
type="date"
v-model="model.begdat"
style="width: 100%"
placeholder="请选择起始日期"
value-format="yyyy-MM-dd"
></c-date-picker>
</c-col>
</el-form-item>
</c-col>
</c-col>
<!------------- 右 ---------->
<c-col :span="12" class="col-right">
<c-col :span="24">
<!-- <el-form-item label="Party No." prop="extkey">-->
<!-- <c-input-->
<!-- v-model="model.extkey"-->
<!-- maxlength="24"-->
<!-- placeholder="请输入Party No."-->
<!-- ></c-input>-->
<!-- </el-form-item>-->
</c-col>
<c-col :span="24">
<el-form-item
label="结束日期"
prop="model.enddat"
style="width: 100%"
>
<c-col :span="11">
<c-date-picker
type="date"
v-model="model.enddat"
style="width: 100%"
placeholder="请选择结束日期"
value-format="yyyy-MM-dd"
></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="zmqxrtAdd" :disabled="model.cur===''" >新增</el-button>-->
<el-button type="primary" size="small" @click="zmqxrtAdd" >新增</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="zmqxrtData"
:columns="zmqxrtColumns"
: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="zmqxrtInfo(scope.$index, scope.row)"
>详情</c-button
>
<c-button
style="margin-left: 5px"
size="small"
type="primary"
@click="zmqxrtEdit(scope.$index, scope.row)"
>修改</c-button
>
<c-button
size="small"
style="margin-left: 5px"
@click="zmqxrtDelete(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/zmqxrt.js";
export default {
name: "",
props: ["model"],
inject: ["root"],
data() {
return {
zmqxrtData: [],
zmqxrtColumns: [
{ label: 'INR', prop: 'inr', width: '120' },
{ label: '币种', prop: 'cur', width: '120' },
{ label: '起始日期', prop: 'begdat', width: '150' },
{ label: '终止日期', prop: 'enddat', width: '200' },
{ label: '买入价', prop: 'buyrat', width: '100' },
{ label: '中间价', prop: 'midrat', width: '200' },
{ label: '卖出价', prop: 'selrat', width: '98' },
// { label: 'TTRRAT', prop: 'ttrrat', width: '98' },
// { label: 'ODRRAT', prop: 'odrrat', width: '200' },
// { label: 'VER', prop: 'ver', width: '120' },
// { label: 'RESRAT', prop: 'resrat', width: '200' },
// { label: 'REBRAT', prop: 'rebrat', width: '98' },
// { label: 'IBRRAT', prop: 'ibrrat', width: '200' },
// { label: 'SEL1RAT', prop: 'sel1rat', width: '100' },
// { label: 'BUY1RAT', prop: 'buy1rat', width: '150' },
{ label: '实体组代码', prop: 'etgextkey', width: '120' },
{ label: '牌价时间', prop: 'xrttim', width: '98' },
// { label: 'CAOZBZ', prop: 'caozbz', width: '98' },
// { label: 'CANSSM', prop: 'canssm', width: '98' },
],
};
},
computed: {
seatypb: {
get: function () {
return this.model.zmqxrttyp === "B";
},
set: function (val) {
this.model.zmqxrttyp = val ? "B" : "";
},
},
seatypc: {
get: function () {
return this.model.zmqxrttyp === "C";
},
set: function (val) {
this.model.zmqxrttyp = val ? "C" : "";
},
},
seatypa: {
get: function () {
return this.model.zmqxrttyp === "A";
},
set: function (val) {
this.model.zmqxrttyp = val ? "A" : "";
},
},
seatypo: {
get: function () {
return this.model.zmqxrttyp === "O";
},
set: function (val) {
this.model.zmqxrttyp = val ? "O" : "";
},
},
seatyph: {
get: function () {
return this.model.zmqxrttyp === "H";
},
set: function (val) {
this.model.zmqxrttyp = val ? "H" : "";
},
},
},
activated() {
const { update } = this.$route.params
if (update) {
this.onInfzmqxrtSearch()
}
},
methods: {
handleReset() {
this.root.$refs.modelForm.resetFields();
},
onSearch(){
this.model.pageNum = 1;
this.model.pageSize = 5;
this.onInfzmqxrtSearch();
},
onInfzmqxrtSearch() {
queryByPage(this.model).then(res => {
/**
* pageNumber: 0
* pageSize: 0
* total: 69
* totalPage: 0
*/
const list = res.list
this.zmqxrtData = 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.onInfzmqxrtSearch()
},
zmqxrttypeChange(val) {
this.model.zmqxrttyp = val;
},
getCodesByKey(key) {
return codes[key] ?? [];
},
zmqxrtAdd() {
this.$router.push(`/statics/dbazmq`)
},
zmqxrtInfo(index, row) {
this.$router.push(`/statics/dbizmqxrt/${row.inr}`)
},
zmqxrtEdit(index, row) {
this.$router.push(`/statics/dbezmq/${row.inr}`)
},
zmqxrtDelete(index, row) {
this.$router.push(`/statics/dbdzmq/${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">
<!--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: "StaticsDblzmq",
components: {
"m-infsea": Infsea,
},
provide() {
return {
//cur: model.cur,
root: this,
};
},
data() {
return {
tabVal: "infsea",
model: {
inr:"",
cur:"",
begdat:"",
enddat:"",
// paging
pageNum: 1,
pageSize: 5,
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