RecordManagement.vue 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888
  1. <template>
  2. <div class="layout_container">
  3. <header class="round-header">
  4. <el-select v-model="recordType" style="width: 120px">
  5. <el-option v-for="item in allRecordTypes" :label="item.label" :value="item.value"></el-option>
  6. </el-select>&nbsp;&nbsp;
  7. <el-input v-model="psnIdNumber" placeholder="人员身份证号" clearable style="width: 180px"></el-input>
  8. <el-divider direction="vertical"></el-divider>
  9. <el-button type="success" @click="queryPsnBaseInfo">参保信息</el-button>
  10. <el-button type="primary" @click="startApplyRecord"> 开始备案 </el-button>
  11. <el-button type="primary" @click="revokeRecord"> 撤销备案 </el-button>
  12. <span v-if="recordType === '2503'" style="margin-left: 12px">
  13. <el-button type="success" @click="querySpecialDiseaseRecords"> 备案查询 </el-button>
  14. <el-button type="success" @click="displayDateRange"> 用药记录 </el-button>
  15. <el-button type="warning" @click="beforeFetchAllSpecialDiseaseRecords"> 备案统计 </el-button>
  16. </span>
  17. </header>
  18. <el-divider content-position="left">
  19. 人员基本信息
  20. </el-divider>
  21. <div>
  22. <el-descriptions :column="4" border>
  23. <el-descriptions-item>
  24. <template #label> 姓名 </template>
  25. {{ baseinfo.psnName }}
  26. </el-descriptions-item>
  27. <el-descriptions-item>
  28. <template #label> 性别 </template>
  29. {{ baseinfo.gendName }}
  30. </el-descriptions-item>
  31. <el-descriptions-item>
  32. <template #label> 证件类型 </template>
  33. {{ baseinfo.psnCertTypeName }}
  34. </el-descriptions-item>
  35. <el-descriptions-item>
  36. <template #label> 证件号码 </template>
  37. {{ baseinfo.certno }}
  38. </el-descriptions-item>
  39. <el-descriptions-item>
  40. <template #label> 出生日期 </template>
  41. {{ baseinfo.brdy }}
  42. </el-descriptions-item>
  43. <el-descriptions-item>
  44. <template #label> 年龄 </template>
  45. {{ baseinfo.age }}
  46. </el-descriptions-item>
  47. <el-descriptions-item>
  48. <template #label> 民族 </template>
  49. {{ baseinfo.natyName }}
  50. </el-descriptions-item>
  51. <el-descriptions-item>
  52. <template #label> 人员编号 </template>
  53. {{ baseinfo.psnNo }}
  54. </el-descriptions-item>
  55. </el-descriptions>
  56. </div>
  57. <el-divider content-position="left">
  58. 人员参保信息
  59. </el-divider>
  60. <div>
  61. <el-table :data="baseinfo.insuinfo" stripe highlight-current-row @row-click="handleClickInsuinfo">
  62. <el-table-column property="balc" label="余额" width="50"></el-table-column>
  63. <el-table-column prop="insutypeName" label="险种类型"></el-table-column>
  64. <el-table-column prop="psnTypeName" label="人员类别" width="120"></el-table-column>
  65. <el-table-column prop="psnInsuStasName" label="参保状态" width="80"></el-table-column>
  66. <el-table-column property="psnInsuDate" label="个人参保日期" width="100"></el-table-column>
  67. <el-table-column property="pausInsuDate" label="暂停参保日期" width="100"></el-table-column>
  68. <el-table-column property="cvlservFlagName" label="公务员标志" width="100"></el-table-column>
  69. <el-table-column property="insuplcAdmdvs" label="参保地医保区划" width="120"></el-table-column>
  70. <el-table-column property="insuplcAdmdvsName" label="参保地名称"></el-table-column>
  71. <el-table-column property="empName" label="单位名称"></el-table-column>
  72. </el-table>
  73. </div>
  74. <el-divider content-position="left">
  75. 人员身份信息
  76. </el-divider>
  77. <div>
  78. <el-table :data="baseinfo.idetinfo">
  79. <el-table-column label="人员身份类别" prop="psnIdetTypeName"></el-table-column>
  80. <el-table-column label="人员类别等级" prop="psnTypeLv"></el-table-column>
  81. <el-table-column label="备注" prop="memo"></el-table-column>
  82. <el-table-column label="开始时间" prop="begntime"></el-table-column>
  83. <el-table-column label="结束时间" prop="endtime"></el-table-column>
  84. </el-table>
  85. </div>
  86. </div>
  87. <el-dialog v-model="showMtbRecords" title="慢特病备案信息">
  88. <el-table :data="mtbRecords" stripe>
  89. <el-table-column property="begndate" label="开始日期"></el-table-column>
  90. <el-table-column prop="enddate" label="结束日期"></el-table-column>
  91. <el-table-column prop="opspDiseCode" label="病种编码"></el-table-column>
  92. <el-table-column prop="opspDiseName" label="病种名称"></el-table-column>
  93. <el-table-column prop="ideFixmedinsName" label="备案机构"></el-table-column>
  94. </el-table>
  95. </el-dialog>
  96. <el-dialog v-model="showMtbUsedMedicines" title="慢特病用药记录">
  97. <el-table :data="mtbUsedMedicines" stripe height="360">
  98. <el-table-column prop="fixmedinsCode" label="定点医药机构编号"></el-table-column>
  99. <el-table-column prop="fixmedinsName" label="定点医药机构名称"></el-table-column>
  100. <el-table-column prop="cnt" label="数量"></el-table-column>
  101. <el-table-column prop="pric" label="单价"></el-table-column>
  102. <el-table-column prop="hilistCode" label="医保目录编码"></el-table-column>
  103. <el-table-column prop="hilistName" label="医保目录名称"></el-table-column>
  104. <el-table-column prop="medListCodg" label="医疗目录编码"></el-table-column>
  105. <el-table-column prop="medinsListCodg" label="医药机构目录编码"></el-table-column>
  106. <el-table-column prop="medinsListName" label="医药机构目录名称"></el-table-column>
  107. <el-table-column prop="prodname" label="商品名"></el-table-column>
  108. <el-table-column prop="spec" label="规格"></el-table-column>
  109. <el-table-column prop="dosformName" label="剂型"></el-table-column>
  110. </el-table>
  111. </el-dialog>
  112. <el-dialog v-model="showDateRange" title="请选择时间范围" width="320px">
  113. <el-date-picker
  114. v-model="dateRange"
  115. type="daterange"
  116. :shortcuts="maxHalfYear"
  117. range-separator="至"
  118. start-placeholder="开始日期"
  119. end-placeholder="结束日期"
  120. size="small"
  121. style="width: 260px"
  122. ></el-date-picker>
  123. <div style="width: 260px; text-align: right; margin-top: 24px">
  124. <el-button type="primary" @click="querySpecialDiseaseUsedMedicines" icon="Check">确定</el-button>
  125. </div>
  126. </el-dialog>
  127. <el-dialog v-model="showFetchAllMtbUsedMedicines" title="门特备案记录" width="70%">
  128. <el-date-picker
  129. v-model="fetchAllMtbRecordsDateRange"
  130. type="daterange"
  131. :shortcuts="maxHalfYear"
  132. range-separator="至"
  133. start-placeholder="开始日期"
  134. end-placeholder="结束日期"
  135. size="small"
  136. style="width: 240px"
  137. ></el-date-picker>
  138. <el-divider direction="vertical"></el-divider>
  139. <el-button type="primary" icon="Check" @click="fetchAllSpecialDiseaseRecords">查询</el-button>
  140. <el-button type="primary" icon="Download" @click="exportExcel">导出Excel</el-button>
  141. <el-table :data="allMtbRecords" height="400" stripe highlight-current-row>
  142. <el-table-column prop="psnName" label="人员姓名"></el-table-column>
  143. <el-table-column prop="psnNo" label="人员编码"></el-table-column>
  144. <el-table-column prop="socialNo" label="身份证号"></el-table-column>
  145. <el-table-column prop="opspDiseCode" label="病种编码"></el-table-column>
  146. <el-table-column prop="opspDiseName" label="病种名称"></el-table-column>
  147. <el-table-column prop="ideFixmedinsName" label="鉴定机构"></el-table-column>
  148. <el-table-column prop="hospIdeDate" label="鉴定日期"></el-table-column>
  149. <el-table-column prop="diagDrName" label="诊断医师"></el-table-column>
  150. <el-table-column prop="begndate" label="开始日期"></el-table-column>
  151. <el-table-column prop="enddate" label="结束日期"></el-table-column>
  152. <el-table-column prop="trtDclaDetlSn" label="备案流水号"></el-table-column>
  153. </el-table>
  154. </el-dialog>
  155. <el-dialog v-model="showMtbRecord" width="70%" title="人员慢特病备案申请">
  156. <i style="color: red">* </i>人员类别:&nbsp;&nbsp;
  157. <el-radio v-model="perstype" :label="1">职工</el-radio>
  158. <el-radio v-model="perstype" :label="2">居民</el-radio>
  159. <div style="height: 20px"></div>
  160. <el-row :gutter="5">
  161. <el-col :span="8">
  162. 人员编号:
  163. <el-input v-model="tempMtbRecord.psnNo" disabled style="width: 160px"></el-input>
  164. </el-col>
  165. <el-col :span="8">
  166. 险种类型:
  167. <el-input v-model="tempMtbRecord.insutypeName" disabled style="width: 160px"></el-input>
  168. </el-col>
  169. <el-col :span="8">
  170. 联系电话:
  171. <el-input v-model="tempMtbRecord.tel" style="width: 160px"></el-input>
  172. </el-col>
  173. </el-row>
  174. <div style="height: 12px"></div>
  175. <el-row :gutter="5">
  176. <el-col :span="8">
  177. 联系地址:
  178. <el-input v-model="tempMtbRecord.addr" style="width: 160px"></el-input>
  179. </el-col>
  180. <el-col :span="8">
  181. 参保地区:
  182. <el-input v-model="tempMtbRecord.insuOptinsName" disabled style="width: 160px"></el-input>
  183. </el-col>
  184. <el-col :span="8">
  185. 鉴定日期:
  186. <el-date-picker v-model="tempMtbRecord.hospIdeDate" style="width: 160px"></el-date-picker>
  187. </el-col>
  188. </el-row>
  189. <div style="height: 12px"></div>
  190. <el-row :gutter="5">
  191. <el-col :span="8">
  192. 开始日期:
  193. <el-date-picker v-model="tempMtbRecord.begndate" style="width: 160px"></el-date-picker>
  194. </el-col>
  195. <el-col :span="8">
  196. 结束日期:
  197. <el-date-picker v-model="tempMtbRecord.enddate" style="width: 160px"></el-date-picker>
  198. </el-col>
  199. <el-col :span="8">
  200. <div style="display: flex">
  201. <div>病种名称:</div>
  202. <div>
  203. <el-autocomplete
  204. v-model="tempMtbRecord.opspDiseName"
  205. :fetch-suggestions="searchDiag" placeholder="请输入名称" clearable
  206. @select="handleSelectDiag"
  207. >
  208. <template #default="{ item }">
  209. <div style="height: 40px">
  210. <div style="height: 16px; margin-top: 4px; font-size: 12px; color: #8492a6">
  211. {{ item.code }}
  212. </div>
  213. <div style="height: 16px">{{ item.name }}</div>
  214. </div>
  215. </template>
  216. </el-autocomplete>
  217. </div>
  218. </div>
  219. </el-col>
  220. </el-row>
  221. <div style="height: 12px"></div>
  222. <el-row :gutter="5">
  223. <el-col :span="8">
  224. 病种编码:
  225. <el-input v-model="tempMtbRecord.opspDiseCode" disabled style="width: 160px"></el-input>
  226. </el-col>
  227. <el-col :span="8">
  228. <div style="display: flex">
  229. <div>医师姓名:</div>
  230. <div>
  231. <el-autocomplete
  232. v-model="tempMtbRecord.diagDrName"
  233. :fetch-suggestions="searchPhysician"
  234. placeholder="请输入姓名"
  235. clearable
  236. @select="handleSelectPhysician"
  237. >
  238. <template #default="{ item }">
  239. <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
  240. <el-divider direction="vertical"></el-divider>
  241. <span>{{ item.name }}</span>
  242. </template>
  243. </el-autocomplete>
  244. </div>
  245. </div>
  246. </el-col>
  247. <el-col :span="8">
  248. 医师编码:
  249. <el-input v-model="tempMtbRecord.diagDrCodg" disabled style="width: 160px"></el-input>
  250. </el-col>
  251. </el-row>
  252. <div style="margin-top: 24px; width: 100%; text-align: right">
  253. <el-button plain icon="Close" @click="showMtbRecord = false">放弃备案</el-button>
  254. <el-button type="primary" icon="Check" @click="submitRecord">提交备案</el-button>
  255. </div>
  256. <div style="height: 12px"></div>
  257. </el-dialog>
  258. <el-dialog v-model="showDdRecord" width="70%" title="定点备案申请">
  259. <el-row :gutter="5">
  260. <el-col :span="8">
  261. 人员编号:
  262. <el-input v-model="tempDdRecord.psnNo" disabled style="width: 160px"></el-input>
  263. </el-col>
  264. <el-col :span="8">
  265. 险种类型:
  266. <el-input v-model="tempDdRecord.insutypeName" disabled style="width: 160px"></el-input>
  267. </el-col>
  268. <el-col :span="8">
  269. 参保地区:
  270. <el-input v-model="tempDdRecord.insuOptinsName" disabled style="width: 160px"></el-input>
  271. </el-col>
  272. </el-row>
  273. <div style="height: 12px"></div>
  274. <el-row :gutter="5">
  275. <el-col :span="8">
  276. 联系电话:
  277. <el-input v-model="tempDdRecord.tel" style="width: 160px"></el-input>
  278. </el-col>
  279. <el-col :span="8">
  280. 联系地址:
  281. <el-input v-model="tempDdRecord.addr" style="width: 160px"></el-input>
  282. </el-col>
  283. <el-col :span="8">
  284. 业务申请类型:
  285. <el-select
  286. v-model="tempDdRecord.bizAppyType"
  287. style="width: 160px"
  288. >
  289. <el-option value="01" label="门诊慢特病登记" />
  290. <el-option value="08" label="异地安置登记" />
  291. <el-option value="03" label="就医定点医疗机构登记" />
  292. </el-select>
  293. </el-col>
  294. </el-row>
  295. <div style="height: 12px"></div>
  296. <el-row :gutter="5">
  297. <el-col :span="8">
  298. 定点排序号:
  299. <el-input
  300. v-model="tempDdRecord.fixSrtNo"
  301. style="width: 160px"
  302. />
  303. </el-col>
  304. <el-col :span="8">
  305. 机构编号:
  306. <el-input
  307. v-model="tempDdRecord.fixmedinsCode"
  308. disabled
  309. style="width: 160px"
  310. />
  311. </el-col>
  312. <el-col :span="8">
  313. 机构名称:
  314. <el-input
  315. v-model="tempDdRecord.fixmedinsName"
  316. disabled
  317. style="width: 160px"
  318. />
  319. </el-col>
  320. </el-row>
  321. <div style="height: 12px"></div>
  322. <el-row :gutter="5">
  323. <el-col :span="8">
  324. 开始日期:
  325. <el-date-picker
  326. v-model="tempDdRecord.begndate"
  327. style="width: 160px" type="date"
  328. format="YYYY-MM-DD"
  329. value-format="YYYY-MM-DD"
  330. />
  331. </el-col>
  332. <el-col :span="8">
  333. 结束日期:
  334. <el-date-picker
  335. v-model="tempDdRecord.enddate"
  336. style="width: 160px" type="date"
  337. format="YYYY-MM-DD"
  338. value-format="YYYY-MM-DD"
  339. />
  340. </el-col>
  341. <el-col :span="8">
  342. 补充说明:
  343. <el-input v-model="tempDdRecord.memo" style="width: 160px"></el-input>
  344. </el-col>
  345. </el-row>
  346. <div style="height: 12px"></div>
  347. <div style="margin-top: 24px; width: 100%; text-align: right">
  348. <el-button plain icon="Close" @click="showDdRecord = false">放弃备案</el-button>
  349. <el-button type="primary" icon="Check" @click="submitRecord">提交备案</el-button>
  350. </div>
  351. <div style="height: 12px"></div>
  352. </el-dialog>
  353. <el-dialog v-model="showWsRecord" width="70%" title="外伤备案申请">
  354. <el-row :gutter="5">
  355. <el-col :span="8">
  356. 人员编号:
  357. <el-input v-model="tempWsRecord.psnNo" disabled style="width: 160px"></el-input>
  358. </el-col>
  359. <el-col :span="8">
  360. 险种类型:
  361. <el-input v-model="tempWsRecord.insutypeName" disabled style="width: 160px"></el-input>
  362. </el-col>
  363. <el-col :span="8">
  364. 联系电话:
  365. <el-input v-model="tempWsRecord.tel" style="width: 160px"></el-input>
  366. </el-col>
  367. </el-row>
  368. <div style="height: 12px"></div>
  369. <el-row :gutter="5">
  370. <el-col :span="8">
  371. 联系地址:
  372. <el-input v-model="tempWsRecord.addr" style="width: 160px"></el-input>
  373. </el-col>
  374. <el-col :span="8">
  375. 参保地区:
  376. <el-input v-model="tempWsRecord.insuAdmdvsName" disabled style="width: 160px"></el-input>
  377. </el-col>
  378. <el-col :span="8">
  379. 受伤日期:
  380. <el-date-picker v-model="tempWsRecord.trumTime" style="width: 160px" type="datetime"
  381. format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"></el-date-picker>
  382. </el-col>
  383. </el-row>
  384. <div style="height: 12px"></div>
  385. <el-row :gutter="5">
  386. <el-col :span="8">
  387. 受伤部位:
  388. <el-input v-model="tempWsRecord.trumPart" style="width: 160px"></el-input>
  389. </el-col>
  390. <el-col :span="8">
  391. 受伤地点:
  392. <el-input v-model="tempWsRecord.trumSite" style="width: 160px"></el-input>
  393. </el-col>
  394. <el-col :span="8">
  395. 受伤原因:
  396. <el-input v-model="tempWsRecord.trumRea" style="width: 160px"></el-input>
  397. </el-col>
  398. </el-row>
  399. <div style="height: 12px"></div>
  400. <el-row :gutter="5">
  401. <el-col :span="8">
  402. 开始日期:
  403. <el-date-picker v-model="tempWsRecord.begndate" style="width: 160px" type="date" format="YYYY-MM-DD"
  404. value-format="YYYY-MM-DD"></el-date-picker>
  405. </el-col>
  406. <el-col :span="8">
  407. 结束日期:
  408. <el-date-picker v-model="tempWsRecord.enddate" style="width: 160px" type="date" format="YYYY-MM-DD"
  409. value-format="YYYY-MM-DD"></el-date-picker>
  410. </el-col>
  411. <el-col :span="8">
  412. 补充说明:
  413. <el-input v-model="tempWsRecord.memo" style="width: 160px"></el-input>
  414. </el-col>
  415. </el-row>
  416. <div style="height: 12px"></div>
  417. <div style="margin-top: 24px; width: 100%; text-align: right">
  418. <el-button plain icon="Close" @click="showWsRecord = false">放弃备案</el-button>
  419. <el-button type="primary" icon="Check" @click="submitRecord">提交备案</el-button>
  420. </div>
  421. <div style="height: 12px"></div>
  422. </el-dialog>
  423. <el-dialog v-model="showSyRecord" width="70%" title="生育备案申请">
  424. <el-row :gutter="5">
  425. <el-col :span="8">
  426. 人员编号:
  427. <el-input v-model="tempSyRecord.psnNo" disabled style="width: 160px"></el-input>
  428. </el-col>
  429. <el-col :span="8">
  430. 险种类型:
  431. <el-input v-model="tempSyRecord.insutypeName" disabled style="width: 160px"></el-input>
  432. </el-col>
  433. <el-col :span="8">
  434. 联系电话:
  435. <el-input v-model="tempSyRecord.tel" style="width: 160px"></el-input>
  436. </el-col>
  437. </el-row>
  438. <div style="height: 12px"></div>
  439. <el-row :gutter="5">
  440. <el-col :span="8">
  441. 联系地址:
  442. <el-input v-model="tempSyRecord.addr" style="width: 160px"></el-input>
  443. </el-col>
  444. <el-col :span="8">
  445. 参保地区:
  446. <el-input v-model="tempSyRecord.insuAdmdvsName" disabled style="width: 160px"></el-input>
  447. </el-col>
  448. </el-row>
  449. <div style="height: 12px"></div>
  450. <el-row :gutter="5">
  451. <el-col :span="8">
  452. 开始日期:
  453. <el-date-picker v-model="tempSyRecord.begndate" style="width: 160px" type="date" format="YYYY-MM-DD"
  454. value-format="YYYY-MM-DD"></el-date-picker>
  455. </el-col>
  456. <el-col :span="8">
  457. 结束日期:
  458. <el-date-picker v-model="tempSyRecord.enddate" style="width: 160px" type="date" format="YYYY-MM-DD"
  459. value-format="YYYY-MM-DD"></el-date-picker>
  460. </el-col>
  461. </el-row>
  462. <div style="height: 12px"></div>
  463. <div style="margin-top: 24px; width: 100%; text-align: right">
  464. <el-button plain icon="Close" @click="showSyRecord = false">放弃备案</el-button>
  465. <el-button type="primary" icon="Check" @click="submitRecord">提交备案</el-button>
  466. </div>
  467. <div style="height: 12px"></div>
  468. </el-dialog>
  469. <el-dialog v-model="showAllAppliedSpecicalDiseaseRecords" title="请选择要撤销的备案" width="70%">
  470. <div style="height: 12px"></div>
  471. <el-table
  472. :data="allAppliedSpecialDiseaseRecords"
  473. stripe
  474. highlight-current-row
  475. @row-click="handleSelectAppliedSpecialDiseaseRecord"
  476. >
  477. <el-table-column prop="opspDiseCode" label="病种编码"></el-table-column>
  478. <el-table-column prop="opspDiseName" label="病种名称"></el-table-column>
  479. <el-table-column prop="hospIdeDate" label="鉴定日期"></el-table-column>
  480. <el-table-column prop="diagDrName" label="鉴定医生"></el-table-column>
  481. <el-table-column prop="begndate" label="开始日期"></el-table-column>
  482. <el-table-column prop="enddate" label="结束日期"></el-table-column>
  483. </el-table>
  484. <div style="margin-top: 24px; width: 100%; text-align: right">
  485. <el-button plain icon="Close" @click="abortRevokeSpecialDiseaseRecord">放弃</el-button>
  486. <el-button type="primary" icon="RefreshLeft" @click="confirmRevokeSpecialDiseaseRecord">撤销备案</el-button>
  487. </div>
  488. <div style="height: 12px"></div>
  489. </el-dialog>
  490. </template>
  491. <script setup>
  492. import {
  493. obtainBasicPersonInfo,
  494. querySpecialChronicDiseasesAccreditation,
  495. querySpecialChronicDiseasesMedicalRecord
  496. } from "@/api/medical-insurance/si-query";
  497. import {ElMessage, ElMessageBox} from "element-plus";
  498. import {formatDate, formatDatetime} from "@/utils/date";
  499. import {maxHalfYear} from "@/data/shortcuts";
  500. import {
  501. getAllSpcChrRcdsByPsnNo,
  502. revokeSpecialChronicDiseasesRecord,
  503. personnelAccidentRecord,
  504. selectAllSpcSlwRcds,
  505. specialChronicDiseasesRecord, personnelAssignmentRecord
  506. } from "@/api/medical-insurance/si-psn-rcd";
  507. import {Export} from "@/utils/ExportExcel";
  508. import {searchData} from "@/api/inpatient/dictionary";
  509. import env from "@/utils/setting";
  510. const allRecordTypes = [
  511. { value: '2503', label: '慢特病备案' },
  512. { value: '2505', label: '定点备案' },
  513. { value: '2507', label: '意外伤害备案' },
  514. ]
  515. const recordType = ref('2503')
  516. const psnIdNumber = ref('')
  517. const baseinfo = ref({})
  518. const currentInsuinfo = ref({})
  519. const perstype = ref(1)
  520. const mtbRecords = ref([])
  521. const showMtbRecords = ref(false)
  522. const mtbUsedMedicines = ref([])
  523. const showMtbUsedMedicines = ref(false)
  524. const dateRange = ref(null)
  525. const showDateRange = ref(false)
  526. const showFetchAllMtbUsedMedicines = ref(false)
  527. const fetchAllMtbRecordsDateRange = ref(null)
  528. const allMtbRecords = ref([])
  529. const showMtbRecord = ref(false);
  530. const showDdRecord = ref(false);
  531. const showWsRecord = ref(false);
  532. const showSyRecord = ref(false);
  533. const tempMtbRecord = reactive({});
  534. const tempDdRecord = reactive({});
  535. const tempWsRecord = reactive({});
  536. const tempSyRecord = reactive({});
  537. const nullIdNumber = () => {
  538. if (!psnIdNumber.value) {
  539. ElMessage({
  540. message: '请输入患者身份证号!',
  541. type: 'warning',
  542. duration: 2000,
  543. showClose: true,
  544. })
  545. return true
  546. }
  547. return false
  548. }
  549. const queryPsnBaseInfo = () => {
  550. if (nullIdNumber()) {
  551. return
  552. }
  553. const param = {
  554. socialNo: psnIdNumber.value,
  555. onlyQry: 1,
  556. }
  557. obtainBasicPersonInfo(param).then((res) => {
  558. baseinfo.value = res
  559. }).catch(() => {
  560. baseinfo.value = {}
  561. })
  562. }
  563. const nullBaseinfo = (needInsuinfo) => {
  564. if (!baseinfo.value.psnNo) {
  565. ElMessage({
  566. message: '请先查询参保信息!',
  567. type: 'warning',
  568. duration: 2000,
  569. showClose: true,
  570. })
  571. return true
  572. }
  573. if (needInsuinfo && !currentInsuinfo.value.insutype) {
  574. ElMessage({
  575. message: '请选择一条参保信息!',
  576. type: 'warning',
  577. duration: 2000,
  578. showClose: true,
  579. })
  580. return true
  581. }
  582. return false
  583. }
  584. const nullDateRange = () => {
  585. if (!dateRange.value) {
  586. ElMessage({
  587. message: '请选择日期范围!',
  588. type: 'warning',
  589. duration: 2000,
  590. showClose: true,
  591. })
  592. return true
  593. }
  594. return false
  595. }
  596. const handleClickInsuinfo = (row) => {
  597. currentInsuinfo.value = row
  598. if (row.insutype === '310') {
  599. perstype.value = 1
  600. } else if (row.insutype === '390') {
  601. perstype.value = 2
  602. }
  603. }
  604. const querySpecialDiseaseRecords = () => {
  605. if (nullBaseinfo(true)) {
  606. return
  607. }
  608. querySpecialChronicDiseasesAccreditation({
  609. psnNo: baseinfo.value.psnNo,
  610. admdvs: currentInsuinfo.value.insuplcAdmdvs,
  611. needAllRcd: 1,
  612. }).then((res) => {
  613. mtbRecords.value = res
  614. showMtbRecords.value = true
  615. })
  616. }
  617. const displayDateRange = () => {
  618. showDateRange.value = true
  619. }
  620. const querySpecialDiseaseUsedMedicines = () => {
  621. if (nullBaseinfo(false)) {
  622. return
  623. }
  624. if (nullDateRange()) {
  625. return
  626. }
  627. const param = {
  628. psnNo: baseinfo.value.psnNo,
  629. begntime: formatDatetime(dateRange.value[0]),
  630. endtime: formatDatetime(dateRange.value[1]),
  631. }
  632. querySpecialChronicDiseasesMedicalRecord(param).then((res) => {
  633. showDateRange.value = false
  634. mtbUsedMedicines.value = res
  635. showMtbUsedMedicines.value = true
  636. })
  637. }
  638. const beforeFetchAllSpecialDiseaseRecords = () => {
  639. showFetchAllMtbUsedMedicines.value = true
  640. }
  641. const fetchAllSpecialDiseaseRecords = () => {
  642. if (!fetchAllMtbRecordsDateRange.value) {
  643. ElMessage({
  644. message: '请选择日期范围!',
  645. type: 'warning',
  646. duration: 2000,
  647. showClose: true,
  648. })
  649. return true
  650. }
  651. const begntime = formatDate(fetchAllMtbRecordsDateRange.value[0])
  652. const endtime = formatDate(fetchAllMtbRecordsDateRange.value[1])
  653. selectAllSpcSlwRcds(begntime, endtime).then((res) => {
  654. allMtbRecords.value = res
  655. })
  656. }
  657. const exportExcel = () => {
  658. if (allMtbRecords.value.length === 0) {
  659. ElMessage({
  660. message: '没有可以导出的数据。',
  661. type: 'warning',
  662. duration: 2000,
  663. showClose: true,
  664. })
  665. return true
  666. }
  667. const title = {
  668. psnName: '人员姓名',
  669. psnNo: '人员编码',
  670. socialNo: '身份证号',
  671. opspDiseCode: '病种编码',
  672. opspDiseName: '病种名称',
  673. ideFixmedinsName: '鉴定机构',
  674. hospIdeDate: '鉴定日期',
  675. diagDrName: '诊断医师',
  676. begndate: '开始日期',
  677. enddate: '结束日期',
  678. trtDclaDetlSn: '备案流水号',
  679. }
  680. Export(allMtbRecords.value, title, '门特备案详情')
  681. }
  682. const searchDiag = (queryString, cb) => {
  683. if (queryString && queryString.length > 1) {
  684. const param = {
  685. method: 'name',
  686. content: queryString,
  687. target: 'slwspcdiag',
  688. perstype: perstype.value,
  689. medType: '14',
  690. }
  691. searchData(param).then((res) => {
  692. cb(res)
  693. })
  694. }
  695. }
  696. const handleSelectDiag = (item) => {
  697. tempMtbRecord.opspDiseCode = item.code
  698. tempMtbRecord.opspDiseName = item.name
  699. }
  700. const searchPhysician = (queryString, cb) => {
  701. if (queryString && queryString.length > 1) {
  702. const param = {
  703. method: 'name',
  704. content: queryString,
  705. target: 'physician',
  706. medType: '14',
  707. }
  708. searchData(param).then((res) => {
  709. cb(res)
  710. })
  711. }
  712. }
  713. const handleSelectPhysician = (item) => {
  714. tempMtbRecord.diagDrCodg = item.code
  715. tempMtbRecord.diagDrName = item.name
  716. }
  717. const startApplyRecord = () => {
  718. if (nullBaseinfo(true)) {
  719. return
  720. }
  721. beforeApplySpecialDiseaseRecord()
  722. }
  723. const beforeApplySpecialDiseaseRecord = () => {
  724. switch (recordType.value) {
  725. case '2503':
  726. tempMtbRecord.psnNo = baseinfo.value.psnNo
  727. tempMtbRecord.psnName = baseinfo.value.psnName
  728. tempMtbRecord.socialNo = baseinfo.value.certno
  729. tempMtbRecord.insutype = currentInsuinfo.value.insutype
  730. tempMtbRecord.insutypeName = currentInsuinfo.value.insutypeName
  731. tempMtbRecord.insuOptins = currentInsuinfo.value.insuplcAdmdvs
  732. tempMtbRecord.insuOptinsName = currentInsuinfo.value.insuplcAdmdvsName;
  733. showMtbRecord.value = true;
  734. break;
  735. case '2505':
  736. tempDdRecord.psnNo = baseinfo.value.psnNo
  737. tempDdRecord.insutype = currentInsuinfo.value.insutype
  738. tempDdRecord.insutypeName = currentInsuinfo.value.insutypeName
  739. tempDdRecord.insuOptins = currentInsuinfo.value.insuplcAdmdvs
  740. tempDdRecord.insuOptinsName = currentInsuinfo.value.insuplcAdmdvsName;
  741. tempDdRecord.fixmedinsCode = env.VITE_HOSPITAL_CODE
  742. tempDdRecord.fixmedinsName = env.VITE_HOSPITAL_NAME
  743. showDdRecord.value = true;
  744. break;
  745. case '2507':
  746. tempWsRecord.psnNo = baseinfo.value.psnNo;
  747. tempWsRecord.insutype = currentInsuinfo.value.insutype;
  748. tempWsRecord.insutypeName = currentInsuinfo.value.insutypeName
  749. tempWsRecord.psnCertType = "01";
  750. tempWsRecord.certno = baseinfo.value.certno;
  751. tempWsRecord.insuAdmdvs = currentInsuinfo.value.insuplcAdmdvs;
  752. tempWsRecord.bizUsedFlag = "0";
  753. tempWsRecord.insuAdmdvs = currentInsuinfo.value.insuplcAdmdvs
  754. tempWsRecord.insuAdmdvsName = currentInsuinfo.value.insuplcAdmdvsName;
  755. showWsRecord.value = true;
  756. break;
  757. }
  758. }
  759. const submitRecord = () => {
  760. switch (recordType.value) {
  761. case '2503':
  762. specialChronicDiseasesRecord(tempMtbRecord).then((res) => {
  763. ElMessageBox.alert(res, {
  764. type: 'success',
  765. confirmButtonText: '确定',
  766. }).then(() => {
  767. showMtbRecord.value = false
  768. });
  769. });
  770. break;
  771. case '2505':
  772. personnelAssignmentRecord(tempDdRecord).then((res) => {
  773. ElMessageBox.alert(res, {
  774. type: 'success',
  775. confirmButtonText: '确定',
  776. }).then(() => {
  777. showDdRecord.value = false
  778. });
  779. })
  780. break;
  781. case '2507':
  782. personnelAccidentRecord(tempWsRecord).then((res) => {
  783. ElMessageBox.alert(res, {
  784. type: 'success',
  785. confirmButtonText: '确定',
  786. }).then(() => {
  787. showWsRecord.value = false
  788. });
  789. });
  790. break;
  791. }
  792. }
  793. const revokeRecord = () => {
  794. if (nullBaseinfo(false)) {
  795. return
  796. }
  797. switch (recordType.value) {
  798. case '2503':
  799. beforeRevokeSpecialDiseaseRecord()
  800. break
  801. }
  802. }
  803. const allAppliedSpecialDiseaseRecords = ref([])
  804. const showAllAppliedSpecicalDiseaseRecords = ref(false)
  805. const beforeRevokeSpecialDiseaseRecord = () => {
  806. getAllSpcChrRcdsByPsnNo(baseinfo.value.psnNo).then((res) => {
  807. allAppliedSpecialDiseaseRecords.value = res
  808. showAllAppliedSpecicalDiseaseRecords.value = true
  809. })
  810. }
  811. const currentAppliedSpecialDiseaseRecord = ref({})
  812. const handleSelectAppliedSpecialDiseaseRecord = (row) => {
  813. currentAppliedSpecialDiseaseRecord.value = row
  814. }
  815. const abortRevokeSpecialDiseaseRecord = () => {
  816. currentAppliedSpecialDiseaseRecord.value = {}
  817. showAllAppliedSpecicalDiseaseRecords.value = false
  818. }
  819. const confirmRevokeSpecialDiseaseRecord = () => {
  820. if (!currentAppliedSpecialDiseaseRecord.value.psnNo) {
  821. ElMessage({
  822. message: '请选择要撤销的备案!',
  823. type: 'warning',
  824. duration: 2000,
  825. showClose: true,
  826. })
  827. return
  828. }
  829. ElMessageBox.prompt('请填写撤销原因:', '提示', {
  830. confirmButtonText: '确定',
  831. cancelButtonText: '取消',
  832. type: 'warning',
  833. inputPattern: /\S/,
  834. inputErrorMessage: '撤销原因为必填项!',
  835. }).then(({ value }) => {
  836. currentAppliedSpecialDiseaseRecord.value.memo = value
  837. const param = {
  838. id: currentAppliedSpecialDiseaseRecord.value.id,
  839. psnNo: currentAppliedSpecialDiseaseRecord.value.psnNo,
  840. trtDclaDetlSn: currentAppliedSpecialDiseaseRecord.value.trtDclaDetlSn,
  841. memo: value,
  842. }
  843. revokeSpecialChronicDiseasesRecord(param).then((res) => {
  844. ElMessage({
  845. message: res,
  846. type: 'success',
  847. duration: 2000,
  848. showClose: true,
  849. })
  850. abortRevokeSpecialDiseaseRecord()
  851. })
  852. }).catch(() => {})
  853. }
  854. </script>