zhc4dev
Gitea 2 years ago
parent 43200f64b4
commit 3b5d71f42c
  1. 4
      ant-design-vue-jeecg/src/views/erp/accessories/ZyAccessoriesList.vue
  2. 2
      ant-design-vue-jeecg/src/views/erp/accessories/modules/ZyAccessoriesForm.vue
  3. 13
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/accessories/controller/ZyAccessoriesController.java
  4. 6
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/accessories/entity/ZyAccessories.java

@ -84,9 +84,9 @@
</template>
<span slot="action" slot-scope="text, record">
<!-- <a @click="handleEdit(record)">编辑</a>-->
<a @click="handleEdit(record)">编辑</a>
<!-- <a-divider type="vertical" />-->
<a-divider type="vertical" />
<!-- -->
<a @click="handleDetail(record.id)">详情</a>

@ -8,7 +8,7 @@
<j-popup
v-model="model.typeName"
field="typeName"
org-fields="nums,contents"
org-fields="id,contents"
dest-fields="typeId,typeName"
code="zy_accessories_type"
:multi="false"

@ -50,7 +50,7 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class ZyAccessoriesController extends JeecgController<ZyAccessories, IZyAccessoriesService> {
@Autowired
private IZyAccessoriesService zyAccessoriesService;
/**
* 分页列表查询
*
@ -73,7 +73,7 @@ public class ZyAccessoriesController extends JeecgController<ZyAccessories, IZyA
IPage<ZyAccessories> pageList = zyAccessoriesService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
@ -93,7 +93,7 @@ public class ZyAccessoriesController extends JeecgController<ZyAccessories, IZyA
zyAccessoriesService.save(zyAccessories);
return Result.OK("添加成功!");
}
/**
* 编辑
*
@ -106,6 +106,7 @@ public class ZyAccessoriesController extends JeecgController<ZyAccessories, IZyA
public Result<?> edit(@RequestBody ZyAccessories zyAccessories) {
QueryWrapper queryWrapper=new QueryWrapper();
queryWrapper.eq("contents",zyAccessories.getContents());
queryWrapper.ne("id",zyAccessories.getId());
int a= zyAccessoriesService.count(queryWrapper);
if(a>=1){
return Result.error("名称重复,请修改后重试!!");
@ -113,7 +114,7 @@ public class ZyAccessoriesController extends JeecgController<ZyAccessories, IZyA
zyAccessoriesService.updateById(zyAccessories);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
@ -127,7 +128,7 @@ public class ZyAccessoriesController extends JeecgController<ZyAccessories, IZyA
zyAccessoriesService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
@ -141,7 +142,7 @@ public class ZyAccessoriesController extends JeecgController<ZyAccessories, IZyA
this.zyAccessoriesService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*

@ -38,8 +38,12 @@ public class ZyAccessories implements Serializable {
/**类型id*/
@Excel(name = "类型id", width = 15)
@ApiModelProperty(value = "类型id")
@Dict(dictTable = "zy_accessories_type", dicText = "contents", dicCode = "nums")
@Dict(dictTable = "zy_accessories_type", dicText = "contents", dicCode = "id")
private java.lang.String typeId;
/**类型名称*/
@Excel(name = "类型名称", width = 15)
@ApiModelProperty(value = "类型名称")
private java.lang.String typeName;
/**编号*/
@Excel(name = "编号", width = 15)
@ApiModelProperty(value = "编号")

Loading…
Cancel
Save