|
@@ -28,6 +28,18 @@
|
|
|
:disabled="detailData.status == 1">
|
|
|
</el-switch>
|
|
|
</template>
|
|
|
+ <!-- <template slot="paritiesType">
|
|
|
+ <avue-select v-model="form.paritiesType" placeholder="请选择汇率类型" :disabled="detailData.status == 1"
|
|
|
+ :dic="typeData" @change="paritiesChange"></avue-select>
|
|
|
+ </template> -->
|
|
|
+ <template slot="annual">
|
|
|
+ <avue-date v-model="form.annual" placeholder="请选择汇率年度" :disabled="detailData.status == 1" type="year"
|
|
|
+ @change="annualChange" valueFormat="yyyy"></avue-date>
|
|
|
+ </template>
|
|
|
+ <template v-if="form.paritiesType == '日汇率'" slot="moon">
|
|
|
+ <avue-select v-model="form.moon" placeholder="请选择月份" :disabled="detailData.status == 1" :dic="MoonData"
|
|
|
+ @change="MoonChange"></avue-select>
|
|
|
+ </template>
|
|
|
<template slot="button">
|
|
|
<el-button v-if="form.code != 'CNY'" size="small" type="primary" @click="createExRate"
|
|
|
:disabled="detailData.status == 1 || dataList.length != 0">产生汇率项目</el-button>
|
|
@@ -39,14 +51,13 @@
|
|
|
<basic-container v-if="form.code != 'CNY'">
|
|
|
<avue-crud ref="crud" v-model="crudForm" :option="optionList" id="out-table" :search.sync="search"
|
|
|
:header-cell-class-name="headerClassName" :data="dataList" :table-loading="loading" :cell-style="cellStyle"
|
|
|
- @row-save="rowSave" @row-update="rowUpdate" @search-change="searchChange" @search-reset="resetChange">
|
|
|
- <!--<template slot="menuLeft">-->
|
|
|
- <!-- <el-button-->
|
|
|
- <!-- type="danger" plain-->
|
|
|
- <!-- size="small"-->
|
|
|
- <!-- @click.stop="BatchDelete"-->
|
|
|
- <!-- >批量删除</el-button>-->
|
|
|
- <!--</template>-->
|
|
|
+ @row-save="rowSave" @row-update="rowUpdate" @search-change="searchChange" @search-reset="resetChange"
|
|
|
+ @selection-change="selectionChange">
|
|
|
+
|
|
|
+ <template slot="menuLeft">
|
|
|
+ <el-button type="danger" size="small" @click.stop="BatchDelete"
|
|
|
+ :disabled="detailData.status == 1 || selectionList.length == 0">一键删除</el-button>
|
|
|
+ </template>
|
|
|
<template v-if="!row.$cellEdit" slot="menu" slot-scope="{row}">
|
|
|
<el-button type="text" size="small" @click="editFun(row)">编辑
|
|
|
</el-button>
|
|
@@ -67,6 +78,70 @@ export default {
|
|
|
name: "detailsPage",
|
|
|
data() {
|
|
|
return {
|
|
|
+ typeData: [
|
|
|
+ {
|
|
|
+ label: "年汇率",
|
|
|
+ value: "年汇率"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "月汇率",
|
|
|
+ value: "月汇率"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "日汇率",
|
|
|
+ value: "日汇率"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ MoonData: [
|
|
|
+ {
|
|
|
+ label: "一月",
|
|
|
+ value: 1
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "二月",
|
|
|
+ value: 2
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "三月",
|
|
|
+ value: 3
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "四月",
|
|
|
+ value: 4
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "五月",
|
|
|
+ value: 5
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "六月",
|
|
|
+ value: 6
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "七月",
|
|
|
+ value: 7
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "八月",
|
|
|
+ value: 8
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "九月",
|
|
|
+ value: 9
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "十月",
|
|
|
+ value: 10
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "十一月",
|
|
|
+ value: 11
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "十二月",
|
|
|
+ value: 12
|
|
|
+ },
|
|
|
+ ],
|
|
|
time: "",
|
|
|
search: {
|
|
|
annual: '2024'
|
|
@@ -189,71 +264,8 @@ export default {
|
|
|
{
|
|
|
label: "月份",
|
|
|
prop: "moon",
|
|
|
- type: "select",
|
|
|
- filterable: true,
|
|
|
- props: {
|
|
|
- label: "dictValue",
|
|
|
- value: "dictKey"
|
|
|
- },
|
|
|
- dicData: [
|
|
|
- {
|
|
|
- dictValue: "一月",
|
|
|
- dictKey: 1
|
|
|
- },
|
|
|
- {
|
|
|
- dictValue: "二月",
|
|
|
- dictKey: 2
|
|
|
- },
|
|
|
- {
|
|
|
- dictValue: "三月",
|
|
|
- dictKey: 3
|
|
|
- },
|
|
|
- {
|
|
|
- dictValue: "四月",
|
|
|
- dictKey: 4
|
|
|
- },
|
|
|
- {
|
|
|
- dictValue: "五月",
|
|
|
- dictKey: 5
|
|
|
- },
|
|
|
- {
|
|
|
- dictValue: "六月",
|
|
|
- dictKey: 6
|
|
|
- },
|
|
|
- {
|
|
|
- dictValue: "七月",
|
|
|
- dictKey: 7
|
|
|
- },
|
|
|
- {
|
|
|
- dictValue: "八月",
|
|
|
- dictKey: 8
|
|
|
- },
|
|
|
- {
|
|
|
- dictValue: "九月",
|
|
|
- dictKey: 9
|
|
|
- },
|
|
|
- {
|
|
|
- dictValue: "十月",
|
|
|
- dictKey: 10
|
|
|
- },
|
|
|
- {
|
|
|
- dictValue: "十一月",
|
|
|
- dictKey: 11
|
|
|
- },
|
|
|
- {
|
|
|
- dictValue: "十二月",
|
|
|
- dictKey: 12
|
|
|
- },
|
|
|
- ],
|
|
|
span: 6,
|
|
|
display: false,
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: " ",
|
|
|
- trigger: "change"
|
|
|
- }
|
|
|
- ]
|
|
|
},
|
|
|
{
|
|
|
label: "状态",
|
|
@@ -308,18 +320,58 @@ export default {
|
|
|
this.optionList.height = 450;
|
|
|
},
|
|
|
methods: {
|
|
|
+ selectionChange(list) {
|
|
|
+ this.selectionList = list
|
|
|
+ },
|
|
|
+ // paritiesChange(row) {
|
|
|
+ // let obj = {
|
|
|
+ // current: 1,
|
|
|
+ // size: 20,
|
|
|
+ // type: row,
|
|
|
+ // code: this.form.code,
|
|
|
+ // exrateYear: this.form.annual,
|
|
|
+
|
|
|
+ // }
|
|
|
+ // if (row == "日汇率") {
|
|
|
+ // this.findObject(this.option.column, "moon").display = true;
|
|
|
+ // this.search.annual = this.form.annual
|
|
|
+ // this.search.moon = this.form.moon
|
|
|
+ // this.search.paritiesType = row
|
|
|
+ // } else if (row == "月汇率") {
|
|
|
+ // this.findObject(this.option.column, "moon").display = false;
|
|
|
+ // this.search.annual = this.form.annual
|
|
|
+ // this.search.moon = null
|
|
|
+ // this.form.moon=null
|
|
|
+ // this.search.paritiesType = row
|
|
|
+ // } else {
|
|
|
+ // this.findObject(this.option.column, "moon").display = false;
|
|
|
+ // this.search.annual = this.form.annual
|
|
|
+ // this.search.moon = null
|
|
|
+ // this.form.moon=null
|
|
|
+ // this.search.paritiesType = row
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ annualChange(row) {
|
|
|
+ this.search.annual = row
|
|
|
+ this.search.moon = this.form.moon
|
|
|
+ this.search.paritiesType = this.form.paritiesType
|
|
|
+ this.searchChange(this.search)
|
|
|
+ },
|
|
|
+ MoonChange(row) {
|
|
|
+ this.search.annual = this.form.annual
|
|
|
+ this.search.moon = row
|
|
|
+ this.search.paritiesType = this.form.paritiesType
|
|
|
+ this.searchChange(this.search)
|
|
|
+ },
|
|
|
searchChange(params, done) {
|
|
|
- console.log(params)
|
|
|
- if (params.paritiesType == "日汇率") {
|
|
|
- this.findObject(this.option.column, "moon").display = true;
|
|
|
- // this.findObject(this.option.column, "annual").display = false;
|
|
|
- } else if (params.paritiesType == "月汇率") {
|
|
|
- this.findObject(this.option.column, "moon").display = false;
|
|
|
- // this.findObject(this.option.column, "annual").display = false;
|
|
|
- } else {
|
|
|
- this.findObject(this.option.column, "moon").display = false;
|
|
|
- // this.findObject(this.option.column, "annual").display = true;
|
|
|
- }
|
|
|
+ // if (params.paritiesType == "日汇率") {
|
|
|
+ // this.findObject(this.option.column, "moon").display = true;
|
|
|
+ // // this.findObject(this.option.column, "annual").display = false;
|
|
|
+ // } else {
|
|
|
+ // this.findObject(this.option.column, "moon").display = false;
|
|
|
+
|
|
|
+ // // this.findObject(this.option.column, "annual").display = true;
|
|
|
+ // }
|
|
|
let obj = {
|
|
|
current: 1,
|
|
|
size: 35,
|
|
@@ -332,7 +384,6 @@ export default {
|
|
|
this.dataList = res.data.data.records;
|
|
|
done();
|
|
|
})
|
|
|
-
|
|
|
},
|
|
|
resetChange() {
|
|
|
|
|
@@ -367,7 +418,7 @@ export default {
|
|
|
})
|
|
|
bcurexrateDetails(arrId.join(',')).then(res => {
|
|
|
this.$message.success('操作成功')
|
|
|
- this.getDetail(this.form.id)
|
|
|
+ this.searchChange(this.search)
|
|
|
})
|
|
|
})
|
|
|
},
|
|
@@ -394,9 +445,6 @@ export default {
|
|
|
.then(res => {
|
|
|
this.form = res.data.data
|
|
|
this.form.annual = this.form.annual + ''
|
|
|
- // this.dataList = res.data.data.curExrateList
|
|
|
- // ? res.data.data.curExrateList
|
|
|
- // : [];
|
|
|
})
|
|
|
.finally(() => {
|
|
|
this.allloading = false;
|
|
@@ -486,11 +534,11 @@ export default {
|
|
|
if (valid) {
|
|
|
this.toggleForm();
|
|
|
const loading = this.$loading({
|
|
|
- lock: true,
|
|
|
- text: '加载中',
|
|
|
- spinner: 'el-icon-loading',
|
|
|
- background: 'rgba(255,255,255,0.7)'
|
|
|
- });
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
// 拿有id 的数据
|
|
|
// let arrId = []
|
|
|
// for (let item of this.dataList) {
|
|
@@ -655,55 +703,60 @@ export default {
|
|
|
this.search.annual = this.form.annual
|
|
|
this.search.moon = this.form.moon
|
|
|
this.search.paritiesType = row
|
|
|
- this.searchChange(this.search)
|
|
|
+ // this.searchChange(this.search)
|
|
|
+ // console.log("日汇率", this.search)
|
|
|
// this.findObject(this.option.column, "annual").display = false;
|
|
|
} else if (row == "月汇率") {
|
|
|
this.findObject(this.option.column, "moon").display = false;
|
|
|
this.search.annual = this.form.annual
|
|
|
- this.search.moon = ''
|
|
|
+ this.search.moon = null
|
|
|
+ this.form.moon=null
|
|
|
this.search.paritiesType = row
|
|
|
- this.searchChange(this.search)
|
|
|
+ // this.searchChange(this.search)
|
|
|
+ // console.log("月汇率", this.search)
|
|
|
// this.findObject(this.option.column, "annual").display = false;
|
|
|
} else {
|
|
|
- this.findObject(this.option.column, "moon").display = false;
|
|
|
+ // this.findObject(this.option.column, "moon").display = false;
|
|
|
this.search.annual = this.form.annual
|
|
|
- this.search.moon = ''
|
|
|
+ this.search.moon = null
|
|
|
+ this.form.moon=null
|
|
|
this.search.paritiesType = row
|
|
|
- this.searchChange(this.search)
|
|
|
+ // this.searchChange(this.search)
|
|
|
+ // console.log("年汇率", this.search)
|
|
|
// this.findObject(this.option.column, "annual").display = true;
|
|
|
}
|
|
|
- // if (this.form.code) {
|
|
|
- // // 查明细信息
|
|
|
- // bcurexrateList(obj).then(res => {
|
|
|
- // this.dataList = res.data.data.records;
|
|
|
- // })
|
|
|
- // }
|
|
|
- },
|
|
|
- deep: false, // 深度监听
|
|
|
- immediate: false // 第一次改变就执行
|
|
|
- },
|
|
|
- "form.annual": {
|
|
|
- // 执行方法
|
|
|
- handler(row, newValue) {
|
|
|
- this.search.annual = row
|
|
|
- this.search.moon = this.form.moon
|
|
|
- this.search.paritiesType = this.form.paritiesType
|
|
|
- this.searchChange(this.search)
|
|
|
- },
|
|
|
- deep: false, // 深度监听
|
|
|
- immediate: false // 第一次改变就执行
|
|
|
- },
|
|
|
- "form.moon": {
|
|
|
- // 执行方法
|
|
|
- handler(row, newValue) {
|
|
|
- this.search.annual = this.form.annual
|
|
|
- this.search.moon = row
|
|
|
- this.search.paritiesType = this.form.paritiesType
|
|
|
- this.searchChange(this.search)
|
|
|
+
|
|
|
+ if (this.form.code) {
|
|
|
+ // 查明细信息
|
|
|
+ obj={...obj,...this.search}
|
|
|
+ this.searchChange(obj)
|
|
|
+ }
|
|
|
},
|
|
|
deep: false, // 深度监听
|
|
|
immediate: false // 第一次改变就执行
|
|
|
},
|
|
|
+ // "form.annual": {
|
|
|
+ // // 执行方法
|
|
|
+ // handler(row, newValue) {
|
|
|
+ // this.search.annual = row
|
|
|
+ // this.search.moon = this.form.moon
|
|
|
+ // this.search.paritiesType = this.form.paritiesType
|
|
|
+ // this.searchChange(this.search)
|
|
|
+ // },
|
|
|
+ // deep: false, // 深度监听
|
|
|
+ // immediate: false // 第一次改变就执行
|
|
|
+ // },
|
|
|
+ // "form.moon": {
|
|
|
+ // // 执行方法
|
|
|
+ // handler(row, newValue) {
|
|
|
+ // this.search.annual = this.form.annual
|
|
|
+ // this.search.moon = row
|
|
|
+ // this.search.paritiesType = this.form.paritiesType
|
|
|
+ // this.searchChange(this.search)
|
|
|
+ // },
|
|
|
+ // deep: false, // 深度监听
|
|
|
+ // immediate: false // 第一次改变就执行
|
|
|
+ // },
|
|
|
"search.paritiesType": {
|
|
|
handler(row, newValue) {
|
|
|
|