From eb8979c4d71785fbadc89c888c15a1650c71bc0e Mon Sep 17 00:00:00 2001 From: "ZHOUZ\\Noble'lift" <1014987728@qq.com> Date: Fri, 16 Jun 2023 16:25:30 +0800 Subject: [PATCH] =?UTF-8?q?rev:=E8=AE=BE=E5=A4=87=E7=9B=91=E6=8E=A7?= =?UTF-8?q?=E3=80=81=E6=96=B0=E5=A2=9E=E6=89=8B=E5=8A=A8=E5=85=A5=E7=AE=B1?= =?UTF-8?q?=E5=9B=9E=E4=BC=A0=E3=80=81=E5=87=BA=E7=AE=B1=E5=9B=9E=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/FaultDeviceServiceImpl.java | 23 ++--- .../wms/basedata/master/wql/QMD_BI_FAULT.wql | 3 +- .../acs/service/impl/AcsToWmsServiceImpl.java | 21 ++-- .../acs/service/impl/WmsToAcsServiceImpl.java | 45 +++++---- .../pdm/ivt/rest/HotPointIvtController.java | 9 ++ .../pdm/ivt/service/HotPointIvtService.java | 3 + .../service/impl/HotPointIvtServiceImpl.java | 89 ++++++++++++----- .../src/views/wms/agvrush/charge/index.vue | 13 +-- .../views/wms/agvrush/devicecharge/index.vue | 8 +- .../views/wms/pdm/ivt/hotpointivt/Dialog.vue | 90 +++++++++++++++++ .../wms/pdm/ivt/hotpointivt/hotpointivt.js | 10 +- .../wms/pdm/ivt/hotpointivt/pointIvt.vue | 99 ++++++++++++++----- 12 files changed, 308 insertions(+), 105 deletions(-) create mode 100644 lms/nladmin-ui/src/views/wms/pdm/ivt/hotpointivt/Dialog.vue diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/service/impl/FaultDeviceServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/service/impl/FaultDeviceServiceImpl.java index 241d9dcbb..b4bae7841 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/service/impl/FaultDeviceServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/service/impl/FaultDeviceServiceImpl.java @@ -63,6 +63,9 @@ public class FaultDeviceServiceImpl implements FaultDeviceService { String is_fault = MapUtil.getStr(whereJson, "is_fault"); String region_code = MapUtil.getStr(whereJson, "region_code"); String plant_code = MapUtil.getStr(whereJson, "plant_code"); + if (StrUtil.isEmpty(plant_code)){ + throw new BadRequestException("输入的区域不能为空!"); + } JSONObject param = new JSONObject(); if (ObjectUtil.isNotEmpty(device_code)) { @@ -73,29 +76,19 @@ public class FaultDeviceServiceImpl implements FaultDeviceService { // 不为空则只需要查询专机设备 JSONObject jsonStr = WQL.getWO("QMD_BI_FAULT").addParam("flag", "3").process().uniqueResult(0); String str = jsonStr.getString("str"); - String product_area = jsonStr.getString("product_area"); param.put("device_code",str); - param.put("product_area",product_area); + param.put("product_area",plant_code); } // 调用acs接口获取设备 JSONObject result = SpringContextHolder.getBean(WmsToAcsServiceImpl.class).realTimefaultInfo(param); JSONArray data = result.getJSONArray("data"); - JSONObject result2 = SpringContextHolder.getBean(WmsToAcsServiceImpl.class).queryDeviceInfo(new JSONObject()); - JSONObject jsonData = result2.getJSONObject("data"); - JSONArray data1 = new JSONArray(); + JSONObject result2 = SpringContextHolder.getBean(WmsToAcsServiceImpl.class).queryDeviceInfo(param); + JSONArray rows = result2.getJSONArray("data"); - if (ObjectUtil.isNotEmpty(jsonData)) { - JSONArray jsonA1 = jsonData.getJSONArray("jsonA1"); - JSONArray jsonLK = jsonData.getJSONArray("jsonLK"); - - data1.addAll(jsonA1); - data1.addAll(jsonLK); - } - - for (int i = 0; i < data1.size(); i++) { - JSONObject jsonObject = data1.getJSONObject(i); + for (int i = 0; i < rows.size(); i++) { + JSONObject jsonObject = rows.getJSONObject(i); double electricity = jsonObject.getDoubleValue("electricity"); if (electricity <= 30) { diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/wql/QMD_BI_FAULT.wql b/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/wql/QMD_BI_FAULT.wql index 5fc973594..3c86ec3c6 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/wql/QMD_BI_FAULT.wql +++ b/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/wql/QMD_BI_FAULT.wql @@ -91,8 +91,7 @@ IF 输入.flag = "3" QUERY SELECT - GROUP_CONCAT(device_code) AS str, - plant_code AS product_area + GROUP_CONCAT(device_code) AS str FROM EM_BI_MonitorDevice WHERE diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java index 6d180d998..6d51dc00f 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java @@ -22,6 +22,7 @@ import org.nl.wms.ext.acs.service.AcsToWmsService; import org.nl.wms.pda.mps.service.impl.BakingServiceImpl; import org.nl.wms.pda.st.service.PrintService; import org.nl.wms.pda.st.service.impl.PrintServiceImpl; +import org.nl.wms.sch.manage.AbstractAcsTask; import org.nl.wms.sch.manage.TaskStatusEnum; import org.nl.wms.sch.tasks.CutConveyorTask; import org.nl.wms.sch.tasks.EmptyVehicleTask; @@ -100,21 +101,13 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { } // 任务处理类 try { - Class clz = Class.forName(processing_class); + AbstractAcsTask bean = SpringContextHolder.getBean(processing_class); + bean.updateTaskStatus(row, status); + /*Class clz = Class.forName(processing_class); Object obj = clz.newInstance(); // 调用每个任务类的forceFinishInst()强制结束方法 Method m = obj.getClass().getDeclaredMethod("updateTaskStatus", JSONObject.class, String.class); - m.invoke(obj, row, status); - } catch (InvocationTargetException e) { - e.printStackTrace(); - //空指针 - if (ObjectUtil.isNull(e.getTargetException().getMessage())) { - message = e.getTargetException().toString(); - } else { - message = e.getTargetException().getMessage(); - } - throw new BadRequestException(message); - + m.invoke(obj, row, status);*/ } catch (Exception e) { e.printStackTrace(); message = e.getMessage(); @@ -872,8 +865,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { tran_jo.put("point_code1", translate_code1); tran_jo.put("point_code2", translate_code2); tran_jo.put("vehicle_code", right_point.getString("qzzno")); - if (StrUtil.isEmpty(right_point.getString("vehicle_code"))){ - throw new BadRequestException("点位:"+right_point.getString("point_code")+"载具号为空!"); + if (StrUtil.isEmpty(right_point.getString("vehicle_code"))) { + throw new BadRequestException("点位:" + right_point.getString("point_code") + "载具号为空!"); } tran_jo.put("vehicle_code2", right_point.getString("vehicle_code")); tran_jo.put("task_type", "010406"); diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/WmsToAcsServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/WmsToAcsServiceImpl.java index b4955d40d..2d9409396 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/WmsToAcsServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/WmsToAcsServiceImpl.java @@ -242,10 +242,19 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { return result; } - //ACS地址:127.0.0.1:8010 - String acsUrl = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("acs_url").getValue(); + String product_area = whereJson.getString("product_area"); - String url = acsUrl + api; + if (StrUtil.isEmpty(product_area)) { + throw new BadRequestException("区域不能为空!下发信息:" + whereJson.toString()); + } + + String acs_url = URLEnum.find(product_area); + if (StrUtil.isEmpty(acs_url)) { + log.info(product_area); + throw new BadRequestException("未查询到区域对应的acs地址!"); + } + + String url = acs_url + api; try { String resultMsg = HttpRequest.post(url) .body(String.valueOf(whereJson)) @@ -255,9 +264,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { // 重新组织数据 JSONArray data = result.getJSONArray("data"); - JSONObject nowJson = new JSONObject(); // 返回数据 - JSONArray ArrA1 = new JSONArray(); // A1车间 - JSONArray ArrLk = new JSONArray(); // LK车间 + JSONArray rows = new JSONArray(); String run_time = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("AGV_RUN_TIME").getValue(); @@ -268,17 +275,9 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { // 工作时长:电量百分比*6 String electricity = json.getString("electricity"); json.put("run_time", NumberUtil.round(NumberUtil.div(NumberUtil.mul(electricity, run_time), 100), 1)); - - if ("2,3".contains(json.getString("car_no"))) { - ArrA1.add(json); - } - if ("1".contains(json.getString("car_no"))) { - ArrLk.add(json); - } + rows.add(json); } - nowJson.put("jsonA1", ArrA1); - nowJson.put("jsonLK", ArrLk); - result.put("data", nowJson); + result.put("data", rows); } catch (Exception e) { String msg = e.getMessage(); @@ -314,11 +313,19 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { return result; } + String product_area = whereJson.getString("product_area"); - //ACS地址:127.0.0.1:8010 - String acsUrl = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("acs_url").getValue(); + if (StrUtil.isEmpty(product_area)) { + throw new BadRequestException("区域不能为空!下发信息:" + whereJson.toString()); + } - String url = acsUrl + api; + String acs_url = URLEnum.find(product_area); + if (StrUtil.isEmpty(acs_url)) { + log.info(product_area); + throw new BadRequestException("未查询到区域对应的acs地址!"); + } + + String url = acs_url + api; // 判断此此号属于哪个系统 String car_no = whereJson.getString("car_no"); diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/rest/HotPointIvtController.java b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/rest/HotPointIvtController.java index 872e7bf81..fe1501dbd 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/rest/HotPointIvtController.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/rest/HotPointIvtController.java @@ -2,6 +2,7 @@ package org.nl.wms.pdm.ivt.rest; +import com.alibaba.fastjson.JSONObject; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; @@ -71,4 +72,12 @@ public class HotPointIvtController { public ResponseEntity taskDtlQuery(@RequestParam Map whereJson, Pageable page){ return new ResponseEntity<>(hotpointivtService.taskDtlQuery(whereJson,page),HttpStatus.OK); } + + @PostMapping("/uploadMes") + @Log("手动回传MES") + @ApiOperation("手动回传MES") + public ResponseEntity uploadMes(@RequestBody JSONObject form){ + hotpointivtService.uploadMes(form); + return new ResponseEntity<>(HttpStatus.OK); + } } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/HotPointIvtService.java b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/HotPointIvtService.java index fa46ac1cc..0311ce5d2 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/HotPointIvtService.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/HotPointIvtService.java @@ -1,6 +1,7 @@ package org.nl.wms.pdm.ivt.service; +import com.alibaba.fastjson.JSONObject; import org.nl.wms.pdm.ivt.service.dto.HotPointIvtDto; import org.springframework.data.domain.Pageable; @@ -70,4 +71,6 @@ public interface HotPointIvtService { */ Map taskDtlQuery(Map whereJson, Pageable page); + void uploadMes(JSONObject form); + } \ No newline at end of file diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/HotPointIvtServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/HotPointIvtServiceImpl.java index d139819f9..2b47da84d 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/HotPointIvtServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/HotPointIvtServiceImpl.java @@ -15,7 +15,10 @@ import org.nl.modules.common.exception.BadRequestException; import org.nl.common.utils.SecurityUtils; import org.nl.modules.wql.WQL; import org.nl.modules.wql.core.bean.WQLObject; +import org.nl.modules.wql.util.SpringContextHolder; import org.nl.modules.wql.util.WqlUtil; +import org.nl.system.service.param.impl.SysParamServiceImpl; +import org.nl.wms.ext.mes.service.impl.LmsToMesServiceImpl; import org.nl.wms.pdm.ivt.service.HotPointIvtService; import org.nl.wms.pdm.ivt.service.dto.HotPointIvtDto; import org.springframework.data.domain.Pageable; @@ -27,21 +30,21 @@ import java.util.List; import java.util.Map; /** -* @description 服务实现 -* @author lyd -* @date 2022-10-09 -**/ + * @author lyd + * @description 服务实现 + * @date 2022-10-09 + **/ @Service @RequiredArgsConstructor @Slf4j public class HotPointIvtServiceImpl implements HotPointIvtService { @Override - public Map queryAll(Map whereJson, Pageable page){ + public Map queryAll(Map whereJson, Pageable page) { HashMap map = new HashMap(); map.put("flag", "1"); - if (whereJson.get("point_code")!=null) - map.put("point_code", "%" + whereJson.get("point_code") + "%"); + if (whereJson.get("point_code") != null) + map.put("point_code", "%" + whereJson.get("point_code") + "%"); map.put("point_status", whereJson.get("point_status")); map.put("product_area", whereJson.get("product_area")); map.put("is_used", whereJson.get("is_used")); @@ -54,7 +57,7 @@ public class HotPointIvtServiceImpl implements HotPointIvtService { } @Override - public List queryAll(Map whereJson){ + public List queryAll(Map whereJson) { WQLObject wo = WQLObject.getWQLObject("st_ivt_hotpointivt"); JSONArray arr = wo.query().getResultJSONArray(0); if (ObjectUtil.isNotEmpty(arr)) return arr.toJavaList(HotPointIvtDto.class); @@ -65,18 +68,18 @@ public class HotPointIvtServiceImpl implements HotPointIvtService { public HotPointIvtDto findById(Long ivt_id) { WQLObject wo = WQLObject.getWQLObject("st_ivt_hotpointivt"); JSONObject json = wo.query("ivt_id = '" + ivt_id + "'").uniqueResult(0); - if (ObjectUtil.isNotEmpty(json)){ - return json.toJavaObject( HotPointIvtDto.class); + if (ObjectUtil.isNotEmpty(json)) { + return json.toJavaObject(HotPointIvtDto.class); } return null; } @Override - public HotPointIvtDto findByCode(String code) { + public HotPointIvtDto findByCode(String code) { WQLObject wo = WQLObject.getWQLObject("st_ivt_hotpointivt"); JSONObject json = wo.query("code ='" + code + "'").uniqueResult(0); - if (ObjectUtil.isNotEmpty(json)){ - return json.toJavaObject( HotPointIvtDto.class); + if (ObjectUtil.isNotEmpty(json)) { + return json.toJavaObject(HotPointIvtDto.class); } return null; } @@ -117,8 +120,8 @@ public class HotPointIvtServiceImpl implements HotPointIvtService { WQLObject wo = WQLObject.getWQLObject("st_ivt_hotpointivt"); JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto)); - if (!json.containsKey("temperature")){ - json.put("temperature",null); + if (!json.containsKey("temperature")) { + json.put("temperature", null); } wo.update(json); } @@ -131,7 +134,7 @@ public class HotPointIvtServiceImpl implements HotPointIvtService { String now = DateUtil.now(); WQLObject wo = WQLObject.getWQLObject("st_ivt_hotpointivt"); - for (Long ivt_id: ids) { + for (Long ivt_id : ids) { JSONObject param = new JSONObject(); param.put("ivt_id", String.valueOf(ivt_id)); param.put("is_delete", "1"); @@ -142,6 +145,48 @@ public class HotPointIvtServiceImpl implements HotPointIvtService { } } + @Override + public void uploadMes(JSONObject form) { + String flag = form.getString("flag"); + + // 将入烘箱信息发送给mes + JSONObject param = new JSONObject(); + String userName = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_USERNAME").getValue(); + String passWord = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_PASSWORD").getValue(); + param.put("iContainerName", form.getString("container_name")); + param.put("iResourceName", form.getString("")); + param.put("iMoveInDate", DateUtil.now()); + param.put("iPlanBakingTemperature", form.getDoubleValue("temperature")); + param.put("iPlanBakingTimer", form.getDoubleValue("oven_time")); + param.put("UserName", userName); + param.put("PassWord", passWord); + + //入箱回传 + if ("1".equals(flag)) { + //判断该接口是否需要回传 + JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'momRollBakeInBound'").uniqueResult(0); + if (ObjectUtil.isNotEmpty(back_jo) && "1".equals(back_jo.getString("is_back"))) { + new LmsToMesServiceImpl().momRollBakeInBound(param); + } + + //将该母卷的入烘箱标识改为0 + HashMap map = new HashMap<>(); + map.put("is_baking", "0"); + WQLObject.getWQLObject("PDM_BI_RawFoilWorkOrder").update(map, "container_name = '" + form.getString("container_name") + "'"); + log.info("母卷:" + form.getString("container_name") + "对应的入烘箱任务完成,请求烘烤标识改为0"); + } + //出箱回传 + if ("2".equals(flag)) { + //判断该接口是否需要回传 + JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'momRollBakeOutBound'").uniqueResult(0); + if (ObjectUtil.isNotEmpty(back_jo) && "1".equals(back_jo.getString("is_back"))) { + new LmsToMesServiceImpl().momRollBakeOutBound(param); + } + } + + + } + @Override public Map taskDtlQuery(Map whereJson, Pageable page) { @@ -151,15 +196,15 @@ public class HotPointIvtServiceImpl implements HotPointIvtService { String container_name = MapUtil.getStr(whereJson, "container_name"); JSONObject map = new JSONObject(); - map.put("flag","2"); - map.put("bill_code", MapUtil.getStr(whereJson,"bill_code")); - map.put("dtl_status", MapUtil.getStr(whereJson,"dtl_status")); + map.put("flag", "2"); + map.put("bill_code", MapUtil.getStr(whereJson, "bill_code")); + map.put("dtl_status", MapUtil.getStr(whereJson, "dtl_status")); map.put("begin_time", whereJson.get("begin_time")); map.put("end_time", whereJson.get("end_time")); map.put("container_name", container_name); - if (ObjectUtil.isNotEmpty(task_code)) map.put("task_code","%"+task_code+"%"); - if (ObjectUtil.isNotEmpty(start_point_code)) map.put("start_point_code","%"+start_point_code+"%"); - if (ObjectUtil.isNotEmpty(next_point_code)) map.put("next_point_code","%"+next_point_code+"%"); + if (ObjectUtil.isNotEmpty(task_code)) map.put("task_code", "%" + task_code + "%"); + if (ObjectUtil.isNotEmpty(start_point_code)) map.put("start_point_code", "%" + start_point_code + "%"); + if (ObjectUtil.isNotEmpty(next_point_code)) map.put("next_point_code", "%" + next_point_code + "%"); JSONObject json = WQL.getWO("ST_IVT_HOTPOINTIVT").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "create_time DESC"); diff --git a/lms/nladmin-ui/src/views/wms/agvrush/charge/index.vue b/lms/nladmin-ui/src/views/wms/agvrush/charge/index.vue index e394ceab4..05ec1f3c3 100644 --- a/lms/nladmin-ui/src/views/wms/agvrush/charge/index.vue +++ b/lms/nladmin-ui/src/views/wms/agvrush/charge/index.vue @@ -146,7 +146,7 @@ export default { data() { return { form: { - flag: '1' + flag: 'A1' }, chargeLoading: false, listA1: [], @@ -154,11 +154,11 @@ export default { agvList: [ ], agvRegionList: [ - { 'label': 'A1', 'value': '1' }, - { 'label': 'A2', 'value': '2' }, - { 'label': 'A3', 'value': '3' }, - { 'label': 'A4', 'value': '4' }, - { 'label': 'LK', 'value': '5' } + { 'label': 'A1', 'value': 'A1' }, + { 'label': 'A2', 'value': 'A2' }, + { 'label': 'A3', 'value': 'A3' }, + { 'label': 'A4', 'value': 'A4' }, + { 'label': 'LK', 'value': 'LK' } ] } }, @@ -199,6 +199,7 @@ export default { }, charge_task(data) { this.chargeLoading = true + data.product_area = this.form.flag sendAgvChargeTask(data).then(res => { this.chargeLoading = false this.$message({ diff --git a/lms/nladmin-ui/src/views/wms/agvrush/devicecharge/index.vue b/lms/nladmin-ui/src/views/wms/agvrush/devicecharge/index.vue index 4fd838db7..5c4c2ae4c 100644 --- a/lms/nladmin-ui/src/views/wms/agvrush/devicecharge/index.vue +++ b/lms/nladmin-ui/src/views/wms/agvrush/devicecharge/index.vue @@ -67,7 +67,7 @@ @change="crud.toQuery" > - + @@ -132,6 +132,9 @@ export default { add: false, reset: true }, + query: { + plant_code: 'A1' + }, idField: 'device_id', sort: 'device_id,desc', crudMethod: { ...crudFaultdevice } @@ -141,6 +144,7 @@ export default { return { permission: {}, tableData: [], + product_area: [{ 'value': 'A1', 'label': 'A1' }, { 'value': 'A2', 'label': 'A2' }, { 'value': 'A3', 'label': 'A3' }, { 'value': 'A4', 'label': 'A4' }, { 'value': 'LK', 'label': 'LK' }], rules: { } } diff --git a/lms/nladmin-ui/src/views/wms/pdm/ivt/hotpointivt/Dialog.vue b/lms/nladmin-ui/src/views/wms/pdm/ivt/hotpointivt/Dialog.vue new file mode 100644 index 000000000..d84d08397 --- /dev/null +++ b/lms/nladmin-ui/src/views/wms/pdm/ivt/hotpointivt/Dialog.vue @@ -0,0 +1,90 @@ + + + + + diff --git a/lms/nladmin-ui/src/views/wms/pdm/ivt/hotpointivt/hotpointivt.js b/lms/nladmin-ui/src/views/wms/pdm/ivt/hotpointivt/hotpointivt.js index 3c243498b..4767e16e4 100644 --- a/lms/nladmin-ui/src/views/wms/pdm/ivt/hotpointivt/hotpointivt.js +++ b/lms/nladmin-ui/src/views/wms/pdm/ivt/hotpointivt/hotpointivt.js @@ -24,4 +24,12 @@ export function edit(data) { }) } -export default { add, edit, del } +export function uploadMes(data) { + return request({ + url: 'api/hotpointivt/uploadMes', + method: 'post', + data + }) +} + +export default { add, edit, del, uploadMes } diff --git a/lms/nladmin-ui/src/views/wms/pdm/ivt/hotpointivt/pointIvt.vue b/lms/nladmin-ui/src/views/wms/pdm/ivt/hotpointivt/pointIvt.vue index c31f9952c..2c662d320 100644 --- a/lms/nladmin-ui/src/views/wms/pdm/ivt/hotpointivt/pointIvt.vue +++ b/lms/nladmin-ui/src/views/wms/pdm/ivt/hotpointivt/pointIvt.vue @@ -92,16 +92,29 @@ @change="crud.toQuery" /> - + - + + + 回传MES + + - + - + - + - + - + - - - + + + - - - + + + - + - - + + - - + + @@ -206,11 +221,36 @@ import rrOperation from '@crud/RR.operation' import crudOperation from '@crud/CRUD.operation' import udOperation from '@crud/UD.operation' import pagination from '@crud/Pagination' +import Dialog from '@/views/wms/pdm/ivt/hotpointivt/Dialog.vue' -const defaultForm = { ivt_id: null, point_code: null, point_status: null, container_name: null, workorder_id: null, full_vehicle_code: null, pcsn: null, ivt_qty: null, qty_unit_id: null, instorage_time: null, product_area: null, temperature: null, group_name: null, point_location: null, sort_seq: null, is_used: null, remark: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null } +const defaultForm = { + ivt_id: null, + point_code: null, + point_status: null, + container_name: null, + workorder_id: null, + full_vehicle_code: null, + pcsn: null, + ivt_qty: null, + qty_unit_id: null, + instorage_time: null, + product_area: null, + temperature: null, + group_name: null, + point_location: null, + sort_seq: null, + is_used: null, + remark: null, + create_id: null, + create_name: null, + create_time: null, + update_optid: null, + update_optname: null, + update_time: null +} export default { name: 'HotPointIvt', - components: { pagination, crudOperation, rrOperation, udOperation }, + components: { Dialog, pagination, crudOperation, rrOperation, udOperation }, dicts: ['product_area', 'is_used', 'point_location', 'sch_hot_point_status'], mixins: [presenter(), header(), form(defaultForm), crud()], cruds() { @@ -231,8 +271,9 @@ export default { }, data() { return { - permission: { - }, + permission: {}, + openParam: null, + dialogShow: false, rules: { point_code: [ { required: true, message: '点位编码不能为空', trigger: 'blur' } @@ -240,7 +281,8 @@ export default { point_status: [ { required: true, message: '点位状态不能为空', trigger: 'blur' } ] - }} + } + } }, methods: { // 钩子:在获取表格数据之前执行,false 则代表不获取数据 @@ -249,6 +291,15 @@ export default { }, hand(value) { this.crud.toQuery() + }, + uploadMES() { + debugger + const _selectData = this.$refs.table.selection + if (_selectData.length !== 1) { + return this.crud.notify('请选择一个点位进行回传!', CRUD.NOTIFICATION_TYPE.INFO) + } + this.openParam = _selectData[0] + this.dialogShow = true } } }