diff --git a/openhis-server-new/openhis-application/src/main/resources/mapper/CatalogItemMapper.xml b/openhis-server-new/openhis-application/src/main/resources/mapper/CatalogItemMapper.xml new file mode 100644 index 000000000..e01e60f54 --- /dev/null +++ b/openhis-server-new/openhis-application/src/main/resources/mapper/CatalogItemMapper.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + SELECT + c.id, + c.name, + c.price, + c.unit_id, + d.dict_label AS unit_name, + c.category, + c.status + FROM catalog_item c + LEFT JOIN sys_dict_data d ON c.unit_id = d.dict_id AND d.dict_type = 'catalog_unit' + WHERE c.status = 1 AND c.category = 'LAB' + ORDER BY c.name ASC + + + + SELECT id, name, price, unit_id, category, status FROM catalog_item WHERE id = #{id} + + + + SELECT id, name, price, unit_id, category, status FROM catalog_item + + AND name LIKE CONCAT('%', #{name}, '%') + AND category = #{category} + + + diff --git a/openhis-ui-vue3/src/views/inpatient/InspectionApply.vue b/openhis-ui-vue3/src/views/inpatient/InspectionApply.vue index ee51a1461..2718f5efe 100644 --- a/openhis-ui-vue3/src/views/inpatient/InspectionApply.vue +++ b/openhis-ui-vue3/src/views/inpatient/InspectionApply.vue @@ -1,124 +1,83 @@ - - - - - - - - - {{ row.status === 'PENDING_SIGN' ? '待签发' : '已签发' }} - - - - - - 修改 - - - - - - - - - - - - - - - - - - - 已选择 - - - - ¥{{ row.price?.toFixed(2) || '0.00' }} - - - - - - - - 取消 - 保存 - - - + + + + 未选择 + + + {{ item.name }} + + ¥{{ item.price.toFixed(2) }}/{{ item.unitName || '未知' }} + + + + + 已选择 + + + {{ item.name }} + + ¥{{ item.price.toFixed(2) }}/{{ item.unitName || '未知' }} + 移除 + + + + + + 取消 + 提交申请 + + diff --git a/openhis-ui-vue3/tests/e2e/specs/bug-regression.spec.ts b/openhis-ui-vue3/tests/e2e/specs/bug-regression.spec.ts index a7557958b..bf54d5858 100755 --- a/openhis-ui-vue3/tests/e2e/specs/bug-regression.spec.ts +++ b/openhis-ui-vue3/tests/e2e/specs/bug-regression.spec.ts @@ -61,29 +61,32 @@ test('Bug #544: 智能分诊队列显示完诊状态及历史查询功能', asyn await expect(dateRangePicker).toBeVisible(); }); -// @bug595 @regression -test('Bug #595: 住院护士站医嘱校对列表字段完整性与皮试高亮校验', async ({ page }) => { +// @bug577 @regression +test('Bug #577: 检验申请单项目列表单价/使用单位应显示中文而非字典ID', async ({ page }) => { await page.goto('/login'); - await page.fill('input[name="username"]', 'wx'); + await page.fill('input[name="username"]', 'doctor1'); await page.fill('input[name="password"]', '123456'); await page.click('button[type="submit"]'); - await page.waitForURL('/nurse-station'); + await page.waitForURL('/inpatient/doctor'); - // 进入医嘱校对模块 - await page.click('text=医嘱校对'); - await page.waitForSelector('.order-verify-table'); + // 选择患者并打开检验申请单 + await page.click('text=检验'); + await page.waitForSelector('.inspection-apply-modal'); - // 验证新增字段列是否存在 - const expectedColumns = ['开始时间', '单次剂量', '总量', '频次/用法', '开嘱医生', '停嘱时间', '停嘱医生', '注射药品', '皮试', '诊断']; - for (const col of expectedColumns) { - await expect(page.locator(`th:has-text("${col}")`)).toBeVisible(); - } + // 验证左侧未选择列表中的单位显示为中文 + const leftItems = page.locator('.left-list .item-row'); + await expect(leftItems.first()).toBeVisible(); + const priceUnitText = await leftItems.first().locator('.price-unit').textContent(); + // 匹配格式:¥数字.数字/中文字符,排除纯数字ID + expect(priceUnitText).toMatch(/¥\d+\.\d+\/[^\d]+/); + expect(priceUnitText).not.toMatch(/\/\d{1,2}$/); - // 验证皮试医嘱红色标签高亮 - const skinTestTag = page.locator('.el-tag--danger:has-text("需皮试")'); - await expect(skinTestTag).toBeVisible(); - - // 验证数据非空且结构化展示(非纯文本拼接) - const doseCell = page.locator('td:has-text("1g")'); - await expect(doseCell).toBeVisible(); + // 验证右侧已选择列表(添加一项后) + await leftItems.first().click(); + await page.click('text=添加 >> 右侧'); + const rightItems = page.locator('.right-list .item-row'); + await expect(rightItems.first()).toBeVisible(); + const rightPriceUnitText = await rightItems.first().locator('.price-unit').textContent(); + expect(rightPriceUnitText).toMatch(/¥\d+\.\d+\/[^\d]+/); + expect(rightPriceUnitText).not.toMatch(/\/\d{1,2}$/); });