| | |
| | | </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> |
| | |
| | | <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="产品型号"> |
| | |
| | | <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> |
| | |
| | | |
| | | <!-- </el-col>--> |
| | | <!-- </el-row>--> |
| | | <!-- <el-row style="margin-top: 20px">--> |
| | | <!-- <el-button @click="Release" type="primary">放行</el-button>--> |
| | | <!-- </el-row>--> |
| | | <el-row style="margin-top: 20px"> |
| | | <el-button @click="Release" type="primary">放行</el-button> |
| | | </el-row> |
| | | </el-card> |
| | | |
| | | </el-col> |
| | |
| | | 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", |
| | |
| | | sfcCode: '10', |
| | | }, |
| | | workpieceInformation: { |
| | | workOrderCode: null, |
| | | workOrderNo: null, |
| | | productCode: null, |
| | | productModel: null, |
| | | productName: null, |
| | |
| | | isShowSendArea: false, |
| | | readType: 1, |
| | | title: "", |
| | | |
| | | passingStationForm: {}, |
| | | } |
| | | }, |
| | | beforeDestroy() { |
| | |
| | | this.open1 = true |
| | | }, |
| | | Release(){ |
| | | //判断是否可以释放 |
| | | let formulaChildParams = { |
| | | productCode: this.workpieceInformation.productCode, |
| | | processesCode: this.headContent.processesCode |
| | | // this.$message('portsList!'+this.portsList.length); |
| | | if(this.btnType === "danger"){ |
| | | this.$message('连接了!'); |
| | | |
| | | }else { |
| | | this.$message('mei连接了!'); |
| | | |
| | | } |
| | | releaseCheck(formulaChildParams).then(response => { |
| | | if(response.data === 0){ |
| | | //改变状态 |
| | | workpieceRelease(formulaChildParams).then(response => { |
| | | }); |
| | | this.$message('放行成功!'); |
| | | this.formulaChildList = [] |
| | | this.getListFormulaChild() |
| | | // this.resetting() |
| | | }else { |
| | | this.$message('步骤未完成不许放行!'); |
| | | } |
| | | }); |
| | | |
| | | // //判断是否可以释放 |
| | | // let formulaChildParams = { |
| | | // productCode: this.workpieceInformation.productCode, |
| | | // processesCode: this.headContent.processesCode |
| | | // } |
| | | // releaseCheck(formulaChildParams).then(response => { |
| | | // if(response.data === 0){ |
| | | // //改变状态 |
| | | // workpieceRelease(formulaChildParams).then(response => { |
| | | // }); |
| | | // this.$message('放行成功!'); |
| | | // this.formulaChildList = [] |
| | | // this.getListFormulaChild() |
| | | // // this.resetting() |
| | | // }else { |
| | | // this.$message('步骤未完成不许放行!'); |
| | | // } |
| | | // }); |
| | | }, |
| | | 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() |
| | |
| | | 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; |
| | |
| | | }, 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); |