From c9c7065fa1a5cfc325480276c119d4af4bf5e2d7 Mon Sep 17 00:00:00 2001
From: yuejiayang <146344614+YangLei105@users.noreply.github.com>
Date: Fri, 19 Jul 2024 17:06:57 +0800
Subject: [PATCH] =?UTF-8?q?2024.7.19=20=E4=BA=A7=E5=93=81=E6=96=87?=
=?UTF-8?q?=E6=A1=A3=E6=94=B6=E9=9B=86-=E9=A1=B9=E7=9B=AE=E4=BF=A1?=
=?UTF-8?q?=E6=81=AF=E8=BF=9B=E4=B8=80=E6=AD=A5=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/eam/eamProject.js | 3 +
src/api/factory/site.js | 3 +
src/views/modules/common/uploadFileList1.vue | 10 +-
.../modules/eam/com_project_proof_record.vue | 64 ++-
.../eam/eamBuDocumentListDefinition.vue | 5 +-
.../modules/eam/eamDocumentTypeDefinition.vue | 35 +-
src/views/modules/eam/eamProjectInfo.vue | 418 +++++++++++++-----
7 files changed, 387 insertions(+), 151 deletions(-)
diff --git a/src/api/eam/eamProject.js b/src/api/eam/eamProject.js
index 06f7f7b..fc2012a 100644
--- a/src/api/eam/eamProject.js
+++ b/src/api/eam/eamProject.js
@@ -18,3 +18,6 @@ export const uploadProjectFile= data => createAPI(`/base/uploadProjectFile`,'pos
export const updateProjectDocumentConfirm= data => createAPI(`/pms/eamProject/updateProjectDocumentConfirm`,'post',data)
export const searchProjectConfirmatorFileList= data => createAPI(`/pms/eamProject/searchProjectConfirmatorFileList`,'post',data)
export const deleteProjectFile= data => createAPI(`/base/deleteProjectFile`,'post',data)
+export const sendMailHandle= data => createAPI(`/pms/eamProject/sendMailHandle`,'post',data)
+export const warnSendMailHandle= data => createAPI(`/pms/eamProject/warnSendMailHandle`,'post',data)
+export const confirmatorSendMailHandle= data => createAPI(`/pms/eamProject/confirmatorSendMailHandle`,'post',data)
diff --git a/src/api/factory/site.js b/src/api/factory/site.js
index faf073e..713d9b4 100644
--- a/src/api/factory/site.js
+++ b/src/api/factory/site.js
@@ -46,3 +46,6 @@ export const searchBusinessInfo4 = data => createAPI(`/site/searchBusinessInfo4`
export const searchBusinessInfo5 = data => createAPI(`/site/searchBusinessInfo5`,'post',data)
export const searchBusinessInfo6 = data => createAPI(`/site/searchBusinessInfo6`,'post',data)
+
+export const getResponsibleDepartment = data => createAPI(`/site/getResponsibleDepartment`,'post',data)
+
diff --git a/src/views/modules/common/uploadFileList1.vue b/src/views/modules/common/uploadFileList1.vue
index af11aac..c52718b 100644
--- a/src/views/modules/common/uploadFileList1.vue
+++ b/src/views/modules/common/uploadFileList1.vue
@@ -117,16 +117,16 @@ export default {
{
required: true,
message: ' ',
- trigger: ['blur', 'change']
+ trigger: ['blur']
}
],
- conclusion: [
+ conclusion:[
{
required: true,
message: ' ',
- trigger: ['blur', 'change']
+ trigger: ['blur']
}
- ]
+ ],
}
}
},
@@ -389,7 +389,7 @@ export default {
-
+
点击选择文件
diff --git a/src/views/modules/eam/com_project_proof_record.vue b/src/views/modules/eam/com_project_proof_record.vue
index d0a9067..0e7c454 100644
--- a/src/views/modules/eam/com_project_proof_record.vue
+++ b/src/views/modules/eam/com_project_proof_record.vue
@@ -68,7 +68,7 @@
label="操作">
上传文件
- 提醒
+ 提醒
删除
@@ -431,6 +431,9 @@
import UploadFileList1 from "../common/uploadFileList1.vue";
import he from "element-ui/src/locale/lang/he";
import {deleteProofDocument} from "../../../api/eam/eamProofing";
+ import {sendMailHandle, warnSendMailHandle} from "../../../api/eam/eamProject";
+ import moment from 'moment';
+ import 'moment/locale/zh-cn';
export default {
computed: {
he() {
@@ -1095,6 +1098,7 @@
//刷新表格
this.getProofingInformation()
this.refreshCurrentTabTable()
+ this.sendMailHandle(this.modalData)
} else {
this.$message({
message: '新增失败:数据库已存在该打样单号',
@@ -1148,6 +1152,12 @@
for (let i = 0; i < this.proofDocumentList.length; i++) {
this.proofDocumentList[i].buNo = this.proofDocumenCurrentRow.buNo
}
+ this.proofDocumentListDefinition = []
+ for (let i = 0; i < this.proofDocumentList.length; i++) {
+ if (this.proofDocumentList[i].documentTypeId !== 'N/A') {
+ this.proofDocumentListDefinition.push(this.proofDocumentList[i])
+ }
+ }
if (this.totalPage > 0) {
// 设置选中行
this.$refs.proofDocumentTable.setCurrentRow(this.proofDocumentList[0])
@@ -1204,11 +1214,6 @@
}
this.documentTypeData.proofingNo = row.proofingNo
// 遍历proofDocumentList
- for (let i = 0; i < this.proofDocumentList.length; i++) {
- if (this.proofDocumentList[i].documentTypeId !== 'N/A') {
- this.proofDocumentListDefinition.push(this.proofDocumentList[i])
- }
- }
},
updateProofingRecord(row) {
this.proofingRecordVisible = true
@@ -1291,7 +1296,7 @@
projectId: this.modalData.projectId,
proofingNo: this.modalData.proofingNo,
planStartDate: this.modalData.planStartDate,
- requiredDeliveryDate: this.modalData.requiredDeliveryDate,
+ requiredDeliveryDate: moment(this.modalData.requiredDeliveryDate).utcOffset('+8').format('YYYY-MM-DD'),
actualityDeliveryDate: this.modalData.actualityDeliveryDate,
proofingNumber: this.modalData.proofingNumber,
proofDocumentDataList: this.proofDocumentList,
@@ -1343,7 +1348,6 @@
type: 'warning'
}).then(() => {
deleteProofingRecord(tempData).then(({data}) => {
- console.log(data)
if (data && data.code === 0) {
this.$message({
message: '删除成功',
@@ -1638,7 +1642,49 @@
id: '-1'
};
this.uploadDialog = true
- }
+ },
+ sendMailHandle(row) {
+ sendMailHandle(row).then(({data}) => {
+ if (data && data.code === 0) {
+ this.$message({
+ message: '发送成功',
+ type: 'success'
+ })
+ } else {
+ this.$message.warning(data.msg)
+ }
+ })
+ },
+ warnSendMail(row) {
+ if (this.proofDocumenCurrentRow.createBy !== this.$store.state.user.name) {
+ this.$message({
+ message: '仅打样单录入人才可以发送提醒!',
+ type: 'warning'
+ })
+ } else {
+ this.$confirm('确认发送提醒?', '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ warnSendMailHandle(row).then(({data}) => {
+ if (data && data.code === 0) {
+ this.$message({
+ message: '发送成功',
+ type: 'success'
+ })
+ } else {
+ this.$message.warning(data.msg)
+ }
+ })
+ }).catch(() => {
+ this.$message({
+ type: 'info',
+ message: '已取消发送'
+ });
+ });
+ }
+ },
}
};
diff --git a/src/views/modules/eam/eamBuDocumentListDefinition.vue b/src/views/modules/eam/eamBuDocumentListDefinition.vue
index aaca8a6..e187efe 100644
--- a/src/views/modules/eam/eamBuDocumentListDefinition.vue
+++ b/src/views/modules/eam/eamBuDocumentListDefinition.vue
@@ -716,6 +716,9 @@
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
+ for (let i = 0; i < this.dataList.length; i++) {
+ this.dataList[i].responsibleDepartment = this.dataList[i].roleDesc
+ }
}
})
},
@@ -785,8 +788,6 @@
createBy: this.modalData.createBy,
updateBy: this.modalData.updateBy,
}
- console.log("modalCompareData",this.modalCompareData)
- console.log("modalData",this.modalData)
this.disableButton = true
this.modalDisableFlag = true
this.modalFlag = true
diff --git a/src/views/modules/eam/eamDocumentTypeDefinition.vue b/src/views/modules/eam/eamDocumentTypeDefinition.vue
index 34f97ec..e79d070 100644
--- a/src/views/modules/eam/eamDocumentTypeDefinition.vue
+++ b/src/views/modules/eam/eamDocumentTypeDefinition.vue
@@ -119,9 +119,9 @@
+ :key = "i.roleNo"
+ :label = "i.roleDesc"
+ :value = "i.roleNo">
@@ -148,6 +148,9 @@
eamDocumentTypeDelete,
// getSiteAndBuByUserName
} from "@/api/eam/eam.js"
+ import {
+ getResponsibleDepartment
+ } from "@/api/factory/site.js"
import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js'
import {
getTableDefaultListLanguage,
@@ -190,17 +193,7 @@
page: 1,
limit: 10,
},
- responsibleDepartmentList: [
- {
- responsibleDepartment: '工程师',
- },
- {
- responsibleDepartment: 'PM',
- },
- {
- responsibleDepartment: '质量',
- }
- ],
+ responsibleDepartmentList: [],
height: 200,
pageIndex: 1,
pageSize: 20,
@@ -547,6 +540,9 @@
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
+ for (let i = 0; i < this.dataList.length; i++) {
+ this.dataList[i].responsibleDepartment = this.dataList[i].roleDesc
+ }
}
})
},
@@ -579,6 +575,7 @@
createBy: this.$store.state.user.name,
updateBy: this.$store.state.user.name,
}
+ this.getResponsibleDepartment()
this.modalDisableFlag = false
this.modalFlag = true
},
@@ -596,6 +593,7 @@
createBy: this.$store.state.user.name,
updateBy: this.$store.state.user.name,
}
+ this.getResponsibleDepartment()
this.modalDisableFlag = true
this.modalFlag = true
},
@@ -687,7 +685,14 @@
})
}
},
-
+ getResponsibleDepartment() {
+ this.modalData.site = this.$store.state.user.site
+ getResponsibleDepartment(this.modalData).then(({data}) => {
+ if (data.code === 0) {
+ this.responsibleDepartmentList = data.rows
+ }
+ })
+ },
// 动态列开始 获取 用户保存的 格式列
async getTableUserColumn(tableId, columnId) {
let queryTableUser = {
diff --git a/src/views/modules/eam/eamProjectInfo.vue b/src/views/modules/eam/eamProjectInfo.vue
index 594a428..7d28b0d 100644
--- a/src/views/modules/eam/eamProjectInfo.vue
+++ b/src/views/modules/eam/eamProjectInfo.vue
@@ -107,13 +107,15 @@
fixed="right"
header-align="center"
align="center"
- width="178"
+ width="208"
label="操作">
- 新增打样
- 转正式料号
- 修改
- 删除
+ 下达
+ 新增打样
+ 转正式料号
+ 结案
+ 修改
+ 删除
@@ -738,7 +740,7 @@
label="操作">
上传文件
- 提醒
+ 提醒
删除
@@ -777,16 +779,6 @@
@row-click="projectAllDocumentClickRow"
:row-style="rowStyle"
v-loading="dataListLoading">
-
-
- 提醒
-
-
@@ -1259,9 +1251,9 @@ import {
searchConfirmatorList,
searchConfirmProgressDocumentList,
searchConfirmProgressPusherList,
- searchProjectConfirmatorFileList,
+ searchProjectConfirmatorFileList, sendMailHandle,
updateProjectDocumentConfirm,
- uploadProjectFile
+ uploadProjectFile, warnSendMailHandle, confirmatorSendMailHandle
} from "../../../api/eam/eamProject";
import row from "element-ui/packages/row";
import moment from 'moment';
@@ -1398,6 +1390,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
confirmationPrompted: false, // 是否已经进行过确认提示的标志
modalData:{
flag:'',
+ id:'',
bu: '',
buNo: '',
site: this.$store.state.user.site,
@@ -1647,7 +1640,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
tableName: "项目信息表",
columnProp: "projectCreationDate",
headerAlign: "center",
- align: "left",
+ align: "center",
columnLabel: "立项日期",
columnHidden: false,
columnImage: false,
@@ -1655,7 +1648,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 150
+ columnWidth: 120
},
{
userId: this.$store.state.user.name,
@@ -1691,7 +1684,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 120,
+ columnWidth: 80,
},
//区域
{
@@ -1718,7 +1711,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
serialNumber: '101001014Table1ProjectManager',
tableId: "101001014Table1",
tableName: "项目信息表",
- columnProp: 'projectManager',
+ columnProp: 'projectManagerName',
headerAlign: "center",
align: "left",
columnLabel: 'PM/Sales',
@@ -1736,7 +1729,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
serialNumber: '101001014Table1ProjectOwner',
tableId: "101001014Table1",
tableName: "项目信息表",
- columnProp: 'projectOwner',
+ columnProp: 'projectOwnerName',
headerAlign: "center",
align: "left",
columnLabel: 'PjM',
@@ -1754,7 +1747,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
serialNumber: '101001014Table1Engineer',
tableId: "101001014Table1",
tableName: "项目信息表",
- columnProp: 'engineer',
+ columnProp: 'engineerName',
headerAlign: "center",
align: "left",
columnLabel: 'Engineer',
@@ -1772,9 +1765,9 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
serialNumber: '101001014Table1CQualityEngineer1',
tableId: "101001014Table1",
tableName: "项目信息表",
- columnProp: 'cQualityEngineer1',
+ columnProp: 'cQualityEngineer1Name',
headerAlign: "center",
- align: "center",
+ align: "left",
columnLabel: 'IPQC-Lam/Pri/Etch/Slit',
columnHidden: false,
columnImage: false,
@@ -1790,9 +1783,9 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
serialNumber: '101001014Table1CQualityEngineer2',
tableId: "101001014Table1",
tableName: "项目信息表",
- columnProp: 'cQualityEngineer2',
+ columnProp: 'cQualityEngineer2Name',
headerAlign: "center",
- align: "center",
+ align: "left",
columnLabel: 'IPQC-Converting',
columnHidden: false,
columnImage: false,
@@ -1808,9 +1801,9 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
serialNumber: '101001014Table1CQualityEngineer3',
tableId: "101001014Table1",
tableName: "项目信息表",
- columnProp: 'cQualityEngineer3',
+ columnProp: 'cQualityEngineer3Name',
headerAlign: "center",
- align: "center",
+ align: "left",
columnLabel: 'FQC',
columnHidden: false,
columnImage: false,
@@ -1826,9 +1819,9 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
serialNumber: '101001014Table1CManufactureEngineer',
tableId: "101001014Table1",
tableName: "项目信息表",
- columnProp: 'cManufactureEngineer',
+ columnProp: 'cManufactureEngineerName',
headerAlign: "center",
- align: "center",
+ align: "left",
columnLabel: 'MFG',
columnHidden: false,
columnImage: false,
@@ -1854,7 +1847,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 120,
+ columnWidth: 100,
},
{
userId: this.$store.state.user.name,
@@ -1864,7 +1857,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
tableName: "项目信息表",
columnProp: 'needDate',
headerAlign: "center",
- align: "left",
+ align: "center",
columnLabel: '预计完成日期',
columnHidden: false,
columnImage: false,
@@ -2577,18 +2570,17 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
},
],
statusList: [
+ {
+ status: '草稿',
+ },
{
status: '进行中',
},
{
- status: '已结束',
+ status: '已结案',
}
],
userBuList: [],
- authSearch: false,
- authSave: false,
- authUpdate: false,
- authDelete: false,
menuId: this.$route.meta.menuId,
}
},
@@ -2649,10 +2641,6 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
this.modalData.customerNo = val.customer_no
this.modalData.customerDesc = val.customer_desc
}
- if (this.tagNo === 301) {
- this.modalData.projectManager = val.project_manager
- this.modalData.projectManagerName = val.project_manager
- }
},
// 校验用户是否收藏
@@ -2728,6 +2716,16 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
+ // 遍历dataList
+ this.dataList.forEach((item) => {
+ item.projectManagerName = item.projectManager.split('-')[1]
+ item.projectOwnerName = item.projectOwner.split('-')[1]
+ item.engineerName = item.engineer.split('-')[1]
+ item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1]
+ item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1]
+ item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1]
+ item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1]
+ })
// 判断是否全部存在数据
if (this.totalPage > 0) {
// 设置选中行
@@ -2817,7 +2815,6 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
this.generateNextPartNo().then(testPartNo => {
this.modalData.testPartNo = testPartNo; // 在异步操作完成后再赋值
})
- console.log('testPartNo',this.modalData.testPartNo)
this.modalDisableFlag = false
this.modalFlag = true
},
@@ -2825,7 +2822,6 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
return new Promise((resolve, reject) => {
getTestPartNo().then(({ data }) => {
const stringData = String(data); // 显式转换为字符串
- console.log('stringData',stringData)
if (stringData === 'null' || stringData === 'undefined' || stringData === '' || stringData === '0') {
resolve('P00001');
} else {
@@ -2868,20 +2864,20 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
needDate: row.needDate,
cProjectRegion: row.cProjectRegion,
projectManager: row.projectManager,
- projectManagerName: row.projectManagerName,
+ projectManagerName: row.projectManager.split('-')[1], // 截取用户名
projectOwner: row.projectOwner,
- projectOwnerName: row.projectOwnerName,
+ projectOwnerName: row.projectOwner.split('-')[1], // 截取用户名
engineer: row.engineer,
- engineerName: row.engineerName,
+ engineerName: row.engineer.split('-')[1], // 截取用户名
cQualityEngineer1: row.cQualityEngineer1,
- cQualityEngineer1Name: row.cQualityEngineer1Name,
+ cQualityEngineer1Name: row.cQualityEngineer1.split('-')[1], // 截取用户名
cQualityEngineer2: row.cQualityEngineer2,
- cQualityEngineer2Name: row.cQualityEngineer2Name,
+ cQualityEngineer2Name: row.cQualityEngineer2.split('-')[1], // 截取用户名
projectCreationDate: row.projectCreationDate,
cQualityEngineer3: row.cQualityEngineer3,
- cQualityEngineer3Name: row.cQualityEngineer3Name,
+ cQualityEngineer3Name: row.cQualityEngineer3.split('-')[1], // 截取用户名
cManufactureEngineer: row.cManufactureEngineer,
- cManufactureEngineerName: row.cManufactureEngineerName,
+ cManufactureEngineerName: row.cManufactureEngineer.split('-')[1], // 截取用户名
finalPartNo: row.finalPartNo,
finalPartDesc: row.finalPartDesc,
// active: row.active,
@@ -2913,6 +2909,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
updateModal (row) {
this.modalData = {
flag: '2',
+ id: row.id,
site: row.site,
bu: row.site + '_' + row.buNo,
customerNo: row.customerNo,
@@ -2927,20 +2924,21 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
needDate: row.needDate,
cProjectRegion: row.cProjectRegion,
projectManager: row.projectManager,
- projectManagerName: row.projectManager,
+ projectManagerName: row.projectManager.split('-')[1], // 截取用户名
projectOwner: row.projectOwner,
- projectOwnerName: row.projectOwner,
+ projectOwnerName: row.projectOwner.split('-')[1], // 截取用户名
engineer: row.engineer,
- engineerName: row.engineer,
+ engineerName: row.engineer.split('-')[1], // 截取用户名
cQualityEngineer1: row.cQualityEngineer1,
- cQualityEngineer1Name: row.cQualityEngineer1,
+ cQualityEngineer1Name: row.cQualityEngineer1.split('-')[1], // 截取用户名
cQualityEngineer2: row.cQualityEngineer2,
- cQualityEngineer2Name: row.cQualityEngineer2,
+ cQualityEngineer2Name: row.cQualityEngineer2.split('-')[1], // 截取用户名
cQualityEngineer3: row.cQualityEngineer3,
- cQualityEngineer3Name: row.cQualityEngineer3,
+ cQualityEngineer3Name: row.cQualityEngineer3.split('-')[1], // 截取用户名
cManufactureEngineer: row.cManufactureEngineer,
- cManufactureEngineerName: row.cManufactureEngineer,
+ cManufactureEngineerName: row.cManufactureEngineer.split('-')[1], // 截取用户名
projectCreationDate: row.projectCreationDate,
+ status: row.status,
// active: row.active,
createBy: this.$store.state.user.name,
updateBy: this.$store.state.user.name,
@@ -2948,7 +2946,105 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
this.modalDisableFlag = true
this.modalFlag = true
},
-
+ updateModalStatus (row) {
+ this.modalData = {
+ id: row.id,
+ site: row.site,
+ bu: row.site + '_' + row.buNo,
+ customerNo: row.customerNo,
+ customerDesc: row.customerDesc,
+ projectCategory: row.projectCategory,
+ testPartNo: row.testPartNo,
+ partDesc: row.partDesc,
+ projectId: row.projectId,
+ projectDesc: row.projectDesc,
+ priority: row.priority,
+ projectCloseDate: row.projectCloseDate,
+ needDate: row.needDate,
+ cProjectRegion: row.cProjectRegion,
+ projectManager: row.projectManager,
+ projectManagerName: row.projectManager.split('-')[1], // 截取用户名
+ projectOwner: row.projectOwner,
+ projectOwnerName: row.projectOwner.split('-')[1], // 截取用户名
+ engineer: row.engineer,
+ engineerName: row.engineer.split('-')[1], // 截取用户名
+ cQualityEngineer1: row.cQualityEngineer1,
+ cQualityEngineer1Name: row.cQualityEngineer1.split('-')[1], // 截取用户名
+ cQualityEngineer2: row.cQualityEngineer2,
+ cQualityEngineer2Name: row.cQualityEngineer2.split('-')[1], // 截取用户名
+ cQualityEngineer3: row.cQualityEngineer3,
+ cQualityEngineer3Name: row.cQualityEngineer3.split('-')[1], // 截取用户名
+ cManufactureEngineer: row.cManufactureEngineer,
+ cManufactureEngineerName: row.cManufactureEngineer.split('-')[1], // 截取用户名
+ projectCreationDate: row.projectCreationDate,
+ status: row.status,
+ // active: row.active,
+ createBy: this.$store.state.user.name,
+ updateBy: this.$store.state.user.name,
+ }
+ if (row.projectOwner.split('-')[0] === this.$store.state.user.name) {
+ if (row.status === '草稿') {
+ this.modalData.status = '进行中'
+ this.$confirm(`是否确认下达该项目?`, '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ eamProjectInfoEdit(this.modalData).then(({data}) => {
+ if (data && data.code === '0') {
+ this.getDataList()
+ this.$message({
+ message: '操作成功',
+ type: 'success',
+ duration: 1500,
+ onClose: () => {
+ }
+ })
+ this.sendMailHandle(row)
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
+ }).catch(() => {
+ })
+ }
+ } else {
+ this.$message({
+ message: '该项目只允许PjM人员进行下达!',
+ type: 'warning',
+ showClose: true, // 显示关闭按钮
+ duration: 2000 // 显示时间,单位是毫秒,这里设置为5秒钟
+ });
+ }
+ if (row.status === '进行中') {
+ this.modalData.status = '已结案'
+ this.modalData.projectCloseDate = new Date()
+ this.$confirm(`是否确认结案?`, '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ eamProjectInfoEdit(this.modalData).then(({data}) => {
+ if (data && data.code === '0') {
+ this.getDataList()
+ this.$message({
+ message: '操作成功',
+ type: 'success',
+ duration: 1500,
+ onClose: () => {}
+ })
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
+ }).catch(() => {
+ })
+ }
+ },
// 删除
eamProjectInfoDelete (row) {
this.$confirm(`是否删除这个项目信息?`, '提示', {
@@ -2986,13 +3082,6 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
this.$refs.proofRecord.init(inData)
},
saveData () {
- this.modalData.projectManager = this.modalData.projectManagerName
- this.modalData.projectOwner = this.modalData.projectOwnerName
- this.modalData.cQualityEngineer1 = this.modalData.cQualityEngineer1Name
- this.modalData.cQualityEngineer2 = this.modalData.cQualityEngineer2Name
- this.modalData.cQualityEngineer3 = this.modalData.cQualityEngineer3Name
- this.modalData.cManufactureEngineer = this.modalData.cManufactureEngineerName
- this.modalData.engineer = this.modalData.engineerName
this.modalData.oriProjectId = this.modalData.projectId
this.modalData.finalCustomerId = this.modalData.customerNo
if (this.modalData.projectId === '' || this.modalData.projectId == null) {
@@ -3068,7 +3157,11 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
// return
// }
if (this.modalData.flag === '1') {
- this.newProjectDocument(this.modalData)
+ if (new Date(this.modalData.needDate).getTime() < new Date().getTime()) {
+ this.$message.warning('预计完成日期不能小于当前日期!')
+ return
+ }
+ this.modalData.status = '草稿'
eamProjectInfoSave(this.modalData).then(({data}) => {
if (data && data.code === '0') {
this.getDataList()
@@ -3079,6 +3172,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
duration: 1500,
onClose: () => {},
})
+ this.newProjectDocument(this.modalData)
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
@@ -3086,7 +3180,10 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
}
})
} else {
- this.editProjectDocument(this.modalData)
+ if (new Date(this.modalData.needDate).getTime() < new Date().getTime()) {
+ this.$message.warning('预计完成日期不能小于当前日期!')
+ return
+ }
eamProjectInfoEdit(this.modalData).then(({data}) => {
if (data && data.code === '0') {
this.getDataList()
@@ -3097,6 +3194,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
duration: 1500,
onClose: () => {}
})
+ this.editProjectDocument(this.modalData)
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
@@ -3272,37 +3370,37 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
this.MFGlag = false
},
projectManagerRowDblclick (row) {
- this.modalData.projectManager = row.username
- this.modalData.projectManagerName = row.userDisplay
+ this.modalData.projectManager = row.username + '-' + row.userDisplay
+ this.modalData.projectManagerName = row.projectManager.split('-')[1] // 截取用户名
this.projectManagerFlag = false
},
projectOwnerRowDblclick (row) {
- this.modalData.projectOwner = row.username
- this.modalData.projectOwnerName = row.userDisplay
+ this.modalData.projectOwner = row.username + '-' + row.userDisplay
+ this.modalData.projectOwnerName = row.projectOwner.split('-')[1] // 截取用户名
this.projectOwnerFlag = false
},
engineerRowDblclick (row) {
- this.modalData.cQualityEngineer1 = row.username
- this.modalData.cQualityEngineer1Name = row.userDisplay
+ this.modalData.cQualityEngineer1 = row.username + '-' + row.userDisplay
+ this.modalData.cQualityEngineer1Name = row.cQualityEngineer1.split('-')[1] // 截取用户名
this.engineerFlag = false
},
engineer6RowDblclick (row) {
- this.modalData.engineer = row.username
- this.modalData.engineerName = row.userDisplay
+ this.modalData.engineer = row.username + '-' + row.userDisplay
+ this.modalData.engineerName = row.engineer.split('-')[1] // 截取用户名
this.engineer6Flag = false
},
IPQCRowDblclick (row) {
- this.modalData.cQualityEngineer2 = row.username
+ this.modalData.cQualityEngineer2 = row.username + '-' + row.userDisplay
this.modalData.cQualityEngineer2Name = row.userDisplay
this.IPQCFlag = false
},
FQCRowDblclick (row) {
- this.modalData.cQualityEngineer3 = row.username
+ this.modalData.cQualityEngineer3 = row.username + '-' + row.userDisplay
this.modalData.cQualityEngineer3Name = row.userDisplay
this.FQCFlag = false
},
MFGRowDblclick (row) {
- this.modalData.cManufactureEngineer = row.username
+ this.modalData.cManufactureEngineer = row.username + '-' + row.userDisplay
this.modalData.cManufactureEngineerName = row.userDisplay
this.MFGlag = false
},
@@ -3315,10 +3413,10 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
let strName = ''
this.businessSelections.forEach((item, index) => {
if (index === this.businessSelections.length - 1) {
- str += item.username
+ str += item.username + '-' + item.userDisplay
strName += item.userDisplay
} else {
- str += item.username + ','
+ str += item.username + '-' + item.userDisplay + ','
strName += item.userDisplay + ','
}
})
@@ -3331,10 +3429,10 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
let strName = ''
this.businessSelections.forEach((item, index) => {
if (index === this.businessSelections.length - 1) {
- str += item.username
+ str += item.username + '-' + item.userDisplay
strName += item.userDisplay
} else {
- str += item.username + ','
+ str += item.username + '-' + item.userDisplay + ','
strName += item.userDisplay + ','
}
})
@@ -3347,10 +3445,10 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
let strName = ''
this.businessSelections.forEach((item, index) => {
if (index === this.businessSelections.length - 1) {
- str += item.username
+ str += item.username + '-' + item.userDisplay
strName += item.userDisplay
} else {
- str += item.username + ','
+ str += item.username + '-' + item.userDisplay + ','
strName += item.userDisplay + ','
}
})
@@ -3363,10 +3461,10 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
let strName = ''
this.businessSelections.forEach((item, index) => {
if (index === this.businessSelections.length - 1) {
- str += item.username
+ str += item.username + '-' + item.userDisplay
strName += item.userDisplay
} else {
- str += item.username + ','
+ str += item.username + '-' + item.userDisplay + ','
strName += item.userDisplay + ','
}
})
@@ -3379,10 +3477,10 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
let strName = ''
this.businessSelections.forEach((item, index) => {
if (index === this.businessSelections.length - 1) {
- str += item.username
+ str += item.username + '-' + item.userDisplay
strName += item.userDisplay
} else {
- str += item.username + ','
+ str += item.username + '-' + item.userDisplay + ','
strName += item.userDisplay + ','
}
})
@@ -3395,10 +3493,10 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
let strName = ''
this.businessSelections.forEach((item, index) => {
if (index === this.businessSelections.length - 1) {
- str += item.username
+ str += item.username + '-' + item.userDisplay
strName += item.userDisplay
} else {
- str += item.username + ','
+ str += item.username + '-' + item.userDisplay + ','
strName += item.userDisplay + ','
}
})
@@ -3411,10 +3509,10 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
let strName = ''
this.businessSelections.forEach((item, index) => {
if (index === this.businessSelections.length - 1) {
- str += item.username
+ str += item.username + '-' + item.userDisplay
strName += item.userDisplay
} else {
- str += item.username + ','
+ str += item.username + '-' + item.userDisplay + ','
strName += item.userDisplay + ','
}
}
@@ -3447,8 +3545,6 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
projectOtherDocumentClickRow (row) {
row.id = row.documentDefinitionListId
this.otherDocumentCurrentRow = JSON.parse(JSON.stringify(row))
- console.log('row',row)
- console.log('this.otherDocumentCurrentRow',this.otherDocumentCurrentRow)
},
changeCurrentRow1 (row, oldRow) {
row.id = row.documentDefinitionListId
@@ -3456,8 +3552,6 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
if (row) {
this.otherDocumentCurrentRow.bu = this.otherDocumentCurrentRow.site + "-" + this.otherDocumentCurrentRow.buNo
this.otherDocumentCurrentRow = JSON.parse(JSON.stringify(row))
- console.log('row1',row)
- console.log('this.otherDocumentCurrentRow1',this.otherDocumentCurrentRow)
//刷新当前页表
this.refreshCurrentTabTable()
}
@@ -3565,6 +3659,13 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
getProjectOtherDocument(tempData).then(({data}) => {
if (data && data.code === 0) {
this.projectOtherDocumentList = data.page.list
+ this.proofDocumentListDefinition = []
+ // 遍历proofDocumentList
+ for (let i = 0; i < this.projectOtherDocumentList.length; i++) {
+ if (this.projectOtherDocumentList[i].documentTypeId !== 'N/A') {
+ this.proofDocumentListDefinition.push(this.projectOtherDocumentList[i])
+ }
+ }
for (let i = 0; i < this.projectOtherDocumentList.length; i++) {
this.projectOtherDocumentList[i].buNo = this.proofingCurrentRow.buNo
}
@@ -3645,12 +3746,6 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
page: 1
}
this.getProjectOtherDocument()
-// 遍历proofDocumentList
- for (let i = 0; i < this.projectOtherDocumentList.length; i++) {
- if (this.projectOtherDocumentList[i].documentTypeId !== 'N/A') {
- this.proofDocumentListDefinition.push(this.projectOtherDocumentList[i])
- }
- }
this.projectDocumentListVisible = true
},
projectDocumentListVisibleFalse() {
@@ -3831,6 +3926,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
let confirmatorPromises = this.projectAllDocumentConfirmatorList.map(item => {
let inData = {
site: this.proofingCurrentRow.site,
+ projectId: this.proofingCurrentRow.projectId,
orderRef1: this.proofingCurrentRow.projectId,
userid: item.userid,
itemNo: this.projectAllDocumentConfirmatorList.indexOf(item) + 1,
@@ -3847,6 +3943,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
let inData = {
site: this.proofingCurrentRow.site,
orderRef1: this.proofingCurrentRow.projectId,
+ projectId: this.proofingCurrentRow.projectId,
selectedDocumentItems: this.selectedDocumentItems,
}
let saveDocumentPromises = this.handleDocumentSave(inData);
@@ -3858,6 +3955,7 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
});
this.projectProductionValidationDocumentVisible = false;
this.confirmationPrompted = false;
+ this.confirmatorSendMailHandle(inData)
})
.catch(error => {
console.error('保存文档出错:', error);
@@ -4140,7 +4238,6 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
saveUploadFile(){
this.confirmData.confirmedDate = moment(this.confirmData.confirmedDate).utcOffset('+8').format('YYYY-MM-DD HH:mm:ss');
this.confirmData.confirmedBy = this.$store.state.user.userDisplay;
- console.log('this.confirmData',this.confirmData)
updateProjectDocumentConfirm(this.confirmData) .then(({data}) => {
if (data.code === 0) {
this.confirmVisible = false;
@@ -4291,20 +4388,42 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
viewFile(row) {
// 预览文件
let image = ['jpg', 'jpeg', 'png', 'gif', 'bmp']
+ let video = ['mp4', 'avi', 'mov', 'wmv', 'flv']
+ let office = ['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx']
+ let txt = ['txt']
let type = ''
+ let pdf = ['pdf']
if (image.includes(row.fileType.toLowerCase())) {
type = 'image/' + row.fileType
+ downLoadObjectFile(row).then(({data}) => {
+ const blob = new Blob([data], { type: type });
+ // 创建URL来生成预览
+ const fileURL = URL.createObjectURL(blob);
+ // 在新标签页中打开文件预览
+ const newTab = window.open(fileURL, '_blank')
+ })
}
- let video = ['mp4', 'avi', 'mov', 'wmv', 'flv']
- if (video.includes(row.fileType.toLowerCase())) {
+ else if (video.includes(row.fileType.toLowerCase())) {
type = 'video/' + row.fileType
+ downLoadObjectFile(row).then(({data}) => {
+ const blob = new Blob([data], { type: type });
+ // 创建URL来生成预览
+ const fileURL = URL.createObjectURL(blob);
+ // 在新标签页中打开文件预览
+ const newTab = window.open(fileURL, '_blank')
+ })
}
- let txt = ['txt']
- if (txt.includes(row.fileType.toLowerCase())) {
+ else if (txt.includes(row.fileType.toLowerCase())) {
type = 'text/plain'
+ downLoadObjectFile(row).then(({data}) => {
+ const blob = new Blob([data], { type: type });
+ // 创建URL来生成预览
+ const fileURL = URL.createObjectURL(blob);
+ // 在新标签页中打开文件预览
+ const newTab = window.open(fileURL, '_blank')
+ })
}
- let office = ['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx']
- if (office.includes(row.fileType.toLowerCase())) {
+ else if (office.includes(row.fileType.toLowerCase())) {
if (row.fileType.toLowerCase() === 'doc' || row.fileType.toLowerCase() === 'docx') {
type = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
} else if (row.fileType.toLowerCase() === 'ppt' || row.fileType.toLowerCase() === 'pptx') {
@@ -4312,18 +4431,30 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
} else {
type = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
}
+ downLoadObjectFile(row).then(({data}) => {
+ const blob = new Blob([data], { type: type });
+ // 创建URL来生成预览
+ const fileURL = URL.createObjectURL(blob);
+ // 在新标签页中打开文件预览
+ const newTab = window.open(fileURL, '_blank')
+ })
}
- let pdf = ['pdf']
- if (pdf.includes(row.fileType.toLowerCase())) {
+ else if (pdf.includes(row.fileType.toLowerCase())) {
type = 'application/pdf'
+ downLoadObjectFile(row).then(({data}) => {
+ const blob = new Blob([data], { type: type });
+ // 创建URL来生成预览
+ const fileURL = URL.createObjectURL(blob);
+ // 在新标签页中打开文件预览
+ const newTab = window.open(fileURL, '_blank')
+ })
+ }
+ else {
+ this.$message({
+ message: '不支持的文件类型',
+ type: 'warning'
+ })
}
- downLoadObjectFile(row).then(({data}) => {
- const blob = new Blob([data], { type: type });
- // 创建URL来生成预览
- const fileURL = URL.createObjectURL(blob);
- // 在新标签页中打开文件预览
- const newTab = window.open(fileURL, '_blank')
- })
},
// 下载
downloadFile (row) {
@@ -4428,6 +4559,53 @@ import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
return { 'background-color': '#E8F7F6', cursor: 'pointer' };
}
},
+ sendMailHandle(row) {
+ sendMailHandle(row).then(({data}) => {
+ if (data && data.code === 0) {
+ this.$message({
+ message: '发送成功',
+ type: 'success'
+ })
+ } else {
+ this.$message.warning(data.msg)
+ }
+ })
+ },
+ warnSendMail(row) {
+ this.$confirm('确认发送提醒?', '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ warnSendMailHandle(row).then(({data}) => {
+ if (data && data.code === 0) {
+ this.$message({
+ message: '发送成功',
+ type: 'success'
+ })
+ } else {
+ this.$message.warning(data.msg)
+ }
+ })
+ }).catch(() => {
+ this.$message({
+ type: 'info',
+ message: '已取消发送'
+ });
+ });
+ },
+ confirmatorSendMailHandle(inData) {
+ confirmatorSendMailHandle(inData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.$message({
+ message: '发送成功',
+ type: 'success'
+ })
+ } else {
+ this.$message.warning(data.msg)
+ }
+ })
+ },
}
}