| | |
| | | <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> |
| | |
| | | } |
| | | }, |
| | | |
| | | 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) { |
| | |
| | | this.barcode = ''; |
| | | this.materials = []; |
| | | this.error = ''; |
| | | this.fetchLocationByWarehouse(this.form.warehouseType); |
| | | }, |
| | | |
| | | // åºå忢äºä»¶ |