|
|
|
@ -52,19 +52,10 @@ |
|
|
|
</div> |
|
|
|
<div class="form-row"> |
|
|
|
<label class="input-label">所在位置</label> |
|
|
|
<!-- 立库直接填写位置;其它区域展示站点候选并允许手输位置,空值仍由保存逻辑统一置空 - rqrq --> |
|
|
|
<el-input |
|
|
|
v-if="isStockArea" |
|
|
|
v-model="form.locationCode" |
|
|
|
placeholder="请输入所在位置" |
|
|
|
class="form-input" |
|
|
|
clearable |
|
|
|
:disabled="pageBusy" |
|
|
|
/> |
|
|
|
<!-- 立库下拉由后端固定给4个手工分拣位;其它区域给地面站点。两边都允许手输,空值仍由保存逻辑置空 - rqrq --> |
|
|
|
<el-autocomplete |
|
|
|
v-else |
|
|
|
v-model="form.locationCode" |
|
|
|
:placeholder="stationLoading ? '站点加载中,也可手动填写' : '选择站点或手动填写位置'" |
|
|
|
:placeholder="stationLoading ? '位置加载中,也可手动填写' : (isStockArea ? '选择分拣位或手动填写位置' : '选择站点或手动填写位置')" |
|
|
|
:fetch-suggestions="queryStationSuggestions" |
|
|
|
:trigger-on-focus="true" |
|
|
|
clearable |
|
|
|
@ -146,7 +137,7 @@ export default { |
|
|
|
pageBusy () { |
|
|
|
return this.scanLoading || this.saveLoading || this.removeLoading |
|
|
|
}, |
|
|
|
// 立库区域所在位置用手输,其它区域用站点下拉。标记来自扫描结果里的stockArea - rqrq |
|
|
|
// 立库区域位置下拉固定为手工分拣位,是否在货架只对立库开放。标记来自扫描结果里的stockArea - rqrq |
|
|
|
isStockArea () { |
|
|
|
const area = (this.areaOptions || []).find(item => item && item.areaId === this.form.areaId) |
|
|
|
return !!(area && area.stockArea) |
|
|
|
@ -191,11 +182,11 @@ export default { |
|
|
|
} |
|
|
|
return area.areaDesc |
|
|
|
}, |
|
|
|
// 换成立库时保留输入框里的位置,是否在货架可再选;换成其它区域时固定为否并清空位置,再拉该区域全部站点 - rqrq |
|
|
|
// 换成立库时保留当前位置并拉取固定分拣位;换成其它区域时固定为否并清空位置,再拉该区域全部站点 - rqrq |
|
|
|
handleAreaChange () { |
|
|
|
if (this.isStockArea) { |
|
|
|
this.stationOptions = [] |
|
|
|
this.form.batchWcsFlag = null |
|
|
|
this.loadStations(true) |
|
|
|
return |
|
|
|
} |
|
|
|
this.form.onShelfFlag = 'N' |
|
|
|
@ -261,18 +252,19 @@ export default { |
|
|
|
this.palletCode = this.form.palletId |
|
|
|
this.scanned = true |
|
|
|
if (this.isStockArea) { |
|
|
|
this.stationOptions = [] |
|
|
|
// 立库位置候选是后端固定的4个分拣位,保留扫描回显的货架点位 - rqrq |
|
|
|
this.loadStations(true) |
|
|
|
} else { |
|
|
|
// 非立库没有货架占用,即使原来wcs_location有值也按否回显,并且下拉禁用 - rqrq |
|
|
|
this.form.onShelfFlag = 'N' |
|
|
|
this.loadStations(true) |
|
|
|
} |
|
|
|
}, |
|
|
|
// 非立库区域拉取全部站点。keepCurrent为真时保留扫描回显的位置,清单里没有也补进候选;失败时仍允许手输位置 - rqrq |
|
|
|
// 按当前区域拉位置候选。立库拿固定分拣位,其它区域拿地面站点;keepCurrent为真时,清单里没有的当前位置也补进候选,失败仍允许手输 - rqrq |
|
|
|
loadStations (keepCurrent) { |
|
|
|
const areaId = this.form.areaId |
|
|
|
const currentLocation = keepCurrent ? (this.form.locationCode || '').trim() : '' |
|
|
|
if (!areaId || this.isStockArea) { |
|
|
|
if (!areaId) { |
|
|
|
this.stationOptions = [] |
|
|
|
this.stationLoading = false |
|
|
|
return |
|
|
|
|