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 a2921c8a..2d4323e8 100644
--- a/ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentForm.vue
+++ b/ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentForm.vue
@@ -5,7 +5,7 @@
-
+
@@ -167,7 +167,9 @@ export default {
edit: "/base/zyClothsComponent/edit",
queryById: "/base/zyClothsComponent/queryById",
//编号
- sort: "/base/zyClothsComponent/sort"
+ sort: "/base/zyClothsComponent/sort",
+ //企业编号问题
+ enterpriseNum: "/base/zyClothsType/getEnterpriseNum"
}
}
},
@@ -181,6 +183,25 @@ export default {
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
+ getEnterNums() {
+ if (this.model.id) {
+ getAction(this.url.enterpriseNum, {id: this.model.enterpriseId}).then((res) => {
+ if (res.code === 500) {
+ this.$message({
+ type: 'error',
+ message: '只能选择一个企业!'
+ });
+ } else if (res.code !== 200) {
+ this.$message({
+ type: 'error',
+ message: '未查询到数据!'
+ });
+ }
+ this.model.nums = res.result + this.model.nums.substring(4);
+ console.log('编辑中改变企业编号 res.result ' + this.model.nums)
+ })
+ }
+ },
async getNumberClothsComponentList() {
//const {data: res} = await this.$axios.get('/jeecg-boot/base/zyClothsComponent/sort?id=' + this.model.clothsTypeId)
getAction(this.url.sort, {id: this.model.clothsTypeId}).then((res) => {
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 62607b6f..879df058 100644
--- a/ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularForm.vue
+++ b/ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularForm.vue
@@ -5,7 +5,7 @@
-
+
@@ -49,7 +49,8 @@
-
+
@@ -68,44 +69,44 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
@@ -162,7 +163,9 @@ export default {
edit: "/base/zyClothsModular/edit",
queryById: "/base/zyClothsModular/queryById",
//getAction的url
- sort: "/base/zyClothsModular/sort"
+ sort: "/base/zyClothsModular/sort",
+ //企业编号问题
+ enterpriseNum: "/base/zyClothsType/getEnterpriseNum"
}
}
},
@@ -176,8 +179,26 @@ export default {
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
+ getEnterNums() {
+ if (this.model.id) {
+ getAction(this.url.enterpriseNum, {id: this.model.enterpriseId}).then((res) => {
+ if (res.code === 500) {
+ this.$message({
+ type: 'error',
+ message: '只能选择一个企业!'
+ });
+ } else if (res.code !== 200) {
+ this.$message({
+ type: 'error',
+ message: '未查询到数据!'
+ });
+ }
+ this.model.nums = res.result + this.model.nums.substring(4);
+ console.log('编辑中改变企业编号 res.result ' + this.model.nums)
+ })
+ }
+ },
async bianhao() {
- //var n=6
getAction(this.url.sort, {id: this.model.clothsTypeId}).then((res) => {
//let num = res.result;
console.log("+6++++aaa: " + res.result)
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 77f258fa..1da5c58c 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: {
+ enterpriseId: [
+ {required: true, message: '请选择一个企业!'},
+ ],
nums: [
{required: true, message: '请输入编号!'},
],
@@ -85,9 +88,6 @@ export default {
{required: true, message: '请输入类型名称!'},
{pattern: /^[0-9A-Za-z\u4e00-\u9fa5.,;,。;、!()?]{0,50}$/, message: '文本长度过长'},
],
- enterpriseId: [
- {required: true, message: '请选择一个企业!'},
- ],
},
url: {
add: "/base/zyClothsType/add",
@@ -95,7 +95,7 @@ export default {
queryById: "/base/zyClothsType/queryById",
weiyi: "/base/zyClothsType/weiyi",
//企业编号问题
- enterpriseNum: "/zyclothsstyle/zyClothsStyle/enterpriseNum"
+ enterpriseNum: "/base/zyClothsType/getEnterpriseNum"
}
}
},
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 c75718a3..4ed02d1b 100644
--- a/ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleForm.vue
+++ b/ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleForm.vue
@@ -383,7 +383,7 @@ export default {
//getAction的url
sort: "/zyclothsstyle/zyClothsStyle/sort",
//企业编号问题
- enterpriseNum: "/zyclothsstyle/zyClothsStyle/enterpriseNum"
+ enterpriseNum: "/base/zyClothsType/getEnterpriseNum"
}
}
},
@@ -404,7 +404,7 @@ export default {
if (res.code === 500) {
this.$message({
type: 'error',
- message: '只能选择一个企业!'
+ message: res.message,
});
} else if (res.code !== 200) {
this.$message({
diff --git a/ant-design-vue-jeecg/src/views/zystylemodel/ZyStyleModelList.vue b/ant-design-vue-jeecg/src/views/zystylemodel/ZyStyleModelList.vue
index 8ec60646..de50a28c 100644
--- a/ant-design-vue-jeecg/src/views/zystylemodel/ZyStyleModelList.vue
+++ b/ant-design-vue-jeecg/src/views/zystylemodel/ZyStyleModelList.vue
@@ -75,6 +75,8 @@ import {filterObj, validateDuplicateValue} from '@/utils/util'
import ZyStyleModelListDetails from "@views/zystylemodel/modules/ZyStyleModelListDetails";
export default {
+ //在官方文档 搜索Jv 会有很多 可以都看一下
+ //JVXETable 事件中有很多的方法可以丰富功能
name: 'ZyStyleModelList',
mixins: [JeecgListMixin, mixinDevice],
components: {
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 9bdb6161..97464523 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
@@ -14,6 +14,7 @@ import org.jeecg.modules.demo.base.entity.ZyClothsType;
import org.jeecg.modules.demo.base.mapper.ZyClothsTypeMapper;
import org.jeecg.modules.demo.base.service.IZyClothsTypeService;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
@@ -79,6 +80,11 @@ public class ZyClothsTypeController extends JeecgController add(@RequestBody ZyClothsType zyClothsType) {
+ //处理空值问题
+// Result> resultEmpty = zyClothsTypeService.handleEmpty(zyClothsType);
+// if (resultEmpty.getMessage().equals("都不为空")){
+// return resultEmpty;
+// }
if (StringUtils.isEmpty(zyClothsType.getNums())) {
return Result.error("服装类型编号 不能为空");
}
@@ -207,5 +213,18 @@ public class ZyClothsTypeController extends JeecgController enterpriseNum(@RequestParam(name = "id", required = true)String id) {
+ if (StringUtils.isEmpty(id)) {
+ return Result.error("请先选择一个企业");
+ } else if (id.contains(",")) {
+ //id.contains(",") 判断是否字符中是否包含","
+ return Result.error("只能选择一个企业");
+ } else {
+ String enterpriseName = zyClothsTypeMapper.getEnterprisenameById(id);
+ //根据企业名称拿到企业编号
+ return Result.OK(zyClothsTypeService.getEnterpriseNums(enterpriseName));
+ }
+ }
}
diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/IZyClothsTypeService.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/IZyClothsTypeService.java
index 514ac01b..95894871 100644
--- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/IZyClothsTypeService.java
+++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/IZyClothsTypeService.java
@@ -1,5 +1,6 @@
package org.jeecg.modules.demo.base.service;
+import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.demo.base.entity.ZyClothsType;
import com.baomidou.mybatisplus.extension.service.IService;
@@ -30,4 +31,5 @@ public interface IZyClothsTypeService extends IService {
*/
Long getListMax(List stringList, int digits);
+ Result> handleEmpty(ZyClothsType zyClothsType);
}
diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsTypeServiceImpl.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsTypeServiceImpl.java
index 35d9f6b7..761132ed 100644
--- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsTypeServiceImpl.java
+++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsTypeServiceImpl.java
@@ -1,5 +1,6 @@
package org.jeecg.modules.demo.base.service.impl;
+import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.demo.base.entity.ZyClothsType;
import org.jeecg.modules.demo.base.mapper.ZyClothsTypeMapper;
import org.jeecg.modules.demo.base.service.IZyClothsTypeService;
@@ -7,6 +8,7 @@ import org.jetbrains.annotations.NotNull;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import javax.annotation.Resource;
@@ -93,7 +95,10 @@ public class ZyClothsTypeServiceImpl extends ServiceImpl stringList, int digits) {
+ public Long getListMax(List stringList, int digits) {
+ if (ObjectUtils.isEmpty(stringList)){
+ return 1L;
+ }
List longList = new ArrayList<>();
String REGEX = "[^0-9]";
for (String nums : stringList) {
@@ -116,4 +121,20 @@ public class ZyClothsTypeServiceImpl extends ServiceImpl handleEmpty(ZyClothsType zyClothsType) {
+ if (ObjectUtils.isEmpty(zyClothsType)){
+ return Result.error("服装类型数据 不能为空");
+ }
+ if (StringUtils.isEmpty(zyClothsType.getNums())) {
+ return Result.error("服装类型编号 不能为空");
+ }
+ //type_name,类型名称,varchar,50,非空,同类型下不重复
+ if (!StringUtils.hasText(zyClothsType.getTypeName())) {
+ return Result.error("类型名称 不能为空");
+ }
+
+ return Result.error("true");
+ }
+
}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/controller/ZyClothsStyleController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/controller/ZyClothsStyleController.java
index cd72fec5..78228b55 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/controller/ZyClothsStyleController.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/controller/ZyClothsStyleController.java
@@ -172,20 +172,20 @@ public class ZyClothsStyleController extends JeecgController enterpriseNum(@RequestParam(name = "id", required = true) String id) {
- //id.contains(",") 判断是否字符中是否包含","
- if (id.contains(",")) {
- return Result.error("只能选择一个企业");
- } else {
- String sort = zyClothsStyleService.enterpriseNum(id);
- //System.err.println(sort + " enterpriseNum");
- if (StringUtils.isEmpty(sort)) {
- return Result.OK(0);
- }
- return Result.OK(sort);
- }
- }
+// @GetMapping(value = "/enterpriseNum")
+// public Result> enterpriseNum(@RequestParam(name = "id", required = true) String id) {
+// //id.contains(",") 判断是否字符中是否包含","
+// if (id.contains(",")) {
+// return Result.error("只能选择一个企业");
+// } else {
+// String sort = zyClothsStyleService.enterpriseNum(id);
+// //System.err.println(sort + " enterpriseNum");
+// if (StringUtils.isEmpty(sort)) {
+// return Result.OK(0);
+// }
+// return Result.OK(sort);
+// }
+// }
/**
* getAction的url sort 编码
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/IZyClothsStyleService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/IZyClothsStyleService.java
index efabb20c..84f044f3 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/IZyClothsStyleService.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/IZyClothsStyleService.java
@@ -24,5 +24,5 @@ public interface IZyClothsStyleService extends IService {
*/
AllClothStyle queryDetail(String id);
- String enterpriseNum(String id);
+ //String enterpriseNum(String id);
}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/impl/ZyClothsStyleServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/impl/ZyClothsStyleServiceImpl.java
index 45edbb66..d709f387 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/impl/ZyClothsStyleServiceImpl.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/impl/ZyClothsStyleServiceImpl.java
@@ -59,7 +59,7 @@ public class ZyClothsStyleServiceImpl extends ServiceImpl zyClothsStyles = detail(id);
+ List zyClothsStyles = this.detail(id);
zyAll.setZyClothsStyles(zyClothsStyles);
//服装 款式 模块详情
List zyStyleModuleList = zyStyleModuleService.detail(id);
@@ -80,12 +80,12 @@ public class ZyClothsStyleServiceImpl extends ServiceImpl detail(String id){
ZyClothsStyle zyClothsStyle = zyClothsStyleMapper.selectById(id);