From d5fa60ded975b19e7474563d81577807c6956ba3 Mon Sep 17 00:00:00 2001 From: ruanqi Date: Fri, 27 Sep 2024 18:12:39 +0800 Subject: [PATCH] =?UTF-8?q?plm=20=E5=B7=A5=E5=85=B7=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/project/project.js | 1 + .../technicalSpecificationList.vue | 8 +++++ src/views/modules/tooling/searchToolApply.vue | 33 ++++++++++++++++++- 3 files changed, 41 insertions(+), 1 deletion(-) diff --git a/src/api/project/project.js b/src/api/project/project.js index 9031e48..fc555cb 100644 --- a/src/api/project/project.js +++ b/src/api/project/project.js @@ -49,3 +49,4 @@ export const projectInfoPartSearch= data => createAPI(`/project/projectInfoPartS export const queryProjectByCustomer = (data) => createAPI(`/project`,'post',data) export const queryProjectPart = (data) => createAPI(`/project/part`,'post',data) +export const getProjectPartNowBm= data => createAPI(`/project/getProjectPartNowBm`,'post',data) diff --git a/src/views/modules/sampleManagement/technicalSpecificationList.vue b/src/views/modules/sampleManagement/technicalSpecificationList.vue index b5f8399..d5b218b 100644 --- a/src/views/modules/sampleManagement/technicalSpecificationList.vue +++ b/src/views/modules/sampleManagement/technicalSpecificationList.vue @@ -340,6 +340,7 @@ testPartNo: '', oriCodeNo: '', statusDesc: '', + codeNo:'', }, pageIndex: 1, pageSize: 100, @@ -723,6 +724,13 @@ this.searchData.oriCodeNo = ''; }, 200) } + if (this.$route.params.nowCodeNo){ + this.searchData.codeNo = this.$route.params.nowCodeNo; + this.search(); + setTimeout(() => { + this.searchData.codeNo = ''; + }, 200) + } }, methods: { // 下达 diff --git a/src/views/modules/tooling/searchToolApply.vue b/src/views/modules/tooling/searchToolApply.vue index 72545b1..df00a8f 100644 --- a/src/views/modules/tooling/searchToolApply.vue +++ b/src/views/modules/tooling/searchToolApply.vue @@ -113,6 +113,16 @@ style="width: 100px; height: 80px"/> + + + @@ -369,7 +379,7 @@ deleteProjectFile, getFileContentList, downLoadProjectFile, - getProjectUserRole, + getProjectPartNowBm, } from "@/api/project/project.js" import { getNodeAuthority, // 获取节点权限 @@ -1350,6 +1360,27 @@ }) }, + jumpBM(row){ + if (this.$router.resolve(`/sampleManagement-technicalSpecificationList`).resolved.name === '404'){ + this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',}); + }else { + let inData={ + site:row.site, + testPartNo:row.orderRef2 + } + getProjectPartNowBm(inData).then(({data}) => { + //区分请求成功和失败的状况 + if (data && data.code == 0) { + if(data.rows==null||data.rows.length==0){ + this.$alert('该物料没有benchmark', '警告', {confirmButtonText: '确定',}); + } + this.$router.push({name:`sampleManagement-technicalSpecificationList`,params:{nowCodeNo:data.rows[0].nowBm},}) + } else { + + } + }); + } + }, }, activated() {