diff --git a/ant-design-vue-jeecg/src/views/erp/fabric/ZyFabricList.vue b/ant-design-vue-jeecg/src/views/erp/fabric/ZyFabricList.vue
index 7dbf9367..bc6902c1 100644
--- a/ant-design-vue-jeecg/src/views/erp/fabric/ZyFabricList.vue
+++ b/ant-design-vue-jeecg/src/views/erp/fabric/ZyFabricList.vue
@@ -247,7 +247,11 @@ import ZyFabricFormDetail from './modules/ZyFabricFormDetail'
dataIndex: 'qRcode',
scopedSlots: {customRender: 'imgSlot'}
},
-
+ {
+ title:'等级',
+ align:"center",
+ dataIndex: 'fabricGrade_dictText'
+ },
{
title:'供货商信息',
align:"center",
@@ -307,6 +311,7 @@ import ZyFabricFormDetail from './modules/ZyFabricFormDetail'
fieldList.push({type:'string',value:'clothW',text:'幅宽',dictCode:'clothW,,'})
fieldList.push({type:'string',value:'location',text:'所在地区',dictCode:''})
fieldList.push({type:'int',value:'status',text:'状态 o 为下架 1为上架 ',dictCode:'fabric_status,,'})
+ fieldList.push({type:'int',value:'fabricGrade',text:'等级',dictCode:'fabric_grade,,'})
fieldList.push({type:'string',value:'qRcode',text:'二维码',dictCode:''})
fieldList.push({type:'string',value:'name',text:'名称',dictCode:''})
fieldList.push({type:'sel_depart',value:'supplierInfo',text:'供货商信息'})
diff --git a/ant-design-vue-jeecg/src/views/erp/fabric/modules/ZyFabricForm.vue b/ant-design-vue-jeecg/src/views/erp/fabric/modules/ZyFabricForm.vue
index 1de2c8ac..601e8f87 100644
--- a/ant-design-vue-jeecg/src/views/erp/fabric/modules/ZyFabricForm.vue
+++ b/ant-design-vue-jeecg/src/views/erp/fabric/modules/ZyFabricForm.vue
@@ -91,6 +91,11 @@
+
+
+
+
+
diff --git a/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/fabric/controller/ZyFabricTypeController.java b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/fabric/controller/ZyFabricTypeController.java
index c6763439..10bd9486 100644
--- a/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/fabric/controller/ZyFabricTypeController.java
+++ b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/fabric/controller/ZyFabricTypeController.java
@@ -14,7 +14,9 @@ import com.sun.mail.util.QEncoderStream;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.demo.fabric.entity.ZyFabric;
import org.jeecg.modules.demo.fabric.entity.ZyFabricType;
+import org.jeecg.modules.demo.fabric.service.IZyFabricService;
import org.jeecg.modules.demo.fabric.service.IZyFabricTypeService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -51,6 +53,8 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class ZyFabricTypeController extends JeecgController {
@Autowired
private IZyFabricTypeService zyFabricTypeService;
+ @Autowired
+ private IZyFabricService zyFabricService; //面料表
/**
* 分页列表查询
@@ -133,6 +137,12 @@ public class ZyFabricTypeController extends JeecgController delete(@RequestParam(name="id",required=true) String id) {
+ List zyFabricsList = zyFabricService.list();
+ for (ZyFabric zyFabric : zyFabricsList){
+ if (zyFabric.getTypeId().equals(id)){
+ return Result.error("此面料类型已被使用,禁止删除!");
+ }
+ }
zyFabricTypeService.removeById(id);
return Result.OK("删除成功!");
}
diff --git a/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/fabric/entity/ZyFabric.java b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/fabric/entity/ZyFabric.java
index ec020f90..6a835743 100644
--- a/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/fabric/entity/ZyFabric.java
+++ b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/fabric/entity/ZyFabric.java
@@ -113,6 +113,11 @@ public class ZyFabric implements Serializable {
@Excel(name = "二维码", width = 15)
@ApiModelProperty(value = "二维码")
private java.lang.String qRcode;
+ /**等级*/
+ @Excel(name = "等级", width = 15,dictTable = "", dicText = "", dicCode = "fabric_grade")
+ @ApiModelProperty(value = "等级")
+ @Dict(dictTable = "", dicText = "", dicCode = "fabric_grade")
+ private java.lang.Integer fabricGrade;
/**名称*/
@Excel(name = "名称", width = 15)
@ApiModelProperty(value = "名称")
@@ -151,4 +156,6 @@ public class ZyFabric implements Serializable {
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private java.lang.String sysOrgCode;
+ /**所属部门*/
+
}