patientBuildConfirm.vue 21 KB

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