已提交药房的处方也可作废:先远端撤单再作废

- 洛阳药房:作废时先调用 POST /api/openapi/v1/prescription-orders/{订单号}/cancel 撤单,确认 CANCELLED 后再作废并挂起订单;
  远端拒绝(已发货/已扣库存,409)或未确认时不作废并提示原因;撤单写订单日志。撤单后的订单重新审核通过后以新版本提交药房
- 甘草:暂无撤单接口,须先在甘草撤单;甘草回传撤单/驳回(91/92)后可作废
- 远端已确认取消且无在途新版本提交时,订单不再被药房快照锁定
- 列表与详情的 can_void 按「能否自动撤单」判断
- 重新构建管理后台

Co-Authored-By: Claude Opus 5 <[EMAIL]>
This commit is contained in:
Your Name
2026-11-30 11:47:14 +08:00
co-authored by Claude Opus 5
parent b55f30753c
commit 365b16c14d
388 changed files with 540 additions and 360 deletions
@@ -2167,7 +2167,7 @@ const handleVoid = async () => {
if (!id) return
try {
await feedback.confirm(Number(savedPrescription.value?.has_prescription_order) === 1
? '确定要作废该处方吗?作废后不可恢复;关联的业务订单将退回待审核,同诊单重新开方后自动关联到新处方。'
? '确定要作废该处方吗?作废后不可恢复;已提交洛阳药房的订单会先撤销药房订单,关联的业务订单将退回待审核,同诊单重新开方后自动关联到新处方。'
: '确定要作废该处方吗?作废后不可恢复。')
voiding.value = true
await prescriptionVoid({ id })
@@ -3367,7 +3367,7 @@ async function voidPendingPrescription(row: VoidablePrescriptionRow) {
voidingPrescriptionId.value = id
try {
await feedback.confirm(Number((row as { has_prescription_order?: number }).has_prescription_order) === 1
? '确定作废这张处方吗?关联的业务订单将退回待审核,同诊单重新开方后自动关联到新处方。'
? '确定作废这张处方吗?已提交洛阳药房的订单会先撤销药房订单;关联的业务订单将退回待审核,同诊单重新开方后自动关联到新处方。'
: '确定作废这张处方吗?作废后可重新开方。')
await prescriptionVoid({ id })
row.void_status = 1