diff --git a/yshop-drink-boot3/yshop-module-mall/yshop-module-store-biz/src/main/java/co/yixiang/yshop/module/store/controller/admin/storeshop/vo/StoreShopBaseVO.java b/yshop-drink-boot3/yshop-module-mall/yshop-module-store-biz/src/main/java/co/yixiang/yshop/module/store/controller/admin/storeshop/vo/StoreShopBaseVO.java index ead713f..08ce3e5 100644 --- a/yshop-drink-boot3/yshop-module-mall/yshop-module-store-biz/src/main/java/co/yixiang/yshop/module/store/controller/admin/storeshop/vo/StoreShopBaseVO.java +++ b/yshop-drink-boot3/yshop-module-mall/yshop-module-store-biz/src/main/java/co/yixiang/yshop/module/store/controller/admin/storeshop/vo/StoreShopBaseVO.java @@ -76,7 +76,7 @@ public class StoreShopBaseVO { private List adminId; @Schema(description = "打印机id", required = true, example = "5596") - @NotNull(message = "打印机id不能为空") + //@NotNull(message = "打印机id不能为空") private String uniprintId; @Schema(description = "营业开始时间", required = true) diff --git a/yshop-drink-vue3/src/utils/formatTime.ts b/yshop-drink-vue3/src/utils/formatTime.ts index 134a986..0b150c4 100644 --- a/yshop-drink-vue3/src/utils/formatTime.ts +++ b/yshop-drink-vue3/src/utils/formatTime.ts @@ -202,13 +202,24 @@ export function dateFormatter(_row: any, _column: TableColumnCtx, cellValue } /** - * element plus 的时间 Formatter 实现,使用 YYYY-MM-DD 格式 + * element plus 的时间 Formatter 实现,使用 HH:mm:ss 格式 * * @param row 行数据 * @param column 字段 * @param cellValue 字段值 */ export function dateFormatter2(_row: any, _column: TableColumnCtx, cellValue: any): string { + return cellValue ? formatDate(cellValue, 'HH:mm:ss') : '' +} + +/** + * element plus 的时间 Formatter 实现,使用 YYYY-MM-DD 格式 + * + * @param row 行数据 + * @param column 字段 + * @param cellValue 字段值 + */ +export function dateFormatter3(_row: any, _column: TableColumnCtx, cellValue: any): string { return cellValue ? formatDate(cellValue, 'YYYY-MM-DD') : '' } diff --git a/yshop-drink-vue3/src/views/mall/store/shop/ShopForm.vue b/yshop-drink-vue3/src/views/mall/store/shop/ShopForm.vue index 474cec7..8f1b19c 100644 --- a/yshop-drink-vue3/src/views/mall/store/shop/ShopForm.vue +++ b/yshop-drink-vue3/src/views/mall/store/shop/ShopForm.vue @@ -133,7 +133,7 @@ const formRules = reactive({ notice: [{ required: true, message: '公告不能为空', trigger: 'blur' }], status: [{ required: true, message: '是否营业:0=否,1=是不能为空', trigger: 'blur' }], adminId: [{ required: true, message: '管理员id不能为空', trigger: 'blur' }], - uniprintId: [{ required: true, message: '打印机id不能为空', trigger: 'blur' }], + //uniprintId: [{ required: true, message: '打印机id不能为空', trigger: 'blur' }], startTime: [{ required: true, message: '营业开始时间不能为空', trigger: 'blur' }], endTime: [{ required: true, message: '营业结束时间不能为空', trigger: 'blur' }] }) @@ -155,7 +155,7 @@ const open = async (type: string, id?: number) => { formType.value = type resetForm() getList() - getPrintList() + //getPrintList() // 修改时,设置数据 if (id) { formLoading.value = true