|
|
@ -975,7 +975,7 @@ |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
<!-- 导入 --> |
|
|
<project-part-upload ref="projectPartUpload" @refreshPageTables="searchTable" v-drag></project-part-upload> |
|
|
|
|
|
|
|
|
<project-part-upload ref="projectPartUpload" @refreshPageTables="onProjectPartAdded" v-drag></project-part-upload> |
|
|
|
|
|
|
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|
|
|
|
|
|
|
|
@ -2234,6 +2234,15 @@ import CodeGeneration from "../../code/generation.vue"; |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
onProjectPartAdded (hasTemporaryPart) { |
|
|
|
|
|
this.searchTable() |
|
|
|
|
|
if (hasTemporaryPart !== false && this.searchData.status === '已完成') { |
|
|
|
|
|
this.$message.success('已新增临时物料,项目状态已回退为草稿') |
|
|
|
|
|
this.searchData.status = '草稿' |
|
|
|
|
|
} |
|
|
|
|
|
this.$emit('refreshProjectList') |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
addModal () { |
|
|
addModal () { |
|
|
if (this.searchData.projectId === "" || this.searchData.projectId == null) { |
|
|
if (this.searchData.projectId === "" || this.searchData.projectId == null) { |
|
|
this.$alert('请选择项目!', '错误', { |
|
|
this.$alert('请选择项目!', '错误', { |
|
|
@ -2786,8 +2795,8 @@ import CodeGeneration from "../../code/generation.vue"; |
|
|
if (this.modalData.flag === '1' || this.modalData.flag === '3') { |
|
|
if (this.modalData.flag === '1' || this.modalData.flag === '3') { |
|
|
partInformationSave2(this.modalData).then(({data}) => { |
|
|
partInformationSave2(this.modalData).then(({data}) => { |
|
|
if (data && data.code === 0) { |
|
|
if (data && data.code === 0) { |
|
|
this.searchTable() |
|
|
|
|
|
this.modalFlag = false |
|
|
this.modalFlag = false |
|
|
|
|
|
this.onProjectPartAdded(this.modalData.status === 'N') |
|
|
this.$message({ |
|
|
this.$message({ |
|
|
message: '操作成功', |
|
|
message: '操作成功', |
|
|
type: 'success', |
|
|
type: 'success', |
|
|
@ -2948,6 +2957,7 @@ import CodeGeneration from "../../code/generation.vue"; |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
let tempData = { |
|
|
let tempData = { |
|
|
|
|
|
site: this.searchData.site, |
|
|
projectId: this.searchData.projectId, |
|
|
projectId: this.searchData.projectId, |
|
|
customerNo: this.searchData.customerId, |
|
|
customerNo: this.searchData.customerId, |
|
|
createBy: this.$store.state.user.name, |
|
|
createBy: this.$store.state.user.name, |
|
|
@ -2956,8 +2966,9 @@ import CodeGeneration from "../../code/generation.vue"; |
|
|
} |
|
|
} |
|
|
addProjectPart2(tempData).then(({data}) => { |
|
|
addProjectPart2(tempData).then(({data}) => { |
|
|
if (data && data.code === 0) { |
|
|
if (data && data.code === 0) { |
|
|
this.searchTable() |
|
|
|
|
|
|
|
|
const hasTemporaryPart = this.partList2.some(item => item && item.status === 'N') |
|
|
this.partModelFlag = false |
|
|
this.partModelFlag = false |
|
|
|
|
|
this.onProjectPartAdded(hasTemporaryPart) |
|
|
} else { |
|
|
} else { |
|
|
this.$alert(data.msg, '错误', { |
|
|
this.$alert(data.msg, '错误', { |
|
|
confirmButtonText: '确定' |
|
|
confirmButtonText: '确定' |
|
|
|