Commit d935979a authored by huyf's avatar huyf

ecash

parent 457d8c36
......@@ -18,6 +18,16 @@ export function updateCurrencyEcash(data) {
})
}
// 更新E-Cash汇率单位
export function updateCurrencyEcashAll(data) {
console.log(data);
return request({
url: '/ecw/currency-ecash/updateAll',
method: 'put',
data: data
})
}
// 删除E-Cash汇率单位
export function deleteCurrencyEcash(id) {
return request({
......
......@@ -34,36 +34,37 @@
<el-form ref="retForm" :model="retForm">
<el-form-item label="有效时间(尼日利亚)">
<el-col :span="3">
<el-date-picker type="datetime" disabled value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss"
v-model="this.ecashDatas.find(item=>item.value == 1).label"
style="width: 100%;"></el-date-picker>
<el-date-picker type="datetime" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss"
v-model="retForm.nrlyStartTime"
style="width: 100%;" @change="changeDictData1"></el-date-picker>
</el-col>
<el-col :span="1" align="center">-</el-col>
<el-col :span="3">
<el-time-picker type="datetime" disabled value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss"
v-model="this.ecashDatas.find(item=>item.value == 2).label"
style="width: 100%;"></el-time-picker>
<el-date-picker type="datetime" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss"
v-model="retForm.nrlyEndTime" @change="changeDictData2"
style="width: 100%;"></el-date-picker>
</el-col>
</el-form-item>
</el-form>
<el-form>
<el-form-item label="有效时间(北京)">
<el-col :span="3">
<el-date-picker type="datetime" disabled value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss"
v-model="this.ecashDatas.find(item=>item.value == 3).label"
<el-date-picker type="datetime" :disable="showFlag" value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd HH:mm:ss" @change="changeDictData3"
v-model="retForm.bjStartTime"
style="width: 100%;"></el-date-picker>
</el-col>
<el-col align="center" :span="1">-</el-col>
<el-col :span="3">
<el-time-picker type="datetime" disabled value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss"
v-model="this.ecashDatas.find(item=>item.value == 4).label"
style="width: 100%;"></el-time-picker>
<el-date-picker type="datetime" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss"
v-model="retForm.bjEndTime" @change="changeDictData4"
style="width: 100%;"></el-date-picker>
</el-col>
</el-form-item>
</el-form>
<el-form :inline="true">
<el-form-item label="过期提示语:" prop="remark">
<span>{{ 5 | ecashDataFilter(ecashDatas) }}</span>
<el-input v-model="retForm.remark" type="textarea" @change="changeDictData5"></el-input>
</el-form-item>
</el-form>
</el-card>
......@@ -134,13 +135,14 @@
createCurrencyEcash,
updateCurrencyEcash,
deleteCurrencyEcash,
updateCurrencyEcashAll,
getCurrencyEcash,
getCurrencyEcashPage,
exportCurrencyEcashExcel
} from "@/api/ecw/currencyEcash";
import {CommonStatusEnum} from "@/utils/constants";
import {changeUserStatus} from "@/api/system/user";
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
import {DICT_TYPE, getDictDatas, getDictData} from "@/utils/dict";
export default {
name: "CurrencyEcash",
......@@ -171,6 +173,11 @@
open: false,
dateRangeCreateTime: [],
showFlag: false,
nrlyStartTime: getDictData(DICT_TYPE.ECASH_INIT, 1).label,
nrlyEndTime: getDictData(DICT_TYPE.ECASH_INIT, 2).label,
bjStartTime: getDictData(DICT_TYPE.ECASH_INIT, 3).label,
bjEndTime: getDictData(DICT_TYPE.ECASH_INIT, 4).label,
remark: getDictData(DICT_TYPE.ECASH_INIT, 5).label,
startTime: "",
// 查询参数
queryParams: {
......@@ -184,6 +191,7 @@
aorder: null,
},
retForm: {},
updForm: {},
// 表单参数
form: {},
// 表单校验
......@@ -264,6 +272,46 @@
this.showFlag = false;
});
},
changeDictData1(value) {
this.updForm.nrlyStartTime = value;
updateCurrencyEcashAll(this.updForm).then(response => {
this.$modal.msgSuccess("修改成功");
this.getList();
this.showFlag = false;
});
},
changeDictData2(value) {
this.updForm.nrlyEndTime = value;
updateCurrencyEcashAll(this.updForm).then(response => {
this.$modal.msgSuccess("修改成功");
this.getList();
this.showFlag = false;
});
},
changeDictData3(value) {
this.updForm.bjStartTime = value;
updateCurrencyEcashAll(this.updForm).then(response => {
this.$modal.msgSuccess("修改成功");
this.getList();
this.showFlag = false;
});
},
changeDictData4(value) {
this.updForm.bjEndTime = value;
updateCurrencyEcashAll(this.updForm).then(response => {
this.$modal.msgSuccess("修改成功");
this.getList();
this.showFlag = false;
});
},
changeDictData5(value) {
this.updForm.remark = value;
updateCurrencyEcashAll(this.updForm).then(response => {
this.$modal.msgSuccess("修改成功");
this.getList();
this.showFlag = false;
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
......
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