|
@@ -1,34 +1,72 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
- <!-- 列表数据 -->
|
|
|
- <el-table
|
|
|
- :key="tableKey"
|
|
|
- ref="table"
|
|
|
- v-loading="loading"
|
|
|
- :data="tableData"
|
|
|
- border
|
|
|
- fit
|
|
|
- row-key="id"
|
|
|
- style="width: 100%;"
|
|
|
- >
|
|
|
- <!-- 零件 -->
|
|
|
- <el-table-column prop="name" :label='$t("runCenter.table.checkCuttingTool.partName")' :show-overflow-tooltip="true"></el-table-column>
|
|
|
- <!-- 刀具齐套性 -->
|
|
|
- <el-table-column
|
|
|
- :label="$t('runCenter.table.checkCuttingTool.hasCuttingTools')"
|
|
|
- fixed="right"
|
|
|
- align="center"
|
|
|
- column-key="operation"
|
|
|
+ <div>
|
|
|
+ <el-tag >需要申请刀具数据</el-tag>
|
|
|
+ <el-table
|
|
|
+ :key="tableKey"
|
|
|
+ ref="table"
|
|
|
+ v-loading="loading"
|
|
|
+ :data="noCutterData"
|
|
|
+ border
|
|
|
+ fit
|
|
|
+ row-key="id"
|
|
|
+ style="width: 100%;"
|
|
|
+ >
|
|
|
+ <el-table-column prop="orderNo" label='订单编号' :show-overflow-tooltip="true"></el-table-column>
|
|
|
+ <el-table-column prop="orderName" label='订单名称' :show-overflow-tooltip="true"></el-table-column>
|
|
|
+ <el-table-column prop="name" :label='$t("runCenter.table.checkCuttingTool.partName")' :show-overflow-tooltip="true"></el-table-column>
|
|
|
+ <el-table-column prop="deviceName" :label='"设备"' :show-overflow-tooltip="true"></el-table-column>
|
|
|
+ <el-table-column prop="msg" :label='"校验信息"' :show-overflow-tooltip="true"></el-table-column>
|
|
|
+ <el-table-column prop="number" :label='"缺刀数"' :show-overflow-tooltip="true" width="80px"></el-table-column>
|
|
|
+ <!-- <el-table-column prop="isTask" :label='"任务是否已生成"' :show-overflow-tooltip="true"></el-table-column> -->
|
|
|
+ <!-- <el-table-column
|
|
|
+ :label="$t('runCenter.table.checkCuttingTool.hasCuttingTools')"
|
|
|
+ fixed="right"
|
|
|
+ align="center"
|
|
|
+ column-key="operation"
|
|
|
+ >
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <a @click="showCheckDetails(row)" style="color: #2db7f5">{{row.hasCuttingToolsFlag}} </a>
|
|
|
+ </template>
|
|
|
+ </el-table-column> -->
|
|
|
+ </el-table>
|
|
|
+ <el-button class="el-button--primary generateTask" @click="applySave()">生成任务</el-button>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div>
|
|
|
+ <el-tag >机床所需刀具</el-tag>
|
|
|
+ <el-table
|
|
|
+ :key="tableKey"
|
|
|
+ ref="table"
|
|
|
+ v-loading="loading"
|
|
|
+ :data="tableData"
|
|
|
+ border
|
|
|
+ fit
|
|
|
+ row-key="id"
|
|
|
+ style="width: 100%;"
|
|
|
>
|
|
|
- <template slot-scope="{ row }">
|
|
|
- <a @click="showCheckDetails(row)" style="color: #2db7f5">{{row.hasCuttingToolsFlag}} </a>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="deviceName" :label='"设备"' :show-overflow-tooltip="true"></el-table-column>
|
|
|
- <el-table-column prop="msg" :label='"校验信息"' :show-overflow-tooltip="true"></el-table-column>
|
|
|
- <el-table-column prop="isTask" :label='"任务是否已生成"' :show-overflow-tooltip="true"></el-table-column>
|
|
|
- </el-table>
|
|
|
- <el-button v-if="this.runTaskVisble" class="el-button--primary generateTask" @click="save()">生成任务</el-button>
|
|
|
+ <el-table-column prop="orderNo" label='订单编号' :show-overflow-tooltip="true"></el-table-column>
|
|
|
+ <el-table-column prop="orderName" label='订单名称' :show-overflow-tooltip="true"></el-table-column>
|
|
|
+ <!-- 零件 -->
|
|
|
+ <el-table-column prop="name" :label='$t("runCenter.table.checkCuttingTool.partName")' :show-overflow-tooltip="true"></el-table-column>
|
|
|
+ <!-- 刀具齐套性 -->
|
|
|
+ <el-table-column
|
|
|
+ :label="$t('runCenter.table.checkCuttingTool.hasCuttingTools')"
|
|
|
+ fixed="right"
|
|
|
+ align="center"
|
|
|
+ column-key="operation"
|
|
|
+ >
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <a @click="showCheckDetails(row)" style="color: #2db7f5">{{row.hasCuttingToolsFlag}} </a>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="deviceName" :label='"设备"' :show-overflow-tooltip="true"></el-table-column>
|
|
|
+ <el-table-column prop="msg" :label='"校验信息"' :show-overflow-tooltip="true"></el-table-column>
|
|
|
+ <el-table-column prop="isTask" :label='"任务是否已生成"' :show-overflow-tooltip="true"></el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-button v-if="this.runTaskVisble" class="el-button--primary generateTask" @click="save()">生成任务</el-button>
|
|
|
+ </div>
|
|
|
+
|
|
|
<!-- 刀具校验详情对话框-->
|
|
|
<el-dialog
|
|
|
:visible.sync="checkDetailCuttingToolsVisible"
|
|
@@ -38,6 +76,7 @@
|
|
|
custom-class="dialogNoTop"
|
|
|
@close="checkDetailCuttingToolsClose"
|
|
|
>
|
|
|
+
|
|
|
<!--【 刀具校验对话框】 -->
|
|
|
<toolChange ref="childForRef"
|
|
|
:device-id="deviceId" :detail-plan-id="detailPlanId" :tool-category="toolCategory"
|
|
@@ -54,6 +93,8 @@
|
|
|
import toolChange from "@/views/zuihou/runManageCenter/orderMgr/components/runningOrder/changeToolTask/Index"
|
|
|
|
|
|
import orderMgrApi from "@/api/runManageCenter/orderMgr";
|
|
|
+
|
|
|
+ import mesNoticeApi from "@/api/runManageCenter/mesNotice"
|
|
|
import TenantEdit
|
|
|
from "@/views/zuihou/runManageCenter/orderMgr/components/runningOrder/changeToolTask/components/Edit.vue";
|
|
|
export default {
|
|
@@ -74,6 +115,8 @@
|
|
|
checkDetailCuttingToolsVisible: false,
|
|
|
detailPlanId: '',
|
|
|
deviceId:'',
|
|
|
+ allTableData: [],
|
|
|
+ noCutterData:[],
|
|
|
tableData: [],
|
|
|
toolCategory:[]
|
|
|
}
|
|
@@ -101,11 +144,21 @@
|
|
|
fetch (planId) {
|
|
|
console.log("this.planId=" + this.planId)
|
|
|
this.loading = true
|
|
|
+ this.noCutterData = []
|
|
|
+ this.tableData = []
|
|
|
|
|
|
orderMgrApi.toolCheck({"plan": planId}).then(response => {
|
|
|
const res = response.data
|
|
|
if(res.isSuccess){
|
|
|
- this.tableData = res.data
|
|
|
+ this.allTableData = res.data
|
|
|
+ res.data.map(item=>{
|
|
|
+ if(item.isNoCutter!=null && item.isNoCutter ==1){
|
|
|
+ this.noCutterData.push(item)
|
|
|
+ }else {
|
|
|
+ this.tableData.push(item)
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
this.runTaskVisble = this.tableData[0].list.length>0 ? true: false
|
|
|
}
|
|
|
}).finally(() => this.loading = false)
|
|
@@ -154,7 +207,22 @@
|
|
|
})
|
|
|
/*
|
|
|
*/
|
|
|
+ },
|
|
|
+ applySave (){
|
|
|
+ let that = this
|
|
|
+ mesNoticeApi.applyCutterSave(this.noCutterData).then(response=> {
|
|
|
+ const res = response.data
|
|
|
+ if(res.isSuccess){
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ message: res.msg
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
</script>
|