材料站领料编辑问题修复

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
this.uniteList = res.data
const userName = sessionStorage.getItem('userName')
if (this.uniteList.some(item => item.teamLeaderIdCard == userName)) {
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.teamName = team.teamName
this.maForm.leasePerson = team.relName

View File

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