Commit f1301e4a authored by dragondean@qq.com's avatar dragondean@qq.com

Merge remote-tracking branch 'origin/release2.2' into release2.2

parents 42770381 28820a6a
......@@ -323,6 +323,36 @@ export default {
this.exportLoading = false;
}).catch(() => {});
}
},
watch:{
'queryParams.titleZh':{
handler(value){
if(value === ''){
this.queryParams.titleZh = undefined
}
}
},
'queryParams.titleEn':{
handler(value){
if(value === ''){
this.queryParams.titleEn = undefined
}
},
},
'queryParams.fuhao':{
handler(value){
if(value === ''){
this.queryParams.fuhao = undefined
}
},
},
'queryParams.status':{
handler(value){
if(value === ''){
this.queryParams.status = undefined
}
}
}
}
};
</script>
......@@ -109,6 +109,12 @@
{{$t('例子:1RMB = 0.138611USD')}}
</p>
</el-form-item>
<el-form-item :label="$t('有效期')" prop="expireDate">
<el-date-picker v-model="form.expireDate" type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss" ></el-date-picker>
</el-form-item>
<el-form-item v-if="form.id" :label="$t('状态')">
<div> {{status ? '已过期' : '正常'}}</div>
</el-form-item>
<el-form-item :label="$t('备注')">
<el-input type="textarea" v-model="form.note"></el-input>
</el-form-item>
......@@ -167,6 +173,7 @@ export default {
},
data() {
return {
status:0,
currencyList:[],
allSimplList:[],
listLog:[],
......@@ -202,6 +209,7 @@ export default {
targetCurrencyId: [{ required: true, message: this.$t('币种2不能为空'), trigger: "change" }],
targetCurrencyCode: [{ required: true, message: this.$t('目标种代码不能为空'), trigger: "blur" }],
currencyRate: [{ required: true, message: this.$t('汇率不能为空'), trigger: "blur" }],
expireDate: [{ required: true, message: this.$t('有效期不能为空'), trigger: "blur" }],
},
formLog:{
rows:10,
......@@ -287,6 +295,7 @@ export default {
"targetCurrencyCode": "",
"targetCurrencyId": '',
id: null,
expireDate:""
};
this.resetForm("form");
},
......@@ -305,7 +314,7 @@ export default {
handleAdd() {
this.reset();
this.open = true;
this.title = "新增";
this.title = this.$t('新增');
},
/** 修改按钮操作 */
handleUpdate(row) {
......@@ -314,8 +323,18 @@ export default {
getExchangeRate(id).then(response => {
this.form = {...this.form,...response.data};
console.log( this.form,' this.form')
if(this.form.expireDate){
if(new Date(this.form.expireDate).getTime() >= new Date().getTime()){
this.status = 0
}else {
this.status = 1
}
}else {
this.status = 1
}
this.open = true;
this.title = "修改";
this.title = this.$t('修改');
});
},
/** 提交按钮 */
......@@ -334,6 +353,7 @@ export default {
sourceCurrencyId: this.form.sourceCurrencyId ,
targetCurrencyCode: this.form.targetCurrencyCode,
targetCurrencyId: this.form.targetCurrencyId,
expireDate:this.form.expireDate
}
updateExchangeRate(p).then(response => {
......
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