Commit 6899907e by FuYuXi

1.xrt更新

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