From 67ad1864f8aae542e6e5f03a05dec6f4e5ec5ed7 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Wed, 18 Mar 2026 10:27:34 +0800 Subject: [PATCH] =?UTF-8?q?2026-03-18=20Inventory=20Part=E5=92=8C=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E4=BF=A1=E6=81=AF=E9=A1=B5=E9=9D=A2=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E3=80=90=E8=8E=B7=E5=8F=96=E7=BC=96=E7=A0=81=E3=80=91=E3=80=90?= =?UTF-8?q?=E7=BC=96=E7=A0=81=E8=AF=A6=E6=83=85=E3=80=91=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/code/generation.vue | 32 ++++-- src/views/modules/part/partInformation.vue | 97 +++++++++++++++++-- .../projectInfo/com_project_info_part.vue | 94 ++++++++++++++++-- 3 files changed, 197 insertions(+), 26 deletions(-) diff --git a/src/views/modules/code/generation.vue b/src/views/modules/code/generation.vue index 52cfddd..65cfbcd 100644 --- a/src/views/modules/code/generation.vue +++ b/src/views/modules/code/generation.vue @@ -8,6 +8,12 @@ import itemValue from "./item/itemValue.vue"; export default { name: "CodeGeneration", + props: { + dialogMode: { + type: Boolean, + default: false + } + }, computed: { itemValue() { return itemValue @@ -232,17 +238,23 @@ export default { this.saveCodeLoading = true; saveDrawing(params).then(({data})=>{ if (data && data.code === 0){ - this.$alert(`成功获取并保存了编码${this.searchModel.drawingNo}`, '提示', { - confirmButtonText: '确定', - }); - Object.keys(this.searchModel).forEach(key => { - this.$set(this.searchModel, key, '') - }) - for (let i = 0; i < this.codeItemDefs.length; i++) { - this.$set(this.codeItemValues, i, undefined) + if (this.dialogMode) { + this.saveCodeLoading = false; + const savedDrawingNo = this.searchModel.drawingNo; + this.$emit('code-saved', savedDrawingNo); + } else { + this.$alert(`成功获取并保存了编码${this.searchModel.drawingNo}`, '提示', { + confirmButtonText: '确定', + }); + Object.keys(this.searchModel).forEach(key => { + this.$set(this.searchModel, key, '') + }) + for (let i = 0; i < this.codeItemDefs.length; i++) { + this.$set(this.codeItemValues, i, undefined) + } + this.saveCodeLoading = false; + this.searchCodeItemDefs(); } - this.saveCodeLoading = false; - this.searchCodeItemDefs(); }else { this.saveCodeLoading = false; this.$message.warning(data.msg) diff --git a/src/views/modules/part/partInformation.vue b/src/views/modules/part/partInformation.vue index 725b0ed..27c255a 100644 --- a/src/views/modules/part/partInformation.vue +++ b/src/views/modules/part/partInformation.vue @@ -8,6 +8,9 @@ + + + @@ -134,6 +137,7 @@ 配方BOM Routing 转正式物料 + 编码详情 @@ -165,6 +169,12 @@ + + + + + 获取编码 + Copy Part @@ -1419,6 +1429,26 @@ + + + + + + + + + + + + + + + + + + 关闭 + + @@ -1489,6 +1519,8 @@ import FilterSearch from "../../common/filterSearch.vue"; import {masterPartSearchAny} from "../../../api/part/masterPartInformation"; import {partInformationSearchAny} from "../../../api/part/partInformation"; + import {searchDrawingDetailList} from "../../../api/code/codeDrawing"; + import CodeGeneration from "../code/generation.vue"; export default { components: { FilterSearch, @@ -1496,7 +1528,8 @@ UploadFileList, DictDataSelect, Chooselist, - partUploadFile + partUploadFile, + CodeGeneration }, watch: { searchData: { @@ -1603,7 +1636,8 @@ status: '', ifsPartNo: '', plmPartNo: '', - partType: '' + partType: '', + drawingNo: '' }, // 其它 loading: false, @@ -1725,7 +1759,8 @@ manufacturingInfoFlag: false, // Manufacturing标识 planningInfoFlag: false, // planning标识 partItemInfoFlag: false, // 属性信息标识 - copyPartNo: '' + copyPartNo: '', + drawingNo: '' }, revisionData: { flag: '', @@ -1882,6 +1917,22 @@ fixed: '', columnWidth: 120 }, + { + userId: this.$store.state.user.name, + functionId: 104001, + serialNumber: '104001Table1DrawingNo', + tableId: '104001Table1', + tableName: '物料信息表', + columnProp: 'drawingNo', + headerAlign: 'center', + align: 'left', + columnLabel: '编码', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 120 + }, { userId: this.$store.state.user.name, functionId: 104001, @@ -3408,7 +3459,11 @@ filterVisible: false, isFilterSearch: false, filterSearchData: {}, - copyFlag2: false + copyFlag2: false, + drawingNoDialogVisible: false, + partDrawingDetailList: [], + partDrawingDetailDialogVisible: false, + partDrawingDetailLoading: false } }, @@ -4111,7 +4166,8 @@ manufacturingInfoFlag: false, // Manufacturing标识 planningInfoFlag: false, // planning标识 partItemInfoFlag: false, // 属性信息标识 - copyPartNo: '' + copyPartNo: '', + drawingNo: '' } this.partItemList = [] this.inventoryPartTable = 'General' @@ -4237,7 +4293,8 @@ manufacturingInfoFlag: false, // Manufacturing标识 planningInfoFlag: false, // planning标识 partItemInfoFlag: false, // 属性信息标识 - copyPartNo: '' + copyPartNo: '', + drawingNo: row.drawingNo || '' } this.resetFlags() // 重置标识 this.setupWatchers() // 设置监听 @@ -4361,7 +4418,8 @@ manufacturingInfoFlag: false, // Manufacturing标识 planningInfoFlag: false, // planning标识 partItemInfoFlag: false, // 属性信息标识 - copyPartNo: '' + copyPartNo: '', + drawingNo: row.drawingNo || '' } this.getPartCharacteristicList() this.inventoryPartTable = 'General' @@ -4484,7 +4542,8 @@ manufacturingInfoFlag: false, // Manufacturing标识 planningInfoFlag: false, // planning标识 partItemInfoFlag: false, // 属性信息标识 - copyPartNo: '' + copyPartNo: '', + drawingNo: row.drawingNo || '' } this.getPartCharacteristicList() // 查出该物料的BOM和routing的替代 @@ -6133,6 +6192,28 @@ this.isFilterSearch = true this.filterVisible = false }, + + handleCodeGenerated(drawingNo) { + this.modalData.drawingNo = drawingNo; + this.drawingNoDialogVisible = false; + }, + + handlePartDrawingDetail(row) { + this.partDrawingDetailLoading = true; + this.partDrawingDetailList = []; + this.partDrawingDetailDialogVisible = true; + searchDrawingDetailList({ drawingNo: row.drawingNo }).then(({data}) => { + if (data && data.code === 0) { + this.partDrawingDetailList = data.rows; + } else { + this.$message.warning(data.msg); + } + this.partDrawingDetailLoading = false; + }).catch((error) => { + this.$message.error(error); + this.partDrawingDetailLoading = false; + }); + }, } } diff --git a/src/views/modules/project/projectInfo/com_project_info_part.vue b/src/views/modules/project/projectInfo/com_project_info_part.vue index c58a4b1..b977623 100644 --- a/src/views/modules/project/projectInfo/com_project_info_part.vue +++ b/src/views/modules/project/projectInfo/com_project_info_part.vue @@ -10,6 +10,9 @@ + + + @@ -69,12 +72,13 @@ fixed="right" header-align="center" align="center" - width="100" + width="160" label="操作"> @@ -95,20 +99,26 @@ - + - + - + + + + + + + 获取编码 - + - BU - + BU + @@ -964,6 +974,26 @@ + + + + + + + + + + + + + + + + + + 关闭 + + @@ -1007,12 +1037,15 @@ import { import DictDataSelect from "../../sys/dict-data-select.vue" import ProjectPartUpload from "./project_part_upload.vue"; import {downLoadFile, queryFileId, readPartFromFile} from "../../../../api/part/partInformation"; +import {searchDrawingDetailList} from "../../../../api/code/codeDrawing"; +import CodeGeneration from "../../code/generation.vue"; export default { components: { ProjectPartUpload, DictDataSelect, Chooselist, + CodeGeneration, }, watch: { modalData: { @@ -1077,6 +1110,7 @@ import {downLoadFile, queryFileId, readPartFromFile} from "../../../../api/part/ plmPartNo: '', finalPartNo: '', customerPartNo: '', + drawingNo: '', page: 1, limit: 10, page2: 1, @@ -1156,6 +1190,22 @@ import {downLoadFile, queryFileId, readPartFromFile} from "../../../../api/part/ fixed: '', columnWidth: 120 }, + { + userId: this.$store.state.user.name, + functionId: 101002001, + serialNumber: '101002001Table4DrawingNo', + tableId: "101002001Table4", + tableName: "项目物料", + columnProp: "drawingNo", + headerAlign: "center", + align: "left", + columnLabel: "编码", + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 130 + }, { userId: this.$store.state.user.name, functionId: 101002001, @@ -1532,6 +1582,10 @@ import {downLoadFile, queryFileId, readPartFromFile} from "../../../../api/part/ }, modalFlag: false, modalDisableFlag: false, + drawingNoDialogVisible: false, + partDrawingDetailList: [], + partDrawingDetailDialogVisible: false, + partDrawingDetailLoading: false, rules: { partNo: [ { @@ -2107,6 +2161,7 @@ import {downLoadFile, queryFileId, readPartFromFile} from "../../../../api/part/ this.searchData.finalPartNo = '' this.searchData.customerPartNo = '' this.searchData.partDesc = '' + this.searchData.drawingNo = '' this.pageIndex2 = 1 this.searchTable() }, @@ -2382,7 +2437,8 @@ import {downLoadFile, queryFileId, readPartFromFile} from "../../../../api/part/ costsInfoFlag: false, // costs标识 manufacturingInfoFlag: false, // Manufacturing标识 planningInfoFlag: false, // planning标识 - partItemInfoFlag: false // 属性信息标识 + partItemInfoFlag: false, // 属性信息标识 + drawingNo: data.rows.drawingNo || '' } this.resetFlags() // 重置标识 this.setupWatchers() // 设置监听 @@ -3778,6 +3834,28 @@ import {downLoadFile, queryFileId, readPartFromFile} from "../../../../api/part/ } }) }, + + handleCodeGenerated(drawingNo) { + this.modalData.drawingNo = drawingNo; + this.drawingNoDialogVisible = false; + }, + + handlePartDrawingDetail(row) { + this.partDrawingDetailLoading = true; + this.partDrawingDetailList = []; + this.partDrawingDetailDialogVisible = true; + searchDrawingDetailList({ drawingNo: row.drawingNo }).then(({data}) => { + if (data && data.code === 0) { + this.partDrawingDetailList = data.rows; + } else { + this.$message.warning(data.msg); + } + this.partDrawingDetailLoading = false; + }).catch((error) => { + this.$message.error(error); + this.partDrawingDetailLoading = false; + }); + }, }, }