This commit is contained in:
zlwu committed 2026-10-15 14:27:42 +08:00
1 parent b9d981d46b
commit ecde2ba07d
51 files changed
+12524 -10144

No files matched your search

+7
View File
@@ -99,3 +99,10 @@ export function fetchUnlinkSampleFreight(id: string, items: SampleFreightItem[])
showSuccessMessage: true
})
}
export function fetchDeleteSampleFreight(id: string) {
return request.del<{ id: string; deleted?: boolean; linkedSampleCount?: number }>({
url: `/web/admin/sample-freights/${id}`,
showSuccessMessage: true
})
}
@@ -2,7 +2,7 @@
<template>
<el-dialog
:model-value="modelValue"
title="取消运费"
:title="title"
width="720px"
class="dialog-form-layout"
align-center
@@ -12,7 +12,7 @@
:close-on-click-modal="false"
@update:model-value="emit('update:modelValue', $event)"
>
<p class="unlink-hint">勾选要取消运费的样本:</p>
<p class="unlink-hint">{{ hint }}</p>
<el-table
ref="tableRef"
:data="items"
@@ -57,13 +57,23 @@
freightId: string
}
const props = defineProps<{
modelValue: boolean
items: FreightUnlinkRow[]
/** 默认勾选的 rowKey 列表 */
defaultSelectedKeys?: string[]
submitting?: boolean
}>()
const props = withDefaults(
defineProps<{
modelValue: boolean
items: FreightUnlinkRow[]
/** 默认勾选的 rowKey 列表 */
defaultSelectedKeys?: string[]
submitting?: boolean
title?: string
hint?: string
emptyWarning?: string
}>(),
{
title: '取消运费',
hint: '勾选要取消运费的样本:',
emptyWarning: '请勾选要取消运费的样本'
}
)
const emit = defineEmits<{
'update:modelValue': [boolean]
@@ -97,7 +107,7 @@
function onConfirm() {
if (!selected.value.length) {
ElMessage.warning('请勾选要取消运费的样本')
ElMessage.warning(props.emptyWarning)
return
}
emit('confirm', selected.value)