挂号补单功能的完善

This commit is contained in:
2026-01-13 13:26:09 +08:00
parent ebd2e8aa75
commit e20e2b637f
7 changed files with 614 additions and 67 deletions

View File

@@ -0,0 +1,55 @@
#\u9519\u8BEF\u6D88\u606F
not.null=* \u5FC5\u987B\u586B\u5199
user.jcaptcha.error=\u9A8C\u8BC1\u7801\u9519\u8BEF
user.jcaptcha.expire=\u9A8C\u8BC1\u7801\u5DF2\u5931\u6548
user.not.exists=\u7528\u6237\u4E0D\u5B58\u5728/\u5BC6\u7801\u9519\u8BEF
user.password.not.match=\u7528\u6237\u4E0D\u5B58\u5728/\u5BC6\u7801\u9519\u8BEF
user.password.retry.limit.count=\u5BC6\u7801\u8F93\u5165\u9519\u8BEF{0}\u6B21
user.password.retry.limit.exceed=\u5BC6\u7801\u8F93\u5165\u9519\u8BEF{0}\u6B21\uFF0C\u5E10\u6237\u9501\u5B9A{1}\u5206\u949F
user.password.delete=\u5BF9\u4E0D\u8D77\uFF0C\u60A8\u7684\u8D26\u53F7\u5DF2\u88AB\u5220\u9664
user.blocked=\u7528\u6237\u5DF2\u5C01\u7981\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458
role.blocked=\u89D2\u8272\u5DF2\u5C01\u7981\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458
login.blocked=\u5F88\u9057\u61BE\uFF0C\u8BBF\u95EEIP\u5DF2\u88AB\u5217\u5165\u7CFB\u7EDF\u9ED1\u540D\u5355
user.logout.success=\u9000\u51FA\u6210\u529F
length.not.valid=\u957F\u5EA6\u5FC5\u987B\u5728{min}\u5230{max}\u4E2A\u5B57\u7B26\u4E4B\u95F4
user.username.not.valid=* 2\u523020\u4E2A\u6C49\u5B57\u3001\u5B57\u6BCD\u3001\u6570\u5B57\u6216\u4E0B\u5212\u7EBF\u7EC4\u6210\uFF0C\u4E14\u5FC5\u987B\u4EE5\u975E\u6570\u5B57\u5F00\u5934
user.password.not.valid=* 5-50\u4E2A\u5B57\u7B26
user.email.not.valid=\u90AE\u7BB1\u683C\u5F0F\u9519\u8BEF
user.mobile.phone.number.not.valid=\u624B\u673A\u53F7\u683C\u5F0F\u9519\u8BEF
user.login.success=\u767B\u5F55\u6210\u529F
user.register.success=\u6CE8\u518C\u6210\u529F
user.notfound=\u8BF7\u91CD\u65B0\u767B\u5F55
user.forcelogout=\u7BA1\u7406\u5458\u5F3A\u5236\u9000\u51FA\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55
user.unknown.error=\u672A\u77E5\u9519\u8BEF\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55
##\u6587\u4EF6\u4E0A\u4F20\u6D88\u606F
upload.exceed.maxSize=\u4E0A\u4F20\u7684\u6587\u4EF6\u5927\u5C0F\u8D85\u51FA\u9650\u5236\u7684\u6587\u4EF6\u5927\u5C0F\uFF01<br/>\u5141\u8BB8\u7684\u6587\u4EF6\u6700\u5927\u5927\u5C0F\u662F\uFF1A{0}MB\uFF01
upload.filename.exceed.length=\u4E0A\u4F20\u7684\u6587\u4EF6\u540D\u6700\u957F{0}\u4E2A\u5B57\u7B26
##\u6743\u9650
no.permission=\u60A8\u6CA1\u6709\u6570\u636E\u7684\u6743\u9650\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650 [{0}]
no.create.permission=\u60A8\u6CA1\u6709\u521B\u5EFA\u6570\u636E\u7684\u6743\u9650\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650 [{0}]
no.update.permission=\u60A8\u6CA1\u6709\u4FEE\u6539\u6570\u636E\u7684\u6743\u9650\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650 [{0}]
no.delete.permission=\u60A8\u6CA1\u6709\u5220\u9664\u6570\u636E\u7684\u6743\u9650\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650 [{0}]
no.export.permission=\u60A8\u6CA1\u6709\u5BFC\u51FA\u6570\u636E\u7684\u6743\u9650\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650 [{0}]
no.view.permission=\u60A8\u6CA1\u6709\u67E5\u770B\u6570\u636E\u7684\u6743\u9650\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650 [{0}]
apl.common.M00001={0}\u6DFB\u52A0\u6210\u529F
apl.common.M00002={0}\u4FDD\u5B58\u6210\u529F
apl.common.M00003={0}\u5DF2\u7ECF\u5B58\u5728
apl.common.M00004={0}\u64CD\u4F5C\u6210\u529F
apl.common.M00005={0}\u5220\u9664\u6210\u529F
apl.common.M00006=\u64CD\u4F5C\u5931\u8D25,\u8BE5\u6570\u636E\u5DF2\u88AB\u4ED6\u4EBA\u5220\u9664,\u8BF7\u5237\u65B0\u540E\u91CD\u8BD5
apl.common.M00007=\u64CD\u4F5C\u5931\u8D25,\u8BE5\u6570\u636E\u5DF2\u88AB\u4ED6\u4EBA\u66F4\u6539,\u8BF7\u5237\u65B0\u540E\u91CD\u8BD5
apl.common.M00008=\u8BF7\u52FF\u91CD\u590D\u63D0\u4EA4
apl.common.M00009=\u67E5\u8BE2\u6210\u529F
apl.common.M00010=\u64CD\u4F5C\u5931\u8D25,\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458
apl.chargeRefund.M00001=\u8BE5\u6536\u8D39\u5355\u76F8\u5173{0}\u5DF2\u7ECF\u53D1\u51FA\uFF0C\u8BF7\u5148\u9000\u836F\u540E\u518D\u8FDB\u884C\u9000\u8D39
apl.payment.M00001=\u5404\u7F34\u8D39\u6E20\u9053\u5B9E\u6536\u91D1\u989D\u5408\u8BA1\u4E0D\u7B49\u4E8E\u5B9E\u6536\u91D1\u989D
apl.payment.M00002=\u5B9E\u6536\u91D1\u989D\u5408\u8BA1\u4E0D\u7B49\u4E8E\u5E94\u6536\u91D1\u989D
apl.payment.M00003=\u8BF7\u9009\u62E9\u652F\u4ED8\u65B9\u5F0F
apl.payment.M00004=\u67E5\u8BE2\u6210\u529F
apl.payment.M00005=\u64CD\u4F5C\u5931\u8D25,\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458
apl.payment.M00006=\u6210\u529F\u6536\u8D39
apl.payment.M00007=\u672A\u67E5\u8BE2\u5230\u6536\u8D39\u9879\u76EE
apl.payment.M00008=\u672A\u67E5\u8BE2\u5230{0}\u8D26\u6237\u4FE1\u606F
apl.payment.M00009=\u672A\u67E5\u8BE2\u5230\u6536\u8D39\u9879\u76EE\uFF0C\u4E0D\u9700\u8981\u8F6C\u6362\u8D26\u6237
apl.adjustPrice.M00001=\u6267\u884C\u5931\u8D25\uFF0C\u672A\u52A0\u8F7D\u5230\u4EFB\u4F55\u6570\u636E\uFF01
apl.adjustPrice.M00002=\u6267\u884C\u5931\u8D25\uFF0C\u6539\u4EF7\u5355\u4E2D\u6709\u6B63\u5728\u5BA1\u6838\u4E2D\u7684\u8D27\u54C1\uFF0C\u8BF7\u68C0\u67E5\u540E\u91CD\u65B0\u63D0\u4EA4\uFF01

View File

@@ -44,29 +44,29 @@
</select> </select>
<select id="getCurrentDayEncounter" resultType="com.openhis.web.chargemanage.dto.CurrentDayEncounterDto"> <select id="getCurrentDayEncounter" resultType="com.openhis.web.chargemanage.dto.CurrentDayEncounterDto">
SELECT T9.tenant_id, SELECT T9.tenant_id AS tenantId,
T9.encounter_id, T9.encounter_id AS encounterId,
T9.organization_id, T9.organization_id AS organizationId,
T9.organization_name, T9.organization_name AS organizationName,
T9.healthcare_name, T9.healthcare_name AS healthcareName,
T9.practitioner_user_id, T9.practitioner_user_id AS practitionerUserId,
T9.practitioner_name, T9.practitioner_name AS practitionerName,
T9.contract_name, T9.contract_name AS contractName,
T9.patient_id, T9.patient_id AS patientId,
T9.patient_name, T9.patient_name AS patientName,
T9.phone, T9.phone,
T9.gender_enum, T9.gender_enum AS genderEnum,
T9.id_card, T9.id_card AS idCard,
T9.status_enum, T9.status_enum AS statusEnum,
T9.register_time, T9.register_time AS registerTime,
T9.total_price, T9.total_price AS totalPrice,
T9.account_name, T9.account_name AS accountName,
T9.enterer_name, T9.enterer_name AS entererName,
T9.charge_item_ids, T9.charge_item_ids AS chargeItemIds,
T9.payment_id, T9.payment_id AS paymentId,
T9.picture_url, T9.picture_url AS pictureUrl,
T9.birth_date, T9.birth_date AS birthDate,
T9.identifier_no T9.identifier_no AS identifierNo
from ( from (
SELECT T1.tenant_id AS tenant_id, SELECT T1.tenant_id AS tenant_id,
T1.id AS encounter_id, T1.id AS encounter_id,

View File

@@ -33,6 +33,8 @@
"pinia": "^2.2.0", "pinia": "^2.2.0",
"pinyin": "^4.0.0-alpha.2", "pinyin": "^4.0.0-alpha.2",
"province-city-china": "^8.5.8", "province-city-china": "^8.5.8",
"qrcode": "^1.5.4",
"qrcodejs2": "^0.0.2",
"react": "18.2.0", "react": "18.2.0",
"react-dom": "18.2.0", "react-dom": "18.2.0",
"segmentit": "^2.0.3", "segmentit": "^2.0.3",
@@ -2145,7 +2147,6 @@
"version": "4.3.0", "version": "4.3.0",
"resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"color-convert": "^2.0.1" "color-convert": "^2.0.1"
@@ -2555,6 +2556,15 @@
"node": ">=6" "node": ">=6"
} }
}, },
"node_modules/camelcase": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
"integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
"license": "MIT",
"engines": {
"node": ">=6"
}
},
"node_modules/caniuse-lite": { "node_modules/caniuse-lite": {
"version": "1.0.30001761", "version": "1.0.30001761",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001761.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001761.tgz",
@@ -2702,6 +2712,38 @@
"integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==", "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/cliui": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
"integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==",
"license": "ISC",
"dependencies": {
"string-width": "^4.2.0",
"strip-ansi": "^6.0.0",
"wrap-ansi": "^6.2.0"
}
},
"node_modules/cliui/node_modules/ansi-regex": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/cliui/node_modules/strip-ansi": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"license": "MIT",
"dependencies": {
"ansi-regex": "^5.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/clone": { "node_modules/clone": {
"version": "2.1.2", "version": "2.1.2",
"resolved": "https://registry.npmmirror.com/clone/-/clone-2.1.2.tgz", "resolved": "https://registry.npmmirror.com/clone/-/clone-2.1.2.tgz",
@@ -2729,7 +2771,6 @@
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"color-name": "~1.1.4" "color-name": "~1.1.4"
@@ -2742,7 +2783,6 @@
"version": "1.1.4", "version": "1.1.4",
"resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/combined-stream": { "node_modules/combined-stream": {
@@ -3455,6 +3495,15 @@
} }
} }
}, },
"node_modules/decamelize": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
"integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==",
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/decimal.js": { "node_modules/decimal.js": {
"version": "10.6.0", "version": "10.6.0",
"resolved": "https://registry.npmmirror.com/decimal.js/-/decimal.js-10.6.0.tgz", "resolved": "https://registry.npmmirror.com/decimal.js/-/decimal.js-10.6.0.tgz",
@@ -3566,6 +3615,12 @@
"node": ">=8" "node": ">=8"
} }
}, },
"node_modules/dijkstrajs": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.3.tgz",
"integrity": "sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==",
"license": "MIT"
},
"node_modules/dom-serializer": { "node_modules/dom-serializer": {
"version": "0.2.2", "version": "0.2.2",
"resolved": "https://registry.npmmirror.com/dom-serializer/-/dom-serializer-0.2.2.tgz", "resolved": "https://registry.npmmirror.com/dom-serializer/-/dom-serializer-0.2.2.tgz",
@@ -3784,6 +3839,12 @@
} }
} }
}, },
"node_modules/emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"license": "MIT"
},
"node_modules/emojis-list": { "node_modules/emojis-list": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmmirror.com/emojis-list/-/emojis-list-3.0.0.tgz", "resolved": "https://registry.npmmirror.com/emojis-list/-/emojis-list-3.0.0.tgz",
@@ -4200,6 +4261,19 @@
"node": ">=8" "node": ">=8"
} }
}, },
"node_modules/find-up": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
"integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
"license": "MIT",
"dependencies": {
"locate-path": "^5.0.0",
"path-exists": "^4.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/follow-redirects": { "node_modules/follow-redirects": {
"version": "1.15.11", "version": "1.15.11",
"resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.11.tgz", "resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.11.tgz",
@@ -4363,6 +4437,15 @@
"node": ">= 0.4" "node": ">= 0.4"
} }
}, },
"node_modules/get-caller-file": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
"license": "ISC",
"engines": {
"node": "6.* || 8.* || >= 10.*"
}
},
"node_modules/get-intrinsic": { "node_modules/get-intrinsic": {
"version": "1.3.0", "version": "1.3.0",
"resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz", "resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
@@ -5043,6 +5126,15 @@
"url": "https://github.com/sponsors/ljharb" "url": "https://github.com/sponsors/ljharb"
} }
}, },
"node_modules/is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/is-generator-function": { "node_modules/is-generator-function": {
"version": "1.1.2", "version": "1.1.2",
"resolved": "https://registry.npmmirror.com/is-generator-function/-/is-generator-function-1.1.2.tgz", "resolved": "https://registry.npmmirror.com/is-generator-function/-/is-generator-function-1.1.2.tgz",
@@ -5467,6 +5559,18 @@
"url": "https://github.com/sponsors/antfu" "url": "https://github.com/sponsors/antfu"
} }
}, },
"node_modules/locate-path": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
"integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
"license": "MIT",
"dependencies": {
"p-locate": "^4.1.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/lodash": { "node_modules/lodash": {
"version": "4.17.21", "version": "4.17.21",
"resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz", "resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz",
@@ -6128,6 +6232,42 @@
"url": "https://github.com/sponsors/ljharb" "url": "https://github.com/sponsors/ljharb"
} }
}, },
"node_modules/p-limit": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
"integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
"license": "MIT",
"dependencies": {
"p-try": "^2.0.0"
},
"engines": {
"node": ">=6"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/p-locate": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
"integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
"license": "MIT",
"dependencies": {
"p-limit": "^2.2.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/p-try": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
"license": "MIT",
"engines": {
"node": ">=6"
}
},
"node_modules/pako": { "node_modules/pako": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmmirror.com/pako/-/pako-2.1.0.tgz", "resolved": "https://registry.npmmirror.com/pako/-/pako-2.1.0.tgz",
@@ -6187,6 +6327,15 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/path-exists": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
"integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/path-parse": { "node_modules/path-parse": {
"version": "1.0.7", "version": "1.0.7",
"resolved": "https://registry.npmmirror.com/path-parse/-/path-parse-1.0.7.tgz", "resolved": "https://registry.npmmirror.com/path-parse/-/path-parse-1.0.7.tgz",
@@ -6337,6 +6486,15 @@
"pathe": "^2.0.1" "pathe": "^2.0.1"
} }
}, },
"node_modules/pngjs": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/pngjs/-/pngjs-5.0.0.tgz",
"integrity": "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==",
"license": "MIT",
"engines": {
"node": ">=10.13.0"
}
},
"node_modules/posix-character-classes": { "node_modules/posix-character-classes": {
"version": "0.1.1", "version": "0.1.1",
"resolved": "https://registry.npmmirror.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz", "resolved": "https://registry.npmmirror.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz",
@@ -6481,6 +6639,29 @@
"@province-city-china/types": "8.5.8" "@province-city-china/types": "8.5.8"
} }
}, },
"node_modules/qrcode": {
"version": "1.5.4",
"resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.5.4.tgz",
"integrity": "sha512-1ca71Zgiu6ORjHqFBDpnSMTR2ReToX4l1Au1VFLyVeBTFavzQnv5JxMFr3ukHVKpSrSA2MCk0lNJSykjUfz7Zg==",
"license": "MIT",
"dependencies": {
"dijkstrajs": "^1.0.1",
"pngjs": "^5.0.0",
"yargs": "^15.3.1"
},
"bin": {
"qrcode": "bin/qrcode"
},
"engines": {
"node": ">=10.13.0"
}
},
"node_modules/qrcodejs2": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/qrcodejs2/-/qrcodejs2-0.0.2.tgz",
"integrity": "sha512-+Y4HA+cb6qUzdgvI3KML8GYpMFwB24dFwzMkS/yXq6hwtUGNUnZQdUnksrV1XGMc2mid5ROw5SAuY9XhI3ValA==",
"license": "MIT"
},
"node_modules/quansync": { "node_modules/quansync": {
"version": "0.2.11", "version": "0.2.11",
"resolved": "https://registry.npmmirror.com/quansync/-/quansync-0.2.11.tgz", "resolved": "https://registry.npmmirror.com/quansync/-/quansync-0.2.11.tgz",
@@ -6752,6 +6933,15 @@
"node": ">=0.10" "node": ">=0.10"
} }
}, },
"node_modules/require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
"integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/require-from-string": { "node_modules/require-from-string": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npmmirror.com/require-from-string/-/require-from-string-2.0.2.tgz", "resolved": "https://registry.npmmirror.com/require-from-string/-/require-from-string-2.0.2.tgz",
@@ -6761,6 +6951,12 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/require-main-filename": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
"integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
"license": "ISC"
},
"node_modules/resolve": { "node_modules/resolve": {
"version": "1.22.11", "version": "1.22.11",
"resolved": "https://registry.npmmirror.com/resolve/-/resolve-1.22.11.tgz", "resolved": "https://registry.npmmirror.com/resolve/-/resolve-1.22.11.tgz",
@@ -7068,6 +7264,12 @@
"node": ">=10" "node": ">=10"
} }
}, },
"node_modules/set-blocking": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
"integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==",
"license": "ISC"
},
"node_modules/set-function-length": { "node_modules/set-function-length": {
"version": "1.2.2", "version": "1.2.2",
"resolved": "https://registry.npmmirror.com/set-function-length/-/set-function-length-1.2.2.tgz", "resolved": "https://registry.npmmirror.com/set-function-length/-/set-function-length-1.2.2.tgz",
@@ -7560,6 +7762,41 @@
"safe-buffer": "~5.2.0" "safe-buffer": "~5.2.0"
} }
}, },
"node_modules/string-width": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
"license": "MIT",
"dependencies": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
"strip-ansi": "^6.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/string-width/node_modules/ansi-regex": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/string-width/node_modules/strip-ansi": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"license": "MIT",
"dependencies": {
"ansi-regex": "^5.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/string.prototype.trim": { "node_modules/string.prototype.trim": {
"version": "1.2.10", "version": "1.2.10",
"resolved": "https://registry.npmmirror.com/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz", "resolved": "https://registry.npmmirror.com/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz",
@@ -8900,6 +9137,12 @@
"url": "https://github.com/sponsors/ljharb" "url": "https://github.com/sponsors/ljharb"
} }
}, },
"node_modules/which-module": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz",
"integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==",
"license": "ISC"
},
"node_modules/which-typed-array": { "node_modules/which-typed-array": {
"version": "1.1.19", "version": "1.1.19",
"resolved": "https://registry.npmmirror.com/which-typed-array/-/which-typed-array-1.1.19.tgz", "resolved": "https://registry.npmmirror.com/which-typed-array/-/which-typed-array-1.1.19.tgz",
@@ -8922,6 +9165,47 @@
"url": "https://github.com/sponsors/ljharb" "url": "https://github.com/sponsors/ljharb"
} }
}, },
"node_modules/wrap-ansi": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
"integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
"license": "MIT",
"dependencies": {
"ansi-styles": "^4.0.0",
"string-width": "^4.1.0",
"strip-ansi": "^6.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/wrap-ansi/node_modules/ansi-regex": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/wrap-ansi/node_modules/strip-ansi": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"license": "MIT",
"dependencies": {
"ansi-regex": "^5.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/y18n": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz",
"integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==",
"license": "ISC"
},
"node_modules/yaml": { "node_modules/yaml": {
"version": "1.10.2", "version": "1.10.2",
"resolved": "https://registry.npmmirror.com/yaml/-/yaml-1.10.2.tgz", "resolved": "https://registry.npmmirror.com/yaml/-/yaml-1.10.2.tgz",
@@ -8931,6 +9215,41 @@
"node": ">= 6" "node": ">= 6"
} }
}, },
"node_modules/yargs": {
"version": "15.4.1",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz",
"integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==",
"license": "MIT",
"dependencies": {
"cliui": "^6.0.0",
"decamelize": "^1.2.0",
"find-up": "^4.1.0",
"get-caller-file": "^2.0.1",
"require-directory": "^2.1.1",
"require-main-filename": "^2.0.0",
"set-blocking": "^2.0.0",
"string-width": "^4.2.0",
"which-module": "^2.0.0",
"y18n": "^4.0.0",
"yargs-parser": "^18.1.2"
},
"engines": {
"node": ">=8"
}
},
"node_modules/yargs-parser": {
"version": "18.1.3",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz",
"integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==",
"license": "ISC",
"dependencies": {
"camelcase": "^5.0.0",
"decamelize": "^1.2.0"
},
"engines": {
"node": ">=6"
}
},
"node_modules/zrender": { "node_modules/zrender": {
"version": "5.4.4", "version": "5.4.4",
"resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.4.4.tgz", "resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.4.4.tgz",

View File

@@ -43,6 +43,8 @@
"pinia": "^2.2.0", "pinia": "^2.2.0",
"pinyin": "^4.0.0-alpha.2", "pinyin": "^4.0.0-alpha.2",
"province-city-china": "^8.5.8", "province-city-china": "^8.5.8",
"qrcode": "^1.5.4",
"qrcodejs2": "^0.0.2",
"react": "18.2.0", "react": "18.2.0",
"react-dom": "18.2.0", "react-dom": "18.2.0",
"segmentit": "^2.0.3", "segmentit": "^2.0.3",

View File

@@ -102,16 +102,24 @@
{{ scope.row.registerTime ? parseTime(scope.row.registerTime, '{y}.{m}.{d} {h}时{i}分') : '-' }} {{ scope.row.registerTime ? parseTime(scope.row.registerTime, '{y}.{m}.{d} {h}时{i}分') : '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="挂号科室" prop="organizationName" align="center" /> <el-table-column label="挂号科室" prop="organizationName" align="center">
<el-table-column label="医生姓名" prop="practitionerName" align="center" /> <template #default="scope">
{{ scope.row.organizationName ? scope.row.organizationName.trim() || '-' : '-' }}
</template>
</el-table-column>
<el-table-column label="医生姓名" prop="practitionerName" align="center">
<template #default="scope">
{{ scope.row.practitionerName ? scope.row.practitionerName.trim() || '-' : '-' }}
</template>
</el-table-column>
<el-table-column label="流水号" prop="encounterNo" align="center"> <el-table-column label="流水号" prop="encounterNo" align="center">
<template #default="scope"> <template #default="scope">
{{ scope.row.encounterNo || scope.row.visitNo || scope.row.serialNo || '-' }} {{ calculateSerialNo(scope.row) }}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button @click="selectDialogVisible = false">取消(C)</el-button> <el-button @click="selectDialogVisible = false">取消(C)</el-button>
<el-button type="primary" @click="handleConfirmSelect" :disabled="!selectedRecord">确认(O)</el-button> <el-button type="primary" @click="handleConfirmSelect" :disabled="!selectedRecord">确认(O)</el-button>
</div> </div>
@@ -228,19 +236,27 @@
<div class="print-footer"> <div class="print-footer">
<div class="reminder">温馨提示: 请妥善保管此凭条就诊时请携带</div> <div class="reminder">温馨提示: 请妥善保管此凭条就诊时请携带</div>
</div> </div>
<!-- 二维码区域 -->
<div class="qr-code-section">
<div class="qr-code-container">
<div id="qrcode" ref="qrcodeRef"></div>
<div class="qr-code-label">扫码查看挂号信息</div>
</div>
</div>
</div> </div>
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button @click="printPreviewVisible = false">关闭</el-button> <el-button @click="printPreviewVisible = false">关闭</el-button>
<el-button type="primary" @click="handleBrowserPrint">打印</el-button> <el-button type="primary" @click="handleBrowserPrint">打印</el-button>
</div> </div>
</template> </template>
</el-dialog> </el-dialog>
</el-dialog> </el-dialog>
</template> </template>
<script setup> <script setup>
import {getCurrentInstance, reactive, ref, watch} from 'vue'; import {getCurrentInstance, reactive, ref, watch, nextTick, onMounted} from 'vue';
import {getOutpatientRegistrationCurrent, reprintRegistration} from './outpatientregistration'; import {getOutpatientRegistrationCurrent, reprintRegistration} from './outpatientregistration';
import {parseTime} from '@/utils/his'; import {parseTime} from '@/utils/his';
import {formatDateStr} from '@/utils/index'; import {formatDateStr} from '@/utils/index';
@@ -264,6 +280,7 @@ const recordList = ref([]);
const selectedRecord = ref(null); const selectedRecord = ref(null);
const currentRecord = ref(null); // 保存当前选择的记录,用于打印 const currentRecord = ref(null); // 保存当前选择的记录,用于打印
const printPreviewVisible = ref(false); // 打印预览对话框显示状态 const printPreviewVisible = ref(false); // 打印预览对话框显示状态
const qrcodeRef = ref(null); // 二维码容器引用
const searchForm = reactive({ const searchForm = reactive({
cardNo: '', cardNo: '',
@@ -315,6 +332,24 @@ watch(dialogVisible, (newVal) => {
} }
}); });
// 监听打印预览对话框显示状态,生成二维码
watch(printPreviewVisible, (newVal) => {
if (newVal) {
// 对话框打开后等待DOM更新完成再生成二维码
nextTick(() => {
setTimeout(() => {
generateQRCode();
}, 200);
});
} else {
// 对话框关闭时清空二维码
const qrcodeElement = document.getElementById('qrcode');
if (qrcodeElement) {
qrcodeElement.innerHTML = '';
}
}
});
// 搜索挂号记录并确认补打 // 搜索挂号记录并确认补打
async function handleSearch() { async function handleSearch() {
if (!searchForm.cardNo) { if (!searchForm.cardNo) {
@@ -344,6 +379,14 @@ async function handleSearch() {
if (response.code === 200) { if (response.code === 200) {
let records = response.data.records || response.data || []; let records = response.data.records || response.data || [];
// 过滤掉挂号科室或医生姓名为空的记录
records = records.filter(record => {
const orgName = record.organizationName ? record.organizationName.trim() : '';
const pracName = record.practitionerName ? record.practitionerName.trim() : '';
// 只保留挂号科室和医生姓名都不为空的记录
return orgName && pracName;
});
if (records.length > 0) { if (records.length > 0) {
if (records.length === 1) { if (records.length === 1) {
// 只有一条记录,直接使用 // 只有一条记录,直接使用
@@ -444,21 +487,8 @@ function fillForm(row) {
// 病历费 - API 未返回,暂时设为 0.00 // 病历费 - API 未返回,暂时设为 0.00
form.medicalRecordFee = row.medicalRecordFee ? parseFloat(row.medicalRecordFee).toFixed(2) : '0.00'; form.medicalRecordFee = row.medicalRecordFee ? parseFloat(row.medicalRecordFee).toFixed(2) : '0.00';
// 流水号 - 使用 encounterId 的后3位如果为空则生成001-999的序列号 // 流水号 - 使用 calculateSerialNo 函数计算
let serialNo = ''; form.serialNo = calculateSerialNo(row);
if (row.encounterId) {
// 使用 encounterId 的后3位作为流水号
const idStr = String(row.encounterId);
const lastThree = idStr.slice(-3);
const num = parseInt(lastThree) || 0;
serialNo = String((num % 999) + 1).padStart(3, '0');
} else {
// 如果 encounterId 为空生成一个001-999的序列号
const timestamp = Date.now();
const serial = (timestamp % 999) + 1;
serialNo = String(serial).padStart(3, '0');
}
form.serialNo = serialNo;
// 合计 - 优先使用 totalPrice否则计算各项费用之和 // 合计 - 优先使用 totalPrice否则计算各项费用之和
if (row.totalPrice) { if (row.totalPrice) {
@@ -475,8 +505,8 @@ function fillForm(row) {
form.visitTime = formatDateTime(new Date()); form.visitTime = formatDateTime(new Date());
} }
// 就诊地点 - 暂时设为空,后续可根据实际需求填充 // 就诊地点 - 使用科室名称作为就诊地点
form.visitLocation = row.visitLocation || row.locationName || ''; form.visitLocation = row.visitLocation || row.locationName || row.organizationName || '';
// 预约状态 - 从 statusEnum_enumText 字段获取,如果没有则根据 statusEnum 判断 // 预约状态 - 从 statusEnum_enumText 字段获取,如果没有则根据 statusEnum 判断
if (row.statusEnum_enumText) { if (row.statusEnum_enumText) {
@@ -515,6 +545,31 @@ function formatDateTime(date) {
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
} }
// 计算流水号(与 fillForm 中的逻辑一致)
function calculateSerialNo(row) {
if (!row) {
return '-';
}
// 优先使用已有的 serialNo如果存在
if (row.serialNo) {
return row.serialNo;
}
// 使用 encounterId 的后3位计算流水号
if (row.encounterId) {
const idStr = String(row.encounterId);
const lastThree = idStr.slice(-3);
const num = parseInt(lastThree) || 0;
return String((num % 999) + 1).padStart(3, '0');
}
// 如果 encounterId 为空生成一个001-999的序列号
const timestamp = Date.now();
const serial = (timestamp % 999) + 1;
return String(serial).padStart(3, '0');
}
// 提交补打挂号 // 提交补打挂号
async function handleSubmit() { async function handleSubmit() {
if (!form.encounterId) { if (!form.encounterId) {
@@ -537,38 +592,38 @@ async function handleSubmit() {
// 在提交前,验证表单数据是否已正确填充 // 在提交前,验证表单数据是否已正确填充
console.log('handleSubmit form before submit:', form); // 调试日志 console.log('handleSubmit form before submit:', form); // 调试日志
const submitData = { const submitData = {
encounterId: form.encounterId, encounterId: form.encounterId,
cardNo: form.cardNo, cardNo: form.cardNo,
name: form.name, name: form.name,
organizationName: form.organizationName, organizationName: form.organizationName,
practitionerName: form.practitionerName, practitionerName: form.practitionerName,
price: parseFloat(form.price) || 0, price: parseFloat(form.price) || 0,
activityPrice: parseFloat(form.activityPrice) || 0, activityPrice: parseFloat(form.activityPrice) || 0,
medicalRecordFee: parseFloat(form.medicalRecordFee || 0), medicalRecordFee: parseFloat(form.medicalRecordFee || 0),
totalPrice: parseFloat(form.totalPrice) || 0, totalPrice: parseFloat(form.totalPrice) || 0,
visitTime: form.visitTime, visitTime: form.visitTime,
}; };
console.log('handleSubmit submitData:', submitData); // 调试日志 console.log('handleSubmit submitData:', submitData); // 调试日志
const res = await reprintRegistration(submitData); const res = await reprintRegistration(submitData);
if (res.code === 200) { if (res.code === 200) {
proxy.$modal.msgSuccess('补打挂号成功'); proxy.$modal.msgSuccess('补打挂号成功');
// 不关闭补打对话框,直接显示打印预览 // 不关闭补打对话框,直接显示打印预览
// 这样可以确保 form 数据不会丢失 // 这样可以确保 form 数据不会丢失
loading.value = false; loading.value = false;
showPrintPreview(); showPrintPreview();
} else { } else {
proxy.$modal.msgError(res.msg || '补打挂号失败'); proxy.$modal.msgError(res.msg || '补打挂号失败');
loading.value = false; loading.value = false;
} }
} catch (error) { } catch (error) {
console.error('补打挂号失败:', error); console.error('补打挂号失败:', error);
proxy.$modal.msgError('补打挂号失败: ' + (error.message || '未知错误')); proxy.$modal.msgError('补打挂号失败: ' + (error.message || '未知错误'));
loading.value = false; loading.value = false;
} }
} }
// 取消(实际执行提交操作,因为确认按钮触发搜索) // 取消(实际执行提交操作,因为确认按钮触发搜索)
@@ -606,6 +661,61 @@ function resetSearch() {
searchForm.cardNo = ''; searchForm.cardNo = '';
} }
// 生成二维码
async function generateQRCode() {
nextTick(async () => {
const qrcodeElement = document.getElementById('qrcode');
if (!qrcodeElement) {
console.warn('二维码容器不存在');
return;
}
// 清空之前的二维码
qrcodeElement.innerHTML = '';
try {
// 动态导入 qrcode 库
const QRCode = await import('qrcode');
// 构建二维码内容(包含关键就诊信息)
const qrData = {
type: 'outpatient_registration',
encounterId: form.encounterId || '',
cardNo: form.cardNo || '',
serialNo: form.serialNo || '',
patientName: form.name || '',
visitTime: form.visitTime || '',
organizationName: form.organizationName || ''
};
// 将对象转换为JSON字符串作为二维码内容
const qrText = JSON.stringify(qrData);
// 使用 qrcode 库生成二维码(生成为 data URL
const qrDataUrl = await QRCode.default.toDataURL(qrText, {
width: 120,
margin: 1,
color: {
dark: '#000000',
light: '#ffffff'
}
});
// 创建 img 元素显示二维码
const img = document.createElement('img');
img.src = qrDataUrl;
img.alt = '二维码';
img.style.display = 'block';
img.style.margin = '0 auto';
qrcodeElement.appendChild(img);
} catch (error) {
console.error('生成二维码失败:', error);
qrcodeElement.innerHTML = '<div style="text-align:center;color:#999;padding:20px;font-size:12px;">二维码生成失败</div>';
}
});
}
// 显示打印预览 // 显示打印预览
function showPrintPreview() { function showPrintPreview() {
// 直接使用浏览器打印预览,避免 hiprint 连接错误 // 直接使用浏览器打印预览,避免 hiprint 连接错误
@@ -730,10 +840,36 @@ function handleBrowserPrint() {
font-size: 12px; font-size: 12px;
color: #666; color: #666;
} }
.qr-code-section {
margin-top: 20px;
display: flex;
justify-content: center;
align-items: center;
padding: 15px;
}
.qr-code-container {
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
}
#qrcode {
display: flex;
justify-content: center;
align-items: center;
}
.qr-code-label {
font-size: 12px;
color: #666;
text-align: center;
}
@media print { @media print {
body { body {
padding: 0; padding: 0;
} }
.qr-code-section {
page-break-inside: avoid;
}
} }
</style> </style>
</head> </head>
@@ -793,7 +929,7 @@ async function handleConfirmSelect() {
console.error('确认选择记录失败:', error); console.error('确认选择记录失败:', error);
proxy.$modal.msgError('处理失败: ' + (error.message || '未知错误')); proxy.$modal.msgError('处理失败: ' + (error.message || '未知错误'));
loading.value = false; loading.value = false;
} }
} }
</script> </script>
@@ -928,4 +1064,37 @@ async function handleConfirmSelect() {
background-color: #f9f9f9; background-color: #f9f9f9;
border-radius: 4px; border-radius: 4px;
} }
.qr-code-section {
margin-top: 20px;
display: flex;
justify-content: center;
align-items: center;
padding: 15px;
}
.qr-code-container {
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
}
#qrcode {
display: flex;
justify-content: center;
align-items: center;
}
.qr-code-label {
font-size: 12px;
color: #666;
text-align: center;
}
@media print {
.qr-code-section {
page-break-inside: avoid;
}
}
</style> </style>

View File

@@ -186,3 +186,4 @@ WHERE T1.delete_flag = '0'