|
@@ -29,21 +29,17 @@
|
|
|
</el-switch>
|
|
|
</template>
|
|
|
<template slot="button">
|
|
|
- <el-button size="small" type="primary" @click="createExRate"
|
|
|
+ <el-button v-if="form.code != 'CNY'" size="small" type="primary" @click="createExRate"
|
|
|
:disabled="detailData.status == 1 || dataList.length != 0">产生汇率项目</el-button>
|
|
|
+ <div v-else></div>
|
|
|
</template>
|
|
|
</avue-form>
|
|
|
</basic-container>
|
|
|
- <containerTitle title="基础明细"></containerTitle>
|
|
|
- <basic-container>
|
|
|
- <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
|
|
- <el-tab-pane label="年" name="年汇率"></el-tab-pane>
|
|
|
- <el-tab-pane label="月" name="月汇率"></el-tab-pane>
|
|
|
- <el-tab-pane label="日" name="日汇率"></el-tab-pane>
|
|
|
- </el-tabs>
|
|
|
- <avue-crud ref="crud" v-model="crudForm" :option="optionList" id="out-table"
|
|
|
+ <containerTitle v-if="form.code != 'CNY'" title="基础明细"></containerTitle>
|
|
|
+ <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" @selection-change="selectionChange">
|
|
|
+ @row-save="rowSave" @row-update="rowUpdate" @search-change="searchChange" @search-reset="resetChange">
|
|
|
<!--<template slot="menuLeft">-->
|
|
|
<!-- <el-button-->
|
|
|
<!-- type="danger" plain-->
|
|
@@ -72,6 +68,9 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
time: "",
|
|
|
+ search: {
|
|
|
+ annual:'2024'
|
|
|
+ },
|
|
|
crudForm: {},
|
|
|
loading: false,
|
|
|
allloading: false,
|
|
@@ -288,7 +287,6 @@ export default {
|
|
|
},
|
|
|
optionList: optionList,
|
|
|
selectionList: [],
|
|
|
- activeName: '月汇率'
|
|
|
};
|
|
|
},
|
|
|
props: {
|
|
@@ -310,8 +308,34 @@ export default {
|
|
|
this.optionList.height = 450;
|
|
|
},
|
|
|
methods: {
|
|
|
- handleClick(row) {
|
|
|
- this.form.paritiesType = this.activeName
|
|
|
+ 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;
|
|
|
+ }
|
|
|
+ let obj = {
|
|
|
+ current: 1,
|
|
|
+ size: 35,
|
|
|
+ type: params.paritiesType,
|
|
|
+ code: this.form.code,
|
|
|
+ exrateYear: params.annual,
|
|
|
+ exrateMonth: params.moon
|
|
|
+ }
|
|
|
+ bcurexrateList(obj).then(res => {
|
|
|
+ this.dataList = res.data.data.records;
|
|
|
+ done();
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
+ resetChange() {
|
|
|
+
|
|
|
},
|
|
|
// 编辑明细
|
|
|
editFun(row) {
|
|
@@ -360,9 +384,6 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
- selectionChange(list) {
|
|
|
- this.selectionList = list;
|
|
|
- },
|
|
|
cellStyle() {
|
|
|
return "padding:0;height:40px;";
|
|
|
},
|
|
@@ -592,77 +613,65 @@ export default {
|
|
|
},
|
|
|
watch: {
|
|
|
"form.paritiesType": {
|
|
|
- // 执行方法
|
|
|
- handler(row, newValue) {
|
|
|
- console.log(row)
|
|
|
- this.activeName=row
|
|
|
- let obj = {
|
|
|
- current: 1,
|
|
|
- size: 20,
|
|
|
- type: row,
|
|
|
- code: this.form.code,
|
|
|
- exrateYear: this.form.annual,
|
|
|
-
|
|
|
- }
|
|
|
- if(row=='日汇率'){
|
|
|
- obj.exrateMonth=this.form.moon
|
|
|
- }
|
|
|
- if (row == "日汇率") {
|
|
|
- this.findObject(this.option.column, "moon").display = true;
|
|
|
- // this.findObject(this.option.column, "annual").display = false;
|
|
|
- } else if (row == "月汇率") {
|
|
|
- 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 (this.form.code) {
|
|
|
- // 查明细信息
|
|
|
- bcurexrateList(obj).then(res => {
|
|
|
- this.dataList = res.data.data.records;
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
- deep: false, // 深度监听
|
|
|
- immediate: false // 第一次改变就执行
|
|
|
- },
|
|
|
- "form.annual": {
|
|
|
- // 执行方法
|
|
|
- handler(row, newValue) {
|
|
|
- let obj = {
|
|
|
- current: 1,
|
|
|
- size: 20,
|
|
|
- type: this.form.paritiesType,
|
|
|
- code: this.form.code,
|
|
|
- exrateYear: row
|
|
|
- }
|
|
|
- if (this.form.code) {
|
|
|
- // 查明细信息
|
|
|
- bcurexrateList(obj).then(res => {
|
|
|
- this.dataList = res.data.data.records;
|
|
|
- })
|
|
|
- }
|
|
|
+ // 执行方法
|
|
|
+ handler(row, newValue) {
|
|
|
+ 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.findObject(this.option.column, "annual").display = false;
|
|
|
+ } else if (row == "月汇率") {
|
|
|
+ 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 (this.form.code) {
|
|
|
+ // // 查明细信息
|
|
|
+ // bcurexrateList(obj).then(res => {
|
|
|
+ // this.dataList = res.data.data.records;
|
|
|
+ // })
|
|
|
+ // }
|
|
|
},
|
|
|
deep: false, // 深度监听
|
|
|
immediate: false // 第一次改变就执行
|
|
|
},
|
|
|
- "form.moon":{
|
|
|
+ // "form.annual": {
|
|
|
+ // // 执行方法
|
|
|
+ // handler(row, newValue) {
|
|
|
+ // let obj = {
|
|
|
+ // current: 1,
|
|
|
+ // size: 20,
|
|
|
+ // type: this.form.paritiesType,
|
|
|
+ // code: this.form.code,
|
|
|
+ // exrateYear: row
|
|
|
+ // }
|
|
|
+ // // if (this.form.code) {
|
|
|
+ // // // 查明细信息
|
|
|
+ // // bcurexrateList(obj).then(res => {
|
|
|
+ // // this.dataList = res.data.data.records;0
|
|
|
+ // // })
|
|
|
+ // // }
|
|
|
+ // },
|
|
|
+ // deep: false, // 深度监听
|
|
|
+ // immediate: false // 第一次改变就执行
|
|
|
+ // },
|
|
|
+ "search.paritiesType": {
|
|
|
handler(row, newValue) {
|
|
|
- let obj = {
|
|
|
- current: 1,
|
|
|
- size: 20,
|
|
|
- type: this.form.paritiesType,
|
|
|
- code: this.form.code,
|
|
|
- exrateYear: row,
|
|
|
- exrateMonth:this.form.moon
|
|
|
-
|
|
|
- }
|
|
|
- if (this.form.code) {
|
|
|
- // 查明细信息
|
|
|
- bcurexrateList(obj).then(res => {
|
|
|
- this.dataList = res.data.data.records;
|
|
|
- })
|
|
|
+ console.log(row)
|
|
|
+ if (row == "日汇率") {
|
|
|
+ this.findObject(this.optionList.column, "moon").search = true;
|
|
|
+ // this.findObject(this.option.column, "annual").display = false;
|
|
|
+ } else{
|
|
|
+ this.findObject(this.optionList.column, "moon").search = false;
|
|
|
+ // this.findObject(this.option.column, "annual").display = false;
|
|
|
}
|
|
|
},
|
|
|
deep: false, // 深度监听
|