提交
This commit is contained in:
1 parent
9d0278d03a
commit
abe3020fcc
9 files changed
+4636
-7
No files matched your search
@@ -206,7 +206,8 @@ export const channelTypeTagType = createTagTypeGetter(channelType)
|
||||
export const agreementType: StatusRegistry = {
|
||||
kyxy: { label: '框架协议', tagType: 'primary' },
|
||||
zsxy: { label: '中试协议', tagType: 'success' },
|
||||
lcxy: { label: '临床协议', tagType: 'warning' }
|
||||
lcxy: { label: '临床协议', tagType: 'warning' },
|
||||
jcsy: { label: '基础实验', tagType: 'primary' }
|
||||
}
|
||||
export const agreementTypeLabel = createLabelGetter(agreementType)
|
||||
export const agreementTypeTagType = createTagTypeGetter(agreementType)
|
||||
|
||||
@@ -263,7 +263,7 @@
|
||||
<el-dialog
|
||||
v-model="companyItemsDialogVisible"
|
||||
:title="companyItemsDialogTitle"
|
||||
width="960px"
|
||||
width="1080px"
|
||||
class="dialog-form-layout lab-test-item-form-dialog company-items-dialog"
|
||||
modal-class="lab-test-item-dialog-mask"
|
||||
append-to-body
|
||||
@@ -274,6 +274,31 @@
|
||||
<div class="item-dialog-head">
|
||||
<span class="muted">当前公司:{{ currentCompanyName }}</span>
|
||||
</div>
|
||||
<div class="filter-block company-item-filter">
|
||||
<el-form :model="companyItemSearchForm" class="filter-form" @submit.prevent="handleCompanyItemSearch">
|
||||
<div class="filter-grid">
|
||||
<el-form-item label="关键词">
|
||||
<el-input
|
||||
v-model="companyItemSearchForm.keyword"
|
||||
placeholder="项目编码/名称"
|
||||
clearable
|
||||
@keyup.enter="handleCompanyItemSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="filter-actions-row">
|
||||
<span class="filter-hint">按项目编码、名称模糊查询。</span>
|
||||
<div class="filter-actions-end">
|
||||
<el-button class="btn-ghost" @click="handleCompanyItemSearchReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
</el-button>
|
||||
<el-button class="btn-main" type="primary" @click="handleCompanyItemSearch">
|
||||
<el-icon><Search /></el-icon>搜索
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="list-toolbar item-toolbar">
|
||||
<div class="list-toolbar-row">
|
||||
<div class="list-toolbar-selected">
|
||||
@@ -351,7 +376,7 @@
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
min-width="260"
|
||||
min-width="300"
|
||||
fixed="right"
|
||||
align="center"
|
||||
header-align="center"
|
||||
@@ -571,6 +596,8 @@
|
||||
Edit,
|
||||
Delete,
|
||||
Upload,
|
||||
Search,
|
||||
RefreshLeft,
|
||||
OfficeBuilding,
|
||||
Document
|
||||
} from '@element-plus/icons-vue'
|
||||
@@ -714,6 +741,7 @@
|
||||
const companyItemSelected = ref<QcThirdPartyItem[]>([])
|
||||
const companyItemLoading = ref(false)
|
||||
const companyItemPagination = reactive({ page: 1, pageSize: 10, total: 0 })
|
||||
const companyItemSearchForm = reactive({ keyword: '' })
|
||||
|
||||
const companyDialogVisible = ref(false)
|
||||
const companyDialogTitle = ref('新增公司')
|
||||
@@ -980,6 +1008,7 @@
|
||||
currentCompanyName.value = company.companyName || ''
|
||||
companyItemsDialogTitle.value = `三方检测项目 — ${company.companyName}`
|
||||
companyItemPagination.page = 1
|
||||
companyItemSearchForm.keyword = ''
|
||||
companyItemSelected.value = []
|
||||
companyItemsDialogVisible.value = true
|
||||
void loadCompanyItemList()
|
||||
@@ -988,6 +1017,7 @@
|
||||
function onCompanyItemsDialogClosed() {
|
||||
companyItemTable.value = []
|
||||
companyItemSelected.value = []
|
||||
companyItemSearchForm.keyword = ''
|
||||
companyItemPagination.page = 1
|
||||
companyItemPagination.total = 0
|
||||
}
|
||||
@@ -1003,15 +1033,29 @@
|
||||
const res = await fetchQcThirdPartyItemList({
|
||||
page: companyItemPagination.page,
|
||||
pageSize: companyItemPagination.pageSize,
|
||||
companyId: currentCompanyId.value
|
||||
companyId: currentCompanyId.value,
|
||||
keyword: companyItemSearchForm.keyword || undefined
|
||||
})
|
||||
companyItemTable.value = res.list || []
|
||||
companyItemPagination.total = res.total ?? 0
|
||||
const validIds = new Set(companyItemTable.value.map((r) => r.id))
|
||||
companyItemSelected.value = companyItemSelected.value.filter((r) => validIds.has(r.id))
|
||||
} finally {
|
||||
companyItemLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
function handleCompanyItemSearch() {
|
||||
companyItemPagination.page = 1
|
||||
void loadCompanyItemList()
|
||||
}
|
||||
|
||||
function handleCompanyItemSearchReset() {
|
||||
companyItemSearchForm.keyword = ''
|
||||
companyItemPagination.page = 1
|
||||
void loadCompanyItemList()
|
||||
}
|
||||
|
||||
function handleAddItemFromList() {
|
||||
if (!currentCompanyId.value) return
|
||||
const company = tableData.value.find((c) => c.id === currentCompanyId.value)
|
||||
@@ -1114,6 +1158,16 @@
|
||||
{ debounce: 300 }
|
||||
)
|
||||
|
||||
watchDebounced(
|
||||
companyItemSearchForm,
|
||||
() => {
|
||||
if (!companyItemsDialogVisible.value) return
|
||||
companyItemPagination.page = 1
|
||||
void loadCompanyItemList()
|
||||
},
|
||||
{ debounce: 300, deep: true }
|
||||
)
|
||||
|
||||
onMounted(() => loadData())
|
||||
</script>
|
||||
|
||||
@@ -1323,12 +1377,103 @@
|
||||
color: var(--mint-text-muted, #64748b);
|
||||
}
|
||||
|
||||
.item-toolbar {
|
||||
.company-item-filter.filter-block {
|
||||
padding: 12px 16px 10px;
|
||||
margin-bottom: 0;
|
||||
background: var(--mint-surface, #fff);
|
||||
border-bottom: 1px solid var(--mint-border, #d9e8e2);
|
||||
|
||||
.filter-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 10px 14px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.filter-actions-row {
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.filter-hint {
|
||||
margin: 0;
|
||||
font-size: 11px;
|
||||
color: var(--mint-text-muted, #64748b);
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
.filter-actions-end {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
flex-wrap: wrap;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.filter-actions-end .el-button + .el-button {
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
|
||||
:deep(.el-form-item) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.item-table-wrap {
|
||||
.item-toolbar.list-toolbar {
|
||||
margin-bottom: 0;
|
||||
padding: 0;
|
||||
background: var(--mint-table-head, #f8fafc);
|
||||
border-bottom: none !important;
|
||||
|
||||
.list-toolbar-row {
|
||||
padding: 8px 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.list-toolbar-row .el-button + .el-button {
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
|
||||
.list-toolbar-selected {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
min-height: 36px;
|
||||
padding: 0 10px 0 0;
|
||||
margin-right: 4px;
|
||||
border-right: 1px solid var(--mint-border, #d9e8e2);
|
||||
font-size: 12px;
|
||||
color: var(--mint-text-muted, #64748b);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.sel-num {
|
||||
color: var(--mint-primary-dark, #059669);
|
||||
font-weight: 700;
|
||||
margin: 0 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.item-table-wrap.list-body.list-wrap {
|
||||
padding-top: 0;
|
||||
border-top: 1px solid var(--mint-border, #d9e8e2);
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.item-table-wrap .pagination.list-pager-bar {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-top: 0;
|
||||
padding: 10px 16px 12px;
|
||||
border-top: none !important;
|
||||
background: var(--mint-surface, #fff);
|
||||
border-radius: 0 0 var(--mint-radius, 10px) var(--mint-radius, 10px);
|
||||
}
|
||||
|
||||
.company-items-dialog {
|
||||
|
||||
@@ -245,6 +245,10 @@
|
||||
.entity-card--nested {
|
||||
align-self: stretch;
|
||||
cursor: pointer;
|
||||
|
||||
.entity-card-title {
|
||||
padding-right: 32px;
|
||||
}
|
||||
}
|
||||
|
||||
.entity-card-nested-empty {
|
||||
|
||||
Reference in new issue
Block a user