Browse Source

site

master
han\hanst 5 days ago
parent
commit
08f4d95c49
  1. 22
      src/views/modules/eam/eamBuDocumentListDefinition.vue
  2. 60
      src/views/modules/eam/eamProjectPartInfo.vue

22
src/views/modules/eam/eamBuDocumentListDefinition.vue

@ -623,6 +623,17 @@
}
return buValue
},
// site_bu site
getSiteByJoinedBuValue (buValue) {
if (!buValue) {
return ''
}
let buParts = buValue.split('_')
if (buParts.length >= 2) {
return buParts[0]
}
return ''
},
// BU bu_no
getBuNoByBuDesc (buDesc) {
if (!buDesc) {
@ -680,6 +691,7 @@
},
// BU
modalBuChangeHandle (buValue) {
this.modalData.site = this.getSiteByJoinedBuValue(buValue) || this.modalData.site || this.$store.state.user.site
this.modalData.projectCategory = ''
let buNo = this.getBuNoByJoinedValue(buValue)
this.loadModalProjectCategory(buNo)
@ -695,10 +707,10 @@
if (val === 1056 ) {
if (type === 1) {
strVal = this.searchData.documentTypeId
conSql = " and a.site = '" + this.$store.state.user.site + "'"
} else {
strVal = this.modalData.documentTypeId
conSql = " and a.site = '" + this.$store.state.user.site + "'"
const selectedBuSite = this.getSiteByJoinedBuValue(this.modalData.bu) || this.modalData.site || this.$store.state.user.site
conSql = " and a.site = '" + selectedBuSite + "'"
}
this.$refs.baseList.init(val, strVal, conSql)
}
@ -852,10 +864,12 @@
},
addModal () {
const defaultBu = this.userBuList[0] ? this.userBuList[0].buNo : ''
const defaultSite = this.getSiteByJoinedBuValue(defaultBu) || this.$store.state.user.site
this.modalData = {
flag: '1',
bu: this.userBuList[0].buNo,
site: this.$store.state.user.site,
bu: defaultBu,
site: defaultSite,
documentTypeId: '',
documentType: '',
projectCategory: '',

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

@ -1936,7 +1936,7 @@ import {uploadFileList} from '@/api/base/baseFunction.js';
viewMassDocumentFileVisible: false,
sendMassMailFlag: false,
searchProjectDocumentTypeData: {
site: this.$store.state.user.site,
site: '',
projectId: '',
projectNo: '',
proofingNo: '*',
@ -1977,7 +1977,7 @@ import {uploadFileList} from '@/api/base/baseFunction.js';
id:'',
bu: '',
buNo: '',
site: this.$store.state.user.site,
site: '',
projectId: '',
projectNo: '',
oriProjectId: '',
@ -2038,7 +2038,7 @@ import {uploadFileList} from '@/api/base/baseFunction.js';
updateBy: this.$store.state.user.name,
},
newProofingRecordData:{
site: this.$store.state.user.site,
site: '',
projectId: '',
projectNo: '',
projectDesc: '',
@ -2060,7 +2060,7 @@ import {uploadFileList} from '@/api/base/baseFunction.js';
updateBy: this.$store.state.user.name,
},
searchBusinessData:{
site: this.$store.state.user.site,
site: '',
username: '',
roleDesc: '',
userDisplay: '',
@ -2069,7 +2069,7 @@ import {uploadFileList} from '@/api/base/baseFunction.js';
limit: 10,
},
searchBusinessData1:{
site: this.$store.state.user.site,
site: '',
username: '',
roleDesc: '',
userDisplay: '',
@ -2078,7 +2078,7 @@ import {uploadFileList} from '@/api/base/baseFunction.js';
limit: 10,
},
searchBusinessData2:{
site: this.$store.state.user.site,
site: '',
username: '',
roleDesc: '',
userDisplay: '',
@ -2087,7 +2087,7 @@ import {uploadFileList} from '@/api/base/baseFunction.js';
limit: 10,
},
searchBusinessData3:{
site: this.$store.state.user.site,
site: '',
username: '',
roleDesc: '',
userDisplay: '',
@ -2096,7 +2096,7 @@ import {uploadFileList} from '@/api/base/baseFunction.js';
limit: 10,
},
searchBusinessData4:{
site: this.$store.state.user.site,
site: '',
username: '',
roleDesc: '',
userDisplay: '',
@ -2105,7 +2105,7 @@ import {uploadFileList} from '@/api/base/baseFunction.js';
limit: 10,
},
searchBusinessData5:{
site: this.$store.state.user.site,
site: '',
username: '',
roleDesc: '',
userDisplay: '',
@ -2114,7 +2114,7 @@ import {uploadFileList} from '@/api/base/baseFunction.js';
limit: 10,
},
searchBusinessData6:{
site: this.$store.state.user.site,
site: '',
username: '',
roleDesc: '',
userDisplay: '',
@ -2147,7 +2147,7 @@ import {uploadFileList} from '@/api/base/baseFunction.js';
userDisplay: ''
},
copyModalData: {
site: this.$store.state.user.site,
site: '',
username: this.$store.state.user.name,
projectId: '',
projectNo: '',
@ -3894,6 +3894,18 @@ import {uploadFileList} from '@/api/base/baseFunction.js';
},
methods: {
resolveCurrentPartSite (site) {
if (site !== null && site !== undefined && site !== '') {
return site
}
if (this.proofingCurrentRow && this.proofingCurrentRow.site) {
return this.proofingCurrentRow.site
}
if (this.modalData && this.modalData.site) {
return this.modalData.site
}
return this.$store.state.user.site
},
handleColumnResize(newWidth, oldWidth, column, event){
let inData= this.columnList.filter(item => item.columnProp === column.property)[0]
inData.columnWidth=newWidth
@ -4381,6 +4393,7 @@ import {uploadFileList} from '@/api/base/baseFunction.js';
proofingClickRow(row){
row.proofingId = -1
this.proofingCurrentRow=JSON.parse(JSON.stringify(row));
this.searchProjectDocumentTypeData.site = this.resolveCurrentPartSite(row.site)
},
/**
* 当前值发生变化的时候修改
@ -4392,6 +4405,7 @@ import {uploadFileList} from '@/api/base/baseFunction.js';
//
if (row) {
this.proofingCurrentRow = JSON.parse(JSON.stringify(row))
this.searchProjectDocumentTypeData.site = this.resolveCurrentPartSite(row.site)
}
},
//
@ -5217,7 +5231,7 @@ import {uploadFileList} from '@/api/base/baseFunction.js';
let inData = {}
if (row){
inData = {
site: this.$store.state.user.site,
site: this.resolveCurrentPartSite(row.site || this.proofingCurrentRow.site),
buNo: this.proofingCurrentRow.buNo,
projectId: row.projectId,
projectPartId: this.proofingCurrentRow.projectPartId,
@ -5381,8 +5395,9 @@ import {uploadFileList} from '@/api/base/baseFunction.js';
});
},
getProjectOtherDocument () {
const currentSite = this.resolveCurrentPartSite(this.proofingCurrentRow.site)
let tempData = {
site: this.$store.state.user.site,
site: currentSite,
username: this.$store.state.user.name,
buNo: this.proofingCurrentRow.buNo,
proofingId: -1,
@ -5511,15 +5526,16 @@ import {uploadFileList} from '@/api/base/baseFunction.js';
})
},
projectDocumentList () {
const currentSite = this.resolveCurrentPartSite(this.proofingCurrentRow.site)
this.modalData = {
site: this.proofingCurrentRow.site,
site: currentSite,
buNo: this.proofingCurrentRow.buNo,
projectId: this.proofingCurrentRow.projectId,
projectNo: this.proofingCurrentRow.projectNo,
projectDesc: this.proofingCurrentRow.projectDesc,
customerNo: this.proofingCurrentRow.customerNo,
customerDesc: this.proofingCurrentRow.customerDesc,
bu: this.proofingCurrentRow.site + '_' + this.proofingCurrentRow.buNo,
bu: currentSite + '_' + this.proofingCurrentRow.buNo,
testPartNo: this.proofingCurrentRow.testPartNo,
partDesc: this.proofingCurrentRow.partDesc,
projectCategory: this.proofingCurrentRow.projectCategory,
@ -5532,6 +5548,7 @@ import {uploadFileList} from '@/api/base/baseFunction.js';
limit: 1000,
page: 1
}
this.searchProjectDocumentTypeData.site = currentSite
this.getProjectOtherDocument()
this.projectDocumentListVisible = true
},
@ -5568,8 +5585,9 @@ import {uploadFileList} from '@/api/base/baseFunction.js';
},
closeAddProjectDocumentTypeFlag() {
this.addProjectDocumentTypeFlag = false
const currentSite = this.resolveCurrentPartSite(this.modalData.site)
this.searchProjectDocumentTypeData = {
site: this.$store.state.user.site,
site: currentSite,
projectNo: '',
proofingNo: '*',
documentTypeId: '',
@ -5588,6 +5606,7 @@ import {uploadFileList} from '@/api/base/baseFunction.js';
return this.projectAllDocumentList.filter(item => item.uploadedFlag !== 'N')
},
searchProjectDocumentTypeList() {
this.searchProjectDocumentTypeData.site = this.resolveCurrentPartSite(this.modalData.site || this.proofingCurrentRow.site)
this.searchProjectDocumentTypeData.proofingNo = '*'
this.searchProjectDocumentTypeData.projectNo = this.modalData.projectNo
getExtraDocumentList(this.searchProjectDocumentTypeData).then(({data}) => {
@ -5605,6 +5624,7 @@ import {uploadFileList} from '@/api/base/baseFunction.js';
this.documentCopySelection = val;
},
saveSelectionProjectDocumentType() {
const currentSite = this.resolveCurrentPartSite(this.modalData.site || this.proofingCurrentRow.site)
if (this.projectDocumentSelection.length === 0) {
this.$message({
message: '请选择文档类型',
@ -5615,7 +5635,7 @@ import {uploadFileList} from '@/api/base/baseFunction.js';
}
this.projectDocumentSelection.forEach((item) => {
const inData = {
site: this.$store.state.user.site,
site: currentSite,
proofingId: -1,
proofingNo: '*',
projectId: this.proofingCurrentRow.projectId,
@ -5648,8 +5668,9 @@ import {uploadFileList} from '@/api/base/baseFunction.js';
})
},
searchProjectAllDocumentList () {
const currentSite = this.resolveCurrentPartSite(this.proofingCurrentRow.site)
let inData = {
site: this.$store.state.user.site,
site: currentSite,
username: this.$store.state.user.name,
buNo: this.proofingCurrentRow.buNo,
proofingId: -999,
@ -6489,6 +6510,7 @@ import {uploadFileList} from '@/api/base/baseFunction.js';
})
},
saveSelectionCopyDocumentType() {
const currentSite = this.resolveCurrentPartSite(this.copyModalData.site || this.proofingCurrentRow.site)
if (this.documentCopySelection.length === 0) {
this.$message({
message: '请选择文档',
@ -6509,7 +6531,7 @@ import {uploadFileList} from '@/api/base/baseFunction.js';
}
const inDataList = this.documentCopySelection.map(item => ({
ossId: item.ossId,
orderRef1: this.$store.state.user.site,
orderRef1: currentSite,
orderRef2: this.copyModalData.proofingId.toString(),
orderRef3: this.copyModalData.documentDefinitionListId,
orderRef4: this.copyModalData.projectId.toString(),

Loading…
Cancel
Save