Browse Source

site

master
han\hanst 5 days ago
parent
commit
7fc66e7b2f
  1. 85
      src/views/modules/eam/com_project_proof_record.vue
  2. 82
      src/views/modules/eam/eamDocumentTypeDefinition.vue
  3. 2
      src/views/modules/eam/eamProjectPartInfo.vue

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

@ -675,6 +675,11 @@
inModal: {
type: Boolean,
default: false
},
//
selectedSite: {
type: String,
default: ''
}
},
computed: {
@ -704,6 +709,14 @@
this.getProofDocument()
}
},
selectedSite: {
immediate: true,
handler (val) {
if (val) {
this.syncSiteContext(val)
}
}
}
},
data() {
return {
@ -711,7 +724,7 @@
userBuList: [],
dataList: [],
searchData: {
site: this.$store.state.user.site,
site: this.selectedSite || this.$store.state.user.site,
username: this.$store.state.user.name,
projectId: '',
projectPartId: '',
@ -719,7 +732,7 @@
limit: 1000
},
searchProofData: {
site: this.$store.state.user.site,
site: this.selectedSite || this.$store.state.user.site,
username: this.$store.state.user.name,
projectId: '',
page: 1,
@ -751,7 +764,7 @@
proofDocumenCurrentRow:{},
documentClickRow: {},
currentData: {
site: this.$store.state.user.site,
site: this.selectedSite || this.$store.state.user.site,
username: this.$store.state.user.name,
projectId: '',
projectNo: '',
@ -762,7 +775,7 @@
limit: 1000
},
copyModalData: {
site: this.$store.state.user.site,
site: this.selectedSite || this.$store.state.user.site,
username: this.$store.state.user.name,
projectId: '',
projectNo: '',
@ -831,7 +844,7 @@
createBy: ''
},
searchDocumentTypeData: {
site: this.$store.state.user.site,
site: this.selectedSite || this.$store.state.user.site,
projectId: '',
projectNo: '',
proofingId: '',
@ -846,7 +859,7 @@
},
documentTypeData: {
// bu: this.userBuList[0].buNo,
site: this.$store.state.user.site,
site: this.selectedSite || this.$store.state.user.site,
proofingId: '',
proofingNo: '',
documentTypeId: '',
@ -1361,6 +1374,32 @@
},
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){
let inData= this.columnList.filter(item => item.columnProp === column.property)[0]
inData.columnWidth=newWidth
@ -1416,6 +1455,8 @@
//
this.searchData = JSON.parse(JSON.stringify(inData));
this.authUpdate = authUpdate
const currentSite = this.syncSiteContext(inData ? inData.site : '')
this.searchData.site = currentSite
//
proofingInformationSearch(this.searchData).then(({data}) => {
//
@ -1437,8 +1478,9 @@
});
},
getProofingInformation(proofingId) {
const currentSite = this.syncSiteContext(this.searchData.site)
let tempData = {
site: this.$store.state.user.site,
site: currentSite,
username: this.$store.state.user.name,
projectId: this.searchData.projectId,
projectPartId: this.searchData.projectPartId,
@ -1464,8 +1506,9 @@
});
},
async getProofDocument() {
const currentSite = this.syncSiteContext(this.proofDocumenCurrentRow.site)
let tempData = {
site: this.$store.state.user.site,
site: currentSite,
username: this.$store.state.user.name,
buNo: this.proofDocumenCurrentRow.buNo,
proofingId: this.proofDocumenCurrentRow.proofingId,
@ -1594,6 +1637,7 @@
}
},
addDocumentList(row) {
this.syncSiteContext(row.site)
this.proofDocumenCurrentRow = row
this.getProofDocument()
this.documentListVisible = true
@ -1607,6 +1651,7 @@
projectPartId: row.projectPartId,
testPartNo: row.testPartNo,
partDesc: row.partDesc,
site: row.site,
bu: row.bu,
cProjectTypeDb: row.cProjectTypeDb,
proofingId: row.proofingId,
@ -1619,6 +1664,7 @@
// proofDocumentList
},
updateProofingRecord(row) {
this.syncSiteContext(row.site)
this.proofingRecordVisible = true
this.modalData = {
projectId: row.projectId,
@ -1651,9 +1697,10 @@
}
},
saveProofingRecord(row,type) {
const currentSite = this.syncSiteContext(this.modalData.site || (row && row.site) || this.proofDocumenCurrentRow.site)
let inData = {
id: this.modalData.id,
site: this.$store.state.user.site,
site: currentSite,
username: this.$store.state.user.name,
buNo: this.modalData.buNo,
cProjectTypeDb: this.modalData.cProjectTypeDb,
@ -1684,7 +1731,7 @@
}
if (row.proofingStatus === '草稿' && type === 1){
inData = {
site: this.$store.state.user.site,
site: currentSite,
username: this.$store.state.user.name,
buNo: row.buNo,
cProjectTypeDb: row.cProjectTypeDb,
@ -1824,8 +1871,9 @@
})
},
proofingRecordDelete(row) {
const currentSite = this.syncSiteContext(row.site)
let tempData = {
site: this.$store.state.user.site,
site: currentSite,
username: this.$store.state.user.name,
buNo: row.buNo,
cProjectTypeDb: row.cProjectTypeDb,
@ -1927,6 +1975,7 @@
});
},
searchDocumentTypeList() {
this.searchDocumentTypeData.site = this.resolveProofingSite(this.modalData.site || this.proofDocumenCurrentRow.site)
this.searchDocumentTypeData.proofingId = this.modalData.proofingId
this.searchDocumentTypeData.projectId = this.modalData.projectId
getExtraDocumentList(this.searchDocumentTypeData).then(({data}) => {
@ -1938,6 +1987,7 @@
})
},
saveSelectionDocumentType() {
const currentSite = this.syncSiteContext(this.modalData.site || this.proofDocumenCurrentRow.site)
if (this.documentSelection.length === 0) {
this.$message({
message: '请选择文档类型',
@ -1948,7 +1998,7 @@
}
this.documentSelection.forEach((item) => {
const inData = {
site: this.$store.state.user.site,
site: currentSite,
proofingId: this.modalData.proofingId,
proofingNo: this.modalData.proofingNo,
projectId: this.modalData.projectId,
@ -1984,8 +2034,9 @@
},
closeAddDocumentTypeFlag() {
this.addDocumentTypeFlag = false
const currentSite = this.resolveProofingSite(this.modalData.site || this.proofDocumenCurrentRow.site)
this.searchDocumentTypeData = {
site: this.$store.state.user.site,
site: currentSite,
projectId: '',
projectNo: '',
projectPartId: '',
@ -2063,8 +2114,9 @@
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const currentSite = this.resolveProofingSite(this.modalData.site || this.proofDocumenCurrentRow.site)
const inData = {
site: this.$store.state.user.site,
site: currentSite,
documentDefinitionListIds: documentDefinitionListIds
}
batchDeleteDocumentType(inData).then(({data}) => {
@ -2137,6 +2189,7 @@
this.proofDocumentList = []
}
this.proofDocumenCurrentRow = JSON.parse(JSON.stringify(row))
this.syncSiteContext(row ? row.site : '')
},
/**
* 当前值发生变化的时候修改
@ -2150,6 +2203,7 @@
//
if (row) {
this.proofDocumenCurrentRow = JSON.parse(JSON.stringify(row))
this.syncSiteContext(row.site)
//
this.refreshCurrentTabTable()
}
@ -2200,6 +2254,7 @@
})
},
saveSelectionCopyDocumentType() {
const currentSite = this.resolveProofingSite(this.copyModalData.site || this.proofDocumenCurrentRow.site)
if (this.documentCopySelection.length === 0) {
this.$message({
message: '请选择文档',
@ -2217,7 +2272,7 @@
}
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(),

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

@ -126,17 +126,40 @@
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="文档类型ID" prop="documentTypeId" :rules="rules.documentTypeIdType">
<el-input v-model="modalData.documentTypeId" :disabled="modalDisableFlag" style="width: 140px"></el-input>
</el-form-item>
<el-form-item label="文档类型" prop="documentType" style="margin-left: 15px" :rules="rules.documentTypeType">
<el-input v-model="modalData.documentType" style="width: 230px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: 5px;">
<el-row :gutter="16" style="margin-left: 0; margin-right: 0;">
<el-col :span="12">
<el-form-item label="工厂" prop="site" :rules="rules.siteType">
<el-select
v-model="modalData.site"
placeholder="请选择"
clearable
:disabled="modalDisableFlag"
style="width: 100%"
@change="handleModalSiteChange">
<el-option
v-for="item in authorizedSiteList"
:key="item.site"
:label="item.sitename"
:value="item.site">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="文档类型ID" prop="documentTypeId" :rules="rules.documentTypeIdType">
<el-input v-model="modalData.documentTypeId" :disabled="modalDisableFlag" style="width: 100%"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="16" style="margin-left: 0; margin-right: 0;">
<el-col :span="12">
<el-form-item label="文档类型" prop="documentType" :rules="rules.documentTypeType">
<el-input v-model="modalData.documentType" style="width: 100%"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="责任部门" prop="responsibleDepartment" :rules="rules.responsibleDepartmentType">
<el-select v-model="modalData.responsibleDepartment" placeholder="请选择" clearable style="width: 140px">
<el-select v-model="modalData.responsibleDepartment" placeholder="请选择" clearable style="width: 100%">
<el-option
v-for = "i in responsibleDepartmentList"
:key = "i.roleNo"
@ -145,11 +168,15 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="预计完成天数" prop="estimatedCompletionDays" style="margin-left: 15px" :rules="rules.estimatedCompletionDaysType">
<el-input v-model="modalData.estimatedCompletionDays" style="width: 230px"></el-input>
</el-col>
</el-row>
<el-row :gutter="16" style="margin-left: 0; margin-right: 0;">
<el-col :span="12">
<el-form-item label="预计完成天数" prop="estimatedCompletionDays" :rules="rules.estimatedCompletionDaysType">
<el-input v-model="modalData.estimatedCompletionDays" style="width: 100%"></el-input>
</el-form-item>
</el-form>
</el-col>
</el-row>
</el-form>
<el-footer style="height:40px;margin-top: 15px;text-align:center">
<el-button type="primary" @click="saveData()">保存</el-button>
@ -404,6 +431,13 @@
],
levelList: [],
rules:{
siteType:[
{
required: true,
message: ' ',
trigger: ['blur','change']
}
],
documentTypeIdType:[
{
required: true,
@ -644,7 +678,7 @@
this.modalData = {
flag: '1',
// bu: this.userBuList[0].buNo,
site: this.$store.state.user.site,
site: '',
documentTypeId: '',
documentType: '',
responsibleDepartment: '',
@ -657,6 +691,10 @@
this.modalDisableFlag = false
this.modalFlag = true
},
handleModalSiteChange () {
this.modalData.responsibleDepartment = ''
this.getResponsibleDepartment()
},
updateModal (row) {
this.modalData = {
@ -703,6 +741,10 @@
},
saveData () {
if (this.modalData.site === '' || this.modalData.site == null) {
this.$message.warning('请选择工厂!')
return
}
// if (this.modalData.bu === '' || this.modalData.bu == null) {
// this.$message.warning('BU')
// return
@ -767,9 +809,15 @@
}
},
getResponsibleDepartment() {
if (this.modalData.site === '' || this.modalData.site == null) {
this.responsibleDepartmentList = []
return
}
this.responsibleDepartmentList = []
this.modalData.site = this.$store.state.user.site
getResponsibleDepartment(this.modalData).then(({data}) => {
let params = {
site: this.modalData.site
}
getResponsibleDepartment(params).then(({data}) => {
if (data.code === 0) {
data.rows.forEach((item) => {
// roleNoA

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

@ -1273,7 +1273,7 @@
<el-tabs style="margin-top: -2px; width: 100%; height: 100%;" v-model="activeModalTab" type="border-card" @tab-click="tabClick">
<el-tab-pane label="打样记录" name="proofRecord">
<!-- 注意这里使用了一个新的 ref用于模态框内部的 proofRecord 组件 -->
<proofRecord ref="proofRecordModal" :inModal="true"></proofRecord>
<proofRecord ref="proofRecordModal" :inModal="true" :selected-site="proofingCurrentRow.site"></proofRecord>
</el-tab-pane>
<el-tab-pane label="转量产阶段文档" name="massProductionStage">
<el-button type="primary" v-if="!this.authUpdate" icon="el-icon-upload" style="margin-top: -5px" @click="projectDocumentList()">文档清单定义</el-button>

Loading…
Cancel
Save