Compare commits
No commits in common. "82c280e0dcb851cbe28e245ada64c7a4f5f6cece" and "5eecfda9fac27578c02bb527ddce314aa092977d" have entirely different histories.
82c280e0dc
...
5eecfda9fa
@ -570,53 +570,6 @@ export function returnUnpackDelete(data: ReturnUnpackDeleteParams): Promise<any>
|
|||||||
} as any)
|
} as any)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ============ returnUnpack.forceRecord ============
|
|
||||||
|
|
||||||
/** returnUnpack.forceRecord 请求参数 */
|
|
||||||
export type ReturnUnpackForceRecordParams = {
|
|
||||||
/** 拆包单ID(必填) */
|
|
||||||
id: number
|
|
||||||
}
|
|
||||||
|
|
||||||
/** returnUnpack.forceRecord 响应 */
|
|
||||||
export type ReturnUnpackForceRecordResponse = {
|
|
||||||
/** 拆包单ID */
|
|
||||||
unpack_id: number
|
|
||||||
/** 录制电脑ID(wms_print_computer.id,is_recording=true) */
|
|
||||||
computer_id: number
|
|
||||||
/** 打印服务强制录制接口地址(POST {printService.url}/record/force) */
|
|
||||||
print_service_url: string
|
|
||||||
/** 推送给打印服务的请求体({ unpack_id }) */
|
|
||||||
print_service_request: { unpack_id: number }
|
|
||||||
/** 打印服务响应(status/headers/data) */
|
|
||||||
print_service_response?: {
|
|
||||||
status: number
|
|
||||||
headers: Record<string, unknown>
|
|
||||||
data: unknown
|
|
||||||
} | null
|
|
||||||
/** 打印服务通知异常信息(推送失败时返回) */
|
|
||||||
print_service_error?: string | null
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* returnUnpack.forceRecord:强制重新录制拆包视频。
|
|
||||||
* 校验仓库录制电脑在线后,将视频记录(wms_return_unpack_video)重置为 created 并清空 video_url,
|
|
||||||
* 再向打印服务 /record/force 推送 { unpack_id } 触发重新录制(仓库隔离,仅本仓库拆包单)。
|
|
||||||
*/
|
|
||||||
export function returnUnpackForceRecord(data: ReturnUnpackForceRecordParams): Promise<any> {
|
|
||||||
return request({
|
|
||||||
url: '/system',
|
|
||||||
method: 'post',
|
|
||||||
params: {
|
|
||||||
method: 'returnUnpack.forceRecord',
|
|
||||||
v,
|
|
||||||
timestamp: new Date().getTime()
|
|
||||||
},
|
|
||||||
data,
|
|
||||||
isSystemApi: true
|
|
||||||
} as any)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ============ 模块导出 ============
|
// ============ 模块导出 ============
|
||||||
|
|
||||||
export const returnUnpackModule = {
|
export const returnUnpackModule = {
|
||||||
@ -629,6 +582,5 @@ export const returnUnpackModule = {
|
|||||||
list: returnUnpackList,
|
list: returnUnpackList,
|
||||||
detailList: returnUnpackDetailList,
|
detailList: returnUnpackDetailList,
|
||||||
detail: returnUnpackDetail,
|
detail: returnUnpackDetail,
|
||||||
delete: returnUnpackDelete,
|
delete: returnUnpackDelete
|
||||||
forceRecord: returnUnpackForceRecord
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -88,19 +88,6 @@
|
|||||||
<span v-else>-</span>
|
<span v-else>-</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #column-operation="{ row }">
|
|
||||||
<div class="unpack-operation-actions">
|
|
||||||
<el-button
|
|
||||||
type="warning"
|
|
||||||
size="small"
|
|
||||||
link
|
|
||||||
@click.stop="openForceRecordDialog(row)"
|
|
||||||
>
|
|
||||||
强制录制
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template #empty>
|
<template #empty>
|
||||||
<div class="empty-tip">暂无退回拆包单数据</div>
|
<div class="empty-tip">暂无退回拆包单数据</div>
|
||||||
</template>
|
</template>
|
||||||
@ -281,13 +268,12 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, onMounted, reactive, ref } from 'vue'
|
import { computed, onMounted, reactive, ref } from 'vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import {
|
import {
|
||||||
returnUnpackList,
|
returnUnpackList,
|
||||||
returnUnpackDetail,
|
returnUnpackDetail,
|
||||||
returnUnpackDetailList,
|
returnUnpackDetailList,
|
||||||
returnUnpackVideoList,
|
returnUnpackVideoList,
|
||||||
returnUnpackForceRecord,
|
|
||||||
} from '@/api/returnunpack'
|
} from '@/api/returnunpack'
|
||||||
import { loadStores } from '@/api/index/index'
|
import { loadStores } from '@/api/index/index'
|
||||||
import { extractStoreListFromResponse, fillStoreScanFieldOptions } from '@/views/order/orderManagement/config/order-common-config'
|
import { extractStoreListFromResponse, fillStoreScanFieldOptions } from '@/views/order/orderManagement/config/order-common-config'
|
||||||
@ -358,7 +344,6 @@ function cameraIdsLabel(ids: any): string {
|
|||||||
|
|
||||||
function videoStatusLabel(val: any): string {
|
function videoStatusLabel(val: any): string {
|
||||||
const map: Record<string, string> = {
|
const map: Record<string, string> = {
|
||||||
created: '待录制',
|
|
||||||
recording: '录制中',
|
recording: '录制中',
|
||||||
completed: '录制完成',
|
completed: '录制完成',
|
||||||
failed: '录制失败',
|
failed: '录制失败',
|
||||||
@ -368,7 +353,6 @@ function videoStatusLabel(val: any): string {
|
|||||||
|
|
||||||
function videoStatusTagType(val: any): 'success' | 'warning' | 'info' | 'danger' {
|
function videoStatusTagType(val: any): 'success' | 'warning' | 'info' | 'danger' {
|
||||||
const map: Record<string, 'success' | 'warning' | 'info' | 'danger'> = {
|
const map: Record<string, 'success' | 'warning' | 'info' | 'danger'> = {
|
||||||
created: 'info',
|
|
||||||
recording: 'warning',
|
recording: 'warning',
|
||||||
completed: 'success',
|
completed: 'success',
|
||||||
failed: 'danger',
|
failed: 'danger',
|
||||||
@ -769,54 +753,6 @@ function handlePlayVideo(video: VideoItem) {
|
|||||||
playerVisible.value = true
|
playerVisible.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
// ==================== 强制录制 ====================
|
|
||||||
|
|
||||||
const forceRecordLoading = ref(false)
|
|
||||||
const forceRecordOperatingRow = ref<any>(null)
|
|
||||||
|
|
||||||
async function openForceRecordDialog(row: any) {
|
|
||||||
forceRecordOperatingRow.value = row
|
|
||||||
try {
|
|
||||||
await ElMessageBox.confirm(
|
|
||||||
`确定要强制重新录制拆包单 #${row.id}${row.unpack_no ? `(${row.unpack_no})` : ''} 的视频吗?将清空现有视频并推送到录制电脑重新录制。`,
|
|
||||||
'强制录制确认',
|
|
||||||
{
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning',
|
|
||||||
}
|
|
||||||
)
|
|
||||||
await doForceRecord()
|
|
||||||
} catch {
|
|
||||||
// 用户取消
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function doForceRecord() {
|
|
||||||
const row = forceRecordOperatingRow.value
|
|
||||||
if (!row?.id) return
|
|
||||||
forceRecordLoading.value = true
|
|
||||||
try {
|
|
||||||
const res: any = await returnUnpackForceRecord({ id: Number(row.id) })
|
|
||||||
if (isOk(res)) {
|
|
||||||
const data = res.data ?? res
|
|
||||||
ElMessage.success(`录制请求已提交,录制电脑ID:${data?.computer_id ?? '—'}`)
|
|
||||||
// 当前详情选中的是该单时刷新详情,否则刷新列表
|
|
||||||
if (selectedRecord.value?.id === row.id) {
|
|
||||||
handleViewDetail(selectedRecord.value)
|
|
||||||
} else {
|
|
||||||
fetchData()
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
ElMessage.error(res?.message || '强制录制请求失败')
|
|
||||||
}
|
|
||||||
} catch {
|
|
||||||
// 请求层已提示错误
|
|
||||||
} finally {
|
|
||||||
forceRecordLoading.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ==================== 货主选项加载 ====================
|
// ==================== 货主选项加载 ====================
|
||||||
|
|
||||||
async function loadStoreOptions() {
|
async function loadStoreOptions() {
|
||||||
|
|||||||
@ -76,7 +76,6 @@ export const returnUnpackColumns = [
|
|||||||
{ prop: 'has_video', label: '视频', width: '90' },
|
{ prop: 'has_video', label: '视频', width: '90' },
|
||||||
{ prop: 'video_enable', label: '视频可用', width: '100' },
|
{ prop: 'video_enable', label: '视频可用', width: '100' },
|
||||||
{ prop: 'videos', label: '视频状态', minWidth: '150' },
|
{ prop: 'videos', label: '视频状态', minWidth: '150' },
|
||||||
{ prop: 'operation', label: '操作', width: '110', fixed: 'right' },
|
|
||||||
{ prop: 'created_at', label: '创建时间', width: '170', sortable: 'custom' },
|
{ prop: 'created_at', label: '创建时间', width: '170', sortable: 'custom' },
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@ -237,14 +237,6 @@ export const availableFields: ReceivingScanFieldConfig[] = [
|
|||||||
hideOperator: true,
|
hideOperator: true,
|
||||||
defaultOperator: 'eq'
|
defaultOperator: 'eq'
|
||||||
}),
|
}),
|
||||||
receivingScanBasicField({
|
|
||||||
value: 'gross_weight',
|
|
||||||
label: '毛重(g)',
|
|
||||||
type: 'number',
|
|
||||||
placeholder: '请输入毛重(g)',
|
|
||||||
operators: numberConfig.operators,
|
|
||||||
defaultOperator: numberConfig.defaultOperator
|
|
||||||
}),
|
|
||||||
|
|
||||||
// ===== 流程状态 =====
|
// ===== 流程状态 =====
|
||||||
receivingScanWorkflowField({
|
receivingScanWorkflowField({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user