diff --git a/ant-design-vue-jeecg/src/views/zyclothsample/ZyClothSampleList.vue b/ant-design-vue-jeecg/src/views/zyclothsample/ZyClothSampleList.vue
index a16a4f5c..96ee4734 100644
--- a/ant-design-vue-jeecg/src/views/zyclothsample/ZyClothSampleList.vue
+++ b/ant-design-vue-jeecg/src/views/zyclothsample/ZyClothSampleList.vue
@@ -11,8 +11,8 @@
-
-
+
+
@@ -108,45 +108,50 @@
-
+ // TODO: 跳转到模块样板
+
+ 模块样板
+
+
+
编辑
-
+
-
-
+
+
+
详情
-
+
handleDelete(record.id)">
删除
-
+
-
+
@@ -188,23 +193,27 @@ export default {
{
title: '款式',
align: "center",
- dataIndex: 'styleId'
+ dataIndex: 'styleId',
},
{
title: '型号',
align: "center",
- dataIndex: 'stylemodelId'
- },
- /*{
- title: '模块样板',
- align: "center",
- dataIndex: 'modelSample'
- },*/
- {
- title: '模块样板',
- align: "center",
- dataIndex: 'modelSample_dictText'
+ dataIndex: 'stylemodelId_dictText',
+ //dictCode: 'modenumber',
},
+ // {
+ // title: '模块样板',
+ // align: "center",
+ // dataIndex: 'modelSample_dictText'
+ // },
+ // {
+ // title: '管理模块',
+ // dataIndex: 'action1',
+ // align: "center",
+ // fixed: "right",
+ // width: 110,
+ // scopedSlots: {customRender: 'action1'}
+ // },
{
title: '用户名',
align: "center",
@@ -216,27 +225,21 @@ export default {
dataIndex: 'createTime'
},
- /*{
- title: '成衣名称',
- align: "center",
- dataIndex: 'clothName'
- },*/
- /*{
- title: '描述',
- align: "center",
- dataIndex: 'descr'
- },*/
/*{
title: '图片',
align: "center",
dataIndex: 'url',
scopedSlots: {customRender: 'imgSlot'}
},*/
- /*{
- title: '用户类型',
+
+ {
+ title: '管理模块',
+ dataIndex: 'action1',
align: "center",
- dataIndex: 'type'
- },*/
+ fixed: "right",
+ width: 110,
+ scopedSlots: {customRender: 'action1'}
+ },
{
title: '操作',
@@ -249,6 +252,7 @@ export default {
],
url: {
list: "/zyclothsample/zyClothSample/list",
+ edit: "/zyclothsample/zyClothSample/edit",
delete: "/zyclothsample/zyClothSample/delete",
deleteBatch: "/zyclothsample/zyClothSample/deleteBatch",
exportXlsUrl: "/zyclothsample/zyClothSample/exportXls",
@@ -261,7 +265,8 @@ export default {
},
created() {
this.getSuperFieldList();
- },
+ }
+ ,
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
@@ -270,27 +275,42 @@ export default {
methods: {
initDictConfig() {
},
+ jumpPage(record) {
+ this.$router.push({
+ path: '/src/views/sample/ZyModuleSampleList',
+ // query: { //路由携带参数
+ // 'id': record.id,
+ // }
+ });
+ },
+
lookFile(fileUrl) {
let file = window._CONFIG['domianURL'] + "/sys/common/static/" + fileUrl
let Base64 = require('js-base64').Base64;
let url = window._CONFIG['onlinePreviewDomainURL'] + '/onlinePreview?url=' + encodeURIComponent(Base64.encode(file))
window.open(url);
- },
+ }
+ ,
getSuperFieldList() {
let fieldList = [];
- fieldList.push({type: 'string', value: 'nums', text: '编号', dictCode: ''})
- fieldList.push({type: 'string', value: 'styleId', text: '款式', dictCode: ''})
- fieldList.push({type: 'string', value: 'stylemodelId', text: '型号', dictCode: ''})
+ fieldList.push({type: 'string', value: 'nums', text: '编号', dictCode:''})
+ fieldList.push({type: 'string', value: 'styleId', text: '款式', dictCode:''})
+ fieldList.push({type: 'string', value: 'stylemodelId', text: '型号', dictCode: 'modenumber'})
fieldList.push({type: 'string', value: 'modelSample', text: '模块样板', dictCode: ''})
fieldList.push({type: 'string', value: 'userId', text: '用户名', dictCode: ''})
fieldList.push({type: 'string', value: 'createTime', text: '创建时间', dictCode: ''})
this.superFieldList = fieldList
- },
+ }
+ ,
openDetail(id) {
this.$refs.ZyClothSampleDetail.showModal(id)
// this.$children[0].showModal(id)
}
+ ,
+ // handleDetail(id){
+ // this.$refs.ZyClothSampleDetail.showModal(id)
+ // }
}
}
diff --git a/ant-design-vue-jeecg/src/views/zyclothsample/modules/ZyClothSampleForm.vue b/ant-design-vue-jeecg/src/views/zyclothsample/modules/ZyClothSampleForm.vue
index f35082f8..9a619203 100644
--- a/ant-design-vue-jeecg/src/views/zyclothsample/modules/ZyClothSampleForm.vue
+++ b/ant-design-vue-jeecg/src/views/zyclothsample/modules/ZyClothSampleForm.vue
@@ -5,53 +5,53 @@
-
+
+
-
+
-
+
-
+
-
-
+
+
+
+
+
-
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
-
-
+
+
-
+
+
@@ -60,90 +60,131 @@
\ No newline at end of file
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/controller/ZyClothSampleController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/controller/ZyClothSampleController.java
index 129a38b5..bfd4998a 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/controller/ZyClothSampleController.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/controller/ZyClothSampleController.java
@@ -82,6 +82,11 @@ public class ZyClothSampleController extends JeecgController add(@RequestBody ZyClothSample zyClothSample) {
+ /*if (zyClothSample.getStyleId()==null){
+ return Result.error("款式不能为空");
+ }
+ if (zyClothSample.getModelSample()==null)
+ return Result.error("模块样板不能为空");*/
zyClothSampleService.save(zyClothSample);
return Result.OK("添加成功!");
}
@@ -96,8 +101,20 @@ public class ZyClothSampleController extends JeecgController edit(@RequestBody ZyClothSample zyClothSample) {
+ //查询所有
+ List zyClothSampleList = zyClothSampleService.list();
+ //查询编辑行的数据
+ ZyClothSample clothSample = zyClothSampleService.getById(zyClothSample.getId());
+ //移除编辑行数据
+ zyClothSampleList.remove(clothSample);
+ //将编辑行数据与其它数据比较 如果重复 报错
+ for (ZyClothSample cloth: zyClothSampleList) {
+ if (cloth.getNums().equals(zyClothSample.getNums())){
+ return Result.error("编号重复,请重新输入");
+ }
+ }
zyClothSampleService.updateById(zyClothSample);
- return Result.OK("编辑成功!");
+ return Result.OK("编辑成功");
}
/**
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/entity/ZyClothSample.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/entity/ZyClothSample.java
index d4281786..778b5474 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/entity/ZyClothSample.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/entity/ZyClothSample.java
@@ -13,6 +13,7 @@ import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
+import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;
@@ -38,13 +39,20 @@ public class ZyClothSample implements Serializable {
@Excel(name = "编号", width = 15)
@ApiModelProperty(value = "编号")
private String nums;
- /**款式*/
+
+ /**
+ * 款式
+ * 关联服装款式表 zy_cloths_style
+ * 把数据id转换成style_names 因为前端一些问题 这里已不在需要
+ */
@Excel(name = "款式", width = 15)
@ApiModelProperty(value = "款式")
+ //@Dict(dicCode = "id",dictTable = "zy_cloths_style",dicText = "style_names")
private String styleId;
/**型号*/
@Excel(name = "型号", width = 15)
@ApiModelProperty(value = "型号")
+ @Dict(dicCode = "modenumber", dictTable = "", dicText = "")
private String stylemodelId;
/**管理模块样板*/
@@ -56,6 +64,7 @@ public class ZyClothSample implements Serializable {
@Excel(name = "模块样板", width = 15)
@ApiModelProperty(value = "模块样板")
@Dict(dicCode = "id",dictTable = "zy_module_sample",dicText = "module_name")
+ //@NotBlank(message = "模块样板不能为空")
private String modelSample;
/**用户*/
@Excel(name = "用户", width = 15)
@@ -66,7 +75,14 @@ public class ZyClothSample implements Serializable {
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createTime;
-
+ /**更新人*/
+ @ApiModelProperty(value = "更新人")
+ private java.lang.String updateBy;
+ /**更新日期*/
+ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ @ApiModelProperty(value = "更新日期")
+ private java.util.Date updateTime;
/**成衣名称*/
@Excel(name = "成衣名称", width = 15)