receiptpage.vue 40 KB

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