JieSuanDanXiangQing.vue 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865
  1. <template>
  2. <el-container>
  3. <el-dialog v-model="huanZheXinXiDialog" fullscreen>
  4. <el-descriptions title="基本信息" border style="width: 100%" :column="4">
  5. <template #extra>
  6. <el-button type="info" @click="shenHeClick">审核信息</el-button>
  7. <el-button type="primary" size="small" @click="shuJuDuiBi">数据对比</el-button>
  8. <el-button type="success" size="small" @click="baoCunXiuGai">保存修改</el-button>
  9. <bei-zhu :data="baoCunXiuGaiData" ref="beiZhuRef" @baoCunHouGuanBi="baoCunHouGuanBi"></bei-zhu>
  10. </template>
  11. <el-descriptions-item label="姓名">
  12. {{ setlinfo.name }}
  13. <el-button @click="feiYongDrawer">{{ setlinfo.outDeptName }}</el-button>
  14. <ke-shi-fei-yong ref="keShiFeiYongRef"></ke-shi-fei-yong>
  15. </el-descriptions-item>
  16. <el-descriptions-item label="住院号">
  17. {{ setlinfo.inpatientNo }}
  18. </el-descriptions-item>
  19. <el-descriptions-item label="医保身份">
  20. {{ setlinfo.responceTypeName }}
  21. </el-descriptions-item>
  22. <el-descriptions-item label="性别">
  23. {{ cptSex(setlinfo.sex) }}
  24. </el-descriptions-item>
  25. <el-descriptions-item label="住院次数">
  26. {{ setlinfo.admissTimes }}
  27. </el-descriptions-item>
  28. <el-descriptions-item label="总费用">
  29. {{ setlinfo.medfeeSumamt }}
  30. </el-descriptions-item>
  31. <el-descriptions-item label="诊断编码">
  32. {{ setlinfo.disDiag }}
  33. </el-descriptions-item>
  34. <el-descriptions-item label="治疗方式">
  35. <el-select v-model="setlinfo.operation" filterable style="width: 220px;"
  36. >
  37. <el-option v-for="item in operations" :key="item.code" :value="item.code" :label="item.name">
  38. <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
  39. <el-divider direction="vertical"></el-divider>
  40. <span>{{ item.name }}</span>
  41. </el-option>
  42. </el-select>
  43. </el-descriptions-item>
  44. <el-descriptions-item label="住院天数">
  45. {{ setlinfo.actIptDays }}
  46. </el-descriptions-item>
  47. <el-descriptions-item label="报销金额">
  48. {{ setlinfo.fundPaySumamt }}
  49. </el-descriptions-item>
  50. <el-descriptions-item label="诊断名称">
  51. {{ setlinfo.disDiagComment }}
  52. </el-descriptions-item>
  53. <el-descriptions-item label="申报类型">
  54. <el-select v-model="setlinfo.decType" filterable style="width: 150px;"
  55. >
  56. <el-option v-for="item in decTypes" :key="item.code" :value="item.code" :label="item.name"
  57. :disabled="item.dis">
  58. <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
  59. <el-divider direction="vertical"></el-divider>
  60. <span>{{ item.name }}</span>
  61. </el-option>
  62. </el-select>
  63. </el-descriptions-item>
  64. <el-descriptions-item label="审核" v-if="shenHeQuanXian()">
  65. <el-button type="success" :disabled="keFeiShenHe" @click="shenHeTongGuoClick">审核通过</el-button>
  66. <el-button type="success" :disabled="keFeiShenHe" @click="shenHeTongGuoShangChuanClick">审核通过并上传</el-button>
  67. <el-button type="danger" :disabled="keFeiShenHe" @click="shenHeBoHuiClick">审核驳回</el-button>
  68. </el-descriptions-item>
  69. </el-descriptions>
  70. <el-tag size="small">住院诊断信息</el-tag>
  71. <el-button type="success" icon="el-icon-circle-plus" @click="addZhenDuanClick">新增诊断</el-button>
  72. 入院病情: 1.有,2.临床未确定,3.情况不明,4.无
  73. <el-table :data="diseinfo" :height="store.state.app.windowSize.h / 2.5" stripe highlight-current-row>
  74. <el-table-column label="诊断代码" prop="disDiag">
  75. <template #default="scope">
  76. <el-button type="text" @click="xiuGaiZhenDuanClick(scope.$index,scope.row)">{{
  77. scope.row.disDiag
  78. }}
  79. </el-button>
  80. </template>
  81. </el-table-column>
  82. <el-table-column label="诊断名称" prop="disDiagComment"></el-table-column>
  83. <el-table-column label="入院病情" prop="admissCond" width="90">
  84. </el-table-column>
  85. <el-table-column label="诊断类别" prop="siDiagTypeName">
  86. <template #default="scope">
  87. {{ getsiDiagTypeName(scope.row.siDiagType) }}
  88. </template>
  89. </el-table-column>
  90. <el-table-column label="诊断排序" prop="disDiagNo">
  91. <template #default="scope">
  92. {{ scope.row.disDiagNo }}
  93. &nbsp;&nbsp;&nbsp;
  94. <el-button type="primary" v-if="scope.row.disDiagNo !== 1"
  95. @click="sheZhiZhuZhenDuan(scope.$index,scope.row.disDiagNo)">
  96. 设为主诊断
  97. </el-button>
  98. </template>
  99. </el-table-column>
  100. <el-table-column label="删除">
  101. <template #default="scope">
  102. <el-popconfirm
  103. confirm-button-text="确认"
  104. cancel-button-text="取消"
  105. icon="el-icon-info"
  106. iconColor="#F56C6C"
  107. title="是否删除该诊断"
  108. @confirm="delZhenDuan(scope.$index,scope.row.disDiagNo)"
  109. >
  110. <template #reference>
  111. <el-button size="mini" type="danger" icon="el-icon-delete">删除</el-button>
  112. </template>
  113. </el-popconfirm>
  114. </template>
  115. </el-table-column>
  116. </el-table>
  117. <el-tag size="small">手术操作信息</el-tag>
  118. <el-button type="success" icon="el-icon-circle-plus" @click="tianJiaXiuGaiShouShu(-1)">新增手术</el-button>
  119. <el-table :data="oprninfo" :height="store.state.app.windowSize.h / 2.5" stripe highlight-current-row>
  120. <el-table-column label="手术及操作名称" prop="ssmc">
  121. <template #default="scope">
  122. <el-button type="text" @click="tianJiaXiuGaiShouShu(scope.$index)">{{ scope.row.ssmc }}</el-button>
  123. </template>
  124. </el-table-column>
  125. <el-table-column label="手术及操作日期" prop="ssrq"></el-table-column>
  126. <el-table-column label="手术级别" prop="ssjb"></el-table-column>
  127. <el-table-column label="手术及操作编码 " prop="ssbm"></el-table-column>
  128. <el-table-column label="手术及操作医师">
  129. <el-table-column label="术者" prop="ssysName"></el-table-column>
  130. <el-table-column label="I助" prop="sszsName1"></el-table-column>
  131. <el-table-column label="II助" prop="sszsName2"></el-table-column>
  132. </el-table-column>
  133. <el-table-column label="切口愈合等级" prop="qkjb">
  134. <template #default="scope">
  135. {{ qieKouName(scope.row.qkjb, scope.row.yhqk) }}
  136. </template>
  137. </el-table-column>
  138. <el-table-column label="麻醉方式" prop="mzff">
  139. <template #default="scope">
  140. {{ maZuiName(scope.row.mzff) }}
  141. </template>
  142. </el-table-column>
  143. <el-table-column label="麻醉医师" prop="mzysName"></el-table-column>
  144. <el-table-column label="操作">
  145. <template #default="scope">
  146. <el-popconfirm
  147. confirm-button-text="确认"
  148. cancel-button-text="取消"
  149. icon="el-icon-info"
  150. iconColor="#F56C6C"
  151. title="是否删除该手术"
  152. @confirm="delShouShu(scope.$index)"
  153. >
  154. <template #reference>
  155. <el-button size="mini" type="danger" icon="el-icon-delete">删除</el-button>
  156. </template>
  157. </el-popconfirm>
  158. </template>
  159. </el-table-column>
  160. </el-table>
  161. </el-dialog>
  162. <el-dialog v-model="zhenDuanDialog" width="60%">
  163. <el-select v-model="zhenDuanQuery.method" filterable style="width: 100px;"
  164. >
  165. <el-option v-for="item in methods" :key="item.code" :value="item.code" :label="item.name">
  166. <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
  167. <el-divider direction="vertical"></el-divider>
  168. <span>{{ item.name }}</span>
  169. </el-option>
  170. </el-select>
  171. <el-input v-model="zhenDuanQuery.content" style="width: 120px" @keyup.enter="zhenDuanChaXunClick"
  172. clearable></el-input>
  173. <el-button type="primary" icon="el-icon-search" @click="zhenDuanChaXunClick">查询</el-button>
  174. 诊断类别:
  175. <el-select v-model="lingShiZhenDuan.siDiagType"
  176. style="width: 120px;"
  177. >
  178. <el-option v-for="item in siDiagTypes" :key="item.code" :value="item.code" :label="item.name">
  179. <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
  180. <el-divider direction="vertical"></el-divider>
  181. <span>{{ item.name }}</span>
  182. </el-option>
  183. </el-select>
  184. 入院病情:
  185. <el-select v-model="lingShiZhenDuan.admissCond"
  186. style="width: 60px;"
  187. >
  188. <el-option v-for="item in admissCondData" :key="item.code" :value="item.code" :label="item.name">
  189. <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
  190. <el-divider direction="vertical"></el-divider>
  191. <span>{{ item.name }}</span>
  192. </el-option>
  193. </el-select>
  194. <el-table :data="queryZhenDuanData" height="450px"
  195. stripe highlight-current-row>
  196. <el-table-column label="编码" prop="code"></el-table-column>
  197. <el-table-column label="名称" prop="name"></el-table-column>
  198. <el-table-column label="操作">
  199. <template #default="scope">
  200. <el-popconfirm
  201. v-if="addZhenDuanFlag"
  202. confirm-button-text="确认"
  203. cancel-button-text="取消"
  204. icon="el-icon-info"
  205. iconColor="#67C23A"
  206. title="是否添加该诊断"
  207. @confirm="addZhenDuan(scope.row)"
  208. >
  209. <template #reference>
  210. <el-button size="mini" type="success" icon="el-icon-circle-plus">新增</el-button>
  211. </template>
  212. </el-popconfirm>
  213. <el-popconfirm
  214. v-else
  215. confirm-button-text="确认"
  216. cancel-button-text="取消"
  217. icon="el-icon-info"
  218. iconColor="#E6A23C"
  219. title="是否修改为该诊断"
  220. @confirm="xuanZheZhenDuan(scope.row)"
  221. >
  222. <template #reference>
  223. <el-button size="mini" type="warning" icon="el-icon-edit">修改</el-button>
  224. </template>
  225. </el-popconfirm>
  226. </template>
  227. </el-table-column>
  228. </el-table>
  229. <br>
  230. <el-button @click="pageZhenDuanChaXun(zhenDuanQuery.page -= 1)" :disabled="zhenDuanQuery.page === 1">上一页
  231. </el-button>
  232. <el-button @click="pageZhenDuanChaXun(zhenDuanQuery.page += 1)">下一页</el-button>
  233. </el-dialog>
  234. <!-- 这里都是手术的了 -->
  235. <el-dialog v-model="shouShuDialog" title="修改或添加手术">
  236. <el-form :model="formShouShu" label-width="100px" ref="formShouShuRef" size="mini" :rules="shouShuRules">
  237. <el-form-item prop="ssmc" label="手术名称">
  238. <el-input v-model="formShouShu.ssmc" @click="queryShouShu('手术编码')"></el-input>
  239. </el-form-item>
  240. <el-form-item prop="ssrq" label="手术日期">
  241. <el-date-picker type="datetime" v-model="formShouShu.ssrq"></el-date-picker>
  242. </el-form-item>
  243. <el-form-item prop="ssjb" label="手术级别">
  244. <el-select v-model="formShouShu.ssjb">
  245. <el-option :value="1" :key="1" :label="1"></el-option>
  246. <el-option :value="2" :key="2" :label="2"></el-option>
  247. <el-option :value="3" :key="3" :label="3"></el-option>
  248. <el-option :value="4" :key="4" :label="4"></el-option>
  249. </el-select>
  250. </el-form-item>
  251. <el-form-item prop="ssbm" label="手术编码">
  252. <el-input v-model="formShouShu.ssbm" disabled></el-input>
  253. </el-form-item>
  254. <el-form-item prop="ssysName" label="术者">
  255. <el-input v-model="formShouShu.ssysName" @click="queryShouShu('术者')"></el-input>
  256. </el-form-item>
  257. <el-form-item prop="sszsName1" label="I助">
  258. <el-input v-model="formShouShu.sszsName1" @click="queryShouShu('I助')"></el-input>
  259. </el-form-item>
  260. <el-form-item prop="sszsName2" label="II助">
  261. <el-input v-model="formShouShu.sszsName2" @click="queryShouShu('II助')"></el-input>
  262. </el-form-item>
  263. <el-form-item prop="qkName" label="切口愈合等级">
  264. <el-select v-model="formShouShu.qkName" @change="formQieKou">
  265. <el-option v-for="item in qks" :key="item.code" :value="item.code" :label="item.name">
  266. <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
  267. <el-divider direction="vertical"></el-divider>
  268. <span>{{ item.name }}</span>
  269. </el-option>
  270. </el-select>
  271. </el-form-item>
  272. <el-form-item prop="mzff" label="麻醉方式">
  273. <el-select v-model="formShouShu.mzff">
  274. <el-option v-for="item in maZuiFangShis" :key="item.code" :value="item.code" :label="item.name">
  275. <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
  276. <el-divider direction="vertical"></el-divider>
  277. <span>{{ item.name }}</span>
  278. </el-option>
  279. </el-select>
  280. </el-form-item>
  281. <el-form-item prop="mzys" label="麻醉医生">
  282. <el-input v-model="formShouShu.mzysName" @click="queryShouShu('麻醉医生')"></el-input>
  283. </el-form-item>
  284. </el-form>
  285. <el-button @click="shouShuBaoCunClick">保存</el-button>
  286. </el-dialog>
  287. <el-dialog v-model="queryShouShuDialog" :title="queryShouShuCodeName">
  288. {{ queryShouShuCodeName }} :
  289. <el-input v-model="queryShouShuCodeData.code" style="width: 120px;" @keyup.enter="queryShouShuClick"></el-input>
  290. <el-button type="primary" @click="queryShouShuClick">查询</el-button>
  291. <el-table :data="shouShuData">
  292. <el-table-column label="编码" prop="code"></el-table-column>
  293. <el-table-column label="名称" prop="name"></el-table-column>
  294. <el-table-column label="操作">
  295. <template #default="scope">
  296. <el-button @click="xuanZheShouShu(scope.row)">选择</el-button>
  297. </template>
  298. </el-table-column>
  299. </el-table>
  300. <el-pagination
  301. layout="total, prev, pager, next"
  302. :total="queryShouShuCodeData.total"
  303. @current-change="shouShuCurrentPage"
  304. >
  305. </el-pagination>
  306. </el-dialog>
  307. <shu-ju-dui-bi ref="shuJuDuiBiDialogRef"
  308. :oldYbZyDisDiag="props.data.ybZyDisDiag"
  309. :newYbZyDisDiag="props.data.newYbZyDisDiag"
  310. :oldBat="props.data.batjBa4"
  311. :new-bat="props.data.newBatjBa4"></shu-ju-dui-bi>
  312. <shen-he-xin-xi :data="props.data.shenHeXinXi" ref="shenHeRef"></shen-he-xin-xi>
  313. </el-container>
  314. </template>
  315. <script>
  316. import {watch, ref, unref} from "vue";
  317. import store from '@/store'
  318. import {cptSex} from "../../utils/computed";
  319. import {searchYbDiag} from "../../api/yibao/dictionary";
  320. import {operations, decTypes} from '../../data'
  321. import {clone} from "../../utils/clone";
  322. import {ElMessage, ElMessageBox} from "element-plus";
  323. import {getRenYuan} from "../../api/public-api";
  324. import {setlModifyReq, setlUploadAudit, shouShuBianMa, upldSetlList} from "../../api/medical-insurance/si-setl-upload";
  325. import {formatDatetime} from "../../utils/date";
  326. import {listIsBlank, listNotBlank, stringIsBlank} from "../../utils/blank-utils";
  327. import ShuJuDuiBi from "./ShuJuDuiBi.vue"
  328. import {getsiDiagTypeName, maZuiFangShis, maZuiName, qieKouName, qks, shenHeQuanXian} from "./jieSuanDanXiuGai";
  329. import ShenHeXinXi from "./ShenHeXinXi.vue";
  330. import KeShiFeiYong from "./KeShiFeiYong.vue";
  331. import BeiZhu from "./BeiZhu.vue";
  332. export default {
  333. name: "JieSuanDanXiangQing",
  334. components: {BeiZhu, KeShiFeiYong, ShenHeXinXi, ShuJuDuiBi},
  335. props: {
  336. data: {}
  337. },
  338. setup(props, ctx) {
  339. // 基本信息
  340. const setlinfo = ref({})
  341. // 住院诊断信息
  342. const diseinfo = ref([])
  343. // 手术操作信息
  344. const oprninfo = ref([])
  345. const huanZheXinXiDialog = ref(false)
  346. const code = store.state.user.info.code
  347. const name = store.state.user.info.name
  348. const openDialog = (val) => {
  349. huanZheXinXiDialog.value = val
  350. }
  351. /*以下全部都是诊断*/
  352. const zhenDuanQuery = ref({
  353. method: 'alpha',
  354. target: 'diag',
  355. // 内容
  356. content: '',
  357. medType: '',
  358. // 当前页
  359. page: 1
  360. })
  361. const lingShiZhenDuan = ref({
  362. disDiag: '',
  363. disDiagComment: '',
  364. admissCond: '',
  365. siDiagType: ''
  366. })
  367. const zhenDuanDialog = ref(false)
  368. const addZhenDuanFlag = ref(false)
  369. let zhenDuanIndex = 0
  370. const xiuGaiZhenDuanClick = (index, val) => {
  371. lingShiZhenDuan.value = val
  372. addZhenDuanFlag.value = false
  373. zhenDuanDialog.value = true
  374. zhenDuanIndex = index
  375. }
  376. const queryZhenDuanData = ref([])
  377. const xuanZheZhenDuan = (val) => {
  378. if (zhenDuanTianJiaTiaoJian()) return
  379. diseinfo.value[zhenDuanIndex].disDiag = val.code
  380. diseinfo.value[zhenDuanIndex].disDiagComment = val.name
  381. setTimeout(() => {
  382. ElMessage({
  383. message: "修改成功",
  384. type: "success",
  385. showClose: true,
  386. })
  387. zhenDuanDialog.value = false
  388. }, 100)
  389. }
  390. const zhenDuanChaXunClick = () => {
  391. zhenDuanQuery.value.page = 1
  392. searchYbDiag(zhenDuanQuery.value).then((res) => {
  393. queryZhenDuanData.value = res
  394. })
  395. }
  396. const pageZhenDuanChaXun = (val) => {
  397. searchYbDiag(zhenDuanQuery.value).then((res) => {
  398. queryZhenDuanData.value = res
  399. })
  400. }
  401. const sheZhiZhuZhenDuan = (index, val) => {
  402. let data = []
  403. for (let item of diseinfo.value) {
  404. if (val !== item.disDiagNo) {
  405. data.push(item)
  406. }
  407. }
  408. data.unshift(diseinfo.value[index])
  409. for (let i = 0; i < data.length; i++) {
  410. data[i].disDiagNo = i + 1
  411. }
  412. diseinfo.value = data
  413. }
  414. const addZhenDuanClick = () => {
  415. lingShiZhenDuan.value = {
  416. disDiag: '',
  417. disDiagComment: '',
  418. admissCond: '',
  419. siDiagType: ''
  420. }
  421. queryZhenDuanData.value = []
  422. addZhenDuanFlag.value = true
  423. zhenDuanDialog.value = true
  424. }
  425. const addZhenDuan = (val) => {
  426. if (zhenDuanTianJiaTiaoJian()) return
  427. lingShiZhenDuan.value.disDiag = val.code
  428. lingShiZhenDuan.value.disDiagComment = val.name
  429. lingShiZhenDuan.value.disDiagNo = diseinfo.value.length + 1
  430. lingShiZhenDuan.value.newData = true
  431. diseinfo.value.push(lingShiZhenDuan.value)
  432. zhenDuanDialog.value = false
  433. }
  434. const delZhenDuan = (index, val) => {
  435. diseinfo.value.splice(index, 1)
  436. for (let i = 0; i < diseinfo.value.length; i++) {
  437. diseinfo.value[i].disDiagNo = i + 1
  438. }
  439. }
  440. function zhenDuanTianJiaTiaoJian() {
  441. if (stringIsBlank(lingShiZhenDuan.value.siDiagType)) {
  442. ElMessage.error("请先选择诊断类别")
  443. return true
  444. }
  445. if (stringIsBlank(lingShiZhenDuan.value.disDiagStatus)
  446. || lingShiZhenDuan.value.disDiagStatus === '0') {
  447. ElMessage.error("请先选择出院病情")
  448. return true
  449. }
  450. return false
  451. }
  452. /*诊断结束*/
  453. /*一下都是手术的*/
  454. const shouShuDialog = ref(false)
  455. const formShouShu = ref({
  456. ssmc: '',
  457. ssrq: '',
  458. ssjb: '',
  459. ssbm: '',
  460. ssys: '',
  461. ssysName: '',
  462. sszs1: '',
  463. sszsName1: '',
  464. sszs2: '',
  465. sszsName2: '',
  466. qkjb: '',
  467. yhqk: '',
  468. qkName: '',
  469. mzff: '',
  470. mzys: '',
  471. mzysName: '',
  472. })
  473. const formShouShuRef = ref(null)
  474. const formShouShuCz = ref({})
  475. formShouShuCz.value = clone(formShouShu.value)
  476. // 限制
  477. const shouShuRules = ref({
  478. ssmc: [{required: true, message: '该项不能为空', trigger: 'blur'}],
  479. ssrq: [{required: true, message: '该项不能为空', trigger: 'blur'}],
  480. ssjb: [{required: true, message: '该项不能为空', trigger: 'blur'}],
  481. ssbm: [{required: true, message: '该项不能为空', trigger: 'blur'}],
  482. ssysName: [{required: true, message: '该项不能为空', trigger: 'blur'}],
  483. sszsName1: [{required: true, message: '该项不能为空', trigger: 'blur'}],
  484. qkName: [{required: true, message: '该项不能为空', trigger: 'blur'}],
  485. mzff: [{required: true, message: '该项不能为空', trigger: 'blur'}],
  486. mzys: [{required: true, message: '该项不能为空', trigger: 'blur'}],
  487. })
  488. const oprninfoIndex = ref(-1)
  489. const tianJiaXiuGaiShouShu = (index) => {
  490. if (index !== -1) {
  491. formShouShu.value = clone(oprninfo.value[index])
  492. } else {
  493. formShouShu.value = clone(formShouShuCz.value)
  494. }
  495. oprninfoIndex.value = index
  496. shouShuDialog.value = true
  497. }
  498. const queryShouShuCodeData = ref({
  499. code: '',
  500. page: 1,
  501. total: 0
  502. })
  503. const queryShouShuCodeName = ref("手术编码")
  504. const queryShouShuDialog = ref(false)
  505. const shouShuData = ref([])
  506. const queryShouShu = (val) => {
  507. queryShouShuCodeName.value = val
  508. queryShouShuDialog.value = true
  509. queryShouShuCodeData.value.code = ''
  510. shouShuData.value = []
  511. }
  512. const queryShouShuClick = () => {
  513. if (queryShouShuCodeName.value.length < 1) {
  514. return
  515. }
  516. switch (queryShouShuCodeName.value) {
  517. case '手术编码':
  518. shouShuBianMa(queryShouShuCodeData.value.code, 1).then((res) => {
  519. shouShuData.value = res.records
  520. queryShouShuCodeData.value.total = res.total
  521. })
  522. return
  523. default:
  524. getRenYuan(queryShouShuCodeData.value.code).then((res) => {
  525. shouShuData.value = res
  526. queryShouShuCodeData.value.total = 0
  527. })
  528. return;
  529. }
  530. }
  531. const shouShuCurrentPage = (val) => {
  532. queryShouShuCodeData.value.page = val
  533. shouShuBianMa(queryShouShuCodeData.value.code, queryShouShuCodeData.value.page).then((res) => {
  534. shouShuData.value = res.records
  535. queryShouShuCodeData.value.total = res.total
  536. })
  537. }
  538. const xuanZheShouShu = (val) => {
  539. switch (queryShouShuCodeName.value) {
  540. case '手术编码':
  541. formShouShu.value.ssbm = val.code
  542. formShouShu.value.ssmc = val.name
  543. break;
  544. case '术者':
  545. formShouShu.value.ssys = val.code
  546. formShouShu.value.ssysName = val.name
  547. break;
  548. case 'I助':
  549. formShouShu.value.sszs1 = val.code
  550. formShouShu.value.sszsName1 = val.name
  551. break;
  552. case 'II助':
  553. formShouShu.value.sszs2 = val.code
  554. formShouShu.value.sszsName2 = val.name
  555. break;
  556. case '麻醉医生':
  557. formShouShu.value.mzys = val.code
  558. formShouShu.value.mzysName = val.name
  559. break;
  560. }
  561. setTimeout(() => {
  562. queryShouShuDialog.value = false
  563. }, 400)
  564. }
  565. const formQieKou = (val) => {
  566. formShouShu.value.qkjb = val.split('/')[0]
  567. formShouShu.value.yhqk = val.split('/')[1]
  568. }
  569. const shouShuBaoCunClick = async () => {
  570. let form = unref(formShouShuRef)
  571. if (!form) return
  572. try {
  573. await form.validate()
  574. formShouShu.value.ssrq = formatDatetime(formShouShu.value.ssrq)
  575. if (oprninfoIndex.value !== -1) {
  576. oprninfo.value[oprninfoIndex.value] = clone(formShouShu.value)
  577. console.log(oprninfo.value[oprninfoIndex.value])
  578. } else {
  579. formShouShu.value.newData = true
  580. oprninfo.value.push(clone(formShouShu.value))
  581. }
  582. shouShuDialog.value = false
  583. } catch (e) {
  584. }
  585. }
  586. const delShouShu = (index) => {
  587. oprninfo.value.splice(index, 1)
  588. ElMessage.success("删除成功。")
  589. }
  590. const baoCunXiuGaiData = ref({})
  591. const beiZhuRef = ref(null)
  592. const baoCunHouGuanBi = () => {
  593. huanZheXinXiDialog.value = false
  594. ctx.emit('shua-xin')
  595. }
  596. const baoCunXiuGai = () => {
  597. if ((setlinfo.value.operation === '1' || setlinfo.value.operation === '2' || setlinfo.value.operation === '3')) {
  598. if (listIsBlank(oprninfo.value)) {
  599. return ElMessage.error("选择治疗类型为手术的,至少要有一个手术。")
  600. }
  601. } else if (oprninfo.value.length > 5) {
  602. return ElMessage.error("手术不能超过五个。")
  603. }
  604. if (stringIsBlank(setlinfo.value.decType)) {
  605. return ElMessage.error("请填写申报类型。")
  606. }
  607. if (listIsBlank(diseinfo.value)) {
  608. return ElMessage.error("诊断不能为空切不能大于27个。")
  609. } else if (diseinfo.value.length > 27) {
  610. return ElMessage.error("诊断超过27个。")
  611. }
  612. let data = setlinfo.value
  613. data['opIdCode'] = code
  614. data['opIdName'] = name
  615. data.batjBa4 = oprninfo.value
  616. data.ybZyDisDiag = diseinfo.value
  617. baoCunXiuGaiData.value = data
  618. beiZhuRef.value.beiZhuDialog = true
  619. }
  620. /*手术结束*/
  621. /* 审核信息 */
  622. const shenHeRef = ref(null)
  623. const keFeiShenHe = ref(false)
  624. watch(() => props.data.shenHeXinXi,
  625. () => {
  626. if (stringIsBlank(props.data.shenHeXinXi.id)
  627. && props.data.shenHeXinXi.auditFlag !== 0) {
  628. keFeiShenHe.value = true
  629. } else {
  630. keFeiShenHe.value = false
  631. }
  632. })
  633. const shenHeClick = () => {
  634. if (stringIsBlank(props.data.shenHeXinXi.id)) {
  635. return ElMessage.error("您还没有进行申请。")
  636. }
  637. shenHeRef.value.shenHeDialogOpen(true)
  638. }
  639. const shenHeTongGuoClick = () => {
  640. ElMessageBox.confirm('是否通过该审核', '提示', {
  641. type: "warning"
  642. }).then(() => {
  643. const data = {
  644. id: props.data.shenHeXinXi.id,
  645. auditFlag: 1,
  646. auditRemark: "审核通过 ❥(^_-)",
  647. auditStaff: code,
  648. auditName: name,
  649. }
  650. console.log(data)
  651. setlUploadAudit(data
  652. ).then((res) => {
  653. guanBi()
  654. }).catch((e) => {
  655. })
  656. })
  657. }
  658. const shenHeTongGuoShangChuanClick = () => {
  659. ElMessageBox.confirm('是否通过该审核并上传', '提示', {
  660. type: "warning"
  661. }).then(() => {
  662. const data = {
  663. id: props.data.shenHeXinXi.id,
  664. auditFlag: 1,
  665. auditRemark: "审核通过 ❥(^_-)",
  666. auditStaff: code,
  667. auditName: name,
  668. }
  669. console.log(data)
  670. setlUploadAudit(data
  671. ).then((res) => {
  672. let data = []
  673. data.push(props.data.upload)
  674. upldSetlList(data).then((res) => {
  675. guanBi()
  676. })
  677. }).catch((e) => {
  678. })
  679. })
  680. }
  681. const shenHeBoHuiClick = () => {
  682. ElMessageBox.prompt('请填写申请备注', '提示', {
  683. type: "warning",
  684. confirmButtonText: '确定',
  685. cancelButtonText: '取消',
  686. inputPattern: /\S/,
  687. inputErrorMessage: '审核备注不能为空且不得超过 100 字 (∩•̀ω•́)⊃-*⋆',
  688. }).then(({value}) => {
  689. if (value.length > 100) {
  690. return ElMessage.error("驳回原因超过 100 字。")
  691. }
  692. const data = {
  693. id: props.data.shenHeXinXi.id,
  694. auditFlag: 2,
  695. auditRemark: value,
  696. auditStaff: code,
  697. auditName: name,
  698. }
  699. setlUploadAudit(data
  700. ).then((res) => {
  701. guanBi()
  702. })
  703. }).catch((e) => {
  704. })
  705. }
  706. function guanBi() {
  707. huanZheXinXiDialog.value = false
  708. ctx.emit('shua-xin')
  709. }
  710. /* 审核信息结束 */
  711. /* 数据对比 */
  712. const shuJuDuiBiDialogRef = ref(null)
  713. const shuJuDuiBi = () => {
  714. if (stringIsBlank(props.data.shenHeXinXi.id)) {
  715. return ElMessage.error("您还没有进行申请。")
  716. }
  717. shuJuDuiBiDialogRef.value.isOpenDialog(true)
  718. }
  719. /* 数据对比结束 */
  720. /* 获取患者各个科室的费用 */
  721. const keShiFeiYongRef = ref(null)
  722. const feiYongDrawer = () => {
  723. keShiFeiYongRef.value.getFeiYongClick(setlinfo.value.inpatientNo, setlinfo.value.admissTimes)
  724. }
  725. /* 获取患者各个科室的费用结束 */
  726. const init = () => {
  727. setlinfo.value = clone(props.data)
  728. console.log(setlinfo.value)
  729. // 如果新的没有就用老的
  730. if (listNotBlank(props.data.newYbZyDisDiag)) {
  731. diseinfo.value = clone(props.data.newYbZyDisDiag)
  732. } else {
  733. diseinfo.value = clone(props.data.ybZyDisDiag)
  734. }
  735. if (listNotBlank(props.data.newBatjBa4)) {
  736. oprninfo.value = clone(props.data.newBatjBa4)
  737. } else {
  738. oprninfo.value = clone(props.data.batjBa4)
  739. }
  740. zhenDuanQuery.value.medType = props.data.medType
  741. }
  742. watch(() => props.data,
  743. () => {
  744. init()
  745. })
  746. return {
  747. props,
  748. setlinfo,
  749. diseinfo,
  750. oprninfo,
  751. huanZheXinXiDialog,
  752. openDialog,
  753. sheZhiZhuZhenDuan,
  754. store,
  755. cptSex,
  756. xiuGaiZhenDuanClick,
  757. zhenDuanDialog,
  758. methods: [
  759. {code: 'alpha', name: '拼音'},
  760. {code: 'code', name: '编码'},
  761. {code: 'name', name: '名称'},
  762. ],
  763. admissCondData: [
  764. {code: 1, name: '有'},
  765. {code: 2, name: '临床未确定'},
  766. {code: 3, name: '情况不明'},
  767. {code: 4, name: '无'},
  768. ],
  769. siDiagTypes: [
  770. {code: '1', name: '西医主要诊断'},
  771. {code: '2', name: '西医其他诊断'},
  772. {code: '3', name: '中医主要诊断'},
  773. {code: '4', name: '中医其他诊断'}
  774. ],
  775. zhenDuanQuery,
  776. queryZhenDuanData,
  777. zhenDuanChaXunClick,
  778. xuanZheZhenDuan,
  779. operations,
  780. decTypes,
  781. addZhenDuanClick,
  782. addZhenDuanFlag,
  783. addZhenDuan,
  784. lingShiZhenDuan,
  785. getsiDiagTypeName,
  786. delZhenDuan,
  787. shouShuDialog,
  788. pageZhenDuanChaXun,
  789. maZuiFangShis,
  790. formShouShu,
  791. maZuiName,
  792. qks,
  793. qieKouName,
  794. queryShouShuDialog,
  795. queryShouShu,
  796. queryShouShuCodeData,
  797. queryShouShuCodeName,
  798. shouShuData,
  799. queryShouShuClick,
  800. shouShuCurrentPage,
  801. xuanZheShouShu,
  802. formQieKou,
  803. shouShuBaoCunClick,
  804. tianJiaXiuGaiShouShu,
  805. shouShuRules,
  806. formShouShuRef,
  807. delShouShu,
  808. baoCunXiuGai,
  809. shuJuDuiBi,
  810. shuJuDuiBiDialogRef,
  811. shenHeClick,
  812. shenHeRef,
  813. shenHeBoHuiClick,
  814. shenHeTongGuoClick,
  815. shenHeTongGuoShangChuanClick,
  816. keFeiShenHe,
  817. shenHeQuanXian,
  818. feiYongDrawer,
  819. keShiFeiYongRef,
  820. baoCunXiuGaiData,
  821. beiZhuRef,
  822. baoCunHouGuanBi,
  823. }
  824. }
  825. }
  826. </script>
  827. <style>
  828. </style>