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 165b8b71..ef848fc6 100644 --- a/ant-design-vue-jeecg/src/views/erp/fabric/ZyFabricList.vue +++ b/ant-design-vue-jeecg/src/views/erp/fabric/ZyFabricList.vue @@ -4,6 +4,21 @@
+ + + + + + + + + + + + + + + @@ -154,15 +169,20 @@ import ZyFabricFormDetail from './modules/ZyFabricFormDetail' } }, { - title:'名称', + title:'类型', align:"center", - dataIndex: 'name' + dataIndex: 'typeId' }, { - title:'面料编号', + title:'编号', align:"center", dataIndex: 'fabricNumber' }, + { + title:'名称', + align:"center", + dataIndex: 'name' + }, { title:'颜色', align:"center", @@ -171,42 +191,42 @@ import ZyFabricFormDetail from './modules/ZyFabricFormDetail' { title:'花样', align:"center", - dataIndex: 'pattern' + dataIndex: 'pattern_dictText' }, { title:'材质', align:"center", - dataIndex: 'material' + dataIndex: 'material_dictText' }, { - title:'描述', + title:'厚度', align:"center", - dataIndex: 'description' + dataIndex: 'ply_dictText' }, { - title:'厚度', + title:'单价', align:"center", - dataIndex: 'ply' + dataIndex: 'money' }, { - title:'金额', + title:'零售价', align:"center", - dataIndex: 'money' + dataIndex: 'retailPrice' }, { - title:'面料组别', + title:'品牌', align:"center", - dataIndex: 'fabricGroupId_dictText' + dataIndex: 'brandId_dictText' }, { - title:'面料品牌', + title:'计量单位', align:"center", - dataIndex: 'brandId' + dataIndex: 'unit_dictText' }, { - title:'库存', + title:'密度', align:"center", - dataIndex: 'store' + dataIndex: 'density_dictText' }, { title:'幅宽', @@ -214,21 +234,32 @@ import ZyFabricFormDetail from './modules/ZyFabricFormDetail' dataIndex: 'clothW' }, { - title:'密度', + title:'所在地区', align:"center", - dataIndex: 'density' + dataIndex: 'location' }, { title:'状态', align:"center", - dataIndex: 'status' + dataIndex: 'status_dictText' }, { title:'二维码', align:"center", - dataIndex: 'img', + dataIndex: 'qRcode', scopedSlots: {customRender: 'imgSlot'} }, + + { + title:'供货商', + align:"center", + dataIndex: 'supplierInfo_dictText' + }, + { + title:'创建时间', + align:"center", + dataIndex: 'createTime' + }, { title: '操作', dataIndex: 'action', @@ -262,28 +293,25 @@ import ZyFabricFormDetail from './modules/ZyFabricFormDetail' }, getSuperFieldList(){ let fieldList=[]; - fieldList.push({type:'string',value:'name',text:'名称',dictCode:''}) - fieldList.push({type:'string',value:'fabricNumber',text:'面料编号',dictCode:''}) fieldList.push({type:'string',value:'color',text:'颜色',dictCode:''}) - fieldList.push({type:'string',value:'pattern',text:'花样',dictCode:''}) - fieldList.push({type:'string',value:'material',text:'材质',dictCode:''}) - fieldList.push({type:'string',value:'ply',text:'厚度',dictCode:''}) - fieldList.push({type:'int',value:'money',text:'金额',dictCode:''}) - fieldList.push({type:'string',value:'fabricGroupId',text:'面料组别',dictCode:'zy_fabric_group,name,id'}) - fieldList.push({type:'string',value:'brandId',text:'面料品牌',dictCode:''}) - fieldList.push({type:'int',value:'store',text:'库存',dictCode:''}) + fieldList.push({type:'sel_search',value:'pattern',text:'花样',dictTable:'', dictText:'', dictCode:''}) + fieldList.push({type:'sel_search',value:'material',text:'材质',dictTable:'', dictText:'', dictCode:''}) + fieldList.push({type:'sel_search',value:'ply',text:'厚度',dictTable:'', dictText:'', dictCode:''}) + fieldList.push({type:'int',value:'money',text:'单价',dictCode:''}) + fieldList.push({type:'string',value:'imageUrl',text:'图片地址',dictCode:''}) + fieldList.push({type:'popup',value:'typeId',text:'面料类型id', popup:{code:'zy_fabric_type',field:'id',orgFields:'id',destFields:'content'}}) + fieldList.push({type:'sel_search',value:'brandId',text:'材料品牌id',dictTable:'', dictText:'', dictCode:''}) + fieldList.push({type:'string',value:'fabricNumber',text:'材料编号',dictCode:''}) fieldList.push({type:'int',value:'unit',text:'1、为m。2:kg,等',dictCode:''}) - fieldList.push({type:'string',value:'category1Id',text:'一级面料表分类',dictCode:'zy_category,name,id'}) - fieldList.push({type:'string',value:'category2Id',text:'二级面料表分类',dictCode:'zy_category,name,id'}) - fieldList.push({type:'string',value:'category3Id',text:'三级面料表分类',dictCode:'zy_category,name,id'}) - fieldList.push({type:'int',value:'sort',text:'排序',dictCode:''}) - fieldList.push({type:'int',value:'fabricType',text:'0:无,1:特价,2:推荐等等',dictCode:''}) - fieldList.push({type:'string',value:'clothW',text:'幅宽',dictCode:''}) - fieldList.push({type:'string',value:'density',text:'密度',dictCode:''}) - fieldList.push({type:'int',value:'status',text:'状态',dictCode:''}) fieldList.push({type:'int',value:'retailPrice',text:'零售价',dictCode:''}) + fieldList.push({type:'sel_search',value:'density',text:'密度',dictTable:'', dictText:'', dictCode:''}) + fieldList.push({type:'string',value:'clothW',text:'幅宽',dictCode:''}) fieldList.push({type:'string',value:'location',text:'所在地区',dictCode:''}) - fieldList.push({type:'int',value:'logisticsFreight',text:'物流运费',dictCode:''}) + fieldList.push({type:'int',value:'status',text:'状态 o 为下架 1为上架 ',dictCode:''}) + fieldList.push({type:'string',value:'qRcode',text:'二维码',dictCode:''}) + fieldList.push({type:'string',value:'name',text:'名称',dictCode:''}) + fieldList.push({type:'sel_depart',value:'supplierInfo',text:'供货商信息'}) + fieldList.push({type:'string',value:'createTime',text:'创建时间',dictCode:''}) this.superFieldList = fieldList }, openDetail(id){ diff --git a/ant-design-vue-jeecg/src/views/erp/fabric/ZyFabricTypeList.vue b/ant-design-vue-jeecg/src/views/erp/fabric/ZyFabricTypeList.vue index e81832ea..335c7eea 100644 --- a/ant-design-vue-jeecg/src/views/erp/fabric/ZyFabricTypeList.vue +++ b/ant-design-vue-jeecg/src/views/erp/fabric/ZyFabricTypeList.vue @@ -4,6 +4,22 @@
+ + + + + + + + + + + + + 查询 + 重置 + +
@@ -13,11 +29,11 @@
新增 导出 - - 导入 - + + + - + 删除 @@ -71,19 +87,12 @@ 编辑 - - 更多 - - - 详情 - - - - 删除 - - - - + 详情 + + + + 删除 + @@ -131,6 +140,11 @@ align:"center", dataIndex: 'content' }, + { + title:'创建时间', + align:"center", + dataIndex: 'createTime' + }, { title: '操作', dataIndex: 'action', 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 1613fb4b..aa868e9a 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 @@ -4,13 +4,26 @@ - - + + - - + + + + + + + @@ -20,85 +33,47 @@ - + - - - - - - + + + + + + - - + + - - - - - - - 在线 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - + + - - + + - - + + @@ -107,8 +82,8 @@ - - + + @@ -117,32 +92,85 @@ - - - - - - - + + - - + + + + + + + + + + + + + - - + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -186,6 +214,18 @@ }, confirmLoading: false, validatorRules: { + color: [ + { required: true, message: '请输入颜色!'}, + ], + pattern: [ + { required: true, message: '请输入花样!'}, + ], + fabricNumber: [ + { required: true, message: '请输入面料编号!'}, + ], + name: [ + { required: true, message: '请输入名称!'}, + ], }, url: { add: "/fabric/zyFabric/add", diff --git a/ant-design-vue-jeecg/src/views/erp/fabric/modules/ZyFabricTypeForm.vue b/ant-design-vue-jeecg/src/views/erp/fabric/modules/ZyFabricTypeForm.vue index 08f8433a..d1b276dd 100644 --- a/ant-design-vue-jeecg/src/views/erp/fabric/modules/ZyFabricTypeForm.vue +++ b/ant-design-vue-jeecg/src/views/erp/fabric/modules/ZyFabricTypeForm.vue @@ -50,6 +50,12 @@ }, confirmLoading: false, validatorRules: { + nums: [ + { pattern: /^\d{4,4}$/, message: '请输入4位数字!'}, + ], + content: [ + { pattern: /^.{0,30}$/, message: '输入名称过长!'}, + ], }, url: { add: "/fabric/zyFabricType/add", 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 78a9128e..199d1de1 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 @@ -68,8 +68,8 @@ public class ZyFabricTypeController extends JeecgController queryWrapper = QueryGenerator.initQueryWrapper(zyFabricType, req.getParameterMap()); - QueryWrapper queryWrapper = new QueryWrapper(); + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(zyFabricType, req.getParameterMap()); +// QueryWrapper queryWrapper = new QueryWrapper(); Page page = new Page(pageNo, pageSize); IPage pageList = zyFabricTypeService.page(page, queryWrapper); return Result.OK(pageList); @@ -85,6 +85,15 @@ public class ZyFabricTypeController extends JeecgController add(@RequestBody ZyFabricType zyFabricType) { + List list = zyFabricTypeService.list(); + for (ZyFabricType zy : list){ + if (zy.getNums().equals(zyFabricType.getNums())){ + return Result.error("编号重复,请重新输入"); + } + if (zy.getContent().equals(zyFabricType.getContent())){ + return Result.error("名称重复,请重新输入"); + } + } zyFabricTypeService.save(zyFabricType); return Result.OK("添加成功!"); } @@ -99,6 +108,15 @@ public class ZyFabricTypeController extends JeecgController edit(@RequestBody ZyFabricType zyFabricType) { + List list = zyFabricTypeService.list(); + for (ZyFabricType zy : list){ + if (zy.getNums().equals(zyFabricType.getNums())){ + return Result.error("编号重复,请重新输入"); + } + if (zy.getContent().equals(zyFabricType.getContent())){ + return Result.error("名称重复,请重新输入"); + } + } zyFabricTypeService.updateById(zyFabricType); 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 bd8a2b6f..53c61aac 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 @@ -83,60 +83,30 @@ public class ZyFabric implements Serializable { @ApiModelProperty(value = "图片地址") private String imageUrl; - /**材料组别id*/ - @Dict(dicCode = "id", dicText = "name", dictTable = "zy_fabric_group") - @Excel(name = "材料组别id", width = 15) - @ApiModelProperty(value = "材料组别id") - private String fabricGroupId; + /**面料类型id*/ + @ApiModelProperty(value = "面料类型id") + private String typeId; + + @ApiModelProperty(value = "图片地址") + private String pictureUrl; + /**材料品牌id*/ - @Excel(name = "材料品牌id", width = 15) + @Excel(name = "面料品牌id", width = 15) @ApiModelProperty(value = "材料品牌id") private String brandId; /**材料编号*/ - @Excel(name = "材料编号", width = 15) - @ApiModelProperty(value = "材料编号") + @Excel(name = "面料编号", width = 15) + @ApiModelProperty(value = "面料编号") private String fabricNumber; - /**库存(不用)*/ - @Excel(name = "库存(不用)", width = 15) - @ApiModelProperty(value = "库存(不用)") - private Integer store; /**1、为m。2:kg,等*/ @Excel(name = "1、为m。2:kg,等", width = 15) @ApiModelProperty(value = "1、为m。2:kg,等") private Integer unit; - /**一级面料表分类*/ - @Excel(name = "一级面料表分类", width = 15) - @ApiModelProperty(value = "一级面料表分类") - private String category1Id; - /**二级面料表分类*/ - @Excel(name = "二级面料表分类", width = 15) - @ApiModelProperty(value = "二级面料表分类") - private String category2Id; - /**三级面料表分类*/ - @Excel(name = "三级面料表分类", width = 15) - @ApiModelProperty(value = "三级面料表分类") - private String category3Id; - /**排序*/ - @Excel(name = "排序", width = 15) - @ApiModelProperty(value = "排序") - private Integer sort; - /**0:无,1:特价,2:推荐等等*/ - @Excel(name = "0:无,1:特价,2:推荐等等", width = 15) - @ApiModelProperty(value = "0:无,1:特价,2:推荐等等") - private Integer fabricType; /**零售价*/ @Excel(name = "零售价", width = 15) @ApiModelProperty(value = "零售价") private Integer retailPrice; - /**物流详情*/ - @Excel(name = "物流详情", width = 15) - @ApiModelProperty(value = "物流详情") - private String logisticsDetail; - /**物流运费*/ - @Excel(name = "物流运费", width = 15) - @ApiModelProperty(value = "物流运费") - private Integer logisticsFreight; /**密度*/ @Excel(name = "密度", width = 15) @ApiModelProperty(value = "密度") @@ -157,18 +127,10 @@ public class ZyFabric implements Serializable { @Excel(name = "二维码", width = 15) @ApiModelProperty(value = "二维码") private String qRcode; - /**有效期明细管理*/ - @Excel(name = "有效期明细管理", width = 15) - @ApiModelProperty(value = "有效期明细管理") - private String useTime; /**名称*/ @Excel(name = "名称", width = 15) @ApiModelProperty(value = "名称") private String name; - /**门幅宽度*/ - @Excel(name = "门幅宽度", width = 15) - @ApiModelProperty(value = "门幅宽度") - private String doorW; /**克重*/ @Excel(name = "克重", width = 15) @ApiModelProperty(value = "克重") @@ -181,6 +143,7 @@ public class ZyFabric implements Serializable { @Excel(name = "供货商信息", width = 15) @ApiModelProperty(value = "供货商信息") private String supplierInfo; + /**二维码*/ @ApiModelProperty(value = "二维码")