|
|
@@ -457,7 +457,9 @@ import {
|
|
|
getStoreDetail,
|
|
|
getHolidayList,
|
|
|
getUserByPhone,
|
|
|
- getMenuByStoreId
|
|
|
+ getMenuByStoreId,
|
|
|
+ getThaliById,
|
|
|
+ saveThali
|
|
|
} from "@/api/modules/groupPackageManagement";
|
|
|
import { useRouter, useRoute } from "vue-router";
|
|
|
import type { UploadProps, FormInstance } from "element-plus";
|
|
|
@@ -1051,12 +1053,15 @@ onMounted(async () => {
|
|
|
holidayList.value = res.data.records;
|
|
|
}
|
|
|
if (type.value != "add") {
|
|
|
- let res: any = await getStoreDetail({ id: id.value } as any);
|
|
|
+ const params = {
|
|
|
+ id: id.value,
|
|
|
+ userId: localGet("userId") || "104"
|
|
|
+ };
|
|
|
+ let res: any = await getThaliById(params);
|
|
|
storeInfoModel.value = { ...storeInfoModel.value, ...res.data.lifeGroupBuyMain };
|
|
|
let imageList: any[] = [];
|
|
|
handleImageParam((res.data as any).businessLicenseAddress || [], imageList);
|
|
|
storeInfoModel.value.imageList = imageList;
|
|
|
- storeInfoModel.value.expirationDateList = storeInfoModel.value.expirationDateList.split(";");
|
|
|
storeInfoModel.value.invoiceInformation = storeInfoModel.value.invoiceType.split(";");
|
|
|
// 确保星期和节日字段存在
|
|
|
const listVal = storeInfoModel.value.disableDateValue.split(";");
|
|
|
@@ -1749,8 +1754,9 @@ const handleSubmit = async (type?) => {
|
|
|
}
|
|
|
let res: any = await saveDraft(paramsObj);
|
|
|
if (res && res.code == 200) {
|
|
|
+ ElMessage.success("保存成功");
|
|
|
+ goBack();
|
|
|
}
|
|
|
- // goBack();
|
|
|
} else {
|
|
|
ruleFormRef.value!.validate(async valid => {
|
|
|
if (!valid) {
|
|
|
@@ -1774,10 +1780,10 @@ const handleSubmit = async (type?) => {
|
|
|
}
|
|
|
}
|
|
|
// 组装提交参数
|
|
|
- let res: any = await saveDraft(paramsObj);
|
|
|
+ let res: any = await saveThali(paramsObj);
|
|
|
if (res && res.code == 200) {
|
|
|
+ ElMessage.success("保存成功");
|
|
|
}
|
|
|
- // goBack();
|
|
|
});
|
|
|
}
|
|
|
};
|