优化
This commit is contained in:
+16
-15
@@ -11,10 +11,10 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="work-content" :class="{ 'evidence-active': activeStage === 'evidence' && loadingStageReady }">
|
||||
<view class="work-content" :class="{ 'evidence-active': activeStage === 'evidence' }">
|
||||
<view class="box-select-wrap">
|
||||
<button class="box-select-btn" @tap="toggleBoxDropdown">
|
||||
<text>集装箱号 {{ currentBox.currentContainerNo || '同步中' }} · 柜次号 {{ currentBox.cabinetNo || '同步中' }} · 订单 {{ currentBox.orderNo }}</text>
|
||||
<text class="box-select-summary">集装箱号 {{ currentBox.currentContainerNo || '同步中' }} · 柜次号 {{ currentBox.cabinetNo || '同步中' }} · 订单 {{ currentBox.orderNo }}</text>
|
||||
<text class="box-chevron" :class="{ open: boxDropdownOpen }">▼</text>
|
||||
</button>
|
||||
<view v-if="boxDropdownOpen" class="box-dropdown">
|
||||
@@ -33,10 +33,8 @@
|
||||
</view>
|
||||
<view class="stage-switch" role="tablist" aria-label="作业阶段">
|
||||
<button class="stage-tab" :class="{ active: activeStage === 'picking' }" role="tab" :aria-selected="activeStage === 'picking'" @tap="selectStage('picking')">拣货作业</button>
|
||||
<button class="stage-tab" :class="{ active: activeStage === 'evidence' }" :disabled="!loadingStageReady" role="tab" :aria-selected="activeStage === 'evidence'" @tap="selectStage('evidence')">装柜取证</button>
|
||||
<button class="stage-tab" :class="{ active: activeStage === 'evidence' }" role="tab" :aria-selected="activeStage === 'evidence'" @tap="selectStage('evidence')">装柜取证</button>
|
||||
</view>
|
||||
<view v-if="!loadingStageReady" class="evidence-stage-hint" role="status">请先处理并提交全部待拣明细;任务增量更新后,已拍证据会按当前柜次保留。</view>
|
||||
|
||||
<view v-if="activeStage === 'picking'" class="picking-stage">
|
||||
<view class="scan-section">
|
||||
<view class="scan-row">
|
||||
@@ -124,7 +122,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="activeStage === 'evidence' && loadingStageReady" class="loading-evidence-section">
|
||||
<view v-if="activeStage === 'evidence'" class="loading-evidence-section">
|
||||
<view class="section-heading-row">
|
||||
<view><text class="section-title">装柜证据</text><text class="section-subtitle">空仓、半仓、满仓、锁仓及带锁码照</text></view>
|
||||
<text class="sync-state" :class="remoteSyncState.tone">{{ remoteSyncState.label }}</text>
|
||||
@@ -624,10 +622,6 @@
|
||||
}
|
||||
},
|
||||
selectStage(stage) {
|
||||
if (stage === 'evidence' && !this.loadingStageReady) {
|
||||
this.showToast('请先完成新增待拣明细', 'warning')
|
||||
return
|
||||
}
|
||||
this.activeStage = stage
|
||||
},
|
||||
debugEvidence(event, payload = {}) {
|
||||
@@ -1160,7 +1154,6 @@
|
||||
const completedBoxes = { ...this.completedBoxes }
|
||||
delete completedBoxes[this.currentBoxIndex]
|
||||
this.completedBoxes = completedBoxes
|
||||
this.activeStage = 'picking'
|
||||
this.completionSummary = { picked: 0, partial: 0, skipped: 0, autoSkipped: 0 }
|
||||
}
|
||||
const addedItemIds = this.currentBox.items.map((item) => String(item.id)).filter((id) => !previousItemIds.has(id))
|
||||
@@ -1255,8 +1248,7 @@
|
||||
const next = { evidenceType: slot.type, fileName: path.split('/').pop() || path, localPath: path, uploadStatus: 'PENDING' }
|
||||
this.evidenceFiles = { ...this.evidenceFiles, [slot.type]: [...(this.evidenceFiles[slot.type] || []), next] }
|
||||
this.rememberEvidenceDraft(identity)
|
||||
if (this.loadingStageReady) this.queueEvidenceUpload(slot.type, path)
|
||||
else this.showToast('照片已暂存,装柜状态同步后自动上传', 'success')
|
||||
this.queueEvidenceUpload(slot.type, path)
|
||||
}, fail: (error) => {
|
||||
this.cameraPicking = false
|
||||
if (!this.isEvidenceContextActive(contextId, identity)) return
|
||||
@@ -1265,7 +1257,6 @@
|
||||
} })
|
||||
},
|
||||
async queueEvidenceUpload(type, path) {
|
||||
if (!this.loadingStageReady) return
|
||||
if (!this.evidenceIdentity?.inboundId || !isRemoteReady(this.evidenceIdentity.inboundId)) { this.showToast('当前会话未连接服务端,证据保留本地', 'warning'); return }
|
||||
const contextId = this.evidenceContextId
|
||||
const identity = { ...this.evidenceIdentity }
|
||||
@@ -1285,6 +1276,11 @@
|
||||
this.showToast('带锁码照已上传,请输入封签号并点击保存封签', 'success')
|
||||
return
|
||||
}
|
||||
if (!this.loadingStageReady) {
|
||||
this.rememberEvidenceDraft(identity)
|
||||
this.showToast('照片已上传,拣货完成后自动保存', 'success')
|
||||
return
|
||||
}
|
||||
await this.saveEvidence(type, null, path)
|
||||
},
|
||||
async flushPendingEvidence() {
|
||||
@@ -1298,7 +1294,7 @@
|
||||
}
|
||||
},
|
||||
async retryEvidence(type) {
|
||||
if (!this.requireEvidenceStage()) return
|
||||
if (!this.requireEvidenceCapture()) return
|
||||
const item = this.evidenceQueueEntry(type)
|
||||
const contextId = this.evidenceContextId
|
||||
const identity = { ...this.evidenceIdentity }
|
||||
@@ -1316,6 +1312,11 @@
|
||||
this.showToast('带锁码照已上传,请输入封签号并点击保存封签', 'success')
|
||||
return
|
||||
}
|
||||
if (!this.loadingStageReady) {
|
||||
this.rememberEvidenceDraft(identity)
|
||||
this.showToast('照片已上传,拣货完成后自动保存', 'success')
|
||||
return
|
||||
}
|
||||
await this.saveEvidence(type)
|
||||
},
|
||||
async saveEvidence(type, operationId = null, localPath = null) {
|
||||
|
||||
Reference in New Issue
Block a user