材料站领料编辑问题修复

This commit is contained in:
hongchao 2025-09-26 18:07:07 +08:00
parent 50eec81888
commit e2ec86b8ab
2 changed files with 6 additions and 6 deletions

View File

@ -434,8 +434,8 @@ export default {
if (!res.data || res.data.length === 0) return if (!res.data || res.data.length === 0) return
this.uniteList = res.data this.uniteList = res.data
const userName = sessionStorage.getItem('userName') const userName = sessionStorage.getItem('userName')
if (this.uniteList.some(item => item.teamLeaderIdCard == userName)) { if (this.isEdit && this.isView == false) {
const team = this.uniteList.find(item => item.teamLeaderIdCard == userName) const team = this.uniteList.find(item => item.teamName == this.maForm.teamName)
this.maForm.teamId = team.id this.maForm.teamId = team.id
this.maForm.teamName = team.teamName this.maForm.teamName = team.teamName
this.maForm.leasePerson = team.relName this.maForm.leasePerson = team.relName

View File

@ -442,15 +442,15 @@ export default {
// //
async getBmTeam() { async getBmTeam() {
try { try {
console.log("xxxxxxxxxxxxxxxxxx", this.maForm.projectId)
const idCard = sessionStorage.getItem('idCard') const idCard = sessionStorage.getItem('idCard')
const res = await getBmTeamApi({ isAll: 0, idCard, projectId: this.maForm.projectId }) const res = await getBmTeamApi({ isAll: 0, idCard, projectId: this.maForm.projectId })
// console.log('🚀 ~ getBmTeam ~ res:', res) // console.log('🚀 ~ getBmTeam ~ res:', res)
if (!res.data || res.data.length === 0) return if (!res.data || res.data.length === 0) return
this.uniteList = res.data this.uniteList = res.data
const userName = sessionStorage.getItem('userName') console.log("xxxxxxxxxxxxxxxxxxxxxx",this.maForm.projectId)
if (this.uniteList.some(item => item.teamLeaderIdCard == userName)) { console.log("yyyyyyyyyyyyyyyyyyyyyy",this.isEdit,this.isView)
const team = this.uniteList.find(item => item.teamLeaderIdCard == userName) if (this.isEdit && this.isView == false) {
const team = this.uniteList.find(item => item.teamName == this.maForm.teamName)
this.maForm.teamId = team.id this.maForm.teamId = team.id
this.maForm.teamName = team.teamName this.maForm.teamName = team.teamName
this.maForm.leasePerson = team.relName this.maForm.leasePerson = team.relName