Commit 6899907e by FuYuXi

1.xrt更新

parent a595baf3
...@@ -21,6 +21,6 @@ export function deleteById(data) { ...@@ -21,6 +21,6 @@ export function deleteById(data) {
} }
export function queryByCUR(data){ export function queryByCUR(data){
return Api.post("/manager/xrt/edit",data) return Api.post("/manager/xrt/queryByCUR",data)
} }
...@@ -2,42 +2,36 @@ ...@@ -2,42 +2,36 @@
<div class="eibs-tab"> <div class="eibs-tab">
<c-col :span="16" class="col-left" v-if="type != 'add'"> <c-col :span="16" class="col-left" v-if="type != 'add'">
<!-- 绑定的数据 --> <!-- 绑定的数据 -->
<!-- <el-table <el-table
:data="tableData" :data="xrtCURData"
style="width: 100%" style="width: 100%"
:default-sort = "{prop: 'date', order: 'descending'}"
> >
<!--:default-sort = "{prop: 'date', order: 'descending'}"-->
<el-table-column <el-table-column
prop="model." prop="xrttim"
label="日末牌价" label="日末牌价"
width=""> width="auto">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="date" prop="midrat"
label="中间汇率" label="中间汇率"
sortable sortable
width="100px"> width="auto">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="name" prop="selrat"
label="卖出汇率" label="卖出汇率"
sortable sortable
width="100px"> width="auto">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="name" prop="buyrat"
label="买入汇率" label="买入汇率"
sortable sortable
width="100px"> width="aoto">
</el-table-column> </el-table-column>
</el-table> --> </el-table>
<c-paging-table
:data="xrtCURData"
:columns="xrtCURColumns"
v-on:queryFunc="queryFunc"
:border="true"
>
</c-paging-table>
</c-col> </c-col>
<c-col :span="8" class="col-right"> <c-col :span="8" class="col-right">
<el-form-item label="货币名称" prop="cur" v-if="type == 'add'"> <el-form-item label="货币名称" prop="cur" v-if="type == 'add'">
...@@ -90,7 +84,6 @@ ...@@ -90,7 +84,6 @@
<script> <script>
import codes from "~/config/CodeTable"; import codes from "~/config/CodeTable";
import { queryByCUR } from "~/service/test/xrt.js";
export default { export default {
name: "", name: "",
...@@ -99,25 +92,12 @@ export default { ...@@ -99,25 +92,12 @@ export default {
data() { data() {
return { return {
xrtCURData: [], 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: { methods: {
getCodesByKey(key) { getCodesByKey(key) {
return codes[key] ?? []; return codes[key] ?? [];
}, },
queryFunc(){
queryByCUR(this.model).then(res =>{
console.log(res)
})
}
}, },
}; };
</script> </script>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<c-tabs v-model="tabVal" ref="elment" type="card"> <c-tabs v-model="tabVal" ref="elment" type="card">
<el-tab-pane label="具体牌价信息" name="xrt"> <el-tab-pane label="具体牌价信息" name="xrt">
<c-content> <c-content>
<m-xrt-info :model="model" :type="type"/> <m-xrt-info ref="xrt" :model="model" :type="type"/>
</c-content> </c-content>
</el-tab-pane> </el-tab-pane>
</c-tabs> </c-tabs>
...@@ -67,6 +67,9 @@ export default { ...@@ -67,6 +67,9 @@ export default {
queryById(params).then((res) => { queryById(params).then((res) => {
if (res.inr) { if (res.inr) {
this.model = res; this.model = res;
queryByCUR(this.model).then(res =>{
this.$refs.xrt.xrtCURData = res;
})
} else { } else {
this.$message.error("该信息不存在") this.$message.error("该信息不存在")
} }
...@@ -109,7 +112,7 @@ export default { ...@@ -109,7 +112,7 @@ export default {
commitDelete() { commitDelete() {
this.$confirm("是否确认删除?", "提示", { this.$confirm("是否确认删除?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
......
...@@ -114,11 +114,11 @@ export default { ...@@ -114,11 +114,11 @@ export default {
return { return {
xrtData: [], xrtData: [],
xrtColumns: [ xrtColumns: [
{ label: '货币名称', prop: 'cur', width: '120' }, { label: '货币名称', prop: 'cur', width: 'auto' },
{ label: '日期时间', prop: 'xrttim', width: '120' }, { label: '日期时间', prop: 'xrttim', width: 'auto' },
{ label: '中间汇率', prop: 'midrat', width: '120' }, { label: '中间汇率', prop: 'midrat', width: 'auto' },
{ label: '买入汇率', prop: 'buyrat', width: '120' }, { label: '买入汇率', prop: 'buyrat', width: 'auto' },
{ label: '卖出汇率', prop: 'selrat', width: '120' }, { label: '卖出汇率', prop: 'selrat', width: 'auto' },
], ],
}; };
}, },
......
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