From 37ea14cee91a886aaef0e7151756b9857ea1b4df Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Tue, 7 Jan 2025 09:32:24 +0800 Subject: [PATCH] =?UTF-8?q?2024-01-07=20RoutingTool=E5=8A=A0=E5=88=86?= =?UTF-8?q?=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/part/routingManagement.js | 71 ++----- src/views/modules/part/partInformation.vue | 4 - src/views/modules/part/routingManagement.vue | 200 +++++++++++++++---- 3 files changed, 176 insertions(+), 99 deletions(-) diff --git a/src/api/part/routingManagement.js b/src/api/part/routingManagement.js index 81c20a0..c33d80c 100644 --- a/src/api/part/routingManagement.js +++ b/src/api/part/routingManagement.js @@ -2,166 +2,124 @@ import { createAPI } from "@/utils/httpRequest.js"; /** * routing列表查询 - * @param data - * @returns {*} */ export const routingManagementSearch = data => createAPI(`/plm/routingManagement/routingManagementSearch`,'post',data) /** * routing新增 - * @param data - * @returns {*} */ export const routingManagementSave = data => createAPI(`/plm/routingManagement/routingManagementSave`,'post',data) /** * routing编辑 - * @param data - * @returns {*} */ export const routingManagementEdit = data => createAPI(`/plm/routingManagement/routingManagementEdit`,'post',data) /** * routing删除 - * @param data - * @returns {*} */ export const routingManagementDelete = data => createAPI(`/plm/routingManagement/routingManagementDelete`,'post',data) /** * 查询物料清单 - * @param data - * @returns {*} */ export const queryPartList = data => createAPI(`/plm/routingManagement/queryPartList`,'post',data) /** * 查routing明细 - * @param data - * @returns {*} */ export const queryRoutingDetail = data => createAPI(`/plm/routingManagement/queryRoutingDetail`,'post',data) /** * 查routing明细 - * @param data - * @returns {*} */ export const queryRoutingComponent = data => createAPI(`/plm/routingManagement/queryRoutingComponent`,'post',data) /** * routing明细新增 - * @param data - * @returns {*} */ export const routingDetailSave = data => createAPI(`/plm/routingManagement/routingDetailSave`,'post',data) /** * routing明细编辑 - * @param data - * @returns {*} */ export const routingDetailUpdate = data => createAPI(`/plm/routingManagement/routingDetailUpdate`,'post',data) /** * 修改明细状态 - * @param data - * @returns {*} */ export const updateAlternativeStatus = data => createAPI(`/plm/routingManagement/updateAlternativeStatus`,'post',data) /** * routing明细删除 - * @param data - * @returns {*} */ export const routingDetailDelete = data => createAPI(`/plm/routingManagement/routingDetailDelete`,'post',data) /** * 新增routing主信息 - * @param data - * @returns {*} */ export const saveRoutingHeader = data => createAPI(`/plm/routingManagement/saveRoutingHeader`,'post',data) /** * 查询routing主信息 - * @param data - * @returns {*} */ export const queryRoutingHeader = data => createAPI(`/plm/routingManagement/queryRoutingHeader`,'post',data) /** * 新增routing子明细 - * @param data - * @returns {*} */ export const saveRoutingComponent = data => createAPI(`/plm/routingManagement/saveRoutingComponent`,'post',data) /** * 修改routing子明细 - * @param data - * @returns {*} */ export const updateRoutingComponent = data => createAPI(`/plm/routingManagement/updateRoutingComponent`,'post',data) /** * 删除routing子明细 - * @param data - * @returns {*} */ export const deleteRoutingComponent = data => createAPI(`/plm/routingManagement/deleteRoutingComponent`,'post',data) /** * 查询工序列表 - * @param data - * @returns {*} */ export const queryOperationList = data => createAPI(`/plm/routingManagement/queryOperationList`,'post',data) + /** * 获取物料的routing版本号 - * @param data - * @returns {*} */ export const getRottingRevision = data => createAPI(`/plm/routingManagement/getRottingRevision`,'post',data) + /** * 获取 routingTools - * @param data - * @returns {*} */ export const searchRoutingTools = data => createAPI(`/plm/routingManagement/searchRoutingTools`,'post',data) + /** * 新增 routingTools - * @param data - * @returns {*} */ export const routingToolSave = data => createAPI(`/plm/routingManagement/routingToolSave`,'post',data) + /** * 根据替代查询工序列表 - * @param data - * @returns {*} */ export const queryOperationListByAlternative = data => createAPI(`/plm/routingManagement/queryOperationListByAlternative`,'post',data) + /** * 根据物料查询替代 - * @param data - * @returns {*} */ export const queryAlternativeListByPartNo = data => createAPI(`/plm/routingManagement/queryAlternativeListByPartNo`,'post',data) + /** * 编辑 routingTools - * @param data - * @returns {*} */ export const routingToolEdit = data => createAPI(`/plm/routingManagement/routingToolEdit`,'post',data) + /** * 删除 routingTools - * @param data - * @returns {*} */ export const deleteRoutingTool = data => createAPI(`/plm/routingManagement/deleteRoutingTool`,'post',data) - /** * @Author Yzz * @Description 工艺路线信息查询 @@ -171,35 +129,30 @@ export const routingAllInfoSearch = data => createAPI(`/plm/routingManagement/ro /** * 复制Routing - * @param data - * @returns {*} */ export const copyRouting = data => createAPI(`/plm/routingManagement/copyRouting`,'post',data) /** * 复制alternative - * @param data - * @returns {*} */ export const copyAlternative = data => createAPI(`/plm/routingManagement/copyAlternative`,'post',data) /** * 转正式Routing - * @param data - * @returns {*} */ export const toBecomeOfficialRouting = data => createAPI(`/plm/routingManagement/toBecomeOfficialRouting`,'post',data) /** * 查询最大工序号 - * @param data - * @returns {*} */ export const queryMaxOperationNo = data => createAPI(`/plm/routingManagement/queryMaxOperationNo`,'post',data) /** * 查出可创建Routing的物料 - * @param data - * @returns {*} */ export const queryPartListRouting = data => createAPI(`/plm/routingManagement/queryPartListRouting`,'post',data) + +/** + * 获取工具集合 + */ +export const queryToolList = data => createAPI(`/plm/routingManagement/queryToolList`,'post',data) diff --git a/src/views/modules/part/partInformation.vue b/src/views/modules/part/partInformation.vue index 51319cd..973f86d 100644 --- a/src/views/modules/part/partInformation.vue +++ b/src/views/modules/part/partInformation.vue @@ -24,7 +24,6 @@ - @@ -4988,7 +4987,6 @@ } } }) - }, // 计划人输入校验 @@ -5007,7 +5005,6 @@ } } }) - }, // 会计组输入校验 @@ -5026,7 +5023,6 @@ } } }) - }, // 计量单位输入校验 diff --git a/src/views/modules/part/routingManagement.vue b/src/views/modules/part/routingManagement.vue index f6e609b..d47602b 100644 --- a/src/views/modules/part/routingManagement.vue +++ b/src/views/modules/part/routingManagement.vue @@ -320,7 +320,7 @@ - + 查询 @@ -372,7 +372,7 @@ - + 查询 @@ -400,6 +400,62 @@ + + 关闭 + + + + + +
+ + + + + + + + + 查询 + + + + + + + + + + +
+ + 关闭 +
@@ -509,7 +565,7 @@
- 工序 + 工序 工序 @@ -517,9 +573,9 @@ - 工具 - 工具 - + 工具 + 工具 + @@ -915,6 +971,7 @@ import { copyAlternative, // 复制alternative toBecomeOfficialRouting, // 转正式Routing queryMaxOperationNo, // 查询最大工序号 + queryToolList, // 获取工具集合 } from '@/api/part/routingManagement.js' import { routingSearchAlternative, // routing 替代列表查询 @@ -998,6 +1055,9 @@ export default { pageIndex2: 1, pageSize2: 20, totalPage2: 0, + pageIndex3: 1, + pageSize3: 20, + totalPage3: 0, pageIndex4: 1, pageSize4: 20, totalPage4: 0, @@ -1109,6 +1169,13 @@ export default { page: 1, limit: 10 }, + toolData: { + site: this.$store.state.user.site, + toolId: '', + toolDescription: '', + page: 1, + limit: 10 + }, operationData: { site: this.$store.state.user.site, partNo: '', @@ -1254,6 +1321,7 @@ export default { alternativeList: [], workGuidelineList: [], copyPartList: [], + toolList: [], // ======== 列表表头 ======== columnList: [ { @@ -1481,6 +1549,7 @@ export default { sortLv: 0, status: true, fixed: '', + columnWidth: 100 }, { columnProp: 'operationName', @@ -1493,6 +1562,7 @@ export default { sortLv: 0, status: true, fixed: '', + columnWidth: 200 } ], columnSubDetailList: [ @@ -2273,6 +2343,30 @@ export default { columnWidth: 150 } ], + toolColumnList: [ + { + columnProp: 'toolId', + headerAlign: "center", + align: "left", + columnLabel: '工具编码', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 100 + }, + { + columnProp: 'toolDescription', + headerAlign: "center", + align: "left", + columnLabel: '工具名称', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 200 + }, + ], // ======== 必填规则 ======== rules: { partNo: [ @@ -2522,6 +2616,7 @@ export default { workGuidelineDisableModal: false, headerSaveFlag: false, copyPartModelFlag: false, + toolModelFlag: false } }, @@ -2572,65 +2667,59 @@ export default { }) }, // ======== 分页相关方法 ======== - /** - * 每页数 - * @param val - */ + // 每页数 sizeChangeHandle (val) { this.pageSize = val this.pageIndex = 1 this.getDataList() }, - /** - * 当前页 - * @param val - */ + + // 当前页 currentChangeHandle (val) { this.pageIndex = val this.getDataList() }, - /** - * 每页数 - * @param val - */ + // 每页数 sizeChangeHandle2 (val) { this.pageSize2 = val this.pageIndex2 = 1 this.queryPartList() }, - /** - * 当前页 - * @param val - */ + // 当前页 currentChangeHandle2 (val) { this.pageIndex2 = val this.queryPartList() }, - /** - * 每页数 - * @param val - */ + // 每页数 + sizeChangeHandle3 (val) { + this.pageSize3 = val + this.pageIndex3 = 1 + this.queryToolList() + }, + + // 当前页 + currentChangeHandle3 (val) { + this.pageIndex3 = val + this.queryToolList() + }, + + // 每页数 sizeChangeHandle4 (val) { this.pageSize4 = val this.pageIndex4 = 1 this.queryCopyPartModal() }, - /** - * 当前页 - * @param val - */ + // 当前页 currentChangeHandle4 (val) { this.pageIndex4 = val this.queryCopyPartModal() }, - /** - * copy物料列表 - */ + // copy物料列表 queryCopyPartModal () { this.copyPartData.limit = this.pageSize4 this.copyPartData.page = this.pageIndex4 @@ -2650,9 +2739,7 @@ export default { }) }, - /** - * copy物料查询列表 - */ + // copy物料查询列表 queryCopyPartList () { this.copyPartData.limit = this.pageSize4 this.copyPartData.page = this.pageIndex4 @@ -3453,6 +3540,47 @@ export default { } }) }, + + // 查工具列表 + queryToolList () { + this.toolData.limit = this.pageSize3 + this.toolData.page = this.pageIndex3 + queryToolList(this.toolData).then(({data}) => { + if (data && data.code === 0) { + this.toolList = data.page.list + this.pageIndex3 = data.page.currPage + this.pageSize3 = data.page.pageSize + this.totalPage3 = data.page.totalCount + this.toolModelFlag = true + } + }) + }, + + // 安全代码输入校验 + routingToolBlur (tagNo) { + let tempData = { + tagno: tagNo, + conditionSql: " and tool_id = '" + this.routingToolData.toolId + "'" + " and site = '" + this.routingToolData.site + "'" + } + verifyData(tempData).then(({data}) => { + if (data && data.code === 0) { + if (data.baseListData.length > 0) { + this.routingToolData.toolId = data.baseListData[0].tool_id + this.routingToolData.toolDescription = data.baseListData[0].tool_description + } else { + this.routingToolData.toolDescription = '' + } + } + }) + }, + + // 双击选中工具 + doubleClickTool (row) { + this.routingToolData.toolId = row.toolId + this.routingToolData.toolDescription = row.toolDescription + this.toolModelFlag = false + }, + /** * 替代列表 */