From b802804ee553f2a5147e4b04ba2abc628d9be00c Mon Sep 17 00:00:00 2001 From: ruanqi Date: Sat, 16 Mar 2024 14:30:30 +0800 Subject: [PATCH] plm BM --- .../technicalSpecificationList.js | 5 + .../com_bm_routing.vue | 109 +++++++++++++++++- 2 files changed, 112 insertions(+), 2 deletions(-) diff --git a/src/api/sampleManagement/technicalSpecificationList.js b/src/api/sampleManagement/technicalSpecificationList.js index 83e499d..c9e4ad9 100644 --- a/src/api/sampleManagement/technicalSpecificationList.js +++ b/src/api/sampleManagement/technicalSpecificationList.js @@ -89,3 +89,8 @@ export const deleteBMPrintingColor= data => createAPI(`/technicalSpecification/d export const upBMRevNo= data => createAPI(`/technicalSpecification/upBMRevNo`,'post',data) export const searchBMBomDetail= data => createAPI(`/technicalSpecification/searchBMBomDetail`,'post',data) export const updateBMBomRev= data => createAPI(`/technicalSpecification/updateBMBomRev`,'post',data) + + +export const searchRouteDetail= data => createAPI(`/technicalSpecification/searchRouteDetail`,'post',data) +export const updateBMRouteRev= data => createAPI(`/technicalSpecification/updateBMRouteRev`,'post',data) + diff --git a/src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_routing.vue b/src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_routing.vue index a91bcbd..2cbf1c8 100644 --- a/src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_routing.vue +++ b/src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_routing.vue @@ -157,8 +157,8 @@ 刷新 - - + 变更 + + + + + + + + + + + + + + + + + + 确定 + 取消 + + @@ -341,6 +399,8 @@ searchTechnicalSpecificationTeamStr, updateBMRoutingDetail, searchBMRoute, + searchRouteDetail, + updateBMRouteRev, } from "@/api/sampleManagement/technicalSpecificationList.js" import Chooselist from '@/views/modules/common/Chooselist' import { @@ -734,6 +794,9 @@ }, ], currentRow:{}, + //变更工艺路线 + modalFlag:false, + routeDetailList:[], } }, mounted () { @@ -1148,7 +1211,49 @@ break; } }, + searchDetailTable(){ + searchRouteDetail(this.routeData).then(({data}) => { + this.routeDetailList=data.rows; + }); + }, + changeRouteRev(){ + this.searchDetailTable() + this.currentRow=null + this.modalFlag=true; + }, + getRow(row){ + this.currentRow=row + }, + updateBMRouteRev(){ + if(this.currentRow==null){ + this.$alert('请点击选择Route版本!', '错误', { + confirmButtonText: '确定' + }) + return false; + } + let inData={ + site:this.routeData.site, + codeNo:this.searchData.codeNo, + routingType:this.currentRow.routingType, + routingRevision:this.currentRow.routingRevision, + routeAlternativeNo:this.currentRow.alternativeNo + } + this.$confirm("更改工艺路线后,之前填写的工艺信息都将覆盖,是否继续?", '保存提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + }).then(() => { + updateBMRouteRev(inData).then(({data}) => { + if (data && data.code === 0) { + this.searchTable(); + this.modalFlag = false; + this.$message.success('操作成功') + } else { + this.$message.error(data.msg) + } + }) + }) + }, }, }