Browse Source

2026-10-26

打样申请增加项目状态校验
master
fengyuan_yang 3 weeks ago
parent
commit
9677aa81fd
  1. 13
      src/views/modules/proofing/requestForProofing.vue

13
src/views/modules/proofing/requestForProofing.vue

@ -2143,6 +2143,7 @@ export default {
projectId: undefined,
projectName: undefined,
customerId: undefined,
status: '已完成',
},
// 项目集合
projectList: [],
@ -3786,6 +3787,7 @@ export default {
searchProjectInfoList() {
this.projectList = [];
this.searchProjectData.customerId = this.modalData.customerNo
this.searchProjectData.status = '已完成'
searchProjectInfoList(this.searchProjectData).then(({data}) => {
if (data && data.code === 0) {
this.projectList = data.rows
@ -3803,6 +3805,7 @@ export default {
projectId: undefined,
projectName: undefined,
customerId: undefined,
status: '已完成',
}
},
rowStyle({row}) {
@ -4057,6 +4060,8 @@ export default {
this.lookupProject().then(ok => {
if (ok === false) {
this.$message.warning('项目号不存在,或不属于该客户')
} else if (ok && ok.result === 'status') {
this.$message.warning('仅项目单据状态为已完成时允许新增打样,当前状态:' + ok.status)
}
})
},
@ -4106,6 +4111,12 @@ export default {
}
const rows = (data && data.rows) || []
if (rows.length === 1) {
if (this.modalData.flag === '1' && rows[0].status !== '已完成') {
const status = rows[0].status
this.modalData.projectId = ''
this.modalData.projectName = ''
return { result: 'status', status }
}
this.modalData.projectName = rows[0].projectName
return true
}
@ -4139,6 +4150,8 @@ export default {
if (projectOk !== true) {
if (projectOk === false) {
this.$message.warning('项目号不存在,或不属于该客户')
} else if (projectOk && projectOk.result === 'status') {
this.$message.warning('仅项目单据状态为已完成时允许新增打样,当前状态:' + projectOk.status)
}
return false
}

Loading…
Cancel
Save