Browse Source

2024.7.19 产品文档收集-项目信息进一步优化

java8
yuejiayang 2 years ago
parent
commit
c9c7065fa1
  1. 3
      src/api/eam/eamProject.js
  2. 3
      src/api/factory/site.js
  3. 10
      src/views/modules/common/uploadFileList1.vue
  4. 64
      src/views/modules/eam/com_project_proof_record.vue
  5. 5
      src/views/modules/eam/eamBuDocumentListDefinition.vue
  6. 35
      src/views/modules/eam/eamDocumentTypeDefinition.vue
  7. 418
      src/views/modules/eam/eamProjectInfo.vue

3
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)

3
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)

10
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 {
<el-input v-model="proofingId" readonly style="width: 170px;" class="red-text"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" label-width="80px" style="margin-left: 7px;margin-top: -5px;">
<el-form :inline="true" label-position="top" label-width="80px" :model="this.conclusion" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label=" ">
<a href="javascript:void(0);" @click="triggerUpload">点击选择文件</a>
<tr></tr>

64
src/views/modules/eam/com_project_proof_record.vue

@ -68,7 +68,7 @@
label="操作">
<template slot-scope="scope">
<a type="primary" size="small" 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="scope.row.documentId !== null" @click="proofDocumentDelete(scope.row)">删除</a>
</template>
</el-table-column>
@ -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: '已取消发送'
});
});
}
},
}
};
</script>

5
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

35
src/views/modules/eam/eamDocumentTypeDefinition.vue

@ -119,9 +119,9 @@
<el-select v-model="modalData.responsibleDepartment" placeholder="请选择" clearable style="width: 140px">
<el-option
v-for = "i in responsibleDepartmentList"
:key = "i.responsibleDepartment"
:label = "i.responsibleDepartment"
:value = "i.responsibleDepartment">
:key = "i.roleNo"
:label = "i.roleDesc"
:value = "i.roleNo">
</el-option>
</el-select>
</el-form-item>
@ -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 = {

418
src/views/modules/eam/eamProjectInfo.vue

@ -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>

Loading…
Cancel
Save