Commit 6f1459bd authored by wanghuazhou's avatar wanghuazhou

bugfix: 汇率表格列表样式照原型

parent 7fa5b07b
......@@ -46,7 +46,7 @@
</el-form-item>
<el-form-item :label="$t('有效期')" prop="expiration">
<el-col :span="11">
<el-date-picker v-model="model.expiration" type="date" :placeholder="$t('请选择有效期')" :picker-options="pickerOptions" style="width: 100%"/>
<el-date-picker v-model="model.expiration" type="datetime" :placeholder="$t('请选择有效期')" :picker-options="pickerOptions" style="width: 100%"/>
</el-col>
<el-col :span="2">&nbsp;</el-col>
<el-col :span="11">
......
......@@ -10,42 +10,52 @@
</el-row>
<el-table v-loading="query.loading" :data="query.result.list">
<el-table-column type="index" align="center" :label="$t('序号')" width="50"/>
<el-table-column align="right" :label="$t('金额')" width="200">
<el-table-column align="center" :label="$t('原币种')">
<template v-slot="{ row }">
<div class="title"><i>{{ $l(currency(row.sourceId), 'title') }}</i> <i class="amount">{{ row.sourceAmount }}</i></div>
<div class="title"><i>{{ $l(currency(row.targetId), 'title') }}</i> <i class="amount">{{ row.targetAmount }}</i></div>
{{ $l(currency(row.sourceId), 'title') }}
</template>
</el-table-column>
<el-table-column align="left" :label="$t('汇率')" width="200">
<template v-slot="{ row }">
<div>{{ currency(row.sourceId).fuhao }} : {{ currency(row.targetId).fuhao }}</div>
<div>1 : <i class="rate">{{ rate(row) }}</i></div>
</template>
<el-table-column align="center" :label="$t('支付币种')">
<template v-slot="{ row }">
{{ $l(currency(row.targetId), 'title') }}
</template>
</el-table-column>
<el-table-column align="center" :label="$t('有效期')" width="120">
<el-table-column :label="$t('汇率')">
<template v-slot="{ row }">
<div>{{ dayjs(row.expiration).format('YYYY-MM-DD') }}</div>
<dict-tag :type="DICT_TYPE.CURRENCY_RATE_STATUS" :value="expired(row.expiration)" />
{{ currency(row.sourceId).fuhao }} {{ row.sourceAmount }} : {{ row.targetAmount }} {{ currency(row.targetId).fuhao }}
</template>
</el-table-column>
<el-table-column align="center" :label="$t('有效期')">
<template v-slot="{ row }">
{{ dayjs(row.expiration).format('YYYY-MM-DD HH:mm:ss') }}
</template>
</el-table-column>
<el-table-column align="left" :label="$t('国家')" prop="countries" :formatter="countries"/>
<el-table-column align="left" :label="$t('最后修改')" width="200">
<template v-slot="{ row }"><audit :row="row"/></template>
<el-table-column :label="$t('备注')" prop="remarks"/>
<el-table-column :label="$t('状态')">
<template v-slot="{ row }">
<dict-tag :type="DICT_TYPE.CURRENCY_RATE_STATUS" :value="expired(row.expiration)" />
</template>
</el-table-column>
<el-table-column :label="$t('最后修改时间')">
<template v-slot="{ row }">
{{ parseTime(row.updateTime) }}
</template>
</el-table-column>
<el-table-column align="center" :label="$t('操作')" width="300">
<el-table-column :label="$t('最后修改人')" prop="updater"/>
<el-table-column align="center" :label="$t('操作')">
<template v-slot="{ row }">
<el-button size="mini" type="text" icon="el-icon-edit" v-hasPermi="['ecw:currency:rate:update']" @click="edit(row)">{{ $t('修改') }}</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" v-hasPermi="['ecw:currency:rate:delete']" @click="remove(row)">{{ $t('删除') }}</el-button>
<el-button size="mini" type="text" icon="el-icon-tickets" v-hasPermi="['ecw:currency:rate:history']" @click="logs(row)">{{ $t('日志') }}</el-button>
<el-button size="mini" type="text" icon="el-icon-link" v-hasPermi="['ecw:currency:rate:update']" @click="reverse(row)">{{ $t('反向') }}</el-button>
<el-button size="mini" type="text" icon="el-icon-link" v-hasPermi="['ecw:currency:rate:update']" @click="reverse(row)">{{ $t('复制反向汇率') }}</el-button>
</template>
</el-table-column>
</el-table>
<pagination :total="query.result.total" :page.sync="query.params.page" :limit.sync="query.params.rows" @pagination="pagination"/>
<form-dialog :visible.sync="dialogs.form.visible" :id="dialogs.form.id" :data="dialogs.form.data" :countries="dict.countries" :currencies="dict.currencies"/>
<form-dialog :visible.sync="dialogs.form.visible" :id="dialogs.form.id" :data="dialogs.form.data" @update:model="pagination" :countries="dict.countries" :currencies="dict.currencies"/>
<logs-dialog :visible.sync="dialogs.logs.visible" :id="dialogs.logs.id" :source="dialogs.logs.source" :target="dialogs.logs.target"/>
</div>
</template>
......
......@@ -32,12 +32,12 @@
</el-table-column>
<el-table-column :label="$t('日期变化')">
<template v-slot="{ row }">
<div v-if="row.sourceExpiration != row.targetExpiration">
<div class="after">{{ row.targetExpiration }}</div>
<div class="before">{{ row.sourceExpiration }}</div>
<div v-if="dayjs(row.sourceExpiration) != dayjs(row.targetExpiration)">
<div class="after">{{ dayjs(row.targetExpiration).format('YYYY-MM-DD HH:mm:ss') }}</div>
<div class="before">{{ dayjs(row.sourceExpiration).format('YYYY-MM-DD HH:mm:ss') }}</div>
</div>
<div v-else>
<div>{{ row.sourceExpiration }}</div>
<div>{{ dayjs(row.sourceExpiration).format('YYYY-MM-DD HH:mm:ss') }}</div>
</div>
</template>
</el-table-column>
......@@ -48,6 +48,7 @@
<script>
import { getCurrencyRateLogs } from '@/api/ecw/currencyRate'
import dayjs from 'dayjs'
import Decimal from 'decimal.js'
import Vue from 'vue'
import Audit from './audit.vue'
......@@ -71,6 +72,7 @@ export default Vue.extend({
return { loading: false, page: 1, limit: 10, list: [], total: 0, }
},
methods: {
dayjs,
close() {
this.$emit('update:visible', false)
},
......
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