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 { ...@@ -323,6 +323,36 @@ export default {
this.exportLoading = false; this.exportLoading = false;
}).catch(() => {}); }).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> </script>
...@@ -109,6 +109,12 @@ ...@@ -109,6 +109,12 @@
{{$t('例子:1RMB = 0.138611USD')}} {{$t('例子:1RMB = 0.138611USD')}}
</p> </p>
</el-form-item> </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-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>
...@@ -167,6 +173,7 @@ export default { ...@@ -167,6 +173,7 @@ export default {
}, },
data() { data() {
return { return {
status:0,
currencyList:[], currencyList:[],
allSimplList:[], allSimplList:[],
listLog:[], listLog:[],
...@@ -202,6 +209,7 @@ export default { ...@@ -202,6 +209,7 @@ export default {
targetCurrencyId: [{ required: true, message: this.$t('币种2不能为空'), trigger: "change" }], targetCurrencyId: [{ required: true, message: this.$t('币种2不能为空'), trigger: "change" }],
targetCurrencyCode: [{ required: true, message: this.$t('目标种代码不能为空'), trigger: "blur" }], targetCurrencyCode: [{ required: true, message: this.$t('目标种代码不能为空'), trigger: "blur" }],
currencyRate: [{ required: true, message: this.$t('汇率不能为空'), trigger: "blur" }], currencyRate: [{ required: true, message: this.$t('汇率不能为空'), trigger: "blur" }],
expireDate: [{ required: true, message: this.$t('有效期不能为空'), trigger: "blur" }],
}, },
formLog:{ formLog:{
rows:10, rows:10,
...@@ -287,6 +295,7 @@ export default { ...@@ -287,6 +295,7 @@ export default {
"targetCurrencyCode": "", "targetCurrencyCode": "",
"targetCurrencyId": '', "targetCurrencyId": '',
id: null, id: null,
expireDate:""
}; };
this.resetForm("form"); this.resetForm("form");
}, },
...@@ -305,7 +314,7 @@ export default { ...@@ -305,7 +314,7 @@ export default {
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.open = true; this.open = true;
this.title = "新增"; this.title = this.$t('新增');
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
...@@ -314,8 +323,18 @@ export default { ...@@ -314,8 +323,18 @@ export default {
getExchangeRate(id).then(response => { getExchangeRate(id).then(response => {
this.form = {...this.form,...response.data}; this.form = {...this.form,...response.data};
console.log( this.form,' this.form') 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.open = true;
this.title = "修改"; this.title = this.$t('修改');
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */
...@@ -334,6 +353,7 @@ export default { ...@@ -334,6 +353,7 @@ export default {
sourceCurrencyId: this.form.sourceCurrencyId , sourceCurrencyId: this.form.sourceCurrencyId ,
targetCurrencyCode: this.form.targetCurrencyCode, targetCurrencyCode: this.form.targetCurrencyCode,
targetCurrencyId: this.form.targetCurrencyId, targetCurrencyId: this.form.targetCurrencyId,
expireDate:this.form.expireDate
} }
updateExchangeRate(p).then(response => { 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