Browse Source

更新

master
常熟吴彦祖 1 month ago
parent
commit
ede140689b
  1. 48
      src/views/modules/haianAutoWarehouse/haianPalletSpecialEdit.vue

48
src/views/modules/haianAutoWarehouse/haianPalletSpecialEdit.vue

@ -52,7 +52,7 @@
</div> </div>
<div class="form-row"> <div class="form-row">
<label class="input-label">所在位置</label> <label class="input-label">所在位置</label>
<!-- 立库用手输货架或点位;其它区域改成该区域全部站点下拉 - rqrq -->
<!-- 立库直接填写位置;其它区域展示站点候选并允许手输位置,空值仍由保存逻辑统一置空 - rqrq -->
<el-input <el-input
v-if="isStockArea" v-if="isStockArea"
v-model="form.locationCode" v-model="form.locationCode"
@ -61,23 +61,16 @@
clearable clearable
:disabled="pageBusy" :disabled="pageBusy"
/> />
<el-select
<el-autocomplete
v-else v-else
v-model="form.locationCode" v-model="form.locationCode"
:placeholder="stationLoading ? '站点加载中' : '请选择所在位置'"
filterable
:placeholder="stationLoading ? '站点加载中,也可手动填写' : '选择站点或手动填写位置'"
:fetch-suggestions="queryStationSuggestions"
:trigger-on-focus="true"
clearable clearable
style="width: 100%;" style="width: 100%;"
:loading="stationLoading"
:disabled="pageBusy" :disabled="pageBusy"
>
<el-option
v-for="station in stationOptions"
:key="station.locationCode"
:label="station.locationCode"
:value="station.locationCode"
></el-option>
</el-select>
/>
</div> </div>
<div class="form-row"> <div class="form-row">
<label class="input-label">是否在货架</label> <label class="input-label">是否在货架</label>
@ -251,7 +244,7 @@ export default {
this.loadStations(true) this.loadStations(true)
} }
}, },
// 非立库区域拉取全部站点。keepCurrent为真时保留扫描回显的位置,清单里没有也补进下拉。加载中只转所在位置,不锁其它字段 - rqrq
// 非立库区域拉取全部站点。keepCurrent为真时保留扫描回显的位置,清单里没有也补进候选;失败时仍允许手输位置 - rqrq
loadStations(keepCurrent) { loadStations(keepCurrent) {
const areaId = this.form.areaId const areaId = this.form.areaId
const currentLocation = keepCurrent ? (this.form.locationCode || '').trim() : '' const currentLocation = keepCurrent ? (this.form.locationCode || '').trim() : ''
@ -277,7 +270,6 @@ export default {
rows.unshift({ locationCode: currentLocation, stationCode: currentLocation }) rows.unshift({ locationCode: currentLocation, stationCode: currentLocation })
} }
this.stationOptions = rows this.stationOptions = rows
this.form.locationCode = currentLocation
} else { } else {
this.stationOptions = [] this.stationOptions = []
this.$alert((data && data.msg) || '查询区域站点失败', '错误', { confirmButtonText: '确定' }) this.$alert((data && data.msg) || '查询区域站点失败', '错误', { confirmButtonText: '确定' })
@ -293,6 +285,14 @@ export default {
} }
}) })
}, },
// 站点候选按当前输入过滤并交给输入框展示;返回value供点击回填,手输值无需命中清单也能保存 - rqrq
queryStationSuggestions (queryString, callback) {
const keyword = (queryString || '').trim().toLowerCase()
const suggestions = this.stationOptions
.filter(item => item && item.locationCode && (!keyword || item.locationCode.toLowerCase().includes(keyword)))
.map(item => ({ value: item.locationCode }))
callback(suggestions)
},
// 保存只要求已扫描栈板;位置留空时连同区域、货架点位置空,任务标记与货架选择空值按N提交 - rqrq // 保存只要求已扫描栈板;位置留空时连同区域、货架点位置空,任务标记与货架选择空值按N提交 - rqrq
handleSave() { handleSave() {
if (this.pageBusy || !this.scanned || !this.form.palletId) { if (this.pageBusy || !this.scanned || !this.form.palletId) {
@ -519,17 +519,29 @@ export default {
} }
.bottom-actions { .bottom-actions {
margin-top: 16px; margin-top: 16px;
/* 两个操作等宽同行,货架占用提示独占下一行,避免长按钮挤压保存按钮。- rqrq */
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 10px;
} }
.bottom-actions .danger { .bottom-actions .danger {
margin-top: 12px;
background: #F56C6C; background: #F56C6C;
} }
.bottom-actions .hint {
grid-column: 1 / -1;
margin-top: 0;
}
.action-btn { .action-btn {
width: 100%; width: 100%;
padding: 12px;
min-width: 0;
height: 48px;
box-sizing: border-box;
padding: 8px 4px;
border: none; border: none;
border-radius: 6px; border-radius: 6px;
font-size: 16px;
font-size: 15px;
line-height: 1.2;
white-space: nowrap;
color: white; color: white;
background: #17B3A3; background: #17B3A3;
} }

Loading…
Cancel
Save