diff --git a/ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentForm.vue b/ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentForm.vue index 2d4323e8..bf895112 100644 --- a/ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentForm.vue +++ b/ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentForm.vue @@ -145,6 +145,9 @@ export default { }, confirmLoading: false, validatorRules: { + enterpriseId: [ + {required: true, message: '请选择企业!'}, + ], nums: [ {required: true, message: '部件编号不能为空!'}, ], @@ -154,6 +157,7 @@ export default { partsName: [ {required: true, message: '请输入部件名称!'}, ], + //这个字段暂时不需要 // modularId: [ // { required: true, message: '请选择模块!'}, // ], diff --git a/ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularForm.vue b/ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularForm.vue index 879df058..aa2fb67f 100644 --- a/ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularForm.vue +++ b/ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularForm.vue @@ -146,16 +146,22 @@ export default { }, confirmLoading: false, validatorRules: { - // nums: [ - // { required: true, message: '请输入编号!'}, - // ], + enterpriseId: [ + {required: true, message: '请选择企业!'}, + ], + modularType: [ + {required: true, message: '请选择模块类型!'}, + ], + nums: [ + { required: true, message: '请输入编号!'}, + ], modularName: [ {required: true, message: '请输入模块名称!'}, //{ pattern: /^[0-9A-Za-z\u4e00-\u9fa5.,;,。;、!()?]{0,50}$/, message: '文本长度过长'}, {min: 1, max: 50, message: '最多输入50字!', trigger: 'blur'}, ], clothsTypeId: [ - {required: true, message: '请选择衣服类型!'}, + {required: true, message: '请选择服装类型!'}, ] }, url: { diff --git a/ant-design-vue-jeecg/src/views/process/modules/ZyClothsTypeForm.vue b/ant-design-vue-jeecg/src/views/process/modules/ZyClothsTypeForm.vue index 1da5c58c..544b20e9 100644 --- a/ant-design-vue-jeecg/src/views/process/modules/ZyClothsTypeForm.vue +++ b/ant-design-vue-jeecg/src/views/process/modules/ZyClothsTypeForm.vue @@ -78,6 +78,9 @@ export default { }, confirmLoading: false, validatorRules: { + typeId: [ + {required: true, message: '请选择上级类型'}, + ], enterpriseId: [ {required: true, message: '请选择一个企业!'}, ], @@ -88,6 +91,7 @@ export default { {required: true, message: '请输入类型名称!'}, {pattern: /^[0-9A-Za-z\u4e00-\u9fa5.,;,。;、!()?]{0,50}$/, message: '文本长度过长'}, ], + }, url: { add: "/base/zyClothsType/add", diff --git a/ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleForm.vue b/ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleForm.vue index 4ed02d1b..c0e2d24a 100644 --- a/ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleForm.vue +++ b/ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleForm.vue @@ -363,18 +363,21 @@ export default { }, confirmLoading: false, validatorRules: { - // typeId: [ - // {required: true, message: '请选择服装类型!'}, - // ], + typeId: [ + {required: true, message: '请选择服装类型!'}, + ], + enterpriseId: [ + {required: true, message: '请选择企业!'}, + ], nums: [ { required: true, message: '请输入编号!'}, ], styleNames: [ {required: true, message: '请输入款式名称!'}, ], - // positionid: [ - // {required: true, message: '请选择组委会职务!'}, - // ], + shape: [ + {required: true, message: '请选择形式!'}, + ], }, url: { add: "/zyclothsstyle/zyClothsStyle/add", diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsComponentController.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsComponentController.java index b3e56202..02921535 100644 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsComponentController.java +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsComponentController.java @@ -138,6 +138,15 @@ public class ZyClothsComponentController extends JeecgController add(@RequestBody ZyClothsModular zyClothsModular) { //zyClothsModular.setNums(zyClothsModularService.generateNumber(zyClothsModular)); + if (StringUtils.isEmpty(zyClothsModular.getModularType())) { + return Result.error("添加失败!模块类型不能为空"); + } + if (StringUtils.isEmpty(zyClothsModular.getEnterpriseId())) { + return Result.error("添加失败!企业不能为空"); + } + if (StringUtils.isEmpty(zyClothsModular.getModularName())) { + return Result.error("添加失败!模块名称不能为空"); + } + if (StringUtils.isEmpty(zyClothsModular.getClothsTypeId())) { + return Result.error("添加失败!服装类型不能为空"); + } + if (StringUtils.isEmpty(zyClothsModular.getNums())) { + return Result.error("添加失败!编号不能为空"); + } //模块名称不能重复 List zyClothsModularList = zyClothsModularService.list(); for (ZyClothsModular zy : zyClothsModularList) { diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsTypeController.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsTypeController.java index 97464523..51f937fc 100644 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsTypeController.java +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsTypeController.java @@ -88,6 +88,12 @@ public class ZyClothsTypeController extends JeecgController