feat: 拆包创建单返回货主时锁定货主,不可移除和编辑

This commit is contained in:
liufumingren 2026-08-24 22:22:13 +08:00
parent 6d2df0f0d0
commit 8e808db6ce

View File

@ -69,7 +69,7 @@
size="small"
class="full-width"
:disabled="storeLocked"
:title="storeLocked ? '货主已锁定(原单退回或已选择商品)' : '选择货主'"
:title="storeLocked ? '货主已锁定(原单退回、创建单返回或已选择商品)' : '选择货主'"
@change="handleStoreChange"
>
<el-option v-for="store in storeOptions" :key="store.value" :label="store.label" :value="store.value" />
@ -796,8 +796,8 @@ async function handleCreate(barcode?: string) {
if (recordStoreId != null) {
addStoreCandidate(recordStoreId, data.store_remark || '')
}
// 原单退回的拆包单锁定货主,不允许切换
storeLocked.value = Boolean(data.is_original_return)
// 原单退回或 create 返回了货主时锁定货主,不允许移除和编辑
storeLocked.value = Boolean(data.is_original_return) || recordStoreId != null
ElMessage.success(`拆包单创建成功,ID ${data.id}`)
// 保留输入的运单号显示在锁定的输入框中(创建后运单号置灰不可改)
lastScannedBarcode.value = ''