| | |
| | | > |
| | | <el-select |
| | | v-model="form.locationType" |
| | | placeholder="璇峰厛閫夋嫨浠撳簱" |
| | | placeholder="鑷姩鑾峰彇浠撳簱鍖哄煙" |
| | | clearable |
| | | filterable |
| | | @change="handleLocationChange" |
| | | style="width: 100%" |
| | | :loading="locationLoading" |
| | | size="medium" |
| | | :disabled="true" |
| | | > |
| | | <el-option |
| | | v-for="item in locationTypes" |
| | |
| | | }); |
| | | }, |
| | | |
| | | 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; |
| | | }); |
| | | }, |
| | | // 鑾峰彇搴撳瓨缁熻 |
| | | fetchStockStatistics(orderNo) { |
| | | if (!orderNo) { |
| | |
| | | this.barcode = ""; |
| | | this.materials = []; |
| | | this.error = ""; |
| | | this.fetchLocationByWarehouse(this.form.warehouseType); |
| | | }, |
| | | |
| | | // 鍖哄煙鍒囨崲浜嬩欢 |