懒羊羊
2024-03-13 b64ed2c784bde6dea9d18149ca706ebe532c857d
jcdm-ui/src/views/main/kb/stationTerminal/index.vue
@@ -13,7 +13,7 @@
     </el-col>
     <el-col :span="10">
       <el-card shadow="never">
         <span class="head-font">总成编码 : {{headContent.sfcCode}}</span>
         <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>
@@ -32,9 +32,9 @@
         <el-descriptions :column="1" border :content-style="{'min-width': '140px'}">
<!--         <el-descriptions :column="1" :label-style="{'font-size': '15px'}" border :content-style="{'min-width': '150px'}">-->
           <el-descriptions-item label="工单编号">
               <span>{{workpieceInformation.workOrderCode}}</span>
               <span>{{workpieceInformation.workOrderNo}}</span>
           </el-descriptions-item>
           <el-descriptions-item label="产品编号">
           <el-descriptions-item label="产品序列号">
             <span>{{workpieceInformation.productCode}}</span>
           </el-descriptions-item>
           <el-descriptions-item label="产品型号">
@@ -43,9 +43,9 @@
           <el-descriptions-item label="产品名称">
             <span>{{workpieceInformation.productName}}</span>
           </el-descriptions-item>
           <el-descriptions-item label="节拍">
             <span>{{workpieceInformation.beat}}</span>
           </el-descriptions-item>
<!--           <el-descriptions-item label="节拍">-->
<!--             <span>{{workpieceInformation.beat}}</span>-->
<!--           </el-descriptions-item>-->
         </el-descriptions>
         <el-divider></el-divider>
         <el-row>
@@ -289,6 +289,9 @@
import {listFormulaChild, releaseCheck, updateResults, workpieceRelease} from "@/api/main/bs/formulaChild/formulaChild";
import MySerialPort from "@/utils/MySerialPort";
import USBDevice from "@/utils/usb.json";
import {listProductionOrde} from "@/api/main/om/productionOrde/productionOrde";
import {addPassingStationCollection} from "@/api/main/da/passingStationCollection/passingStationCollection";
import {addBasicParameters, addParamCollection} from "@/api/main/da/paramCollection/paramCollection";
export default {
  name: "stationTerminal",
@@ -312,7 +315,7 @@
        sfcCode: '10',
      },
      workpieceInformation: {
        workOrderCode: null,
        workOrderNo: null,
        productCode: null,
        productModel: null,
        productName: null,
@@ -366,6 +369,8 @@
      isShowSendArea: false,
      readType: 1,
      title: "",
      passingStationForm: {},
    }
  },
  beforeDestroy() {
@@ -436,7 +441,11 @@
    },
    serialPortMethod(value){
      let formulaChildParams = {
        materialCode: value
        materialCode: value,
        workOrderNo: this.workpieceInformation.workOrderNo,
        productCode: this.workpieceInformation.productCode,
        locationCode: this.headContent.processesCode,
        collectionTime: new Date()
      }
      updateResults(formulaChildParams).then(response => {
        this.getListFormulaChild()
@@ -475,12 +484,12 @@
      this.cakeLamp.startWork = 1
    },
    /** 查询报工记录 表列表 */
    /** 查询工单列表 */
    async getList() {
      await listWorkReport(this.queryParams).then(response => {
      await listProductionOrde(this.queryParams).then(response => {
        let rowsData = response.rows[0];
        console.log(rowsData)
        this.workpieceInformation.workOrderCode = rowsData.workOrderCode;
        this.workpieceInformation.workOrderNo = rowsData.workOrderNo;
        this.workpieceInformation.productCode = rowsData.productCode;
        this.workpieceInformation.productModel = rowsData.productModel;
        this.workpieceInformation.productName = rowsData.productName;
@@ -489,6 +498,24 @@
        }, 1000);
      });
      this.getListFormulaChild()
      this.addOverStationCollection()
    },
    /** 入站增加过站采集记录 **/
    addOverStationCollection(){
      this.passingStationForm = {
        id: null,
        workOrderNo: this.workpieceInformation.workOrderNo,
        productCode: this.workpieceInformation.productCode,
        locationCode: this.headContent.processesCode,
        model: this.workpieceInformation.productModel,
        productBarcode: this.headContent.sfcCode,
        inboundTime: new Date()
      }
      addPassingStationCollection(this.passingStationForm).then(response => {
      });
      addBasicParameters(this.passingStationForm).then(response => {
      });
    },
    allowRelease(){
      clearInterval(this.timer);