From 2c0cf3dd466b765ad26f8fd36951d30c90c8e75b Mon Sep 17 00:00:00 2001 From: shenyuan Date: Mon, 19 Sep 2022 18:21:25 +0800 Subject: [PATCH 1/6] 20220919-syy --- .../components/procedure/processFabric.vue | 13 +- .../modules/ZyProcessFabricFormDetail.vue | 39 ++- .../src/views/erp/fabric/ZyFabricList.vue | 11 +- .../modules/ZyFabricFormDetailModel.vue | 246 ++++++++++++++++++ 4 files changed, 279 insertions(+), 30 deletions(-) create mode 100644 ant-design-vue-jeecg/src/views/erp/fabric/modules/ZyFabricFormDetailModel.vue diff --git a/ant-design-vue-jeecg/src/components/procedure/processFabric.vue b/ant-design-vue-jeecg/src/components/procedure/processFabric.vue index ed6c6367..ad266a17 100644 --- a/ant-design-vue-jeecg/src/components/procedure/processFabric.vue +++ b/ant-design-vue-jeecg/src/components/procedure/processFabric.vue @@ -65,13 +65,12 @@ }, fabricId: function(newVal,oldVal){ this.id = newVal - // this.$http.get('/accessories/zyAccessories/queryById?id='+this.id).then( - // res=>{ - // // this.model = res.result - // console.log(this.id) - // console.log(res) - // console.log(res.result) - // }) + this.$http.get('/accessories/zyAccessories/queryById?id='+this.id).then( + res=>{ + //问题:对应辅料id查不到数据 + console.log(this.id) + console.log(res.result) + }) } }, methods: { diff --git a/ant-design-vue-jeecg/src/views/cloths/modules/ZyProcessFabricFormDetail.vue b/ant-design-vue-jeecg/src/views/cloths/modules/ZyProcessFabricFormDetail.vue index ab8afcf4..3816391b 100644 --- a/ant-design-vue-jeecg/src/views/cloths/modules/ZyProcessFabricFormDetail.vue +++ b/ant-design-vue-jeecg/src/views/cloths/modules/ZyProcessFabricFormDetail.vue @@ -3,26 +3,12 @@ title="工序辅料-详情" :visible="visible" :confirm-loading="confirmLoading" - :width='1000' + :width='1400' @ok="handleOk" @cancel="handleCancel"> -

黄淮学院服装智能制造管理平台 - 工序辅料

- -
- -
+

黄淮学院服装智能制造管理平台 - 工序辅料

+ + @@ -31,10 +17,11 @@ import { httpAction, getAction } from '@/api/manage' import { validateDuplicateValue } from '@/utils/util' import processFabric from '@/components/procedure/processFabric' +import zyProcess from '@/components/procedure/zyProcess' export default { name: 'ZyProcessFabricFormDetail', components: { - processFabric + processFabric,zyProcess }, data () { return { @@ -45,6 +32,9 @@ import processFabric from '@/components/procedure/processFabric' mp4:'',//视频地址 model:{ }, + processData:{}, + processId:'', + fabricId:'', visible:false, labelCol: { xs: { span: 24 }, @@ -61,10 +51,15 @@ import processFabric from '@/components/procedure/processFabric' }, methods: { showModal(id) { - this.visible = true; + this.visible = true;// this.$http.get('/pro/zyProcessFabric/queryById?id='+id).then( res=>{ - this.model = res.result + this.fabricId = res.result.fabricId + this.processId = res.result.processId + this.$http.get('/base/zyProcess/queryById?id='+this.processId).then( + res=>{ + this.processData = res.result.zyProcess + }) } ) }, @@ -85,4 +80,6 @@ import processFabric from '@/components/procedure/processFabric' .table{border-color:#d9d9d9;border-radius: 3px} .table td{padding: 10px 20px;max-width: 380px; } .table td span{color: #333} + .coin{width: 96%;margin:0 auto 30px;border: 1px solid #e8e8e8;} + .coin h2{text-align: left;border-bottom: 1px solid #e8e8e8;padding: 20px;background: rgba(247,247,247,1);margin: 0;} \ No newline at end of file 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..bc90a492 100644 --- a/ant-design-vue-jeecg/src/views/erp/fabric/ZyFabricList.vue +++ b/ant-design-vue-jeecg/src/views/erp/fabric/ZyFabricList.vue @@ -119,7 +119,7 @@ 复制 - 详情 + 详情 @@ -131,6 +131,7 @@ + @@ -142,12 +143,14 @@ import ZyFabricModal from './modules/ZyFabricModal' import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' import ZyFabricFormDetail from './modules/ZyFabricFormDetail' +import ZyFabricFormDetailModel from './modules/ZyFabricFormDetailModel' export default { name: 'ZyFabricList', mixins:[JeecgListMixin, mixinDevice], components: { ZyFabricModal, - ZyFabricFormDetail + ZyFabricFormDetail, + ZyFabricFormDetailModel }, data () { return { @@ -312,6 +315,10 @@ import ZyFabricFormDetail from './modules/ZyFabricFormDetail' fieldList.push({type:'sel_depart',value:'supplierInfo',text:'供货商信息'}) fieldList.push({type:'string',value:'createTime',text:'创建时间',dictCode:''}) this.superFieldList = fieldList + }, + handleDetail(id){ + this.$refs.ZyFabricFormDetailModel.showModal(id) + // this.$children[0].showModal(id) } } } diff --git a/ant-design-vue-jeecg/src/views/erp/fabric/modules/ZyFabricFormDetailModel.vue b/ant-design-vue-jeecg/src/views/erp/fabric/modules/ZyFabricFormDetailModel.vue new file mode 100644 index 00000000..613c94c0 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/erp/fabric/modules/ZyFabricFormDetailModel.vue @@ -0,0 +1,246 @@ + + + + \ No newline at end of file From 2ca3391728b97c12840ac4cfea558353f6506f00 Mon Sep 17 00:00:00 2001 From: lenovo <123> Date: Tue, 20 Sep 2022 16:22:48 +0800 Subject: [PATCH 2/6] =?UTF-8?q?20220920-=E6=8E=A5=E5=8F=A3=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/process/ZyProcessList.vue | 13 ++++++++++++- .../src/views/process/modules/ZyProcessForm.vue | 7 ++++++- .../demo/base/controller/ZyProcessController.java | 5 +++-- .../jeecg/modules/demo/base/entity/ZyProcess.java | 1 + 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/ant-design-vue-jeecg/src/views/process/ZyProcessList.vue b/ant-design-vue-jeecg/src/views/process/ZyProcessList.vue index e8033113..fcc01a94 100644 --- a/ant-design-vue-jeecg/src/views/process/ZyProcessList.vue +++ b/ant-design-vue-jeecg/src/views/process/ZyProcessList.vue @@ -4,6 +4,17 @@
+ + + + + + + + 查询 + 重置 + +
@@ -212,7 +223,7 @@ { title:'款式名称', align:"center", - dataIndex: 'styleId' + dataIndex: 'styleId_dictText' }, { title:'工段代码', diff --git a/ant-design-vue-jeecg/src/views/process/modules/ZyProcessForm.vue b/ant-design-vue-jeecg/src/views/process/modules/ZyProcessForm.vue index 002552b2..adfc8cf6 100644 --- a/ant-design-vue-jeecg/src/views/process/modules/ZyProcessForm.vue +++ b/ant-design-vue-jeecg/src/views/process/modules/ZyProcessForm.vue @@ -122,10 +122,15 @@ + + + + + - + diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyProcessController.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyProcessController.java index 30db338c..2e1840b6 100644 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyProcessController.java +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyProcessController.java @@ -5,6 +5,7 @@ import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.modules.demo.accessories.entity.ZyAccessories; import org.jeecg.modules.demo.base.entity.ZyAllProcess; import org.jeecg.modules.demo.base.entity.ZyClothAction; @@ -71,8 +72,8 @@ public class ZyProcessController extends JeecgController queryWrapper = QueryGenerator.initQueryWrapper(zyProcess, req.getParameterMap()); - QueryWrapper queryWrapper = new QueryWrapper(); + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(zyProcess, req.getParameterMap()); + //QueryWrapper queryWrapper = new QueryWrapper(); Page page = new Page(pageNo, pageSize); IPage pageList = zyProcessService.page(page, queryWrapper); return Result.OK(pageList); diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyProcess.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyProcess.java index 2e54253d..61ddf1a5 100644 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyProcess.java +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyProcess.java @@ -141,6 +141,7 @@ public class ZyProcess implements Serializable { /**款式名称*/ @Excel(name = "款式名称", width = 15) @ApiModelProperty(value = "款式名称") + @Dict(dictTable = "zy_cloths_style", dicText = "style_names", dicCode = "id") private java.lang.String styleId; /**工段代码*/ @Excel(name = "工段代码", width = 15) From f1f59ed74b71d2d8aee7f96ac5867dbf416bfc42 Mon Sep 17 00:00:00 2001 From: shenyuan Date: Tue, 20 Sep 2022 17:03:52 +0800 Subject: [PATCH 3/6] 20220920-syy --- .../components/procedure/processFabric.vue | 81 ++++++++++++++----- .../modules/ZyProcessFabricFormDetail.vue | 12 ++- .../modules/ZyAccessoriesFormDetail.vue | 12 ++- .../views/erp/fabric/modules/ZyFabricForm.vue | 1 + .../modules/ZyFabricFormDetailModel.vue | 1 + 5 files changed, 80 insertions(+), 27 deletions(-) diff --git a/ant-design-vue-jeecg/src/components/procedure/processFabric.vue b/ant-design-vue-jeecg/src/components/procedure/processFabric.vue index ad266a17..3718bbda 100644 --- a/ant-design-vue-jeecg/src/components/procedure/processFabric.vue +++ b/ant-design-vue-jeecg/src/components/procedure/processFabric.vue @@ -1,38 +1,40 @@ @@ -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)