receiptpage.vue 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278
  1. <template>
  2. <view class="Receiptpage">
  3. <view class="page_tab">
  4. <view class="page_tab_bar" :class="{ active: item.label === selectedLabelSlots }" v-for="item in tabs"
  5. :key="item.value" @click="clickHandler(item.label)">
  6. {{ item.label }}
  7. <text class="tab_num">( {{ item.num }} )</text>
  8. <view class="more" v-if="item.label === '执行中'"></view>
  9. <picker class="more_picker" v-if="item.label === '执行中'" @click.stop @change="execFilter($event)" :value="index"
  10. :range="array" range-key="name">
  11. <view class="uni-input">{{ array[index].name }}</view>
  12. </picker>
  13. </view>
  14. </view>
  15. <view v-if="zxzData.length == 0" class="zwsj">
  16. <image class="zwsj-img" mode="widthFix" src="../../static/img/zanwushuju.png"></image>
  17. <view class="zwsj-txt">暂无数据</view>
  18. </view>
  19. <view class="page_items">
  20. <scroll-view class="page_items_scroll" scroll-y :refresher-enabled="scroll_refresher_enabled"
  21. :refresher-triggered="triggered" @refresherrefresh="refresherrefresh" @refresherrestore="refresherrestore"
  22. @scroll="scroll" @scrolltolower="scrolltolower" :scroll-top="scroll_top" @refresherabort="refresherabort">
  23. <view class="page_item_wrap" v-for="(item, index) of zxzData" :key="index">
  24. <view class="page_item">
  25. <view class="L"></view>
  26. <view class="R"></view>
  27. <view class="page_item_top">
  28. <view class="page_item_top_L">
  29. <text class="L_iocn" v-if="item.taskType.associationType.value == 'specimen'">标</text>
  30. <text class="L_iocn" v-if="item.taskType.associationType.value == 'drugsBag'">药</text>
  31. <text class="L_iocn" v-if="item.taskType.associationType.value == 'specimenPlan'">巡</text>
  32. <text class="L_iocn" v-if="item.taskType.associationType.value == 'jPBag'">静</text>
  33. <text class="L_iocn" v-if="item.taskType.associationType.value == 'inspect'">病</text>
  34. <text class="L_iocn" v-if="
  35. item.taskType.associationType.value == 'patientTransport'
  36. ">病</text>
  37. <text class="L_iocn" v-if="item.taskType.associationType.value == 'other'">其</text>
  38. <text class="L_time" v-if="item.overdueTime">{{ item.overdueTime }}前送达</text>
  39. </view>
  40. <view class="page_item_top_R" v-if="
  41. !(
  42. item.taskType.associationType.value == 'inspect' &&
  43. item.gdState.value == 5
  44. )
  45. ">
  46. {{ item.gdState.name }}
  47. <!-- 待取货 -->
  48. </view>
  49. <view class="page_item_top_R" v-if="
  50. item.taskType.associationType.value == 'inspect' &&
  51. item.gdState.value == 5
  52. ">
  53. 待送回
  54. <!-- 待取货 -->
  55. </view>
  56. <view class="page_item_top_R type">
  57. {{
  58. item.isHalfInspect === 1 ? "半程陪检" : item.taskType.taskName
  59. }}<template v-if="item.goodsRemark">-{{item.goodsRemark}}</template>
  60. </view>
  61. </view>
  62. <view class="page_item_cont" @click="itemInfo(item)">
  63. <view class="page_item_cont_T">
  64. <view class="page_item_cont_title">
  65. <text> <text class="starting">起</text> 点科室 </text>
  66. <text class="text_big">{{ item.startDept.dept }}</text>
  67. </view>
  68. <view class="page_item_cont_start emergency1" v-if="item.emergencyType.value == 1">
  69. <image mode="widthFix" class="page_item_cont_start-img" src="../../static/img/icon_shandian.png">
  70. </image>
  71. {{ item.emergencyType.name }}
  72. </view>
  73. <view class="page_item_cont_start emergency" v-if="item.emergencyType.value == 2">
  74. <image mode="widthFix" class="page_item_cont_start-img" src="../../static/img/icon_shandian.png">
  75. </image>
  76. {{ item.emergencyType.name }}
  77. </view>
  78. <view class="page_item_cont_start emergencys" v-if="item.emergencyType.value == 3">
  79. <image mode="widthFix" class="page_item_cont_start-img" src="../../static/img/icon_shandian.png">
  80. </image>
  81. {{ item.emergencyType.name }}
  82. </view>
  83. </view>
  84. <view class="page_item_conts" v-if="item.taskType.associationType.value == 'inspect'">
  85. <view>
  86. 预约时间 : {{ item.yyTime | yyTimeFilter
  87. }}<text v-if="item.reservationNumber">({{ item.reservationNumber }})</text>
  88. </view>
  89. <view>
  90. 床号 : {{ item.patient ? item.patient.patientName : "-" }}({{
  91. item.patient ? item.patient.bedNum : "-"
  92. }})
  93. </view>
  94. <view>
  95. 携带设备 :
  96. <text>{{ item.goods || "暂无" }}</text>
  97. </view>
  98. <view v-if="item.patient.careLevel">
  99. 护理等级 :
  100. <text :class="[
  101. item.patient.careLevel.value == 0 ||
  102. item.patient.careLevel.value == 1
  103. ? 'red'
  104. : 'green',
  105. ]">{{ item.patient.careLevel.name }}</text>
  106. </view>
  107. <view v-if="item.patient.illnessState">
  108. 病情级别 :
  109. <text :class="{
  110. red:
  111. item.patient.illnessState.value == 2 ||
  112. item.patient.illnessState.value == 3,
  113. }">{{ item.patient.illnessState.name }}</text>
  114. </view>
  115. <view v-if="item.isAccompany === 1 || item.isAccompany === 0">
  116. 陪同情况 :
  117. <text :class="{ red: item.isAccompany === 1 }">{{
  118. item.isAccompany === 1 ? "需要医护陪同" : "无需医护陪同"
  119. }}</text>
  120. </view>
  121. </view>
  122. <view class="page_item_conts" v-if="item.taskType.associationType.value == 'patientTransport'">
  123. <view>
  124. 预约时间 : {{ item.yyjdTime | yyTimeFilter
  125. }}<text v-if="item.reservationNumber">({{ item.reservationNumber }})</text>
  126. </view>
  127. <view>
  128. 床号 : {{ item.patient ? item.patient.patientName : "-" }}({{
  129. item.patient ? item.patient.bedNum : "-"
  130. }})
  131. </view>
  132. <view>
  133. 携带设备 :
  134. <text>{{ item.goods || "暂无" }}</text>
  135. </view>
  136. <view v-if="item.patient.careLevel">
  137. 护理等级 :
  138. <text :class="[
  139. item.patient.careLevel.value == 0 ||
  140. item.patient.careLevel.value == 1
  141. ? 'red'
  142. : 'green',
  143. ]">{{ item.patient.careLevel.name }}</text>
  144. </view>
  145. <view v-if="item.patient.illnessState">
  146. 病情级别 :
  147. <text :class="{
  148. red:
  149. item.patient.illnessState.value == 2 ||
  150. item.patient.illnessState.value == 3,
  151. }">{{ item.patient.illnessState.name }}</text>
  152. </view>
  153. <view v-if="item.isAccompany === 1 || item.isAccompany === 0">
  154. 陪同情况 :
  155. <text :class="{ red: item.isAccompany === 1 }">{{
  156. item.isAccompany === 1 ? "需要医护陪同" : "无需医护陪同"
  157. }}</text>
  158. </view>
  159. </view>
  160. <view class="page_item_conts" v-if="item.taskType.associationType.value == 'drugsBag'">
  161. <view>
  162. 药包编码 : {{ item.drugs ? item.drugs.packid : "无" }}
  163. </view>
  164. </view>
  165. <view class="page_item_conts" v-if="item.taskType.associationType.value == 'jPBag'">
  166. <view>
  167. 药包编码 :
  168. {{ item.staticDistri ? item.staticDistri.packid : "无" }}
  169. </view>
  170. </view>
  171. <view class="line"></view>
  172. <view class="page_item_cont_B">
  173. <view class="page_item_cont_title" v-if="item.taskType.associationType.value != 'inspect'">
  174. <text> <text class="End">终</text> 点科室 </text>
  175. <text class="text_big" v-for="(dept, i) of item.endDepts" :key="i">{{ dept.dept }}</text>
  176. </view>
  177. <view class="page_item_cont_title" v-if="item.taskType.associationType.value == 'inspect'">
  178. <text> <text class="End">检</text> 查科室 </text>
  179. <text class="text_big" v-for="(dept, i) of item.middleDept" :key="i">{{ dept.dept }}</text>
  180. </view>
  181. </view>
  182. <view v-if="
  183. item.taskType.associationType.value == 'inspect' ||
  184. item.taskType.associationType.value == 'patientTransport'
  185. ">
  186. <!-- 待抢单 -->
  187. <text class="red" v-if="item.gdState.value == 2">请扫描患者腕带,或者请扫描科室码</text>
  188. <!-- 待到达 -->
  189. <text class="red" v-if="item.gdState.value == 4">请扫描患者腕带</text>
  190. <!-- 执行中 -->
  191. <text class="red" v-if="item.gdState.value == 8">请扫描检查科室码,并扫描患者腕带</text>
  192. <!-- 待送达 -->
  193. <text class="red" v-if="item.gdState.value == 5">请扫描终点科室码,并扫描患者腕带</text>
  194. </view>
  195. </view>
  196. <!-- 如果不是患者陪检或患者转运或其他 -->
  197. <view class="page_item_btn" v-if="
  198. selectedLabelSlots == '执行中' &&
  199. item.taskType.associationType.value != 'patientTransport' &&
  200. item.taskType.associationType.value != 'inspect' &&
  201. item.taskType.associationType.value != 'other'
  202. " hover-class="seimin-btn-hover">
  203. <smallScreen :sData="item" :sType="2">扫码</smallScreen>
  204. </view>
  205. <!-- 如果不是静配,药配,标本配送,标本轮巡 -->
  206. <view class="page_item_btn_wrap" v-if="
  207. selectedLabelSlots == '执行中' &&
  208. item.taskType.associationType.value != 'jPBag' &&
  209. item.taskType.associationType.value != 'drugsBag' &&
  210. item.taskType.associationType.value != 'specimen' &&
  211. item.taskType.associationType.value != 'specimenPlan'
  212. ">
  213. <view class="page_item_btn" :style="{
  214. width:
  215. item.taskType.associationType.value != 'other' &&
  216. item.gdState.value == 4
  217. ? '50%'
  218. : '100%',
  219. }" hover-class="seimin-btn-hover">
  220. <smallScreen :sData="item" :sType="1">扫码</smallScreen>
  221. </view>
  222. <view v-if="
  223. item.taskType.associationType.value != 'other' &&
  224. item.gdState.value == 4
  225. " class="page_item_btn" @click="photograph(item)" hover-class="seimin-btn-hover">拍照</view>
  226. </view>
  227. <view class="page_item_btn" v-if="selectedLabelSlots == '待接单'" @click="showAlerts(item)"
  228. hover-class="seimin-btn-hover">接单</view>
  229. </view>
  230. <view class="L-l"></view>
  231. <view class="R-l"></view>
  232. </view>
  233. </scroll-view>
  234. </view>
  235. <!-- 底部扫一扫 -->
  236. <bigScreen></bigScreen>
  237. <!-- 悬浮按钮 -->
  238. <uni-fab :pattern="pattern" :content="content" :direction="direction" @trigger="trigger"></uni-fab>
  239. <!-- 弹窗 -->
  240. <showModel :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content"
  241. @ok="ok" @cancel="cancel" @know="know" :operate="models.operate"></showModel>
  242. <!-- 手动查询标本弹窗 -->
  243. <handViewSpecimen v-if="speModels.disjunctor" :title="speModels.title" :disjunctor="speModels.disjunctor"
  244. @ok="speOk" @cancel="speCancel">
  245. </handViewSpecimen>
  246. <!-- 手动查询药品弹窗 -->
  247. <handViewDrugsBag v-if="drugbagModels.disjunctor" :title="drugbagModels.title" :disjunctor="drugbagModels.disjunctor"
  248. @ok="drugbagOk" @cancel="drugbagCancel">
  249. </handViewDrugsBag>
  250. </view>
  251. </template>
  252. <script>
  253. import smallScreen from "../../components/smallScreen/smallScreen.vue";
  254. import showModel from "../../components/showModel/showModel.vue";
  255. import bigScreen from "../../components/bigScreen/bigScreen.vue";
  256. // https://ext.dcloud.net.cn/plugin?id=144
  257. import uniFab from "@/components/uni-fab/uni-fab.vue";
  258. import {
  259. get,
  260. post,
  261. SM,
  262. deleteIt,
  263. webHandle
  264. } from "../../http/http.js";
  265. import {
  266. photographTool
  267. } from "../../tools/photograph.js";
  268. export default {
  269. data() {
  270. return {
  271. // 手动查询标本弹窗model
  272. speModels: {
  273. disjunctor: false,
  274. },
  275. // 手动查询药品弹窗model
  276. drugbagModels: {
  277. disjunctor: false,
  278. },
  279. // 筛选条件
  280. array: [{
  281. id: 0,
  282. name: "全部",
  283. },
  284. {
  285. id: 71,
  286. name: "待到达",
  287. },
  288. {
  289. id: 72,
  290. name: "待送达",
  291. },
  292. {
  293. id: 75,
  294. name: "执行中",
  295. },
  296. ],
  297. index: 0,
  298. arrayKey: 0,
  299. // 当前登录人是否是药房角色
  300. pharmacistFlag: false,
  301. // 抢单的id
  302. qdId: "",
  303. // 弹窗model
  304. models: {
  305. disjunctor: false,
  306. },
  307. // 悬浮按钮样式
  308. pattern: {
  309. buttonColor: "#6cc076",
  310. },
  311. // 悬浮按钮展开菜单显示方式
  312. direction: "vertical",
  313. // 悬浮按钮展开菜单内容配置项
  314. content: [{
  315. text: "我的任务",
  316. }, ],
  317. // 当前选中tab页名称
  318. selectedLabelSlots: "待接单",
  319. // tab页信息
  320. tabs: [{
  321. label: "待接单", //tab页名称
  322. value: "1", //值
  323. num: 0, //数量
  324. },
  325. {
  326. label: "执行中",
  327. value: "2",
  328. num: 0,
  329. },
  330. ],
  331. //列表数据
  332. zxzData: [],
  333. //分页页码
  334. idx: 0,
  335. // 列表项总数
  336. totalNum: -1,
  337. triggered: false, //下拉刷新状态
  338. freshing: false, //上拉加载开关
  339. scroll_top: 0, //距离顶部的距离
  340. scroll_refresher_enabled: true, //是否开启自定义下拉刷新
  341. };
  342. },
  343. filters: {
  344. // 自定义管道 yyTime
  345. yyTimeFilter: function(data) {
  346. if (data) {
  347. let nDate = null;
  348. if(typeof data == 'string'){
  349. let arr = data.split(/[-:\s]/);
  350. nDate = new Date(
  351. arr[0] - 0,
  352. arr[1] - 1,
  353. arr[2] - 0,
  354. arr[3] - 0,
  355. arr[4] - 0,
  356. 0
  357. );
  358. }else if(typeof data == 'number'){
  359. nDate = new Date(data);
  360. }
  361. const month = (nDate.getMonth() + 1).toString().padStart(2, 0);
  362. const date = nDate.getDate().toString().padStart(2, 0);
  363. const hour = nDate.getHours().toString().padStart(2, 0);
  364. const minute = nDate.getMinutes().toString().padStart(2, 0);
  365. return `${month}-${date} ${hour}:${minute}`;
  366. } else {
  367. return "-";
  368. }
  369. },
  370. },
  371. components: {
  372. uniFab,
  373. showModel,
  374. bigScreen,
  375. },
  376. methods: {
  377. // 手动查询药品-确认
  378. drugbagOk(data) {
  379. console.log(data);
  380. if (!data.id) {
  381. //没有查询到药品
  382. uni.showModal({
  383. title: '提示',
  384. content: "没有查询到发药单号!",
  385. showCancel: false,
  386. success: function(res) {
  387. if (res.confirm) {
  388. console.log('用户点击确定');
  389. } else if (res.cancel) {
  390. console.log('用户点击取消');
  391. }
  392. }
  393. });
  394. return;
  395. }
  396. this.drugbagModels.disjunctor = false;
  397. uni.navigateTo({
  398. url: `/pages/scanning_drug/scanning_drug?drugsBagId=${data.id}`,
  399. });
  400. },
  401. // 手动查询药品-取消
  402. drugbagCancel() {
  403. this.drugbagModels.disjunctor = false;
  404. },
  405. // 手动查询药品弹窗
  406. showHandViewDrugsbag() {
  407. console.log(1)
  408. this.drugbagModels = {
  409. title: '填写发药单号',
  410. disjunctor: true,
  411. }
  412. },
  413. // 手动查询标本-确认
  414. speOk(data) {
  415. console.log(data);
  416. if (!data.id) {
  417. //没有查询到标本
  418. uni.showModal({
  419. title: '提示',
  420. content: "没有查询到标本!",
  421. showCancel: false,
  422. success: function(res) {
  423. if (res.confirm) {
  424. console.log('用户点击确定');
  425. } else if (res.cancel) {
  426. console.log('用户点击取消');
  427. }
  428. }
  429. });
  430. return;
  431. }
  432. this.speModels.disjunctor = false;
  433. let infoDATA = {
  434. stype: data.stype,
  435. scode: data.scode,
  436. patientName: data.patientName,
  437. sickRoom: data.sickRoom ?
  438. data.sickRoom.dept : "-",
  439. checkDept: data.checkDept ?
  440. data.checkDept.dept : "-",
  441. bedNum: data.bedNum,
  442. };
  443. uni.navigateTo({
  444. url: `../scanning_B/scanning_B?res=${encodeURIComponent(
  445. JSON.stringify({data,status:666,scanCodeSpecimenOrderSign:data.scanCodeSpecimenOrderSign,workOrder:data.workOrderDTO})
  446. )}&infoDATA=${encodeURIComponent(
  447. JSON.stringify(infoDATA)
  448. )}`,
  449. });
  450. },
  451. // 手动查询标本-取消
  452. speCancel() {
  453. this.speModels.disjunctor = false;
  454. },
  455. // 手动查询标本弹窗
  456. showHandViewSpecimen() {
  457. this.speModels = {
  458. title: '填写标本编码',
  459. disjunctor: true,
  460. }
  461. },
  462. // 执行中筛选
  463. execFilter({
  464. detail: {
  465. value
  466. }
  467. }) {
  468. this.index = value;
  469. this.arrayKey = this.array[value].id;
  470. this.zxzData = [];
  471. this.totalNum = -1;
  472. this.idx = 0;
  473. this.selectedLabelSlots = "执行中";
  474. this.executingOrders(0);
  475. },
  476. // 获取科室二维码设置开关
  477. getMenu() {
  478. let menu = uni.getStorageSync("userData").menu;
  479. //判断当前登陆人具体角色 start
  480. let roles = uni.getStorageSync("userData").user.role;
  481. this.pharmacistFlag = roles.some(
  482. (item) => item.rolecode === "pharmacist"
  483. );
  484. //判断当前登陆人具体角色 end
  485. console.log(menu);
  486. menu.forEach((item) => {
  487. if (item.link === "wxInspect") {
  488. this.content.push({
  489. text: "检查信息",
  490. });
  491. } else if (item.link === "wxPatient") {
  492. this.content.push({
  493. text: "患者信息",
  494. });
  495. } else if (item.link === "wxPharmacy") {
  496. // 如果是配药师人员,则增加药房
  497. if (this.pharmacistFlag) {
  498. this.content.push({
  499. text: "药房",
  500. });
  501. }
  502. } else if (item.link === "wxCode") {
  503. this.content.push({
  504. text: "二维码设置",
  505. });
  506. } else if (item.link === "wxSpecimenEntry") {
  507. this.content.push({
  508. text: "标本录入",
  509. });
  510. } else if (item.link === "wxDrugsbagEntry") {
  511. this.content.push({
  512. text: "药品录入",
  513. });
  514. }
  515. });
  516. },
  517. // 拍照
  518. photograph(data) {
  519. photographTool(data);
  520. },
  521. // 悬浮按钮点击事件
  522. trigger(e) {
  523. if (e.item.text === "我的任务") {
  524. uni.navigateTo({
  525. url: "../mypage/mypage",
  526. });
  527. } else if (e.item.text === "退出登录") {
  528. // 假登录
  529. uni.showToast({
  530. title: "退出成功!",
  531. });
  532. let ip = uni.getStorageSync("ip"); //记住域名或ip
  533. let username = uni.getStorageSync("username"); //记住用户名
  534. let password = uni.getStorageSync("password"); //记住密码
  535. let savePasswordTime = uni.getStorageSync("savePasswordTime"); //记住密码的时间戳
  536. let clientid = uni.getStorageSync("clientid");
  537. uni.clearStorageSync();
  538. if (username) {
  539. uni.setStorageSync("ip", ip); //记住域名或ip
  540. uni.setStorageSync("username", username); //记住用户名
  541. uni.setStorageSync("password", password); //记住密码
  542. uni.setStorageSync("savePasswordTime", savePasswordTime); //记住密码的时间戳
  543. }
  544. uni.setStorageSync("clientid", clientid);
  545. uni.navigateTo({
  546. url: "../homePage/homePage",
  547. });
  548. // 假登录
  549. deleteIt("/auth/logout2").then((result) => {
  550. if (result.status == 200) {
  551. uni.showToast({
  552. title: "退出成功!",
  553. });
  554. let ip = uni.getStorageSync("ip"); //记住域名或ip
  555. let username = uni.getStorageSync("username"); //记住用户名
  556. let password = uni.getStorageSync("password"); //记住密码
  557. let clientid = uni.getStorageSync("clientid");
  558. uni.clearStorageSync();
  559. uni.setStorageSync("ip", ip); //记住域名或ip
  560. uni.setStorageSync("username", username); //记住用户名
  561. uni.setStorageSync("password", password); //记住密码
  562. uni.setStorageSync("clientid", clientid);
  563. uni.navigateTo({
  564. url: "../homePage/homePage",
  565. });
  566. } else {
  567. uni.showToast({
  568. icon: "none",
  569. title: "请求失败!",
  570. });
  571. }
  572. });
  573. } else if (e.item.text === "药房") {
  574. uni.navigateTo({
  575. url: "../pharmacy/pharmacy",
  576. });
  577. } else if (e.item.text === "患者信息") {
  578. uni.navigateTo({
  579. url: "../patientInformationList/patientInformationList",
  580. });
  581. } else if (e.item.text === "负责科室") {
  582. if (uni.getStorageSync("setDepts")) {
  583. uni.removeStorageSync("setDepts"); //清空选择的科室,初始化
  584. }
  585. let obj = uni.getStorageSync("setDeptConfg");
  586. uni.navigateTo({
  587. url: `../setDept/setDept?configName=${obj.configName}&id=${obj.id}&changedept=1`,
  588. });
  589. } else if (e.item.text === "检查信息") {
  590. uni.navigateTo({
  591. url: "../inspectList/inspectList",
  592. });
  593. } else if (e.item.text === "二维码设置") {
  594. uni.navigateTo({
  595. url: "../settingCode/settingCode",
  596. });
  597. } else if (e.item.text === "标本录入") {
  598. this.showHandViewSpecimen();
  599. } else if (e.item.text === "药品录入") {
  600. this.showHandViewDrugsbag();
  601. }
  602. },
  603. // 点击tab页切换
  604. clickHandler(key) {
  605. this.selectedLabelSlots = key;
  606. this.idx = 0;
  607. this.totalNum = -1;
  608. // this.zxzData = [];
  609. this.scroll_top = Math.random(); //回到顶部
  610. if (key === "待接单") {
  611. this.waitingOrders(0);
  612. } else if (key === "执行中") {
  613. this.executingOrders(0);
  614. }
  615. },
  616. // 进入详情页
  617. itemInfo(workOrder) {
  618. console.log(workOrder);
  619. uni.navigateTo({
  620. url: `../receipt_infopage/receipt_infopage?id=${workOrder.id}&associationTypeValue=${workOrder.taskType.associationType.value}`,
  621. });
  622. },
  623. //抢单后知道了
  624. know() {
  625. this.models.disjunctor = false;
  626. this.idx = 0;
  627. this.totalNum = -1;
  628. // this.zxzData = [];
  629. this.executingOrdersGetNum();
  630. this.waitingOrders(0); //seimin
  631. this.scroll_top = Math.random(); //回到顶部
  632. },
  633. //抢单确定
  634. ok() {
  635. this.models.disjunctor = false;
  636. get("/workerOrder/takeOrder/" + this.qdId.id).then((res) => {
  637. let msg = "接单失败";
  638. let icon = "error";
  639. if (res.status == 200) {
  640. msg = "接单成功";
  641. icon = "success";
  642. }
  643. this.models = {
  644. disjunctor: true,
  645. content: msg,
  646. icon: icon,
  647. operate: {
  648. know: "知道了",
  649. },
  650. };
  651. });
  652. },
  653. //抢单取消
  654. cancel() {
  655. this.models.disjunctor = false;
  656. },
  657. // 抢单
  658. showAlerts(data) {
  659. this.qdId = data;
  660. this.models = {
  661. disjunctor: true,
  662. title: "提示",
  663. content: "是否确定接单?",
  664. icon: "warn",
  665. operate: {
  666. ok: "确定",
  667. cancel: "取消",
  668. },
  669. };
  670. },
  671. //执行中列表数据获取
  672. executingOrders(idx) {
  673. console.log(this.zxzData.length, this.totalNum);
  674. if (this.zxzData.length == this.totalNum) {
  675. uni.showToast({
  676. icon: "none",
  677. title: "没有更多数据了!",
  678. });
  679. this.freshing = true;
  680. return;
  681. }
  682. let data = {
  683. idx,
  684. sum: 20,
  685. };
  686. if (this.arrayKey) {
  687. data.keyWord = this.arrayKey;
  688. } else {
  689. delete data.keyWord;
  690. }
  691. uni.showLoading({
  692. title: "加载中",
  693. mask: true,
  694. });
  695. post("/workerOrder/executingOrders", data).then((res) => {
  696. uni.hideLoading();
  697. if (res.status == 200) {
  698. this.triggered = false;
  699. this.freshing = true;
  700. this.totalNum = res.data.resultCount;
  701. if (idx === 0) {
  702. this.zxzData = res.data.data;
  703. } else {
  704. this.zxzData.push(...res.data.data);
  705. }
  706. this.tabs[1].num = res.data.resultCount;
  707. } else {
  708. uni.showToast({
  709. icon: "none",
  710. title: "请求失败!",
  711. });
  712. }
  713. });
  714. },
  715. //待抢单列表数据获取
  716. waitingOrders(idx) {
  717. if (this.zxzData.length == this.totalNum) {
  718. uni.showToast({
  719. icon: "none",
  720. title: "没有更多数据了!",
  721. });
  722. this.freshing = true;
  723. return;
  724. }
  725. let data = {
  726. idx,
  727. sum: 20,
  728. };
  729. uni.showLoading({
  730. title: "加载中",
  731. mask: true,
  732. });
  733. // 请求列表数据
  734. post("/workerOrder/waitingOrders", data).then((res) => {
  735. uni.hideLoading();
  736. if (res.status == 200) {
  737. this.triggered = false;
  738. this.freshing = true;
  739. this.totalNum = res.data.resultCount;
  740. if (idx === 0) {
  741. this.zxzData = res.data.data;
  742. } else {
  743. this.zxzData.push(...res.data.data);
  744. }
  745. this.tabs[0].num = res.data.resultCount;
  746. } else {
  747. uni.showToast({
  748. icon: "none",
  749. title: "请求失败!",
  750. });
  751. }
  752. });
  753. },
  754. //刷新
  755. refresherrefresh() {
  756. if (this.triggered) {
  757. return;
  758. }
  759. this.triggered = true;
  760. this.idx = 0;
  761. this.totalNum = -1;
  762. if (this.selectedLabelSlots == "待接单") {
  763. this.waitingOrders(0);
  764. } else if (this.selectedLabelSlots == "执行中") {
  765. this.executingOrders(0);
  766. }
  767. },
  768. // 滚动
  769. scroll(e) {
  770. if (e.detail.scrollTop < 20) {
  771. this.scroll_refresher_enabled = true;
  772. } else {
  773. this.scroll_refresher_enabled = false;
  774. }
  775. },
  776. // 下拉刷新复位
  777. refresherrestore() {
  778. this.triggered = false;
  779. console.log("下拉刷新复位");
  780. },
  781. //下拉刷新中止
  782. refresherabort() {
  783. this.triggered = false;
  784. console.log("下拉刷新中止");
  785. },
  786. //分页,上拉加载
  787. scrolltolower() {
  788. if (this.freshing) {
  789. this.freshing = false;
  790. if (this.selectedLabelSlots == "待接单") {
  791. this.waitingOrders(++this.idx);
  792. } else if (this.selectedLabelSlots == "执行中") {
  793. this.executingOrders(++this.idx);
  794. }
  795. }
  796. },
  797. // 执行中获取数字
  798. executingOrdersGetNum() {
  799. let data = {
  800. idx: 0,
  801. sum: 20,
  802. };
  803. if (this.arrayKey) {
  804. data.keyWord = this.arrayKey;
  805. } else {
  806. delete data.keyWord;
  807. }
  808. post("/workerOrder/executingOrders", data).then((res) => {
  809. if (res.status == 200) {
  810. this.tabs[1].num = res.data.resultCount;
  811. } else {
  812. uni.showToast({
  813. icon: "none",
  814. title: "请求失败!",
  815. });
  816. }
  817. });
  818. },
  819. // 待接单获取数字
  820. waitingOrdersGetNum() {
  821. let data = {
  822. idx: 0,
  823. sum: 20,
  824. };
  825. post("/workerOrder/waitingOrders", data).then((res) => {
  826. if (res.status == 200) {
  827. this.tabs[0].num = res.data.resultCount;
  828. } else {
  829. uni.showToast({
  830. icon: "none",
  831. title: "请求失败!",
  832. });
  833. }
  834. });
  835. },
  836. // 阻止浏览器滑动
  837. stop(e) {
  838. e.preventDefault();
  839. },
  840. },
  841. onLoad() {
  842. // 获取菜单权限
  843. this.getMenu();
  844. post("/auth/getUserWorkDept", {}).then((ress) => {
  845. if (ress.status == 200) {
  846. let userId = uni.getStorageSync("userData").user.id;
  847. let groupManager = ress.settings && ress.settings.groupManager; //当前工作组合选择的组
  848. let workType = ress.settings ? ress.settings.workType : -1; //1是综合,2是自主
  849. let ruleType = ress.settings ? ress.settings.ruleType : -1; //3是科室绑定人员,4是科室绑定分组,2是绑定分组
  850. if (workType == 2 && (ruleType == 3 || (ruleType == 4 && userId == groupManager.manager))) {
  851. //自选排班,科室绑定分组,当前登陆人是组长
  852. this.content.unshift({
  853. text: "负责科室",
  854. });
  855. }
  856. }
  857. });
  858. // let setDeptConfg = uni.getStorageSync("setDeptConfg");
  859. // let manager = uni.getStorageSync("manager");
  860. // let userId = uni.getStorageSync("userData").user.id;
  861. // console.log(setDeptConfg, manager, userId);
  862. // if (
  863. // setDeptConfg.workSchemeType == 2 &&
  864. // (setDeptConfg.ruleType == 3 ||
  865. // (setDeptConfg.ruleType == 4 && userId == manager))
  866. // ) {
  867. // //自选排班,科室绑定人员 || 科室绑定分组 && 组长是当前登陆人
  868. // this.content.unshift({
  869. // text: "负责科室",
  870. // });
  871. // }
  872. // #ifdef APP-PLUS
  873. // this.content.push({
  874. // text: "退出登录",
  875. // });
  876. // #endif
  877. this.selectedLabelSlots = "执行中";
  878. this.waitingOrdersGetNum();
  879. this.executingOrders(0);
  880. // #ifdef APP-PLUS
  881. webHandle("no", "app");
  882. // #endif
  883. // #ifdef H5
  884. webHandle("no", "wx");
  885. // #endif
  886. },
  887. onShow() {
  888. // #ifdef H5
  889. document.body.addEventListener("touchmove", this.stop, {
  890. passive: false,
  891. });
  892. // #endif
  893. },
  894. onHide() {
  895. // #ifdef H5
  896. document.body.removeEventListener("touchmove", this.stop, {
  897. passive: false,
  898. });
  899. // #endif
  900. },
  901. };
  902. </script>
  903. <style lang="less">
  904. .Receiptpage {
  905. width: 100%;
  906. height: 100%;
  907. position: relative;
  908. .red {
  909. color: red !important;
  910. font-weight: bold !important;
  911. }
  912. .page_tab {
  913. width: 100%;
  914. height: 96rpx;
  915. display: flex;
  916. position: fixed;
  917. left: 0;
  918. top: 0;
  919. z-index: 999;
  920. .page_tab_bar {
  921. flex: 1;
  922. font-size: 36rpx;
  923. background: #fff;
  924. display: flex;
  925. justify-content: center;
  926. align-items: center;
  927. position: relative;
  928. &:after {
  929. content: "";
  930. position: absolute;
  931. left: 0;
  932. bottom: 0;
  933. height: 2rpx;
  934. width: 100%;
  935. background-color: transparent;
  936. }
  937. .tab_num {
  938. color: #ff3b53;
  939. margin-left: 8rpx;
  940. }
  941. .more {
  942. position: absolute;
  943. right: 20rpx;
  944. width: 40rpx;
  945. height: 4rpx;
  946. border-top: 2px solid #49b856;
  947. border-bottom: 2px solid #49b856;
  948. background-color: #49b856;
  949. padding: 5px 0;
  950. background-clip: content-box;
  951. }
  952. .more_picker {
  953. position: absolute;
  954. right: 0;
  955. height: 100%;
  956. opacity: 0;
  957. }
  958. &.active {
  959. color: #49b856;
  960. &:after {
  961. background-color: #49b856;
  962. }
  963. }
  964. }
  965. }
  966. .zwsj {
  967. position: absolute;
  968. left: 50%;
  969. top: 180rpx;
  970. transform: translateX(-50%);
  971. .zwsj-img {
  972. width: 560rpx;
  973. }
  974. .zwsj-txt {
  975. font-size: 36rpx;
  976. font-weight: 700;
  977. margin-top: 20rpx;
  978. text-align: center;
  979. }
  980. }
  981. .page_items {
  982. height: calc(100vh - 184rpx);
  983. padding: 0 20rpx;
  984. // padding-bottom: 88rpx;
  985. padding-top: 96rpx;
  986. .page_items_scroll {
  987. height: 100%;
  988. .page_item_wrap {
  989. position: relative;
  990. margin-bottom: 32rpx;
  991. .page_item {
  992. margin-bottom: 16rpx;
  993. min-height: 356rpx;
  994. background: #fff;
  995. border-radius: 8rpx;
  996. overflow: hidden;
  997. border: 2rpx solid #e5e9ed;
  998. .L {
  999. width: 40rpx;
  1000. height: 40rpx;
  1001. border-radius: 50%;
  1002. background: #f9fafb;
  1003. position: absolute;
  1004. left: -24rpx;
  1005. top: 68rpx;
  1006. border: 2rpx solid #e5e9ed;
  1007. }
  1008. .R {
  1009. width: 40rpx;
  1010. height: 40rpx;
  1011. border-radius: 50%;
  1012. background: #f9fafb;
  1013. position: absolute;
  1014. float: right;
  1015. right: -24rpx;
  1016. top: 68rpx;
  1017. border: 2rpx solid #e5e9ed;
  1018. }
  1019. .starting {
  1020. width: 40rpx;
  1021. height: 40rpx;
  1022. color: #fff;
  1023. background: #49b856;
  1024. display: inline-block;
  1025. border-radius: 50%;
  1026. text-align: center;
  1027. line-height: 40rpx;
  1028. font-size: 28rpx;
  1029. }
  1030. .End {
  1031. width: 40rpx;
  1032. height: 40rpx;
  1033. color: #fff;
  1034. background: #39b199;
  1035. display: inline-block;
  1036. border-radius: 50%;
  1037. text-align: center;
  1038. line-height: 40rpx;
  1039. font-size: 28rpx;
  1040. }
  1041. .page_item_top {
  1042. height: 86rpx;
  1043. border-bottom: 2rpx dashed #e5e9ed;
  1044. padding: 0 16rpx;
  1045. .page_item_top_L {
  1046. height: 100%;
  1047. float: left;
  1048. line-height: 88rpx;
  1049. .L_iocn {
  1050. display: inline-block;
  1051. width: 44rpx;
  1052. height: 44rpx;
  1053. line-height: 42rpx;
  1054. border-radius: 100rpx;
  1055. color: #6cc076;
  1056. font-size: 32rpx;
  1057. border: 4rpx solid #6cc076;
  1058. background: #f0f6ed;
  1059. text-align: center;
  1060. margin-right: 8rpx;
  1061. }
  1062. .L_time {
  1063. color: #6cc076;
  1064. font-size: 32rpx;
  1065. }
  1066. .L_text {
  1067. font-size: 32rpx;
  1068. }
  1069. }
  1070. .page_item_top_R {
  1071. height: 100%;
  1072. float: right;
  1073. line-height: 88rpx;
  1074. font-size: 32rpx;
  1075. &.type {
  1076. margin-right: 32rpx;
  1077. color: red;
  1078. max-width: 260rpx;
  1079. white-space: nowrap;
  1080. text-overflow: ellipsis;
  1081. overflow: hidden;
  1082. }
  1083. }
  1084. }
  1085. .page_item_cont {
  1086. min-height: 180rpx;
  1087. padding: 0 16rpx;
  1088. text-align: left;
  1089. position: relative;
  1090. .text_big {
  1091. font-size: 32rpx;
  1092. margin-left: 10rpx;
  1093. font-weight: 700;
  1094. }
  1095. .line {
  1096. height: 40rpx;
  1097. width: 2rpx;
  1098. border-left: 2rpx solid #e5e9ed;
  1099. position: absolute;
  1100. top: 70rpx;
  1101. left: 36rpx;
  1102. }
  1103. .lines {
  1104. height: 40%;
  1105. width: 2rpx;
  1106. border-left: 2rpx solid #e5e9ed;
  1107. position: absolute;
  1108. top: 23%;
  1109. left: 36rpx;
  1110. }
  1111. .emergencys {
  1112. background: #ff3b53 !important;
  1113. width: 124rpx !important;
  1114. }
  1115. .emergency {
  1116. background: #ff3b53 !important;
  1117. }
  1118. .emergency1 {
  1119. background: #49b856 !important;
  1120. }
  1121. .page_item_cont_T {
  1122. min-height: 80rpx;
  1123. max-height: 324rpx;
  1124. font-size: 28rpx;
  1125. padding-top: 16rpx;
  1126. .page_item_cont_title {
  1127. height: 100%;
  1128. float: left;
  1129. }
  1130. .page_item_cont_start {
  1131. text-align: center;
  1132. float: right;
  1133. height: 44rpx;
  1134. width: 104rpx;
  1135. line-height: 44rpx;
  1136. border-radius: 8rpx;
  1137. background: #49b856;
  1138. color: #fff;
  1139. .page_item_cont_start-img {
  1140. width: 22rpx;
  1141. position: relative;
  1142. top: 6rpx;
  1143. margin-right: 8rpx;
  1144. }
  1145. }
  1146. }
  1147. .page_item_conts {
  1148. color: rgb(102, 102, 102);
  1149. padding-left: 18%;
  1150. font-size: 28rpx;
  1151. view {
  1152. margin-bottom: 10rpx;
  1153. }
  1154. text {
  1155. color: #49b856;
  1156. }
  1157. .num {
  1158. float: right;
  1159. }
  1160. }
  1161. .page_item_cont_B {
  1162. padding-top: 20rpx;
  1163. font-size: 28rpx;
  1164. overflow: hidden;
  1165. .page_item_cont_title {
  1166. height: 100%;
  1167. float: left;
  1168. }
  1169. }
  1170. }
  1171. .page_item_btn_wrap {
  1172. display: flex;
  1173. justify-content: space-between;
  1174. .page_item_btn {
  1175. height: 88rpx;
  1176. width: 49%;
  1177. background-image: linear-gradient(to right, #72c172, #3bb197);
  1178. border-radius: 8rpx;
  1179. line-height: 88rpx;
  1180. color: #fff;
  1181. font-size: 36rpx;
  1182. font-weight: 700;
  1183. text-align: center;
  1184. }
  1185. }
  1186. .page_item_btn {
  1187. height: 88rpx;
  1188. background-image: linear-gradient(to right, #72c172, #3bb197);
  1189. border-radius: 8rpx;
  1190. line-height: 88rpx;
  1191. color: #fff;
  1192. font-size: 36rpx;
  1193. font-weight: 700;
  1194. text-align: center;
  1195. }
  1196. }
  1197. .L-l {
  1198. width: 2rpx;
  1199. height: 40rpx;
  1200. background: #f9fafb;
  1201. position: absolute;
  1202. left: 20rpx;
  1203. top: 72rpx;
  1204. display: none;
  1205. }
  1206. .R-l {
  1207. width: 2rpx;
  1208. height: 40rpx;
  1209. background: #f9fafb;
  1210. position: absolute;
  1211. right: 20rpx;
  1212. top: 72rpx;
  1213. display: none;
  1214. }
  1215. }
  1216. }
  1217. }
  1218. .text {
  1219. font-size: 36rpx;
  1220. }
  1221. .wt_icon {
  1222. font-size: 40rpx;
  1223. }
  1224. }
  1225. </style>