|
@@ -48,7 +48,7 @@
|
|
|
<el-form-item :label='$t("resource.form.pgContent")+":"' prop="pgContent">
|
|
|
<el-input v-model="pgContent" :readOnly="true" type="textarea" :rows="6" style="width: 100%;"/>
|
|
|
</el-form-item>
|
|
|
- <!-- 刀具管理 -->
|
|
|
+ <!-- 刀具分组管理 -->
|
|
|
<div>
|
|
|
<h2 class="editTitle">{{$t("prepare.common.toolMgr")}}
|
|
|
<!-- 新增 -->
|
|
@@ -58,6 +58,25 @@
|
|
|
:data="toolList"
|
|
|
style="width: 100%"
|
|
|
>
|
|
|
+ <el-table-column prop="partsAlias" label='零件代号'>
|
|
|
+ <template slot="header">
|
|
|
+ <span>零件代号</span>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <span>{{ row.partsAlias}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column prop="procedureNo" label='工序编号'>
|
|
|
+ <template slot="header">
|
|
|
+ <span>工序编号</span>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <span>{{ row.procedureNo}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <!--
|
|
|
<el-table-column prop="cuttingToolCategory" :label='$t("resource.table.programTool.cuttingToolCategory")'>
|
|
|
<template slot="header">
|
|
|
<span>{{$t("resource.table.programTool.cuttingToolCategory")}}</span>
|
|
@@ -66,22 +85,22 @@
|
|
|
<template slot-scope="{ row }">
|
|
|
<el-select v-model="row.cuttingToolCategory" filterable :placeholder='$t("common.pleaseEnter")'>
|
|
|
<el-option
|
|
|
- v-for="(item,key,index) in dicts.CUTTING_TOOL_CATEGORY"
|
|
|
+ v-for="(item,key,index) in toolSelectList"
|
|
|
:key="index"
|
|
|
- :label="item"
|
|
|
- :value="key">
|
|
|
- </el-option>
|
|
|
+ :label="item.procedureNo"
|
|
|
+ :value="item.id">
|
|
|
+ </el-option>
|
|
|
</el-select>
|
|
|
</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="useTime" :label='$t("resource.table.programTool.useTime")'>
|
|
|
+ </el-table-column> -->
|
|
|
+
|
|
|
+ <el-table-column label='刀具数量'>
|
|
|
<template slot="header">
|
|
|
- <span>{{$t("resource.table.programTool.useTime")}}</span>
|
|
|
- <span class="star">*</span>
|
|
|
+ <span>刀具数量</span>
|
|
|
</template>
|
|
|
<template slot-scope="{ row }">
|
|
|
- <el-input-number v-model="row.useTime" :min="1" :max="999999999" label='$t("common.pleaseEnter")'></el-input-number>
|
|
|
- </template>
|
|
|
+ <span v-if="row.count">{{ row.count}}</span>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<!--<el-table-column prop="count" :label='$t("resource.table.programTool.count")'>
|
|
|
<template slot-scope="{ row }">
|
|
@@ -130,6 +149,7 @@ import programCenterApi from "@/api/resourceProductMgr/programCenter"
|
|
|
// 【设备(生产资源)】-API
|
|
|
import productionResourcesMgrApi from "@/api/resourceProductMgr/productionResourcesMgr"
|
|
|
import attachmentMgrApi from "@/api/Attachment"
|
|
|
+import bomMgrApi from "@/api/prepareProductMgr/bomMgr"
|
|
|
import db from "@/utils/localstorage";
|
|
|
import {Base64} from 'js-base64';
|
|
|
import {initDicts, initQueryParams} from '@/utils/commons'
|
|
@@ -151,9 +171,10 @@ export default {
|
|
|
selectedEq: [], // 新增和修改的设备[设备]数据-来自·(可执行设备(位置))
|
|
|
subBtn: false,
|
|
|
formDisabled: false,
|
|
|
- dicts: {
|
|
|
- CUTTING_TOOL_CATEGORY: {}
|
|
|
- },
|
|
|
+ dicts: {
|
|
|
+ CUTTING_TOOL_CATEGORY: {}
|
|
|
+ },
|
|
|
+ cuttingToolCategory:{},
|
|
|
tableData: [],
|
|
|
eqList: [], // 设备下拉类别数据
|
|
|
toolList: [], // 刀具列表
|
|
@@ -365,10 +386,18 @@ export default {
|
|
|
|
|
|
// 父组件,设置子组件的值-方法
|
|
|
setTenant (val, selectedEq) {
|
|
|
- // console.log("设备:", val)
|
|
|
+ console.log("设备:", selectedEq)
|
|
|
// 表单下拉数据,赋值,动态数据
|
|
|
- this.selectedEq = selectedEq;
|
|
|
+ this.selectedEq = selectedEq;
|
|
|
|
|
|
+ bomMgrApi.get({id:this.selectedEq[0].bomId}).then(res => {
|
|
|
+ console.log("根据id,查询详情BOM:", res.data);
|
|
|
+ res = res.data
|
|
|
+ if(res.isSuccess){
|
|
|
+ this.cuttingToolCategory = res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
if(val){
|
|
|
// 刀具管理
|
|
|
this.toolList = val.toolList?val.toolList:new Array();
|
|
@@ -397,7 +426,7 @@ export default {
|
|
|
// 查询【程序】信息
|
|
|
this.getProgram(pid);
|
|
|
}
|
|
|
- this.getToolList(this.toolList)
|
|
|
+ //this.getToolList(this.toolList)
|
|
|
} else {
|
|
|
// 新增,清空数据
|
|
|
this.resetFile();
|
|
@@ -405,16 +434,29 @@ export default {
|
|
|
},
|
|
|
|
|
|
// 【新增】按钮-事件
|
|
|
- addRes(){
|
|
|
- this.toolList.push({
|
|
|
- key: "WKS_"+ Math.random(),
|
|
|
- cuttingToolCategory: '',
|
|
|
- toolName: '',
|
|
|
- useTime: '',
|
|
|
- count: null,
|
|
|
- isEdit: true
|
|
|
- });
|
|
|
- this.getToolList([]);
|
|
|
+ addRes(){
|
|
|
+ this.queryParams.current = 1
|
|
|
+ this.queryParams.size = 9999
|
|
|
+ this.queryParams.model.partsNo = this.cuttingToolCategory.parts_no
|
|
|
+ this.queryParams.model.procedureNo = this.cuttingToolCategory.no
|
|
|
+ programCenterApi.getCutterCategory(this.queryParams).then(res => {
|
|
|
+ console.log("根据id,查询详情BOM:", res.data);
|
|
|
+ res = res.data
|
|
|
+ if(res.isSuccess){
|
|
|
+ console.log(res)
|
|
|
+ this.toolList.push({
|
|
|
+ key: "WKS_"+ Math.random(),
|
|
|
+ cuttingToolCategory: this.cuttingToolCategory.parts_no+"_"+this.cuttingToolCategory.no,
|
|
|
+ partsNo: this.cuttingToolCategory.parts_alias,
|
|
|
+ procedureNo: this.cuttingToolCategory.no,
|
|
|
+ count: 0,
|
|
|
+ isEdit: false
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
|
|
|
// 【删除】按钮事件
|