提交
This commit is contained in:
1 parent
135dd550b6
commit
2a4767a014
76 files changed
+25160
-2306
No files matched your search
@@ -60,6 +60,18 @@
|
||||
<el-icon><CircleCheck /></el-icon>
|
||||
审核
|
||||
</el-button>
|
||||
<el-button class="btn-ghost" :disabled="!selectedRows.length" @click="openStatusChangeDialog('activate')">
|
||||
协议生效
|
||||
</el-button>
|
||||
<el-button class="btn-ghost" :disabled="!selectedRows.length" @click="openStatusChangeDialog('expire')">
|
||||
协议过期
|
||||
</el-button>
|
||||
<el-button class="btn-ghost" :disabled="!selectedRows.length" @click="openStatusChangeDialog('void')">
|
||||
协议作废
|
||||
</el-button>
|
||||
<el-button class="btn-ghost" :disabled="!selectedRows.length" @click="openStatusChangeDialog('toResearch')">
|
||||
协议转科研
|
||||
</el-button>
|
||||
<el-button class="btn-ghost" :disabled="!selectedRows.length" @click="handleBatchDelete">
|
||||
<el-icon><Delete /></el-icon>
|
||||
批量删除
|
||||
@@ -261,6 +273,14 @@
|
||||
@submitted="onAuditSubmitted"
|
||||
/>
|
||||
|
||||
<!-- 状态变更弹窗(生效/过期/作废/转科研) -->
|
||||
<ProtocolStatusChangeDialog
|
||||
v-model="statusChangeDialogVisible"
|
||||
:action-type="statusChangeAction"
|
||||
:targets="statusChangeTargets"
|
||||
@submitted="onStatusChangeSubmitted"
|
||||
/>
|
||||
|
||||
<!-- 查看弹窗 -->
|
||||
<ProtocolViewDialog
|
||||
v-model="viewVisible"
|
||||
@@ -288,6 +308,10 @@
|
||||
import ProtocolAuditDialog, {
|
||||
type ProtocolAuditTarget
|
||||
} from '../protocol/ProtocolAuditDialog.vue'
|
||||
import ProtocolStatusChangeDialog, {
|
||||
type StatusChangeAction,
|
||||
type StatusChangeTarget
|
||||
} from '../protocol/ProtocolStatusChangeDialog.vue'
|
||||
import { withFullscreenLoading, fullscreenLoadingText } from '@/utils/fullscreen-loading'
|
||||
import {
|
||||
fetchCollectionProtocolList,
|
||||
@@ -417,6 +441,36 @@
|
||||
loadData()
|
||||
}
|
||||
|
||||
/* ====== 状态变更(生效/过期/作废/转科研) ====== */
|
||||
const statusChangeDialogVisible = ref(false)
|
||||
const statusChangeAction = ref<StatusChangeAction>('activate')
|
||||
const statusChangeTargets = ref<StatusChangeTarget[]>([])
|
||||
|
||||
function openStatusChangeDialog(action: StatusChangeAction, row?: CollectionProtocolRow) {
|
||||
const rows = row ? [row] : selectedRows.value
|
||||
if (!rows.length) {
|
||||
const labels: Record<StatusChangeAction, string> = {
|
||||
activate: '协议生效',
|
||||
expire: '协议过期',
|
||||
void: '协议作废',
|
||||
toResearch: '协议转科研'
|
||||
}
|
||||
ElMessage.warning(`请先选择要操作的协议单`)
|
||||
return
|
||||
}
|
||||
statusChangeAction.value = action
|
||||
statusChangeTargets.value = rows.map((r) => ({
|
||||
id: String(r.id),
|
||||
protocolNo: r.protocolNo != null ? String(r.protocolNo) : undefined
|
||||
}))
|
||||
statusChangeDialogVisible.value = true
|
||||
}
|
||||
|
||||
function onStatusChangeSubmitted() {
|
||||
selectedRows.value = []
|
||||
loadData()
|
||||
}
|
||||
|
||||
/* ====== 删除 ====== */
|
||||
function handleDelete(row: CollectionProtocolRow) {
|
||||
ElMessageBox.confirm(`确认删除协议号「${row.protocolNo}」?`, '删除确认', {
|
||||
|
||||
Reference in new issue
Block a user