| | |
| | | procureGoods: [], |
| | | }, |
| | | goodsItem: { |
| | | whFormProcureId: '', // 采购单ID |
| | | baseCategoryIds: '', // 分类编号数组 |
| | | baseCategoryId: '', // 分类编号 |
| | | baseGoodsTemplateId: '', // 物品模版编号 |
| | |
| | | this.formData.procureTime = this.formData.procureTime.toString(); |
| | | this.formData.procureGoods.map((item, index) => { |
| | | // 根据子集ID拼接物品分类列表 |
| | | let pIds = this.findParentIds(this.categoryOptions, item.baseCategoryId); |
| | | item.baseCategoryIds = [...pIds, item.baseCategoryId]; |
| | | item.baseCategoryIds = this.findParentIds(this.categoryOptions, item.baseCategoryId); |
| | | this.$set(this.formData.procureGoods[index],'modelsIds',item.models.map((v) => v.baseGoodsModelsId)) |
| | | this.getgoodsTemplate(item.baseCategoryId, index); |
| | | this.getgoodsModel(item.baseGoodsTemplateId, index); |
| | | return item |
| | | }); |
| | | console.log('this.formData.procureGoods',this.formData.procureGoods) |
| | | } else { |
| | | this.formData.procureGoods.push(JSON.parse(JSON.stringify(this.goodsItem))); |
| | | } |