From a846f28bef985e7671f0b469fb73541cbfb08a93 Mon Sep 17 00:00:00 2001 From: admin <15939171744@163.com> Date: 星期六, 01 六月 2024 11:15:39 +0800 Subject: [PATCH] - --- jcdm-ui/src/views/main/om/productionOrde/index.vue | 19 + jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/impl/BsFormulaChildInfoServiceImpl.java | 58 +++- jcdm-ui/src/views/main/cfkb/Instructions/index1.vue | 169 +++++++++++++++ jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/service/impl/DaParamCollectionServiceImpl.java | 8 jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/controller/DaParamCollectionController.java | 4 jcdm-ui/src/views/main/kb/preInstalledTerminal/index.vue | 7 /dev/null | 270 ------------------------ jcdm-main/src/main/java/com/jcdm/main/restful/qingYan/service/ExternalInterface.java | 16 + jcdm-ui/src/api/main/om/productionOrde/productionOrde.js | 8 jcdm-main/src/main/java/com/jcdm/main/da/testDeviceInterface/domain/DaTestDeviceInterface.java | 31 ++ jcdm-main/src/main/java/com/jcdm/main/restful/factoryMes/service/RestfulService.java | 8 jcdm-ui/src/views/main/bs/formulaChild/index.vue | 19 + jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java | 14 + jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java | 2 14 files changed, 321 insertions(+), 312 deletions(-) diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/impl/BsFormulaChildInfoServiceImpl.java b/jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/impl/BsFormulaChildInfoServiceImpl.java index 2d0e491..6d0be5b 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/impl/BsFormulaChildInfoServiceImpl.java +++ b/jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/impl/BsFormulaChildInfoServiceImpl.java @@ -198,6 +198,7 @@ @Override public AjaxResult yzUpdateTighteningFormula(BsFormulaChildInfo bsFormulaChildInfo) { + Boolean b = true; String result = "1"; BsFormulaChildInfo getMaterTwo = new BsFormulaChildInfo(); getMaterTwo.setProcessesCode(bsFormulaChildInfo.getLocationCode()); @@ -206,44 +207,61 @@ List<String> collect = operationType.stream().map(BsFormulaChildInfo::getResults).collect(Collectors.toList()); for (String s : collect) { if(s.equals("")){ - return AjaxResult.error("鎵弿鏈畬鎴愶紝绂佹鎷х揣鎿嶄綔锛�"); +// return AjaxResult.success("鎵弿鏈畬鎴愶紝绂佹鎷х揣鎿嶄綔锛�"); } } BsFormulaChildInfo listQuery = new BsFormulaChildInfo(); listQuery.setParamCode(bsFormulaChildInfo.getParamCode()); String paramCode = bsFormulaChildInfo.getTightenTheArray(); if(paramCode.contains("N")){ + result = "3"; List<BsFormulaChildInfo> bsFormulaChildInfos = bsFormulaChildInfoMapper.selectBsFormulaChildInfoList(listQuery); bsFormulaChildInfos.get(0).setResults("NG"); bsFormulaChildInfos.get(0).setCollectData(bsFormulaChildInfo.getTightenTheArray()); bsFormulaChildInfoMapper.updateBsFormulaChildInfo(bsFormulaChildInfos.get(0)); - return AjaxResult.error("鎵弿缁撴灉NG,璇烽噸鏂版壂鎻忥紒"); +// return AjaxResult.success("鎵弿缁撴灉NG,璇烽噸鏂版壂鎻忥紒"); }else { List<BsFormulaChildInfo> bsFormulaChildInfos = bsFormulaChildInfoMapper.selectBsFormulaChildInfoList(listQuery); - bsFormulaChildInfos.get(0).setResults("OK"); - bsFormulaChildInfos.get(0).setCollectData(bsFormulaChildInfo.getTightenTheArray()); - bsFormulaChildInfoMapper.updateBsFormulaChildInfo(bsFormulaChildInfos.get(0)); - - Integer stepNumber = Integer.valueOf(bsFormulaChildInfos.get(0).getStepSort()); - try { - miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+bsFormulaChildInfo.getLocationCode()+".MStepNumber").value(stepNumber+1).build()); - } catch (Exception e) { - throw new RuntimeException(e); + if(bsFormulaChildInfos.get(0).getSpareField2()!=null&&bsFormulaChildInfos.get(0).getSpareField3()!=null){ + String tightenArray = bsFormulaChildInfo.getTightenTheArray().replace("[", "").replace("]", "").replace(" ", ""); + String[] tightenDataParts = tightenArray.split(","); + b = TimeUtil.isNumberInRange(Double.parseDouble(tightenDataParts[0]),Double.parseDouble(bsFormulaChildInfos.get(0).getSpareField2()),Double.parseDouble(bsFormulaChildInfos.get(0).getSpareField3())); } + if(b){ + result = "3"; + bsFormulaChildInfos.get(0).setResults("OK"); + bsFormulaChildInfos.get(0).setCollectData(bsFormulaChildInfo.getTightenTheArray()); + bsFormulaChildInfoMapper.updateBsFormulaChildInfo(bsFormulaChildInfos.get(0)); - String spareField4 = bsFormulaChildInfos.get(0).getSpareField4(); - if (spareField4 != null && !spareField4.isEmpty()) { - // 鎵ц鎿嶄綔 - if(bsFormulaChildInfos.get(0).getSpareField4().equals("1")){ - try { + Integer stepNumber = Integer.valueOf(bsFormulaChildInfos.get(0).getStepSort()); + try { + miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+bsFormulaChildInfo.getLocationCode()+".MStepNumber").value(stepNumber+1).build()); + } catch (Exception e) { + throw new RuntimeException(e); + } + + String spareField4 = bsFormulaChildInfos.get(0).getSpareField4(); + if (spareField4 != null && !spareField4.isEmpty()) { + // 鎵ц鎿嶄綔 + if(bsFormulaChildInfos.get(0).getSpareField4().equals("1")){ + try { // WebSocketUsers.sendMessageToUserByText(map.get(bsFormulaChildInfo.getLocationCode()), "OUT"); - result = "2"; - } catch (Exception e) { - throw new RuntimeException(e); + result = "2"; + } catch (Exception e) { + throw new RuntimeException(e); + } } } + }else { + result = "3"; + List<BsFormulaChildInfo> bsFormulaChildInfos1 = bsFormulaChildInfoMapper.selectBsFormulaChildInfoList(listQuery); + bsFormulaChildInfos1.get(0).setResults("NG"); + String originalString = bsFormulaChildInfo.getTightenTheArray(); + String modifiedString = originalString.replaceFirst("OK", "NG"); + bsFormulaChildInfos1.get(0).setCollectData(modifiedString); + bsFormulaChildInfoMapper.updateBsFormulaChildInfo(bsFormulaChildInfos1.get(0)); +// return AjaxResult.success("鎵弿缁撴灉NG,璇烽噸鏂版壂鎻忥紒"); } - } return AjaxResult.success(result); } diff --git a/jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/controller/DaParamCollectionController.java b/jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/controller/DaParamCollectionController.java index 36c1009..57714c6 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/controller/DaParamCollectionController.java +++ b/jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/controller/DaParamCollectionController.java @@ -45,9 +45,9 @@ * 鏌ヨ璁惧浜у搧杩囩▼鍙傛暟閲囬泦鍒楄〃 */ @GetMapping("/testput") - public void testput() + public void testput(@RequestBody DaParamCollection daParamCollection) { - daParamCollectionService.pushGeelycvMesFeedback("0RSPB001139E3AE5B0000054","OP240"); + daParamCollectionService.pushGeelycvMesFeedback("0RSPB0011A2E3AE5P0000001","OP460"); } /** diff --git a/jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/service/impl/DaParamCollectionServiceImpl.java b/jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/service/impl/DaParamCollectionServiceImpl.java index 7879018..dc72ecb 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/service/impl/DaParamCollectionServiceImpl.java +++ b/jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/service/impl/DaParamCollectionServiceImpl.java @@ -389,8 +389,8 @@ public void sendToFactoryMes(String stationCode,String productNum ){ - String url = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; -// String url = "https://imes-group.geelycv.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; +// String url = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; + String url = "https://imes-group.geelycv.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; ParentVO vo =new ParentVO(); List<ChildVO> checkList = new ArrayList<>(); List<DaParamCollection> list = this.list(new LambdaQueryWrapper<DaParamCollection>() @@ -441,8 +441,8 @@ @Override public void pushGeelycvMesFeedback(String packID, String stationCode) { SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - String url = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; -// String url = "https://imes-group.geelycv.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; +// String url = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; + String url = "https://imes-group.geelycv.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; String totalResult = "0"; List<DaParamCollection> paramList = daParamCollectionService.list(new LambdaQueryWrapper<DaParamCollection>().eq(DaParamCollection::getSfcCode, packID).eq(DaParamCollection::getLocationCode, stationCode)); if(paramList.size() > 0){ diff --git a/jcdm-main/src/main/java/com/jcdm/main/da/testDeviceInterface/domain/DaTestDeviceInterface.java b/jcdm-main/src/main/java/com/jcdm/main/da/testDeviceInterface/domain/DaTestDeviceInterface.java index 8dad391..20e22de 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/da/testDeviceInterface/domain/DaTestDeviceInterface.java +++ b/jcdm-main/src/main/java/com/jcdm/main/da/testDeviceInterface/domain/DaTestDeviceInterface.java @@ -5,6 +5,8 @@ import com.jcdm.common.annotation.Excel; import com.jcdm.common.core.domain.BaseEntity; +import java.util.Date; + /** * 娴嬭瘯璁惧鎺ュ彛鏁版嵁瀵硅薄 da_test_device_interface * @@ -66,6 +68,10 @@ @Excel(name = "鍒涘缓鐢ㄦ埛") private String createUser; + private Date updateTime; + + private Date createTime; + /** 鏇存敼鐢ㄦ埛 */ @Excel(name = "鏇存敼鐢ㄦ埛") private String updateUser; @@ -82,7 +88,28 @@ /** 棰勭暀瀛楁4 */ private String spareField4; - public void setId(Long id) + + @Override + public Date getUpdateTime() { + return updateTime; + } + + @Override + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + @Override + public Date getCreateTime() { + return createTime; + } + + @Override + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public void setId(Long id) { this.id = id; } @@ -245,6 +272,8 @@ return spareField4; } + + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java b/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java index 1b85ef5..65b724a 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java +++ b/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java @@ -127,7 +127,11 @@ omProductionOrdeInfo.setProductNum(dataObject.getStr("productNum")); omProductionOrdeInfo.setStationCode(dataObject.getStr("stationCode")); omProductionOrdeInfo.setMaterialCode(dataObject.getStr("materialCode")); - omProductionOrdeInfo.setProductCode(dataObject.getStr("model")); + if(dataObject.getStr("model").equals("PE01A")){ + omProductionOrdeInfo.setProductCode("1P102S"); + }else { + omProductionOrdeInfo.setProductCode(dataObject.getStr("model")); + } omProductionOrdeInfo.setCreateTime(new Date()); omProductionOrdeInfo.setCreateUser("宸ュ巶MES"); @@ -139,6 +143,14 @@ return AjaxResult.success(dataObject.getStr("productNum")); } + @GetMapping(value = "/jieBang/{id}") + public AjaxResult jieBang(@PathVariable("id") Long id) + { + OmProductionOrdeInfo byId = omProductionOrdeInfoService.getById(id); + byId.setTrolleyYard(""); + return success(omProductionOrdeInfoService.saveOrUpdate(byId)); + } + /** * 鑾峰彇鐢熶骇宸ュ崟璇︾粏淇℃伅 */ diff --git a/jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java b/jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java index ba7bcee..0403596 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java +++ b/jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java @@ -198,6 +198,7 @@ // } if(testList.stream().anyMatch(s -> s.equals(device))){ String RecordDataDoneAddress = thoroughfare + "." + device + ".RecordDataDone"; + miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(21).build()); // Object packCodeObject = miloService.readFromOpcUa(thoroughfare + "." + device + ".ModuleCode").getValue(); // DaTestDeviceInterface deviceInterfaceOne = null; // @@ -214,7 +215,6 @@ // writeToOpc(RecordDataDoneAddress, (short) 22); // } // writeToOpc(RecordDataDoneAddress, (short) 21); - miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(21).build()); } diff --git a/jcdm-main/src/main/java/com/jcdm/main/restful/factoryMes/service/RestfulService.java b/jcdm-main/src/main/java/com/jcdm/main/restful/factoryMes/service/RestfulService.java index 6d49c60..df3fdb3 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/restful/factoryMes/service/RestfulService.java +++ b/jcdm-main/src/main/java/com/jcdm/main/restful/factoryMes/service/RestfulService.java @@ -12,9 +12,13 @@ // getWorkReportResultFeedback() https://imes-uat-group.geelycv-test.com } - public static final String getRealmName = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration"; +// public static final String getRealmName = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration"; +// +// public static final String postRealmName = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/interface"; - public static final String postRealmName = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/interface"; + public static final String getRealmName = "https://imes-group.geelycv.com/api/mom-open/restful/aMesSysIntegration"; + + public static final String postRealmName = "https://imes-group.geelycv.com/api/mom-open/restful/interface"; public static final String siteCode = "3983"; diff --git a/jcdm-main/src/main/java/com/jcdm/main/restful/qingYan/service/ExternalInterface.java b/jcdm-main/src/main/java/com/jcdm/main/restful/qingYan/service/ExternalInterface.java index e9d9921..de25159 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/restful/qingYan/service/ExternalInterface.java +++ b/jcdm-main/src/main/java/com/jcdm/main/restful/qingYan/service/ExternalInterface.java @@ -1,6 +1,7 @@ package com.jcdm.main.restful.qingYan.service; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import cn.hutool.http.HttpRequest; import cn.hutool.http.HttpResponse; @@ -9,6 +10,7 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.jcdm.common.core.domain.AjaxResult; +import com.jcdm.common.utils.StringUtils; import com.jcdm.main.bs.formulaChild.domain.BsFormulaChildInfo; import com.jcdm.main.bs.formulaChild.service.IBsFormulaChildInfoService; import com.jcdm.main.constant.Constants; @@ -54,9 +56,9 @@ private IDaPassingStationCollectionService passingStationCollectionService; - String url = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; +// String url = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; -// String url = "https://imes-group.geelycv.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; + String url = "https://imes-group.geelycv.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; /** * 瀵煎嚭鐐规浠诲姟鍒楄〃 @@ -148,7 +150,17 @@ daTestDeviceInterface.setProductNum(parentVO.getProductNum()); daTestDeviceInterface.setTotalResult(parentVO.getTotalResult()); daTestDeviceInterface.setCheckList(s); + daTestDeviceInterface.setCreateTime(new Date()); daTestDeviceInterfaceService.save(daTestDeviceInterface); + if(parentVO.getStationCode().contains("OP480")){ + if(StringUtils.isNotBlank(parentVO.getProductNum())){ + OmProductionOrdeInfo one = omProductionOrdeInfoService.getOne(new LambdaQueryWrapper<OmProductionOrdeInfo>().eq(OmProductionOrdeInfo::getProductNum, parentVO.getProductNum())); + if(ObjectUtil.isNotNull(one)){ + one.setTrolleyYard(""); + omProductionOrdeInfoService.saveOrUpdate(one); + } + } + } HttpResponse execute = HttpRequest.post(url).body(JSONUtil.toJsonStr(parentVO)).execute(); return AjaxResult.success(execute.body()); } diff --git a/jcdm-ui/src/api/main/om/productionOrde/productionOrde.js b/jcdm-ui/src/api/main/om/productionOrde/productionOrde.js index d739660..56a8cee 100644 --- a/jcdm-ui/src/api/main/om/productionOrde/productionOrde.js +++ b/jcdm-ui/src/api/main/om/productionOrde/productionOrde.js @@ -59,6 +59,14 @@ } // 鏌ヨ鐢熶骇宸ュ崟璇︾粏 +export function jieBang(id) { + return request({ + url: '/om/productionOrde/jieBang/' + id, + method: 'get' + }) +} + +// 鏌ヨ鐢熶骇宸ュ崟璇︾粏 export function getProductionOrde(id) { return request({ url: '/om/productionOrde/' + id, diff --git a/jcdm-ui/src/views/main/bs/formulaChild/index.vue b/jcdm-ui/src/views/main/bs/formulaChild/index.vue index 95a80ea..a21f8d0 100644 --- a/jcdm-ui/src/views/main/bs/formulaChild/index.vue +++ b/jcdm-ui/src/views/main/bs/formulaChild/index.vue @@ -264,11 +264,17 @@ <el-form-item label="鐗╂枡缂栫爜" prop="materialCode"> <el-input v-model="form.materialCode" placeholder="璇疯緭鍏ョ墿鏂欑紪鐮�" /> </el-form-item> -<!-- <el-form-item label="閰嶆柟缂栫爜" prop="formulaCode">--> -<!-- <el-input v-model="form.formulaCode" placeholder="璇疯緭鍏ラ厤鏂圭紪鐮�" />--> -<!-- </el-form-item>--> - <el-form-item label="鍥剧墖" prop="picture"> - <el-input v-model="form.picture" placeholder="璇疯緭鍏ュ浘鐗�" /> + <el-form-item label="涓婇檺" prop="spareField2"> + <el-input v-model="form.spareField2" placeholder="璇疯緭鍏ュ娉�" /> + </el-form-item> + <el-form-item label="涓嬮檺" prop="spareField3"> + <el-input v-model="form.spareField3" placeholder="璇疯緭鍏ュ娉�" /> + </el-form-item> + <el-form-item label="鍙傛暟鍊�" prop="collectData"> + <el-input v-model="form.collectData" placeholder="璇疯緭鍏ュ娉�" /> + </el-form-item> + <el-form-item label="鐘舵��" prop="results"> + <el-input v-model="form.results" placeholder="璇疯緭鍏ュ娉�" /> </el-form-item> <el-form-item label="澶囨敞" prop="remarks"> <el-input v-model="form.remarks" placeholder="璇疯緭鍏ュ娉�" /> @@ -392,6 +398,8 @@ createUser: null, createTime: null, updateUser: null, + collectData: null, + results: null, updateTime: null, spareField1: null, spareField2: null, @@ -427,6 +435,7 @@ this.reset(); const id = row.id || this.ids getFormulaChild(id).then(response => { + console.log(response.data) this.form = response.data; this.open = true; this.titleName = "淇敼閰嶆柟閰嶇疆瀛愪俊鎭�"; diff --git a/jcdm-ui/src/views/main/cfkb/Instructions/index.vue b/jcdm-ui/src/views/main/cfkb/Instructions/index.vue deleted file mode 100644 index 2bf164b..0000000 --- a/jcdm-ui/src/views/main/cfkb/Instructions/index.vue +++ /dev/null @@ -1,270 +0,0 @@ -<template> - <div class="app-container"> - <el-row :gutter="3"> - <el-col :span="6"> - <el-card shadow="always"> - CFMOTO - </el-card> - </el-col> - <el-col :span="3"> - <el-card shadow="always"> - {{productCode}} - </el-card> - </el-col> - <el-col :span="15"> - <el-card shadow="always"> - 瑁呭壇杞�,鎷ㄥ弶 - </el-card> - </el-col> - </el-row> - <el-row :gutter="3" style="margin-top: 5px"> - <el-col :span="6"> - <div style="height: 600px;overflow: auto;"> - <div class="container" style="height: 50px;background-color: #00afff;margin-bottom: 10px"> - <span class="centered">灞呬腑鏂囨湰</span> - </div> - <div v-for="(item,index) in tableData" :key="item.sort" class="outerDiv" :id="'outerDiv'+index"> - <div class="innerDiv1"> - <div class="innerDiv2"> - <span class="content_left">{{ index+1 }}</span> - </div> - <div class="content_right">{{ item.address }}</div> - </div> - </div> - </div> - </el-col> - <el-col :span="18"> - <el-col :span="20"> - <el-card style="height: 600px" shadow="always"> - <el-row style="height: 100px"> - {{address}} - </el-row> - <el-row style="height: 400px"> - <el-image style="height: 390px;width: 960px" :src="src"></el-image> -<!-- {{src}}--> - </el-row> - <el-row style="height: 100px"> - <el-button type="primary" @click="backClick()" style="float: left" icon="el-icon-arrow-left">涓婁竴姝�</el-button> - <el-button type="primary" @click="nextStep()" style="float: right">涓嬩竴姝�<i class="el-icon-arrow-right el-icon--right"></i></el-button> - </el-row> - </el-card> - </el-col> - <el-col :span="4"> - <el-card style="height: 600px" shadow="always"> - <el-row style="height: 100px;margin-top: 100px"> - <el-button type="primary" @click="processDocuments()" style="float: left" icon="el-icon-folder-opened">宸ヨ壓鏂囦欢</el-button> - </el-row> - <el-row style="height: 50px;margin-top: 5px"> - <el-button type="primary" @click="changeProducts('2V91')" style="width: 100px" icon="el-icon-s-unfold">2V91</el-button> - </el-row> - <el-row style="height: 50px;"> - <el-button type="primary" @click="changeProducts('191')" style="width: 100px" icon="el-icon-s-unfold">191</el-button> - </el-row> - <el-row style="height: 50px;"> - <el-button type="primary" @click="changeProducts('0JWF')" style="width: 100px" icon="el-icon-s-unfold">0JWF</el-button> - </el-row> - </el-card> - </el-col> - - </el-col> - </el-row> - </div> -</template> - -<script> -import {listFormulaChild} from "@/api/main/bs/formulaChild/formulaChild"; - -export default { - name: "Instructions", - data() { - return { - queryParams: { - pageNum: 1, - pageSize: 10, - productCode: null, - }, - productCode: '2V91', - tableData: [{ - img: 'https://fuss10.elemecdn.com/e/5d/4a731a90594', - sort: '2', - address: '涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1518 寮勪笂娴峰競鏅檧鍖洪噾娌欐睙璺� 1518 寮勪笂娴峰競鏅檧鍖洪噾娌欐睙璺� 1518 寮勪笂娴峰競鏅檧鍖洪噾娌欐睙璺� 1518 寮�' - }, { - img: 'https://fuss10.elemecdn.com/e/5d/4a731a90594', - sort: '2', - address: '涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1518 寮勪笂娴峰競鏅檧鍖洪噾娌欐睙璺� 1518 寮勪笂娴峰競鏅檧鍖洪噾娌欐睙璺� 1518 寮勪笂娴峰競鏅檧鍖洪噾娌欐睙璺� 1518 寮�' - }, { - img: 'https://fuss10.elemecdn.com/e/5d/4a731a90594', - sort: '2', - address: '涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1519 寮�' - }, { - img: 'htts://fuss10.elemecdn.com/e/5d/4a731a90594', - sort: '2', - address: '涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1516 寮�' - }, { - img: 'https://fuss10.elemecdn.com/e/5d/4a731a90594', - sort: '2', - address: '涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1516 寮�' - }, { - img: 'https://fuss10.elemecdn.com/e/5d/4a731a90594', - sort: '2', - address: '涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1516 寮�' - }, { - img: 'https://fuss10.elemecdn.com/e/5d/4a731a90594', - sort: '2', - address: '涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1516 寮�' - }, { - img: '222222222222', - sort: '2', - address: '涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1516 寮�' - }, { - img: 'https://fuss10.elemecdn.com/e/5d/4a731a90594', - sort: '2', - address: '涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1516 寮�' - }, { - img: 'https://fuss10.elemecdn.com/e/5d/4a731a90594', - sort: '2', - address: '涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1516 寮�' - }, { - img: 'https://fuss10.elemecdn.com/e/5d/4a731a90594', - sort: '2', - address: '涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1516 寮�' - }], - address: '', - src: 'https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg', - // src: 'file:///D:/img/qt.jpg' - - intervalId: null, - - }; - }, - created() { - this.tableData = [] - }, - mounted() { - this.changeProducts(this.productCode) - // this.autoShow() - }, - beforeDestroy() { - clearInterval(this.intervalId) - this.intervalId = null - }, - methods: { - // 瀹氭椂瑙﹀彂 - autoShow() { - const _this = this - this.intervalId = setInterval(() => { - _this.setBg() - }, 2000) - }, - setImg(index) { - this.address = this.tableData[index].address - this.src = this.tableData[index].img - }, - setBg() { - if (document.getElementById('outerDiv' + (this.tableData.length - 1)).style.background === 'yellow') { - this.setImg(0) - document.getElementById('outerDiv0').style.background = 'yellow' - for (let j = 1; j < this.tableData.length; j++) { - document.getElementById('outerDiv' + j).style.background = 'white' - } - return; - } - for (let i = 0; i < this.tableData.length - 1; i++) { - if (document.getElementById('outerDiv' + i).style.background === 'yellow') { - this.setImg(i+1) - document.getElementById('outerDiv' + i).style.background = 'green' - document.getElementById('outerDiv' + (i+1)).style.background = 'yellow' - return; - } - } - }, - getUpOrDown(index) { - for (let i = 0; i < this.tableData.length; i++) { - if (document.getElementById('outerDiv' + i).style.background === 'yellow') { - this.setImg(i + index) - document.getElementById('outerDiv' + i).style.background = index < 0 ? 'white' : 'green' - document.getElementById('outerDiv' + (i + index)).style.background = 'yellow' - return; - } - } - }, - backClick(){ - this.getUpOrDown(-1) - }, - nextStep(){ - this.getUpOrDown(1) - }, - processDocuments(){ - - }, - changeProducts(val){ - - this.productCode = val - const _this = this - - /** 鏌ヨ閰嶆柟閰嶇疆瀛愪俊鎭垪琛� */ - this.queryParams.productCode = val; - listFormulaChild(this.queryParams).then(response => { - // this.tableData = []; - this.tableData = response.rows; - this.$nextTick(() => { - clearInterval(this.intervalId); - document.getElementById('outerDiv0').style.background = 'yellow' - this.setImg(0) - this.autoShow() - }) - - - }); - }, - }, -} -</script> - -<style scoped> -.outerDiv { - width: fit-content; - min-width: 100%; - /*width: 300px;*/ - height: 50px; - margin-bottom: 10px; -} - -.innerDiv1 { - /*width: 79%;*/ - height: 100%; - display: flex; - align-items: center; - border: 1px solid black; -} - -.innerDiv2 { - /*width: 20%;*/ - width: 50px; - height: 100%; - display: flex; - justify-content: center; - align-items: center; - border: 1px solid black; -} - -.content_left { - font-weight: bold; -} -.content_right { - white-space: nowrap; - padding-left: 5px; - padding-right: 5px; -} -.container { - display: flex; - justify-content: center; - align-items: center; - height: 100px; /* 璁剧疆div鐨勯珮搴︼紝鍙牴鎹疄闄呮儏鍐佃皟鏁� */ -} - -.centered { - text-align: center; -} - -</style> diff --git a/jcdm-ui/src/views/main/cfkb/Instructions/index1.vue b/jcdm-ui/src/views/main/cfkb/Instructions/index1.vue new file mode 100644 index 0000000..d64009c --- /dev/null +++ b/jcdm-ui/src/views/main/cfkb/Instructions/index1.vue @@ -0,0 +1,169 @@ +<template> + <div class="app-container"> + <el-row> + <el-col :span="8"> + <div> + <div id="printMe"> + <p style="margin-left: 30px">9900166410</p> + <p style="margin-left: 30px">HW.001.001</p> + <p style="margin-left: 30px">SW.001.001</p> + <br> + <br> + <br> + <br> + <br> + <span style="font-size: 20px;font-weight: bold;margin-left: 40px">GEELY</span><br> + <span style="font-size: 10px;margin-left: 15px">COMMERCIAL VEHICLE</span><br> + <span style="margin-left: 43px">H2155D</span><br> + <span style="margin-left: 43px">993083</span><br> + <span style="margin-left: 20px">9900166410</span><br> + <span style="font-size: 10px;margin-right: 7px">0RSPBFAA1A2E3ADC40000027</span> + <br> + <br> + <br> + <br> + <br> + <div ref="canvasWrapper" id="canvasWrapper" style="display: flex;justify-content: center;margin-top: -30px"></div> + <span style="font-size: 7px;word-break: break-all;display: flex;justify-content: center;">{{text1}}</span> + </div> + <el-button @click="print1">鎵撳嵃</el-button> + <el-button @click="test1">鐢熸垚浜岀淮鐮�</el-button> + + </div> + </el-col> + <el-col :span="8"> + <div> + <div style="text-align: center" id="printMe1"> + <p>9900166410</p> + <p>HW.001.001</p> + <p>SW.001.001</p> + </div> + <el-button @click="print2">鎵撳嵃</el-button> + </div> + </el-col> + <el-col :span="8"> + <div> + <div id="printMe2"> + <span style="font-size: 20px;font-weight: bold;margin-left: 40px">GEELY</span><br> + <span style="font-size: 10px;margin-left: 15px">COMMERCIAL VEHICLE</span><br> + <span style="margin-left: 43px">H2155D</span><br> + <span style="margin-left: 43px">993083</span><br> + <span style="margin-left: 20px">9900166410</span><br> + <span style="font-size: 10px;margin-right: 7px">0RSPBFAA1A2E3ADC40000027</span> + </div> + <el-button @click="print3">鎵撳嵃</el-button> + </div> + </el-col> + </el-row> + + </div> +</template> + +<script> + +import QRCode from "qrcodejs2"; + +export default { + name: "Instructions", + data() { + return { + text1: 'P9900166410#T0RSPBFAA1A2E3ADC40000027#V993983#SSW001.001#HHW001.001#NBMS#', + text2: '1234', + text3: '1234', + + + }; + }, + created() { + }, + mounted() { + this.test1() + }, + methods: { + print1() { + // 鏂板紑椤甸潰鎵撳嵃 + let newStr = document.getElementById('printMe').innerHTML; + let newWin = window.open('', '_blank'); + newWin.document.body.innerHTML = newStr; + newWin.print(); + return false; + }, + test1(){ + document.getElementById('canvasWrapper').innerHTML = ''; + this.$nextTick(() => { + let qrCode = new QRCode('canvasWrapper',{ + width: 120, + height: 120, + text: this.text1, + colorDark: '#000', + colorLight: '#fff' + }) + }) + }, + print2() { + // 鏂板紑椤甸潰鎵撳嵃 + let newStr = document.getElementById('printMe1').innerHTML; + let newWin = window.open('', '_blank'); + newWin.document.body.innerHTML = newStr; + newWin.print(); + return false; + }, + print3() { + // 鏂板紑椤甸潰鎵撳嵃 + let newStr = document.getElementById('printMe2').innerHTML; + let newWin = window.open('', '_blank'); + newWin.document.body.innerHTML = newStr; + newWin.print(); + return false; + }, + }, +} +</script> + +<style scoped> +.outerDiv { + width: fit-content; + min-width: 100%; + /*width: 300px;*/ + height: 50px; + margin-bottom: 10px; +} + +.innerDiv1 { + /*width: 79%;*/ + height: 100%; + display: flex; + align-items: center; + border: 1px solid black; +} + +.innerDiv2 { + /*width: 20%;*/ + width: 50px; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + border: 1px solid black; +} + +.content_left { + font-weight: bold; +} +.content_right { + white-space: nowrap; + padding-left: 5px; + padding-right: 5px; +} +.container { + display: flex; + justify-content: center; + align-items: center; + height: 100px; /* 璁剧疆div鐨勯珮搴︼紝鍙牴鎹疄闄呮儏鍐佃皟鏁� */ +} + +.centered { + text-align: center; +} + +</style> diff --git a/jcdm-ui/src/views/main/kb/preInstalledTerminal/index.vue b/jcdm-ui/src/views/main/kb/preInstalledTerminal/index.vue index 14ceaf4..2dd794b 100644 --- a/jcdm-ui/src/views/main/kb/preInstalledTerminal/index.vue +++ b/jcdm-ui/src/views/main/kb/preInstalledTerminal/index.vue @@ -530,10 +530,9 @@ } addTighteningParameters(param).then(response => {}); yzUpdateTighteningFormula(param).then(response => { - console.log(response.msg) - if(response.msg === "1"){ + console.log(response) + if(response.msg === "1" || response.msg === "3"){ self.getListFormulaChild() - }else { const param = { workOrderNo: self.workpieceInformation.workOrderNo, @@ -547,6 +546,8 @@ self.headContent.sfcCode = ''; } }); + // self.getListFormulaChild() + } }; }, diff --git a/jcdm-ui/src/views/main/om/productionOrde/index.vue b/jcdm-ui/src/views/main/om/productionOrde/index.vue index de94a66..f40770e 100644 --- a/jcdm-ui/src/views/main/om/productionOrde/index.vue +++ b/jcdm-ui/src/views/main/om/productionOrde/index.vue @@ -147,6 +147,16 @@ @click="patchwork" >琛ユ墦</el-button> </el-col> + <el-col :span="1.5"> + <el-button + type="warning" + plain + icon="el-icon-download" + size="mini" + :disabled="single" + @click="jieBang" + >瑙g粦</el-button> + </el-col> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> </el-row> @@ -297,7 +307,7 @@ delProductionOrde, addProductionOrde, updateProductionOrde, - receivingWorkOrders + receivingWorkOrders, jieBang } from "@/api/main/om/productionOrde/productionOrde"; import QRCode from "qrcodejs2"; @@ -406,6 +416,13 @@ this.test1() }, methods: { + jieBang(row){ + const id = row.id || this.ids + jieBang(id).then(response => { + this.getList() + this.$modal.msgSuccess("瑙g粦鎴愬姛"); + }); + }, patchwork(row){ const id = row.id || this.ids getProductionOrde(id).then(response => { -- Gitblit v1.9.3