修改费用配置页面
This commit is contained in:
parent
f9f4c6e4cc
commit
f693104d1e
@ -372,7 +372,7 @@ const isAdd = ref(true);
|
|||||||
const warmReminder = ref("");
|
const warmReminder = ref("");
|
||||||
const field = ref("");
|
const field = ref("");
|
||||||
|
|
||||||
const form = ref({
|
const formData = () => ({
|
||||||
costConfigId: "",
|
costConfigId: "",
|
||||||
regionId: "",
|
regionId: "",
|
||||||
chargingMode: "",
|
chargingMode: "",
|
||||||
@ -394,6 +394,8 @@ const form = ref({
|
|||||||
whetherOpenLongRent: ""
|
whetherOpenLongRent: ""
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const form = ref(formData());
|
||||||
|
|
||||||
// 表格列配置
|
// 表格列配置
|
||||||
const columns = ref([])
|
const columns = ref([])
|
||||||
|
|
||||||
@ -406,6 +408,129 @@ const changeFreeDurationMode = (data) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const timePeriodColumns = [
|
||||||
|
{
|
||||||
|
title: '阶段',
|
||||||
|
key: 'phase',
|
||||||
|
width: 70,
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'phase'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '起始时间',
|
||||||
|
key: 'startupTime',
|
||||||
|
width: 130,
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'startupTime',
|
||||||
|
type: 'time'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '结束时间',
|
||||||
|
key: 'endTime',
|
||||||
|
width: 130,
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'endTime',
|
||||||
|
type: 'time'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '起步费用(元)',
|
||||||
|
key: 'startupCost',
|
||||||
|
width: 120,
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'startupCost',
|
||||||
|
type: 'input'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '起步时长(分)',
|
||||||
|
key: 'startupDuration',
|
||||||
|
width: 120,
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'startupDuration',
|
||||||
|
type: 'input'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '时长费用(元)',
|
||||||
|
key: 'durationCost',
|
||||||
|
width: 120,
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'durationCost',
|
||||||
|
type: 'input'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '时长(分)',
|
||||||
|
key: 'duration',
|
||||||
|
width: 100,
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'duration',
|
||||||
|
type: 'input'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
key: 'action',
|
||||||
|
width: 80,
|
||||||
|
align: 'center',
|
||||||
|
fixed: 'right',
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
const weekColumns = [
|
||||||
|
{
|
||||||
|
title: '名称',
|
||||||
|
key: 'configName',
|
||||||
|
width: 100,
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'configName',
|
||||||
|
type: 'input'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '周',
|
||||||
|
key: 'week',
|
||||||
|
width: 170,
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'week',
|
||||||
|
type: 'select'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '起步费用(元)',
|
||||||
|
key: 'startupCost',
|
||||||
|
width: 50,
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'startupCost',
|
||||||
|
type: 'input'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '起步时长(分)',
|
||||||
|
key: 'startupDuration',
|
||||||
|
width: 120,
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'startupDuration',
|
||||||
|
type: 'input'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '时长费用(元)',
|
||||||
|
key: 'durationCost',
|
||||||
|
width: 120,
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'durationCost',
|
||||||
|
type: 'input'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '时长(分)',
|
||||||
|
key: 'duration',
|
||||||
|
width: 100,
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'duration',
|
||||||
|
type: 'input'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
key: 'action',
|
||||||
|
width: 80,
|
||||||
|
align: 'center',
|
||||||
|
fixed: 'right',
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
const changeTimeDivisionCharging = (data) => {
|
const changeTimeDivisionCharging = (data) => {
|
||||||
const value = data.target.value;
|
const value = data.target.value;
|
||||||
if (value == "2") {
|
if (value == "2") {
|
||||||
@ -416,70 +541,7 @@ const changeTimeDivisionCharging = (data) => {
|
|||||||
form.value.ebikeSysRcostsetWeekDtos = [];
|
form.value.ebikeSysRcostsetWeekDtos = [];
|
||||||
deteilShow.value = true;
|
deteilShow.value = true;
|
||||||
warmReminder.value = "温馨提示:当天结束的阶段为23:59:59,没有设置的话,默认配置为上面的字段。";
|
warmReminder.value = "温馨提示:当天结束的阶段为23:59:59,没有设置的话,默认配置为上面的字段。";
|
||||||
columns.value = [
|
columns.value = timePeriodColumns;
|
||||||
{
|
|
||||||
title: '阶段',
|
|
||||||
key: 'phase',
|
|
||||||
width: 70,
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'phase'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '起始时间',
|
|
||||||
key: 'startupTime',
|
|
||||||
width: 130,
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'startupTime',
|
|
||||||
type: 'time'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '结束时间',
|
|
||||||
key: 'endTime',
|
|
||||||
width: 130,
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'endTime',
|
|
||||||
type: 'time'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '起步费用(元)',
|
|
||||||
key: 'startupCost',
|
|
||||||
width: 120,
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'startupCost',
|
|
||||||
type: 'input'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '起步时长(分)',
|
|
||||||
key: 'startupDuration',
|
|
||||||
width: 120,
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'startupDuration',
|
|
||||||
type: 'input'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '时长费用(元)',
|
|
||||||
key: 'durationCost',
|
|
||||||
width: 120,
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'durationCost',
|
|
||||||
type: 'input'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '时长(分)',
|
|
||||||
key: 'duration',
|
|
||||||
width: 100,
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'duration',
|
|
||||||
type: 'input'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '操作',
|
|
||||||
key: 'action',
|
|
||||||
width: 80,
|
|
||||||
align: 'center',
|
|
||||||
fixed: 'right',
|
|
||||||
}
|
|
||||||
]
|
|
||||||
} else if (value == "3") {
|
} else if (value == "3") {
|
||||||
field.value = "ebikeSysRcostsetWeekDtos";
|
field.value = "ebikeSysRcostsetWeekDtos";
|
||||||
if (form.value['ebikeSysRcostsetWeekDtos'] == null) {
|
if (form.value['ebikeSysRcostsetWeekDtos'] == null) {
|
||||||
@ -488,63 +550,7 @@ const changeTimeDivisionCharging = (data) => {
|
|||||||
form.value.ebikeSysRcostsetTimePeriodDtos = [];
|
form.value.ebikeSysRcostsetTimePeriodDtos = [];
|
||||||
deteilShow.value = true;
|
deteilShow.value = true;
|
||||||
warmReminder.value = "温馨提示:周的日期支持多选,比如可以选择周一、周二、周三为1种计费方式,没有选择的按默认选择方式来。";
|
warmReminder.value = "温馨提示:周的日期支持多选,比如可以选择周一、周二、周三为1种计费方式,没有选择的按默认选择方式来。";
|
||||||
columns.value = [
|
columns.value = weekColumns;
|
||||||
{
|
|
||||||
title: '名称',
|
|
||||||
key: 'configName',
|
|
||||||
width: 100,
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'configName',
|
|
||||||
type: 'input'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '周',
|
|
||||||
key: 'week',
|
|
||||||
width: 170,
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'week',
|
|
||||||
type: 'select'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '起步费用(元)',
|
|
||||||
key: 'startupCost',
|
|
||||||
width: 50,
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'startupCost',
|
|
||||||
type: 'input'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '起步时长(分)',
|
|
||||||
key: 'startupDuration',
|
|
||||||
width: 120,
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'startupDuration',
|
|
||||||
type: 'input'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '时长费用(元)',
|
|
||||||
key: 'durationCost',
|
|
||||||
width: 120,
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'durationCost',
|
|
||||||
type: 'input'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '时长(分)',
|
|
||||||
key: 'duration',
|
|
||||||
width: 100,
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'duration',
|
|
||||||
type: 'input'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '操作',
|
|
||||||
key: 'action',
|
|
||||||
width: 80,
|
|
||||||
align: 'center',
|
|
||||||
fixed: 'right',
|
|
||||||
}
|
|
||||||
]
|
|
||||||
} else {
|
} else {
|
||||||
field.value = "";
|
field.value = "";
|
||||||
deteilShow.value = false;
|
deteilShow.value = false;
|
||||||
@ -557,6 +563,9 @@ const changeTimeDivisionCharging = (data) => {
|
|||||||
|
|
||||||
const openForm = (params = {}) => {
|
const openForm = (params = {}) => {
|
||||||
deteilShow.value = false;
|
deteilShow.value = false;
|
||||||
|
Object.assign(form.value, formData());
|
||||||
|
formRef.value.resetFields();
|
||||||
|
isAdd.value = true;
|
||||||
if (params['regionId']) {
|
if (params['regionId']) {
|
||||||
form.value.regionId = params['regionId']
|
form.value.regionId = params['regionId']
|
||||||
spinning.value = true;
|
spinning.value = true;
|
||||||
@ -579,136 +588,15 @@ const openForm = (params = {}) => {
|
|||||||
field.value = "ebikeSysRcostsetTimePeriodDtos";
|
field.value = "ebikeSysRcostsetTimePeriodDtos";
|
||||||
deteilShow.value = true;
|
deteilShow.value = true;
|
||||||
warmReminder.value = "温馨提示:当天结束的阶段为23:59:59,没有设置的话,默认配置为上面的字段。";
|
warmReminder.value = "温馨提示:当天结束的阶段为23:59:59,没有设置的话,默认配置为上面的字段。";
|
||||||
columns.value = [
|
columns.value = timePeriodColumns;
|
||||||
{
|
|
||||||
title: '阶段',
|
|
||||||
key: 'phase',
|
|
||||||
width: 70,
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'phase'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '起始时间',
|
|
||||||
key: 'startupTime',
|
|
||||||
width: 130,
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'startupTime',
|
|
||||||
type: 'time'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '结束时间',
|
|
||||||
key: 'endTime',
|
|
||||||
width: 130,
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'endTime',
|
|
||||||
type: 'time'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '起步费用(元)',
|
|
||||||
key: 'startupCost',
|
|
||||||
width: 120,
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'startupCost',
|
|
||||||
type: 'input'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '起步时长(分)',
|
|
||||||
key: 'startupDuration',
|
|
||||||
width: 120,
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'startupDuration',
|
|
||||||
type: 'input'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '时长费用(元)',
|
|
||||||
key: 'durationCost',
|
|
||||||
width: 120,
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'durationCost',
|
|
||||||
type: 'input'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '时长(分)',
|
|
||||||
key: 'duration',
|
|
||||||
width: 100,
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'duration',
|
|
||||||
type: 'input'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '操作',
|
|
||||||
key: 'action',
|
|
||||||
width: 80,
|
|
||||||
align: 'center',
|
|
||||||
fixed: 'right',
|
|
||||||
}
|
|
||||||
]
|
|
||||||
} else if (res.data.timeDivisionCharging == '3') {
|
} else if (res.data.timeDivisionCharging == '3') {
|
||||||
field.value = "ebikeSysRcostsetWeekDtos";
|
field.value = "ebikeSysRcostsetWeekDtos";
|
||||||
deteilShow.value = true;
|
deteilShow.value = true;
|
||||||
warmReminder.value = "温馨提示:周的日期支持多选,比如可以选择周一、周二、周三为1种计费方式,没有选择的按默认选择方式来。";
|
warmReminder.value = "温馨提示:周的日期支持多选,比如可以选择周一、周二、周三为1种计费方式,没有选择的按默认选择方式来。";
|
||||||
columns.value = [
|
columns.value = weekColumns;
|
||||||
{
|
|
||||||
title: '名称',
|
|
||||||
key: 'configName',
|
|
||||||
width: 100,
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'configName',
|
|
||||||
type: 'input'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '周',
|
|
||||||
key: 'week',
|
|
||||||
width: 170,
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'week',
|
|
||||||
type: 'select'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '起步费用(元)',
|
|
||||||
key: 'startupCost',
|
|
||||||
width: 120,
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'startupCost',
|
|
||||||
type: 'input'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '起步时长(分)',
|
|
||||||
key: 'startupDuration',
|
|
||||||
width: 120,
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'startupDuration',
|
|
||||||
type: 'input'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '时长费用(元)',
|
|
||||||
key: 'durationCost',
|
|
||||||
width: 120,
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'durationCost',
|
|
||||||
type: 'input'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '时长(分)',
|
|
||||||
key: 'duration',
|
|
||||||
width: 100,
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'duration',
|
|
||||||
type: 'input'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '操作',
|
|
||||||
key: 'action',
|
|
||||||
width: 80,
|
|
||||||
align: 'center',
|
|
||||||
fixed: 'right',
|
|
||||||
}
|
|
||||||
]
|
|
||||||
} else {
|
} else {
|
||||||
field.value = "";
|
field.value = "";
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
formRef.value.resetFields()
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
message.error(res.message);
|
message.error(res.message);
|
||||||
@ -763,6 +651,7 @@ const remove = (val, filed, array) => {
|
|||||||
|
|
||||||
const formSave = (callBack) => {
|
const formSave = (callBack) => {
|
||||||
formRef.value.validate().then(() => {
|
formRef.value.validate().then(() => {
|
||||||
|
debugger;
|
||||||
tipContent.value = "保存中..."
|
tipContent.value = "保存中..."
|
||||||
spinning.value = true;
|
spinning.value = true;
|
||||||
let url = "regionFeeConfigAdds";
|
let url = "regionFeeConfigAdds";
|
||||||
@ -781,7 +670,6 @@ const formSave = (callBack) => {
|
|||||||
if (callBack) {
|
if (callBack) {
|
||||||
res.data = param;
|
res.data = param;
|
||||||
callBack(res);
|
callBack(res);
|
||||||
formRef.value.resetFields()
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user