Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-app-operator-master
Commits
cbacd066
Commit
cbacd066
authored
Jul 11, 2023
by
邓春圆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
国际化
parent
89ea586f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
51 deletions
+59
-51
index.vue
src/views/ecw/exchangeRate/index.vue
+59
-51
No files found.
src/views/ecw/exchangeRate/index.vue
View file @
cbacd066
...
@@ -3,28 +3,28 @@
...
@@ -3,28 +3,28 @@
<!-- 搜索工作栏 -->
<!-- 搜索工作栏 -->
<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=
"币种1
"
prop=
"sourceCurrencyId"
>
<el-form-item
:label=
"$t('币种1')
"
prop=
"sourceCurrencyId"
>
<el-select
v-model=
"queryParams.sourceCurrencyId"
placeholder=
"请选择币种
"
clearable
size=
"small"
>
<el-select
v-model=
"queryParams.sourceCurrencyId"
:placeholder=
"$t('请选择币种')
"
clearable
size=
"small"
>
<el-option
v-for=
"dict in currencyList"
<el-option
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=
"$t('币种2')
"
prop=
"targetCurrencyId"
>
<el-select
v-model=
"queryParams.targetCurrencyId"
placeholder=
"请选择币种
"
clearable
size=
"small"
>
<el-select
v-model=
"queryParams.targetCurrencyId"
:placeholder=
"$t('请选择币种')
"
clearable
size=
"small"
>
<el-option
v-for=
"dict in currencyList"
<el-option
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>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleQuery"
>
{{
$t
(
'
搜索
'
)
}}
</el-button>
<el-button
icon=
"el-icon-refresh"
@
click=
"resetQuery"
>
重置
</el-button>
<el-button
icon=
"el-icon-refresh"
@
click=
"resetQuery"
>
{{
$t
(
'
重置
'
)
}}
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<!-- 操作工具栏 -->
<!-- 操作工具栏 -->
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
>
新增
</el-button>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
>
{{
$t
(
'
新增
'
)
}}
</el-button>
<!-- v-hasPermi="['ecw:exchange-rate:create']"-->
<!-- v-hasPermi="['ecw:exchange-rate:create']"-->
</el-col>
</el-col>
<!--
<el-col
:span=
"1.5"
>
-->
<!--
<el-col
:span=
"1.5"
>
-->
...
@@ -36,49 +36,49 @@
...
@@ -36,49 +36,49 @@
<!-- 列表 -->
<!-- 列表 -->
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"序号
"
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
.
pageNo
-
1
)
*
queryParams
.
pageSize
+
(
$index
+
1
)
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"币种1
"
align=
"center"
prop=
"sourceCurrencyId"
>
<el-table-column
:label=
"$t('币种1')
"
align=
"center"
prop=
"sourceCurrencyId"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
getCurrency
(
scope
.
row
.
sourceCurrencyId
)
}}
{{
getCurrency
(
scope
.
row
.
sourceCurrencyId
)
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"币种2
"
>
<el-table-column
:label=
"$t('币种2')
"
>
<
template
v-slot=
"{row}"
>
<
template
v-slot=
"{row}"
>
{{
getCurrency
(
row
.
targetCurrencyId
)
}}
{{
getCurrency
(
row
.
targetCurrencyId
)
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"币种1 金额
"
>
<el-table-column
:label=
"$t('币种1 金额')
"
>
<
template
v-slot=
"{row}"
>
<
template
v-slot=
"{row}"
>
1
{{
getCurrency
(
row
.
sourceCurrencyId
,
true
)
}}
1
{{
getCurrency
(
row
.
sourceCurrencyId
,
true
)
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"币种1金额兑换币种2汇率
"
prop=
"currencyRate"
></el-table-column>
<el-table-column
:label=
"$t('币种1金额兑换币种2汇率')
"
prop=
"currencyRate"
></el-table-column>
<el-table-column
label=
"币种2金额
"
>
<el-table-column
:label=
"$t('币种2金额')
"
>
<
template
v-slot=
"{row}"
>
<
template
v-slot=
"{row}"
>
{{
1
*
row
.
currencyRate
}}{{
getCurrency
(
row
.
targetCurrencyId
,
true
)
}}
{{
1
*
row
.
currencyRate
}}{{
getCurrency
(
row
.
targetCurrencyId
,
true
)
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"最后修改时间
"
>
<el-table-column
:label=
"$t('最后修改时间')
"
>
<
template
v-slot=
"{row}"
>
<
template
v-slot=
"{row}"
>
{{
parseTime
(
row
.
updateTime
)
}}
{{
parseTime
(
row
.
updateTime
)
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"最后修改人
"
>
<el-table-column
:label=
"$t('最后修改人')
"
>
<
template
v-slot=
"{row}"
>
<
template
v-slot=
"{row}"
>
{{
getOperator
(
row
.
updater
)
}}
{{
getOperator
(
row
.
updater
)
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"备注
"
prop=
"note"
></el-table-column>
<el-table-column
:label=
"$t('备注')
"
prop=
"note"
></el-table-column>
<el-table-column
label=
"操作
"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
:label=
"$t('操作')
"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<!-- v-hasPermi="['ecw:exchange-rate:update']"-->
<!-- v-hasPermi="['ecw:exchange-rate:update']"-->
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
>
{{
$t
(
'
修改
'
)
}}
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
>
删除
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
>
{{
$t
(
'
删除
'
)
}}
</el-button>
<el-button
size=
"mini"
type=
"text"
@
click=
"handleLog(scope.row)"
>
日志
</el-button>
<el-button
size=
"mini"
type=
"text"
@
click=
"handleLog(scope.row)"
>
{{
$t
(
'
日志
'
)
}}
</el-button>
<!-- v-hasPermi="['ecw:exchange-rate:delete']"-->
<!-- v-hasPermi="['ecw:exchange-rate:delete']"-->
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
@@ -90,55 +90,55 @@
...
@@ -90,55 +90,55 @@
<!-- 对话框(添加 / 修改) -->
<!-- 对话框(添加 / 修改) -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"500px"
append-to-body
>
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"500px"
append-to-body
>
<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=
"币种1
"
prop=
"sourceCurrencyId"
>
<el-form-item
:label=
"$t('币种1')
"
prop=
"sourceCurrencyId"
>
<el-select
v-model=
"form.sourceCurrencyId"
placeholder=
"请选择币种
"
>
<el-select
v-model=
"form.sourceCurrencyId"
:placeholder=
"$t('请选择币种')
"
>
<el-option
@
click.native=
"() => form.sourceCurrencyCode = dict.fuhao"
v-for=
"dict in currencyList"
<el-option
@
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=
"请选择币种
"
>
<el-select
v-model=
"form.targetCurrencyId"
:placeholder=
"$t('请选择币种')
"
>
<el-option
@
click.native=
"() => form.targetCurrencyCode = dict.fuhao"
v-for=
"dict in currencyList"
<el-option
@
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>
<el-form-item
label=
"汇率
"
prop=
"currencyRate"
>
<el-form-item
:label=
"$t('汇率')
"
prop=
"currencyRate"
>
<el-input-number
class=
"el-input-number"
:controls=
"false"
v-model=
"form.currencyRate"
placeholder=
"请输入汇率
"
/>
<el-input-number
class=
"el-input-number"
:controls=
"false"
v-model=
"form.currencyRate"
:placeholder=
"$t('请输入汇率')
"
/>
<p
v-if=
"form.sourceCurrencyId && form.currencyRate && form.targetCurrencyCode"
style=
"margin: 0;"
>
<p
v-if=
"form.sourceCurrencyId && form.currencyRate && form.targetCurrencyCode"
style=
"margin: 0;"
>
例子:
1{{getCurrency(form.sourceCurrencyId, true)}} = {{ 1 * form.currencyRate}} {{getCurrency(form.targetCurrencyId, true)}}
{{$t('例子:')}}
1{{getCurrency(form.sourceCurrencyId, true)}} = {{ 1 * form.currencyRate}} {{getCurrency(form.targetCurrencyId, true)}}
</p>
</p>
<p
v-else
style=
"margin: 0;"
>
<p
v-else
style=
"margin: 0;"
>
例子:1RMB = 0.138611USD
{{$t('例子:1RMB = 0.138611USD')}}
</p>
</p>
</el-form-item>
</el-form-item>
<el-form-item
label=
"备注
"
>
<el-form-item
:label=
"$t('备注')
"
>
<el-input
type=
"textarea"
v-model=
"form.note"
></el-input>
<el-input
type=
"textarea"
v-model=
"form.note"
></el-input>
</el-form-item>
</el-form-item>
<
template
v-if=
"form.id"
>
<
template
v-if=
"form.id"
>
<el-form-item
label=
"创建人
"
>
{{
getOperator
(
form
.
updater
)
}}
</el-form-item>
<el-form-item
:label=
"$t('创建人')
"
>
{{
getOperator
(
form
.
updater
)
}}
</el-form-item>
<el-form-item
label=
"创建时间
"
>
{{
parseTime
(
form
.
createTime
)
}}
</el-form-item>
<el-form-item
:label=
"$t('创建时间')
"
>
{{
parseTime
(
form
.
createTime
)
}}
</el-form-item>
<el-form-item
label=
"最后更新人
"
>
{{
parseTime
(
form
.
updateTime
)
}}
</el-form-item>
<el-form-item
:label=
"$t('最后更新人')
"
>
{{
parseTime
(
form
.
updateTime
)
}}
</el-form-item>
<el-form-item
label=
"最后更新人
"
>
{{
getOperator
(
form
.
updater
)
}}
</el-form-item>
<el-form-item
:label=
"$t('最后更新人')
"
>
{{
getOperator
(
form
.
updater
)
}}
</el-form-item>
</
template
>
</
template
>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
>
{{$t('确 定')}}
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
@
click=
"cancel"
>
{{$t('取 消')}}
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
<el-dialog
:visible.sync=
"openLog"
>
<el-dialog
:visible.sync=
"openLog"
>
<el-table
:data=
"listLog"
>
<el-table
:data=
"listLog"
>
<el-table-column
label=
"修改人
"
prop=
"changeName"
></el-table-column>
<el-table-column
:label=
"$t('修改人')
"
prop=
"changeName"
></el-table-column>
<el-table-column
label=
"修改时间
"
>
<el-table-column
:label=
"$t('修改时间')
"
>
<
template
v-slot=
"{row}"
>
<
template
v-slot=
"{row}"
>
{{
parseTime
(
row
.
createTime
)
}}
{{
parseTime
(
row
.
createTime
)
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"修改前内容
"
>
<el-table-column
:label=
"$t('修改前内容')
"
>
<
template
v-slot=
"{row}"
>
<
template
v-slot=
"{row}"
>
币种1:【
{{
getCurrency
(
row
.
beforeChangeSourceValue
,
tr
ue
,
'
fuhao
'
)
}}
】
<br/>
{{
$t
(
'
币种1:
'
)
}}
【
{{
getCurrencyLog
(
row
.
beforeChangeSourceVal
ue
,
'
fuhao
'
)
}}
】
<br/>
币种2:【
{{
getCurrency
(
row
.
beforeChangeTargetValue
,
tr
ue
,
'
fuhao
'
)
}}
】
<br/>
{{
$t
(
'
币种2:
'
)
}}
【
{{
getCurrencyLog
(
row
.
beforeChangeTargetVal
ue
,
'
fuhao
'
)
}}
】
<br/>
汇率:
【
{{
row
.
beforeChangeValue
}}
】
<br/>
{{
$t
(
'
汇率:
'
)
}}
【
{{
row
.
beforeChangeValue
}}
】
<br/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -197,11 +197,11 @@ export default {
...
@@ -197,11 +197,11 @@ export default {
form
:
{},
form
:
{},
// 表单校验
// 表单校验
rules
:
{
rules
:
{
sourceCurrencyId
:
[{
required
:
true
,
message
:
"
币种1不能为空
"
,
trigger
:
"
change
"
}],
sourceCurrencyId
:
[{
required
:
true
,
message
:
this
.
$t
(
'
币种1不能为空
'
)
,
trigger
:
"
change
"
}],
sourceCurrencyCode
:
[{
required
:
true
,
message
:
"
原币种代码不能为空
"
,
trigger
:
"
blur
"
}],
sourceCurrencyCode
:
[{
required
:
true
,
message
:
this
.
$t
(
'
原币种代码不能为空
'
)
,
trigger
:
"
blur
"
}],
targetCurrencyId
:
[{
required
:
true
,
message
:
"
币种2不能为空
"
,
trigger
:
"
change
"
}],
targetCurrencyId
:
[{
required
:
true
,
message
:
this
.
$t
(
'
币种2不能为空
'
)
,
trigger
:
"
change
"
}],
targetCurrencyCode
:
[{
required
:
true
,
message
:
"
目标种代码不能为空
"
,
trigger
:
"
blur
"
}],
targetCurrencyCode
:
[{
required
:
true
,
message
:
this
.
$t
(
'
目标种代码不能为空
'
)
,
trigger
:
"
blur
"
}],
currencyRate
:
[{
required
:
true
,
message
:
"
汇率不能为空
"
,
trigger
:
"
blur
"
}],
currencyRate
:
[{
required
:
true
,
message
:
this
.
$t
(
'
汇率不能为空
'
)
,
trigger
:
"
blur
"
}],
}
}
};
};
},
},
...
@@ -241,6 +241,14 @@ export default {
...
@@ -241,6 +241,14 @@ export default {
}
}
return ''
return ''
},
},
getCurrencyLog(val, value = 'fuhao'){
if (val){
let r = this.currencyList.find(i => i[value] === val)
return this.$l(r,'title')
}
return ''
},
/** 查询列表 */
/** 查询列表 */
getList() {
getList() {
this.loading = true;
this.loading = true;
...
@@ -316,7 +324,7 @@ export default {
...
@@ -316,7 +324,7 @@ export default {
targetCurrencyId: this.form.targetCurrencyId
targetCurrencyId: this.form.targetCurrencyId
}
}
updateExchangeRate(p).then(response => {
updateExchangeRate(p).then(response => {
this.$modal.msgSuccess(
"修改成功"
);
this.$modal.msgSuccess(
this.$t('修改成功')
);
this.open = false;
this.open = false;
this.getList();
this.getList();
});
});
...
@@ -324,7 +332,7 @@ export default {
...
@@ -324,7 +332,7 @@ export default {
}
}
// 添加的提交
// 添加的提交
createExchangeRate(this.form).then(response => {
createExchangeRate(this.form).then(response => {
this.$modal.msgSuccess(
"新增成功"
);
this.$modal.msgSuccess(
this.$t('新增成功')
);
this.open = false;
this.open = false;
this.getList();
this.getList();
});
});
...
@@ -333,11 +341,11 @@ export default {
...
@@ -333,11 +341,11 @@ export default {
/** 删除按钮操作 */
/** 删除按钮操作 */
handleDelete(row) {
handleDelete(row) {
const id = row.id;
const id = row.id;
this.$modal.confirm(
'是否确认删除汇率管理编号为"' + id + '"的数据项?'
).then(function() {
this.$modal.confirm(
this.$t('是否确认删除汇率管理编号为"') + id + this.$t('"的数据项?')
).then(function() {
return deleteExchangeRate(id);
return deleteExchangeRate(id);
}).then(() => {
}).then(() => {
this.getList();
this.getList();
this.$modal.msgSuccess(
"删除成功"
);
this.$modal.msgSuccess(
this.$t('删除成功')
);
}).catch(() => {});
}).catch(() => {});
},
},
/** 导出按钮操作 */
/** 导出按钮操作 */
...
@@ -348,11 +356,11 @@ export default {
...
@@ -348,11 +356,11 @@ export default {
params.pageSize = undefined;
params.pageSize = undefined;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行导出
// 执行导出
this.$modal.confirm(
'是否确认导出所有汇率管理数据项?'
).then(() => {
this.$modal.confirm(
this.$t('是否确认导出所有汇率管理数据项?')
).then(() => {
this.exportLoading = true;
this.exportLoading = true;
return exportExchangeRateExcel(params);
return exportExchangeRateExcel(params);
}).then(response => {
}).then(response => {
this.$download.excel(response, '
${
table
.
classComment
}
.xls');
//
this.$download.excel(response, '
${
table
.
classComment
}
.xls');
this.exportLoading = false;
this.exportLoading = false;
}).catch(() => {});
}).catch(() => {});
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment