From ce0e6a779f146ac401532a9d873ce7d84e087629 Mon Sep 17 00:00:00 2001 From: Gitea Date: Thu, 8 Jun 2023 17:47:58 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E7=AE=A1=E7=90=86=E6=89=80?= =?UTF-8?q?=E6=9C=89=E6=A8=A1=E5=9D=97=E4=BB=A5=E5=8F=8A=E5=95=86=E5=93=81?= =?UTF-8?q?=E7=AE=A1=E7=90=86BUG=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/zyplanprocess/ZyPlanProcessList.vue | 45 +++++++++++++++++-- .../controller/ZyProductController.java | 32 ++++++++++--- 2 files changed, 67 insertions(+), 10 deletions(-) diff --git a/ant-design-vue-jeecg/src/views/zyplanprocess/ZyPlanProcessList.vue b/ant-design-vue-jeecg/src/views/zyplanprocess/ZyPlanProcessList.vue index 0b17493c..e5484352 100644 --- a/ant-design-vue-jeecg/src/views/zyplanprocess/ZyPlanProcessList.vue +++ b/ant-design-vue-jeecg/src/views/zyplanprocess/ZyPlanProcessList.vue @@ -61,6 +61,15 @@ + + + @@ -124,6 +136,9 @@ import StationModal1 from "../team/modules/StationModal1"; import WorkOrderModal from "../workorder/modules/WorkOrderModal"; import {deleteAction, getAction} from "@api/manage"; + import ZyProductModal from "../zyWorkProduct/modules/ZyProductModal"; + import ZyProcessDetail from "../process/modules/ZyProcessDetail"; + import ZyDeviceDetail from "../device/modules/ZyDeviceDetail"; export default { name: 'ZyPlanProcessList', @@ -131,7 +146,10 @@ components: { ZyPlanProcessModal, StationModal1, - WorkOrderModal + WorkOrderModal, + ZyProductModal, + ZyProcessDetail, + ZyDeviceDetail }, data () { return { @@ -157,12 +175,14 @@ { title:'产品名称', align:"center", - dataIndex: 'productCode_dictText' + dataIndex: 'productCode_dictText', + scopedSlots: {customRender: 'cp'} }, { title:'工序名称', align:"center", - dataIndex: 'processName' + dataIndex: 'processName', + scopedSlots: {customRender: 'gx'} }, { title:'工位名称', @@ -178,7 +198,8 @@ { title:'设备名称', align:"center", - dataIndex: 'machineNames' + dataIndex: 'machineNames', + scopedSlots: {customRender: 'sb'} }, /* { title:'工具名称', @@ -267,6 +288,22 @@ } }) }, + cp(productCode){ + getAction("/zyproduct/zyProduct/queryByProductCode", {productCode: productCode}).then((res) => { + if (res.success) { + this.$refs.modalFormcp.edit(res.result); + this.$refs.modalFormcp.title="详情"; + this.$refs.modalFormcp.disableSubmit = true; + } else { + } + }) + }, + gx(processId){ + this.$refs.zyProcessDetail.showModal(processId); + }, + sb(machineIds){ + this.$refs.ZyDeviceDetail.showModal(machineIds.split(",")[0]); + }, initDictConfig(){ }, } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workproduct/controller/ZyProductController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workproduct/controller/ZyProductController.java index db52e18d..ce3bee50 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workproduct/controller/ZyProductController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workproduct/controller/ZyProductController.java @@ -50,7 +50,7 @@ import org.jeecg.common.aspect.annotation.AutoLog; public class ZyProductController extends JeecgController { @Autowired private IZyProductService zyProductService; - + /** * 分页列表查询 * @@ -72,7 +72,7 @@ public class ZyProductController extends JeecgController pageList = zyProductService.selectListPage(page, zyProduct); return Result.OK(pageList); } - + /** * 添加 * @@ -86,7 +86,7 @@ public class ZyProductController extends JeecgController queryByProductCode(@RequestParam(name="productCode",required=true) String productCode,HttpServletRequest req) { + ZyProduct zyProduct = new ZyProduct(); + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(zyProduct, req.getParameterMap()); + queryWrapper.eq("product_code",productCode); + zyProduct = zyProductService.list(queryWrapper).get(0); + if(zyProduct==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(zyProduct); + } + /** * 导出excel *