This commit is contained in:
2026-10-19 16:40:51 +08:00
parent 54764156bf
commit 53cb68a8bc
7 changed files with 152 additions and 28 deletions
+4 -2
View File
@@ -2,6 +2,7 @@
<view v-if="user" class="page-shell dropship-task-page">
<PortalHeader title="一件代发" :user="user" :fallback-url="'/pages/home/home'" />
<view class="content">
<view v-if="palletNo" class="state">继续装入托盘 {{ palletNo }} · 选择其他票,或进入后直接扫描其他客户箱码</view>
<view class="search-card">
<ScanTargetInput v-model="keyword" name="taskKeyword" label="入仓码查询" placeholder="扫描或输入入仓码" :active="true" @submit="loadTasks" />
<button class="primary-button search-button" :disabled="loading" @tap="loadTasks">{{ loading ? '查询中…' : '查询任务' }}</button>
@@ -38,7 +39,8 @@
export default {
components: { PortalHeader, ScanTargetInput },
data() { return { user: session.currentUser, keyword: '', tasks: [], loading: false, error: '' } },
data() { return { user: session.currentUser, keyword: '', tasks: [], loading: false, error: '', palletNo: '' } },
onLoad(options) { this.palletNo = String(options.palletNo || '') },
onShow() { if (!requireSession()) return; this.user = session.currentUser; this.loadTasks() },
methods: {
statusLabel(status) { return status === 'CLAIMED' ? '作业中' : '待领取' },
@@ -54,7 +56,7 @@
catch (error) { this.tasks = []; this.error = formatApiError(error, '一件代发入库任务加载失败') }
finally { this.loading = false }
},
openTask(task) { uni.navigateTo({ url: `/pages/dropship-palletization/dropship-palletization?taskId=${encodeURIComponent(task.taskId)}&warehouseId=${encodeURIComponent(task.warehouseId)}` }) }
openTask(task) { uni.navigateTo({ url: `/pages/dropship-palletization/dropship-palletization?taskId=${encodeURIComponent(task.taskId)}&warehouseId=${encodeURIComponent(task.warehouseId)}&palletNo=${encodeURIComponent(this.palletNo)}` }) }
}
}
</script>