|
|
|
@ -138,22 +138,16 @@ |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 选择站点 - rqrq --> |
|
|
|
<!-- 站点只允许自动分配,选了区域也不能改具体位置 - rqrq --> |
|
|
|
<div class="input-group"> |
|
|
|
<label class="input-label">选择站点</label> |
|
|
|
<el-select |
|
|
|
v-model="selectedStation" |
|
|
|
placeholder="请选择站点" |
|
|
|
placeholder="自动分配" |
|
|
|
style="width: 100%;" |
|
|
|
:disabled="!selectedArea" |
|
|
|
disabled |
|
|
|
> |
|
|
|
<el-option label="自动分配" value=""></el-option> |
|
|
|
<el-option |
|
|
|
v-for="station in stationOptions" |
|
|
|
:key="station.stationId" |
|
|
|
:label="`${station.stationId} (${station.stationCode})`" |
|
|
|
:value="station.stationCode" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -180,8 +174,7 @@ import { |
|
|
|
getPalletList |
|
|
|
} from '../../../api/haianAutoWarehouse/callOut' |
|
|
|
import { |
|
|
|
getAreaOptionsForChange, |
|
|
|
getStationsByArea |
|
|
|
getAreaOptionsForChange |
|
|
|
} from '../../../api/haianAutoWarehouse/palletChangeStation' |
|
|
|
import { |
|
|
|
callOutToStation |
|
|
|
@ -383,7 +376,8 @@ export default { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
// 加载区域选项并打开弹窗 - rqrq |
|
|
|
// 打开弹窗前先把站点锁回自动分配,避免上次选择残留 - rqrq |
|
|
|
this.selectedStation = ''; |
|
|
|
this.loadAreaOptions(); |
|
|
|
this.locationModalVisible = true; |
|
|
|
}, |
|
|
|
@ -394,9 +388,13 @@ export default { |
|
|
|
site: this.site |
|
|
|
}).then(({ data }) => { |
|
|
|
if (data.code === 0) { |
|
|
|
// 过滤掉Z199区域,Call料到指定位置不允许选择Z199 - rqrq |
|
|
|
// 立库取货不能叫到 Z199,也不能叫到边库暂存区 A11 - rqrq |
|
|
|
const allOptions = data.rows || []; |
|
|
|
this.areaOptions = allOptions.filter(area => area.areaId !== 'Z199'); |
|
|
|
this.areaOptions = allOptions.filter(area => area && area.areaId !== 'Z199' && area.areaId !== 'A11'); |
|
|
|
if (this.selectedArea === 'Z199' || this.selectedArea === 'A11') { |
|
|
|
this.selectedArea = ''; |
|
|
|
} |
|
|
|
this.selectedStation = ''; |
|
|
|
} else { |
|
|
|
this.areaOptions = []; |
|
|
|
this.$alert('获取区域选项失败', '错误', { |
|
|
|
@ -409,31 +407,10 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
// 区域变化 - rqrq |
|
|
|
handleAreaChange(areaId) { |
|
|
|
// 选了区域后站点固定自动分配,不再加载具体位置 - rqrq |
|
|
|
handleAreaChange() { |
|
|
|
this.selectedStation = ''; |
|
|
|
this.stationOptions = []; |
|
|
|
|
|
|
|
if (!areaId) { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
getStationsByArea({ |
|
|
|
site: this.site, |
|
|
|
areaId: areaId |
|
|
|
}).then(({ data }) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.stationOptions = data.rows || []; |
|
|
|
} else { |
|
|
|
this.stationOptions = []; |
|
|
|
this.$alert('获取站点选项失败', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}); |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
console.error('获取站点选项失败:', error); |
|
|
|
this.stationOptions = []; |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
// 确认位置选择 - rqrq |
|
|
|
@ -460,7 +437,8 @@ export default { |
|
|
|
qty: this.selectedPallet.qty, |
|
|
|
batchNo: this.selectedPallet.batchNo, |
|
|
|
targetArea: this.selectedArea, |
|
|
|
targetStation: this.selectedStation || '', // 空表示自动分配 - rqrq |
|
|
|
// 立库取货不接收具体站点,空值由后端按区域空闲点自动分配 - rqrq |
|
|
|
targetStation: '', |
|
|
|
username: this.username |
|
|
|
}; |
|
|
|
|
|
|
|
|