外部单号进入异动档自然键,圈档按 T-2 成熟封顶,当前归档可单独重解析。同批带上 Crane 禁整页刷新、ODM 白名单降级、排程抽屉与执行记录日期窗,以及 YAML 库存源下线。 Co-authored-by: Cursor <cursoragent@cursor.com>
84 lines
2.7 KiB
Vue
84 lines
2.7 KiB
Vue
<!--
|
||
features/chat/components/messages/TransferManualCloseDialog.vue
|
||
用途:人工关闭弹窗(原因必填;关闭后永久排除,历史保留);count>1 时按批量文案展示。
|
||
依赖:Element Plus ElDialog/ElInput/ElButton(2026-10-20:弹层内控件迁 EP)、
|
||
props(open/invoiceNo/count)、i18n chat.transfer.*。
|
||
逻辑:原因为空时确认按钮禁用;确认时 emit confirm(reason)。
|
||
弹层壳 2026-10-16 由原生 fixed 遮罩迁 EP el-dialog(视觉与交互不变:
|
||
禁 ESC/遮罩点击关闭与右上角 X,仅取消/确认按钮可关,防止误触关闭危险操作);
|
||
v-if+model-value=true 挂载即渲染(EP onMounted 对初值 true 同步置 rendered)。
|
||
-->
|
||
<script setup lang="ts">
|
||
import { ref, watch } from 'vue';
|
||
import { ElButton, ElDialog, ElInput } from 'element-plus';
|
||
import { transferDialogShellAttrs } from './transferDialogShell';
|
||
|
||
const props = defineProps<{
|
||
open: boolean;
|
||
invoiceNo: string;
|
||
/** 批量关闭的行数;>1 时忽略 invoiceNo,标题/提示切换为批量文案。 */
|
||
count?: number;
|
||
}>();
|
||
|
||
const emit = defineEmits<{
|
||
confirm: [reason: string];
|
||
cancel: [];
|
||
}>();
|
||
|
||
const reason = ref('');
|
||
|
||
watch(
|
||
() => props.open,
|
||
(open) => {
|
||
if (open) reason.value = '';
|
||
},
|
||
);
|
||
</script>
|
||
|
||
<template>
|
||
<el-dialog
|
||
v-if="open"
|
||
:model-value="true"
|
||
v-bind="transferDialogShellAttrs"
|
||
width="28rem"
|
||
class="rounded-2xl bg-surface"
|
||
>
|
||
<template #header>
|
||
<h3
|
||
class="text-base font-bold text-primary"
|
||
data-testid="transfer-manual-close-dialog"
|
||
>
|
||
{{ $t(count && count > 1 ? 'chat.transfer.batchCloseTitle' : 'chat.transfer.manualCloseTitle', count && count > 1 ? { count } : {}) }}
|
||
</h3>
|
||
</template>
|
||
<p class="text-xs text-muted">
|
||
<template v-if="count && count > 1">{{ $t('chat.transfer.manualCloseHint') }}</template>
|
||
<template v-else>{{ invoiceNo }} · {{ $t('chat.transfer.manualCloseHint') }}</template>
|
||
</p>
|
||
<el-input
|
||
v-model="reason"
|
||
type="textarea"
|
||
:rows="3"
|
||
class="mt-3"
|
||
:placeholder="$t('chat.transfer.closeReasonPlaceholder')"
|
||
data-testid="transfer-close-reason"
|
||
/>
|
||
<div class="mt-4 flex justify-end gap-2">
|
||
<el-button
|
||
data-testid="transfer-close-cancel"
|
||
@click="emit('cancel')"
|
||
>
|
||
{{ $t('chat.transfer.cancel') }}
|
||
</el-button>
|
||
<el-button
|
||
type="primary"
|
||
:disabled="!reason.trim()"
|
||
data-testid="transfer-close-confirm"
|
||
@click="emit('confirm', reason.trim())"
|
||
>
|
||
{{ $t('chat.transfer.confirmClose') }}
|
||
</el-button>
|
||
</div>
|
||
</el-dialog>
|
||
</template>
|