Merge branch 'main' of http://47.109.71.130:3000/attiya/ebike-ui
This commit is contained in:
commit
b69b0aa27a
@ -461,7 +461,7 @@ const regionConfigInfo = (record) => {
|
||||
*/
|
||||
const handleOkConfgModal = () => {
|
||||
formModelConfig.value.formSave((data => {
|
||||
// openConfig.value = false;
|
||||
openConfig.value = false;
|
||||
if (data['code'] == 200) {
|
||||
getData()
|
||||
} else {
|
||||
|
||||
@ -95,7 +95,6 @@ const formSave = (onCallBack) => {
|
||||
}).catch((e) => {
|
||||
return Promise.reject(e);
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
// 使用 Promise.all 等待所有的表单校验完成
|
||||
@ -106,13 +105,10 @@ const formSave = (onCallBack) => {
|
||||
if (!isAdd.value) {
|
||||
url = "update"
|
||||
}
|
||||
isAdd.value = false;
|
||||
callOperate("/ebikeSysRoperateset/" + url, params).then(res => {
|
||||
spinning.value = false;
|
||||
if (res.code == 200) {
|
||||
//重置表单数据
|
||||
forms.map(form => {
|
||||
form.value.resetFormValue()
|
||||
})
|
||||
if (onCallBack) {
|
||||
res.data = params;
|
||||
onCallBack(res);
|
||||
|
||||
@ -405,7 +405,7 @@ const field = ref("");
|
||||
const saveFlag = ref(true);
|
||||
const openTimeTip = ref(false)
|
||||
const openWeekTip = ref(false)
|
||||
|
||||
const costConfigId = ref("");
|
||||
|
||||
const formData = () => ({
|
||||
costConfigId: "",
|
||||
@ -413,7 +413,7 @@ const formData = () => ({
|
||||
chargingMode: "",
|
||||
freeDurationMode: "1",
|
||||
freeDuration: "免费时长(分钟)",
|
||||
timeDivisionCharging: "1",
|
||||
timeDivisionCharging: "",
|
||||
ebikeSysRcostsetTimePeriodDtos: [],
|
||||
ebikeSysRcostsetWeekDtos: [],
|
||||
startupCost: "",
|
||||
@ -598,7 +598,7 @@ const openForm = (params = {}) => {
|
||||
+ params['regionId'], {}, "get").then(res => {
|
||||
spinning.value = false;
|
||||
if (res.code == 200) {
|
||||
if (res.data) {
|
||||
if (res.data.costConfigId) {
|
||||
isAdd.value = false;
|
||||
form.value = res.data;
|
||||
if (res.data.timeDivisionCharging == '2') {
|
||||
@ -622,6 +622,12 @@ const openForm = (params = {}) => {
|
||||
} else {
|
||||
field.value = "";
|
||||
}
|
||||
} else {
|
||||
callOperate("/ebikesysrcostset/createSnowflakeId", {}, "get").then(res => {
|
||||
if (res.code == 200) {
|
||||
costConfigId.value = res.data;
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
message.error(res.message);
|
||||
@ -746,7 +752,11 @@ const formSave = (callBack) => {
|
||||
if (!isAdd.value) {
|
||||
url = "updateRegionFeeConfig"
|
||||
}
|
||||
isAdd.value = false;
|
||||
const param = _.cloneDeep(form.value)
|
||||
if (!param['costConfigId'] && costConfigId.value) {
|
||||
param['costConfigId'] = costConfigId.value;
|
||||
}
|
||||
if (param['ebikeSysRcostsetTimePeriodDtos'] && param['ebikeSysRcostsetTimePeriodDtos'].length > 0) {
|
||||
param['ebikeSysRcostsetTimePeriodDtos'].forEach(item => {
|
||||
item['startupTime'] = item['startupTime'].format('HH:mm:ss');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user