|
@@ -9,15 +9,15 @@
|
|
|
<div class="boxDiv">
|
|
|
<!-- 任务信息 -->
|
|
|
<el-steps :active="active" finish-status="success" simple style="margin:20px 0;">
|
|
|
- <el-step title="工装信息" ></el-step>
|
|
|
- <el-step title="零件装夹" ></el-step>
|
|
|
+ <el-step title="刀具信息" ></el-step>
|
|
|
+ <el-step title="刀具装夹" ></el-step>
|
|
|
</el-steps>
|
|
|
|
|
|
<el-row v-show="this.active==1">
|
|
|
- <p style="margin-top:0;text-align:center;font-size:18px;">工装信息
|
|
|
+ <p style="margin-top:0;text-align:center;font-size:18px;">刀具信息
|
|
|
<span style="float:right;margin-right:20px;font-size:14px;">库位编号:{{tenant.code}}</span>
|
|
|
</p>
|
|
|
- <table class="comtable" border="0" cellspacing="0" cellpadding="6" style="margin:10px 0;" v-for="(item, index) in tableData2" :key="item.id">
|
|
|
+ <table class="comtable" border="0" cellspacing="0" cellpadding="6" style="margin:10px 0;" v-for="(item, index) in tableData1" :key="item.id">
|
|
|
<tr>
|
|
|
<td class="blodTd" align="center" width="100">产品名称</td>
|
|
|
<td width="60">{{item.brandName}}</td>
|
|
@@ -34,64 +34,31 @@
|
|
|
<td class="blodTd" align="center" width="100">唯一编码</td>
|
|
|
<td width="120">{{item.uniqueCode}}</td>
|
|
|
</tr>
|
|
|
+ <tr>
|
|
|
+ <td class="blodTd" align="center" width="100">RFID值</td>
|
|
|
+ <td width="60">{{item.brandNo}}</td>
|
|
|
+ <td class="blodTd" align="center" width="100">点位值</td>
|
|
|
+ <td width="60">{{item.pointId}}</td>
|
|
|
+ </tr>
|
|
|
</table>
|
|
|
</el-row>
|
|
|
|
|
|
- <!-- 安装零件 -->
|
|
|
- <el-row v-show="this.active==1 && this.existed==3 && this.matched">
|
|
|
- <p class="titleP" style="margin-top:15px;color:#000;font-size:18px;" >ST1: 请选择零件 <span style="color:red;margin-left:5px;font-size:14px;"></span></p>
|
|
|
- <!-- Table数据 -->
|
|
|
- <p style="margin-top:15px;color:#000;font-size:18px;width:350px;"><el-select
|
|
|
- v-model="bBomId"
|
|
|
- :placeholder='$t("common.pleaseSelect")'
|
|
|
- filterable
|
|
|
- clearable
|
|
|
- style="width: 50%"
|
|
|
- @change="selectBom"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="(item, index) in bBomList"
|
|
|
- :key="index"
|
|
|
- :label="item.name"
|
|
|
- :value="item.id"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- </p>
|
|
|
-
|
|
|
- <el-table
|
|
|
- ref="table"
|
|
|
- v-loading="loading"
|
|
|
- :data = tableData.records
|
|
|
- border
|
|
|
- fit
|
|
|
- style="width: 100%;"
|
|
|
- :key = "timeStamp"
|
|
|
-
|
|
|
- >
|
|
|
- <!-- 编号 -->
|
|
|
- <el-table-column prop="name" :label='$t("prepare.table.tools.name")' align="center" >
|
|
|
-
|
|
|
- </el-table-column>
|
|
|
- <!-- 编号 -->
|
|
|
- <el-table-column prop="batchNo" label='批次号' align="center" ></el-table-column>
|
|
|
- <el-table-column prop="meterialId" label='原材料ID' align="center"></el-table-column>
|
|
|
-
|
|
|
- </el-table>
|
|
|
- </el-row>
|
|
|
-
|
|
|
<el-row v-show="this.active==1">
|
|
|
<p v-if="this.existed==0" class="titleP" style="margin-top:15px;color:#000;font-size:18px;">
|
|
|
- ST1: 当前接驳位托板为空
|
|
|
+ ST1: 当前上下料站数据为空
|
|
|
+ </p>
|
|
|
+ <p v-if="this.existed>0 && this.existed!=1" class="titleP" style="margin-top:15px;color:#000;font-size:18px;">
|
|
|
+ ST1: 当前上下料站刀具上料条件不满足
|
|
|
</p>
|
|
|
- <p v-if="this.existed>0 && this.existed!=3" class="titleP" style="margin-top:15px;color:#000;font-size:18px;">
|
|
|
- ST1: 当前接驳位工装条件不满足
|
|
|
+ <p v-if="this.existed==0" class="titleP" style="margin-top:15px;color:#000;font-size:18px;">
|
|
|
+ ST2: 新增刀具上料确认刀具装夹完成后执行RFID验证
|
|
|
</p>
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
<!-- 装夹物料 -->
|
|
|
- <el-row v-show="this.active>1 && this.existed==3 && this.matched">
|
|
|
- <p class="titleP" style="margin-top:15px;color:#000;font-size:18px;" >ST2: 装夹物料</p>
|
|
|
+ <el-row v-show="this.active>1 && this.existed==1 && this.matched">
|
|
|
+ <p class="titleP" style="margin-top:15px;color:#000;font-size:18px;" >ST2: 装夹刀具</p>
|
|
|
<!-- Table数据 -->
|
|
|
<el-table
|
|
|
ref="table1"
|
|
@@ -102,12 +69,14 @@
|
|
|
style="width: 100%;"
|
|
|
>
|
|
|
<!-- 材料编码 -->
|
|
|
- <el-table-column prop="name" :label='$t("prepare.table.tools.name")' align="center" ></el-table-column>
|
|
|
+ <el-table-column prop="brandName" label='刀具产品' align="center" ></el-table-column>
|
|
|
<!-- 材料牌号 -->
|
|
|
- <el-table-column prop="batchNo" label='批次号' align="center" ></el-table-column>
|
|
|
+ <el-table-column prop="brandNo" label='RFID值' align="center" ></el-table-column>
|
|
|
<!-- 材料名称 -->
|
|
|
- <el-table-column prop="meterialId" label='原材料ID' align="center"></el-table-column>
|
|
|
- <!-- 装夹方式 -->
|
|
|
+ <el-table-column prop="goodsId" label='产品ID' align="center"></el-table-column>
|
|
|
+
|
|
|
+ <el-table-column prop="pointId" label='产品ID' align="center"></el-table-column>
|
|
|
+ <!-- 装夹方式
|
|
|
<el-table-column prop="clampImg" :label='$t("prepare.table.tools.clampImg")' align="center">
|
|
|
<template slot-scope="{ row }">
|
|
|
<div class="block">
|
|
@@ -119,19 +88,18 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ -->
|
|
|
</el-table>
|
|
|
</el-row>
|
|
|
|
|
|
<!-- 输入唯一码 -->
|
|
|
- <el-row v-show="this.active>1 && this.existed==3">
|
|
|
- <p class="titleP" style="margin-top:15px;color:#000;font-size:18px;" >输入订单名称
|
|
|
- </p>
|
|
|
- <el-input v-model="orderName" placeholder="输入订单名称"></el-input>
|
|
|
+ <el-row v-show="this.active==1 && this.existed==0">
|
|
|
+ <el-button type="primary" @click.native="confirmProcedure" v-show="this.active==1" >验证刀具</el-button>
|
|
|
</el-row>
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button plain type="info" @click.native="prev" v-show="this.active>1" >返回上一步</el-button>
|
|
|
- <el-button type="primary" :disabled="confirmDisabled" @click.native="next" v-show="this.active==1 && this.existed==3 && this.matched && !this.locked && bBomId!='' ">已完成,下一步</el-button>
|
|
|
+ <el-button plain type="info" @click.native="prev" v-show="this.active>1 && !this.addFlag" >返回上一步</el-button>
|
|
|
+ <el-button type="primary" :disabled="confirmDisabled" @click.native="next" v-show="this.active==1 && this.existed==1 && this.matched && !this.locked ">已完成,下一步</el-button>
|
|
|
<el-button type="primary" :disabled="confirmDisabled" @click.native="submitForm" v-loading.fullscreen.lock="loading" v-show="this.active>1 && !this.locked">上料完成</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -160,6 +128,7 @@ export default {
|
|
|
screenWidth: 0,
|
|
|
confirmDisabled: false,
|
|
|
callRobotFlag: false,
|
|
|
+ addFlag:false,
|
|
|
width: this.initWidth(),
|
|
|
tenant: {},
|
|
|
queryParams: initQueryParams({}),
|
|
@@ -204,7 +173,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
watch:{
|
|
|
- 'tableData.records': {
|
|
|
+ 'tableData1.records': {
|
|
|
handler(newVal, oldVal){
|
|
|
this.timeStamp = new Date() + ''
|
|
|
},
|
|
@@ -257,19 +226,20 @@ export default {
|
|
|
}
|
|
|
}).catch(()=>{});
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
confirmProcedure(){
|
|
|
- let valid = this.tenant.taskNodeId!=''? true: false;
|
|
|
+ let valid = this.existed == 0? true: false;
|
|
|
if(!valid){
|
|
|
this.$message({
|
|
|
- message: "任务ID" + this.$t("rules.require"),
|
|
|
+ message: "当前数据不为空" ,
|
|
|
type: "warning"
|
|
|
})
|
|
|
return false
|
|
|
}
|
|
|
console.log(this.tenant)
|
|
|
+ //RFID读取校验
|
|
|
+ /*
|
|
|
taskMgrApi.confirmProcedure({ "taskNodeId":this.tenant.taskNodeId, "trayId": this.tenant.trayId, "clampNo": this.tenant.clampNo}).then((res) => {
|
|
|
res = res.data
|
|
|
if (res.isSuccess) {
|
|
@@ -279,7 +249,31 @@ export default {
|
|
|
this.xbkValid = res.data.xbkValid
|
|
|
this.locked = res.data.locked
|
|
|
}
|
|
|
- });
|
|
|
+ }); */
|
|
|
+ this.existed = 1
|
|
|
+ this.matched = true
|
|
|
+ this.confirmDisabled = false
|
|
|
+ this.locked = false
|
|
|
+ this.xbkValid = true
|
|
|
+ this.addFlag = true
|
|
|
+
|
|
|
+ stationMgrApi.addCutToolStockInfo({ deviceId: this.tenant.id, RFID:"27"}).then((res) => {
|
|
|
+ res = res.data;
|
|
|
+ if (res.isSuccess) {
|
|
|
+ let dataInfo = res.data[0]
|
|
|
+ this.tableData1.records = []
|
|
|
+ this.tableData1.records.push({
|
|
|
+ brandName: dataInfo.brandName,
|
|
|
+ brandNo: dataInfo.brandNo,
|
|
|
+ pointId: dataInfo.pointId,
|
|
|
+ goodsId: dataInfo.goodsId
|
|
|
+ })
|
|
|
+ this.active++
|
|
|
+ }
|
|
|
+ }).catch(()=>{});
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
prev(){
|
|
|
if (this.active-- < 0) this.active = 0;
|
|
@@ -340,7 +334,7 @@ export default {
|
|
|
},
|
|
|
addMaterial(that){
|
|
|
let params = {"orderName":that.orderName,"zoneId":that.tenant.zoneId,"bomId":that.bBomId,"materialId": that.materialId, "start":that.tenant.code}
|
|
|
- stationMgrApi.addJbwTask(params).then((res) => {
|
|
|
+ stationMgrApi.addCutToolTask(params).then((res) => {
|
|
|
res = res.data;
|
|
|
if (res.isSuccess) {
|
|
|
//写入RFID
|
|
@@ -371,34 +365,35 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
setTenant (val) {
|
|
|
+ this.active = 1
|
|
|
this.tenant = { ...val }
|
|
|
console.log(this.tenant)
|
|
|
- stationMgrApi.getJbwStockInfo({storgeCode:val.code}).then((res)=>{
|
|
|
+ stationMgrApi.getCutToolStockInfo({deviceId:val.id}).then((res)=>{
|
|
|
res = res.data
|
|
|
console.log(res.data)
|
|
|
if(res.isSuccess){
|
|
|
- this.tableData2 = res.data
|
|
|
+ this.tableData1 = res.data
|
|
|
//console.log(this.tableData2.length)
|
|
|
- this.existed = this.tableData2.length
|
|
|
+ this.existed = this.tableData1.length
|
|
|
this.matched = true
|
|
|
this.confirmDisabled = false
|
|
|
this.xbkValid = true
|
|
|
- if(this.tableData2.length>0){
|
|
|
- this.locked = this.tableData2[0].lockStatus=='1'? false:true
|
|
|
+ if(this.tableData1.length>0){
|
|
|
+ this.locked = this.tableData1[0].lockStatus=='1'? false:true
|
|
|
}else{
|
|
|
this.locked = false;
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
- this.getBomList();
|
|
|
-
|
|
|
+ //this.getBomList();
|
|
|
+ /*
|
|
|
this.tableData.records = []
|
|
|
this.tableData.records.push({
|
|
|
id: '',
|
|
|
batchNo:'',
|
|
|
meterialId :'',
|
|
|
- })
|
|
|
+ }) */
|
|
|
|
|
|
//this.confirmProcedure()
|
|
|
},
|