receiptpage.vue 35 KB

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