receiptpage.vue 40 KB

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