patientBuildConfirm.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698
  1. <template>
  2. <view class="patientBuildConfirm">
  3. <view class="qco_msg" v-html="patientMsg"></view>
  4. <view class="orderDetail_info">
  5. <scroll-view scroll-y class="orderDetail_infoItem">
  6. <view class="orderDetail_infoItem_header">
  7. <view class="orderDetail_infoItem_header_title">
  8. <view class="icon"></view>
  9. <view class="taskNameAndWorkerName">
  10. <text class="taskName">服务</text>
  11. </view>
  12. </view>
  13. <text class="orderDetail_infoItem_header_more">{{patientTaskType.taskName||'暂无'}}</text>
  14. </view>
  15. <view class="orderDetail_infoItem_item">
  16. <view class="orderDetail_infoItem_item_content">
  17. <text class="orderDetail_infoItem_item_name">起点科室</text>
  18. <text
  19. class="orderDetail_infoItem_item_value">{{deptDisplay == 2?patientBuildData.dept.startDept.deptalias:patientBuildData.dept.startDept.dept}}</text>
  20. </view>
  21. <view class="orderDetail_infoItem_item_content"
  22. v-if="patientTaskType.associationType.value == ASSOCIATION_TYPES['患者陪检业务']">
  23. <text class="orderDetail_infoItem_item_name">中间科室</text>
  24. <text class="orderDetail_infoItem_item_value">{{checkDeptsName}}</text>
  25. </view>
  26. <view class="orderDetail_infoItem_item_content">
  27. <text class="orderDetail_infoItem_item_name">目标科室</text>
  28. <text
  29. class="orderDetail_infoItem_item_value">{{deptDisplay == 2?patientBuildData.dept.endDept.deptalias:patientBuildData.dept.endDept.dept}}</text>
  30. </view>
  31. <view class="orderDetail_infoItem_item_content">
  32. <text class="orderDetail_infoItem_item_name">携带设备</text>
  33. <text class="orderDetail_infoItem_item_value">{{goodsName||'暂无'}}</text>
  34. </view>
  35. <view class="orderDetail_infoItem_item_content">
  36. <text class="orderDetail_infoItem_item_name">预约时间</text>
  37. <text class="orderDetail_infoItem_item_value">{{patientBuildData.yyTime||'暂无'}}</text>
  38. </view>
  39. <view class="orderDetail_infoItem_item_content">
  40. <text class="orderDetail_infoItem_item_name">是否紧急</text>
  41. <text class="orderDetail_infoItem_item_value">{{patientBuildData.urgent.isUrgent?'是':'否'}}</text>
  42. </view>
  43. </view>
  44. </scroll-view>
  45. </view>
  46. <!-- 底部 -->
  47. <seiminFooterBtn :btns="btns"></seiminFooterBtn>
  48. <seiminModel ref="seiminModel"></seiminModel>
  49. </view>
  50. </template>
  51. <script>
  52. import {
  53. mapState,
  54. } from "vuex";
  55. import {
  56. ASSOCIATION_TYPES
  57. } from "../../utils/enum.association_types.js";
  58. import {
  59. SOURCEID
  60. } from "../../utils/enum.sourceid.js";
  61. import {
  62. uniqBy
  63. } from 'lodash'
  64. import {
  65. reqBuild
  66. } from '../../request/api.js';
  67. export default {
  68. data() {
  69. return {
  70. ASSOCIATION_TYPES,
  71. SOURCEID,
  72. // 中间科室名称
  73. checkDeptsName: '',
  74. // 设备
  75. goodsName: '',
  76. //患者建单信息展示
  77. patientMsg: '请您确认一下建单信息!',
  78. // 传递过来的参数
  79. queryParams: {},
  80. //底部按钮
  81. btns: [{
  82. name: "取消",
  83. type: "default",
  84. click: () => {
  85. uni.navigateBack();
  86. },
  87. }, {
  88. name: "确认建单",
  89. type: "primary",
  90. click: () => {
  91. this.buildOrder();
  92. },
  93. }, ],
  94. };
  95. },
  96. computed: {
  97. ...mapState('login', [
  98. 'loginInfo',
  99. ]),
  100. ...mapState('other', [
  101. 'deptDisplay',
  102. 'patientBuildTrip',
  103. 'patientTaskType',
  104. 'selectedPatient',
  105. 'patientBuildData',
  106. ]),
  107. },
  108. methods: {
  109. // 重复策略
  110. showReaptModal(msg, postData) {
  111. this.$refs.seiminModel.show({
  112. icon: "warn",
  113. content: msg,
  114. btns: [{
  115. name: "否",
  116. type: "primary",
  117. click: () => {
  118. this.$refs.seiminModel.close();
  119. },
  120. }, {
  121. name: "是",
  122. type: "default",
  123. click: () => {
  124. this.$refs.seiminModel.close();
  125. postData.tipsCreateOder = 1;
  126. uni.showLoading({
  127. mask: true,
  128. title: '加载中'
  129. })
  130. reqBuild(this.patientBuildData.isYY ? "appointmentOrder" : "startOrder", postData)
  131. .then((data) => {
  132. uni.hideLoading();
  133. if (data.status == 200) {
  134. this.$refs.seiminModel.show({
  135. skin: "toast",
  136. icon: "success",
  137. content: "您申请的工单已建单成功,工作人员会尽快处理!",
  138. btns:[{
  139. click:()=>{
  140. uni.navigateTo({
  141. url: '/pages/patientList/patientList'
  142. })
  143. }
  144. }]
  145. });
  146. } else {
  147. this.$refs.seiminModel.show({
  148. skin: "toast",
  149. icon: "error",
  150. content: data.msg || "创建失败",
  151. });
  152. }
  153. });
  154. },
  155. }, ],
  156. })
  157. },
  158. // 是否需要护士医生陪同模态框
  159. accompany(postData, yuyue, type) {
  160. this.$refs.seiminModel.show({
  161. icon: "warn",
  162. content: "您选择的患者是危重或特级护理或一级护理患者,请问是否需要医护陪同检查?",
  163. btns: [{
  164. name: "否",
  165. type: "primary",
  166. click: () => {
  167. this.$refs.seiminModel.close();
  168. if (type == "patient") {
  169. //患者列表直接建单
  170. this.buildCommon(postData, 0, 'accompany3');
  171. } else if (type == "patient-yy") {
  172. //患者列表预约建单
  173. this.buildCommon(postData, 0, 'accompany4');
  174. }
  175. },
  176. }, {
  177. name: "是",
  178. type: "default",
  179. click: () => {
  180. this.$refs.seiminModel.close();
  181. if (type == "patient") {
  182. //患者列表直接建单
  183. this.buildCommon(postData, 0, 'accompany1');
  184. } else if (type == "patient-yy") {
  185. //患者列表预约建单
  186. this.buildCommon(postData, 0, 'accompany2');
  187. }
  188. },
  189. }, {
  190. name: "取消",
  191. flex: 1,
  192. type: "default",
  193. click: () => {
  194. this.$refs.seiminModel.close();
  195. },
  196. }, ]
  197. });
  198. },
  199. // 建单公共方法
  200. buildCommon(postData, type1, type2) {
  201. if (type1 === null) {
  202. if (!this.patientBuildData.isYY) {
  203. postData.workOrder.platform = 2;
  204. }
  205. //是否需要医护陪同检查
  206. if (this.selectedPatient.careLevel && this.patientTaskType.isAccompany == 1) {
  207. //特级护理或一级护理
  208. if (
  209. this.selectedPatient.careLevel.value === "0" ||
  210. this.selectedPatient.careLevel.value === "1"
  211. ) {
  212. this.accompany(postData, this.patientBuildData.isYY, type2);
  213. return;
  214. }
  215. }
  216. if (
  217. this.selectedPatient.illnessState &&
  218. this.patientTaskType.isAccompany == 1
  219. ) {
  220. //病危或病重
  221. if (
  222. this.selectedPatient.illnessState.value === "2" ||
  223. this.selectedPatient.illnessState.value === "3"
  224. ) {
  225. this.accompany(postData, this.patientBuildData.isYY, type2);
  226. return;
  227. }
  228. }
  229. postData.workOrder.isAccompany = 0; //是否需要医护陪同检查
  230. } else if (typeof type1 === 'number') {
  231. postData.workOrder.isAccompany = type1; //是否需要医护陪同检查
  232. }
  233. uni.showLoading({
  234. mask: true,
  235. title: '加载中'
  236. })
  237. reqBuild(this.patientBuildData.isYY ? "appointmentOrder" : "startOrder", postData)
  238. .then((data) => {
  239. uni.hideLoading();
  240. if (data.status == 200) {
  241. this.$refs.seiminModel.show({
  242. skin: "toast",
  243. icon: "success",
  244. content: "您申请的工单已建单成功,工作人员会尽快处理!",
  245. btns:[{
  246. click:()=>{
  247. uni.navigateTo({
  248. url: '/pages/patientList/patientList'
  249. })
  250. }
  251. }]
  252. });
  253. } else if (data.status == 1000033) {
  254. //重复建单那策略
  255. this.showReaptModal(data.msg, postData);
  256. } else {
  257. this.$refs.seiminModel.show({
  258. skin: "toast",
  259. icon: "error",
  260. content: data.msg || "创建失败",
  261. });
  262. }
  263. });
  264. },
  265. // 确定建单
  266. buildOrder() {
  267. let postData = {
  268. workOrder: {
  269. sourceId: this.SOURCEID['护士端'],
  270. taskType: {
  271. id: this.patientTaskType.id
  272. },
  273. startDept: {
  274. id: this.patientBuildData.dept.startDept.id
  275. },
  276. endDepts: [{
  277. id: this.patientBuildData.dept.endDept.id
  278. }],
  279. createDept: this.loginInfo.user.dept.id,
  280. patient: {
  281. patientCode: this.selectedPatient.patientCode,
  282. },
  283. },
  284. };
  285. // 半程陪检
  286. if (this.patientTaskType.associationType.value == this.ASSOCIATION_TYPES['患者陪检业务']) {
  287. postData.workOrder.taskType.isHalfInspect =
  288. this.patientTaskType.isHalfInspect === 1 ? 1 : 0; //半程陪检
  289. }
  290. // 携带设备
  291. let goodIds = '';
  292. goodIds = this.patientBuildData.goods ? this.patientBuildData.goods.map(v => v.id).toString() :
  293. '';
  294. postData.workOrder["goods"] = goodIds;
  295. // 加急原因
  296. if (!this.patientBuildData.isYY && this.patientTaskType.allowUrgent == 1 && this.patientBuildData.urgent
  297. .isUrgent) {
  298. postData.workOrder["urgentDetails"] = {
  299. checkStatus: {
  300. id: 329
  301. },
  302. urgentReason: this.patientBuildData.urgent.urgentRemark,
  303. };
  304. }
  305. // ---------------------
  306. let yy = false; //检查上是否有预约时间
  307. if (this.patientBuildData.checks && this.patientBuildData.checks.length) {
  308. yy = this.patientBuildData.checks.some((e) => e.yyTime);
  309. }
  310. if (
  311. yy &&
  312. this.patientBuildTrip.status == 200 &&
  313. this.patientBuildData.checks &&
  314. this.patientBuildData.checks.length
  315. ) {
  316. // 有预约时间
  317. postData.workOrder["checkList"] = this.patientBuildData.checks || [];
  318. this.$refs.seiminModel.show({
  319. icon: "warn",
  320. content: "您确认建单吗?",
  321. btns: [{
  322. name: "取消",
  323. type: "default",
  324. click: () => {
  325. this.$refs.seiminModel.close();
  326. },
  327. }, {
  328. name: "确认",
  329. type: "primary",
  330. click: () => {
  331. this.$refs.seiminModel.close();
  332. if (this.patientBuildData.isYY) {
  333. postData.workOrder.yyTime = this.patientBuildData.yyTime;
  334. }
  335. this.buildCommon(postData, null, 'patient-yy');
  336. },
  337. }, ]
  338. });
  339. } else {
  340. if (!yy && this.patientBuildTrip.status == 200) {
  341. postData.workOrder["checkList"] = this.patientBuildData.checks || [];
  342. // 添加预约时间
  343. if (this.patientBuildData.isYY) {
  344. postData.workOrder.yyTime = this.patientBuildData.yyTime;
  345. }
  346. } else {
  347. // 添加预约时间
  348. if (this.patientBuildData.isYY) {
  349. postData.workOrder.yyTime = this.patientBuildData.yyTime;
  350. }
  351. }
  352. if (this.patientBuildTrip.status != 200) {
  353. //微信端不需要自动送回功能
  354. postData.workOrder["isRemand"] = 0;
  355. }
  356. this.buildCommon(postData, null, 'patient');
  357. }
  358. },
  359. // 初始化
  360. init() {
  361. // 设备
  362. this.goodsName = this.patientBuildData.goods ? this.patientBuildData.goods.map(v => v.name).toString() :
  363. '';
  364. if (this.patientTaskType.associationType.value == this.ASSOCIATION_TYPES['患者陪检业务']) {
  365. // 患者陪检业务
  366. let execDeptArr = this.patientBuildData.checks.map(v => v.execDept);
  367. execDeptArr = uniqBy(execDeptArr, 'id');
  368. console.log(execDeptArr)
  369. this.checkDeptsName = execDeptArr.map(v => {
  370. return this.deptDisplay == 2 ? v.deptalias : v.dept;
  371. }).toString();
  372. }
  373. },
  374. },
  375. onLoad(queryParams) {
  376. this.queryParams = queryParams;
  377. this.init();
  378. },
  379. };
  380. </script>
  381. <style lang="scss" scoped>
  382. .patientBuildConfirm {
  383. margin-bottom: 100rpx;
  384. .qco_msg {
  385. padding: 32rpx;
  386. color: #999;
  387. line-height: 40rpx;
  388. font-size: 28rpx;
  389. text-align: center;
  390. }
  391. .orderDetail_info {
  392. padding: 0 24rpx;
  393. .orderDetail_infoItem {
  394. width: 702rpx;
  395. height: 80vh;
  396. background-color: #fff;
  397. margin-top: 8rpx;
  398. border-radius: 8rpx;
  399. position: relative;
  400. padding: 0 24rpx 24rpx;
  401. font-size: 32rpx;
  402. @include border;
  403. @include semicircle(#f9fafb, 82rpx);
  404. @include flex(flex-start, stretch, column);
  405. .ji,
  406. .jiaji {
  407. width: 60rpx;
  408. position: absolute;
  409. right: 0;
  410. top: 0;
  411. }
  412. .orderDetail_infoItem_header {
  413. height: 86rpx;
  414. @include border($directive:bottom, $style:dashed);
  415. @include flex(space-between, center);
  416. .orderDetail_infoItem_header_title {
  417. color: #333;
  418. flex: 1;
  419. @include flex(flex-start, center);
  420. .icon {
  421. width: 10rpx;
  422. height: 46rpx;
  423. border-radius: 2rpx;
  424. background-color: #F0F6ED;
  425. @include btn_background;
  426. }
  427. .taskNameAndWorkerName {
  428. flex: 1;
  429. @include flex;
  430. .taskName {
  431. max-width: 10em;
  432. margin-left: 8rpx;
  433. font-size: 38rpx;
  434. font-weight: bold;
  435. @include clamp;
  436. }
  437. }
  438. }
  439. .orderDetail_infoItem_header_more {
  440. color: $defaultColor;
  441. font-weight: bold;
  442. font-size: 38rpx;
  443. @include clamp;
  444. }
  445. }
  446. .orderDetail_infoItem_item {
  447. padding-top: 12rpx;
  448. padding-bottom: 12rpx;
  449. color: #333;
  450. font-size: 30rpx;
  451. flex: 1;
  452. @include border(bottom);
  453. @include flex(flex-start, stretch, column);
  454. &.process {
  455. padding-top: 90rpx;
  456. padding-bottom: 90rpx;
  457. }
  458. &:last-of-type {
  459. border-bottom: none;
  460. }
  461. // 工单信息
  462. .orderDetail_infoItem_item_content {
  463. margin-top: 20rpx;
  464. @include flex(space-between, stretch);
  465. .orderDetail_infoItem_item_name {
  466. font-size: 34rpx;
  467. color: #666;
  468. max-width: 4em;
  469. }
  470. .orderDetail_infoItem_item_value {
  471. font-size: 38rpx;
  472. color: #333;
  473. font-weight: bold;
  474. max-width: 420rpx;
  475. text-align: justify;
  476. word-break: break-all;
  477. }
  478. }
  479. // 流程信息
  480. .orderDetail_process_item {
  481. min-height: 120rpx;
  482. line-height: 50rpx;
  483. color: #333;
  484. @include flex(center);
  485. &:last-of-type {
  486. .step_icon {
  487. &::after {
  488. display: none;
  489. }
  490. }
  491. }
  492. .step_infoStart {
  493. font-size: 28rpx;
  494. flex: 1;
  495. @include flex(flex-end);
  496. .step_time {
  497. margin-left: 16rpx;
  498. }
  499. }
  500. .step_icon {
  501. font-size: 38rpx;
  502. margin-left: 30rpx;
  503. margin-right: 30rpx;
  504. position: relative;
  505. color: #E5E9ED;
  506. &.active {
  507. color: #07863C;
  508. }
  509. &::after {
  510. content: '';
  511. position: absolute;
  512. top: 60rpx;
  513. left: 18rpx;
  514. width: 1px;
  515. height: calc(100% - 70rpx);
  516. background-color: #DDE1E5;
  517. }
  518. }
  519. .step_infoEnd {
  520. font-size: 34rpx;
  521. flex: 1;
  522. padding-bottom: 16rpx;
  523. }
  524. }
  525. // 业务信息-检查
  526. &.business_inspect {
  527. .inspect_info {
  528. font-size: 34rpx;
  529. color: #333;
  530. padding-top: 20rpx;
  531. padding-bottom: 20rpx;
  532. @include border($directive:bottom, $style:dashed);
  533. .inspect_info_block {
  534. height: 60rpx;
  535. @include flex(space-between, center);
  536. .inspect_info_left {
  537. @include flex;
  538. .inspect_info_icon {
  539. width: 50rpx;
  540. height: 50rpx;
  541. line-height: 50rpx;
  542. border-radius: 50%;
  543. font-size: 28rpx;
  544. margin-right: 8rpx;
  545. @include flex(center, center);
  546. &.green {
  547. color: $defaultColor;
  548. border: 1px solid $defaultColor;
  549. background-color: rgba(73, 184, 86, 0.1);
  550. }
  551. &.red {
  552. color: #FF3B53;
  553. border: 1px solid #FF3B53;
  554. background-color: #FFE8EB;
  555. }
  556. }
  557. .inspect_info_name {
  558. font-weight: bold;
  559. }
  560. }
  561. .inspect_info_right {
  562. font-weight: bold;
  563. }
  564. }
  565. }
  566. .inspect_item {
  567. color: #333;
  568. font-size: 34rpx;
  569. line-height: 48rpx;
  570. padding-top: 26rpx;
  571. padding-bottom: 26rpx;
  572. @include border($directive:bottom, $style:dashed);
  573. .inspect_item_name {
  574. font-weight: bold;
  575. }
  576. .inspect_item_yytime {
  577. font-weight: bold;
  578. }
  579. .inspect_item_info {
  580. margin-top: 16rpx;
  581. margin-bottom: 16rpx;
  582. @include flex(space-between, center);
  583. .inspect_item_dept {
  584. flex: 1;
  585. word-break: break-all;
  586. @include clamp;
  587. }
  588. .inspect_item_number {
  589. flex: 1;
  590. text-align: right;
  591. word-break: break-all;
  592. @include clamp;
  593. }
  594. }
  595. }
  596. }
  597. // 业务信息-标本
  598. &.business_specimen {
  599. font-size: 34rpx;
  600. .th {
  601. background-color: red;
  602. @include btn_background;
  603. th {
  604. color: #fff;
  605. }
  606. }
  607. .td {
  608. position: relative;
  609. .urgent {
  610. width: 60rpx;
  611. position: absolute !important;
  612. right: 0;
  613. top: 0;
  614. }
  615. }
  616. .table--border {
  617. border: none;
  618. }
  619. ::v-deep .uni-table {
  620. min-width: 0;
  621. }
  622. ::v-deep .uni-table-td {
  623. word-break: break-all;
  624. }
  625. }
  626. // 业务信息-药品
  627. &.business_drugsBag {
  628. .drugsBag_item {
  629. color: #333;
  630. font-size: 34rpx;
  631. margin-top: 20rpx;
  632. @include flex(space-between, center);
  633. .drugsBag_item_name {}
  634. .drugsBag_item_value {
  635. font-weight: bold;
  636. }
  637. }
  638. }
  639. }
  640. }
  641. }
  642. }
  643. </style>