haoyahui
2023-11-13 6843b10472482b305b5580cc2f5cdbb97fb9a203
admin-web/src/views/stock/procure/purchaseOrder/edit.vue
@@ -224,7 +224,6 @@
        procureGoods: [],
      },
      goodsItem: {
        whFormProcureId: '', // 采购单ID
        baseCategoryIds: '', // 分类编号数组
        baseCategoryId: '', // 分类编号
        baseGoodsTemplateId: '', // 物品模版编号
@@ -288,13 +287,13 @@
        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)));
      }