From 768498719683f85e5ed19c73eb3d14cdbf420df4 Mon Sep 17 00:00:00 2001
From: admin <15939171744@163.com>
Date: 星期一, 01 七月 2024 14:03:01 +0800
Subject: [PATCH] 绑定小车码,预装总成码,手动工位扫码,拧紧逻辑优化

---
 jcdm-ui/src/views/main/kb/heatingFilmTerminal/index.vue |  101 ++++++++++++++++++++++++++++++++++----------------
 1 files changed, 68 insertions(+), 33 deletions(-)

diff --git a/jcdm-ui/src/views/main/kb/heatingFilmTerminal/index.vue b/jcdm-ui/src/views/main/kb/heatingFilmTerminal/index.vue
index 243a025..d9276f0 100644
--- a/jcdm-ui/src/views/main/kb/heatingFilmTerminal/index.vue
+++ b/jcdm-ui/src/views/main/kb/heatingFilmTerminal/index.vue
@@ -6,20 +6,22 @@
          <span class="head-font">宸ヤ綅缂栧彿 : {{headContent.processesCode}}</span>
        </el-card>
      </el-col>
-     <el-col :span="7">
+     <el-col :span="17">
        <el-card shadow="never">
          <span class="head-font">宸ヤ綅鍚嶇О : {{headContent.processesName}}</span>
-       </el-card>
-     </el-col>
-     <el-col :span="10">
-       <el-card shadow="never">
-         <span class="head-font">浜у搧搴忓垪鍙� : {{headContent.sfcCode}}</span>
-<!--         <el-input v-model="content" style="float: right;width: 150px;" placeholder="璇疯緭鍏ュ唴瀹�"></el-input>-->
-<!--         <el-button @click="scanCompleted" style="float: right" type="primary">鎵爜瀹屾垚</el-button>-->
          <el-button type="primary" style="float: right" icon="el-icon-search" size="mini" @click="serialLink">涓插彛杩炴帴</el-button>
          <el-button @click="clearClick" style="float: right" type="danger" size="mini">娓呴櫎</el-button>
        </el-card>
      </el-col>
+<!--     <el-col :span="10">-->
+<!--       <el-card shadow="never">-->
+<!--         <span class="head-font">浜у搧搴忓垪鍙� : {{headContent.sfcCode}}</span>-->
+<!--&lt;!&ndash;         <el-input v-model="content" style="float: right;width: 150px;" placeholder="璇疯緭鍏ュ唴瀹�"></el-input>&ndash;&gt;-->
+<!--&lt;!&ndash;         <el-button @click="scanCompleted" style="float: right" type="primary">鎵爜瀹屾垚</el-button>&ndash;&gt;-->
+<!--         <el-button type="primary" style="float: right" icon="el-icon-search" size="mini" @click="serialLink">涓插彛杩炴帴</el-button>-->
+<!--         <el-button @click="clearClick" style="float: right" type="danger" size="mini">娓呴櫎</el-button>-->
+<!--       </el-card>-->
+<!--     </el-col>-->
 
    </el-row>
    <el-row :gutter="5" style="margin-top: 5px">
@@ -243,7 +245,7 @@
 import {listWorkReport} from "@/api/main/om/workReport/workReport";
 import {listStationConf,getIpv4} from "@/api/main/sc/stationConf";
 import {
-  jrmUpdateResults,
+  jrmUpdateResults, jrmWorkpieceRelease,
   listFormulaChild,
   noPageListFormulaChild,
   releaseCheck,
@@ -268,7 +270,7 @@
   addParamCollection,
   addTighteningParameters,
   saveCampaignTimeParameters,
-  replaceAssemblyCode,
+  replaceAssemblyCode, jrmSaveCampaignTimeParameters,
 } from "@/api/main/da/paramCollection/paramCollection";
 
 export default {
@@ -407,19 +409,6 @@
     serialLink() {
       this.open1 = true
     },
-    bindYzSfc(){
-      if(this.headContent.sfcCode!==""&&this.headContent.yzSfcCode!==""){
-        let param = {
-          sfcCode: this.headContent.sfcCode,
-          locationCode: this.headContent.processesCode,
-          yzSfcCode: this.headContent.yzSfcCode
-        }
-        this.$message('鍙互缁戝畾锛�');
-        replaceAssemblyCode(param).then(response => {
-
-        });
-      }
-    },
     Release(){
       // this.$message('portsList锛�'+this.portsList.length);
       if(this.btnType === "danger"){
@@ -455,14 +444,46 @@
       }
       return '';
     },
+    getElement() {
+      let temp33 = document.getElementsByClassName('el-table__row')
+      console.log('temp33',temp33)
+      console.log('len',temp33.item(12))
+      if (temp33.length > 0){
+        console.log('1111111111111111')
+        let arr = temp33[12]
+        console.log('srr',arr)
+        arr.scrollIntoView({ block: 'center' })
+      }
+    },
     /** 鏌ヨ閰嶆柟閰嶇疆瀛愪俊鎭垪琛� */
     getListFormulaChild() {
+      console.log('getListFormulaChild')
       // this.formulaChildList = []
       this.formulaChildParams.productCode = '1P102S'
       this.formulaChildParams.processesCode = this.headContent.processesCode
       console.log(this.formulaChildParams)
       noPageListFormulaChild(this.formulaChildParams).then(response => {
         this.formulaChildList = response.rows;
+        if (this.formulaChildList.length >0){
+          let pos = 0
+          const tempArr = this.formulaChildList.filter(x=> 'OK' === x.results)
+          if (tempArr.length>0){
+            pos = tempArr.length
+            this.$nextTick(() => {
+              let temp33 = document.getElementsByClassName('el-table__row')
+              console.log('temp33',temp33)
+              console.log('len',temp33.item(pos))
+              if (temp33.length > 0){
+                console.log('1111111111111111')
+                let arr = temp33[pos-1]
+                console.log('srr',arr)
+                arr.scrollIntoView({ block: 'center' })
+              }
+            })
+          }
+
+        }
+
       });
     },
     endClear(){
@@ -477,13 +498,26 @@
       this.workpieceInformation.productModel = null;
       this.workpieceInformation.productName = null;
       this.headContent.sfcCode = '';
+      this.headContent.moduleB = '';
+      this.headContent.moduleA = '';
     },
     changeMenu(tab, event) {
       console.log(tab, event);
     },
     clearClick(){
-      this.$message('杩欐槸涓�鏉℃竻闄ゆ秷鎭彁绀�');
-      this.headContent.sfcCode = null
+      const param = {
+        workOrderNo: this.workpieceInformation.workOrderNo,
+        productCode: "1P102S",
+        locationCode: this.headContent.processesCode,
+        productBarcode: this.headContent.moduleA+','+this.headContent.moduleB,
+      }
+      jrmSaveCampaignTimeParameters(param).then(response => {});
+      this.cakeLamp.release = 1;
+      this.endClear()
+      // workpieceRelease(param).then(response => {});
+      jrmWorkpieceRelease(param).then(response => {});
+      // this.$message('杩欐槸涓�鏉℃竻闄ゆ秷鎭彁绀�');
+      // this.headContent.sfcCode = null
     },
     scanCompleted(){
       this.$message('鎵爜瀹屾垚'+this.content);
@@ -503,6 +537,7 @@
 
     /** 鍏ョ珯澧炲姞杩囩珯閲囬泦璁板綍 **/
     addOverStationCollection(){
+      console.log('addOverStationCollection')
       this.passingStationForm = {
         id: null,
         // workOrderNo: this.workpieceInformation.workOrderNo,
@@ -513,7 +548,6 @@
         sfcCode: this.headContent.moduleA+','+this.headContent.moduleB,
         inboundTime: new Date()
       }
-      // addPassingStationCollection(this.passingStationForm).then(response => {});
       jrmAddPassingStationCollection(this.passingStationForm).then(response => {});
       // addBasicParameters(this.passingStationForm).then(response => {});
     },
@@ -571,14 +605,15 @@
         } else if (event.data === "END") {
           const param = {
             workOrderNo: self.workpieceInformation.workOrderNo,
-            productCode: self.workpieceInformation.productCode,
+            productCode: "1P102S",
             locationCode: self.headContent.processesCode,
-            productBarcode: self.headContent.sfcCode,
+            productBarcode: self.headContent.moduleA+','+self.headContent.moduleB,
           }
-          saveCampaignTimeParameters(param).then(response => {});
+          jrmSaveCampaignTimeParameters(param).then(response => {});
           self.cakeLamp.release = 1;
           self.endClear()
-          workpieceRelease(param).then(response => {});
+          // workpieceRelease(param).then(response => {});
+          jrmWorkpieceRelease(param).then(response => {});
         } else if (event.data.includes("[")) {
           let formulaChilds = "";
           self.formulaChildList.sort((a, b) => a.stepSort - b.stepSort);
@@ -595,8 +630,8 @@
           const param = {
             tightenTheArray: event.data,
             paramCode: formulaChilds.paramCode,
-            workOrderNo: self.workpieceInformation.workOrderNo,
-            productCode: self.workpieceInformation.productCode,
+            // workOrderNo: self.workpieceInformation.workOrderNo,
+            productCode: '1P102S',
             locationCode: self.headContent.processesCode,
             productBarcode: self.headContent.sfcCode,
           }
@@ -629,7 +664,7 @@
             this.headContent.moduleB = scanValue;
             this.$message('鎵爜璇嗗埆浜у搧搴忓垪鍙�'+scanValue);
             this.getList()
-            this.cakeLamp.InPlace = 1
+            // this.cakeLamp.InPlace = 1
             this.cakeLamp.scanFinish = 1
             this.cakeLamp.startWork = 1
           }

--
Gitblit v1.9.3