石广澎
2023-12-12 fa3a13b43cdcd3bcc42abae4d9c0a67e48ebea41
admin-web/src/views/departmentitem/itemdis/distribution/edit.vue
@@ -61,6 +61,7 @@
                    :options="categoryOptions"
                    :props="{ value: 'id',emitPath: false }"
                    :show-all-levels="false"
                    filterable
                    clearable
                    @change="categoryChange($event, goodsIndex)"
                    style="width: 100%"
@@ -101,8 +102,8 @@
                <el-select
                    v-model="goodsItem.modelsIds"
                    multiple
                    :placeholder="goodsItem.baseCategoryId?'请选择规格型号':'请先选择物品名称'"
                    :disabled="!goodsItem.baseCategoryId"
                    :placeholder="goodsItem.baseGoodsTemplateId?'请选择规格型号':'请先选择物品名称'"
                    :disabled="!goodsItem.baseGoodsTemplateId"
                    @change="modelChange($event, goodsIndex)"
                    @remove-tag="modelRemoveTag($event, goodsIndex)"
                    style="width: 100%"
@@ -363,7 +364,6 @@
        uploadUrl: getUploadUrl(), // 上传路径
        multiple: true, // 是否支持批量上传
        disabled: false, // 是否禁用
        type: 'picture', // text/picture
      },
    };
  },
@@ -384,18 +384,12 @@
      this.getgoodsModel();
    },
    // 获取入库仓库列表
    // 获取部门列表
    getdeptmentList() {
      departmentListAll({tenantId: this.userInfo.tenantId})
          .then((res) => {
            this.departmentOptions = res;
            if (!this.setting.id && res.length) {
              this.formData.transferGoods.push(JSON.parse(JSON.stringify(this.goodsItem)));
            }
            if (this.departmentOptions.length && !this.formData.warehouseId) {
              // 默认选中第一个仓库
              this.formData.warehouseId = this.departmentOptions[0].id;
            }
            this.formData.transferGoods.push(JSON.parse(JSON.stringify(this.goodsItem)));
          })
          .catch((err) => {
            console.log('err', err);