Commit 960d6e05 authored by 我在何方's avatar 我在何方

Merge branch 'release2.2' of...

Merge branch 'release2.2' of http://gitlab.jdshangmen.com/jiedao-app/jiedao-app-operator into release2.2
parents 4b8538e4 4f5a7776
......@@ -5,13 +5,13 @@
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="$t('币种1')" prop="sourceCurrencyId">
<el-select v-model="queryParams.sourceCurrencyId" :placeholder="$t('请选择币种')" clearable size="small">
<el-option v-for="dict in currencyList"
<el-option v-if="dict.status === 0" v-for="dict in currencyList"
:key="dict.id" :label="$l(dict,'title') + dict.fuhao" :value="dict.id" />
</el-select>
</el-form-item>
<el-form-item :label="$t('币种2')" prop="targetCurrencyId">
<el-select v-model="queryParams.targetCurrencyId" :placeholder="$t('请选择币种')" clearable size="small">
<el-option v-for="dict in currencyList"
<el-option v-if="dict.status === 0" v-for="dict in currencyList"
:key="dict.id" :label="$l(dict,'title') + dict.fuhao" :value="dict.id" />
</el-select>
</el-form-item>
......@@ -37,7 +37,7 @@
<el-table v-loading="loading" :data="list">
<el-table-column :label="$t('序号')" align="center" >
<template v-slot="{row, $index}">
{{(queryParams.pageNo - 1) * queryParams.pageSize + ($index + 1)}}
{{(queryParams.page - 1) * queryParams.rows + ($index + 1)}}
</template>
</el-table-column>
<el-table-column :label="$t('币种1')" align="center" prop="sourceCurrencyId">
......@@ -76,13 +76,13 @@
<template slot-scope="scope">
<el-button v-hasPermi="['ecw:exchange-rate:update']" size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">{{$t('修改')}}</el-button>
<el-button v-hasPermi="['ecw:exchange-rate:delete']" size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">{{$t('删除')}}</el-button>
<el-button v-hasPermi="['ecw:exchange-rate:log']" size="mini" type="text" @click="handleLog(scope.row)">{{$t('日志')}}</el-button>
<el-button v-hasPermi="['ecw:exchange-rate:log']" size="mini" type="text" @click="formLog.rows = 10;formLog.page=1; handleLog(scope.row)">{{$t('日志')}}</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows"
@pagination="getList"/>
<!-- 对话框(添加 / 修改) -->
......@@ -90,13 +90,13 @@
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item :label="$t('币种1')" prop="sourceCurrencyId">
<el-select v-model="form.sourceCurrencyId" :placeholder="$t('请选择币种')">
<el-option @click.native="() => form.sourceCurrencyCode = dict.fuhao" v-for="dict in currencyList"
<el-option v-if="dict.status === 0" @click.native="() => form.sourceCurrencyCode = dict.fuhao" v-for="dict in currencyList"
:key="dict.id" :label="$l(dict,'title') + dict.fuhao" :value="dict.id" />
</el-select>
</el-form-item>
<el-form-item label="币种2" prop="targetCurrencyId">
<el-select v-model="form.targetCurrencyId" :placeholder="$t('请选择币种')">
<el-option @click.native="() => form.targetCurrencyCode = dict.fuhao" v-for="dict in currencyList"
<el-option v-if="dict.status === 0" @click.native="() => form.targetCurrencyCode = dict.fuhao" v-for="dict in currencyList"
:key="dict.id" :label="$l(dict,'title') + dict.fuhao" :value="dict.id" />
</el-select>
</el-form-item>
......@@ -140,8 +140,8 @@
</template>
</el-table-column>
</el-table>
<pagination v-show="totalLog > 0" :total="totalLog" :page.sync="formLog.page" :limit.sync="form.rows"
@pagination="handleLog"/>
<pagination v-show="totalLog > 0" :total="totalLog" :page.sync="formLog.page" :limit.sync="formLog.rows"
@pagination="getListLog"/>
</el-dialog>
</div>
</template>
......@@ -188,8 +188,8 @@ export default {
dateRangeCreateTime: [],
// 查询参数
queryParams: {
pageNo: 1,
pageSize: 10,
page: 1,
rows: 10,
sourceCurrencyId: null,
targetCurrencyId: null,
},
......@@ -223,11 +223,16 @@ export default {
},
handleLog(row){
this.openLog = true;
getExchangeRateLogList({rateId:row.id,...this.formLog}).then(r => {
this.formLog.rateId = row.id
this.getListLog()
},
getListLog(){
getExchangeRateLogList(this.formLog).then(r => {
this.listLog = r.data.list;
this.totalLog = r.data.total;
})
},
getOperator(val){
if (val){
let n = this.allSimplList.find(i => i.id == val)
......@@ -307,7 +312,8 @@ export default {
this.reset();
const id = row.id;
getExchangeRate(id).then(response => {
this.form = response.data;
this.form = {...this.form,...response.data};
console.log( this.form,' this.form')
this.open = true;
this.title = "修改";
});
......@@ -323,11 +329,12 @@ export default {
let p = {
currencyRate: Number(this.form.currencyRate),
id: this.form.id,
note: this.form.no,
note: this.form.note,
sourceCurrencyCode: this.form.sourceCurrencyCode,
sourceCurrencyId: this.form.sourceCurrencyId ,
targetCurrencyCode: this.form.targetCurrencyCode,
targetCurrencyId: this.form.targetCurrencyId
targetCurrencyId: this.form.targetCurrencyId,
}
updateExchangeRate(p).then(response => {
this.$modal.msgSuccess(this.$t('修改成功'));
......
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