CheckInRegistrationBody.vue 55 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199
  1. <script setup lang="ts">
  2. import { reactive, watch } from 'vue'
  3. import dayjs from 'dayjs'
  4. import FieldItem from './FieldItem.vue'
  5. import SignatureItem from './SignatureItem.vue'
  6. export interface CheckInRegistrationForm {
  7. checkInNo?: string
  8. formDate?: string
  9. elderName?: string
  10. gender?: string
  11. age?: string | number
  12. photo?: string
  13. nationality?: string
  14. birthDate?: string
  15. nativePlace?: string
  16. householdPlace?: string
  17. nation?: string
  18. nationOther?: string
  19. politicalStatus?: string
  20. maritalStatus?: string
  21. idCardType?: string
  22. idCardNo?: string
  23. educationLevel?: string
  24. residentialAddress?: string
  25. guarantorName?: string
  26. guarantorRelation?: string
  27. guarantorPhone?: string
  28. guarantorIdCardType?: string
  29. guarantorIdCardNo?: string
  30. guarantorAddress?: string
  31. guarantorEmail?: string
  32. secondContactName?: string
  33. secondContactPhone?: string
  34. medicalPaymentMethod?: string
  35. medicalPaymentOther?: string
  36. incomeSource?: string[]
  37. incomeSourceOther?: string
  38. preResidenceHomeType?: string[]
  39. preResidenceHomeOther?: string
  40. checkInReason?: string
  41. pastHistoryDiseaseNone?: boolean
  42. pastHistoryDiseaseName1?: string
  43. pastHistoryDiseaseTime1?: string
  44. pastHistoryDiseaseName2?: string
  45. pastHistoryDiseaseTime2?: string
  46. pastHistorySurgery?: boolean
  47. pastHistorySurgeryName?: string
  48. pastHistorySurgeryTime?: string
  49. pastHistoryTrauma?: boolean
  50. pastHistoryTraumaPart1?: string
  51. pastHistoryTraumaTime1?: string
  52. pastHistoryTraumaPart2?: string
  53. pastHistoryTraumaTime2?: string
  54. currentDiseaseName1?: string
  55. currentDiseaseTime1?: string
  56. currentDiseaseStatus1?: string
  57. currentDiseaseName2?: string
  58. currentDiseaseTime2?: string
  59. currentDiseaseStatus2?: string
  60. regularVisitNone?: boolean
  61. regularVisitReason?: string
  62. regularVisitFreq?: string
  63. hospitalizationNone?: boolean
  64. hospitalizationCount?: string
  65. emergencyNone?: boolean
  66. emergencyCount?: string
  67. discomfortSymptomsNone?: boolean
  68. discomfortSymptomsList?: string[]
  69. discomfortSymptomsOther?: string
  70. allergyDrugNone?: boolean
  71. allergyDrugDetail?: string
  72. allergyFoodNone?: boolean
  73. allergyFoodDetail?: string
  74. allergyEnvNone?: boolean
  75. allergyEnvDetail?: string
  76. fallNone?: boolean
  77. fallDetail?: string
  78. memoryDeclineNone?: boolean
  79. memoryDeclineDetail?: string
  80. weightLossNone?: boolean
  81. weightLossWeight?: string
  82. urinaryIncontinenceNone?: boolean
  83. urinaryIncontinenceCount?: string
  84. sleepDisorderNone?: boolean
  85. sleepDisorderTypes?: string[]
  86. sleepDisorderOther?: string
  87. painNone?: boolean
  88. painPart?: string
  89. visionAbnormalNone?: boolean
  90. visionAbnormalTypes?: string[]
  91. visionAbnormalDegree?: string
  92. hearingLossNone?: boolean
  93. hearingLossDetail?: string
  94. mentalStatusNone?: boolean
  95. mentalStatusList?: string[]
  96. mentalStatusOther?: string
  97. languageExpression?: string[]
  98. languageExpressionOther?: string
  99. otherNotes?: string
  100. partyBSign?: string
  101. partyCSign?: string
  102. signDate?: string
  103. }
  104. const props = withDefaults(
  105. defineProps<{
  106. isTextMode?: boolean
  107. modelValue?: CheckInRegistrationForm
  108. elderId?: string | number
  109. }>(),
  110. {
  111. isTextMode: false,
  112. modelValue: () => ({}),
  113. elderId: ''
  114. }
  115. )
  116. const emit = defineEmits<{
  117. (e: 'update:modelValue', val: CheckInRegistrationForm): void
  118. }>()
  119. const createDefaultForm = (): CheckInRegistrationForm => ({
  120. checkInNo: '',
  121. formDate: dayjs().format('YYYY-MM-DD'),
  122. elderName: '',
  123. gender: '',
  124. age: '',
  125. photo: '',
  126. nationality: '中国',
  127. birthDate: '',
  128. nativePlace: '',
  129. householdPlace: '',
  130. nation: '汉族',
  131. nationOther: '',
  132. politicalStatus: '',
  133. maritalStatus: '',
  134. idCardType: '身份证',
  135. idCardNo: '',
  136. educationLevel: '',
  137. residentialAddress: '',
  138. guarantorName: '',
  139. guarantorRelation: '',
  140. guarantorPhone: '',
  141. guarantorIdCardType: '身份证',
  142. guarantorIdCardNo: '',
  143. guarantorAddress: '',
  144. guarantorEmail: '',
  145. secondContactName: '',
  146. secondContactPhone: '',
  147. medicalPaymentMethod: '',
  148. medicalPaymentOther: '',
  149. incomeSource: [],
  150. incomeSourceOther: '',
  151. preResidenceHomeType: [],
  152. preResidenceHomeOther: '',
  153. checkInReason: '',
  154. pastHistoryDiseaseNone: true,
  155. pastHistoryDiseaseName1: '',
  156. pastHistoryDiseaseTime1: '',
  157. pastHistoryDiseaseName2: '',
  158. pastHistoryDiseaseTime2: '',
  159. pastHistorySurgery: false,
  160. pastHistorySurgeryName: '',
  161. pastHistorySurgeryTime: '',
  162. pastHistoryTrauma: false,
  163. pastHistoryTraumaPart1: '',
  164. pastHistoryTraumaTime1: '',
  165. pastHistoryTraumaPart2: '',
  166. pastHistoryTraumaTime2: '',
  167. currentDiseaseName1: '',
  168. currentDiseaseTime1: '',
  169. currentDiseaseStatus1: '',
  170. currentDiseaseName2: '',
  171. currentDiseaseTime2: '',
  172. currentDiseaseStatus2: '',
  173. regularVisitNone: true,
  174. regularVisitReason: '',
  175. regularVisitFreq: '',
  176. hospitalizationNone: true,
  177. hospitalizationCount: '',
  178. emergencyNone: true,
  179. emergencyCount: '',
  180. discomfortSymptomsNone: true,
  181. discomfortSymptomsList: [],
  182. discomfortSymptomsOther: '',
  183. allergyDrugNone: true,
  184. allergyDrugDetail: '',
  185. allergyFoodNone: true,
  186. allergyFoodDetail: '',
  187. allergyEnvNone: true,
  188. allergyEnvDetail: '',
  189. fallNone: true,
  190. fallDetail: '',
  191. memoryDeclineNone: true,
  192. memoryDeclineDetail: '',
  193. weightLossNone: true,
  194. weightLossWeight: '',
  195. urinaryIncontinenceNone: true,
  196. urinaryIncontinenceCount: '',
  197. sleepDisorderNone: true,
  198. sleepDisorderTypes: [],
  199. sleepDisorderOther: '',
  200. painNone: true,
  201. painPart: '',
  202. visionAbnormalNone: true,
  203. visionAbnormalTypes: [],
  204. visionAbnormalDegree: '',
  205. hearingLossNone: true,
  206. hearingLossDetail: '',
  207. mentalStatusNone: true,
  208. mentalStatusList: [],
  209. mentalStatusOther: '',
  210. languageExpression: [],
  211. languageExpressionOther: '',
  212. otherNotes: '',
  213. partyBSign: '',
  214. partyCSign: '',
  215. signDate: dayjs().format('YYYY-MM-DD')
  216. })
  217. const form = reactive<CheckInRegistrationForm>(createDefaultForm())
  218. watch(
  219. () => props.modelValue,
  220. (val) => {
  221. if (val) Object.assign(form, createDefaultForm(), val)
  222. },
  223. { immediate: true, deep: true }
  224. )
  225. const emitForm = () => emit('update:modelValue', JSON.parse(JSON.stringify(form)))
  226. const updateForm = (key: keyof CheckInRegistrationForm, val: any) => {
  227. ;(form as any)[key] = val
  228. emitForm()
  229. }
  230. // 从长者选择返回值填充数据(基于实际API返回值映射)
  231. const fillFromElderData = (elder: Record<string, any>) => {
  232. // 基本信息
  233. form.elderName = elder.elderName || ''
  234. form.gender = elder.elderSex === 1 ? '男' : elder.elderSex === 2 ? '女' : ''
  235. form.age = elder.elderAge || ''
  236. form.photo = elder.elderImage || elder.elderCover || ''
  237. // 出生日期(处理时间戳或字符串)
  238. if (elder.birthday) {
  239. form.birthDate = typeof elder.birthday === 'number'
  240. ? dayjs(elder.birthday).format('YYYY-MM-DD')
  241. : elder.birthday
  242. }
  243. // 籍贯/户籍地址
  244. form.nativePlace = elder.registeredResidenceAddress || elder.region || ''
  245. form.householdPlace = elder.censusRegister || ''
  246. // 民族
  247. const nationMap: Record<string, string> = { '1': '汉族', '2': '蒙古族', '3': '回族', '4': '藏族' }
  248. form.nation = elder.nationId ? (nationMap[String(elder.nationId)] || '汉族') : '汉族'
  249. // 政治面貌
  250. const polMap: Record<string, string> = { '1': '中共党员', '2': '共青团员', '3': '民主党派', '4': '群众' }
  251. form.politicalStatus = elder.political ? polMap[String(elder.political)] || '' : ''
  252. // 婚姻状况
  253. const marMap: Record<number, string> = { 1: '未婚', 2: '已婚', 3: '丧偶', 4: '离异' }
  254. form.maritalStatus = elder.maritalStatus ? marMap[Number(elder.maritalStatus)] || '' : ''
  255. // 证件类型和号码
  256. const paperMap: Record<number, string> = { 1: '身份证', 2: '护照', 3: '军官证', 4: '其他' }
  257. form.idCardType = elder.papersType ? paperMap[Number(elder.papersType)] || '身份证' : '身份证'
  258. form.idCardNo = elder.idCard || ''
  259. // 文化程度
  260. const eduMap: Record<number, string> = { 1: '文盲半文盲', 2: '小学', 3: '初中', 4: '高中/技校/中专', 5: '大学专科及以上', 6: '不详', 7: '大学专科及以上' }
  261. form.educationLevel = elder.degreeEducation ? eduMap[Number(elder.degreeEducation)] || '' : ''
  262. // 居住地址
  263. form.residentialAddress = elder.address || ''
  264. // 医疗费用支付方式
  265. const payMap: Record<number, string> = { 1: '城镇职工基本医疗保险', 2: '城镇居民基本医疗保险', 3: '全公费', 4: '其它' }
  266. form.medicalPaymentMethod = elder.paymentMethod ? payMap[Number(elder.paymentMethod)] || '' : ''
  267. // 经济来源
  268. if (elder.economySource) {
  269. const srcMap: Record<string, string> = { '1': '退休金/养老金', '2': '子女补贴', '3': '亲友资助', '4': '其他补贴' }
  270. form.incomeSource = elder.economySource.split(',').filter(Boolean).map((k: string) => srcMap[k] || k).filter(Boolean)
  271. }
  272. // 过敏史
  273. if (elder.allergicDrug || elder.drugAllergy) {
  274. form.allergyDrugNone = false
  275. form.allergyDrugDetail = elder.allergicDrug || elder.drugAllergy || ''
  276. }
  277. // 入住编号
  278. form.checkInNo = elder.fileNumber || elder.contractNumber || ''
  279. emitForm()
  280. }
  281. // 修复:正确暴露方法名
  282. defineExpose({ fillFromElderData })
  283. // 打印模式 checkbox 渲染
  284. const printCheck = (checked: boolean) => (checked ? '\u2611' : '\u2610')
  285. // 不适症状选项
  286. const symptomOptions = ['头痛','头晕','心悸','胸闷','胸痛','慢性咳嗽','咳痰','呼吸困难','多饮','多尿','体重下降','乏力','关节疼痛','手脚麻木','视力模糊','眼花','耳鸣','尿急','尿痛','尿频','腹泻','恶心呕吐','食欲减退','乳房胀痛','体位性低血压']
  287. // 精神状况选项
  288. const mentalOptions = ['游走','日夜颠倒','语言攻击行为','肢体攻击行为','对物品的攻击行为','妄想','幻觉','焦虑/恐惧','自伤/自杀','重复行为']
  289. // 辅助方法 - 切换数组项
  290. const toggleArrayItem = (arrKey: keyof CheckInRegistrationForm, val: string) => {
  291. const arr = (form as any)[arrKey] as string[]
  292. const idx = arr.indexOf(val)
  293. if (idx > -1) arr.splice(idx, 1)
  294. else arr.push(val)
  295. emitForm()
  296. }
  297. // 辅助方法 - 处理既往史"无"勾选(清空疾病名称)
  298. const onPastHistoryNoneChange = () => {
  299. form.pastHistoryDiseaseNone = true
  300. form.pastHistoryDiseaseName1 = ''
  301. form.pastHistoryDiseaseTime1 = ''
  302. emitForm()
  303. }
  304. // 辅助方法 - 处理行内input输入(用于疾病名称、时间等字段)
  305. const onInlineInput = (key: keyof CheckInRegistrationForm, e: Event) => {
  306. const target = e.target as HTMLInputElement
  307. ;(form as any)[key] = target.value
  308. emitForm()
  309. }
  310. </script>
  311. <template>
  312. <div class="check-in-registration">
  313. <!-- 标题 -->
  314. <div class="doc-title" style="font-size: 14px;margin-bottom: 12px;width: 100%;text-align: left;margin-top: 16px;">附件 2</div>
  315. <div class="doc-title" style="width: 100%;text-align: center;">入住登记表</div>
  316. <div class="doc-meta">
  317. <span>入住编号:<FieldItem :model-value="form.checkInNo" :is-text-mode="isTextMode" width="140px" @update:model-value="(v:any)=>updateForm('checkInNo',v)" /></span>
  318. <span>日期:{{ form.signDate || '____年__月__日' }}</span>
  319. </div>
  320. <!-- 主表格 - A4宽度适配,严格7列布局 -->
  321. <table class="reg-table" border="1" cellspacing="0" cellpadding="0">
  322. <!-- 明确定义7列,按设计图比例分配 -->
  323. <colgroup>
  324. <col style="width:9%" /> <!-- 第1列:最左标签(老年人/担保人) - 紧凑 -->
  325. <col style="width:13%" /> <!-- 第2列:标签/值 -->
  326. <col style="width:13%" /> <!-- 第3列:值/标签 -->
  327. <col style="width:13%" /> <!-- 第4列:标签/值 -->
  328. <col style="width:13%" /> <!-- 第5列:值/标签 -->
  329. <col style="width:13%" /> <!-- 第6列:标签/值 -->
  330. <col style="width:18%" /> <!-- 第7列:照片/值 -->
  331. </colgroup>
  332. <tbody>
  333. <!-- ========== 基本信息 + 照片区域(照片只覆盖前8行) ========== -->
  334. <!-- 第1行:老年人 | 照片(rowspan=8) -->
  335. <tr>
  336. <td class="lbl">老年人</td>
  337. <td><FieldItem :model-value="form.elderName" :is-text-mode="isTextMode" width="100%" @update:model-value="(v:any)=>updateForm('elderName',v)" /></td>
  338. <td class="lbl">性别</td>
  339. <td class="radio-cell">
  340. <template v-if="!isTextMode">
  341. <label><input type="radio" :checked="form.gender==='男'" @change="updateForm('gender','男')" /> 男</label>
  342. <label><input type="radio" :checked="form.gender==='女'" @change="updateForm('gender','女')" /> 女</label>
  343. </template>
  344. <template v-else>{{ printCheck(form.gender==='男') }} 男 {{ printCheck(form.gender==='女') }} 女</template>
  345. </td>
  346. <td class="lbl">年龄</td>
  347. <td><FieldItem :model-value="form.age" :is-text-mode="isTextMode" width="100%" @update:model-value="(v:any)=>updateForm('age',v)" /></td>
  348. <td class="photo-cell" rowspan="8">
  349. <div class="photo-box">
  350. <template v-if="form.photo"><img :src="form.photo" class="elder-photo" alt=""/></template>
  351. <template v-else><div class="photo-placeholder">照片</div></template>
  352. </div>
  353. </td>
  354. </tr>
  355. <!-- 第2行:国籍、出生日期 -->
  356. <tr>
  357. <td class="lbl">国籍</td>
  358. <td colspan="2"><FieldItem :model-value="form.nationality" :is-text-mode="isTextMode" width="100%" @update:model-value="(v:any)=>updateForm('nationality',v)" /></td>
  359. <td class="lbl">出生日期</td>
  360. <td colspan="2"><FieldItem :model-value="form.birthDate" :is-text-mode="isTextMode" type="date" width="100%" @update:model-value="(v:any)=>updateForm('birthDate',v)" /></td>
  361. </tr>
  362. <!-- 第3行:籍贯、户籍地 -->
  363. <tr>
  364. <td class="lbl">籍贯</td>
  365. <td colspan="2"><FieldItem :model-value="form.nativePlace" :is-text-mode="isTextMode" width="100%" @update:model-value="(v:any)=>updateForm('nativePlace',v)" /></td>
  366. <td class="lbl">户籍地</td>
  367. <td colspan="2"><FieldItem :model-value="form.householdPlace" :is-text-mode="isTextMode" width="100%" @update:model-value="(v:any)=>updateForm('householdPlace',v)" /></td>
  368. </tr>
  369. <!-- 第4行:民族、政治面貌 -->
  370. <tr>
  371. <td class="lbl">民族</td>
  372. <td colspan="2" class="check-cell">
  373. <template v-if="!isTextMode">
  374. <label><input type="radio" :checked="form.nation==='汉族'" @change="updateForm('nation','汉族')" /> 汉族</label>
  375. <label><input type="radio" :checked="form.nation==='其他'" @change="updateForm('nation','其他')" /> 其他:<input :value="form.nationOther" class="inline-input small" placeholder="" @input="onInlineInput('nationOther',$event)" /></label>
  376. </template>
  377. <template v-else>{{ printCheck(form.nation==='汉族') }} 汉族 {{ printCheck(form.nation==='其他') }} 其他:{{ form.nationOther }}</template>
  378. </td>
  379. <td class="lbl">政治面貌</td>
  380. <td colspan="2"><FieldItem :model-value="form.politicalStatus" :is-text-mode="isTextMode" width="100%" @update:model-value="(v:any)=>updateForm('politicalStatus',v)" /></td>
  381. </tr>
  382. <!-- 第5行:婚姻状况 -->
  383. <tr>
  384. <td class="lbl">婚姻状况</td>
  385. <td colspan="5" class="check-cell">
  386. <template v-if="!isTextMode">
  387. <label v-for="it in ['未婚','已婚','丧偶','离异','未说明婚姻情况']" :key="it"><input type="checkbox" :checked="form.maritalStatus===it" @change="()=>updateForm('maritalStatus',it)" /> {{ it }}</label>
  388. </template>
  389. <template v-else><template v-for="it in ['未婚','已婚','丧偶','离异','未说明婚姻情况']" :key="it">{{ printCheck(form.maritalStatus===it) }} {{ it }} </template></template>
  390. </td>
  391. </tr>
  392. <!-- 第6行:证件类型、证件号码 -->
  393. <tr>
  394. <td class="lbl">证件类型</td>
  395. <td colspan="2"><FieldItem :model-value="form.idCardType" :is-text-mode="isTextMode" width="100%" @update:model-value="(v:any)=>updateForm('idCardType',v)" /></td>
  396. <td class="lbl">证件号码</td>
  397. <td colspan="2"><FieldItem :model-value="form.idCardNo" :is-text-mode="isTextMode" width="100%" @update:model-value="(v:any)=>updateForm('idCardNo',v)" /></td>
  398. </tr>
  399. <!-- 第7行:文化程度 -->
  400. <tr>
  401. <td class="lbl">文化程度</td>
  402. <td colspan="5" class="check-cell">
  403. <template v-if="!isTextMode">
  404. <label v-for="it in ['文盲半文盲','小学','初中','高中/技校/中专','大学专科及以上','不详']" :key="it"><input type="checkbox" :checked="form.educationLevel===it" @change="()=>updateForm('educationLevel',it)" /> {{ it }}</label>
  405. </template>
  406. <template v-else><template v-for="it in ['文盲半文盲','小学','初中','高中/技校/中专','大学专科及以上','不详']" :key="it">{{ printCheck(form.educationLevel===it) }} {{ it }} </template></template>
  407. </td>
  408. </tr>
  409. <!-- 第8行:居住地址(照片rowspan=8结束) -->
  410. <tr>
  411. <td class="lbl">居住地址</td>
  412. <td colspan="5"><FieldItem :model-value="form.residentialAddress" :is-text-mode="isTextMode" width="100%" @update:model-value="(v:any)=>updateForm('residentialAddress',v)" /></td>
  413. </tr>
  414. <!-- ========== 担保人/联系人区域(照片已结束,每行严格7列) ========== -->
  415. <!-- 担保人第1行:担保人(1) | 姓名/名称(1) | guarantorName(1) | 关系(1) | guarantorRelation(1) | 手机号(1) | guarantorPhone(1) = 7列 -->
  416. <tr>
  417. <td class="lbl multi-line" rowspan="3">担保人/<br/>监护人/<br/>紧急<br/>联系人</td>
  418. <td class="lbl">姓名/名称</td>
  419. <td><FieldItem :model-value="form.guarantorName" :is-text-mode="isTextMode" width="100%" @update:model-value="(v:any)=>updateForm('guarantorName',v)" /></td>
  420. <td class="lbl">关系</td>
  421. <td><FieldItem :model-value="form.guarantorRelation" :is-text-mode="isTextMode" width="100%" @update:model-value="(v:any)=>updateForm('guarantorRelation',v)" /></td>
  422. <td class="lbl">手机号</td>
  423. <td><FieldItem :model-value="form.guarantorPhone" :is-text-mode="isTextMode" width="100%" @update:model-value="(v:any)=>updateForm('guarantorPhone',v)" /></td>
  424. </tr>
  425. <!-- 担保人第2行:证件类型(1) | guarantorIdCardType(1) | 证件号码(1) | guarantorIdCardNo(4) = 7列(已含担保人rowspan) -->
  426. <tr>
  427. <td class="lbl">证件类型</td>
  428. <td><FieldItem :model-value="form.guarantorIdCardType" :is-text-mode="isTextMode" width="100%" @update:model-value="(v:any)=>updateForm('guarantorIdCardType',v)" /></td>
  429. <td class="lbl" colspan="2">证件号码</td>
  430. <td colspan="2"><FieldItem :model-value="form.guarantorIdCardNo" :is-text-mode="isTextMode" width="100%" @update:model-value="(v:any)=>updateForm('guarantorIdCardNo',v)" /></td>
  431. </tr>
  432. <!-- 担保人第3行:通信地址(1) | guarantorAddress(3) | 电子邮箱(1) | guarantorEmail(1) = 7列 -->
  433. <tr>
  434. <td class="lbl">通信地址</td>
  435. <td colspan="3"><FieldItem :model-value="form.guarantorAddress" :is-text-mode="isTextMode" width="100%" @update:model-value="(v:any)=>updateForm('guarantorAddress',v)" /></td>
  436. <td class="lbl">电子邮箱</td>
  437. <td><FieldItem :model-value="form.guarantorEmail" :is-text-mode="isTextMode" width="100%" @update:model-value="(v:any)=>updateForm('guarantorEmail',v)" /></td>
  438. </tr>
  439. <!-- 第二联系人:标签(2) + 姓名(2) + 标签(1) + 手机号(2) = 7列 -->
  440. <tr>
  441. <td class="lbl" colspan="2">第二联系人</td>
  442. <td colspan="2"><FieldItem :model-value="form.secondContactName" :is-text-mode="isTextMode" width="100%" @update:model-value="(v:any)=>updateForm('secondContactName',v)" /></td>
  443. <td class="lbl">手机号</td>
  444. <td colspan="2"><FieldItem :model-value="form.secondContactPhone" :is-text-mode="isTextMode" width="100%" @update:model-value="(v:any)=>updateForm('secondContactPhone',v)" /></td>
  445. </tr>
  446. <!-- 医疗费用支付方式 -->
  447. <tr>
  448. <td class="lbl multi-line">医疗费用<br/>支付方式</td>
  449. <td colspan="6" class="check-cell">
  450. <template v-if="!isTextMode">
  451. <label><input type="checkbox" :checked="form.medicalPaymentMethod==='城镇职工基本医疗保险'" @change="()=>updateForm('medicalPaymentMethod','城镇职工基本医疗保险')" /> 城镇职工基本医疗保险</label>
  452. <label><input type="checkbox" :checked="form.medicalPaymentMethod==='城镇居民基本医疗保险'" @change="()=>updateForm('medicalPaymentMethod','城镇居民基本医疗保险')" /> 城镇居民基本医疗保险</label>
  453. <label><input type="checkbox" :checked="form.medicalPaymentMethod==='全公费'" @change="()=>updateForm('medicalPaymentMethod','全公费')" /> 全公费</label>
  454. <label><input type="checkbox" :checked="form.medicalPaymentMethod==='其它'" @change="()=>updateForm('medicalPaymentMethod','其它')" /> 其它:<input :value="form.medicalPaymentOther" class="inline-input small" placeholder="" @input="onInlineInput('medicalPaymentOther',$event)" /></label>
  455. </template>
  456. <template v-else>{{ printCheck(form.medicalPaymentMethod==='城镇职工基本医疗保险') }} 城镇职工基本医疗 {{ printCheck(form.medicalPaymentMethod==='城镇居民基本医疗保险') }} 城镇居民基本医疗 {{ printCheck(form.medicalPaymentMethod==='全公费') }} 全公费 {{ printCheck(form.medicalPaymentMethod==='其它') }} 其它:{{ form.medicalPaymentOther }}</template>
  457. </td>
  458. </tr>
  459. <!-- 经济来源 -->
  460. <tr>
  461. <td class="lbl">经济来源</td>
  462. <td colspan="6" class="check-cell">
  463. <template v-if="!isTextMode">
  464. <label><input type="checkbox" :checked="form.incomeSource.includes('退休金/养老金')" @change="toggleArrayItem('incomeSource','退休金/养老金')" /> 退休金/养老金</label>
  465. <label><input type="checkbox" :checked="form.incomeSource.includes('子女补贴')" @change="toggleArrayItem('incomeSource','子女补贴')" /> 子女补贴</label>
  466. <label><input type="checkbox" :checked="form.incomeSource.includes('亲友资助')" @change="toggleArrayItem('incomeSource','亲友资助')" /> 亲友资助</label>
  467. <label><input type="checkbox" :checked="form.incomeSource.includes('其他补贴')" @change="toggleArrayItem('incomeSource','其他补贴')" /> 其他补贴:<input :value="form.incomeSourceOther" class="inline-input small" placeholder="" @input="onInlineInput('incomeSourceOther',$event)" /></label>
  468. </template>
  469. <template v-else>{{ printCheck(form.incomeSource.includes('退休金/养老金')) }} 退休金/养老金 {{ printCheck(form.incomeSource.includes('子女补贴')) }} 子女补贴 {{ printCheck(form.incomeSource.includes('亲友资助')) }} 亲友资助 {{ printCheck(form.incomeSource.includes('其他补贴')) }} 其他补贴:{{ form.incomeSourceOther }}</template>
  470. </td>
  471. </tr>
  472. <!-- 入住前居住 -->
  473. <tr>
  474. <td class="lbl multi-line">入住前<br/>居住</td>
  475. <td colspan="6" class="check-cell">
  476. <template v-if="!isTextMode">
  477. <label><input type="checkbox" :checked="form.preResidenceHomeType.includes('家(独居)')" @change="toggleArrayItem('preResidenceHomeType','家(独居)')" /> 家(独居)</label>
  478. <label><input type="checkbox" :checked="form.preResidenceHomeType.includes('配偶')" @change="toggleArrayItem('preResidenceHomeType','配偶')" /> 配偶</label>
  479. <label><input type="checkbox" :checked="form.preResidenceHomeType.includes('子女')" @change="toggleArrayItem('preResidenceHomeType','子女')" /> 子女</label>
  480. <label><input type="checkbox" :checked="form.preResidenceHomeType.includes('保姆')" @change="toggleArrayItem('preResidenceHomeType','保姆')" /> 保姆</label>
  481. <label><input type="checkbox" :checked="form.preResidenceHomeType.includes('其他')" @change="toggleArrayItem('preResidenceHomeType','其他')" /> 其他:<input :value="form.preResidenceHomeOther" class="inline-input small" placeholder="" @input="onInlineInput('preResidenceHomeOther',$event)" /></label>
  482. <label><input type="checkbox" :checked="form.preResidenceHomeType.includes('医院')" @change="toggleArrayItem('preResidenceHomeType','医院')" /> 医院</label>
  483. </template>
  484. <template v-else>{{ printCheck(form.preResidenceHomeType.includes('家(独居)')) }} 家(独居) {{ printCheck(form.preResidenceHomeType.includes('配偶')) }} 配偶 {{ printCheck(form.preResidenceHomeType.includes('子女')) }} 子女 {{ printCheck(form.preResidenceHomeType.includes('保姆')) }} 保姆 {{ printCheck(form.preResidenceHomeType.includes('其他')) }} 其他:{{ form.preResidenceHomeOther }} {{ printCheck(form.preResidenceHomeType.includes('医院')) }} 医院</template>
  485. </td>
  486. </tr>
  487. <!-- 入住机构原因 -->
  488. <tr>
  489. <td class="lbl multi-line">入住机构<br/>原因</td>
  490. <td colspan="6"><FieldItem :model-value="form.checkInReason" :is-text-mode="isTextMode" width="100%" @update:model-value="(v:any)=>updateForm('checkInReason',v)" /></td>
  491. </tr>
  492. <!-- ========== 健康状况 ========== -->
  493. <!-- 健康状况rowspan=10覆盖:既往史2行 + 手术史1行 + 外伤史2行 + 现患疾病2行 + 就医情况3行 -->
  494. <!-- 既往史第1行:健康(1) | 既往史(1) | 内容(5) = 7列 -->
  495. <tr>
  496. <td class="lbl multi-line" rowspan="10">健康状况</td>
  497. <td class="lbl" rowspan="2">既往史</td>
  498. <td colspan="5" class="disease-row">
  499. <template v-if="!isTextMode">
  500. <label><input type="checkbox" :checked="form.pastHistoryDiseaseNone" @change="onPastHistoryNoneChange" /> 无</label>
  501. <label><input type="checkbox" :checked="!form.pastHistoryDiseaseNone" @change="updateForm('pastHistoryDiseaseNone',false)" /> 有:疾病名称:</label>
  502. <input :value="form.pastHistoryDiseaseName1" class="inline-input medium" placeholder="" @input="onInlineInput('pastHistoryDiseaseName1',$event)" />
  503. <span class="text-suffix">,确诊时间:</span>
  504. <input :value="form.pastHistoryDiseaseTime1" class="inline-input small" placeholder="" @input="onInlineInput('pastHistoryDiseaseTime1',$event)" />
  505. </template>
  506. <template v-else>{{ printCheck(form.pastHistoryDiseaseNone) }} 无 {{ printCheck(!form.pastHistoryDiseaseNone) }} 有:疾病名称:{{ form.pastHistoryDiseaseName1 }} ,确诊时间:{{ form.pastHistoryDiseaseTime1 }}</template>
  507. </td>
  508. </tr>
  509. <!-- 既往史第2行:(健康继续) | (既往史继续) | 内容(5) -->
  510. <tr>
  511. <td colspan="5" class="disease-row">
  512. <template v-if="!isTextMode">
  513. <span class="text-prefix ml20"></span>
  514. <span class="text-suffix">疾病名称:</span>
  515. <input :value="form.pastHistoryDiseaseName2" class="inline-input medium" placeholder="" @input="onInlineInput('pastHistoryDiseaseName2',$event)" />
  516. <span class="text-suffix">,确诊时间:</span>
  517. <input :value="form.pastHistoryDiseaseTime2" class="inline-input small" placeholder="" @input="onInlineInput('pastHistoryDiseaseTime2',$event)" />
  518. </template>
  519. <template v-else>疾病名称:{{ form.pastHistoryDiseaseName2 }} ,确诊时间:{{ form.pastHistoryDiseaseTime2 }}</template>
  520. </td>
  521. </tr>
  522. <!-- 手术史:健康(1) | 手术史(1) | 内容(5) = 7列 -->
  523. <tr>
  524. <td class="lbl">手术史</td>
  525. <td colspan="5" class="disease-row">
  526. <template v-if="!isTextMode">
  527. <label><input type="checkbox" :checked="!form.pastHistorySurgery" @change="updateForm('pastHistorySurgery',false)" /> 无</label>
  528. <label><input type="checkbox" :checked="form.pastHistorySurgery" @change="updateForm('pastHistorySurgery',true)" /> 有:手术名称:</label>
  529. <input :value="form.pastHistorySurgeryName" class="inline-input medium" placeholder="" @input="onInlineInput('pastHistorySurgeryName',$event)" />
  530. <span class="text-suffix">,手术时间:</span>
  531. <input :value="form.pastHistorySurgeryTime" class="inline-input small" placeholder="" @input="onInlineInput('pastHistorySurgeryTime',$event)" />
  532. </template>
  533. <template v-else>{{ printCheck(!form.pastHistorySurgery) }} 无 {{ printCheck(form.pastHistorySurgery) }} 有:手术名称:{{ form.pastHistorySurgeryName }} ,手术时间:{{ form.pastHistorySurgeryTime }}</template>
  534. </td>
  535. </tr>
  536. <!-- 外伤史第1行:健康(1) | 外伤史(1 rowspan=2) | 内容(5) = 7列 -->
  537. <tr>
  538. <td class="lbl" rowspan="2">外伤史</td>
  539. <td colspan="5" class="disease-row">
  540. <template v-if="!isTextMode">
  541. <label><input type="checkbox" :checked="!form.pastHistoryTrauma" @change="updateForm('pastHistoryTrauma',false)" /> 无</label>
  542. <label><input type="checkbox" :checked="form.pastHistoryTrauma" @change="updateForm('pastHistoryTrauma',true)" /> 有:外伤部位:</label>
  543. <input :value="form.pastHistoryTraumaPart1" class="inline-input medium" placeholder="" @input="onInlineInput('pastHistoryTraumaPart1',$event)" />
  544. <span class="text-suffix">,发生时间:</span>
  545. <input :value="form.pastHistoryTraumaTime1" class="inline-input small" placeholder="" @input="onInlineInput('pastHistoryTraumaTime1',$event)" />
  546. </template>
  547. <template v-else>{{ printCheck(!form.pastHistoryTrauma) }} 无 {{ printCheck(form.pastHistoryTrauma) }} 有:外伤部位:{{ form.pastHistoryTraumaPart1 }} ,发生时间:{{ form.pastHistoryTraumaTime1 }}</template>
  548. </td>
  549. </tr>
  550. <!-- 外伤史第2行:(健康继续) | (外伤史继续) | 内容(5) -->
  551. <tr>
  552. <td colspan="5" class="disease-row">
  553. <template v-if="!isTextMode">
  554. <span class="text-prefix ml20"></span>
  555. <span class="text-suffix">外伤部位:</span>
  556. <input :value="form.pastHistoryTraumaPart2" class="inline-input medium" placeholder="" @input="onInlineInput('pastHistoryTraumaPart2',$event)" />
  557. <span class="text-suffix">,发生时间:</span>
  558. <input :value="form.pastHistoryTraumaTime2" class="inline-input small" placeholder="" @input="onInlineInput('pastHistoryTraumaTime2',$event)" />
  559. </template>
  560. <template v-else>外伤部位:{{ form.pastHistoryTraumaPart2 }} ,发生时间:{{ form.pastHistoryTraumaTime2 }}</template>
  561. </td>
  562. </tr>
  563. <!-- 现患疾病 -->
  564. <tr>
  565. <td class="lbl" rowspan="2">现患疾病</td>
  566. <td colspan="5" class="disease-row">
  567. <template v-if="!isTextMode">
  568. <span class="text-suffix">疾病名称:</span>
  569. <input :value="form.currentDiseaseName1" class="inline-input medium" placeholder="" @input="onInlineInput('currentDiseaseName1',$event)" />
  570. <span class="text-suffix">,确诊时间:</span>
  571. <input :value="form.currentDiseaseTime1" class="inline-input small" placeholder="" @input="onInlineInput('currentDiseaseTime1',$event)" />
  572. <span class="text-suffix">,目前状况:</span>
  573. <input :value="form.currentDiseaseStatus1" class="inline-input small" placeholder="" @input="onInlineInput('currentDiseaseStatus1',$event)" />
  574. </template>
  575. <template v-else>疾病名称:{{ form.currentDiseaseName1 }} ,确诊时间:{{ form.currentDiseaseTime1 }} ,目前状况:{{ form.currentDiseaseStatus1 }}</template>
  576. </td>
  577. </tr>
  578. <tr>
  579. <td colspan="5" class="disease-row">
  580. <template v-if="!isTextMode">
  581. <span class="text-suffix">疾病名称:</span>
  582. <input :value="form.currentDiseaseName2" class="inline-input medium" placeholder="" @input="onInlineInput('currentDiseaseName2',$event)" />
  583. <span class="text-suffix">,确诊时间:</span>
  584. <input :value="form.currentDiseaseTime2" class="inline-input small" placeholder="" @input="onInlineInput('currentDiseaseTime2',$event)" />
  585. <span class="text-suffix">,目前状况:</span>
  586. <input :value="form.currentDiseaseStatus2" class="inline-input small" placeholder="" @input="onInlineInput('currentDiseaseStatus2',$event)" />
  587. </template>
  588. <template v-else>疾病名称:{{ form.currentDiseaseName2 }} ,确诊时间:{{ form.currentDiseaseTime2 }} ,目前状况:{{ form.currentDiseaseStatus2 }}</template>
  589. </td>
  590. </tr>
  591. <!-- 就医情况 -->
  592. <tr>
  593. <td class="lbl multi-line" rowspan="3">就医情况</td>
  594. <td colspan="5" class="disease-row">
  595. <template v-if="!isTextMode">
  596. <span class="text-suffix">固定时间就诊:</span>
  597. <label><input type="checkbox" :checked="form.regularVisitNone" @change="updateForm('regularVisitNone',true)" /> 无</label>
  598. <label><input type="checkbox" :checked="!form.regularVisitNone" @change="updateForm('regularVisitNone',false)" /> 有(原因:</label>
  599. <input :value="form.regularVisitReason" class="inline-input small" placeholder="" @input="onInlineInput('regularVisitReason',$event)" />
  600. <span class="text-suffix">,频率:___次/月)</span>
  601. </template>
  602. <template v-else>固定时间就诊:{{ printCheck(form.regularVisitNone) }} 无 {{ printCheck(!form.regularVisitNone) }} 有(原因:{{ form.regularVisitReason }} ,频率:___次/月)</template>
  603. </td>
  604. </tr>
  605. <tr>
  606. <td colspan="5" class="disease-row">
  607. <template v-if="!isTextMode">
  608. <span class="text-suffix">近一年内住院情况:</span>
  609. <label><input type="checkbox" :checked="form.hospitalizationNone" @change="updateForm('hospitalizationNone',true)" /> 未住院</label>
  610. <label><input type="checkbox" :checked="!form.hospitalizationNone" @change="updateForm('hospitalizationNone',false)" /> 住过院(住院次数:<input :value="form.hospitalizationCount" class="inline-input tiny" placeholder="" @input="onInlineInput('hospitalizationCount',$event)" /> 次)</label>
  611. </template>
  612. <template v-else>近一年内住院情况:{{ printCheck(form.hospitalizationNone) }} 未住院 {{ printCheck(!form.hospitalizationNone) }} 住过院(住院次数:{{ form.hospitalizationCount }} 次)</template>
  613. </td>
  614. </tr>
  615. <tr>
  616. <td colspan="5" class="disease-row">
  617. <template v-if="!isTextMode">
  618. <span class="text-suffix">近一年内急诊情况:</span>
  619. <label><input type="checkbox" :checked="form.emergencyNone" @change="updateForm('emergencyNone',true)" /> 未去过</label>
  620. <label><input type="checkbox" :checked="!form.emergencyNone" @change="updateForm('emergencyNone',false)" /> 去过急诊(去急诊次数:<input :value="form.emergencyCount" class="inline-input tiny" placeholder="" @input="onInlineInput('emergencyCount',$event)" /> 次)</label>
  621. </template>
  622. <template v-else>近一年内急诊情况:{{ printCheck(form.emergencyNone) }} 未去过 {{ printCheck(!form.emergencyNone) }} 去过急诊(去急诊次数:{{ form.emergencyCount }} 次)</template>
  623. </td>
  624. </tr>
  625. <!-- 不适症状 -->
  626. <tr>
  627. <td class="lbl multi-line">不适症状<br/>(近一个<br/>月内情况)</td>
  628. <td colspan="6" class="symptom-cell">
  629. <template v-if="!isTextMode">
  630. <label><input type="checkbox" :checked="form.discomfortSymptomsNone" @change="updateForm('discomfortSymptomsNone',true);form.discomfortSymptomsList=[]" /> 无</label>
  631. <br/>
  632. <label><input type="checkbox" :checked="!form.discomfortSymptomsNone" @change="updateForm('discomfortSymptomsNone',false)" /> 有(可多选)</label>
  633. <div v-if="!form.discomfortSymptomsNone" class="symptom-list">
  634. <label v-for="s in symptomOptions" :key="s" class="symptom-item">
  635. <input type="checkbox" :checked="form.discomfortSymptomsList.includes(s)" @change="toggleArrayItem('discomfortSymptomsList',s)" /> {{ s }}
  636. </label>
  637. <span>其他:<input :value="form.discomfortSymptomsOther" class="inline-input small" placeholder="" @input="onInlineInput('discomfortSymptomsOther',$event)" /></span>
  638. </div>
  639. </template>
  640. <template v-else>
  641. {{ printCheck(form.discomfortSymptomsNone) }} 无
  642. <template v-if="!form.discomfortSymptomsNone">{{ printCheck(true) }} 有:{{ form.discomfortSymptomsList.join('、') }} {{ form.discomfortSymptomsOther }}</template>
  643. </template>
  644. </td>
  645. </tr>
  646. <!-- 过敏史 -->
  647. <tr>
  648. <td class="lbl multi-line" rowspan="3">过敏史</td>
  649. <td colspan="6" class="allergy-row">
  650. <template v-if="!isTextMode">
  651. <label><input type="checkbox" :checked="form.allergyDrugNone" @change="updateForm('allergyDrugNone',true);updateForm('allergyDrugDetail','')" /> 无药物过敏</label>
  652. <label><input type="checkbox" :checked="!form.allergyDrugNone" @change="updateForm('allergyDrugNone',false)" /> 药物过敏:</label>
  653. <input :value="form.allergyDrugDetail" class="inline-input large" placeholder="" @input="onInlineInput('allergyDrugDetail',$event)" />
  654. </template>
  655. <template v-else>{{ printCheck(form.allergyDrugNone) }} 无药物过敏 {{ printCheck(!form.allergyDrugNone) }} 药物过敏:{{ form.allergyDrugDetail }}</template>
  656. </td>
  657. </tr>
  658. <tr>
  659. <td colspan="6" class="allergy-row">
  660. <template v-if="!isTextMode">
  661. <label><input type="checkbox" :checked="form.allergyFoodNone" @change="updateForm('allergyFoodNone',true);updateForm('allergyFoodDetail','')" /> 无食物过敏</label>
  662. <label><input type="checkbox" :checked="!form.allergyFoodNone" @change="updateForm('allergyFoodNone',false)" /> 食物过敏:</label>
  663. <input :value="form.allergyFoodDetail" class="inline-input large" placeholder="" @input="onInlineInput('allergyFoodDetail',$event)" />
  664. </template>
  665. <template v-else>{{ printCheck(form.allergyFoodNone) }} 无食物过敏 {{ printCheck(!form.allergyFoodNone) }} 食物过敏:{{ form.allergyFoodDetail }}</template>
  666. </td>
  667. </tr>
  668. <tr>
  669. <td colspan="6" class="allergy-row">
  670. <template v-if="!isTextMode">
  671. <label><input type="checkbox" :checked="form.allergyEnvNone" @change="updateForm('allergyEnvNone',true);updateForm('allergyEnvDetail','')" /> 无环境过敏</label>
  672. <label><input type="checkbox" :checked="!form.allergyEnvNone" @change="updateForm('allergyEnvNone',false)" /> 环境过敏:</label>
  673. <input :value="form.allergyEnvDetail" class="inline-input large" placeholder="" @input="onInlineInput('allergyEnvDetail',$event)" />
  674. </template>
  675. <template v-else>{{ printCheck(form.allergyEnvNone) }} 无环境过敏 {{ printCheck(!form.allergyEnvNone) }} 环境过敏:{{ form.allergyEnvDetail }}</template>
  676. </td>
  677. </tr>
  678. <!-- 老年综合征 -->
  679. <tr>
  680. <td class="lbl multi-line" rowspan="9">老年综合<br/>征</td>
  681. <td colspan="6" class="syndrome-row">
  682. <template v-if="!isTextMode">
  683. <label><input type="checkbox" :checked="form.fallNone" @change="updateForm('fallNone',true);updateForm('fallDetail','')" /> 无跌倒</label>
  684. <label><input type="checkbox" :checked="!form.fallNone" @change="updateForm('fallNone',false)" /> 有跌倒(</label>
  685. <input :value="form.fallDetail" class="inline-input medium" placeholder="详情" @input="onInlineInput('fallDetail',$event)" />
  686. <span>)</span>
  687. </template>
  688. <template v-else>{{ printCheck(form.fallNone) }} 无跌倒 {{ printCheck(!form.fallNone) }} 有跌倒({{ form.fallDetail }})</template>
  689. </td>
  690. </tr>
  691. <tr>
  692. <td colspan="6" class="syndrome-row">
  693. <template v-if="!isTextMode">
  694. <label><input type="checkbox" :checked="form.memoryDeclineNone" @change="updateForm('memoryDeclineNone',true);updateForm('memoryDeclineDetail','')" /> 无记忆力减退</label>
  695. <label><input type="checkbox" :checked="!form.memoryDeclineNone" @change="updateForm('memoryDeclineNone',false)" /> 有记忆力减退(</label>
  696. <input :value="form.memoryDeclineDetail" class="inline-input medium" placeholder="详情" @input="onInlineInput('memoryDeclineDetail',$event)" />
  697. <span>)</span>
  698. </template>
  699. <template v-else>{{ printCheck(form.memoryDeclineNone) }} 无记忆力减退 {{ printCheck(!form.memoryDeclineNone) }} 有记忆力减退({{ form.memoryDeclineDetail }})</template>
  700. </td>
  701. </tr>
  702. <tr>
  703. <td colspan="6" class="syndrome-row">
  704. <template v-if="!isTextMode">
  705. <label><input type="checkbox" :checked="form.weightLossNone" @change="updateForm('weightLossNone',true);updateForm('weightLossWeight','')" /> 无体重下降</label>
  706. <label><input type="checkbox" :checked="!form.weightLossNone" @change="updateForm('weightLossNone',false)" /> 有体重下降(半年内下降</label>
  707. <input :value="form.weightLossWeight" class="inline-input tiny" placeholder="kg" @input="onInlineInput('weightLossWeight',$event)" />
  708. <span>kg)</span>
  709. </template>
  710. <template v-else>{{ printCheck(form.weightLossNone) }} 无体重下降 {{ printCheck(!form.weightLossNone) }} 有体重下降(半年内下降{{ form.weightLossWeight }}kg)</template>
  711. </td>
  712. </tr>
  713. <tr>
  714. <td colspan="6" class="syndrome-row">
  715. <template v-if="!isTextMode">
  716. <label><input type="checkbox" :checked="form.urinaryIncontinenceNone" @change="updateForm('urinaryIncontinenceNone',true);updateForm('urinaryIncontinenceCount','')" /> 无尿失禁</label>
  717. <label><input type="checkbox" :checked="!form.urinaryIncontinenceNone" @change="updateForm('urinaryIncontinenceNone',false)" /> 有尿失禁(</label>
  718. <input :value="form.urinaryIncontinenceCount" class="inline-input small" placeholder="次数/日" @input="onInlineInput('urinaryIncontinenceCount',$event)" />
  719. <span>次/日)</span>
  720. </template>
  721. <template v-else>{{ printCheck(form.urinaryIncontinenceNone) }} 无尿失禁 {{ printCheck(!form.urinaryIncontinenceNone) }} 有尿失禁({{ form.urinaryIncontinenceCount }}次/日)</template>
  722. </td>
  723. </tr>
  724. <tr>
  725. <td colspan="6" class="syndrome-row">
  726. <template v-if="!isTextMode">
  727. <label><input type="checkbox" :checked="form.sleepDisorderNone" @change="updateForm('sleepDisorderNone',true);form.sleepDisorderTypes=[]" /> 无睡眠障碍</label>
  728. <label><input type="checkbox" :checked="!form.sleepDisorderNone" @change="updateForm('sleepDisorderNone',false)" /> 有睡眠障碍(</label>
  729. <template v-if="!form.sleepDisorderNone">
  730. <label v-for="st in ['入睡困难','早醒','夜间易醒','多梦']" :key="st" style="margin-right:4px;">
  731. <input type="checkbox" :checked="form.sleepDisorderTypes.includes(st)" @change="toggleArrayItem('sleepDisorderTypes',st)" /> {{ st }}
  732. </label>
  733. <span>其他:<input :value="form.sleepDisorderOther" class="inline-input small" placeholder="" @input="onInlineInput('sleepDisorderOther',$event)" /></span>
  734. </template>
  735. <span>)</span>
  736. </template>
  737. <template v-else>{{ printCheck(form.sleepDisorderNone) }} 无睡眠障碍 {{ printCheck(!form.sleepDisorderNone) }} 有睡眠障碍({{ [...form.sleepDisorderTypes, form.sleepDisorderOther].filter(Boolean).join('、') }})</template>
  738. </td>
  739. </tr>
  740. <tr>
  741. <td colspan="6" class="syndrome-row">
  742. <template v-if="!isTextMode">
  743. <label><input type="checkbox" :checked="form.painNone" @change="updateForm('painNone',true);updateForm('painPart','')" /> 无疼痛</label>
  744. <label><input type="checkbox" :checked="!form.painNone" @change="updateForm('painNone',false)" /> 有疼痛(部位:</label>
  745. <input :value="form.painPart" class="inline-input medium" placeholder="" @input="onInlineInput('painPart',$event)" />
  746. <span>)</span>
  747. </template>
  748. <template v-else>{{ printCheck(form.painNone) }} 无疼痛 {{ printCheck(!form.painNone) }} 有疼痛(部位:{{ form.painPart }})</template>
  749. </td>
  750. </tr>
  751. <tr>
  752. <td colspan="6" class="syndrome-row">
  753. <template v-if="!isTextMode">
  754. <label><input type="checkbox" :checked="form.visionAbnormalNone" @change="updateForm('visionAbnormalNone',true);form.visionAbnormalTypes=[]" /> 无视力异常</label>
  755. <label><input type="checkbox" :checked="!form.visionAbnormalNone" @change="updateForm('visionAbnormalNone',false)" /> 有视力异常(</label>
  756. <template v-if="!form.visionAbnormalNone">
  757. <label v-for="vt in ['远视','近视','散光','白内障','青光眼']" :key="vt" style="margin-right:4px;">
  758. <input type="checkbox" :checked="form.visionAbnormalTypes.includes(vt)" @change="toggleArrayItem('visionAbnormalTypes',vt)" /> {{ vt }}
  759. </label>
  760. <span>程度:<input :value="form.visionAbnormalDegree" class="inline-input small" placeholder="" @input="onInlineInput('visionAbnormalDegree',$event)" /></span>
  761. </template>
  762. <span>)</span>
  763. </template>
  764. <template v-else>{{ printCheck(form.visionAbnormalNone) }} 无视力异常 {{ printCheck(!form.visionAbnormalNone) }} 有视力异常({{ [...form.visionAbnormalTypes, form.visionAbnormalDegree].filter(Boolean).join('、') }})</template>
  765. </td>
  766. </tr>
  767. <tr>
  768. <td colspan="6" class="syndrome-row">
  769. <template v-if="!isTextMode">
  770. <label><input type="checkbox" :checked="form.hearingLossNone" @change="updateForm('hearingLossNone',true);updateForm('hearingLossDetail','')" /> 无听力障碍</label>
  771. <label><input type="checkbox" :checked="!form.hearingLossNone" @change="updateForm('hearingLossNone',false)" /> 有听力障碍(</label>
  772. <input :value="form.hearingLossDetail" class="inline-input medium" placeholder="详情" @input="onInlineInput('hearingLossDetail',$event)" />
  773. <span>)</span>
  774. </template>
  775. <template v-else>{{ printCheck(form.hearingLossNone) }} 无听力障碍 {{ printCheck(!form.hearingLossNone) }} 有听力障碍({{ form.hearingLossDetail }})</template>
  776. </td>
  777. </tr>
  778. <tr>
  779. <td colspan="6" class="syndrome-row">
  780. <template v-if="!isTextMode">
  781. <label><input type="checkbox" :checked="form.mentalStatusNone" @change="updateForm('mentalStatusNone',true);form.mentalStatusList=[]" /> 无精神问题</label>
  782. <label><input type="checkbox" :checked="!form.mentalStatusNone" @change="updateForm('mentalStatusNone',false)" /> 有(可多选)</label>
  783. <div v-if="!form.mentalStatusNone" class="mental-list">
  784. <label v-for="m in mentalOptions" :key="m" class="mental-item">
  785. <input type="checkbox" :checked="form.mentalStatusList.includes(m)" @change="toggleArrayItem('mentalStatusList',m)" /> {{ m }}
  786. </label>
  787. <span>其他:<input :value="form.mentalStatusOther" class="inline-input small" placeholder="" @input="onInlineInput('mentalStatusOther',$event)" /></span>
  788. </div>
  789. </template>
  790. <template v-else>
  791. {{ printCheck(form.mentalStatusNone) }} 无精神问题
  792. <template v-if="!form.mentalStatusNone">{{ printCheck(true) }} 有:{{ form.mentalStatusList.join('、') }} {{ form.mentalStatusOther }}</template>
  793. </template>
  794. </td>
  795. </tr>
  796. <!-- 语言表达 -->
  797. <tr>
  798. <td class="lbl">语言表达</td>
  799. <td colspan="6" class="check-cell">
  800. <template v-if="!isTextMode">
  801. <label v-for="le in ['清晰','含糊','失语','方言']" :key="le"><input type="checkbox" :checked="form.languageExpression.includes(le)" @change="toggleArrayItem('languageExpression',le)" /> {{ le }}</label>
  802. <span>其他:<input :value="form.languageExpressionOther" class="inline-input small" placeholder="" @input="onInlineInput('languageExpressionOther',$event)" /></span>
  803. </template>
  804. <template v-else>
  805. <template v-for="le in ['清晰','含糊','失语','方言']" :key="le">{{ printCheck(form.languageExpression.includes(le)) }} {{ le }} </template>
  806. 其他:{{ form.languageExpressionOther }}
  807. </template>
  808. </td>
  809. </tr>
  810. <!-- 备注 -->
  811. <tr>
  812. <td class="lbl">备注</td>
  813. <td colspan="6">
  814. <template v-if="!isTextMode">
  815. <textarea v-model="form.otherNotes" rows="3" class="remark-textarea" placeholder="请输入备注信息" @input="emitForm"></textarea>
  816. </template>
  817. <template v-else>{{ form.otherNotes || '无' }}</template>
  818. </td>
  819. </tr>
  820. <!-- 签名区域:签章(2) + 乙方(2) + 签名(3) = 7列 -->
  821. <tr>
  822. <td class="lbl" rowspan="2" colspan="2">签章</td>
  823. <td colspan="2">乙方(入住人/监护人)签章:</td>
  824. <td colspan="3">
  825. <SignatureItem v-model="form.partyBSign" :is-text-mode="isTextMode" />
  826. </td>
  827. </tr>
  828. <tr>
  829. <td colspan="2">丙方(机构负责人)签章:</td>
  830. <td colspan="3">
  831. <SignatureItem v-model="form.partyCSign" :is-text-mode="isTextMode" />
  832. </td>
  833. </tr>
  834. <tr>
  835. <td class="lbl" colspan="2">签署日期</td>
  836. <td colspan="5">
  837. <FieldItem :model-value="form.signDate" :is-text-mode="isTextMode" type="date" width="180px" @update:model-value="(v:any)=>updateForm('signDate',v)" />
  838. </td>
  839. </tr>
  840. </tbody>
  841. </table>
  842. </div>
  843. </template>
  844. <style scoped lang="scss">
  845. /* A4纸宽度适配:210mm × 297mm,考虑打印边距后内容区约 190mm */
  846. .check-in-registration {
  847. width: 210mm;
  848. max-width: 100%;
  849. margin: 0 auto;
  850. font-family: 'SimSun', 'Microsoft YaHei', serif;
  851. font-size: 14px;
  852. color: #333;
  853. background: #fff;
  854. padding: 4mm;
  855. /* 打印模式优化:A4纸尺寸 */
  856. @media print {
  857. width: 210mm !important;
  858. max-width: 210mm;
  859. padding: 0;
  860. border: none;
  861. margin: 0;
  862. box-sizing: border-box;
  863. }
  864. }
  865. .doc-title {
  866. text-align: center;
  867. font-size: 22px;
  868. font-weight: bold;
  869. letter-spacing: 8px;
  870. margin: 16px 0 12px;
  871. color: #000;
  872. }
  873. .doc-meta {
  874. display: flex;
  875. justify-content: space-between;
  876. margin-bottom: 10px;
  877. font-size: 14px;
  878. }
  879. /* 表格基础样式 - A4纸适配 */
  880. .reg-table {
  881. width: 100%;
  882. border-collapse: collapse;
  883. table-layout: fixed; /* 固定表格布局,按比例分配列宽 */
  884. font-size: 13px;
  885. td {
  886. border: 1px solid #333;
  887. padding: 3mm 2mm;
  888. vertical-align: middle;
  889. word-break: break-all;
  890. }
  891. /* 打印模式 */
  892. @media print {
  893. td {
  894. border-color: #000;
  895. padding: 2mm 1.5mm;
  896. }
  897. }
  898. }
  899. /* 标签单元格 - 紧凑型,只留最小padding */
  900. .lbl {
  901. background-color: #f5f7fa;
  902. font-weight: bold;
  903. text-align: center;
  904. white-space: nowrap;
  905. padding: 2mm 0mm !important; /* 标签列更紧凑 */
  906. &.multi-line {
  907. line-height: 1.4;
  908. padding: 4px;
  909. }
  910. /* 打印模式 */
  911. @media print {
  912. background-color: #f0f0f0 !important;
  913. -webkit-print-color-adjust: exact;
  914. print-color-adjust: exact;
  915. }
  916. }
  917. /* 列宽定义 - 已改用内联style精确控制 */
  918. /* .w80 { width: 80px; }
  919. .w120 { width: 120px; }
  920. .w60 { width: 60px; }
  921. .w90 { width: 90px; }
  922. .w50 { width: 50px; } */
  923. /* 单选格 */
  924. .radio-cell {
  925. white-space: nowrap;
  926. label {
  927. margin-right: 12px;
  928. cursor: pointer;
  929. input[type="radio"] {
  930. margin-right: 2px;
  931. }
  932. }
  933. }
  934. /* 多选格 */
  935. .check-cell {
  936. label {
  937. margin-right: 16px;
  938. cursor: pointer;
  939. white-space: nowrap;
  940. input[type="checkbox"] {
  941. margin-right: 2px;
  942. }
  943. }
  944. @media print {
  945. label {
  946. margin-right: 12px;
  947. }
  948. }
  949. }
  950. /* 照片单元格 - 最右侧第7列,由colgroup控制宽度 */
  951. .photo-cell {
  952. text-align: center;
  953. vertical-align: top !important;
  954. padding: 2mm 1mm;
  955. background: #fafafa;
  956. .photo-box {
  957. width: 31mm;
  958. height: 40mm;
  959. border: 1px solid #ddd;
  960. display: flex;
  961. align-items: center;
  962. justify-content: center;
  963. overflow: hidden;
  964. background: #fff;
  965. .elder-photo {
  966. max-width: 100%;
  967. max-height: 100%;
  968. object-fit: cover;
  969. }
  970. .photo-placeholder {
  971. color: #999;
  972. font-size: 14px;
  973. }
  974. }
  975. @media print {
  976. background: #fff !important;
  977. }
  978. }
  979. /* 行内输入框 */
  980. .inline-input {
  981. border: 1px solid #dcdfe6;
  982. border-radius: 3px;
  983. padding: 2px 6px;
  984. font-size: 13px;
  985. outline: none;
  986. vertical-align: middle;
  987. background: #fff;
  988. &:focus {
  989. border-color: #409eff;
  990. }
  991. &.tiny { width: 40px; }
  992. &.small { width: 80px; }
  993. &.medium { width: 140px; }
  994. &.large { width: 280px; }
  995. }
  996. /* 文本前后缀 */
  997. .text-prefix {
  998. display: inline-block;
  999. margin-left: 20px;
  1000. }
  1001. .ml20 { margin-left: 20px; }
  1002. .text-suffix {
  1003. margin: 0 4px;
  1004. white-space: nowrap;
  1005. }
  1006. /* 疾病行 */
  1007. .disease-row {
  1008. label {
  1009. white-space: nowrap;
  1010. input[type="checkbox"] { margin-right: 2px; }
  1011. }
  1012. }
  1013. /* 不适症状 */
  1014. .symptom-cell {
  1015. line-height: 1.8;
  1016. .symptom-list {
  1017. display: flex;
  1018. flex-wrap: wrap;
  1019. gap: 4px 12px;
  1020. margin-top: 6px;
  1021. padding: 8px;
  1022. background: #fafafa;
  1023. border-radius: 4px;
  1024. .symptom-item {
  1025. margin: 0;
  1026. }
  1027. }
  1028. }
  1029. /* 过敏行 */
  1030. .allergy-row {
  1031. label {
  1032. white-space: nowrap;
  1033. input[type="checkbox"] { margin-right: 2px; }
  1034. }
  1035. }
  1036. /* 老年综合征行 */
  1037. .syndrome-row {
  1038. label {
  1039. white-space: nowrap;
  1040. input[type="checkbox"] { margin-right: 2px; }
  1041. }
  1042. }
  1043. /* 精神状态列表 */
  1044. .mental-list {
  1045. display: flex;
  1046. flex-wrap: wrap;
  1047. gap: 4px 12px;
  1048. margin-top: 6px;
  1049. padding: 8px;
  1050. background: #fafafa;
  1051. border-radius: 4px;
  1052. .mental-item {
  1053. margin: 0;
  1054. }
  1055. }
  1056. /* 备注文本域 */
  1057. .remark-textarea {
  1058. width: 98%;
  1059. border: 1px solid #dcdfe6;
  1060. border-radius: 4px;
  1061. padding: 6px 8px;
  1062. font-size: 13px;
  1063. font-family: inherit;
  1064. resize: vertical;
  1065. outline: none;
  1066. box-sizing: border-box;
  1067. &:focus {
  1068. border-color: #409eff;
  1069. }
  1070. }
  1071. /* 打印模式全局样式 */
  1072. @media print {
  1073. .check-in-registration {
  1074. font-size: 12pt;
  1075. }
  1076. .doc-title {
  1077. font-size: 18pt;
  1078. }
  1079. .reg-table {
  1080. font-size: 11pt;
  1081. }
  1082. .inline-input,
  1083. .remark-textarea {
  1084. border: none;
  1085. border-bottom: 1px solid #333;
  1086. background: transparent;
  1087. }
  1088. .photo-box {
  1089. border: 1px solid #333;
  1090. }
  1091. .symptom-list,
  1092. .mental-list {
  1093. background: transparent;
  1094. border: none;
  1095. }
  1096. }
  1097. </style>