receiptpage.vue 41 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277
  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.id)">
  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(id) {
  618. uni.navigateTo({
  619. url: `../receipt_infopage/receipt_infopage?id=${id}`,
  620. });
  621. },
  622. //抢单后知道了
  623. know() {
  624. this.models.disjunctor = false;
  625. this.idx = 0;
  626. this.totalNum = -1;
  627. // this.zxzData = [];
  628. this.executingOrdersGetNum();
  629. this.waitingOrders(0); //seimin
  630. this.scroll_top = Math.random(); //回到顶部
  631. },
  632. //抢单确定
  633. ok() {
  634. this.models.disjunctor = false;
  635. get("/workerOrder/takeOrder/" + this.qdId.id).then((res) => {
  636. let msg = "接单失败";
  637. let icon = "error";
  638. if (res.status == 200) {
  639. msg = "接单成功";
  640. icon = "success";
  641. }
  642. this.models = {
  643. disjunctor: true,
  644. content: msg,
  645. icon: icon,
  646. operate: {
  647. know: "知道了",
  648. },
  649. };
  650. });
  651. },
  652. //抢单取消
  653. cancel() {
  654. this.models.disjunctor = false;
  655. },
  656. // 抢单
  657. showAlerts(data) {
  658. this.qdId = data;
  659. this.models = {
  660. disjunctor: true,
  661. title: "提示",
  662. content: "是否确定接单?",
  663. icon: "warn",
  664. operate: {
  665. ok: "确定",
  666. cancel: "取消",
  667. },
  668. };
  669. },
  670. //执行中列表数据获取
  671. executingOrders(idx) {
  672. console.log(this.zxzData.length, this.totalNum);
  673. if (this.zxzData.length == this.totalNum) {
  674. uni.showToast({
  675. icon: "none",
  676. title: "没有更多数据了!",
  677. });
  678. this.freshing = true;
  679. return;
  680. }
  681. let data = {
  682. idx,
  683. sum: 20,
  684. };
  685. if (this.arrayKey) {
  686. data.keyWord = this.arrayKey;
  687. } else {
  688. delete data.keyWord;
  689. }
  690. uni.showLoading({
  691. title: "加载中",
  692. mask: true,
  693. });
  694. post("/workerOrder/executingOrders", data).then((res) => {
  695. uni.hideLoading();
  696. if (res.status == 200) {
  697. this.triggered = false;
  698. this.freshing = true;
  699. this.totalNum = res.data.resultCount;
  700. if (idx === 0) {
  701. this.zxzData = res.data.data;
  702. } else {
  703. this.zxzData.push(...res.data.data);
  704. }
  705. this.tabs[1].num = res.data.resultCount;
  706. } else {
  707. uni.showToast({
  708. icon: "none",
  709. title: "请求失败!",
  710. });
  711. }
  712. });
  713. },
  714. //待抢单列表数据获取
  715. waitingOrders(idx) {
  716. if (this.zxzData.length == this.totalNum) {
  717. uni.showToast({
  718. icon: "none",
  719. title: "没有更多数据了!",
  720. });
  721. this.freshing = true;
  722. return;
  723. }
  724. let data = {
  725. idx,
  726. sum: 20,
  727. };
  728. uni.showLoading({
  729. title: "加载中",
  730. mask: true,
  731. });
  732. // 请求列表数据
  733. post("/workerOrder/waitingOrders", data).then((res) => {
  734. uni.hideLoading();
  735. if (res.status == 200) {
  736. this.triggered = false;
  737. this.freshing = true;
  738. this.totalNum = res.data.resultCount;
  739. if (idx === 0) {
  740. this.zxzData = res.data.data;
  741. } else {
  742. this.zxzData.push(...res.data.data);
  743. }
  744. this.tabs[0].num = res.data.resultCount;
  745. } else {
  746. uni.showToast({
  747. icon: "none",
  748. title: "请求失败!",
  749. });
  750. }
  751. });
  752. },
  753. //刷新
  754. refresherrefresh() {
  755. if (this.triggered) {
  756. return;
  757. }
  758. this.triggered = true;
  759. this.idx = 0;
  760. this.totalNum = -1;
  761. if (this.selectedLabelSlots == "待接单") {
  762. this.waitingOrders(0);
  763. } else if (this.selectedLabelSlots == "执行中") {
  764. this.executingOrders(0);
  765. }
  766. },
  767. // 滚动
  768. scroll(e) {
  769. if (e.detail.scrollTop < 20) {
  770. this.scroll_refresher_enabled = true;
  771. } else {
  772. this.scroll_refresher_enabled = false;
  773. }
  774. },
  775. // 下拉刷新复位
  776. refresherrestore() {
  777. this.triggered = false;
  778. console.log("下拉刷新复位");
  779. },
  780. //下拉刷新中止
  781. refresherabort() {
  782. this.triggered = false;
  783. console.log("下拉刷新中止");
  784. },
  785. //分页,上拉加载
  786. scrolltolower() {
  787. if (this.freshing) {
  788. this.freshing = false;
  789. if (this.selectedLabelSlots == "待接单") {
  790. this.waitingOrders(++this.idx);
  791. } else if (this.selectedLabelSlots == "执行中") {
  792. this.executingOrders(++this.idx);
  793. }
  794. }
  795. },
  796. // 执行中获取数字
  797. executingOrdersGetNum() {
  798. let data = {
  799. idx: 0,
  800. sum: 20,
  801. };
  802. if (this.arrayKey) {
  803. data.keyWord = this.arrayKey;
  804. } else {
  805. delete data.keyWord;
  806. }
  807. post("/workerOrder/executingOrders", data).then((res) => {
  808. if (res.status == 200) {
  809. this.tabs[1].num = res.data.resultCount;
  810. } else {
  811. uni.showToast({
  812. icon: "none",
  813. title: "请求失败!",
  814. });
  815. }
  816. });
  817. },
  818. // 待接单获取数字
  819. waitingOrdersGetNum() {
  820. let data = {
  821. idx: 0,
  822. sum: 20,
  823. };
  824. post("/workerOrder/waitingOrders", data).then((res) => {
  825. if (res.status == 200) {
  826. this.tabs[0].num = res.data.resultCount;
  827. } else {
  828. uni.showToast({
  829. icon: "none",
  830. title: "请求失败!",
  831. });
  832. }
  833. });
  834. },
  835. // 阻止浏览器滑动
  836. stop(e) {
  837. e.preventDefault();
  838. },
  839. },
  840. onLoad() {
  841. // 获取菜单权限
  842. this.getMenu();
  843. post("/auth/getUserWorkDept", {}).then((ress) => {
  844. if (ress.status == 200) {
  845. let userId = uni.getStorageSync("userData").user.id;
  846. let groupManager = ress.settings && ress.settings.groupManager; //当前工作组合选择的组
  847. let workType = ress.settings ? ress.settings.workType : -1; //1是综合,2是自主
  848. let ruleType = ress.settings ? ress.settings.ruleType : -1; //3是科室绑定人员,4是科室绑定分组,2是绑定分组
  849. if (workType == 2 && (ruleType == 3 || (ruleType == 4 && userId == groupManager.manager))) {
  850. //自选排班,科室绑定分组,当前登陆人是组长
  851. this.content.unshift({
  852. text: "负责科室",
  853. });
  854. }
  855. }
  856. });
  857. // let setDeptConfg = uni.getStorageSync("setDeptConfg");
  858. // let manager = uni.getStorageSync("manager");
  859. // let userId = uni.getStorageSync("userData").user.id;
  860. // console.log(setDeptConfg, manager, userId);
  861. // if (
  862. // setDeptConfg.workSchemeType == 2 &&
  863. // (setDeptConfg.ruleType == 3 ||
  864. // (setDeptConfg.ruleType == 4 && userId == manager))
  865. // ) {
  866. // //自选排班,科室绑定人员 || 科室绑定分组 && 组长是当前登陆人
  867. // this.content.unshift({
  868. // text: "负责科室",
  869. // });
  870. // }
  871. // #ifdef APP-PLUS
  872. // this.content.push({
  873. // text: "退出登录",
  874. // });
  875. // #endif
  876. this.selectedLabelSlots = "执行中";
  877. this.waitingOrdersGetNum();
  878. this.executingOrders(0);
  879. // #ifdef APP-PLUS
  880. webHandle("no", "app");
  881. // #endif
  882. // #ifdef H5
  883. webHandle("no", "wx");
  884. // #endif
  885. },
  886. onShow() {
  887. // #ifdef H5
  888. document.body.addEventListener("touchmove", this.stop, {
  889. passive: false,
  890. });
  891. // #endif
  892. },
  893. onHide() {
  894. // #ifdef H5
  895. document.body.removeEventListener("touchmove", this.stop, {
  896. passive: false,
  897. });
  898. // #endif
  899. },
  900. };
  901. </script>
  902. <style lang="less">
  903. .Receiptpage {
  904. width: 100%;
  905. height: 100%;
  906. position: relative;
  907. .red {
  908. color: red !important;
  909. font-weight: bold !important;
  910. }
  911. .page_tab {
  912. width: 100%;
  913. height: 96rpx;
  914. display: flex;
  915. position: fixed;
  916. left: 0;
  917. top: 0;
  918. z-index: 999;
  919. .page_tab_bar {
  920. flex: 1;
  921. font-size: 36rpx;
  922. background: #fff;
  923. display: flex;
  924. justify-content: center;
  925. align-items: center;
  926. position: relative;
  927. &:after {
  928. content: "";
  929. position: absolute;
  930. left: 0;
  931. bottom: 0;
  932. height: 2rpx;
  933. width: 100%;
  934. background-color: transparent;
  935. }
  936. .tab_num {
  937. color: #ff3b53;
  938. margin-left: 8rpx;
  939. }
  940. .more {
  941. position: absolute;
  942. right: 20rpx;
  943. width: 40rpx;
  944. height: 4rpx;
  945. border-top: 2px solid #49b856;
  946. border-bottom: 2px solid #49b856;
  947. background-color: #49b856;
  948. padding: 5px 0;
  949. background-clip: content-box;
  950. }
  951. .more_picker {
  952. position: absolute;
  953. right: 0;
  954. height: 100%;
  955. opacity: 0;
  956. }
  957. &.active {
  958. color: #49b856;
  959. &:after {
  960. background-color: #49b856;
  961. }
  962. }
  963. }
  964. }
  965. .zwsj {
  966. position: absolute;
  967. left: 50%;
  968. top: 180rpx;
  969. transform: translateX(-50%);
  970. .zwsj-img {
  971. width: 560rpx;
  972. }
  973. .zwsj-txt {
  974. font-size: 36rpx;
  975. font-weight: 700;
  976. margin-top: 20rpx;
  977. text-align: center;
  978. }
  979. }
  980. .page_items {
  981. height: calc(100vh - 184rpx);
  982. padding: 0 20rpx;
  983. // padding-bottom: 88rpx;
  984. padding-top: 96rpx;
  985. .page_items_scroll {
  986. height: 100%;
  987. .page_item_wrap {
  988. position: relative;
  989. margin-bottom: 32rpx;
  990. .page_item {
  991. margin-bottom: 16rpx;
  992. min-height: 356rpx;
  993. background: #fff;
  994. border-radius: 8rpx;
  995. overflow: hidden;
  996. border: 2rpx solid #e5e9ed;
  997. .L {
  998. width: 40rpx;
  999. height: 40rpx;
  1000. border-radius: 50%;
  1001. background: #f9fafb;
  1002. position: absolute;
  1003. left: -24rpx;
  1004. top: 68rpx;
  1005. border: 2rpx solid #e5e9ed;
  1006. }
  1007. .R {
  1008. width: 40rpx;
  1009. height: 40rpx;
  1010. border-radius: 50%;
  1011. background: #f9fafb;
  1012. position: absolute;
  1013. float: right;
  1014. right: -24rpx;
  1015. top: 68rpx;
  1016. border: 2rpx solid #e5e9ed;
  1017. }
  1018. .starting {
  1019. width: 40rpx;
  1020. height: 40rpx;
  1021. color: #fff;
  1022. background: #49b856;
  1023. display: inline-block;
  1024. border-radius: 50%;
  1025. text-align: center;
  1026. line-height: 40rpx;
  1027. font-size: 28rpx;
  1028. }
  1029. .End {
  1030. width: 40rpx;
  1031. height: 40rpx;
  1032. color: #fff;
  1033. background: #39b199;
  1034. display: inline-block;
  1035. border-radius: 50%;
  1036. text-align: center;
  1037. line-height: 40rpx;
  1038. font-size: 28rpx;
  1039. }
  1040. .page_item_top {
  1041. height: 86rpx;
  1042. border-bottom: 2rpx dashed #e5e9ed;
  1043. padding: 0 16rpx;
  1044. .page_item_top_L {
  1045. height: 100%;
  1046. float: left;
  1047. line-height: 88rpx;
  1048. .L_iocn {
  1049. display: inline-block;
  1050. width: 44rpx;
  1051. height: 44rpx;
  1052. line-height: 42rpx;
  1053. border-radius: 100rpx;
  1054. color: #6cc076;
  1055. font-size: 32rpx;
  1056. border: 4rpx solid #6cc076;
  1057. background: #f0f6ed;
  1058. text-align: center;
  1059. margin-right: 8rpx;
  1060. }
  1061. .L_time {
  1062. color: #6cc076;
  1063. font-size: 32rpx;
  1064. }
  1065. .L_text {
  1066. font-size: 32rpx;
  1067. }
  1068. }
  1069. .page_item_top_R {
  1070. height: 100%;
  1071. float: right;
  1072. line-height: 88rpx;
  1073. font-size: 32rpx;
  1074. &.type {
  1075. margin-right: 32rpx;
  1076. color: red;
  1077. max-width: 260rpx;
  1078. white-space: nowrap;
  1079. text-overflow: ellipsis;
  1080. overflow: hidden;
  1081. }
  1082. }
  1083. }
  1084. .page_item_cont {
  1085. min-height: 180rpx;
  1086. padding: 0 16rpx;
  1087. text-align: left;
  1088. position: relative;
  1089. .text_big {
  1090. font-size: 32rpx;
  1091. margin-left: 10rpx;
  1092. font-weight: 700;
  1093. }
  1094. .line {
  1095. height: 40rpx;
  1096. width: 2rpx;
  1097. border-left: 2rpx solid #e5e9ed;
  1098. position: absolute;
  1099. top: 70rpx;
  1100. left: 36rpx;
  1101. }
  1102. .lines {
  1103. height: 40%;
  1104. width: 2rpx;
  1105. border-left: 2rpx solid #e5e9ed;
  1106. position: absolute;
  1107. top: 23%;
  1108. left: 36rpx;
  1109. }
  1110. .emergencys {
  1111. background: #ff3b53 !important;
  1112. width: 124rpx !important;
  1113. }
  1114. .emergency {
  1115. background: #ff3b53 !important;
  1116. }
  1117. .emergency1 {
  1118. background: #49b856 !important;
  1119. }
  1120. .page_item_cont_T {
  1121. min-height: 80rpx;
  1122. max-height: 324rpx;
  1123. font-size: 28rpx;
  1124. padding-top: 16rpx;
  1125. .page_item_cont_title {
  1126. height: 100%;
  1127. float: left;
  1128. }
  1129. .page_item_cont_start {
  1130. text-align: center;
  1131. float: right;
  1132. height: 44rpx;
  1133. width: 104rpx;
  1134. line-height: 44rpx;
  1135. border-radius: 8rpx;
  1136. background: #49b856;
  1137. color: #fff;
  1138. .page_item_cont_start-img {
  1139. width: 22rpx;
  1140. position: relative;
  1141. top: 6rpx;
  1142. margin-right: 8rpx;
  1143. }
  1144. }
  1145. }
  1146. .page_item_conts {
  1147. color: rgb(102, 102, 102);
  1148. padding-left: 18%;
  1149. font-size: 28rpx;
  1150. view {
  1151. margin-bottom: 10rpx;
  1152. }
  1153. text {
  1154. color: #49b856;
  1155. }
  1156. .num {
  1157. float: right;
  1158. }
  1159. }
  1160. .page_item_cont_B {
  1161. padding-top: 20rpx;
  1162. font-size: 28rpx;
  1163. overflow: hidden;
  1164. .page_item_cont_title {
  1165. height: 100%;
  1166. float: left;
  1167. }
  1168. }
  1169. }
  1170. .page_item_btn_wrap {
  1171. display: flex;
  1172. justify-content: space-between;
  1173. .page_item_btn {
  1174. height: 88rpx;
  1175. width: 49%;
  1176. background-image: linear-gradient(to right, #72c172, #3bb197);
  1177. border-radius: 8rpx;
  1178. line-height: 88rpx;
  1179. color: #fff;
  1180. font-size: 36rpx;
  1181. font-weight: 700;
  1182. text-align: center;
  1183. }
  1184. }
  1185. .page_item_btn {
  1186. height: 88rpx;
  1187. background-image: linear-gradient(to right, #72c172, #3bb197);
  1188. border-radius: 8rpx;
  1189. line-height: 88rpx;
  1190. color: #fff;
  1191. font-size: 36rpx;
  1192. font-weight: 700;
  1193. text-align: center;
  1194. }
  1195. }
  1196. .L-l {
  1197. width: 2rpx;
  1198. height: 40rpx;
  1199. background: #f9fafb;
  1200. position: absolute;
  1201. left: 20rpx;
  1202. top: 72rpx;
  1203. display: none;
  1204. }
  1205. .R-l {
  1206. width: 2rpx;
  1207. height: 40rpx;
  1208. background: #f9fafb;
  1209. position: absolute;
  1210. right: 20rpx;
  1211. top: 72rpx;
  1212. display: none;
  1213. }
  1214. }
  1215. }
  1216. }
  1217. .text {
  1218. font-size: 36rpx;
  1219. }
  1220. .wt_icon {
  1221. font-size: 40rpx;
  1222. }
  1223. }
  1224. </style>