材料站领料单号一键出库
This commit is contained in:
parent
6000fb5c86
commit
d2ac7b3511
|
|
@ -837,3 +837,12 @@ export function getSubUnitList(query) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取领料单
|
||||||
|
export function getLeaseDataByCode(data) {
|
||||||
|
return request({
|
||||||
|
url: '/material/material_lease_apply_info/getLeaseDataByCode',
|
||||||
|
method: 'get',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -105,10 +105,19 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// saveCodeOut() {
|
||||||
|
// console.log('Selected codes:', this.outCodeList)
|
||||||
|
// this.$emit('selectOutCode', this.selectedCodeList)
|
||||||
|
// this.openCode = false
|
||||||
|
// }
|
||||||
saveCodeOut() {
|
saveCodeOut() {
|
||||||
console.log('Selected codes:', this.outCodeList)
|
// 直接从 el-table 的引用中获取当前选中的行
|
||||||
this.$emit('selectOutCode', this.selectedCodeList)
|
const selectedRows = this.$refs.multipleTable.selection;
|
||||||
this.openCode = false
|
console.log('Selected codes:', selectedRows);
|
||||||
|
|
||||||
|
// 发送选中的行列表
|
||||||
|
this.$emit('selectOutCode', selectedRows);
|
||||||
|
this.openCode = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<template>
|
<template>
|
||||||
<!-- 新增工机具 -->
|
|
||||||
<div>
|
<div>
|
||||||
<el-form :model="maForm" ref="maForm" size="small" :rules="rules" :inline="true" label-width="120px">
|
<el-form :model="maForm" ref="maForm" size="small" :rules="rules" :inline="true" label-width="120px">
|
||||||
<el-form-item label="租赁工程" prop="proId">
|
<el-form-item label="租赁工程" prop="proId">
|
||||||
|
|
@ -78,6 +77,16 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="领料单号" prop="code">
|
||||||
|
<el-input
|
||||||
|
v-model="code"
|
||||||
|
placeholder="请输入领料单号"
|
||||||
|
clearable
|
||||||
|
style="width: 240px"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery">查询单号</el-button>
|
||||||
|
|
||||||
<el-form-item label="类型规格" prop="deviceType">
|
<el-form-item label="类型规格" prop="deviceType">
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
<el-col :span="15">
|
<el-col :span="15">
|
||||||
|
|
@ -209,7 +218,7 @@ import {
|
||||||
getAgreement,
|
getAgreement,
|
||||||
getBmTeamApi,
|
getBmTeamApi,
|
||||||
getListsByConfigId,
|
getListsByConfigId,
|
||||||
getStandardConfigList
|
getStandardConfigList, getLeaseDataByCode
|
||||||
} from '@/api/materialsStation'
|
} from '@/api/materialsStation'
|
||||||
import Treeselect from '@riophae/vue-treeselect'
|
import Treeselect from '@riophae/vue-treeselect'
|
||||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
|
|
@ -247,26 +256,19 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
taskId: '',
|
taskId: '',
|
||||||
// isEdit: false,
|
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: false,
|
loading: false,
|
||||||
loadingTwo: false,
|
loadingTwo: false,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
ids: [],
|
ids: [],
|
||||||
// 非单个禁用
|
|
||||||
single: true,
|
single: true,
|
||||||
// 非多个禁用
|
|
||||||
multiple: true,
|
multiple: true,
|
||||||
// 显示搜索条件
|
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
// 总条数
|
|
||||||
total: 0,
|
total: 0,
|
||||||
selectTreeProps: {
|
selectTreeProps: {
|
||||||
children: 'children',
|
children: 'children',
|
||||||
label: 'name',
|
label: 'name',
|
||||||
// multiple: false,
|
|
||||||
value: 'id'
|
value: 'id'
|
||||||
// multiple: true,
|
|
||||||
},
|
},
|
||||||
//租赁单位
|
//租赁单位
|
||||||
uniteList: [],
|
uniteList: [],
|
||||||
|
|
@ -302,6 +304,7 @@ export default {
|
||||||
proId: undefined,
|
proId: undefined,
|
||||||
relPhone: ''
|
relPhone: ''
|
||||||
},
|
},
|
||||||
|
code:'',
|
||||||
standardConfigList: [],
|
standardConfigList: [],
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
|
|
@ -326,7 +329,6 @@ export default {
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
relPhone: [
|
relPhone: [
|
||||||
// { required: true, message: '联系电话不能为空', trigger: 'blur' },
|
|
||||||
{
|
{
|
||||||
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
||||||
message: '请输入正确的手机号码',
|
message: '请输入正确的手机号码',
|
||||||
|
|
@ -335,7 +337,7 @@ export default {
|
||||||
],
|
],
|
||||||
bmFileInfos: [
|
bmFileInfos: [
|
||||||
{
|
{
|
||||||
required: false, //是否分包商(是:合同编号必填)
|
required: false,
|
||||||
message: '请上传委托书',
|
message: '请上传委托书',
|
||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
}
|
}
|
||||||
|
|
@ -353,12 +355,11 @@ export default {
|
||||||
projectTemp: undefined,
|
projectTemp: undefined,
|
||||||
unitTemp: undefined,
|
unitTemp: undefined,
|
||||||
agreementId: undefined,
|
agreementId: undefined,
|
||||||
// taxRate:0,
|
flattenOptions: [],
|
||||||
flattenOptions: [], // 扁平化后的选项数据
|
|
||||||
typePopoverVisible: false,
|
typePopoverVisible: false,
|
||||||
typeOptions: [], // 类型选项
|
typeOptions: [],
|
||||||
allTypeList: [], // 所有类型数据
|
allTypeList: [],
|
||||||
flattenTypeOptions: [], // 扁平化后的选项数据(缓存所有选项)
|
flattenTypeOptions: [],
|
||||||
typeGroups: [], // 分组后的类型选项
|
typeGroups: [], // 分组后的类型选项
|
||||||
typeGroupsBackup: [], // 备份原始分组数据,用于搜索
|
typeGroupsBackup: [], // 备份原始分组数据,用于搜索
|
||||||
typeMap: new Map(), // 用于快速查找类型数据
|
typeMap: new Map(), // 用于快速查找类型数据
|
||||||
|
|
@ -380,7 +381,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getStandardConfigListApi() //标准配置下拉选
|
this.getStandardConfigListApi()
|
||||||
if (this.isEdit && this.isView == false) {
|
if (this.isEdit && this.isView == false) {
|
||||||
console.log('isEdit', this.isEdit)
|
console.log('isEdit', this.isEdit)
|
||||||
this.taskId = this.editTaskId
|
this.taskId = this.editTaskId
|
||||||
|
|
@ -411,21 +412,175 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 获取协议id
|
// 单号查询
|
||||||
async getAgreementId() {
|
async handleQuery() {
|
||||||
getAgreement({
|
if (!this.code || String(this.code).trim() === '') {
|
||||||
teamId: this.maForm.teamId,
|
this.$message.warning('请输入领料单号')
|
||||||
// projectId: this.maForm.projectId,
|
return
|
||||||
proId: this.maForm.proId
|
}
|
||||||
}).then(res => {
|
|
||||||
console.log('🚀 ~ getAgreementId ~ res:', res)
|
const loading = this.$loading({ text: '加载中...' })
|
||||||
if (!res.data || !Array.isArray(res.data)) {
|
try {
|
||||||
this.agreementId = []
|
// 调后台接口按单号查询,注意替换 api 名称为你真实的接口函数
|
||||||
this.equipmentTypeList = []
|
// 假设 API 返回结构类似:{ code: 200, data: { leaseApplyInfo: {...}, leaseApplyDetailsList: [...] } }
|
||||||
|
// 示例用 getLeaseDataByCode,若你的接口名不同请替换
|
||||||
|
const params = { code: this.code }
|
||||||
|
const res = await getLeaseDataByCode(params) // <-- 若你的 API 名称不是这个,请替换
|
||||||
|
// 处理接口返回
|
||||||
|
if (!res || (!res.data && res.code !== 200)) {
|
||||||
|
this.$message.error(res.msg || '未查询到该单号信息')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.agreementId = res.data
|
|
||||||
this.equipmentType()
|
const payload = res.data || res // 兼容不同后端包装
|
||||||
|
const leaseApplyInfo = payload.leaseApplyInfo || payload.leaseApplyInfoVo || payload.leaseApplyInfoVo || {}
|
||||||
|
const leaseApplyDetailsList = payload.leaseApplyDetailsList || payload.detailsList || []
|
||||||
|
|
||||||
|
if (!leaseApplyInfo || !leaseApplyInfo.proId) {
|
||||||
|
this.$message.error('返回结果缺少工程信息(proId),无法继续')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// // 若用户已在下拉选中一个工程,需要校验是否一致(若不一致则提示该领料单号不属于负责的工程并终止)
|
||||||
|
// if (this.maForm.proId && String(this.maForm.proId) !== String(leaseApplyInfo.proId)) {
|
||||||
|
// this.$message.warning('该领料单号不属于当前负责的工程')
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
|
||||||
|
const isProIdValid = this.projectList.some(item =>
|
||||||
|
String(item.proId) === String(leaseApplyInfo.proId)
|
||||||
|
)
|
||||||
|
|
||||||
|
if (!isProIdValid) {
|
||||||
|
this.$message.warning('该领料单号不属于您负责的工程')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 自动带入工程(不论用户是否先选工程)
|
||||||
|
this.maForm.proId = leaseApplyInfo.proId
|
||||||
|
// 如果 projectList 中存在对应项,带入 projectId(你原 code 使用 projectId 字段关联)
|
||||||
|
const matchedProject = this.projectList.find(item => String(item.proId) === String(leaseApplyInfo.proId))
|
||||||
|
if (matchedProject) {
|
||||||
|
this.maForm.projectId = matchedProject.projectId || matchedProject.projectId
|
||||||
|
}
|
||||||
|
// 回显其它基础字段
|
||||||
|
// Object.assign(this.maForm, leaseApplyInfo)
|
||||||
|
this.maForm.relPhone = leaseApplyInfo.phone || leaseApplyInfo.relPhone || this.maForm.relPhone || ''
|
||||||
|
// 拉取班组(带入工程后需要取班组信息)
|
||||||
|
await this.getBmTeam()
|
||||||
|
|
||||||
|
console.log('开始加载类型数据...')
|
||||||
|
await this.getAgreementId()
|
||||||
|
console.log('flattenTypeOptions 加载前:', this.flattenTypeOptions)
|
||||||
|
|
||||||
|
// 如果 equipmentType() 并不是在 getAgreementId 内被 await 到(保险起见),再主动等待一次 equipmentType
|
||||||
|
if (!this.flattenTypeOptions || this.flattenTypeOptions.length === 0) {
|
||||||
|
console.log('等待 equipmentType 数据加载...')
|
||||||
|
// 直接调用 equipmentType 并等待
|
||||||
|
await this.equipmentType()
|
||||||
|
}
|
||||||
|
console.log('flattenTypeOptions 加载后:', this.flattenTypeOptions)
|
||||||
|
// 类型树已加载完毕,映射明细到列表
|
||||||
|
this.mapLeaseDetailsToList(leaseApplyDetailsList)
|
||||||
|
|
||||||
|
// 成功提示
|
||||||
|
this.$message.success('单号数据已加载并带入页面')
|
||||||
|
} catch (error) {
|
||||||
|
console.error('handleQuery error:', error)
|
||||||
|
this.$message.error('查询失败,请稍后重试')
|
||||||
|
} finally {
|
||||||
|
loading.close()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mapLeaseDetailsToList(leaseApplyDetailsList = []) {
|
||||||
|
if (!Array.isArray(leaseApplyDetailsList) || leaseApplyDetailsList.length === 0) {
|
||||||
|
this.equipmentList = []
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const mapped = []
|
||||||
|
leaseApplyDetailsList.forEach(detail => {
|
||||||
|
const detailTypeId = detail.typeId
|
||||||
|
console.log("detailTypeId:", detailTypeId)
|
||||||
|
// 检查 flattenTypeOptions 是否存在且有数据
|
||||||
|
if (!this.flattenTypeOptions || this.flattenTypeOptions.length === 0) {
|
||||||
|
console.warn('flattenTypeOptions 为空,无法查找 typeId')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 在扁平化的 options 中查找(第四级叶子)
|
||||||
|
const typeData = this.flattenTypeOptions.find(item => {
|
||||||
|
return String(item.typeId).trim() === String(detailTypeId).trim()
|
||||||
|
})
|
||||||
|
|
||||||
|
if (typeData) {
|
||||||
|
const item = {
|
||||||
|
...typeData,
|
||||||
|
// 保留原来的字段名,注意数值/字符串处理按需求调整
|
||||||
|
preNum: 0,
|
||||||
|
// 优先使用 outNum,如果没有用 preNum
|
||||||
|
outNum: detail.outNum != null ? detail.outNum : 0,
|
||||||
|
parentId: detail.parentId || this.parentId || undefined,
|
||||||
|
// 后端可能字段名为 maCodeVoList / maCodeList / maCode,保底取空数组
|
||||||
|
maCodeList: detail.maCodeList || detail.maCodeVoList || detail.maCode || [],
|
||||||
|
// 后端字段可能是 menageType 或 manageType,统一放到 manageType 字段(字符串 '0' / '1')
|
||||||
|
manageType: String(detail.menageType != null ? detail.menageType : (detail.manageType != null ? detail.manageType : typeData.manageType || '1')),
|
||||||
|
remark: detail.remark || '',
|
||||||
|
// 保留一些后端明细字段以便后续使用
|
||||||
|
_rawDetail: detail
|
||||||
|
}
|
||||||
|
mapped.push(item)
|
||||||
|
} else {
|
||||||
|
// 若未在类型树中找到对应的 typeId,依然把它放进列表(避免丢数据),并打印警告
|
||||||
|
console.warn(`未在类型树中找到 typeId=${detailTypeId},已将该明细以最小结构加入 equipmentList`)
|
||||||
|
const item = {
|
||||||
|
typeId: detailTypeId,
|
||||||
|
typeName: detail.typeName || '未知规格',
|
||||||
|
maTypeName: detail.maTypeName || '',
|
||||||
|
unitName: detail.unitName || '',
|
||||||
|
storageNum: detail.storageNum || 0,
|
||||||
|
preNum: detail.preNum || 0,
|
||||||
|
outNum: detail.outNum != null ? detail.outNum : (detail.preNum != null ? detail.preNum : 0),
|
||||||
|
parentId: detail.parentId || this.parentId || undefined,
|
||||||
|
maCodeList: detail.maCodeList || detail.maCodeVoList || [],
|
||||||
|
manageType: String(detail.menageType != null ? detail.menageType : (detail.manageType != null ? detail.manageType : '1')),
|
||||||
|
remark: detail.remark || '',
|
||||||
|
_rawDetail: detail
|
||||||
|
}
|
||||||
|
mapped.push(item)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 按照你现有的添加逻辑,放到 equipmentList(这里直接替换)
|
||||||
|
this.equipmentList = mapped
|
||||||
|
|
||||||
|
// 如果有 parentId,保留第一个明细的 parentId
|
||||||
|
if (mapped.length > 0) {
|
||||||
|
this.parentId = mapped[0].parentId
|
||||||
|
}
|
||||||
|
|
||||||
|
// 维护 deviceType 备份(反显已经选中的类型)
|
||||||
|
this.deviceType = this.equipmentList.map(i => i.typeId)
|
||||||
|
},
|
||||||
|
// 获取协议id
|
||||||
|
async getAgreementId() {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
getAgreement({
|
||||||
|
teamId: this.maForm.teamId,
|
||||||
|
proId: this.maForm.proId
|
||||||
|
}).then(res => {
|
||||||
|
console.log('🚀 ~ getAgreementId ~ res:', res)
|
||||||
|
if (!res.data || !Array.isArray(res.data)) {
|
||||||
|
this.agreementId = []
|
||||||
|
this.equipmentTypeList = []
|
||||||
|
resolve([])
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.agreementId = res.data
|
||||||
|
// 等待 equipmentType 完成
|
||||||
|
this.equipmentType().then(() => {
|
||||||
|
resolve(res.data)
|
||||||
|
}).catch(reject)
|
||||||
|
}).catch(reject)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/** 转换菜单数据结构 */
|
/** 转换菜单数据结构 */
|
||||||
|
|
@ -445,7 +600,6 @@ export default {
|
||||||
console.log("xxxxxxxxxxxxxxxxxx", this.maForm.projectId)
|
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)
|
|
||||||
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')
|
||||||
|
|
@ -486,8 +640,6 @@ export default {
|
||||||
|
|
||||||
changeTeam(e) {
|
changeTeam(e) {
|
||||||
console.log('🚀 ~ changeTeam ~ e:', e)
|
console.log('🚀 ~ changeTeam ~ e:', e)
|
||||||
// this.maForm.projectId = null
|
|
||||||
// this.maForm.projectName = null
|
|
||||||
// 查找对应的teamName
|
// 查找对应的teamName
|
||||||
const team = this.uniteList.find(item => item.id === e)
|
const team = this.uniteList.find(item => item.id === e)
|
||||||
this.maForm.teamName = team ? team.teamName : ''
|
this.maForm.teamName = team ? team.teamName : ''
|
||||||
|
|
@ -512,28 +664,35 @@ export default {
|
||||||
/** 机具类型 */
|
/** 机具类型 */
|
||||||
equipmentType() {
|
equipmentType() {
|
||||||
const loading = this.$loading()
|
const loading = this.$loading()
|
||||||
equipmentTypeTree({
|
// 返回 promise 以便外部 await
|
||||||
agreementIdList: this.agreementId,
|
return new Promise((resolve, reject) => {
|
||||||
proId: this.maForm.proId,
|
equipmentTypeTree({
|
||||||
// teamId: this.maForm.teamId,
|
agreementIdList: this.agreementId,
|
||||||
teamName: this.maForm.teamName
|
proId: this.maForm.proId,
|
||||||
})
|
// teamId: this.maForm.teamId,
|
||||||
.then(response => {
|
teamName: this.maForm.teamName
|
||||||
this.equipmentTypeList = response.data
|
})
|
||||||
// 处理并扁平化所有类型数据
|
.then(response => {
|
||||||
this.flattenTypeOptions = this.processTypeData(response.data)
|
this.equipmentTypeList = response.data || []
|
||||||
debugger
|
// 处理并扁平化所有类型数据
|
||||||
// 初始显示所有选项
|
this.flattenTypeOptions = this.processTypeData(this.equipmentTypeList || [])
|
||||||
this.filteredOptions = [...this.flattenTypeOptions]
|
// 初始显示所有选项
|
||||||
|
this.filteredOptions = [...this.flattenTypeOptions]
|
||||||
|
|
||||||
// 反显选中数据
|
// 反显选中数据(如果已有 equipmentList)
|
||||||
if (this.equipmentList.length > 0) {
|
if (this.equipmentList.length > 0) {
|
||||||
this.deviceType = this.equipmentList.map(item => item.typeId)
|
this.deviceType = this.equipmentList.map(item => item.typeId)
|
||||||
}
|
}
|
||||||
})
|
resolve(this.flattenTypeOptions)
|
||||||
.finally(() => {
|
})
|
||||||
loading.close()
|
.catch(err => {
|
||||||
})
|
console.error('equipmentType error:', err)
|
||||||
|
reject(err)
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
loading.close()
|
||||||
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 处理类型数据
|
// 处理类型数据
|
||||||
processTypeData(data) {
|
processTypeData(data) {
|
||||||
|
|
@ -655,23 +814,6 @@ export default {
|
||||||
// this.loading = false;
|
// this.loading = false;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//单位,工程树结构数据获取父
|
|
||||||
treeParentsById(list, id) {
|
|
||||||
for (let i in list) {
|
|
||||||
if (list[i].id == id) {
|
|
||||||
//查询到就返回该数组对象的value
|
|
||||||
return [list[i].id]
|
|
||||||
}
|
|
||||||
if (list[i].children) {
|
|
||||||
let node = this.treeParentsById(list[i].children, id)
|
|
||||||
if (node !== undefined) {
|
|
||||||
//查询到把父节把父节点加到数组前面
|
|
||||||
node.unshift(list[i].id)
|
|
||||||
return node
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map(item => item.roleId)
|
this.ids = selection.map(item => item.roleId)
|
||||||
|
|
@ -698,7 +840,6 @@ export default {
|
||||||
const res = await getListsByConfigId(params)
|
const res = await getListsByConfigId(params)
|
||||||
console.log('🚀 ~ standardConfigChange ~ res:', res)
|
console.log('🚀 ~ standardConfigChange ~ res:', res)
|
||||||
|
|
||||||
// this.equipmentList.unshift(...res.data)
|
|
||||||
res.data.forEach(newItem => {
|
res.data.forEach(newItem => {
|
||||||
const existingItem = this.equipmentList.find(item => item.typeId === newItem.typeId)
|
const existingItem = this.equipmentList.find(item => item.typeId === newItem.typeId)
|
||||||
if (existingItem) {
|
if (existingItem) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue