my_list.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760
  1. <template>
  2. <scroll-view :scroll-y="!models.disjunctor" @scroll="scrollList" :scroll-top="scroll_t" class="my_list">
  3. <view class="my_list_top">
  4. <view class="my_list_topL" @click="act()">
  5. 筛选
  6. <text class="cubeic-pulldown icon_transport transport-paixujiantouxia" v-if="!actType"></text>
  7. <text class="cubeic-pullup icon_transport transport-paixujiantoushang" v-if="actType"></text>
  8. </view>
  9. <view class="my_list_topC">
  10. <input type="text" placeholder="请输入关键字" v-model="listData.workOrder.keyWord" />
  11. </view>
  12. <view class="my_list_topR" @click="search(listData)"> 搜索 </view>
  13. </view>
  14. <view class="my_list_tops" id="actType" :animation="animationData" v-if="actType">
  15. <view class="tops">
  16. <view>类型筛选</view>
  17. <view class="tops_cont">
  18. <view v-for="(data, i) of typeData" :key="i" :class="{ ac: checkedSear[data.id] }"
  19. @click="sxTab(data.associationTypes, data.id)" :id="data.id">
  20. {{ data.name }}
  21. </view>
  22. </view>
  23. </view>
  24. <view class="tops">
  25. <view>工单筛选</view>
  26. <view class="tops_cont1">
  27. <view :class="{ gdType: listData.workOrder.abnormityType == 0 }" @click="gdTab(0)">
  28. 正常工单
  29. </view>
  30. <view :class="{ gdType: listData.workOrder.abnormityType == 1 }" @click="gdTab(1)">
  31. 异常工单
  32. </view>
  33. </view>
  34. </view>
  35. <view class="foot_btn2">
  36. <view class="btn1" :class="{ btnType: btnType == 1 }" @click="ok(listData)">
  37. 确定
  38. </view>
  39. <view class="btn2" @click="Reset()"> 重置 </view>
  40. </view>
  41. </view>
  42. <view class="item" @click="item()">
  43. <view class="page_items" v-if="workData && workData.length > 0">
  44. <view class="page_item" v-for="(infoDATA, i) of workData" :key="i" @click="detailIt(infoDATA)">
  45. <view class="page_item_top">
  46. <view class="page_item_top_L">
  47. <text class="L_text">单号:{{ infoDATA.gdcode }}</text>
  48. <view class="page_item_cont_start emergency1" v-if="infoDATA.emergencyType.value == 1">
  49. <text>
  50. <text
  51. class="cubeic-star icon_transport transport-shiwujiaoxing"></text>{{ infoDATA.emergencyType.name }}</text>
  52. </view>
  53. <view class="page_item_cont_start emergency" v-if="infoDATA.emergencyType.value == 2">
  54. <text>
  55. <text
  56. class="cubeic-star icon_transport transport-shiwujiaoxing"></text>{{ infoDATA.emergencyType.name }}</text>
  57. </view>
  58. <view class="page_item_cont_start emergencys" v-if="infoDATA.emergencyType.value == 3">
  59. <text>
  60. <text
  61. class="cubeic-star icon_transport transport-shiwujiaoxing"></text>{{ infoDATA.emergencyType.name }}</text>
  62. </view>
  63. </view>
  64. <view class="page_item_top_L">
  65. <text class="L_iocn" v-if="infoDATA.taskType.associationType.value == 'specimen'">标本</text>
  66. <text class="L_iocn" v-if="infoDATA.taskType.associationType.value == 'specimenPlan'">标本</text>
  67. <text class="L_iocn" v-if="infoDATA.taskType.associationType.value == 'drugsBag'">药品</text>
  68. <text class="L_iocn" v-if="infoDATA.taskType.associationType.value == 'jPBag'">静配</text>
  69. <text class="L_iocn" v-if="infoDATA.taskType.associationType.value == 'inspect'">陪检</text>
  70. <text class="L_iocn" v-if="
  71. infoDATA.taskType.associationType.value == 'patientTransport'
  72. ">转运</text>
  73. <text class="L_iocn" v-if="infoDATA.taskType.associationType.value == 'other'">其他</text>
  74. </view>
  75. <view class="page_item_top_R">
  76. <view class="num">
  77. {{infoDATA.grade?(infoDATA.grade.gradeTotal>=0?'+'+infoDATA.grade.gradeTotal:'-'+infoDATA.grade.gradeTotal):''}}
  78. </view>
  79. </view>
  80. <view class="L"> </view>
  81. <view class="R"> </view>
  82. </view>
  83. <view class="page_item_cont">
  84. <view class="page_item_cont_T">
  85. <view class="page_item_cont_title">
  86. <text> <text class="starting">起</text> 点科室</text>
  87. <text class="text_big"> {{ infoDATA.startDept.dept }}</text>
  88. </view>
  89. </view>
  90. <view class="line"> </view>
  91. <view class="page_item_cont_B">
  92. <view class="page_item_cont_title" v-for="(dept, i) of infoDATA.middleDept" :key="i">
  93. <view v-if="infoDATA.taskType.associationType.value == 'inspect'">
  94. <text> <text class="End">检</text> 查科室</text>
  95. <text class="text_big"> {{ dept.dept }}</text>
  96. <view></view>
  97. </view>
  98. </view>
  99. <view class="page_item_cont_title" v-for="(dept, i) of infoDATA.endDepts" :key="i">
  100. <view v-if="infoDATA.taskType.associationType.value != 'inspect'">
  101. <text> <text class="End">终</text> 点科室</text>
  102. <text class="text_big"> {{ dept.dept }}</text>
  103. </view>
  104. </view>
  105. </view>
  106. </view>
  107. <view class="page_item_foot">
  108. <view class="page_item_foot_text">
  109. <text class="text1">完成时间</text>&nbsp;&nbsp;
  110. <text class="text1">{{ infoDATA.completeTime || 0 }}</text>
  111. </view>
  112. </view>
  113. </view>
  114. </view>
  115. </view>
  116. <!-- 弹窗 -->
  117. <showIntegralModel :disjunctor="models.disjunctor" :operate="models.operate" :timestamp="models.timestamp"
  118. :orderId="models.orderId" @know="know()"></showIntegralModel>
  119. </scroll-view>
  120. </template>
  121. <script>
  122. import {
  123. get,
  124. post,
  125. webHandle
  126. } from "../../http/http.js";
  127. import showIntegralModel from "../../components/showIntegralModel/showIntegralModel.vue";
  128. export default {
  129. data() {
  130. return {
  131. //滚动距离
  132. scroll_t: 0,
  133. scroll_t_old: 0,
  134. // 弹窗model
  135. models: {
  136. disjunctor: false,
  137. },
  138. animationData: {}, //动画
  139. actType: false,
  140. btnType: 1,
  141. checkedSear: {}, //筛选多选box
  142. types: "",
  143. typeData: [],
  144. listData: {
  145. idx: 0,
  146. sum: 20,
  147. workOrder: {
  148. abnormityType: "0",
  149. associationTypes: [],
  150. keyWord: "",
  151. },
  152. },
  153. workData: [],
  154. };
  155. },
  156. components: {
  157. showIntegralModel,
  158. },
  159. methods: {
  160. //滚动距离
  161. scrollList(e) {
  162. this.scroll_t_old = e.detail.scrollTop;
  163. },
  164. // 知道了
  165. know() {
  166. this.scroll_t = this.scroll_t_old;
  167. this.models.disjunctor = false;
  168. },
  169. //积分详情
  170. detailIt(infoDATA) {
  171. this.models.disjunctor = true;
  172. this.models.orderId = infoDATA.id;
  173. this.models.timestamp = Date.now();
  174. },
  175. item() {
  176. this.actType = false;
  177. this.animation.opacity(0).step();
  178. this.animationData = this.animation.export();
  179. },
  180. // 确定
  181. ok(data) {
  182. this.getData(data);
  183. this.actType = false;
  184. this.animation.opacity(0).step();
  185. this.animationData = this.animation.export();
  186. },
  187. // 搜索
  188. search(data) {
  189. this.getData(data);
  190. this.actType = false;
  191. this.animation.opacity(0).step();
  192. this.animationData = this.animation.export();
  193. },
  194. // 重置
  195. Reset() {
  196. for (var k in this.checkedSear) {
  197. this.checkedSear[k] = false;
  198. }
  199. this.listData.workOrder.associationType = [];
  200. this.listData.workOrder.abnormityType = "0";
  201. this.listData.workOrder.keyWord = "";
  202. this.getData(this.listData);
  203. },
  204. // 筛选
  205. act() {
  206. if (this.actType) {
  207. //当前状态时展开
  208. this.animation.opacity(0).step();
  209. this.animationData = this.animation.export();
  210. } else {
  211. //seimin
  212. this.animation.opacity(1).step();
  213. this.animationData = this.animation.export();
  214. }
  215. this.actType = !this.actType;
  216. },
  217. // 类型筛选
  218. sxTab(type, id) {
  219. this.$set(this.checkedSear, id, !this.checkedSear[id]);
  220. let checkedArr = [];
  221. for (var k in this.checkedSear) {
  222. if (this.checkedSear[k]) {
  223. checkedArr.push(k);
  224. }
  225. }
  226. this.listData.workOrder.associationTypes = checkedArr;
  227. },
  228. gdTab(type) {
  229. this.listData.workOrder.abnormityType = type;
  230. },
  231. getType() {
  232. let data = {
  233. type: "list",
  234. key: "association_types",
  235. };
  236. post("/common/common/getDictionary", data).then((res) => {
  237. for (var i = 0; i < res.length; i++) {
  238. let list = {
  239. name: "",
  240. associationTypes: "",
  241. id: "",
  242. };
  243. list.name = res[i].name;
  244. list.associationTypes = res[i].value;
  245. list.id = res[i].id;
  246. this.typeData.push(list);
  247. let id = res[i].id;
  248. this.$set(this.checkedSear, id, false);
  249. }
  250. });
  251. },
  252. getData(data) {
  253. uni.showLoading({
  254. title: '加载中',
  255. mask: true
  256. });
  257. post("/api/getOrdersByDate/" + this.types, data).then((res) => {
  258. uni.hideLoading();
  259. if (res.status == 200) {
  260. this.workData = res.data.data;
  261. } else {
  262. uni.showToast({
  263. icon: "none",
  264. title: "请求失败!",
  265. });
  266. }
  267. });
  268. },
  269. },
  270. onLoad(options) {
  271. console.log(options)
  272. this.types = options.type;
  273. this.getType();
  274. this.getData(this.listData);
  275. // 创建动画
  276. this.animation = uni.createAnimation({
  277. duration: 500,
  278. timingFunction: "ease",
  279. });
  280. // #ifdef APP-PLUS
  281. webHandle("no", "app");
  282. // #endif
  283. // #ifdef H5
  284. webHandle("no", "wx");
  285. // #endif
  286. },
  287. onUnload() {
  288. // 页面关闭后清空数据
  289. this.animationData = {};
  290. },
  291. };
  292. </script>
  293. <style lang="less">
  294. .my_list {
  295. height: 100vh;
  296. .my_list_top {
  297. height: 90rpx;
  298. background: #fff;
  299. line-height: 90rpx;
  300. border-bottom: 2rpx solid rgb(142, 157, 158);
  301. position: fixed;
  302. top: 0;
  303. width: 100%;
  304. z-index: 999;
  305. display: flex;
  306. align-items: center;
  307. justify-content: space-between;
  308. .my_list_topL {
  309. float: left;
  310. width: 22%;
  311. height: 100%;
  312. font-size: 32rpx;
  313. text-align: center;
  314. display: flex;
  315. justify-content: center;
  316. align-items: center;
  317. text {
  318. font-size: 34rpx;
  319. }
  320. }
  321. .my_list_topC {
  322. float: left;
  323. width: 55%;
  324. input {
  325. height: 60rpx;
  326. border: 2rpx solid rgb(142, 157, 158);
  327. border-radius: 40rpx;
  328. width: 100%;
  329. padding-left: 10rpx;
  330. padding-right: 10rpx;
  331. }
  332. }
  333. .my_list_topR {
  334. float: right;
  335. width: 22%;
  336. height: 100%;
  337. font-size: 32rpx;
  338. text-align: center;
  339. }
  340. }
  341. .my_list_tops {
  342. background: #fff;
  343. position: fixed;
  344. padding-top: 20rpx;
  345. z-index: 999;
  346. top: 92rpx;
  347. width: 100%;
  348. opacity: 0;
  349. .tops {
  350. height: 100%;
  351. text-align: left;
  352. padding-left: 30rpx;
  353. font-size: 32rpx;
  354. .tops_cont {
  355. height: 100%;
  356. margin-top: 10rpx;
  357. overflow: hidden;
  358. display: flex;
  359. flex-wrap: wrap;
  360. justify-content: space-between;
  361. view {
  362. width: 32%;
  363. height: 70rpx;
  364. line-height: 70rpx;
  365. // float: left;
  366. text-align: center;
  367. // margin-right: 2%;
  368. color: rgb(142, 157, 158);
  369. background: rgb(249, 250, 251);
  370. border-radius: 8rpx;
  371. margin-bottom: 2%;
  372. }
  373. .ac {
  374. color: #fff !important;
  375. background-image: linear-gradient(to right,
  376. #72c172,
  377. #3bb197) !important;
  378. }
  379. .ac1 {
  380. display: inline-block;
  381. }
  382. }
  383. .tops_cont1 {
  384. height: 100rpx;
  385. margin-top: 10rpx;
  386. overflow: hidden;
  387. view {
  388. width: 45%;
  389. color: rgb(142, 157, 158);
  390. height: 70rpx;
  391. line-height: 70rpx;
  392. float: left;
  393. text-align: center;
  394. margin-right: 2%;
  395. background: rgb(249, 250, 251);
  396. border-radius: 8rpx;
  397. }
  398. }
  399. .tops_cont2 {
  400. height: 90rpx;
  401. line-height: 90rpx;
  402. }
  403. .lxType {
  404. color: #fff !important;
  405. background-image: linear-gradient(to right,
  406. #72c172,
  407. #3bb197) !important;
  408. }
  409. .gdType {
  410. color: #fff !important;
  411. background-image: linear-gradient(to right,
  412. #72c172,
  413. #3bb197) !important;
  414. }
  415. }
  416. .foot_btn2 {
  417. position: absolute;
  418. width: 100%;
  419. line-height: 90rpx;
  420. height: 90rpx;
  421. border-top: 2rpx solid #e5e9ed;
  422. border-bottom: 2rpx solid #e5e9ed;
  423. background: #f9fafb;
  424. text-align: center;
  425. view {
  426. height: 90rpx;
  427. width: 49%;
  428. color: rgb(153, 153, 153);
  429. font-size: 32rpx;
  430. }
  431. .btn1 {
  432. float: left;
  433. }
  434. .btn2 {
  435. float: right;
  436. border-left: 2rpx solid #e5e9ed;
  437. }
  438. }
  439. .btnType {
  440. color: rgb(102, 102, 102) !important;
  441. }
  442. }
  443. .item {
  444. padding: 0 20rpx;
  445. margin-top: 120rpx;
  446. .page_items {
  447. margin-bottom: 110rpx;
  448. .page_item {
  449. margin-top: 16rpx;
  450. min-height: 356rpx;
  451. background: #fff;
  452. border-radius: 8rpx;
  453. overflow: hidden;
  454. padding: 0 16rpx;
  455. border: 2rpx solid #e5e9ed;
  456. .L {
  457. width: 40rpx;
  458. height: 40rpx;
  459. border-radius: 50%;
  460. background: #f9fafb; // background: blue;
  461. position: relative;
  462. left: -50rpx;
  463. top: 66rpx;
  464. }
  465. .R {
  466. width: 40rpx;
  467. height: 40rpx;
  468. border-radius: 50%;
  469. background: #f9fafb;
  470. position: relative;
  471. float: right;
  472. right: -50rpx;
  473. top: 26rpx;
  474. }
  475. .starting {
  476. width: 50rpx;
  477. height: 50rpx;
  478. color: #fff;
  479. background: #49b856;
  480. display: inline-block;
  481. border-radius: 50%;
  482. text-align: center;
  483. line-height: 46rpx;
  484. font-size: 32rpx;
  485. margin-right: 6rpx;
  486. }
  487. .End {
  488. width: 50rpx;
  489. height: 50rpx;
  490. color: #fff;
  491. background: #39b199;
  492. display: inline-block;
  493. border-radius: 50%;
  494. text-align: center;
  495. line-height: 46rpx;
  496. font-size: 32rpx;
  497. margin-right: 6rpx;
  498. }
  499. .page_item_top {
  500. height: 86rpx;
  501. border-bottom: 2rpx dashed #e5e9ed;
  502. .page_item_top_L {
  503. height: 100%;
  504. float: left;
  505. line-height: 88rpx;
  506. .ac {
  507. width: 32rpx;
  508. height: 32rpx;
  509. border: 2rpx solid #ccc;
  510. display: inline-block;
  511. position: relative;
  512. top: 6rpx;
  513. display: none;
  514. text {
  515. width: 24rpx;
  516. height: 24rpx;
  517. background: #39b199;
  518. display: block;
  519. margin: 0 auto;
  520. margin-top: 4rpx;
  521. }
  522. }
  523. .ac1 {
  524. width: 32rpx;
  525. height: 32rpx;
  526. border: 2rpx solid #ccc;
  527. display: inline-block;
  528. position: relative;
  529. top: 6rpx;
  530. }
  531. .emergencys {
  532. background: #ff3b53 !important;
  533. width: 124rpx !important;
  534. }
  535. .emergency {
  536. background: #ff3b53 !important;
  537. }
  538. .emergency1 {
  539. background: #49b856 !important;
  540. }
  541. .page_item_cont_start {
  542. text-align: center;
  543. height: 44rpx;
  544. width: 104rpx;
  545. line-height: 44rpx;
  546. border-radius: 8rpx;
  547. background: #49b856;
  548. color: #fff;
  549. display: inline-block;
  550. font-size: 28rpx;
  551. }
  552. .L_time {
  553. color: #6cc076;
  554. font-size: 32rpx;
  555. }
  556. .L_text {
  557. font-size: 32rpx;
  558. display: inline-block;
  559. font-weight: 700;
  560. }
  561. .L_iocn {
  562. display: inline-block;
  563. height: 52rpx;
  564. color: rgb(7, 134, 60);
  565. font-size: 28rpx;
  566. font-weight: 700;
  567. margin-left: 20rpx;
  568. }
  569. }
  570. .page_item_top_R {
  571. height: 60rpx;
  572. float: right;
  573. padding-top: 20rpx;
  574. font-size: 32rpx;
  575. position: absolute;
  576. right: 50rpx;
  577. line-height: 48rpx;
  578. .num {
  579. color: rgb(7, 134, 60);
  580. }
  581. .num1 {
  582. color: #ff3b53 !important;
  583. }
  584. }
  585. }
  586. .page_item_cont {
  587. min-height: 180rpx;
  588. max-height: 424rpx;
  589. padding: 0 16rpx;
  590. text-align: left;
  591. position: relative;
  592. .text_big {
  593. font-size: 32rpx;
  594. position: absolute;
  595. right: 16rpx;
  596. font-weight: 700;
  597. margin-top: 10rpx;
  598. }
  599. .text_big2 {
  600. font-size: 32rpx;
  601. position: absolute;
  602. right: 16rpx;
  603. font-weight: 700;
  604. }
  605. .line {
  606. height: 20rpx;
  607. width: 2rpx;
  608. border-left: 2rpx solid #e5e9ed;
  609. position: absolute;
  610. top: 82rpx;
  611. left: 40rpx;
  612. }
  613. .lines {
  614. height: 40%;
  615. width: 2rpx;
  616. border-left: 2rpx solid #e5e9ed;
  617. position: absolute;
  618. top: 23%;
  619. left: 36rpx;
  620. }
  621. .page_item_cont_T {
  622. padding-top: 28rpx;
  623. font-size: 28rpx;
  624. .page_item_cont_title {
  625. height: 100%;
  626. font-size: 32rpx;
  627. }
  628. }
  629. .page_item_cont_B {
  630. padding-top: 28rpx;
  631. margin-bottom: 28rpx;
  632. .page_item_cont_title {
  633. height: 60rpx;
  634. font-size: 32rpx;
  635. }
  636. .page_item_cont_title1 {
  637. height: 60rpx;
  638. line-height: 60rpx;
  639. font-size: 32rpx;
  640. padding-left: 64rpx;
  641. }
  642. }
  643. }
  644. .page_item_foot {
  645. border-top: 2rpx dashed #e5e9ed;
  646. border-bottom: 2rpx dashed #e5e9ed;
  647. padding: 28rpx 16rpx;
  648. text-align: left;
  649. .page_item_foot_text {
  650. height: 48rpx;
  651. font-size: 32rpx;
  652. line-height: 48rpx;
  653. margin-bottom: 20rpx;
  654. .text1 {
  655. color: rgb(102, 102, 102);
  656. }
  657. .text2 {
  658. float: right;
  659. font-weight: 700;
  660. }
  661. }
  662. }
  663. #infos {
  664. display: none;
  665. }
  666. .page_item_infos {
  667. padding-bottom: 20rpx;
  668. border-bottom: 2rpx dashed #e5e9ed;
  669. .page_item_info2 {
  670. text-align: left;
  671. line-height: 60rpx;
  672. font-size: 32rpx;
  673. padding-left: 16rpx;
  674. .page_item_foot_text {
  675. height: 48rpx;
  676. font-size: 32rpx;
  677. line-height: 48rpx;
  678. margin-bottom: 20rpx;
  679. .text1 {
  680. color: rgb(102, 102, 102);
  681. }
  682. .text2 {
  683. float: right;
  684. font-weight: 700;
  685. }
  686. }
  687. }
  688. }
  689. }
  690. }
  691. }
  692. }
  693. </style>