Browse Source

2026-09-08

项目信息增加oa流程
master
fengyuan_yang 1 week ago
parent
commit
ce24a72e5f
  1. 32
      src/views/modules/project/projectInfo/com_projectInfo-add-or-update.vue
  2. 17
      src/views/modules/project/projectInfo/com_project_info_part.vue
  3. 37
      src/views/modules/project/projectInfo/projectInfo.vue
  4. 5
      src/views/modules/project/projectInfo/projectInfoQuery.vue

32
src/views/modules/project/projectInfo/com_projectInfo-add-or-update.vue

@ -1063,6 +1063,32 @@
}
return true
},
hasProjectManager () {
if (this.dataForm.projectManagerList && this.dataForm.projectManagerList.length > 0) {
return true
}
return !!(this.dataForm.projectManagerName && String(this.dataForm.projectManagerName).trim())
},
validateManagerRequiredFields () {
if (!this.hasProjectManager()) {
return true
}
const missing = []
if (this.dataForm.projectAmount === null || this.dataForm.projectAmount === undefined || String(this.dataForm.projectAmount).trim() === '') {
missing.push('项目年销售额')
}
if (!this.dataForm.finalCustomerId || String(this.dataForm.finalCustomerId).trim() === '') {
missing.push('直接客户')
}
if (!this.dataForm.customerRemark || String(this.dataForm.customerRemark).trim() === '') {
missing.push('客户应用/要求')
}
if (missing.length) {
this.$message.warning('项目经理不为空时,' + missing.join('、') + '不能为空')
return false
}
return true
},
agreeSubmit () {
if (!this.canAgreeAction()) {
this.$message.warning('当前状态不允许同意')
@ -1081,6 +1107,9 @@
this.$message.warning('当前状态不允许驳回')
return
}
if (!this.validateManagerRequiredFields()) {
return
}
this.rejectOpinion = ''
this.submitModalFlag = true
},
@ -1096,6 +1125,9 @@
this.$message.warning('节点权限加载中,请稍后重试')
return
}
if (!this.validateManagerRequiredFields()) {
return
}
if (nodeConclusion === 'Y' && !this.validateSubmitRequiredFields()) {
return
}

17
src/views/modules/project/projectInfo/com_project_info_part.vue

@ -975,7 +975,7 @@
</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>
@ -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 () {
if (this.searchData.projectId === "" || this.searchData.projectId == null) {
this.$alert('请选择项目!', '错误', {
@ -2786,8 +2795,8 @@ import CodeGeneration from "../../code/generation.vue";
if (this.modalData.flag === '1' || this.modalData.flag === '3') {
partInformationSave2(this.modalData).then(({data}) => {
if (data && data.code === 0) {
this.searchTable()
this.modalFlag = false
this.onProjectPartAdded(this.modalData.status === 'N')
this.$message({
message: '操作成功',
type: 'success',
@ -2948,6 +2957,7 @@ import CodeGeneration from "../../code/generation.vue";
return
}
let tempData = {
site: this.searchData.site,
projectId: this.searchData.projectId,
customerNo: this.searchData.customerId,
createBy: this.$store.state.user.name,
@ -2956,8 +2966,9 @@ import CodeGeneration from "../../code/generation.vue";
}
addProjectPart2(tempData).then(({data}) => {
if (data && data.code === 0) {
this.searchTable()
const hasTemporaryPart = this.partList2.some(item => item && item.status === 'N')
this.partModelFlag = false
this.onProjectPartAdded(hasTemporaryPart)
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'

37
src/views/modules/project/projectInfo/projectInfo.vue

@ -273,7 +273,7 @@
<oss-components height="25vh" label="项目号" :columns="ossColumns" :order-ref1="currentRow.site" :order-ref2="currentRow.projectId"></oss-components>
</el-tab-pane>
<el-tab-pane label="项目物料" v-if="isAuth('101002001:part')" name="part">
<projectPart ref="projectPart"></projectPart>
<projectPart ref="projectPart" @refreshProjectList="search"></projectPart>
</el-tab-pane>
<el-tab-pane label="询价信息" v-if="isAuth('101002001:quotation')" name="quotation">
<project-quotation ref="projectQuotation" ></project-quotation>
@ -1696,7 +1696,8 @@
site: this.currentRow.site,
projectId: this.currentRow.projectId,
username: this.$store.state.user.name,
customerId: this.currentRow.customerId
customerId: this.currentRow.customerId,
status: this.currentRow.status
}
this.$refs.projectPart.init(inData)
},
@ -2205,6 +2206,9 @@
this.$message.warning('仅草稿状态的单据允许下达')
return
}
if (!this.validateManagerRequiredFields(row)) {
return
}
this.$confirm('确认下达该项目?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@ -2274,6 +2278,35 @@
this.filterVisible = false
this.isFilterSearch = true
},
hasProjectManager (source) {
if (!source) {
return false
}
if (source.projectManagerList && source.projectManagerList.length > 0) {
return true
}
return !!(source.projectManagerName && String(source.projectManagerName).trim())
},
validateManagerRequiredFields (source) {
if (!this.hasProjectManager(source)) {
return true
}
const missing = []
if (source.projectAmount === null || source.projectAmount === undefined || String(source.projectAmount).trim() === '') {
missing.push('项目年销售额')
}
if (!source.finalCustomerId || String(source.finalCustomerId).trim() === '') {
missing.push('直接客户')
}
if (!source.customerRemark || String(source.customerRemark).trim() === '') {
missing.push('客户应用/要求')
}
if (missing.length) {
this.$message.warning('项目经理不为空时,' + missing.join('、') + '不能为空')
return false
}
return true
},
},
activated() {

5
src/views/modules/project/projectInfo/projectInfoQuery.vue

@ -231,7 +231,7 @@
:save-visible="false" :remove-visible="false"></oss-components>
</el-tab-pane>
<el-tab-pane label="项目物料" name="part">
<projectPart ref="projectPart"></projectPart>
<projectPart ref="projectPart" @refreshProjectList="search"></projectPart>
</el-tab-pane>
<el-tab-pane label="打样信息" name="sample">
<sample ref="sample"></sample>
@ -1004,7 +1004,8 @@
site: this.currentRow.site,
projectId: this.currentRow.projectId,
username: this.$store.state.user.name,
customerId: this.currentRow.customerId
customerId: this.currentRow.customerId,
status: this.currentRow.status
}
this.$refs.projectPart.init(inData)
},

Loading…
Cancel
Save