Browse Source

2024.10.29 文档收集系统更新

java8
yuejiayang 1 year ago
parent
commit
f7b01d0781
  1. 2
      src/api/eam/eamProject.js
  2. 7
      src/views/modules/common/uploadFileList1.vue
  3. 28
      src/views/modules/eam/com_project_proof_record.vue
  4. 4
      src/views/modules/eam/eamProjectInfo.vue
  5. 20
      src/views/modules/eam/eamProjectInfoForProof.vue
  6. 380
      src/views/modules/eam/eamProjectInfoForUploads.vue
  7. 281
      src/views/modules/eam/eamProjectPartInfo.vue

2
src/api/eam/eamProject.js

@ -33,3 +33,5 @@ export const sendMailHandle= data => createAPI(`/pms/eamProject/sendMailHandle`,
export const warnSendMailHandle= data => createAPI(`/pms/eamProject/warnSendMailHandle`,'post',data) export const warnSendMailHandle= data => createAPI(`/pms/eamProject/warnSendMailHandle`,'post',data)
export const confirmatorSendMailHandle= data => createAPI(`/pms/eamProject/confirmatorSendMailHandle`,'post',data) export const confirmatorSendMailHandle= data => createAPI(`/pms/eamProject/confirmatorSendMailHandle`,'post',data)
export const agencyMatter= data => createAPI(`/pms/agencyMatter/project-counts`,'post',data) export const agencyMatter= data => createAPI(`/pms/agencyMatter/project-counts`,'post',data)
export const deleteAndSaveHandle= data => createAPI(`/pms/eamProject/deleteAndSaveHandle`,'post',data)
export const saveHandle= data => createAPI(`/pms/eamProject/saveHandle`,'post',data)

7
src/views/modules/common/uploadFileList1.vue

@ -333,13 +333,6 @@ export default {
for (let i = 0; i < this.proofDocumentList.length; i++) { for (let i = 0; i < this.proofDocumentList.length; i++) {
this.proofDocumentList[i].buNo = this.proofDocumenCurrentRow.buNo this.proofDocumentList[i].buNo = this.proofDocumenCurrentRow.buNo
} }
if (this.totalPage > 0) {
//
this.$refs.proofDocumentTable.setCurrentRow(this.proofDocumentList[0])
// table
this.refreshCurrentTabTable()
this.proofDocumentClickRow = this.proofDocumentList[0]
}
} else { } else {
this.proofDocumentList = [] this.proofDocumentList = []
} }

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

@ -282,6 +282,11 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="备注" prop="remark">
<el-input v-model="modalData.remark" style="width: 483px"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="proofingRecordVisible = false"> </el-button> <el-button @click="proofingRecordVisible = false"> </el-button>
<el-button type="primary" @click="saveProofingRecord()"> </el-button> <el-button type="primary" @click="saveProofingRecord()"> </el-button>
@ -699,7 +704,24 @@
fixed: '', fixed: '',
columnWidth: 80, columnWidth: 80,
}, },
//requiredDeliveryDate
{
userId: this.$store.state.user.name,
functionId: 103001,
serialNumber: '103001Table1Remark',
tableId: '103001Table1',
tableName: '打样记录表',
columnProp: 'remark',
headerAlign: 'center',
align: 'center',
columnLabel: '备注',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 103001, functionId: 103001,
@ -718,7 +740,6 @@
fixed: '', fixed: '',
columnWidth: 80 columnWidth: 80
}, },
//requiredDeliveryDate
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 103001, functionId: 103001,
@ -1298,6 +1319,7 @@
updateBy: this.$store.state.user.name, updateBy: this.$store.state.user.name,
id: row.id, id: row.id,
proofDocumentDataList: this.proofDocumentList, proofDocumentDataList: this.proofDocumentList,
remark: row.remark
} }
}, },
saveProofingRecord(row,type) { saveProofingRecord(row,type) {
@ -1322,6 +1344,7 @@
updateBy: this.$store.state.user.name, updateBy: this.$store.state.user.name,
proofingStatus: this.modalData.proofingStatus, proofingStatus: this.modalData.proofingStatus,
proofingResultStatus: this.modalData.proofingResultStatus, proofingResultStatus: this.modalData.proofingResultStatus,
remark: this.modalData.remark
} }
if (this.modalData.actualityDeliveryDate !== null && this.modalData.actualityDeliveryDate !== undefined && this.modalData.actualityDeliveryDate !== ''){ if (this.modalData.actualityDeliveryDate !== null && this.modalData.actualityDeliveryDate !== undefined && this.modalData.actualityDeliveryDate !== ''){
inData.actualityDeliveryDate = moment(this.modalData.actualityDeliveryDate).utcOffset('+8').format('YYYY-MM-DD') inData.actualityDeliveryDate = moment(this.modalData.actualityDeliveryDate).utcOffset('+8').format('YYYY-MM-DD')
@ -1353,6 +1376,7 @@
updateBy: this.$store.state.user.name, updateBy: this.$store.state.user.name,
proofingStatus: '进行中', proofingStatus: '进行中',
proofingResultStatus: row.proofingResultStatus, proofingResultStatus: row.proofingResultStatus,
remark: row.remark
} }
} else { } else {
if (this.modalData.cProjectTypeDb === '' || this.modalData.cProjectTypeDb === null || this.modalData.cProjectTypeDb === undefined) { if (this.modalData.cProjectTypeDb === '' || this.modalData.cProjectTypeDb === null || this.modalData.cProjectTypeDb === undefined) {

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

@ -3163,6 +3163,7 @@ import {searchBusinessInfo7} from "../../../api/factory/site";
priority: this.modalData.priority, priority: this.modalData.priority,
testPartNo: 'P000000', testPartNo: 'P000000',
partDesc: '无物料', partDesc: '无物料',
partType: 'Active',
} }
eamProjectInfoSave(this.modalData).then(({data}) => { eamProjectInfoSave(this.modalData).then(({data}) => {
if (data && data.code === '0') { if (data && data.code === '0') {
@ -3234,6 +3235,7 @@ import {searchBusinessInfo7} from "../../../api/factory/site";
priority: this.modalData.priority, priority: this.modalData.priority,
testPartNo: 'P000000', testPartNo: 'P000000',
partDesc: '无物料', partDesc: '无物料',
partType: 'Active',
} }
eamProjectInfoSave(this.modalData).then(({data}) => { eamProjectInfoSave(this.modalData).then(({data}) => {
if (data && data.code === '0') { if (data && data.code === '0') {
@ -3302,7 +3304,6 @@ import {searchBusinessInfo7} from "../../../api/factory/site";
bu: this.modalData.bu, bu: this.modalData.bu,
customerNo: this.modalData.customerNo, customerNo: this.modalData.customerNo,
customerDesc: this.modalData.customerDesc, customerDesc: this.modalData.customerDesc,
status: this.modalData.status,
active: this.modalData.active, active: this.modalData.active,
closeDate : this.modalData.projectCloseDate, closeDate : this.modalData.projectCloseDate,
buildDate : this.modalData.projectCreationDate, buildDate : this.modalData.projectCreationDate,
@ -3428,6 +3429,7 @@ import {searchBusinessInfo7} from "../../../api/factory/site";
} }
this.modalData.closeDate = this.modalData.projectCloseDate this.modalData.closeDate = this.modalData.projectCloseDate
this.modalData.buildDate = this.modalData.projectCreationDate this.modalData.buildDate = this.modalData.projectCreationDate
this.modalData.partType = 'Active'
eamProjectPartInfoEdit(this.modalData).then(({data}) => { eamProjectPartInfoEdit(this.modalData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.refreshCurrentTabTable() this.refreshCurrentTabTable()

20
src/views/modules/eam/eamProjectInfoForProof.vue

@ -639,7 +639,25 @@ export default {
columnProp: 'status', columnProp: 'status',
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
columnLabel: '项目状态' ,
columnLabel: '物料状态' ,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100,
},
{
userId: this.$store.state.user.name,
functionId: 401008,
serialNumber: '401008Table1ProofingStatus',
tableId: "401008Table1",
tableName: "项目打样记录表",
columnProp: 'proofingStatus',
headerAlign: "center",
align: "left",
columnLabel: '打样状态' ,
columnHidden: false, columnHidden: false,
columnImage: false, columnImage: false,
columnSortable: false, columnSortable: false,

380
src/views/modules/eam/eamProjectInfoForUploads.vue

@ -79,6 +79,16 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="'文档负责人'">
<el-select v-model="searchData.projectLeader" placeholder="请选择" clearable style="width: 130px">
<el-option
v-for = "i in projectProjectLeadersList"
:key = "i.projectLeaderId"
:label = "i.projectLeader"
:value = "i.projectLeader">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="'是否上传'"> <el-form-item :label="'是否上传'">
<el-select filterable v-model="searchData.uploadedFlag" style="width: 130px"> <el-select filterable v-model="searchData.uploadedFlag" style="width: 130px">
<el-option label="全部" value=""></el-option> <el-option label="全部" value=""></el-option>
@ -251,6 +261,9 @@ export default {
finalPartNosList() { finalPartNosList() {
return this.allPersonnelInfoList.filter(item => item.finalPartNoId !== undefined); return this.allPersonnelInfoList.filter(item => item.finalPartNoId !== undefined);
}, },
projectProjectLeadersList() {
return this.allPersonnelInfoList.filter(item => item.projectLeaderId !== undefined);
},
}, },
data() { data() {
@ -304,6 +317,7 @@ export default {
finalPartNo: '', finalPartNo: '',
closeStartDate: '', closeStartDate: '',
closeEndDate: '', closeEndDate: '',
projectLeader: '',
page: 1, page: 1,
limit: 10, limit: 10,
}, },
@ -938,6 +952,24 @@ export default {
fixed: '', fixed: '',
columnWidth: 70, columnWidth: 70,
}, },
{
userId: this.$store.state.user.name,
functionId: 401006,
serialNumber: '401006Table1ProofingPhase',
tableId: "401006Table1",
tableName: "项目信息待上传文件表",
columnProp: 'proofingPhase',
headerAlign: "center",
align: "center",
columnLabel: '打样阶段',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 70,
},
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 401006, functionId: 401006,
@ -1235,8 +1267,8 @@ export default {
// //
getDataList (params) { getDataList (params) {
this.selectTypeFlag = params this.selectTypeFlag = params
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
this.searchData.limit = 20
this.searchData.page = 1
if (this.$route.query.flag === '2') { if (this.$route.query.flag === '2') {
searchProjectOverUploadsDocumentList(this.searchData).then(({data}) => { searchProjectOverUploadsDocumentList(this.searchData).then(({data}) => {
if (data.code === 0) { if (data.code === 0) {
@ -1315,6 +1347,55 @@ export default {
} }
} }
} }
if (this.searchData.projectLeader !== '' && this.searchData.projectLeader !== null){
console.log('1',this.searchData.projectLeader)
this.dataList = data.list
for (let i = 0; i < this.dataList.length; i++) {
if (this.dataList[i].responsibleDepartment === 'R001'){
this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1]
} else if(this.dataList[i].responsibleDepartment === 'R002'){
this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1]
} else if(this.dataList[i].responsibleDepartment === 'R004'){
this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1]
} else if(this.dataList[i].responsibleDepartment === 'R005'){
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1]
} else if(this.dataList[i].responsibleDepartment === 'R007'){
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1]
} else if(this.dataList[i].responsibleDepartment === 'R008'){
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1]
} else if(this.dataList[i].responsibleDepartment === 'R009'){
this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1]
} else if(this.dataList[i].responsibleDepartment === 'R012'){
if (this.dataList[i].docEngineer === null || this.dataList[i].docEngineer === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R011'){
if (this.dataList[i].cQualityEngineer4 === null || this.dataList[i].cQualityEngineer4 === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R013'){
if (this.dataList[i].cQualityEngineer5 === null || this.dataList[i].cQualityEngineer5 === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R014'){
if (this.dataList[i].cQualityEngineer6 === null || this.dataList[i].cQualityEngineer6 === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1]
}
}
}
this.dataList = this.dataList.filter(item => item.projectLeader === this.searchData.projectLeader);
this.pageIndex = 1
this.pageSize = -1
this.totalPage = this.dataList.length + 1
}
} }
// //
this.getAllPersonnelList() this.getAllPersonnelList()
@ -1397,6 +1478,55 @@ export default {
} }
} }
} }
if (this.searchData.projectLeader !== '' && this.searchData.projectLeader !== null){
console.log('2',this.searchData.projectLeader)
this.dataList = data.list
for (let i = 0; i < this.dataList.length; i++) {
if (this.dataList[i].responsibleDepartment === 'R001'){
this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1]
} else if(this.dataList[i].responsibleDepartment === 'R002'){
this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1]
} else if(this.dataList[i].responsibleDepartment === 'R004'){
this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1]
} else if(this.dataList[i].responsibleDepartment === 'R005'){
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1]
} else if(this.dataList[i].responsibleDepartment === 'R007'){
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1]
} else if(this.dataList[i].responsibleDepartment === 'R008'){
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1]
} else if(this.dataList[i].responsibleDepartment === 'R009'){
this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1]
} else if(this.dataList[i].responsibleDepartment === 'R012'){
if (this.dataList[i].docEngineer === null || this.dataList[i].docEngineer === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R011'){
if (this.dataList[i].cQualityEngineer4 === null || this.dataList[i].cQualityEngineer4 === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R013'){
if (this.dataList[i].cQualityEngineer5 === null || this.dataList[i].cQualityEngineer5 === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R014'){
if (this.dataList[i].cQualityEngineer6 === null || this.dataList[i].cQualityEngineer6 === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1]
}
}
}
this.dataList = this.dataList.filter(item => item.projectLeader === this.searchData.projectLeader);
this.pageIndex = 1
this.pageSize = -1
this.totalPage = this.dataList.length + 1
}
} }
// //
this.getAllPersonnelList() this.getAllPersonnelList()
@ -1489,6 +1619,55 @@ export default {
} }
} }
} }
if (this.searchData.projectLeader !== '' && this.searchData.projectLeader !== null) {
console.log('3',this.searchData.projectLeader)
this.dataList = data.list
for (let i = 0; i < this.dataList.length; i++) {
if (this.dataList[i].responsibleDepartment === 'R001') {
this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1]
} else if (this.dataList[i].responsibleDepartment === 'R002') {
this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1]
} else if (this.dataList[i].responsibleDepartment === 'R004') {
this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1]
} else if (this.dataList[i].responsibleDepartment === 'R005') {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1]
} else if (this.dataList[i].responsibleDepartment === 'R007') {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1]
} else if (this.dataList[i].responsibleDepartment === 'R008') {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1]
} else if (this.dataList[i].responsibleDepartment === 'R009') {
this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1]
} else if (this.dataList[i].responsibleDepartment === 'R012') {
if (this.dataList[i].docEngineer === null || this.dataList[i].docEngineer === '') {
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1]
}
} else if (this.dataList[i].responsibleDepartment === 'R011') {
if (this.dataList[i].cQualityEngineer4 === null || this.dataList[i].cQualityEngineer4 === '') {
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1]
}
} else if (this.dataList[i].responsibleDepartment === 'R013') {
if (this.dataList[i].cQualityEngineer5 === null || this.dataList[i].cQualityEngineer5 === '') {
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1]
}
} else if (this.dataList[i].responsibleDepartment === 'R014') {
if (this.dataList[i].cQualityEngineer6 === null || this.dataList[i].cQualityEngineer6 === '') {
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1]
}
}
}
this.dataList = this.dataList.filter(item => item.projectLeader === this.searchData.projectLeader);
this.pageIndex = 1
this.pageSize = -1
this.totalPage = this.dataList.length + 1
}
} else { } else {
this.$route.query.flag = '1' this.$route.query.flag = '1'
} }
@ -1589,6 +1768,54 @@ export default {
} }
} }
} }
if (this.searchData.projectLeader !== '' && this.searchData.projectLeader !== null){
this.dataList = data.list
for (let i = 0; i < this.dataList.length; i++) {
if (this.dataList[i].responsibleDepartment === 'R001'){
this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1]
} else if(this.dataList[i].responsibleDepartment === 'R002'){
this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1]
} else if(this.dataList[i].responsibleDepartment === 'R004'){
this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1]
} else if(this.dataList[i].responsibleDepartment === 'R005'){
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1]
} else if(this.dataList[i].responsibleDepartment === 'R007'){
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1]
} else if(this.dataList[i].responsibleDepartment === 'R008'){
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1]
} else if(this.dataList[i].responsibleDepartment === 'R009'){
this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1]
} else if(this.dataList[i].responsibleDepartment === 'R012'){
if (this.dataList[i].docEngineer === null || this.dataList[i].docEngineer === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R011'){
if (this.dataList[i].cQualityEngineer4 === null || this.dataList[i].cQualityEngineer4 === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R013'){
if (this.dataList[i].cQualityEngineer5 === null || this.dataList[i].cQualityEngineer5 === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R014'){
if (this.dataList[i].cQualityEngineer6 === null || this.dataList[i].cQualityEngineer6 === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1]
}
}
}
this.dataList = this.dataList.filter(item => item.projectLeader === this.searchData.projectLeader);
this.pageIndex = 1
this.pageSize = -1
this.totalPage = this.dataList.length + 1
}
} }
// //
this.getAllPersonnelList() this.getAllPersonnelList()
@ -1671,6 +1898,54 @@ export default {
} }
} }
} }
if (this.searchData.projectLeader !== '' && this.searchData.projectLeader !== null){
this.dataList = data.list
for (let i = 0; i < this.dataList.length; i++) {
if (this.dataList[i].responsibleDepartment === 'R001'){
this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1]
} else if(this.dataList[i].responsibleDepartment === 'R002'){
this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1]
} else if(this.dataList[i].responsibleDepartment === 'R004'){
this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1]
} else if(this.dataList[i].responsibleDepartment === 'R005'){
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1]
} else if(this.dataList[i].responsibleDepartment === 'R007'){
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1]
} else if(this.dataList[i].responsibleDepartment === 'R008'){
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1]
} else if(this.dataList[i].responsibleDepartment === 'R009'){
this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1]
} else if(this.dataList[i].responsibleDepartment === 'R012'){
if (this.dataList[i].docEngineer === null || this.dataList[i].docEngineer === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R011'){
if (this.dataList[i].cQualityEngineer4 === null || this.dataList[i].cQualityEngineer4 === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R013'){
if (this.dataList[i].cQualityEngineer5 === null || this.dataList[i].cQualityEngineer5 === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R014'){
if (this.dataList[i].cQualityEngineer6 === null || this.dataList[i].cQualityEngineer6 === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1]
}
}
}
this.dataList = this.dataList.filter(item => item.projectLeader === this.searchData.projectLeader);
this.pageIndex = 1
this.pageSize = -1
this.totalPage = this.dataList.length + 1
}
} }
// //
this.getAllPersonnelList() this.getAllPersonnelList()
@ -1763,6 +2038,54 @@ export default {
} }
} }
} }
if (this.searchData.projectLeader !== '' && this.searchData.projectLeader !== null){
this.dataList = data.list
for (let i = 0; i < this.dataList.length; i++) {
if (this.dataList[i].responsibleDepartment === 'R001'){
this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1]
} else if(this.dataList[i].responsibleDepartment === 'R002'){
this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1]
} else if(this.dataList[i].responsibleDepartment === 'R004'){
this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1]
} else if(this.dataList[i].responsibleDepartment === 'R005'){
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1]
} else if(this.dataList[i].responsibleDepartment === 'R007'){
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1]
} else if(this.dataList[i].responsibleDepartment === 'R008'){
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1]
} else if(this.dataList[i].responsibleDepartment === 'R009'){
this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1]
} else if(this.dataList[i].responsibleDepartment === 'R012'){
if (this.dataList[i].docEngineer === null || this.dataList[i].docEngineer === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R011'){
if (this.dataList[i].cQualityEngineer4 === null || this.dataList[i].cQualityEngineer4 === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R013'){
if (this.dataList[i].cQualityEngineer5 === null || this.dataList[i].cQualityEngineer5 === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R014'){
if (this.dataList[i].cQualityEngineer6 === null || this.dataList[i].cQualityEngineer6 === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1]
}
}
}
this.dataList = this.dataList.filter(item => item.projectLeader === this.searchData.projectLeader);
this.pageIndex = 1
this.pageSize = -1
this.totalPage = this.dataList.length + 1
}
} else { } else {
this.$route.query.flag = '1' this.$route.query.flag = '1'
} }
@ -1785,6 +2108,49 @@ export default {
const projectManagersMap = new Map(); const projectManagersMap = new Map();
const engineersMap = new Map(); const engineersMap = new Map();
const finalPartNosMap = new Map(); const finalPartNosMap = new Map();
const projectProjectLeadersMap = new Map();
for (let i = 0; i < allPersonnelInfoDataList.length; i++) {
if (allPersonnelInfoDataList[i].responsibleDepartment === 'R001'){
allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].projectManager.split("-")[1]
} else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R002'){
allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].projectOwner.split("-")[1]
} else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R004'){
allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].engineer.split("-")[1]
} else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R005'){
allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].cQualityEngineer1.split("-")[1]
} else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R007'){
allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].cQualityEngineer2.split("-")[1]
} else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R008'){
allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].cQualityEngineer3.split("-")[1]
} else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R009'){
allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].cManufactureEngineer.split("-")[1]
} else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R012'){
if (allPersonnelInfoDataList[i].docEngineer === null || allPersonnelInfoDataList[i].docEngineer === ''){
allPersonnelInfoDataList[i].projectLeader = ''
} else {
allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].docEngineer.split("-")[1]
}
} else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R011'){
if (allPersonnelInfoDataList[i].cQualityEngineer4 === null || allPersonnelInfoDataList[i].cQualityEngineer4 === ''){
allPersonnelInfoDataList[i].projectLeader = ''
} else {
allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].cQualityEngineer4.split("-")[1]
}
} else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R013'){
if (allPersonnelInfoDataList[i].cQualityEngineer5 === null || allPersonnelInfoDataList[i].cQualityEngineer5 === ''){
allPersonnelInfoDataList[i].projectLeader = ''
} else {
allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].cQualityEngineer5.split("-")[1]
}
} else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R014'){
if (allPersonnelInfoDataList[i].cQualityEngineer6 === null || allPersonnelInfoDataList[i].cQualityEngineer6 === ''){
allPersonnelInfoDataList[i].projectLeader = ''
} else {
allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].cQualityEngineer6.split("-")[1]
}
}
}
allPersonnelInfoDataList.forEach((item) => { allPersonnelInfoDataList.forEach((item) => {
// Handle project owners // Handle project owners
@ -1829,6 +2195,16 @@ export default {
}); });
allPersonnelList.push(finalPartNosMap.get(item.finalPartNo)); allPersonnelList.push(finalPartNosMap.get(item.finalPartNo));
} }
// Handle projectProjectLeaders
if (!projectProjectLeadersMap.has(item.projectLeader) && item.projectLeader !== null && item.projectLeader !== '') {
const projectLeaderId = projectProjectLeadersMap.size + 1;
projectProjectLeadersMap.set(item.projectLeader, {
projectLeaderId,
projectLeader: item.projectLeader,
});
allPersonnelList.push(projectProjectLeadersMap.get(item.projectLeader));
}
}); });
this.allPersonnelInfoList = allPersonnelList; this.allPersonnelInfoList = allPersonnelList;

281
src/views/modules/eam/eamProjectPartInfo.vue

@ -211,11 +211,16 @@
<a v-if="scope.row.status !== '草稿' && scope.row.status !== '已量产'" style="color: gray; pointer-events: none;">转正式料号</a> <a v-if="scope.row.status !== '草稿' && scope.row.status !== '已量产'" style="color: gray; pointer-events: none;">转正式料号</a>
<a v-if="scope.row.status === '进行中' && scope.row.status !== '已量产'" style="color: gray; pointer-events: none;">转量产</a> <a v-if="scope.row.status === '进行中' && scope.row.status !== '已量产'" style="color: gray; pointer-events: none;">转量产</a>
</div> </div>
<div v-else>
<div v-else-if="scope.row.status !== '已量产'">
<a v-if="scope.row.status === '草稿' && scope.row.status !== '已量产'" type="text" size="small" @click="updateModalStatus(scope.row)">下达</a> <a v-if="scope.row.status === '草稿' && scope.row.status !== '已量产'" type="text" size="small" @click="updateModalStatus(scope.row)">下达</a>
<a v-if="scope.row.status !== '草稿' && scope.row.status !== '已量产'" type="text" size="small" @click="addProofRecord(scope.row)">新增打样</a>
<a v-if="scope.row.status !== '草稿'" type="text" size="small" @click="addProofRecord(scope.row)">新增打样</a>
<a v-if="scope.row.status !== '草稿' && scope.row.status !== '已量产'" type="text" size="small" @click="changeFormalPartNo(scope.row)">转正式料号</a> <a v-if="scope.row.status !== '草稿' && scope.row.status !== '已量产'" type="text" size="small" @click="changeFormalPartNo(scope.row)">转正式料号</a>
<a v-if="scope.row.status === '进行中' && scope.row.status !== '已量产'" type="text" size="small" @click="updateModalStatus(scope.row)">转量产</a>
<a v-if="scope.row.status === '进行中' || scope.row.status === '已量产'" type="text" size="small" @click="updateModalStatus(scope.row)">转量产</a>
</div>
<div v-else>
<a style="color: red" type="text" size="small" @click="addProofRecord(scope.row)">新增打样</a>
<a style="color: red" type="text" size="small" @click="changeFormalPartNo(scope.row)">转正式料号</a>
<a style="color: red" type="text" size="small" @click="updateModalStatus(scope.row)">转量产</a>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@ -992,6 +997,11 @@
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" :model="newProofingRecordData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="备注" prop="remark">
<el-input v-model="newProofingRecordData.remark" style="width: 483px"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button> <el-button @click="visible = false"> </el-button>
<el-button type="primary" @click="newProofingRecord()"> </el-button> <el-button type="primary" @click="newProofingRecord()"> </el-button>
@ -1051,6 +1061,8 @@ import {
searchProjectAllDocument searchProjectAllDocument
} from "../../../api/eam/eamProofing"; } from "../../../api/eam/eamProofing";
import { import {
deleteAndSaveHandle,
saveHandle,
checkConfirmationRecord, checkConfirmationRecord,
checkProductionValidationDocument, checkProductionValidationDocument,
deleteDocumentInformation, deleteDocumentInformation,
@ -1108,11 +1120,6 @@ import {EventBus} from "../../../main";
this.searchData.customerNo = this.searchData.customerNo.toUpperCase() this.searchData.customerNo = this.searchData.customerNo.toUpperCase()
} }
}, },
uploadDialog (newValue,oldValue) {
if (newValue === false) {
this.getProjectOtherDocument()
}
},
projectProductionValidationDocumentVisible(newVal) { projectProductionValidationDocumentVisible(newVal) {
if (newVal) { if (newVal) {
this.activeName1 = 'selectDocument'; this.activeName1 = 'selectDocument';
@ -1336,6 +1343,7 @@ import {EventBus} from "../../../main";
planStartDate: '', planStartDate: '',
requiredDeliveryDate: '', requiredDeliveryDate: '',
actualityDeliveryDate: '', actualityDeliveryDate: '',
remark: '',
createBy: this.$store.state.user.name, createBy: this.$store.state.user.name,
updateBy: this.$store.state.user.name, updateBy: this.$store.state.user.name,
}, },
@ -3339,6 +3347,7 @@ import {EventBus} from "../../../main";
cQualityEngineer6: row.cQualityEngineer6, cQualityEngineer6: row.cQualityEngineer6,
cManufactureEngineer: row.cManufactureEngineer, cManufactureEngineer: row.cManufactureEngineer,
docEngineer: row.docEngineer, docEngineer: row.docEngineer,
remark: '',
planStartDate : new Date(), planStartDate : new Date(),
proofingNo: '', proofingNo: '',
proofingStatus: '草稿', proofingStatus: '草稿',
@ -3468,6 +3477,7 @@ import {EventBus} from "../../../main";
docEngineer: row.docEngineer, docEngineer: row.docEngineer,
buildDate: row.buildDate, buildDate: row.buildDate,
status: row.status, status: row.status,
partType: row.partType,
// active: row.active, // active: row.active,
createBy: this.$store.state.user.name, createBy: this.$store.state.user.name,
updateBy: this.$store.state.user.name, updateBy: this.$store.state.user.name,
@ -3484,8 +3494,8 @@ import {EventBus} from "../../../main";
if (row.docEngineer != null && row.docEngineer !== '') { if (row.docEngineer != null && row.docEngineer !== '') {
this.modalData.docEngineerName = row.docEngineer.split('-')[1] // this.modalData.docEngineerName = row.docEngineer.split('-')[1] //
} }
if (row.projectOwner.split('-')[0] === this.$store.state.user.name) {
if (row.status === '草稿') { if (row.status === '草稿') {
if (row.projectOwner.split('-')[0] === this.$store.state.user.name) {
this.modalData.status = '进行中' this.modalData.status = '进行中'
this.$confirm(`是否确认下达该项目?`, '提示', { this.$confirm(`是否确认下达该项目?`, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
@ -3528,7 +3538,6 @@ import {EventBus} from "../../../main";
}) })
}).catch(() => { }).catch(() => {
}) })
}
} else { } else {
this.$message({ this.$message({
message: '该项目只允许PjM人员进行下达!', message: '该项目只允许PjM人员进行下达!',
@ -3537,7 +3546,7 @@ import {EventBus} from "../../../main";
duration: 2000 // 5 duration: 2000 // 5
}); });
} }
if (row.status === '进行中') {
} else if (row.status === '进行中' || '已量产') {
this.modalData.status = '已量产' this.modalData.status = '已量产'
this.modalData.closeDate = new Date() this.modalData.closeDate = new Date()
this.$confirm(`是否确认转量产?`, '提示', { this.$confirm(`是否确认转量产?`, '提示', {
@ -3733,8 +3742,6 @@ import {EventBus} from "../../../main";
if (row) { if (row) {
this.otherDocumentCurrentRow.bu = this.otherDocumentCurrentRow.site + "-" + this.otherDocumentCurrentRow.buNo this.otherDocumentCurrentRow.bu = this.otherDocumentCurrentRow.site + "-" + this.otherDocumentCurrentRow.buNo
this.otherDocumentCurrentRow = JSON.parse(JSON.stringify(row)) this.otherDocumentCurrentRow = JSON.parse(JSON.stringify(row))
//
this.refreshCurrentTabTable()
} }
}, },
projectAllDocumentClickRow (row) { projectAllDocumentClickRow (row) {
@ -3750,10 +3757,6 @@ import {EventBus} from "../../../main";
this.proofingCurrentRow.proofingId= -1 this.proofingCurrentRow.proofingId= -1
this.proofingCurrentRow.proofingNo = '*' this.proofingCurrentRow.proofingNo = '*'
this.uploadDialog = true this.uploadDialog = true
//
// this.$nextTick(() => {
// this.$refs.partUploadFile.init(currentData);
// })
}, },
/** /**
@ -3955,6 +3958,7 @@ import {EventBus} from "../../../main";
this.proofDocumentListDefinition = [] this.proofDocumentListDefinition = []
// proofDocumentList // proofDocumentList
for (let i = 0; i < this.projectOtherDocumentList.length; i++) { for (let i = 0; i < this.projectOtherDocumentList.length; i++) {
this.projectOtherDocumentList[i].buNo = this.proofingCurrentRow.buNo
if (this.projectOtherDocumentList[i].documentTypeId !== 'N/A') { if (this.projectOtherDocumentList[i].documentTypeId !== 'N/A') {
this.proofDocumentListDefinition.push(this.projectOtherDocumentList[i]) this.proofDocumentListDefinition.push(this.projectOtherDocumentList[i])
} }
@ -3992,9 +3996,6 @@ import {EventBus} from "../../../main";
} }
} }
} }
for (let i = 0; i < this.projectOtherDocumentList.length; i++) {
this.projectOtherDocumentList[i].buNo = this.proofingCurrentRow.buNo
}
} else { } else {
this.projectOtherDocumentList = [] this.projectOtherDocumentList = []
} }
@ -4175,7 +4176,6 @@ import {EventBus} from "../../../main";
}) })
this.addProjectDocumentTypeFlag = false this.addProjectDocumentTypeFlag = false
// //
this.getProjectOtherDocument()
this.refreshCurrentTabTable() this.refreshCurrentTabTable()
} else { } else {
this.$message({ this.$message({
@ -4375,223 +4375,72 @@ import {EventBus} from "../../../main";
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
let confirmatorPromises = this.projectAllDocumentConfirmatorList.map(item => {
let inData = {
site: this.proofingCurrentRow.site,
projectId: this.proofingCurrentRow.projectId,
projectNo: this.proofingCurrentRow.projectNo,
orderRef1: this.proofingCurrentRow.projectId,
orderRef2: this.proofingCurrentRow.projectPartId,
userid: item.userid,
itemNo: this.projectAllDocumentConfirmatorList.indexOf(item) + 1,
wantedConfirmDate: new Date(this.modalData.wantedConfirmDate.getTime() + 8 * 60 * 60 * 1000),
createBy: this.$store.state.user.name
};
return saveProductionValidationDocumentConfirmator(inData);
});
Promise.all(confirmatorPromises)
.then(confirmatorResults => {
let allConfirmatorSuccess = confirmatorResults.every(result => result.data && result.data.code === 0);
if (allConfirmatorSuccess) {
let inData = {
site: this.proofingCurrentRow.site,
orderRef1: this.proofingCurrentRow.projectId,
orderRef2: this.proofingCurrentRow.projectPartId,
projectId: this.proofingCurrentRow.projectId,
projectNo: this.proofingCurrentRow.projectNo,
projectPartId: this.proofingCurrentRow.projectPartId,
testPartNo: this.proofingCurrentRow.testPartNo,
partDesc: this.proofingCurrentRow.partDesc,
selectedDocumentItems: this.selectedDocumentItems,
wantedConfirmDate: new Date(this.modalData.wantedConfirmDate.getTime() + 8 * 60 * 60 * 1000),
}
let saveDocumentPromises = this.handleDocumentSave(inData);
saveDocumentPromises
.then(confirmDelete => {
if (confirmDelete === 'false') {
this.confirmationPrompted = false;
this.$message({
message: '已取消操作',
type: 'info'
});
return;
}
this.projectAllDocumentConfirmatorList.map(item => {
item.site = this.proofingCurrentRow.site;
item.projectId = this.proofingCurrentRow.projectId;
item.projectNo = this.proofingCurrentRow.projectNo;
item.orderRef1 = this.proofingCurrentRow.projectId;
item.orderRef2 = this.proofingCurrentRow.projectPartId;
item.projectPartId = this.proofingCurrentRow.projectPartId;
item.testPartNo = this.proofingCurrentRow.testPartNo;
item.partDesc = this.proofingCurrentRow.partDesc;
item.itemNo = this.projectAllDocumentConfirmatorList.indexOf(item) + 1;
item.wantedConfirmDate = new Date(this.modalData.wantedConfirmDate.getTime() + 8 * 60 * 60 * 1000);
item.createBy = this.$store.state.user.name;
item.selectedDocumentItems = this.selectedDocumentItems;
})
checkProductionValidationDocument(this.projectAllDocumentConfirmatorList)
.then(({ data }) => {
if (data) {
this.$confirm('该项目已存在生产确认记录或已经有人员进行了确认,是否删除重新推送确认信息?', '提示', {
confirmButtonText: '是',
cancelButtonText: '否',
type: 'warning'
}).then(() => {
deleteAndSaveHandle(this.projectAllDocumentConfirmatorList).then(({data}) => {
if (data && data.code === 0) {
this.$message({ this.$message({
message: '新增成功',
message: '操作成功',
type: 'success' type: 'success'
});
this.projectProductionValidationDocumentVisible = false;
this.confirmationPrompted = false;
this.confirmatorSendMailHandle(inData)
}) })
.catch(error => {
console.error('保存文档出错:', error);
this.$message({
message: '新增失败,请检查文档',
type: 'error'
});
});
this.confirmatorSendMailHandle(this.projectAllDocumentConfirmatorList.at(0))
this.projectProductionValidationDocumentVisible = false
} else { } else {
this.$message({
message: '已取消操作',
type: 'info'
});
this.$alert("操作失败,请检查确认人员和确认文档或联系管理员!(" + data.msg + ")", '错误', {
confirmButtonText: '确定'
})
} }
}) })
.catch(error => {
console.error('保存确认人员出错:', error);
this.$message({
message: '新增失败,请检查确认人员',
type: 'error'
});
});
}).catch(() => { }).catch(() => {
this.$message({ this.$message({
type: 'info', type: 'info',
message: '已取消操作' message: '已取消操作'
}); });
}); });
}
},
handleDocumentSave(inData) {
return new Promise((resolve, reject) => {
checkProductionValidationDocument(inData)
.then(({ data }) => {
if (data) {
//
if (!this.confirmationPrompted) {
this.confirmationPrompted = true; //
this.askForDeleteConfirmation()
.then(confirmDelete => {
if (confirmDelete === 'true') {
this.handleDeleteAndSave(inData)
.then(confirmDelete => {
resolve(confirmDelete);
})
.catch(() => resolve('false'));
} else {
resolve('false');
}
})
.catch(() => {
reject('对话框出错'); //
});
} else { } else {
//
this.handleDeleteAndSave(inData)
.then(confirmDelete => {
resolve(confirmDelete);
})
.catch(() => resolve('false'));
}
} else {
//
this.handleDeleteAndSave(inData)
.then(() => resolve())
.catch(() => resolve('false'));
}
})
.catch(error => {
console.error('检查生产确认文档出错:', error);
reject('检查生产确认文档失败');
});
});
},
handleDeleteAndSave(inData) {
return new Promise((resolve, reject) => {
checkConfirmationRecord(inData)
.then(({ data }) => {
if (data) {
this.$confirm('该项目已经有人员进行了确认,是否删除重新推送确认信息?', '提示', {
confirmButtonText: '是',
cancelButtonText: '否',
type: 'warning'
})
.then(() => {
resolve('true');
//
deleteDocumentInformation(inData)
.then(() => {
this.projectAllDocumentConfirmatorList.map(item => {
let inData1 = {
site: this.proofingCurrentRow.site,
orderRef1: this.proofingCurrentRow.projectId,
orderRef2: this.proofingCurrentRow.projectPartId,
userid: item.userid,
itemNo: this.projectAllDocumentConfirmatorList.indexOf(item) + 1,
wantedConfirmDate: new Date(this.modalData.wantedConfirmDate.getTime() + 8 * 60 * 60 * 1000),
createBy: this.$store.state.user.name
};
saveProductionValidationDocumentConfirmator(inData1);
});
this.saveDocumentInformation(inData)
.then(() => resolve())
.catch(() => reject());
})
.catch(() => reject('删除确认记录失败'));
saveHandle(this.projectAllDocumentConfirmatorList).then(({data}) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success'
}) })
.catch(() => {
resolve('false');
});
this.confirmatorSendMailHandle(this.projectAllDocumentConfirmatorList.at(0))
this.projectProductionValidationDocumentVisible = false
} else { } else {
deleteDocumentInformation(inData)
.then(() => {
this.projectAllDocumentConfirmatorList.map(item => {
let inData1 = {
site: this.proofingCurrentRow.site,
orderRef1: this.proofingCurrentRow.projectId,
orderRef2: this.proofingCurrentRow.projectPartId,
userid: item.userid,
itemNo: this.projectAllDocumentConfirmatorList.indexOf(item) + 1,
wantedConfirmDate: new Date(this.modalData.wantedConfirmDate.getTime() + 8 * 60 * 60 * 1000),
createBy: this.$store.state.user.name
};
saveProductionValidationDocumentConfirmator(inData1);
});
this.saveDocumentInformation(inData)
.then(() => resolve())
.catch(() => reject());
this.$alert("操作失败,请检查确认人员和确认文档或联系管理员!(" + data.msg + ")", '错误', {
confirmButtonText: '确定'
}) })
.catch(() => reject('删除确认记录失败'));
} }
}) })
.catch(() => {
resolve('false');
});
});
},
saveDocumentInformation(inData) {
return saveProductionValidationDocument(inData)
.then(response => {
if (response.data && response.data.code === 0) {
return Promise.resolve();
} else {
return Promise.reject('保存文档失败');
} }
})
.catch(() => {
return Promise.reject('保存文档失败');
}); });
},
askForDeleteConfirmation() {
return new Promise((resolve, reject) => {
this.$confirm('该项目已存在生产确认记录,是否删除重新推送确认信息?', '提示', {
confirmButtonText: '是',
cancelButtonText: '否',
type: 'warning'
})
.then(() => {
resolve('true');
})
.catch(() => {
resolve('false');
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
}); });
}); });
}
}, },

Loading…
Cancel
Save