heshaofeng
2026-02-05 6dbcd7df8e116cb83dbbd34d0acd6508f9b99991
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/extension/inbound/extend/StockTakeGroupPallet.vue
@@ -19,8 +19,8 @@
      <div class="location-section compact">
        <el-form :model="form" :rules="rules" ref="locationForm" class="compact-form">
          <el-form-item label="仓库区域" prop="locationType" class="location-select compact-item">
            <el-select v-model="form.locationType" placeholder="请先选择仓库" clearable filterable
              @change="handleLocationChange" style="width: 100%" :loading="locationLoading" size="medium">
            <el-select v-model="form.locationType" placeholder="自动获取仓库区域" clearable filterable
              @change="handleLocationChange" style="width: 100%" :loading="locationLoading" size="medium" :disabled="true">
              <el-option v-for="item in locationTypes" :key="item.locationType" :label="item.locationTypeDesc"
                :value="item.locationType" />
            </el-select>
@@ -412,6 +412,33 @@
      }
    },
    fetchLocationByWarehouse(warehouseCode) {
      if (!warehouseCode) {
        this.form.locationType = null;
        return;
      }
      this.locationLoading = true;
      http.post(`/api/InboundOrder/GetLocationType?code=${warehouseCode}`)
        .then(({ data }) => {
          if (data) {
            this.form.locationType = data.locationType || data;
            if (!this.locationTypes.find(item => item.locationType === this.form.locationType)) {
              this.locationTypes.push({
                locationType: this.form.locationType,
                locationTypeDesc: this.form.locationType
              });
            }
          }
        })
        .catch((err) => {
          console.error("获取仓库区域失败:", err);
          this.$message.error("获取仓库区域失败,请重试");
          this.form.locationType = null;
        })
        .finally(() => {
          this.locationLoading = false;
        });
    },
    async fetchStockStatistics(orderNo) {
      // å•据号为空时不查询
      if (!orderNo) {
@@ -860,6 +887,7 @@
      this.barcode = '';
      this.materials = [];
      this.error = '';
      this.fetchLocationByWarehouse(this.form.warehouseType);
    },
    
    // åŒºåŸŸåˆ‡æ¢äº‹ä»¶