提交
This commit is contained in:
1 parent
973176d508
commit
cdaa0ac273
327 files changed
+32861
-25627
No files matched your search
@@ -42,7 +42,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
</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="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
@@ -828,6 +827,7 @@
|
||||
MaterialStockCheckUnusedLine,
|
||||
MaterialStockCheckRequisition
|
||||
} from '@/api/material-stock-check'
|
||||
import { fetchAllPagedRecords } from '@/utils/fetch-paged-list'
|
||||
|
||||
defineOptions({ name: 'MaterialStockCheckTab' })
|
||||
|
||||
@@ -1293,12 +1293,13 @@
|
||||
dbgLog('loadRequisitions START', { source, keyword: requisitionKeyword.value })
|
||||
requisitionLoading.value = true
|
||||
try {
|
||||
const res = await fetchMaterialStockCheckRequisitions({
|
||||
page: 1,
|
||||
pageSize: 200,
|
||||
keyword: requisitionKeyword.value.trim() || undefined
|
||||
})
|
||||
requisitionList.value = res.list || []
|
||||
requisitionList.value = await fetchAllPagedRecords((page, pageSize) =>
|
||||
fetchMaterialStockCheckRequisitions({
|
||||
page,
|
||||
pageSize,
|
||||
keyword: requisitionKeyword.value.trim() || undefined
|
||||
})
|
||||
)
|
||||
dbgLog('loadRequisitions OK', {
|
||||
source,
|
||||
count: requisitionList.value.length,
|
||||
|
||||
@@ -53,11 +53,6 @@
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="filter-actions-row">
|
||||
<span class="filter-hint">{{
|
||||
mineOnly
|
||||
? '查看本人物料领用记录,可按物料、批号、类型与时间范围筛选。'
|
||||
: '按物料、入库编号、批号、变动类型和时间范围查询变动记录。'
|
||||
}}</span>
|
||||
<div class="filter-actions-end">
|
||||
<el-button class="btn-ghost" @click="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
|
||||
@@ -45,7 +45,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="filter-actions-row">
|
||||
<span class="filter-hint">{{ filterHint }}</span>
|
||||
<div class="filter-actions-end">
|
||||
<el-button class="btn-ghost" @click="handlePendingReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
@@ -128,7 +127,6 @@
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="filter-actions-row">
|
||||
<span class="filter-hint">{{ filterHint }}</span>
|
||||
<div class="filter-actions-end">
|
||||
<el-button class="btn-ghost" @click="handleConfirmedReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
@@ -516,7 +514,6 @@
|
||||
|
||||
const emit = defineEmits<{ actionDone: [] }>()
|
||||
|
||||
const filterHint = '支持客户姓名、身份证号、新生儿姓名、新生儿身份证号模糊检索。'
|
||||
|
||||
function formatInvoiceAmount(v: unknown): string {
|
||||
if (v == null || v === '') return '-'
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="filter-actions-row">
|
||||
<span class="filter-hint">{{ filterHint }}</span>
|
||||
<div class="filter-actions-end">
|
||||
<el-button class="btn-ghost" @click="handlePendingReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
@@ -163,7 +162,6 @@
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="filter-actions-row">
|
||||
<span class="filter-hint">{{ filterHint }}</span>
|
||||
<div class="filter-actions-end">
|
||||
<el-button class="btn-ghost" @click="handleConfirmedReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
@@ -500,8 +498,6 @@
|
||||
|
||||
const emit = defineEmits<{ actionDone: [] }>()
|
||||
|
||||
const filterHint =
|
||||
'支持客户姓名、身份证号、新生儿姓名、新生儿身份证号模糊检索。'
|
||||
|
||||
function formatPaymentAmount(v: unknown): string {
|
||||
if (v == null || v === '') return '-'
|
||||
|
||||
@@ -86,7 +86,6 @@
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="filter-actions-row">
|
||||
<span class="filter-hint">{{ filterHint }}</span>
|
||||
<div class="filter-actions-end">
|
||||
<el-button class="btn-ghost" @click="handlePendingReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
@@ -214,7 +213,6 @@
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="filter-actions-row">
|
||||
<span class="filter-hint">{{ filterHint }}</span>
|
||||
<div class="filter-actions-end">
|
||||
<el-button class="btn-ghost" @click="handleConfirmedReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
@@ -557,7 +555,6 @@
|
||||
return count > 99 ? '99+' : String(count)
|
||||
}
|
||||
|
||||
const filterHint = '支持客户姓名、身份证号、新生儿姓名、新生儿身份证号模糊检索。'
|
||||
|
||||
function formatPaymentAmount(v: unknown): string {
|
||||
if (v == null || v === '') return '-'
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
</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="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
|
||||
@@ -37,9 +37,6 @@
|
||||
</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="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
|
||||
@@ -52,9 +52,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -23,9 +23,6 @@
|
||||
</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="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
|
||||
@@ -45,9 +45,6 @@
|
||||
</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="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
|
||||
@@ -43,9 +43,6 @@
|
||||
</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="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
|
||||
@@ -32,9 +32,6 @@
|
||||
</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="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
|
||||
@@ -43,9 +43,6 @@
|
||||
</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="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
|
||||
@@ -57,7 +57,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -30,9 +30,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -59,7 +59,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -52,7 +52,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -21,13 +21,6 @@
|
||||
|
||||
<div class="filter-block">
|
||||
<el-form :model="searchForm" class="filter-form" label-position="top" @submit.prevent>
|
||||
<p class="filter-hint">
|
||||
{{
|
||||
activeTab === 'pending'
|
||||
? '展示待确认的流水记录。'
|
||||
: '展示财务已确认或财务作废的流水记录。'
|
||||
}}
|
||||
</p>
|
||||
<div class="filter-grid">
|
||||
<el-form-item label="渠道名称">
|
||||
<el-input
|
||||
@@ -58,7 +51,6 @@
|
||||
</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="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
|
||||
@@ -48,7 +48,6 @@
|
||||
</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="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="filter-actions-row">
|
||||
<span class="filter-hint">{{ filterHint }}</span>
|
||||
<div class="filter-actions-end">
|
||||
<el-button class="btn-ghost" @click="handlePendingReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
@@ -134,7 +133,6 @@
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="filter-actions-row">
|
||||
<span class="filter-hint">{{ filterHint }}</span>
|
||||
<div class="filter-actions-end">
|
||||
<el-button class="btn-ghost" @click="handleConfirmedReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
@@ -608,11 +606,6 @@
|
||||
() => resolvePilotBizType(props.bizType) === 'basic_experiment'
|
||||
)
|
||||
const pickupTimeLabel = computed(() => bizConfig.value.pickupTimeLabel)
|
||||
const filterHint = computed(() =>
|
||||
isBasicExperiment.value
|
||||
? '支持按申请单号、课题名称、客户名称模糊检索。'
|
||||
: '支持按申请单号、患者姓名模糊检索。'
|
||||
)
|
||||
const keywordPlaceholder = computed(() =>
|
||||
isBasicExperiment.value ? '申请单号/课题名称/客户名称' : '申请单号/患者姓名'
|
||||
)
|
||||
|
||||
@@ -62,7 +62,6 @@
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="filter-actions-row">
|
||||
<span class="filter-hint">{{ filterHint }}</span>
|
||||
<div class="filter-actions-end">
|
||||
<el-button class="btn-ghost" @click="handlePendingReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
@@ -174,7 +173,6 @@
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="filter-actions-row">
|
||||
<span class="filter-hint">{{ filterHint }}</span>
|
||||
<div class="filter-actions-end">
|
||||
<el-button class="btn-ghost" @click="handleConfirmedReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
@@ -648,12 +646,6 @@
|
||||
const effectiveBizType = computed(() => resolvePilotBizType(props.bizType))
|
||||
const isBasicExperiment = computed(() => effectiveBizType.value === 'basic_experiment')
|
||||
const pickupTimeLabel = computed(() => bizConfig.value.pickupTimeLabel)
|
||||
const filterHint = computed(() =>
|
||||
isBasicExperiment.value
|
||||
? '支持按申请单号、课题名称、客户名称模糊检索。'
|
||||
: '支持按申请单号、患者姓名模糊检索。'
|
||||
)
|
||||
|
||||
const route = useRoute()
|
||||
const mainTab = ref<'payment' | 'refund'>('payment')
|
||||
const paymentPendingBadge = ref(0)
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="filter-actions-row">
|
||||
<span class="filter-hint">{{ filterHint }}</span>
|
||||
<div class="filter-actions-end">
|
||||
<el-button class="btn-ghost" @click="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
@@ -142,12 +141,6 @@
|
||||
const keywordPlaceholder = computed(() =>
|
||||
isBasicExperiment.value ? '申请单号/课题名称/客户名称' : '申请单号/患者姓名'
|
||||
)
|
||||
const filterHint = computed(() =>
|
||||
isBasicExperiment.value
|
||||
? '支持按申请单号、课题名称、客户名称搜索。'
|
||||
: '支持按申请单号、患者姓名搜索。'
|
||||
)
|
||||
|
||||
const reviewConclusionOptions = [
|
||||
{ value: 'tg', label: '通过' },
|
||||
{ value: 'btg', label: '不通过' }
|
||||
|
||||
@@ -45,7 +45,6 @@
|
||||
</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="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
</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="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
|
||||
@@ -45,7 +45,6 @@
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="filter-actions-row">
|
||||
<span class="filter-hint">{{ filterHint }}</span>
|
||||
<div class="filter-actions-end">
|
||||
<el-button class="btn-ghost" @click="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
@@ -410,12 +409,6 @@
|
||||
const keywordPlaceholder = computed(() =>
|
||||
isBasicExperiment.value ? '申请单号/课题名称/客户名称' : '申请单号/患者姓名/渠道名称'
|
||||
)
|
||||
const filterHint = computed(() =>
|
||||
isBasicExperiment.value
|
||||
? '支持申请单号、课题名称、客户名称模糊查询,输入即检索。'
|
||||
: '支持申请单号、患者姓名、渠道名称模糊查询,输入即检索。'
|
||||
)
|
||||
|
||||
const searchForm = reactive({
|
||||
keyword: '',
|
||||
infusionStatus: '',
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="filter-actions-row">
|
||||
<span class="filter-hint">{{ filterHint }}</span>
|
||||
<div class="filter-actions-end">
|
||||
<el-button class="btn-ghost" @click="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
@@ -317,12 +316,6 @@
|
||||
const keywordPlaceholder = computed(() =>
|
||||
isBasicExperiment.value ? '申请单号/课题名称/客户名称' : '申请单号/订单名称/患者姓名'
|
||||
)
|
||||
const filterHint = computed(() =>
|
||||
isBasicExperiment.value
|
||||
? '支持申请单号、课题名称、客户名称模糊查询,输入即检索。'
|
||||
: '支持申请单号、服务订单名称、患者姓名、渠道名称模糊查询,输入即检索。'
|
||||
)
|
||||
|
||||
// ── 搜索 ──────────────────────────────────────────────────────────────
|
||||
const searchForm = reactive({
|
||||
keyword: '',
|
||||
|
||||
@@ -55,7 +55,6 @@
|
||||
</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="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
</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="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
@@ -248,7 +247,6 @@
|
||||
</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="handleLogReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
</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="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
|
||||
@@ -52,7 +52,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
</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="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
|
||||
@@ -10,9 +10,6 @@
|
||||
</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="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
|
||||
+8
-7
@@ -29,7 +29,6 @@
|
||||
</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="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
@@ -845,6 +844,7 @@
|
||||
type ProductionMaterialStockCheckUnusedLine,
|
||||
type ProductionMaterialStockCheckRequisition
|
||||
} from '@/api/production-material'
|
||||
import { fetchAllPagedRecords } from '@/utils/fetch-paged-list'
|
||||
|
||||
defineOptions({ name: 'ProductionMaterialStockCheckTab' })
|
||||
|
||||
@@ -1361,12 +1361,13 @@
|
||||
dbgLog('loadRequisitions START', { source, keyword: requisitionKeyword.value })
|
||||
requisitionLoading.value = true
|
||||
try {
|
||||
const res = await fetchProductionMaterialStockCheckRequisitions({
|
||||
page: 1,
|
||||
pageSize: 200,
|
||||
keyword: requisitionKeyword.value.trim() || undefined
|
||||
})
|
||||
requisitionList.value = res.list || []
|
||||
requisitionList.value = await fetchAllPagedRecords((page, pageSize) =>
|
||||
fetchProductionMaterialStockCheckRequisitions({
|
||||
page,
|
||||
pageSize,
|
||||
keyword: requisitionKeyword.value.trim() || undefined
|
||||
})
|
||||
)
|
||||
dbgLog('loadRequisitions OK', {
|
||||
source,
|
||||
count: requisitionList.value.length,
|
||||
|
||||
@@ -56,11 +56,6 @@
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="filter-actions-row">
|
||||
<span class="filter-hint">{{
|
||||
mineOnly
|
||||
? '查看本人物料领用记录,可按物料、批号、类型与时间范围筛选。'
|
||||
: '按物料、入库编号、批号、变动类型和时间范围查询变动记录。'
|
||||
}}</span>
|
||||
<div class="filter-actions-end">
|
||||
<el-button class="btn-ghost" @click="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
|
||||
@@ -42,9 +42,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!-- 生产工单 · 工艺步骤待办角标(卡片标题行,X+Y 与 Tab 栏一致) -->
|
||||
<!-- 生产工单 · 工艺步骤待办角标(卡片标题行,到期+未来计划,与 Tab 栏一致) -->
|
||||
<template>
|
||||
<span
|
||||
v-if="visible"
|
||||
|
||||
+67
-3
@@ -2,7 +2,12 @@
|
||||
<template>
|
||||
<div class="list-body list-wrap production-work-order-cards-body">
|
||||
<div v-loading="loading" class="production-work-order-cards-wrap">
|
||||
<article v-for="(row, idx) in rows" :key="row.id" class="production-work-order-card">
|
||||
<article
|
||||
v-for="(row, idx) in rows"
|
||||
:key="row.id"
|
||||
class="production-work-order-card"
|
||||
:class="{ 'production-work-order-card--completed': isWorkOrderCompleted(row) }"
|
||||
>
|
||||
<header class="production-work-order-card__head">
|
||||
<div class="production-work-order-card__title-band">
|
||||
<div class="production-work-order-card__title-row">
|
||||
@@ -30,7 +35,12 @@
|
||||
monospace
|
||||
/>
|
||||
</template>
|
||||
<span v-else class="production-work-order-card__no">{{ cardTitleLabel(row) }}</span>
|
||||
<span
|
||||
v-else
|
||||
class="production-work-order-card__no"
|
||||
:class="{ 'production-work-order-card__no--remark': temporaryCardTitleUsesRemark(row) }"
|
||||
>{{ cardTitleLabel(row) }}</span
|
||||
>
|
||||
<el-tag
|
||||
v-if="rowCardMeta(row).showCategoryTag"
|
||||
:type="productionWorkOrderCategoryTagType(row)"
|
||||
@@ -129,7 +139,11 @@
|
||||
<template v-for="field in visibleMetaFields(row)" :key="field.label">
|
||||
<div
|
||||
class="production-work-order-card__meta-item"
|
||||
:class="{ 'production-work-order-card__meta-item--wide': field.wide }"
|
||||
:class="{
|
||||
'production-work-order-card__meta-item--wide': field.wide,
|
||||
'production-work-order-card__meta-item--span-2': field.colSpan === 2,
|
||||
'production-work-order-card__meta-item--span-3': field.colSpan === 3
|
||||
}"
|
||||
>
|
||||
<dt>{{ field.label }}</dt>
|
||||
<dd>
|
||||
@@ -380,10 +394,22 @@
|
||||
return (row.labStorageCode || '').trim() || '—'
|
||||
}
|
||||
|
||||
function isTemporaryWorkOrderTitle(row: ProductionWorkOrderItem) {
|
||||
const effectiveTabKey = resolveEffectiveRowTabKey(listTabKey.value, row)
|
||||
return effectiveTabKey === 'temporary'
|
||||
}
|
||||
|
||||
function temporaryCardTitleUsesRemark(row: ProductionWorkOrderItem) {
|
||||
return isTemporaryWorkOrderTitle(row) && !!(row.remark || '').trim()
|
||||
}
|
||||
|
||||
function cardTitleLabel(row: ProductionWorkOrderItem) {
|
||||
if (isInboundSampleTitle(row)) {
|
||||
return `${inboundCardTitleLab(row)} - ${(row.sampleCode || '').trim() || '—'}`
|
||||
}
|
||||
if (isTemporaryWorkOrderTitle(row)) {
|
||||
return (row.remark || '').trim() || row.workOrderNo || '—'
|
||||
}
|
||||
return row.workOrderNo || '—'
|
||||
}
|
||||
|
||||
@@ -444,6 +470,10 @@
|
||||
return row.products?.length ? row.products : []
|
||||
}
|
||||
|
||||
function isWorkOrderCompleted(row: ProductionWorkOrderItem) {
|
||||
return row.workOrderStatus === 'ywc'
|
||||
}
|
||||
|
||||
function productionWoStatusTag(status: string): { label: string; type: TagType } {
|
||||
const map: Record<string, { label: string; type: TagType }> = {
|
||||
dpz: { label: '待配置', type: 'info' },
|
||||
@@ -542,6 +572,27 @@
|
||||
border-color: #a8d4c4;
|
||||
box-shadow: 0 4px 12px rgba(4, 120, 87, 0.1);
|
||||
}
|
||||
|
||||
&--completed {
|
||||
border-color: #fcd34d;
|
||||
background: #fffbeb;
|
||||
|
||||
&:hover {
|
||||
border-color: #fbbf24;
|
||||
box-shadow: 0 4px 12px rgba(217, 119, 6, 0.1);
|
||||
}
|
||||
|
||||
.production-work-order-card__head,
|
||||
.production-work-order-card__tasks,
|
||||
.production-work-order-card__fee-toggle-bar {
|
||||
background: #fffbeb;
|
||||
}
|
||||
|
||||
.production-work-order-card__title-band {
|
||||
background: linear-gradient(180deg, #fef3c7 0%, #fffbeb 100%);
|
||||
border-bottom-color: #fde68a;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.production-work-order-card__head {
|
||||
@@ -599,6 +650,11 @@
|
||||
color: #1e293b;
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
||||
word-break: break-all;
|
||||
|
||||
&--remark {
|
||||
font-family: inherit;
|
||||
word-break: break-word;
|
||||
}
|
||||
}
|
||||
|
||||
.production-work-order-card__fee-toggle-bar {
|
||||
@@ -649,6 +705,14 @@
|
||||
&--wide {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
&--span-2 {
|
||||
grid-column: span 2;
|
||||
}
|
||||
|
||||
&--span-3 {
|
||||
grid-column: span 3;
|
||||
}
|
||||
}
|
||||
|
||||
.production-work-order-card__cells {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!-- 生产工单 Tab 栏(工艺步骤到期/未安排角标) -->
|
||||
<!-- 生产工单 Tab 栏(工艺步骤到期/未来计划角标) -->
|
||||
<template>
|
||||
<div class="panel-pill-tabs panel-pill-tabs--lg panel-pill-tabs--alert-badge">
|
||||
<div class="panel-pill-tabs__track" role="tablist">
|
||||
|
||||
+44
-46
@@ -1,5 +1,8 @@
|
||||
import { ref, reactive, computed, onMounted, type Ref } from 'vue'
|
||||
import { fetchProductionWorkOrderList, type ProductionWorkOrderItem } from '@/api/production-work-order'
|
||||
import {
|
||||
fetchProductionWorkOrderList,
|
||||
type ProductionWorkOrderItem
|
||||
} from '@/api/production-work-order'
|
||||
import {
|
||||
fetchProductionTasksByWorkOrderIds,
|
||||
groupProductionTasksByWorkOrderId
|
||||
@@ -15,17 +18,16 @@ import {
|
||||
import {
|
||||
getProductionWorkOrderTab,
|
||||
toWorkOrderListQuery,
|
||||
tabUsesInfusionTimeFilter,
|
||||
keywordPlaceholderForTab,
|
||||
filterTimeLabelForTab,
|
||||
filterTimeHintForTab,
|
||||
isAllProductionWorkOrderTab,
|
||||
tabSupportsInactiveProtocolFilter,
|
||||
resolveTabKeyFromWorkOrder,
|
||||
type ProductionWorkOrderTabKey
|
||||
} from '@/utils/production-work-order-tabs'
|
||||
import { toAllTabListQuery } from '@/utils/production-work-order-category'
|
||||
import { getCardMetaConfig } from '@/utils/production-work-order-card-meta'
|
||||
import { joinWorkOrderStatusFilter } from '@/utils/status-tag-registry'
|
||||
import { computeWorkOrderPlannedStartTimeRange } from '@/utils/production-labels'
|
||||
|
||||
export type ProductionWorkOrderTabPageMode = 'manage' | 'mine'
|
||||
|
||||
@@ -37,25 +39,15 @@ export function useProductionWorkOrderTabPage(
|
||||
const tabConfig = computed(() => getProductionWorkOrderTab(tabKey.value)!)
|
||||
const cardMetaConfig = computed(() => getCardMetaConfig(tabKey.value))
|
||||
const keywordPlaceholder = computed(() => keywordPlaceholderForTab(tabConfig.value))
|
||||
const filterTimeLabel = computed(() => filterTimeLabelForTab(tabConfig.value))
|
||||
const filterTimeHint = computed(() => {
|
||||
if (pageModeValue.value === 'mine') {
|
||||
const base = '仅展示指派给当前登录人的生产任务(含已转出记录,转出任务仅可查看)。'
|
||||
if (isAllProductionWorkOrderTab(tabKey.value)) {
|
||||
return `${base}出库工单按输注/交付时间筛选请进入对应分类 Tab。`
|
||||
}
|
||||
return base
|
||||
}
|
||||
return filterTimeHintForTab(tabConfig.value)
|
||||
})
|
||||
|
||||
const searchForm = reactive({
|
||||
productionCategory: '',
|
||||
keyword: '',
|
||||
workOrderStatus: [] as string[],
|
||||
taskStatus: ''
|
||||
taskStatus: '',
|
||||
excludeVoidProtocol: true
|
||||
})
|
||||
const createTimeRange = ref<[string, string] | null>(null)
|
||||
const plannedStartTimeRange = ref<[string, string] | null>(null)
|
||||
const filterExpanded = ref(false)
|
||||
const tableData = ref<ProductionWorkOrderItem[]>([])
|
||||
const presetTasksByWorkOrderId = ref<Record<string, Record<string, any>[]>>({})
|
||||
@@ -72,18 +64,21 @@ export function useProductionWorkOrderTabPage(
|
||||
const viewWorkOrderId = ref('')
|
||||
const viewTabKey = ref<ProductionWorkOrderTabKey>(tabKey.value)
|
||||
|
||||
const showInactiveProtocolFilter = computed(() => tabSupportsInactiveProtocolFilter(tabKey.value))
|
||||
|
||||
function resolveExcludeVoidProtocolParam(): boolean | undefined {
|
||||
if (!showInactiveProtocolFilter.value) return undefined
|
||||
return searchForm.excludeVoidProtocol
|
||||
}
|
||||
|
||||
function buildPlannedStartTimeParams() {
|
||||
return {
|
||||
plannedStartTimeStart: plannedStartTimeRange.value?.[0] || undefined,
|
||||
plannedStartTimeEnd: plannedStartTimeRange.value?.[1] || undefined
|
||||
}
|
||||
}
|
||||
|
||||
function buildMineWorkOrderSearchFilters() {
|
||||
const tab = tabConfig.value
|
||||
const timeParams =
|
||||
isAllProductionWorkOrderTab(tabKey.value) || !tabUsesInfusionTimeFilter(tab)
|
||||
? {
|
||||
createTimeStart: createTimeRange.value?.[0] || undefined,
|
||||
createTimeEnd: createTimeRange.value?.[1] || undefined
|
||||
}
|
||||
: {
|
||||
infusionTimeStart: createTimeRange.value?.[0] || undefined,
|
||||
infusionTimeEnd: createTimeRange.value?.[1] || undefined
|
||||
}
|
||||
return {
|
||||
keyword: searchForm.keyword || undefined,
|
||||
workOrderStatus: searchForm.workOrderStatus.length
|
||||
@@ -91,10 +86,19 @@ export function useProductionWorkOrderTabPage(
|
||||
: undefined,
|
||||
productionCategory: searchForm.productionCategory || undefined,
|
||||
tabKey: tabKey.value,
|
||||
...timeParams
|
||||
excludeVoidProtocol: resolveExcludeVoidProtocolParam()
|
||||
}
|
||||
}
|
||||
|
||||
function enrichRowsWithPlannedStartTimeRange(
|
||||
rows: ProductionWorkOrderItem[],
|
||||
tasksMap: Record<string, Record<string, any>[]>
|
||||
): ProductionWorkOrderItem[] {
|
||||
return rows.map((row) => ({
|
||||
...row,
|
||||
plannedStartTimeRange: computeWorkOrderPlannedStartTimeRange(tasksMap[row.id])
|
||||
}))
|
||||
}
|
||||
|
||||
async function loadBatchTasksForWorkOrders(workOrderIds: string[]) {
|
||||
const ids = workOrderIds.map((id) => String(id || '').trim()).filter(Boolean)
|
||||
@@ -112,6 +116,7 @@ export function useProductionWorkOrderTabPage(
|
||||
map[id] = grouped[id] || []
|
||||
}
|
||||
presetTasksByWorkOrderId.value = map
|
||||
tableData.value = enrichRowsWithPlannedStartTimeRange(tableData.value, map)
|
||||
} finally {
|
||||
tasksBatchLoading.value = false
|
||||
tasksBatchReady.value = true
|
||||
@@ -127,7 +132,9 @@ export function useProductionWorkOrderTabPage(
|
||||
keyword: searchForm.keyword || undefined,
|
||||
taskStatus: searchForm.taskStatus || undefined,
|
||||
productionCategory: searchForm.productionCategory || undefined,
|
||||
tabKey: tabKey.value
|
||||
tabKey: tabKey.value,
|
||||
excludeVoidProtocol: resolveExcludeVoidProtocolParam(),
|
||||
...buildPlannedStartTimeParams()
|
||||
})
|
||||
let entries = groupMineTasksByWorkOrder(tasks)
|
||||
entries = await enrichMineEntriesWithWorkOrders(entries)
|
||||
@@ -142,16 +149,6 @@ export function useProductionWorkOrderTabPage(
|
||||
}
|
||||
|
||||
const tab = tabConfig.value
|
||||
const timeParams =
|
||||
isAllProductionWorkOrderTab(tabKey.value) || !tabUsesInfusionTimeFilter(tab)
|
||||
? {
|
||||
createTimeStart: createTimeRange.value?.[0] || undefined,
|
||||
createTimeEnd: createTimeRange.value?.[1] || undefined
|
||||
}
|
||||
: {
|
||||
infusionTimeStart: createTimeRange.value?.[0] || undefined,
|
||||
infusionTimeEnd: createTimeRange.value?.[1] || undefined
|
||||
}
|
||||
const listQuery = isAllProductionWorkOrderTab(tabKey.value)
|
||||
? toAllTabListQuery(searchForm.productionCategory)
|
||||
: toWorkOrderListQuery(tab)
|
||||
@@ -160,8 +157,9 @@ export function useProductionWorkOrderTabPage(
|
||||
pageSize: pagination.pageSize,
|
||||
keyword: searchForm.keyword || undefined,
|
||||
workOrderStatus: joinWorkOrderStatusFilter(searchForm.workOrderStatus),
|
||||
excludeVoidProtocol: resolveExcludeVoidProtocolParam(),
|
||||
...listQuery,
|
||||
...timeParams
|
||||
...buildPlannedStartTimeParams()
|
||||
})
|
||||
tableData.value = res.list || []
|
||||
pagination.total = res.total ?? 0
|
||||
@@ -186,7 +184,8 @@ export function useProductionWorkOrderTabPage(
|
||||
searchForm.keyword = ''
|
||||
searchForm.workOrderStatus = []
|
||||
searchForm.taskStatus = ''
|
||||
createTimeRange.value = null
|
||||
searchForm.excludeVoidProtocol = true
|
||||
plannedStartTimeRange.value = null
|
||||
pagination.page = 1
|
||||
loadData()
|
||||
}
|
||||
@@ -260,7 +259,7 @@ export function useProductionWorkOrderTabPage(
|
||||
})
|
||||
|
||||
watchDebounced(
|
||||
[searchForm, createTimeRange],
|
||||
[searchForm, plannedStartTimeRange],
|
||||
() => {
|
||||
pagination.page = 1
|
||||
loadData()
|
||||
@@ -272,10 +271,9 @@ export function useProductionWorkOrderTabPage(
|
||||
tabConfig,
|
||||
cardMetaConfig,
|
||||
keywordPlaceholder,
|
||||
filterTimeLabel,
|
||||
filterTimeHint,
|
||||
showInactiveProtocolFilter,
|
||||
searchForm,
|
||||
createTimeRange,
|
||||
plannedStartTimeRange,
|
||||
filterExpanded,
|
||||
tableData,
|
||||
presetTasksByWorkOrderId,
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ export type ProductionWorkOrderTabCountScope = 'manage' | 'mine'
|
||||
|
||||
const EMPTY_COUNT: ProductionWorkOrderTabStepCount = {
|
||||
overdueIncomplete: 0,
|
||||
unassigned: 0
|
||||
futureIncomplete: 0
|
||||
}
|
||||
|
||||
const CATEGORY_TAB_KEYS = PRODUCTION_WORK_ORDER_VISIBLE_TABS
|
||||
|
||||
+39
-24
@@ -42,9 +42,9 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="filterTimeLabel">
|
||||
<el-form-item label="计划开始时间">
|
||||
<el-date-picker
|
||||
v-model="createTimeRange"
|
||||
v-model="plannedStartTimeRange"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
@@ -55,7 +55,13 @@
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="filter-actions-row" :class="{ 'filter-actions': isAllTab }">
|
||||
<span v-if="!isAllTab" class="filter-hint">{{ filterTimeHint }}</span>
|
||||
<el-checkbox
|
||||
v-if="showInactiveProtocolFilter"
|
||||
v-model="searchForm.excludeVoidProtocol"
|
||||
class="inactive-protocol-filter-checkbox"
|
||||
>
|
||||
不展示协议已作废或属地废弃的工单
|
||||
</el-checkbox>
|
||||
<div class="filter-actions-end">
|
||||
<el-button class="btn-ghost" @click="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
@@ -65,13 +71,11 @@
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<p v-if="isAllTab" class="filter-hint filter-hint--below">{{ filterTimeHint }}</p>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<div v-else class="filter-block">
|
||||
<el-form :model="searchForm" class="filter-form" label-position="top" @submit.prevent>
|
||||
<p class="filter-hint">{{ filterTimeHint }}</p>
|
||||
<div
|
||||
class="filter-grid my-production-task-filter-main-grid"
|
||||
:class="{ 'my-production-task-filter-all-grid': isAllTab }"
|
||||
@@ -130,9 +134,9 @@
|
||||
<el-option label="已完成" value="ywc" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="filterTimeLabel">
|
||||
<el-form-item label="计划开始时间">
|
||||
<el-date-picker
|
||||
v-model="createTimeRange"
|
||||
v-model="plannedStartTimeRange"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
@@ -143,6 +147,13 @@
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="filter-actions">
|
||||
<el-checkbox
|
||||
v-if="showInactiveProtocolFilter"
|
||||
v-model="searchForm.excludeVoidProtocol"
|
||||
class="inactive-protocol-filter-checkbox"
|
||||
>
|
||||
不展示协议已作废或属地废弃的工单
|
||||
</el-checkbox>
|
||||
<div class="filter-actions-end">
|
||||
<el-button class="btn-ghost" @click="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
@@ -155,10 +166,7 @@
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="pageMode === 'manage' && (tabKey === 'temporary' || isAllTab)"
|
||||
class="list-toolbar"
|
||||
>
|
||||
<div v-if="pageMode === 'manage' && (tabKey === 'temporary' || isAllTab)" class="list-toolbar">
|
||||
<div class="list-toolbar-row">
|
||||
<div class="list-toolbar-selected">
|
||||
已选 <span class="sel-num">{{ selectedIds.length }}</span> 项
|
||||
@@ -266,10 +274,9 @@
|
||||
const {
|
||||
cardMetaConfig,
|
||||
keywordPlaceholder,
|
||||
filterTimeLabel,
|
||||
filterTimeHint,
|
||||
showInactiveProtocolFilter,
|
||||
searchForm,
|
||||
createTimeRange,
|
||||
plannedStartTimeRange,
|
||||
tableData,
|
||||
presetTasksByWorkOrderId,
|
||||
tasksBatchReady,
|
||||
@@ -378,16 +385,6 @@
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.filter-hint {
|
||||
margin: 0 0 10px;
|
||||
font-size: 12px;
|
||||
color: var(--mint-text-muted, #64748b);
|
||||
}
|
||||
|
||||
.filter-hint--below {
|
||||
margin: 10px 0 0;
|
||||
}
|
||||
|
||||
.filter-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
@@ -397,4 +394,22 @@
|
||||
padding-top: 10px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.filter-actions-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 10px 16px;
|
||||
}
|
||||
|
||||
.filter-actions-row .filter-actions-end {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.inactive-protocol-filter-checkbox {
|
||||
:deep(.el-checkbox__label) {
|
||||
font-size: 13px;
|
||||
color: var(--mint-text-muted, #64748b);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -23,7 +23,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
@@ -255,7 +254,6 @@
|
||||
</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="handleAllLogReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
</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="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
|
||||
@@ -287,7 +287,6 @@
|
||||
</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>重置
|
||||
@@ -1472,12 +1471,6 @@
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.filter-hint {
|
||||
margin: 0;
|
||||
font-size: 11px;
|
||||
color: var(--mint-text-muted, #64748b);
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
.filter-actions-end {
|
||||
display: flex;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!-- 质检管理 — 我的质检任务(含「所有」Tab) -->
|
||||
<!-- 质检管理 — 我的质检任务 -->
|
||||
<!-- eslint-disable vue/no-v-model-argument -->
|
||||
<template>
|
||||
<div class="page-container">
|
||||
@@ -49,6 +49,10 @@
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
activeTabKey.value = parseQcWorkOrderTabKey(route.query.tab as string)
|
||||
const parsed = parseQcWorkOrderTabKey(route.query.tab as string)
|
||||
activeTabKey.value = parsed
|
||||
if (String(route.query.tab || '').trim() !== parsed) {
|
||||
router.replace({ query: { ...route.query, tab: parsed } })
|
||||
}
|
||||
})
|
||||
</script>
|
||||
@@ -53,7 +53,6 @@
|
||||
</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="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
</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="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
@@ -645,6 +644,7 @@
|
||||
QcMaterialStockCheckUnusedLine,
|
||||
QcMaterialStockCheckRequisition
|
||||
} from '@/api/qc-material-stock-check'
|
||||
import { fetchAllPagedRecords } from '@/utils/fetch-paged-list'
|
||||
|
||||
defineOptions({ name: 'QcMaterialStockCheckTab' })
|
||||
|
||||
@@ -1112,12 +1112,13 @@
|
||||
dbgLog('loadRequisitions START', { source, keyword: requisitionKeyword.value })
|
||||
requisitionLoading.value = true
|
||||
try {
|
||||
const res = await fetchQcMaterialStockCheckRequisitions({
|
||||
page: 1,
|
||||
pageSize: 200,
|
||||
keyword: requisitionKeyword.value.trim() || undefined
|
||||
})
|
||||
requisitionList.value = res.list || []
|
||||
requisitionList.value = await fetchAllPagedRecords((page, pageSize) =>
|
||||
fetchQcMaterialStockCheckRequisitions({
|
||||
page,
|
||||
pageSize,
|
||||
keyword: requisitionKeyword.value.trim() || undefined
|
||||
})
|
||||
)
|
||||
dbgLog('loadRequisitions OK', {
|
||||
source,
|
||||
count: requisitionList.value.length,
|
||||
|
||||
@@ -54,11 +54,6 @@
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="filter-actions-row">
|
||||
<span class="filter-hint">{{
|
||||
mineOnly
|
||||
? '查看本人物料领用记录,可按物料、批号、类型与时间范围筛选。'
|
||||
: '按物料、入库编号、批号、变动类型和时间范围查询变动记录。'
|
||||
}}</span>
|
||||
<div class="filter-actions-end">
|
||||
<el-button class="btn-ghost" @click="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -7,8 +7,11 @@
|
||||
<QcWorkOrderSampleGroup
|
||||
v-if="item.kind === 'sample-group'"
|
||||
:key="allTabItemKey(item, idx)"
|
||||
:id="allTabInboundAnchorId(item.group)"
|
||||
:group="item.group"
|
||||
:group-index="cardIndex(idx)"
|
||||
:card-anchor-id="allTabInboundAnchorId(item.group)"
|
||||
:protocol-sibling-links="resolveProtocolSiblingLinksForGroup(item.group)"
|
||||
:card-meta-config="cardMetaConfig"
|
||||
:task-refresh-token="taskRefreshToken"
|
||||
:show-work-order-ops="!isMineMode"
|
||||
@@ -45,11 +48,15 @@
|
||||
</template>
|
||||
<template v-else-if="useGroupedList">
|
||||
<template v-if="cardMetaUsesInboundGroups(cardMetaConfig.tabKey)">
|
||||
<QcWorkOrderProtocolGroup
|
||||
v-for="(group, idx) in protocolGroupedRows"
|
||||
:key="group.groupKey"
|
||||
:group="group"
|
||||
<QcWorkOrderSampleGroup
|
||||
v-for="(item, idx) in inboundSampleListItems"
|
||||
:key="item.group.groupKey"
|
||||
:id="item.cardAnchorId"
|
||||
:group="item.group"
|
||||
:group-index="cardIndex(idx)"
|
||||
:card-anchor-id="item.cardAnchorId"
|
||||
:protocol-sibling-links="item.protocolSiblingLinks"
|
||||
:show-protocol-payment-at-group="item.showProtocolPaymentAtGroup"
|
||||
:card-meta-config="cardMetaConfig"
|
||||
:task-refresh-token="taskRefreshToken"
|
||||
:show-work-order-ops="!isMineMode"
|
||||
@@ -132,11 +139,16 @@
|
||||
import type { QcTask } from '@/api/qc-task'
|
||||
import type { QcInspectionBatch } from '@/utils/qc-inspection-batch'
|
||||
import {
|
||||
groupInboundQcWorkOrdersByProtocol,
|
||||
groupOutboundQcWorkOrders,
|
||||
buildAllTabListItems,
|
||||
type QcWorkOrderAllTabListItem
|
||||
type QcWorkOrderAllTabListItem,
|
||||
type QcWorkOrderSampleGroupModel
|
||||
} from '@/utils/qc-work-order-groups'
|
||||
import {
|
||||
buildInboundSampleListItems,
|
||||
buildInboundSampleCardAnchorId,
|
||||
resolveProtocolSiblingLinksForGroup
|
||||
} from '@/utils/qc-work-order-inbound-sample-cards'
|
||||
import type { QcWorkOrderCardMetaConfig } from '@/utils/qc-work-order-card-meta'
|
||||
import {
|
||||
cardMetaUsesInboundGroups,
|
||||
@@ -144,7 +156,6 @@
|
||||
cardMetaUsesGroupedList
|
||||
} from '@/utils/qc-work-order-card-meta'
|
||||
import { isAllQcWorkOrderTab } from '@/utils/qc-work-order-tabs'
|
||||
import QcWorkOrderProtocolGroup from './QcWorkOrderProtocolGroup.vue'
|
||||
import QcWorkOrderSampleGroup from './QcWorkOrderSampleGroup.vue'
|
||||
import QcWorkOrderSingleCard from './QcWorkOrderSingleCard.vue'
|
||||
|
||||
@@ -193,9 +204,9 @@
|
||||
|
||||
const allTabListItems = computed(() => buildAllTabListItems(props.rows))
|
||||
|
||||
const protocolGroupedRows = computed(() => {
|
||||
const inboundSampleListItems = computed(() => {
|
||||
if (!cardMetaUsesInboundGroups(props.cardMetaConfig.tabKey)) return []
|
||||
return groupInboundQcWorkOrdersByProtocol(props.rows)
|
||||
return buildInboundSampleListItems(props.rows)
|
||||
})
|
||||
|
||||
const groupedRows = computed(() => {
|
||||
@@ -213,6 +224,10 @@
|
||||
if (item.kind === 'sample-group') return `group-${item.group.groupKey}`
|
||||
return item.row.id || `standalone-${idx}`
|
||||
}
|
||||
|
||||
function allTabInboundAnchorId(group: QcWorkOrderSampleGroupModel) {
|
||||
return buildInboundSampleCardAnchorId(group.groupKey)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@@ -228,8 +243,7 @@
|
||||
padding: 16px;
|
||||
background: #f1f5f9;
|
||||
|
||||
:deep(.qc-sample-row),
|
||||
:deep(.qc-protocol-row) {
|
||||
:deep(.qc-sample-row) {
|
||||
box-shadow:
|
||||
0 1px 3px rgba(15, 23, 42, 0.06),
|
||||
0 1px 2px rgba(15, 23, 42, 0.04);
|
||||
|
||||
@@ -6,12 +6,13 @@
|
||||
:class="{ 'qc-protocol-row__ctx--has-sample-tabs': group.sampleGroups.length > 1 }"
|
||||
>
|
||||
<div class="qc-protocol-row__ctx-left">
|
||||
<QcWorkOrderSelectCheckbox :work-order-ids="activeSampleGroupWorkOrderIds" />
|
||||
<QcUnfinishedBadge :count="groupUnfinishedBadgeCount" />
|
||||
<span class="qc-protocol-row__idx">{{ groupIndex }}</span>
|
||||
<SampleCodeWithSpecialDisplay
|
||||
v-if="group.sampleGroups.length === 1"
|
||||
class="qc-protocol-row__sample-code"
|
||||
:sample-code="group.sampleGroups[0]?.sampleCode"
|
||||
:sample-code="singleSampleGroupTitle(group.sampleGroups[0])"
|
||||
:is-special="!!group.sampleGroups[0]?.workOrders[0]?.isSpecial"
|
||||
:special-remark="group.sampleGroups[0]?.workOrders[0]?.specialRemark"
|
||||
monospace
|
||||
@@ -52,7 +53,7 @@
|
||||
<span class="qc-wo-tab__index">{{ tabIndex + 1 }}</span>
|
||||
<SampleCodeWithSpecialDisplay
|
||||
class="qc-wo-tab__no"
|
||||
:sample-code="sampleGroup.sampleCode"
|
||||
:sample-code="sampleGroupTitle(sampleGroup)"
|
||||
:is-special="!!sampleGroup.workOrders[0]?.isSpecial"
|
||||
:special-remark="sampleGroup.workOrders[0]?.specialRemark"
|
||||
monospace
|
||||
@@ -140,6 +141,7 @@
|
||||
import SampleCodeWithSpecialDisplay from '@/components/business/sample-code-with-special-display/index.vue'
|
||||
import {
|
||||
buildProtocolGroupProgressLabel,
|
||||
resolveInboundSampleGroupCardTitle,
|
||||
resolveProtocolGroupPaymentSummary,
|
||||
resolveProtocolGroupStatus
|
||||
} from '@/utils/qc-work-order-card-meta'
|
||||
@@ -147,6 +149,7 @@
|
||||
import QcWorkOrderProtocolPaymentPanel from './QcWorkOrderProtocolPaymentPanel.vue'
|
||||
import { sumQcWorkOrderGroupUnfinishedBadgeCount } from '@/utils/qc-work-order-unfinished-badge'
|
||||
import QcUnfinishedBadge from './QcUnfinishedBadge.vue'
|
||||
import QcWorkOrderSelectCheckbox from './QcWorkOrderSelectCheckbox.vue'
|
||||
import SampleSpecialMarkDialog from '@/components/business/sample-special-mark-dialog/index.vue'
|
||||
import { resolveInboundSampleSpecialMarkTarget } from '@/utils/inbound-sample-special-mark'
|
||||
import { EditPen } from '@element-plus/icons-vue'
|
||||
@@ -186,6 +189,15 @@
|
||||
return sampleGroup.groupKey
|
||||
}
|
||||
|
||||
function sampleGroupTitle(sampleGroup: QcWorkOrderSampleGroupModel) {
|
||||
return resolveInboundSampleGroupCardTitle(sampleGroup.workOrders)
|
||||
}
|
||||
|
||||
function singleSampleGroupTitle(sampleGroup?: QcWorkOrderSampleGroupModel) {
|
||||
if (!sampleGroup) return '—'
|
||||
return sampleGroupTitle(sampleGroup)
|
||||
}
|
||||
|
||||
const activeSampleKey = ref(
|
||||
props.group.sampleGroups[0] ? sampleTabKey(props.group.sampleGroups[0]) : ''
|
||||
)
|
||||
@@ -204,6 +216,10 @@
|
||||
props.group.sampleGroups.find((g) => sampleTabKey(g) === activeSampleKey.value)
|
||||
)
|
||||
|
||||
const activeSampleGroupWorkOrderIds = computed(
|
||||
() => activeSampleGroup.value?.workOrders.map((wo) => wo.id) || []
|
||||
)
|
||||
|
||||
const activeSampleSpecialMarkTarget = computed(() => {
|
||||
const group = activeSampleGroup.value
|
||||
if (!group) return null
|
||||
|
||||
@@ -1,17 +1,36 @@
|
||||
<!-- 质检工单 · 同样本分组(上下文条 + Tab + 单工单卡片) -->
|
||||
<template>
|
||||
<article class="qc-sample-row">
|
||||
<article :id="cardAnchorId || undefined" class="qc-sample-row">
|
||||
<div v-if="!hideContextBar" class="qc-sample-row__ctx">
|
||||
<QcWorkOrderSelectCheckbox :work-order-ids="sampleGroupWorkOrderIds" />
|
||||
<QcUnfinishedBadge :count="groupUnfinishedBadgeCount" />
|
||||
<span class="qc-sample-row__idx">{{ groupIndex }}</span>
|
||||
<SampleCodeWithSpecialDisplay
|
||||
class="qc-sample-row__code"
|
||||
:sample-code="group.groupTitle || group.sampleCode"
|
||||
:is-special="!!group.workOrders[0]?.isSpecial"
|
||||
:special-remark="group.workOrders[0]?.specialRemark"
|
||||
:sample-code="groupContextTitle"
|
||||
:is-special="!!contextRow?.isSpecial"
|
||||
:special-remark="contextRow?.specialRemark"
|
||||
monospace
|
||||
/>
|
||||
<span class="qc-sample-row__sub">{{ contextSubtitle }}</span>
|
||||
<div
|
||||
v-if="protocolSiblingLinks.length > 1"
|
||||
class="qc-sample-row__protocol-inline"
|
||||
aria-label="同协议样本"
|
||||
>
|
||||
<span class="qc-sample-row__protocol-label">同协议样本</span>
|
||||
<span
|
||||
v-for="link in protocolSiblingLinks"
|
||||
:key="link.anchorId"
|
||||
class="qc-sample-row__protocol-chip"
|
||||
:class="{ 'is-current': link.anchorId === cardAnchorId }"
|
||||
>
|
||||
<span class="qc-sample-row__protocol-chip-code">{{ link.labStorageCode }}</span>
|
||||
<span v-if="link.sampleTypeName" class="qc-sample-row__protocol-chip-type">
|
||||
{{ link.sampleTypeName }}
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<el-tag v-if="showInboundProtocolStatus" :type="protocolStatus.tagType" size="small">
|
||||
{{ protocolStatus.label }}
|
||||
</el-tag>
|
||||
@@ -25,6 +44,13 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<QcWorkOrderProtocolPaymentPanel
|
||||
v-if="!hideContextBar && showProtocolPaymentAtGroup && protocolPaymentSummary"
|
||||
:summary="protocolPaymentSummary"
|
||||
compact
|
||||
class="qc-sample-row__fee"
|
||||
/>
|
||||
|
||||
<div v-if="group.workOrders.length > 1" class="qc-wo-indep-tabs">
|
||||
<div class="qc-wo-indep-tabs__row" role="tablist" aria-label="同样本质检工单">
|
||||
<button
|
||||
@@ -41,10 +67,7 @@
|
||||
@click="activeWorkOrderId = wo.id"
|
||||
>
|
||||
<span class="qc-wo-tab__index">{{ tabIndex + 1 }}</span>
|
||||
<span
|
||||
class="qc-wo-tab__source"
|
||||
:class="triggerSourceTabClass(wo.triggerSource)"
|
||||
>
|
||||
<span class="qc-wo-tab__source" :class="triggerSourceTabClass(wo.triggerSource)">
|
||||
<span class="qc-wo-tab__dot"></span>
|
||||
{{ triggerSourceTabLabel(wo) }}
|
||||
</span>
|
||||
@@ -71,7 +94,7 @@
|
||||
:task-list-mode="taskListMode"
|
||||
:preset-tasks="activePresetTasks"
|
||||
:preset-batches="activePresetBatches"
|
||||
:hide-protocol-fee-summary="hideProtocolFeeSummary"
|
||||
:hide-protocol-fee-summary="hideProtocolFeeSummary || showProtocolPaymentAtGroup"
|
||||
:hide-sample-special-in-title="!hideContextBar"
|
||||
@configure="(row) => emit('configure', row)"
|
||||
@view="(row) => emit('view', row)"
|
||||
@@ -102,11 +125,19 @@
|
||||
} from '@/utils/qc-work-order-groups'
|
||||
import type { QcWorkOrderCardMetaConfig } from '@/utils/qc-work-order-card-meta'
|
||||
import SampleCodeWithSpecialDisplay from '@/components/business/sample-code-with-special-display/index.vue'
|
||||
import { buildGroupContextSubtitle, cardMetaUsesInboundGroups, resolveInboundWorkOrderCardTitle, resolveProtocolGroupStatus } from '@/utils/qc-work-order-card-meta'
|
||||
import {
|
||||
buildGroupContextSubtitle,
|
||||
cardMetaUsesInboundGroups,
|
||||
resolveInboundSampleGroupCardTitle,
|
||||
resolveProtocolGroupStatus
|
||||
} from '@/utils/qc-work-order-card-meta'
|
||||
import type { QcInboundProtocolSiblingLink } from '@/utils/qc-work-order-inbound-sample-cards'
|
||||
import { resolveEffectiveRowTabKey } from '@/utils/qc-work-order-tabs'
|
||||
import { sumQcWorkOrderGroupUnfinishedBadgeCount } from '@/utils/qc-work-order-unfinished-badge'
|
||||
import QcUnfinishedBadge from './QcUnfinishedBadge.vue'
|
||||
import QcWorkOrderSelectCheckbox from './QcWorkOrderSelectCheckbox.vue'
|
||||
import QcWorkOrderSingleCard from './QcWorkOrderSingleCard.vue'
|
||||
import QcWorkOrderProtocolPaymentPanel from './QcWorkOrderProtocolPaymentPanel.vue'
|
||||
import SampleSpecialMarkDialog from '@/components/business/sample-special-mark-dialog/index.vue'
|
||||
import { resolveInboundSampleSpecialMarkTarget } from '@/utils/inbound-sample-special-mark'
|
||||
import { EditPen } from '@element-plus/icons-vue'
|
||||
@@ -126,13 +157,19 @@
|
||||
presetBatchesByWorkOrderId?: Record<string, QcInspectionBatch[]>
|
||||
hideContextBar?: boolean
|
||||
hideProtocolFeeSummary?: boolean
|
||||
cardAnchorId?: string
|
||||
protocolSiblingLinks?: QcInboundProtocolSiblingLink[]
|
||||
showProtocolPaymentAtGroup?: boolean
|
||||
}>(),
|
||||
{
|
||||
showWorkOrderOps: true,
|
||||
showWorkOrderViewOnly: false,
|
||||
taskListMode: 'workOrder',
|
||||
hideContextBar: false,
|
||||
hideProtocolFeeSummary: false
|
||||
hideProtocolFeeSummary: false,
|
||||
cardAnchorId: '',
|
||||
protocolSiblingLinks: () => [],
|
||||
showProtocolPaymentAtGroup: false
|
||||
}
|
||||
)
|
||||
|
||||
@@ -227,11 +264,26 @@
|
||||
sumQcWorkOrderGroupUnfinishedBadgeCount(props.group.workOrders)
|
||||
)
|
||||
|
||||
function workOrderTabTitle(wo: QcWorkOrder) {
|
||||
const tabKey = resolveEffectiveRowTabKey(props.cardMetaConfig.tabKey, wo)
|
||||
if (cardMetaUsesInboundGroups(tabKey)) {
|
||||
return resolveInboundWorkOrderCardTitle(wo)
|
||||
const sampleGroupWorkOrderIds = computed(() => props.group.workOrders.map((wo) => wo.id))
|
||||
|
||||
const protocolPaymentSummary = computed(() => {
|
||||
for (const wo of props.group.workOrders) {
|
||||
if (wo.paymentSummary) return wo.paymentSummary
|
||||
}
|
||||
return null
|
||||
})
|
||||
|
||||
const groupContextTitle = computed(() => {
|
||||
const row = contextRow.value
|
||||
if (!row) return '—'
|
||||
const tabKey = resolveEffectiveRowTabKey(props.cardMetaConfig.tabKey, row)
|
||||
if (cardMetaUsesInboundGroups(tabKey)) {
|
||||
return resolveInboundSampleGroupCardTitle(props.group.workOrders)
|
||||
}
|
||||
return (props.group.groupTitle || props.group.sampleCode || '').trim() || '—'
|
||||
})
|
||||
|
||||
function workOrderTabTitle(wo: QcWorkOrder) {
|
||||
return wo.workOrderNo || '—'
|
||||
}
|
||||
|
||||
@@ -241,6 +293,10 @@
|
||||
if (status === 'yzf') return 'danger'
|
||||
return 'info'
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
activeWorkOrderId
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@@ -260,6 +316,57 @@
|
||||
border-color: #a8d4c4;
|
||||
box-shadow: 0 2px 8px rgba(4, 120, 87, 0.08);
|
||||
}
|
||||
|
||||
&--highlight {
|
||||
border-color: var(--primary, #10b981);
|
||||
box-shadow: 0 0 0 2px rgb(16 185 129 / 18%);
|
||||
}
|
||||
}
|
||||
|
||||
.qc-sample-row__protocol-inline {
|
||||
display: inline-flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 6px 8px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.qc-sample-row__protocol-label {
|
||||
flex-shrink: 0;
|
||||
font-size: 12px;
|
||||
color: var(--mint-text-muted, #64748b);
|
||||
}
|
||||
|
||||
.qc-sample-row__protocol-chip {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
min-height: 26px;
|
||||
padding: 2px 10px;
|
||||
border: 1px solid #d1fae5;
|
||||
border-radius: 999px;
|
||||
background: #fff;
|
||||
font-size: 12px;
|
||||
color: #047857;
|
||||
|
||||
&.is-current {
|
||||
border-color: var(--primary, #10b981);
|
||||
background: var(--primary-bg, #ecfdf5);
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
.qc-sample-row__protocol-chip-code {
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
||||
}
|
||||
|
||||
.qc-sample-row__protocol-chip-type {
|
||||
font-size: 11px;
|
||||
color: var(--mint-text-muted, #64748b);
|
||||
}
|
||||
|
||||
.qc-sample-row__fee {
|
||||
border-bottom: 1px solid #e2e8f0;
|
||||
}
|
||||
|
||||
.qc-sample-row__ctx {
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
<!-- 质检工单 · 标题栏多选(单工单 / 同一样本 sibling 工单组) -->
|
||||
<template>
|
||||
<el-checkbox
|
||||
v-if="selection && hasSelectableIds"
|
||||
class="qc-work-order-select-checkbox"
|
||||
:model-value="checked"
|
||||
:indeterminate="indeterminate"
|
||||
aria-label="选择质检工单"
|
||||
@change="handleToggle"
|
||||
@click.stop
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, inject } from 'vue'
|
||||
import { QC_WORK_ORDER_SELECTION_KEY } from './composables/qc-work-order-selection'
|
||||
|
||||
defineOptions({ name: 'QcWorkOrderSelectCheckbox' })
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
/** 单工单勾选(出库/临时等) */
|
||||
workOrderId?: string
|
||||
/** 入库样本组:同一样本下全部 sibling 工单 id */
|
||||
workOrderIds?: string[]
|
||||
}>(),
|
||||
{
|
||||
workOrderId: '',
|
||||
workOrderIds: () => []
|
||||
}
|
||||
)
|
||||
|
||||
const selection = inject(QC_WORK_ORDER_SELECTION_KEY, null)
|
||||
|
||||
const groupIds = computed(() => {
|
||||
if (props.workOrderIds?.length) return props.workOrderIds.filter(Boolean)
|
||||
if (props.workOrderId) return [props.workOrderId]
|
||||
return []
|
||||
})
|
||||
|
||||
const hasSelectableIds = computed(() => groupIds.value.length > 0)
|
||||
|
||||
const isGroupMode = computed(() => (props.workOrderIds?.length || 0) > 0)
|
||||
|
||||
const checked = computed(() => {
|
||||
if (!selection || !hasSelectableIds.value) return false
|
||||
if (isGroupMode.value) return selection.isGroupSelected(groupIds.value)
|
||||
return selection.isSelected(groupIds.value[0])
|
||||
})
|
||||
|
||||
const indeterminate = computed(() => {
|
||||
if (!selection || !isGroupMode.value) return false
|
||||
return selection.isGroupIndeterminate(groupIds.value)
|
||||
})
|
||||
|
||||
function handleToggle() {
|
||||
if (!selection || !hasSelectableIds.value) return
|
||||
if (isGroupMode.value) {
|
||||
selection.toggleGroup(groupIds.value)
|
||||
return
|
||||
}
|
||||
selection.toggle(groupIds.value[0])
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.qc-work-order-select-checkbox {
|
||||
flex-shrink: 0;
|
||||
margin-right: 2px;
|
||||
}
|
||||
</style>
|
||||
@@ -9,30 +9,16 @@
|
||||
v-if="showStandaloneUnfinishedBadge"
|
||||
:count="unfinishedBadgeCount"
|
||||
/>
|
||||
<el-checkbox
|
||||
v-if="selection"
|
||||
class="qc-work-order-card__select"
|
||||
:model-value="selection.isSelected(row.id)"
|
||||
aria-label="选择质检工单"
|
||||
@change="handleSelectToggle"
|
||||
@click.stop
|
||||
<QcWorkOrderSelectCheckbox
|
||||
v-if="layout !== 'grouped'"
|
||||
:work-order-id="row.id"
|
||||
/>
|
||||
<span v-if="cardIndex != null" class="qc-work-order-card__index">{{ cardIndex }}</span>
|
||||
<span v-if="!showSampleSpecialTitle" class="qc-work-order-card__no">{{ cardTitle }}</span>
|
||||
<template v-else-if="showInboundReceptionSpecialTitle">
|
||||
<span class="qc-work-order-card__no">{{ cardTitle }} - </span>
|
||||
<SampleCodeWithSpecialDisplay
|
||||
class="qc-work-order-card__no"
|
||||
:sample-code="row.sampleCode"
|
||||
:is-special="true"
|
||||
:special-remark="row.specialRemark"
|
||||
monospace
|
||||
/>
|
||||
</template>
|
||||
<span v-if="showCardTitleText && !showSampleSpecialTitle" class="qc-work-order-card__no">{{ cardTitle }}</span>
|
||||
<SampleCodeWithSpecialDisplay
|
||||
v-else
|
||||
v-else-if="showCardTitleText && showSampleSpecialTitle"
|
||||
class="qc-work-order-card__no"
|
||||
:sample-code="row.sampleCode"
|
||||
:sample-code="specialSampleTitleCode"
|
||||
:is-special="true"
|
||||
:special-remark="row.specialRemark"
|
||||
monospace
|
||||
@@ -241,7 +227,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, inject, ref } from 'vue'
|
||||
import { computed, ref } from 'vue'
|
||||
import { Setting, View, More, EditPen, Delete } from '@element-plus/icons-vue'
|
||||
import type { QcWorkOrder, OutboundQcDetailProduct } from '@/api/qc-work-order'
|
||||
import type { QcTask } from '@/api/qc-task'
|
||||
@@ -276,12 +262,10 @@
|
||||
import SampleCodeWithSpecialDisplay from '@/components/business/sample-code-with-special-display/index.vue'
|
||||
import SampleSpecialMarkDialog from '@/components/business/sample-special-mark-dialog/index.vue'
|
||||
import { resolveInboundSampleSpecialMarkTargetFromRow } from '@/utils/inbound-sample-special-mark'
|
||||
import { QC_WORK_ORDER_SELECTION_KEY } from './composables/qc-work-order-selection'
|
||||
import QcWorkOrderSelectCheckbox from './QcWorkOrderSelectCheckbox.vue'
|
||||
|
||||
defineOptions({ name: 'QcWorkOrderSingleCard' })
|
||||
|
||||
const selection = inject(QC_WORK_ORDER_SELECTION_KEY, null)
|
||||
|
||||
type CardLayout = 'standalone' | 'inbound-grouped' | 'grouped'
|
||||
|
||||
const props = withDefaults(
|
||||
@@ -351,22 +335,26 @@
|
||||
return props.row.workOrderNo || '—'
|
||||
})
|
||||
|
||||
/** 入库分组内层卡片:协议组头/样本 Tab 已展示入库编码,标题行不再重复 */
|
||||
const showCardTitleText = computed(
|
||||
() =>
|
||||
!(cardMetaUsesInboundGroups(effectiveRowTabKey.value) && props.layout === 'grouped')
|
||||
)
|
||||
|
||||
const specialSampleTitleCode = computed(() => {
|
||||
if (cardMetaUsesInboundGroups(effectiveRowTabKey.value)) {
|
||||
return cardTitle.value
|
||||
}
|
||||
return String(props.row.sampleCode || '').trim()
|
||||
})
|
||||
|
||||
const showSampleSpecialTitle = computed(
|
||||
() =>
|
||||
!props.hideSampleSpecialInTitle &&
|
||||
!!props.row.isSpecial &&
|
||||
!!(props.row.sampleCode || '').trim()
|
||||
!!(specialSampleTitleCode.value || '').trim()
|
||||
)
|
||||
|
||||
const showInboundReceptionSpecialTitle = computed(() => {
|
||||
if (!cardMetaUsesInboundGroups(effectiveRowTabKey.value)) return false
|
||||
const ts = (props.row.triggerSource || 'reception').trim()
|
||||
if (ts !== 'reception') return false
|
||||
const title = cardTitle.value.trim()
|
||||
const sample = String(props.row.sampleCode || '').trim()
|
||||
return !!title && !!sample && title !== sample
|
||||
})
|
||||
|
||||
const showProtocolFeeSummary = computed(
|
||||
() =>
|
||||
!props.hideProtocolFeeSummary &&
|
||||
@@ -467,10 +455,6 @@
|
||||
if (canConfigureWorkOrder(row)) return true
|
||||
return canEditTemporaryWorkOrder() || canEditRemarkWorkOrder(row) || canDeleteWorkOrder(row)
|
||||
}
|
||||
|
||||
function handleSelectToggle() {
|
||||
selection?.toggle(props.row.id)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@@ -513,10 +497,6 @@
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.qc-work-order-card__select {
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
.qc-work-order-card__index {
|
||||
flex-shrink: 0;
|
||||
font-size: 12px;
|
||||
|
||||
+5
@@ -3,7 +3,12 @@ import type { InjectionKey, Ref } from 'vue'
|
||||
export type QcWorkOrderSelectionContext = {
|
||||
selectedWorkOrderIds: Ref<Set<string>>
|
||||
isSelected: (id: string) => boolean
|
||||
/** 单个工单勾选(非入库样本组场景) */
|
||||
toggle: (id: string) => void
|
||||
/** 入库样本组:同时勾选/取消同一样本下的全部 sibling 工单 */
|
||||
toggleGroup: (ids: string[]) => void
|
||||
isGroupSelected: (ids: string[]) => boolean
|
||||
isGroupIndeterminate: (ids: string[]) => boolean
|
||||
clear: () => void
|
||||
}
|
||||
|
||||
|
||||
+3
-1
@@ -9,6 +9,7 @@ import {
|
||||
runAttachmentZipExport,
|
||||
type AttachmentZipExportProgress
|
||||
} from '@/utils/qc-work-order-attachment-export'
|
||||
import { expandInboundWorkOrderIdsForExport } from '@/utils/qc-work-order-selection-expand'
|
||||
|
||||
const MAX_WORK_ORDERS_SOFT_LIMIT = 50
|
||||
const MAX_FILES_SOFT_LIMIT = 500
|
||||
@@ -60,7 +61,8 @@ export function useQcWorkOrderAttachmentExport() {
|
||||
}
|
||||
|
||||
const rowMap = new Map(workOrderRows.map((row) => [row.id, row]))
|
||||
const workOrders = selectedIds
|
||||
const expandedIds = expandInboundWorkOrderIdsForExport(selectedIds, workOrderRows)
|
||||
const workOrders = expandedIds
|
||||
.map((id) => rowMap.get(id))
|
||||
.filter((row): row is QcWorkOrder => !!row)
|
||||
|
||||
|
||||
+47
-20
@@ -1,5 +1,6 @@
|
||||
import { ref, reactive, computed, onMounted, type Ref } from 'vue'
|
||||
import { ref, reactive, computed, onMounted, watch, type Ref } from 'vue'
|
||||
import { fetchQcWorkOrderList, type QcWorkOrder } from '@/api/qc-work-order'
|
||||
import { fetchCellSampleTypeList } from '@/api/admin'
|
||||
import type { QcTask } from '@/api/qc-task'
|
||||
import {
|
||||
fetchAllMineTasks,
|
||||
@@ -14,18 +15,16 @@ import {
|
||||
tabUsesInfusionTimeFilter,
|
||||
keywordPlaceholderForTab,
|
||||
filterTimeLabelForTab,
|
||||
filterTimeHintForTab,
|
||||
isAllQcWorkOrderTab,
|
||||
isInboundSampleQcTab,
|
||||
resolveTabKeyFromWorkOrder,
|
||||
type QcWorkOrderTabKey
|
||||
} from '@/utils/qc-work-order-tabs'
|
||||
import { toAllTabListQuery } from '@/utils/qc-work-order-category'
|
||||
import { getCardMetaConfig } from '@/utils/qc-work-order-card-meta'
|
||||
import { joinWorkOrderStatusFilter } from '@/utils/status-tag-registry'
|
||||
import {
|
||||
fetchQcInspectionBatchesBatch,
|
||||
type QcInspectionBatch
|
||||
} from '@/utils/qc-inspection-batch'
|
||||
import { fetchAllPagedRecords } from '@/utils/fetch-paged-list'
|
||||
import { fetchQcInspectionBatchesBatch, type QcInspectionBatch } from '@/utils/qc-inspection-batch'
|
||||
|
||||
function shouldApplyTriggerSourceFilter(tabKey: QcWorkOrderTabKey, tabLayout: string) {
|
||||
if (isAllQcWorkOrderTab(tabKey)) return true
|
||||
@@ -43,32 +42,22 @@ export function useQcWorkOrderTabPage(
|
||||
const cardMetaConfig = computed(() => getCardMetaConfig(tabKey.value))
|
||||
const keywordPlaceholder = computed(() => keywordPlaceholderForTab(tabConfig.value))
|
||||
const filterTimeLabel = computed(() => filterTimeLabelForTab(tabConfig.value))
|
||||
const filterTimeHint = computed(() => {
|
||||
if (pageModeValue.value === 'mine') {
|
||||
const base = '仅展示指派给当前登录人的质检任务。'
|
||||
if (isAllQcWorkOrderTab(tabKey.value)) {
|
||||
return `${base}出库工单按输注/交付时间筛选请进入对应分类 Tab。`
|
||||
}
|
||||
return base
|
||||
}
|
||||
return filterTimeHintForTab(tabConfig.value)
|
||||
})
|
||||
|
||||
const searchForm = reactive({
|
||||
qcCategory: '',
|
||||
keyword: '',
|
||||
workOrderStatus: [] as string[],
|
||||
triggerSource: '',
|
||||
sampleTypeId: '',
|
||||
taskStatus: '',
|
||||
taskType: ''
|
||||
})
|
||||
const sampleTypeOptions = ref<{ id: string; label: string }[]>([])
|
||||
const createTimeRange = ref<[string, string] | null>(null)
|
||||
const filterExpanded = ref(false)
|
||||
const tableData = ref<QcWorkOrder[]>([])
|
||||
const presetTasksByWorkOrderId = ref<Record<string, QcTask[]>>({})
|
||||
const presetBatchesByWorkOrderId = ref<Record<string, QcInspectionBatch[]> | undefined>(
|
||||
undefined
|
||||
)
|
||||
const presetBatchesByWorkOrderId = ref<Record<string, QcInspectionBatch[]> | undefined>(undefined)
|
||||
const loading = ref(false)
|
||||
const pagination = reactive({ page: 1, pageSize: 100, total: 0 })
|
||||
const taskSubListRefreshToken = ref(0)
|
||||
@@ -77,6 +66,12 @@ export function useQcWorkOrderTabPage(
|
||||
const viewWorkOrderId = ref('')
|
||||
const viewTabKey = ref<QcWorkOrderTabKey>(tabKey.value)
|
||||
|
||||
function resolveSampleTypeFilterName() {
|
||||
const id = (searchForm.sampleTypeId || '').trim()
|
||||
if (!id) return ''
|
||||
return sampleTypeOptions.value.find((opt) => opt.id === id)?.label || ''
|
||||
}
|
||||
|
||||
function buildMineWorkOrderSearchFilters() {
|
||||
const tab = tabConfig.value
|
||||
const timeParams =
|
||||
@@ -99,6 +94,7 @@ export function useQcWorkOrderTabPage(
|
||||
shouldApplyTriggerSourceFilter(tabKey.value, tab.listLayout) && searchForm.triggerSource
|
||||
? searchForm.triggerSource
|
||||
: undefined,
|
||||
sampleTypeName: resolveSampleTypeFilterName() || undefined,
|
||||
tabKey: tabKey.value,
|
||||
...timeParams
|
||||
}
|
||||
@@ -148,6 +144,10 @@ export function useQcWorkOrderTabPage(
|
||||
shouldApplyTriggerSourceFilter(tabKey.value, tab.listLayout) && searchForm.triggerSource
|
||||
? searchForm.triggerSource
|
||||
: undefined,
|
||||
sampleTypeId:
|
||||
isInboundSampleQcTab(tabKey.value) && searchForm.sampleTypeId
|
||||
? searchForm.sampleTypeId
|
||||
: undefined,
|
||||
...listQuery,
|
||||
...timeParams
|
||||
})
|
||||
@@ -175,6 +175,7 @@ export function useQcWorkOrderTabPage(
|
||||
searchForm.keyword = ''
|
||||
searchForm.workOrderStatus = []
|
||||
searchForm.triggerSource = ''
|
||||
searchForm.sampleTypeId = ''
|
||||
searchForm.taskStatus = ''
|
||||
searchForm.taskType = ''
|
||||
createTimeRange.value = null
|
||||
@@ -217,10 +218,36 @@ export function useQcWorkOrderTabPage(
|
||||
taskSubListRefreshToken.value += 1
|
||||
}
|
||||
|
||||
async function loadSampleTypeOptions() {
|
||||
if (!isInboundSampleQcTab(tabKey.value)) {
|
||||
sampleTypeOptions.value = []
|
||||
return
|
||||
}
|
||||
try {
|
||||
const list = await fetchAllPagedRecords((page, pageSize) =>
|
||||
fetchCellSampleTypeList({ page, pageSize })
|
||||
)
|
||||
sampleTypeOptions.value = list
|
||||
.map((row) => ({
|
||||
id: String(row.id || '').trim(),
|
||||
label: String(row.typeName || '').trim()
|
||||
}))
|
||||
.filter((opt) => opt.id && opt.label)
|
||||
} catch {
|
||||
sampleTypeOptions.value = []
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
void loadSampleTypeOptions()
|
||||
loadData()
|
||||
})
|
||||
|
||||
watch(tabKey, () => {
|
||||
searchForm.sampleTypeId = ''
|
||||
void loadSampleTypeOptions()
|
||||
})
|
||||
|
||||
watchDebounced(
|
||||
[searchForm, createTimeRange],
|
||||
() => {
|
||||
@@ -235,8 +262,8 @@ export function useQcWorkOrderTabPage(
|
||||
cardMetaConfig,
|
||||
keywordPlaceholder,
|
||||
filterTimeLabel,
|
||||
filterTimeHint,
|
||||
searchForm,
|
||||
sampleTypeOptions,
|
||||
createTimeRange,
|
||||
filterExpanded,
|
||||
tableData,
|
||||
|
||||
@@ -570,9 +570,13 @@
|
||||
|
||||
onMounted(() => {
|
||||
const sampleCode = String(route.query.sampleCode || '').trim()
|
||||
activeTabKey.value = sampleCode
|
||||
const parsed = sampleCode
|
||||
? DEFAULT_QC_WORK_ORDER_TAB
|
||||
: parseQcWorkOrderTabKey(route.query.tab as string)
|
||||
activeTabKey.value = parsed
|
||||
if (!sampleCode && String(route.query.tab || '').trim() !== parsed) {
|
||||
router.replace({ query: { ...route.query, tab: parsed } })
|
||||
}
|
||||
if (sampleCode) {
|
||||
nextTick(() => activeTabRef.value?.setKeyword(sampleCode))
|
||||
}
|
||||
|
||||
@@ -114,7 +114,6 @@
|
||||
{{ filterExpanded ? '收起更多条件' : '展开更多条件' }}
|
||||
</el-button>
|
||||
</template>
|
||||
<span v-else class="filter-hint">{{ filterTimeHint }}</span>
|
||||
<div class="filter-actions-end">
|
||||
<el-button class="btn-ghost" @click="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
@@ -124,13 +123,11 @@
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<p v-if="isAllTab" class="filter-hint filter-hint--below">{{ filterTimeHint }}</p>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<div v-else class="filter-block">
|
||||
<el-form :model="searchForm" class="filter-form" label-position="top" @submit.prevent>
|
||||
<p class="filter-hint">{{ filterTimeHint }}</p>
|
||||
<div
|
||||
class="filter-grid my-qc-task-filter-main-grid"
|
||||
:class="{ 'my-qc-task-filter-all-grid': isAllTab }"
|
||||
@@ -301,6 +298,20 @@
|
||||
>
|
||||
<el-icon><Download /></el-icon>导出附件
|
||||
</el-button>
|
||||
<template v-if="showSampleTypeToolbarChips">
|
||||
<span class="qc-sample-type-toolbar-divider" aria-hidden="true" />
|
||||
<button
|
||||
v-for="opt in sampleTypeToolbarOptions"
|
||||
:key="opt.id || 'all'"
|
||||
type="button"
|
||||
class="qc-sample-type-chip"
|
||||
:class="{ 'is-active': isSampleTypeChipActive(opt.id) }"
|
||||
:aria-pressed="String(isSampleTypeChipActive(opt.id))"
|
||||
@click="handleSampleTypeChipClick(opt.id)"
|
||||
>
|
||||
{{ opt.label }}
|
||||
</button>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -344,7 +355,7 @@
|
||||
import { Search, RefreshLeft, Plus, ArrowDown, ArrowUp, Download } from '@element-plus/icons-vue'
|
||||
import type { QcWorkOrder } from '@/api/qc-work-order'
|
||||
import type { QcWorkOrderTabKey } from '@/utils/qc-work-order-tabs'
|
||||
import { isAllQcWorkOrderTab } from '@/utils/qc-work-order-tabs'
|
||||
import { isAllQcWorkOrderTab, isInboundSampleQcTab } from '@/utils/qc-work-order-tabs'
|
||||
import {
|
||||
QC_WORK_ORDER_CATEGORY_OPTIONS,
|
||||
QC_ALL_TAB_TRIGGER_SOURCE_OPTIONS
|
||||
@@ -378,6 +389,7 @@
|
||||
const pageModeComputed = computed(() => props.pageMode || 'manage')
|
||||
const tabKeyRef = toRef(props, 'tabKey')
|
||||
const isAllTab = computed(() => isAllQcWorkOrderTab(props.tabKey))
|
||||
const isInboundSampleTab = computed(() => isInboundSampleQcTab(props.tabKey))
|
||||
|
||||
const selectedWorkOrderIds = ref<Set<string>>(new Set())
|
||||
|
||||
@@ -394,6 +406,27 @@
|
||||
else next.add(id)
|
||||
selectedWorkOrderIds.value = next
|
||||
},
|
||||
toggleGroup: (ids: string[]) => {
|
||||
const validIds = ids.filter(Boolean)
|
||||
if (!validIds.length) return
|
||||
const next = new Set(selectedWorkOrderIds.value)
|
||||
const allSelected = validIds.every((id) => next.has(id))
|
||||
for (const id of validIds) {
|
||||
if (allSelected) next.delete(id)
|
||||
else next.add(id)
|
||||
}
|
||||
selectedWorkOrderIds.value = next
|
||||
},
|
||||
isGroupSelected: (ids: string[]) => {
|
||||
const validIds = ids.filter(Boolean)
|
||||
return validIds.length > 0 && validIds.every((id) => selectedWorkOrderIds.value.has(id))
|
||||
},
|
||||
isGroupIndeterminate: (ids: string[]) => {
|
||||
const validIds = ids.filter(Boolean)
|
||||
if (validIds.length <= 1) return false
|
||||
const selectedInGroup = validIds.filter((id) => selectedWorkOrderIds.value.has(id)).length
|
||||
return selectedInGroup > 0 && selectedInGroup < validIds.length
|
||||
},
|
||||
clear: clearWorkOrderSelection
|
||||
})
|
||||
|
||||
@@ -404,8 +437,8 @@
|
||||
cardMetaConfig,
|
||||
keywordPlaceholder,
|
||||
filterTimeLabel,
|
||||
filterTimeHint,
|
||||
searchForm,
|
||||
sampleTypeOptions,
|
||||
createTimeRange,
|
||||
filterExpanded,
|
||||
tableData,
|
||||
@@ -428,6 +461,14 @@
|
||||
bumpTaskRefresh
|
||||
} = useQcWorkOrderTabPage(tabKeyRef, pageModeComputed)
|
||||
|
||||
const showSampleTypeToolbarChips = computed(
|
||||
() => isInboundSampleTab.value && sampleTypeOptions.value.length > 0
|
||||
)
|
||||
const sampleTypeToolbarOptions = computed(() => [
|
||||
{ id: '', label: '全部' },
|
||||
...sampleTypeOptions.value
|
||||
])
|
||||
|
||||
const {
|
||||
progressVisible,
|
||||
exportRunning,
|
||||
@@ -449,6 +490,17 @@
|
||||
baseHandleReset()
|
||||
}
|
||||
|
||||
function isSampleTypeChipActive(typeId: string) {
|
||||
return (searchForm.sampleTypeId || '') === (typeId || '')
|
||||
}
|
||||
|
||||
function handleSampleTypeChipClick(typeId: string) {
|
||||
const nextId = typeId || ''
|
||||
if ((searchForm.sampleTypeId || '') === nextId) return
|
||||
clearWorkOrderSelection()
|
||||
searchForm.sampleTypeId = nextId
|
||||
}
|
||||
|
||||
function handleWorkOrderPageChange(page: number) {
|
||||
clearWorkOrderSelection()
|
||||
onWorkOrderPageChange(page)
|
||||
@@ -498,10 +550,6 @@
|
||||
grid-template-columns: repeat(5, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.filter-hint--below {
|
||||
margin: 8px 0 0;
|
||||
}
|
||||
|
||||
@media (max-width: 1100px) {
|
||||
.my-qc-task-filter-main-grid,
|
||||
.my-qc-task-filter-extra-grid {
|
||||
@@ -547,4 +595,43 @@
|
||||
.btn-filter-toggle-ic {
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.qc-sample-type-toolbar-divider {
|
||||
width: 1px;
|
||||
height: 24px;
|
||||
margin: 0 4px;
|
||||
background: var(--mint-border, #e2e8f0);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.qc-sample-type-chip {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
height: 32px;
|
||||
padding: 0 12px;
|
||||
border: 1px solid var(--mint-border, #e2e8f0);
|
||||
border-radius: 999px;
|
||||
background: var(--default-box-color, #fff);
|
||||
font-family: inherit;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
color: var(--mint-text-muted, #64748b);
|
||||
cursor: pointer;
|
||||
transition:
|
||||
border-color 0.15s,
|
||||
background 0.15s,
|
||||
color 0.15s;
|
||||
}
|
||||
|
||||
.qc-sample-type-chip:hover {
|
||||
border-color: #a7f3d0;
|
||||
color: var(--mint-primary-dark, #059669);
|
||||
}
|
||||
|
||||
.qc-sample-type-chip.is-active {
|
||||
background: var(--mint-primary-bg, #ecfdf5);
|
||||
border-color: #a7f3d0;
|
||||
color: var(--mint-primary-dark, #059669);
|
||||
font-weight: 600;
|
||||
}
|
||||
</style>
|
||||
@@ -26,7 +26,6 @@
|
||||
</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="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
|
||||
@@ -60,13 +60,6 @@
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="filter-actions-row">
|
||||
<span class="filter-hint">
|
||||
{{
|
||||
activeTab === 'pending'
|
||||
? '勾选多个样本后可批量接收。'
|
||||
: '双击卡片可查看接收详情。'
|
||||
}}
|
||||
</span>
|
||||
<div class="filter-actions-end">
|
||||
<el-button class="btn-ghost" @click="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
@@ -305,14 +298,10 @@
|
||||
label="实验室入库编码"
|
||||
prop="labStorageCode"
|
||||
>
|
||||
<template #label>
|
||||
实验室入库编码<span class="form-label-tip">保存后不可修改</span>
|
||||
</template>
|
||||
<el-input
|
||||
v-model="receiveForm.labStorageCode"
|
||||
placeholder="请填写"
|
||||
clearable
|
||||
:disabled="labStorageCodeReadonly"
|
||||
@input="onLabStorageCodeManualInput"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -906,10 +895,6 @@
|
||||
() => receiveForm.acceptConclusion === 'js'
|
||||
)
|
||||
|
||||
const labStorageCodeReadonly = computed(
|
||||
() => receiveDialogMode.value === 'edit' && !!receiveForm.labStorageCode
|
||||
)
|
||||
|
||||
const receiveRules = {
|
||||
receptionTime: [{ required: true, message: '请选择样本接收时间', trigger: 'change' }],
|
||||
handlerUserId: [{ required: true, message: '请选择经手人', trigger: 'change' }],
|
||||
@@ -1156,7 +1141,6 @@
|
||||
receiveForm.labStorageCode = ''
|
||||
return
|
||||
}
|
||||
if (labStorageCodeReadonly.value) return
|
||||
if (!force && labStorageCodeManuallyEdited.value) return
|
||||
|
||||
const row = currentRow.value
|
||||
@@ -1176,7 +1160,7 @@
|
||||
|
||||
async function onReceiveReceptionTimeChange() {
|
||||
const date = extractReceptionDate(receiveForm.receptionTime)
|
||||
if (!date || receiveForm.acceptConclusion !== 'js' || labStorageCodeReadonly.value) return
|
||||
if (!date || receiveForm.acceptConclusion !== 'js') return
|
||||
if (labStorageCodeManuallyEdited.value) return
|
||||
refreshReceiveLabStorageCode(true)
|
||||
}
|
||||
@@ -1188,7 +1172,6 @@
|
||||
lastAllocatedReceptionDate.value = ''
|
||||
return
|
||||
}
|
||||
if (labStorageCodeReadonly.value) return
|
||||
refreshReceiveLabStorageCode(true)
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,6 @@
|
||||
</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="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
|
||||
@@ -53,9 +53,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -53,9 +53,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -23,9 +23,6 @@
|
||||
</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="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -28,9 +28,7 @@
|
||||
|
||||
<div class="filter-block">
|
||||
<el-form :model="searchForm" class="filter-form" label-position="top">
|
||||
<p class="filter-hint"
|
||||
>支持按订单状态、配送状态、支付状态等维度快速筛选;可展开更多条件进行精细检索。</p
|
||||
>
|
||||
|
||||
<div class="filter-grid order-filter-main-grid">
|
||||
<el-form-item label="关键词">
|
||||
<el-input
|
||||
@@ -2930,12 +2928,6 @@
|
||||
}
|
||||
|
||||
/* 订单检索区:对齐 fresh-mint-green.html 的筛选块节奏 */
|
||||
.filter-hint {
|
||||
margin: 0 0 10px;
|
||||
font-size: 11px;
|
||||
color: var(--mint-text-muted, #64748b);
|
||||
line-height: 1.45;
|
||||
}
|
||||
|
||||
.order-filter-main-grid {
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="filter-actions-row">
|
||||
<span class="filter-hint">支持按商品名称、SKU 与状态筛选。</span>
|
||||
<div class="filter-actions-end">
|
||||
<el-button class="btn-ghost" @click="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -49,7 +49,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
</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="handleReset"
|
||||
><el-icon><RefreshLeft /></el-icon>重置</el-button
|
||||
|
||||
Reference in new issue
Block a user