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 @@ ...@@ -5,13 +5,13 @@
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <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-form-item :label="$t('币种1')" prop="sourceCurrencyId">
<el-select v-model="queryParams.sourceCurrencyId" :placeholder="$t('请选择币种')" clearable size="small"> <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" /> :key="dict.id" :label="$l(dict,'title') + dict.fuhao" :value="dict.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('币种2')" prop="targetCurrencyId"> <el-form-item :label="$t('币种2')" prop="targetCurrencyId">
<el-select v-model="queryParams.targetCurrencyId" :placeholder="$t('请选择币种')" clearable size="small"> <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" /> :key="dict.id" :label="$l(dict,'title') + dict.fuhao" :value="dict.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<el-table v-loading="loading" :data="list"> <el-table v-loading="loading" :data="list">
<el-table-column :label="$t('序号')" align="center" > <el-table-column :label="$t('序号')" align="center" >
<template v-slot="{row, $index}"> <template v-slot="{row, $index}">
{{(queryParams.pageNo - 1) * queryParams.pageSize + ($index + 1)}} {{(queryParams.page - 1) * queryParams.rows + ($index + 1)}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('币种1')" align="center" prop="sourceCurrencyId"> <el-table-column :label="$t('币种1')" align="center" prop="sourceCurrencyId">
...@@ -76,13 +76,13 @@ ...@@ -76,13 +76,13 @@
<template slot-scope="scope"> <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: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: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> </template>
</el-table-column> </el-table-column>
</el-table> </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"/> @pagination="getList"/>
<!-- 对话框(添加 / 修改) --> <!-- 对话框(添加 / 修改) -->
...@@ -90,13 +90,13 @@ ...@@ -90,13 +90,13 @@
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item :label="$t('币种1')" prop="sourceCurrencyId"> <el-form-item :label="$t('币种1')" prop="sourceCurrencyId">
<el-select v-model="form.sourceCurrencyId" :placeholder="$t('请选择币种')"> <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" /> :key="dict.id" :label="$l(dict,'title') + dict.fuhao" :value="dict.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="币种2" prop="targetCurrencyId"> <el-form-item label="币种2" prop="targetCurrencyId">
<el-select v-model="form.targetCurrencyId" :placeholder="$t('请选择币种')"> <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" /> :key="dict.id" :label="$l(dict,'title') + dict.fuhao" :value="dict.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -140,8 +140,8 @@ ...@@ -140,8 +140,8 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination v-show="totalLog > 0" :total="totalLog" :page.sync="formLog.page" :limit.sync="form.rows" <pagination v-show="totalLog > 0" :total="totalLog" :page.sync="formLog.page" :limit.sync="formLog.rows"
@pagination="handleLog"/> @pagination="getListLog"/>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
...@@ -188,8 +188,8 @@ export default { ...@@ -188,8 +188,8 @@ export default {
dateRangeCreateTime: [], dateRangeCreateTime: [],
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNo: 1, page: 1,
pageSize: 10, rows: 10,
sourceCurrencyId: null, sourceCurrencyId: null,
targetCurrencyId: null, targetCurrencyId: null,
}, },
...@@ -223,11 +223,16 @@ export default { ...@@ -223,11 +223,16 @@ export default {
}, },
handleLog(row){ handleLog(row){
this.openLog = true; 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.listLog = r.data.list;
this.totalLog = r.data.total; this.totalLog = r.data.total;
}) })
}, },
getOperator(val){ getOperator(val){
if (val){ if (val){
let n = this.allSimplList.find(i => i.id == val) let n = this.allSimplList.find(i => i.id == val)
...@@ -307,7 +312,8 @@ export default { ...@@ -307,7 +312,8 @@ export default {
this.reset(); this.reset();
const id = row.id; const id = row.id;
getExchangeRate(id).then(response => { getExchangeRate(id).then(response => {
this.form = response.data; this.form = {...this.form,...response.data};
console.log( this.form,' this.form')
this.open = true; this.open = true;
this.title = "修改"; this.title = "修改";
}); });
...@@ -323,11 +329,12 @@ export default { ...@@ -323,11 +329,12 @@ export default {
let p = { let p = {
currencyRate: Number(this.form.currencyRate), currencyRate: Number(this.form.currencyRate),
id: this.form.id, id: this.form.id,
note: this.form.no, note: this.form.note,
sourceCurrencyCode: this.form.sourceCurrencyCode, sourceCurrencyCode: this.form.sourceCurrencyCode,
sourceCurrencyId: this.form.sourceCurrencyId , sourceCurrencyId: this.form.sourceCurrencyId ,
targetCurrencyCode: this.form.targetCurrencyCode, targetCurrencyCode: this.form.targetCurrencyCode,
targetCurrencyId: this.form.targetCurrencyId targetCurrencyId: this.form.targetCurrencyId,
} }
updateExchangeRate(p).then(response => { updateExchangeRate(p).then(response => {
this.$modal.msgSuccess(this.$t('修改成功')); 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