From 2b47274a931d5d95e66320534c9970eefbe1e2de Mon Sep 17 00:00:00 2001
From: fengyuan_yang <1976974459@qq.com>
Date: Thu, 30 May 2024 11:11:18 +0800
Subject: [PATCH] =?UTF-8?q?2024-05-30=20=E6=9B=B4=E6=96=B02?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/quotation/quotationInformation.js | 7 +
src/api/test/testInformation.js | 12 ++
.../processManagement/processBindingInfo.vue | 3 +-
.../modules/quotation/requestForQuote.vue | 7 +-
src/views/modules/test/requestForTest.vue | 136 +++++++++++++++---
5 files changed, 143 insertions(+), 22 deletions(-)
diff --git a/src/api/quotation/quotationInformation.js b/src/api/quotation/quotationInformation.js
index b8a38c1..f425901 100644
--- a/src/api/quotation/quotationInformation.js
+++ b/src/api/quotation/quotationInformation.js
@@ -127,3 +127,10 @@ export const searchQuotationByQuotationNo = data => createAPI(`/plm/quotationInf
* @returns {*}
*/
export const submitChange = data => createAPI(`/plm/quotationInformation/submitChange`,'post',data)
+
+/**
+ * 下达
+ * @param data
+ * @returns {*}
+ */
+export const quotationInformationEditStatus = data => createAPI(`/plm/quotationInformation/quotationInformationEditStatus`,'post',data)
diff --git a/src/api/test/testInformation.js b/src/api/test/testInformation.js
index 35864ac..52be163 100644
--- a/src/api/test/testInformation.js
+++ b/src/api/test/testInformation.js
@@ -99,4 +99,16 @@ export const closeModalDeleteFile = data => createAPI(`/plm/testInformation/clos
* @returns {*}
*/
export const batchDeleteTestFile = data => createAPI(`/plm/testInformation/batchDeleteTestFile`,'post',data)
+/**
+ * 提交
+ * @param data
+ * @returns {*}
+ */
+export const submitChange = data => createAPI(`/plm/testInformation/submitChange`,'post',data)
+/**
+ * 下达
+ * @param data
+ * @returns {*}
+ */
+export const testInformationEditStatus = data => createAPI(`/plm/testInformation/testInformationEditStatus`,'post',data)
diff --git a/src/views/modules/processManagement/processBindingInfo.vue b/src/views/modules/processManagement/processBindingInfo.vue
index 59c3ac0..37db4c9 100644
--- a/src/views/modules/processManagement/processBindingInfo.vue
+++ b/src/views/modules/processManagement/processBindingInfo.vue
@@ -1608,10 +1608,9 @@
if (this.tagNo === 1014) {
this.modalData.menuId = val.Menu_id
this.modalData.name = val.Name
- }else if (this.tagNo === 1015){
+ } else if (this.tagNo === 1015) {
this.modalData.workflowId = val.Workflowid
this.modalData.workflowname = val.Workflowname
-
}
},
diff --git a/src/views/modules/quotation/requestForQuote.vue b/src/views/modules/quotation/requestForQuote.vue
index 6bbf40a..ec1b1b3 100644
--- a/src/views/modules/quotation/requestForQuote.vue
+++ b/src/views/modules/quotation/requestForQuote.vue
@@ -361,8 +361,8 @@
保存
关闭
- 同意
- 驳回
+ 同意
+ 驳回
@@ -1005,6 +1005,7 @@ import {
getCustomerInformation, // 获取客户信息
searchProjectInfoList,// 查询项目信息
submitChange, // 提交
+ quotationInformationEditStatus, // 下达
} from '@/api/quotation/quotationInformation.js'
import {
customerContactSearch, // 客户联系人列表查询
@@ -3258,7 +3259,7 @@ export default {
params.quotationStatus = '下达';
params.userName = this.$store.state.user.name
params.menuId = this.$route.meta.menuId
- quotationInformationEdit(params).then(({data}) => {
+ quotationInformationEditStatus(params).then(({data}) => {
if (data && data.code === 0) {
this.$message.success('询价单已下达')
this.getDataList()
diff --git a/src/views/modules/test/requestForTest.vue b/src/views/modules/test/requestForTest.vue
index 199c71d..56162f0 100644
--- a/src/views/modules/test/requestForTest.vue
+++ b/src/views/modules/test/requestForTest.vue
@@ -393,6 +393,8 @@
保存
关闭
+ 同意
+ 驳回
@@ -1077,8 +1079,13 @@
saveCustomerResponse, // 保存客户回复
getProjectPartList, // 获取产品列表
getProjectInformation, // 获取项目信息
- getCustomerInformation // 获取客户信息
+ getCustomerInformation, // 获取客户信息
+ submitChange, // 提交
+ testInformationEditStatus, // 下达
} from '@/api/test/testInformation.js'
+ import {
+ getNodeAuthority, // 获取节点权限
+ } from '@/api/changeManagement/changeManagement.js'
import {
downLoadQuotationFile, // 文件下载
searchProjectInfoList
@@ -1102,6 +1109,17 @@
import {getTestPropertiesList,searchTestPropertiesItem} from "../../../api/test/testProperties";
import TestFile from "./file/testFile.vue";
export default {
+ computed: {
+ testInformationFlag () {
+ return (value) => {
+ let arr = this.plmTestInformationArr.filter(a => a.fieldId === value)
+ if (arr.length > 0) {
+ return arr[0].updateFlag
+ }
+ return 'N'
+ }
+ },
+ },
name:"test",
components: {
TestFile,
@@ -1199,7 +1217,8 @@
engineerName: '',
priorityLevel: '',
page: 1,
- limit: 10
+ limit: 10,
+ menuId: this.$route.meta.menuId,
},
// 其它
dataListLoading: false,
@@ -1255,6 +1274,11 @@
updateBy: '',
printType:'',
productName:'',
+ nodeConclusion: '',
+ stepId: '',
+ rejectFlag: '',
+ rejectStepId: '',
+ isReject: ''
},
testDetailData: {
technicalConsiderations: '',
@@ -1352,6 +1376,7 @@
projectPartList: [],
addressList: [],
contactList: [],
+ plmTestInformationArr: [],
// ======== 列表表头 ========
columnList: [
{
@@ -2381,7 +2406,8 @@
* 报价信息编辑模态框
* @param row
*/
- updateModal (row) {
+ async updateModal (row) {
+ await this.getNodeAuthority(row)
this.modalData = {
flag: '2',
title: '测试申请-'+row.testNo,
@@ -2427,7 +2453,12 @@
testStatus: row.testStatus,
testResultStatus: row.testResultStatus,
nextToDo: row.nextToDo,
- updateBy: this.$store.state.user.name
+ updateBy: this.$store.state.user.name,
+ nodeConclusion: '',
+ stepId: row.stepId,
+ rejectFlag: row.rejectFlag,
+ rejectStepId: row.rejectStepId,
+ isReject: row.isReject
}
this.activeTabList = ['product','process','attribute','partAttribute','file']
this.$nextTick(()=>{
@@ -3254,18 +3285,26 @@
})
},
updateModalStatus(row,status){
- let params = JSON.parse(JSON.stringify(row))
- params.testResultStatus = status;
- params.testStatus = '下达';
- testInformationEdit(params).then(({data}) => {
- if (data && data.code === 0) {
- this.getDataList()
- this.$message.success('测试单已下达')
- } else {
- this.$alert(data.msg, '错误', {
- confirmButtonText: '确定'
- })
- }
+ this.$confirm(`是否确认下达?`, '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ let params = JSON.parse(JSON.stringify(row))
+ params.testResultStatus = status
+ params.testStatus = '下达'
+ params.userName = this.$store.state.user.name
+ params.menuId = this.$route.meta.menuId
+ testInformationEditStatus(params).then(({data}) => {
+ if (data && data.code === 0) {
+ this.getDataList()
+ this.$message.success('测试单已下达')
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
})
},
partClickRow(row){
@@ -3286,7 +3325,70 @@
this.$message.error(error)
})
this.projectPartModelFlag = false
- }
+ },
+
+ // 同意提交
+ agreeSubmit () {
+ this.$confirm(`是否确认提交?`, '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ this.modalData.nodeConclusion = 'Y'
+ this.submitData()
+ })
+ },
+
+ // 驳回提交
+ rejectSubmit () {
+ this.$confirm(`是否确认驳回?`, '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ this.modalData.nodeConclusion = 'N'
+ this.submitData()
+ })
+ },
+
+ // 提交
+ submitData () {
+ let tempData = {
+ site: this.modalData.site,
+ userName: this.$store.state.user.name,
+ testNo: this.modalData.testNo,
+ menuId: this.$route.meta.menuId,
+ nodeConclusion: this.modalData.nodeConclusion
+ }
+ submitChange(tempData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.getDataList()
+ this.$message({message: '操作成功', type: 'success'})
+ this.submitModalFlag = false
+ this.modalFlag = false
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
+ },
+
+ // 获取流程的配置权限
+ async getNodeAuthority (row) {
+ let tempData = {
+ site: row.site,
+ stepId: row.stepId,
+ menuId: this.$route.meta.menuId
+ }
+ await getNodeAuthority(tempData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.plmTestInformationArr = data.rows.plmTestInformation
+ }
+ })
+ },
+
+
}
}