|
|
@ -675,6 +675,11 @@ |
|
|
inModal: { |
|
|
inModal: { |
|
|
type: Boolean, |
|
|
type: Boolean, |
|
|
default: false |
|
|
default: false |
|
|
|
|
|
}, |
|
|
|
|
|
// 当前选中项目料号所属工厂(由父组件传入) |
|
|
|
|
|
selectedSite: { |
|
|
|
|
|
type: String, |
|
|
|
|
|
default: '' |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
|
@ -704,6 +709,14 @@ |
|
|
this.getProofDocument() |
|
|
this.getProofDocument() |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
selectedSite: { |
|
|
|
|
|
immediate: true, |
|
|
|
|
|
handler (val) { |
|
|
|
|
|
if (val) { |
|
|
|
|
|
this.syncSiteContext(val) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
@ -711,7 +724,7 @@ |
|
|
userBuList: [], |
|
|
userBuList: [], |
|
|
dataList: [], |
|
|
dataList: [], |
|
|
searchData: { |
|
|
searchData: { |
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
|
|
|
site: this.selectedSite || this.$store.state.user.site, |
|
|
username: this.$store.state.user.name, |
|
|
username: this.$store.state.user.name, |
|
|
projectId: '', |
|
|
projectId: '', |
|
|
projectPartId: '', |
|
|
projectPartId: '', |
|
|
@ -719,7 +732,7 @@ |
|
|
limit: 1000 |
|
|
limit: 1000 |
|
|
}, |
|
|
}, |
|
|
searchProofData: { |
|
|
searchProofData: { |
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
|
|
|
site: this.selectedSite || this.$store.state.user.site, |
|
|
username: this.$store.state.user.name, |
|
|
username: this.$store.state.user.name, |
|
|
projectId: '', |
|
|
projectId: '', |
|
|
page: 1, |
|
|
page: 1, |
|
|
@ -751,7 +764,7 @@ |
|
|
proofDocumenCurrentRow:{}, |
|
|
proofDocumenCurrentRow:{}, |
|
|
documentClickRow: {}, |
|
|
documentClickRow: {}, |
|
|
currentData: { |
|
|
currentData: { |
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
|
|
|
site: this.selectedSite || this.$store.state.user.site, |
|
|
username: this.$store.state.user.name, |
|
|
username: this.$store.state.user.name, |
|
|
projectId: '', |
|
|
projectId: '', |
|
|
projectNo: '', |
|
|
projectNo: '', |
|
|
@ -762,7 +775,7 @@ |
|
|
limit: 1000 |
|
|
limit: 1000 |
|
|
}, |
|
|
}, |
|
|
copyModalData: { |
|
|
copyModalData: { |
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
|
|
|
site: this.selectedSite || this.$store.state.user.site, |
|
|
username: this.$store.state.user.name, |
|
|
username: this.$store.state.user.name, |
|
|
projectId: '', |
|
|
projectId: '', |
|
|
projectNo: '', |
|
|
projectNo: '', |
|
|
@ -831,7 +844,7 @@ |
|
|
createBy: '' |
|
|
createBy: '' |
|
|
}, |
|
|
}, |
|
|
searchDocumentTypeData: { |
|
|
searchDocumentTypeData: { |
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
|
|
|
site: this.selectedSite || this.$store.state.user.site, |
|
|
projectId: '', |
|
|
projectId: '', |
|
|
projectNo: '', |
|
|
projectNo: '', |
|
|
proofingId: '', |
|
|
proofingId: '', |
|
|
@ -846,7 +859,7 @@ |
|
|
}, |
|
|
}, |
|
|
documentTypeData: { |
|
|
documentTypeData: { |
|
|
// bu: this.userBuList[0].buNo, |
|
|
// bu: this.userBuList[0].buNo, |
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
|
|
|
site: this.selectedSite || this.$store.state.user.site, |
|
|
proofingId: '', |
|
|
proofingId: '', |
|
|
proofingNo: '', |
|
|
proofingNo: '', |
|
|
documentTypeId: '', |
|
|
documentTypeId: '', |
|
|
@ -1361,6 +1374,32 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
resolveProofingSite (site) { |
|
|
|
|
|
if (site !== null && site !== undefined && site !== '') { |
|
|
|
|
|
return site |
|
|
|
|
|
} |
|
|
|
|
|
if (this.selectedSite !== null && this.selectedSite !== undefined && this.selectedSite !== '') { |
|
|
|
|
|
return this.selectedSite |
|
|
|
|
|
} |
|
|
|
|
|
if (this.proofDocumenCurrentRow && this.proofDocumenCurrentRow.site) { |
|
|
|
|
|
return this.proofDocumenCurrentRow.site |
|
|
|
|
|
} |
|
|
|
|
|
if (this.searchData && this.searchData.site) { |
|
|
|
|
|
return this.searchData.site |
|
|
|
|
|
} |
|
|
|
|
|
return this.$store.state.user.site |
|
|
|
|
|
}, |
|
|
|
|
|
syncSiteContext (site) { |
|
|
|
|
|
const currentSite = this.resolveProofingSite(site) |
|
|
|
|
|
this.searchData.site = currentSite |
|
|
|
|
|
this.searchProofData.site = currentSite |
|
|
|
|
|
this.currentData.site = currentSite |
|
|
|
|
|
this.copyModalData.site = currentSite |
|
|
|
|
|
this.searchDocumentTypeData.site = currentSite |
|
|
|
|
|
this.documentTypeData.site = currentSite |
|
|
|
|
|
this.modalData.site = currentSite |
|
|
|
|
|
return currentSite |
|
|
|
|
|
}, |
|
|
handleColumnResize(newWidth, oldWidth, column, event){ |
|
|
handleColumnResize(newWidth, oldWidth, column, event){ |
|
|
let inData= this.columnList.filter(item => item.columnProp === column.property)[0] |
|
|
let inData= this.columnList.filter(item => item.columnProp === column.property)[0] |
|
|
inData.columnWidth=newWidth |
|
|
inData.columnWidth=newWidth |
|
|
@ -1416,6 +1455,8 @@ |
|
|
//初始化参数 |
|
|
//初始化参数 |
|
|
this.searchData = JSON.parse(JSON.stringify(inData)); |
|
|
this.searchData = JSON.parse(JSON.stringify(inData)); |
|
|
this.authUpdate = authUpdate |
|
|
this.authUpdate = authUpdate |
|
|
|
|
|
const currentSite = this.syncSiteContext(inData ? inData.site : '') |
|
|
|
|
|
this.searchData.site = currentSite |
|
|
//刷新表格 |
|
|
//刷新表格 |
|
|
proofingInformationSearch(this.searchData).then(({data}) => { |
|
|
proofingInformationSearch(this.searchData).then(({data}) => { |
|
|
//区分请求成功和失败的状况 |
|
|
//区分请求成功和失败的状况 |
|
|
@ -1437,8 +1478,9 @@ |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
getProofingInformation(proofingId) { |
|
|
getProofingInformation(proofingId) { |
|
|
|
|
|
const currentSite = this.syncSiteContext(this.searchData.site) |
|
|
let tempData = { |
|
|
let tempData = { |
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
|
|
|
site: currentSite, |
|
|
username: this.$store.state.user.name, |
|
|
username: this.$store.state.user.name, |
|
|
projectId: this.searchData.projectId, |
|
|
projectId: this.searchData.projectId, |
|
|
projectPartId: this.searchData.projectPartId, |
|
|
projectPartId: this.searchData.projectPartId, |
|
|
@ -1464,8 +1506,9 @@ |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
async getProofDocument() { |
|
|
async getProofDocument() { |
|
|
|
|
|
const currentSite = this.syncSiteContext(this.proofDocumenCurrentRow.site) |
|
|
let tempData = { |
|
|
let tempData = { |
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
|
|
|
site: currentSite, |
|
|
username: this.$store.state.user.name, |
|
|
username: this.$store.state.user.name, |
|
|
buNo: this.proofDocumenCurrentRow.buNo, |
|
|
buNo: this.proofDocumenCurrentRow.buNo, |
|
|
proofingId: this.proofDocumenCurrentRow.proofingId, |
|
|
proofingId: this.proofDocumenCurrentRow.proofingId, |
|
|
@ -1594,6 +1637,7 @@ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
addDocumentList(row) { |
|
|
addDocumentList(row) { |
|
|
|
|
|
this.syncSiteContext(row.site) |
|
|
this.proofDocumenCurrentRow = row |
|
|
this.proofDocumenCurrentRow = row |
|
|
this.getProofDocument() |
|
|
this.getProofDocument() |
|
|
this.documentListVisible = true |
|
|
this.documentListVisible = true |
|
|
@ -1607,6 +1651,7 @@ |
|
|
projectPartId: row.projectPartId, |
|
|
projectPartId: row.projectPartId, |
|
|
testPartNo: row.testPartNo, |
|
|
testPartNo: row.testPartNo, |
|
|
partDesc: row.partDesc, |
|
|
partDesc: row.partDesc, |
|
|
|
|
|
site: row.site, |
|
|
bu: row.bu, |
|
|
bu: row.bu, |
|
|
cProjectTypeDb: row.cProjectTypeDb, |
|
|
cProjectTypeDb: row.cProjectTypeDb, |
|
|
proofingId: row.proofingId, |
|
|
proofingId: row.proofingId, |
|
|
@ -1619,6 +1664,7 @@ |
|
|
// 遍历proofDocumentList |
|
|
// 遍历proofDocumentList |
|
|
}, |
|
|
}, |
|
|
updateProofingRecord(row) { |
|
|
updateProofingRecord(row) { |
|
|
|
|
|
this.syncSiteContext(row.site) |
|
|
this.proofingRecordVisible = true |
|
|
this.proofingRecordVisible = true |
|
|
this.modalData = { |
|
|
this.modalData = { |
|
|
projectId: row.projectId, |
|
|
projectId: row.projectId, |
|
|
@ -1651,9 +1697,10 @@ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
saveProofingRecord(row,type) { |
|
|
saveProofingRecord(row,type) { |
|
|
|
|
|
const currentSite = this.syncSiteContext(this.modalData.site || (row && row.site) || this.proofDocumenCurrentRow.site) |
|
|
let inData = { |
|
|
let inData = { |
|
|
id: this.modalData.id, |
|
|
id: this.modalData.id, |
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
|
|
|
site: currentSite, |
|
|
username: this.$store.state.user.name, |
|
|
username: this.$store.state.user.name, |
|
|
buNo: this.modalData.buNo, |
|
|
buNo: this.modalData.buNo, |
|
|
cProjectTypeDb: this.modalData.cProjectTypeDb, |
|
|
cProjectTypeDb: this.modalData.cProjectTypeDb, |
|
|
@ -1684,7 +1731,7 @@ |
|
|
} |
|
|
} |
|
|
if (row.proofingStatus === '草稿' && type === 1){ |
|
|
if (row.proofingStatus === '草稿' && type === 1){ |
|
|
inData = { |
|
|
inData = { |
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
|
|
|
site: currentSite, |
|
|
username: this.$store.state.user.name, |
|
|
username: this.$store.state.user.name, |
|
|
buNo: row.buNo, |
|
|
buNo: row.buNo, |
|
|
cProjectTypeDb: row.cProjectTypeDb, |
|
|
cProjectTypeDb: row.cProjectTypeDb, |
|
|
@ -1824,8 +1871,9 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
proofingRecordDelete(row) { |
|
|
proofingRecordDelete(row) { |
|
|
|
|
|
const currentSite = this.syncSiteContext(row.site) |
|
|
let tempData = { |
|
|
let tempData = { |
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
|
|
|
site: currentSite, |
|
|
username: this.$store.state.user.name, |
|
|
username: this.$store.state.user.name, |
|
|
buNo: row.buNo, |
|
|
buNo: row.buNo, |
|
|
cProjectTypeDb: row.cProjectTypeDb, |
|
|
cProjectTypeDb: row.cProjectTypeDb, |
|
|
@ -1927,6 +1975,7 @@ |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
searchDocumentTypeList() { |
|
|
searchDocumentTypeList() { |
|
|
|
|
|
this.searchDocumentTypeData.site = this.resolveProofingSite(this.modalData.site || this.proofDocumenCurrentRow.site) |
|
|
this.searchDocumentTypeData.proofingId = this.modalData.proofingId |
|
|
this.searchDocumentTypeData.proofingId = this.modalData.proofingId |
|
|
this.searchDocumentTypeData.projectId = this.modalData.projectId |
|
|
this.searchDocumentTypeData.projectId = this.modalData.projectId |
|
|
getExtraDocumentList(this.searchDocumentTypeData).then(({data}) => { |
|
|
getExtraDocumentList(this.searchDocumentTypeData).then(({data}) => { |
|
|
@ -1938,6 +1987,7 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
saveSelectionDocumentType() { |
|
|
saveSelectionDocumentType() { |
|
|
|
|
|
const currentSite = this.syncSiteContext(this.modalData.site || this.proofDocumenCurrentRow.site) |
|
|
if (this.documentSelection.length === 0) { |
|
|
if (this.documentSelection.length === 0) { |
|
|
this.$message({ |
|
|
this.$message({ |
|
|
message: '请选择文档类型', |
|
|
message: '请选择文档类型', |
|
|
@ -1948,7 +1998,7 @@ |
|
|
} |
|
|
} |
|
|
this.documentSelection.forEach((item) => { |
|
|
this.documentSelection.forEach((item) => { |
|
|
const inData = { |
|
|
const inData = { |
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
|
|
|
site: currentSite, |
|
|
proofingId: this.modalData.proofingId, |
|
|
proofingId: this.modalData.proofingId, |
|
|
proofingNo: this.modalData.proofingNo, |
|
|
proofingNo: this.modalData.proofingNo, |
|
|
projectId: this.modalData.projectId, |
|
|
projectId: this.modalData.projectId, |
|
|
@ -1984,8 +2034,9 @@ |
|
|
}, |
|
|
}, |
|
|
closeAddDocumentTypeFlag() { |
|
|
closeAddDocumentTypeFlag() { |
|
|
this.addDocumentTypeFlag = false |
|
|
this.addDocumentTypeFlag = false |
|
|
|
|
|
const currentSite = this.resolveProofingSite(this.modalData.site || this.proofDocumenCurrentRow.site) |
|
|
this.searchDocumentTypeData = { |
|
|
this.searchDocumentTypeData = { |
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
|
|
|
site: currentSite, |
|
|
projectId: '', |
|
|
projectId: '', |
|
|
projectNo: '', |
|
|
projectNo: '', |
|
|
projectPartId: '', |
|
|
projectPartId: '', |
|
|
@ -2063,8 +2114,9 @@ |
|
|
cancelButtonText: '取消', |
|
|
cancelButtonText: '取消', |
|
|
type: 'warning' |
|
|
type: 'warning' |
|
|
}).then(() => { |
|
|
}).then(() => { |
|
|
|
|
|
const currentSite = this.resolveProofingSite(this.modalData.site || this.proofDocumenCurrentRow.site) |
|
|
const inData = { |
|
|
const inData = { |
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
|
|
|
site: currentSite, |
|
|
documentDefinitionListIds: documentDefinitionListIds |
|
|
documentDefinitionListIds: documentDefinitionListIds |
|
|
} |
|
|
} |
|
|
batchDeleteDocumentType(inData).then(({data}) => { |
|
|
batchDeleteDocumentType(inData).then(({data}) => { |
|
|
@ -2137,6 +2189,7 @@ |
|
|
this.proofDocumentList = [] |
|
|
this.proofDocumentList = [] |
|
|
} |
|
|
} |
|
|
this.proofDocumenCurrentRow = JSON.parse(JSON.stringify(row)) |
|
|
this.proofDocumenCurrentRow = JSON.parse(JSON.stringify(row)) |
|
|
|
|
|
this.syncSiteContext(row ? row.site : '') |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
/** |
|
|
* 当前值发生变化的时候修改 |
|
|
* 当前值发生变化的时候修改 |
|
|
@ -2150,6 +2203,7 @@ |
|
|
// 判断是否是获取焦点的事件 |
|
|
// 判断是否是获取焦点的事件 |
|
|
if (row) { |
|
|
if (row) { |
|
|
this.proofDocumenCurrentRow = JSON.parse(JSON.stringify(row)) |
|
|
this.proofDocumenCurrentRow = JSON.parse(JSON.stringify(row)) |
|
|
|
|
|
this.syncSiteContext(row.site) |
|
|
//刷新当前页表 |
|
|
//刷新当前页表 |
|
|
this.refreshCurrentTabTable() |
|
|
this.refreshCurrentTabTable() |
|
|
} |
|
|
} |
|
|
@ -2200,6 +2254,7 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
saveSelectionCopyDocumentType() { |
|
|
saveSelectionCopyDocumentType() { |
|
|
|
|
|
const currentSite = this.resolveProofingSite(this.copyModalData.site || this.proofDocumenCurrentRow.site) |
|
|
if (this.documentCopySelection.length === 0) { |
|
|
if (this.documentCopySelection.length === 0) { |
|
|
this.$message({ |
|
|
this.$message({ |
|
|
message: '请选择文档', |
|
|
message: '请选择文档', |
|
|
@ -2217,7 +2272,7 @@ |
|
|
} |
|
|
} |
|
|
const inDataList = this.documentCopySelection.map(item => ({ |
|
|
const inDataList = this.documentCopySelection.map(item => ({ |
|
|
ossId: item.ossId, |
|
|
ossId: item.ossId, |
|
|
orderRef1: this.$store.state.user.site, |
|
|
|
|
|
|
|
|
orderRef1: currentSite, |
|
|
orderRef2: this.copyModalData.proofingId.toString(), |
|
|
orderRef2: this.copyModalData.proofingId.toString(), |
|
|
orderRef3: this.copyModalData.documentDefinitionListId, |
|
|
orderRef3: this.copyModalData.documentDefinitionListId, |
|
|
orderRef4: this.copyModalData.projectId.toString(), |
|
|
orderRef4: this.copyModalData.projectId.toString(), |
|
|
|