|
|
|
@ -107,13 +107,15 @@ |
|
|
|
fixed="right" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
width="178" |
|
|
|
width="208" |
|
|
|
label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<a v-if="!authUpdate" type="text" size="small" @click="addProofRecord(scope.row)">新增打样</a> |
|
|
|
<a v-if="!authUpdate" type="text" size="small" @click="changeFormalPartNo(scope.row)">转正式料号</a> |
|
|
|
<a v-if="!authUpdate" type="text" size="small" @click="updateModal(scope.row)">修改</a> |
|
|
|
<a v-if="!authDelete" type="text" size="small" @click="eamProjectInfoDelete(scope.row)">删除</a> |
|
|
|
<a v-if="scope.row.status === '草稿'" type="text" size="small" @click="updateModalStatus(scope.row)">下达</a> |
|
|
|
<a v-if="scope.row.status === '进行中'" type="text" size="small" @click="addProofRecord(scope.row)">新增打样</a> |
|
|
|
<a v-if="scope.row.status === '进行中'" type="text" size="small" @click="changeFormalPartNo(scope.row)">转正式料号</a> |
|
|
|
<a v-if="scope.row.status === '进行中'" type="text" size="small" @click="updateModalStatus(scope.row)">结案</a> |
|
|
|
<a v-if="scope.row.status !== '已结案'" type="text" size="small" @click="updateModal(scope.row)">修改</a> |
|
|
|
<a type="text" size="small" @click="eamProjectInfoDelete(scope.row)">删除</a> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
@ -738,7 +740,7 @@ |
|
|
|
label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<a type="primary" v-if="scope.row.documentDefinitionListId !== '-1'" @click="uploadFile(scope.row)">上传文件</a> |
|
|
|
<a type="text" size="small" v-if="scope.row.documentDefinitionListId !== '-1'" @click="addOrUpdateHandle(scope.row.projectId)">提醒</a> |
|
|
|
<a type="text" size="small" v-if="scope.row.documentDefinitionListId !== '-1'" @click="warnSendMail(scope.row)">提醒</a> |
|
|
|
<a type="text" size="small" v-if="shouldShowDelete(scope.row)" @click="massProductionDocumentDelete(scope.row)">删除</a> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
@ -777,16 +779,6 @@ |
|
|
|
@row-click="projectAllDocumentClickRow" |
|
|
|
:row-style="rowStyle" |
|
|
|
v-loading="dataListLoading"> |
|
|
|
<el-table-column |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
width="70" |
|
|
|
fixed="left" |
|
|
|
label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<a type="text" size="small" @click="addOrUpdateHandle(scope.row.projectId)">提醒</a> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="序号" type="index" align="center" :index="indexMethod"></el-table-column> |
|
|
|
<el-table-column label="文档类型" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
@ -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) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|