Commit bd8c1972 authored by 邓春圆's avatar 邓春圆

汇率修改为动态

parent 240a82cf
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
<!-- 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)">修改</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)">删除</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleLog(scope.row)">日志</el-button> <el-button size="mini" type="text" @click="handleLog(scope.row)">日志</el-button>
<!-- v-hasPermi="['ecw:exchange-rate:delete']"--> <!-- v-hasPermi="['ecw:exchange-rate:delete']"-->
</template> </template>
</el-table-column> </el-table-column>
...@@ -100,9 +100,12 @@ ...@@ -100,9 +100,12 @@
</el-form-item> </el-form-item>
<el-form-item label="汇率" prop="currencyRate"> <el-form-item label="汇率" prop="currencyRate">
<el-input v-model="form.currencyRate" placeholder="请输入汇率" /> <el-input v-model="form.currencyRate" placeholder="请输入汇率" />
<p style="margin: 0;"> <p v-if="!form.id" style="margin: 0;">
例子:1RMB = 0.138611USD 例子:1RMB = 0.138611USD
</p> </p>
<p v-else style="margin: 0;">
例子:1{{getCurrency(f.sourceCurrencyId, true)}} = {{ 1 * f.currencyRate}} {{getCurrency(f.targetCurrencyId, true)}}
</p>
</el-form-item> </el-form-item>
<el-form-item label="备注"> <el-form-item label="备注">
<el-input type="textarea" v-model="form.note"></el-input> <el-input type="textarea" v-model="form.note"></el-input>
...@@ -160,6 +163,11 @@ export default { ...@@ -160,6 +163,11 @@ export default {
}, },
data() { data() {
return { return {
f:{
"currencyRate": "",
"sourceCurrencyId":'' ,
"targetCurrencyId": '',
},
currencyList:[], currencyList:[],
allSimplList:[], allSimplList:[],
listLog:[], listLog:[],
...@@ -209,7 +217,6 @@ export default { ...@@ -209,7 +217,6 @@ export default {
handleLog(row){ handleLog(row){
this.openLog = true; this.openLog = true;
getExchangeRateLogList({ids:row.id}).then(r => { getExchangeRateLogList({ids:row.id}).then(r => {
console.log(r,'rrr')
this.listLog = r.data; this.listLog = r.data;
}) })
}, },
...@@ -285,6 +292,9 @@ export default { ...@@ -285,6 +292,9 @@ export default {
const id = row.id; const id = row.id;
getExchangeRate(id).then(response => { getExchangeRate(id).then(response => {
this.form = response.data; this.form = response.data;
this.f.currencyRate = response.data.currencyRate
this.f.sourceCurrencyId = response.data.sourceCurrencyId
this.f.targetCurrencyId = response.data.targetCurrencyId
this.open = true; this.open = true;
this.title = "修改"; this.title = "修改";
}); });
......
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