From 3b29bb0bd1967800fd51e7d300de51bf02fca5dc Mon Sep 17 00:00:00 2001 From: duxingchen Date: Thu, 6 Aug 2026 08:42:32 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E8=BE=91=E4=BA=A7=E5=93=81=E5=8A=A0La?= =?UTF-8?q?bel=20+=20=E4=BB=93=E5=BA=93=E6=A8=AA=E5=B9=85=E6=94=B9?= =?UTF-8?q?=E4=B8=BAwarehouse-transfer-banner=20+=20=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E6=A0=87=E9=A2=98=E8=81=94=E5=8A=A8isWarehouseTransfer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- track-uniapp/src/pages/scan/detail.vue | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/track-uniapp/src/pages/scan/detail.vue b/track-uniapp/src/pages/scan/detail.vue index 1de5181..830ebd3 100644 --- a/track-uniapp/src/pages/scan/detail.vue +++ b/track-uniapp/src/pages/scan/detail.vue @@ -31,9 +31,11 @@ - - - 📤 该产品在仓库中 — 点击此处转出派发给指定人员 + + + 📤 + 该产品在仓库中 — 点击此处转出并派发给指定人员 编辑产品 - - + 订单编号 + + 外部序列号 + - 🚀 发起首道工序 + {{ isWarehouseTransfer ? '📤 仓库转出派发' : '🚀 发起首道工序' }} 工序名称 * {{ firstForm.task_name || '请选择工序名称' }} 接收人 * @@ -145,7 +149,7 @@ export default { OVERALL_OPTIONS, loading: true, error: "", product: null, showStatusPicker: false, editProductVisible: false, editForm: { order_no: "", external_serial: "" }, editSaving: false, users: [], TASK_NAME_OPTIONS, - createFirstVisible: false, firstForm: { task_name: "", taskNameIdx: 0, assignee_id: "", assigneeLabel: "", assigneeIdx: 0, note: "", autoReceive: true }, firstSaving: false, + createFirstVisible: false, isWarehouseTransfer: false, firstForm: { task_name: "", taskNameIdx: 0, assignee_id: "", assigneeLabel: "", assigneeIdx: 0, note: "", autoReceive: true }, firstSaving: false, recordPopup: { visible: false, task: null }, recordForm: { recordId: null, remark: "", images: [], pendingCount: 0 }, recordSaving: false, isUploading: false, currentUser: null, currentUserId: "", currentUsername: "", currentMode: "tree", processOptions: [], userOptions: [], @@ -182,8 +186,8 @@ export default { onTaskNameChange(e) { const idx = e.detail.value; this.firstForm.taskNameIdx = idx; this.firstForm.task_name = TASK_NAME_OPTIONS[idx]; }, onAssigneeChange(e) { const idx = e.detail.value; const u = this.users[idx]; if (u) { this.firstForm.assigneeIdx = idx; this.firstForm.assignee_id = u.username; this.firstForm.assigneeLabel = `${u.full_name} (${u.username})`; } }, - openCreateFirstTask() { this.firstForm = { task_name: TASK_NAME_OPTIONS[0], taskNameIdx: 0, assignee_id: this.users.length > 0 ? this.users[0].username : "", assigneeLabel: this.users.length > 0 ? `${this.users[0].full_name} (${this.users[0].username})` : "", assigneeIdx: 0, note: "", autoReceive: true }; this.createFirstVisible = true; }, - openCheckout() { this.openCreateFirstTask(); }, + openCreateFirstTask() { this.isWarehouseTransfer = false; this.firstForm = { task_name: TASK_NAME_OPTIONS[0], taskNameIdx: 0, assignee_id: this.users.length > 0 ? this.users[0].username : "", assigneeLabel: this.users.length > 0 ? `${this.users[0].full_name} (${this.users[0].username})` : "", assigneeIdx: 0, note: "", autoReceive: true }; this.createFirstVisible = true; }, + openWarehouseTransfer() { this.isWarehouseTransfer = true; this.openCreateFirstTask(); }, async doCreateFirstTask() { this.firstSaving = true; try { const task = await post("/tasks/", { product_id: this.product.id, task_name: this.firstForm.task_name, assignee_id: this.firstForm.assignee_id, notify_parent_on_complete: false, remark: this.firstForm.note.trim() || undefined }); if (this.firstForm.autoReceive) { try { const opId = this.currentUsername || this.currentUserId; await post(`/tasks/${task.id}/receive?operator_id=${encodeURIComponent(opId)}`, { remark: this.firstForm.note.trim() || undefined }); } catch {} } if (this.product.current_location_id === 'virtual_warehouse') { try { await patch(`/products/${this.product.id}`, { current_location_id: this.firstForm.assignee_id }); } catch {} } uni.showToast({ title: this.firstForm.autoReceive ? "已创建并接收" : "已创建", icon: "success" }); this.createFirstVisible = false; this.doQuery(this.product.serial_number); } catch {} finally { this.firstSaving = false; } }, openRecordPopup(task) { this.recordPopup = { visible: true, task }; this.recordForm = { recordId: null, remark: "", images: [], pendingCount: 0 }; this.isUploading = false; }, @@ -294,6 +298,8 @@ export default { .picker-placeholder { color: #9ca3af; } .picker-arrow { font-size: 12px; color: #9ca3af; margin-left: 8px; } .warehouse-hint { font-size: 13px; background: #ede9fe; color: #7c3aed; padding: 10px 14px; border-radius: 10px; margin: 8px 0; text-align: center; } -.wh-checkout-bar { font-size: 14px; font-weight: 700; background: #ede9fe; color: #7c3aed; padding: 14px; border-radius: 12px; text-align: center; margin-bottom: 12px; border: 2px dashed #a78bfa; } +.warehouse-transfer-banner { display: flex; align-items: center; gap: 12px; font-weight: 700; background: linear-gradient(135deg, #ede9fe, #dbeafe); color: #5b21b6; padding: 14px 16px; border-radius: 12px; margin-bottom: 12px; border: 2px dashed #a78bfa; } +.wt-icon { font-size: 24px; } +.wt-text { font-size: 14px; flex: 1; } .preview-hint { font-size: 12px; background: #f0fdf4; color: #16a34a; padding: 8px 10px; border-radius: 8px; margin: 6px 0; }