receiptpage.vue 64 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867
  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. <view class="page_item_cont_start emergency1" v-if="item.emergencyType.value == 1">
  39. <image mode="widthFix" class="page_item_cont_start-img" src="../../static/img/icon_shandian.png">
  40. </image>
  41. {{ item.emergencyType.name }}
  42. </view>
  43. <view class="page_item_cont_start emergency" v-if="item.emergencyType.value == 2">
  44. <image mode="widthFix" class="page_item_cont_start-img" src="../../static/img/icon_shandian.png">
  45. </image>
  46. {{ item.emergencyType.name }}
  47. </view>
  48. <view class="page_item_cont_start emergencys" v-if="item.emergencyType.value == 3">
  49. <image mode="widthFix" class="page_item_cont_start-img" src="../../static/img/icon_shandian.png">
  50. </image>
  51. {{ item.emergencyType.name }}
  52. </view>
  53. <view class="page_item_top_R type" style="margin-left: 16rpx;">
  54. {{
  55. item.isHalfInspect === 1 ? "半程陪检" : item.taskType.taskName
  56. }}<template v-if="item.goodsRemark">-{{item.goodsRemark}}</template>
  57. </view>
  58. <!-- <text class="L_time" v-if="item.overdueTime">{{ item.overdueTime }}前送达</text> -->
  59. </view>
  60. <view class="page_item_top_R" v-if="
  61. !(
  62. item.taskType.associationType.value == 'inspect' &&
  63. item.gdState.value == 5
  64. )
  65. ">
  66. <text class="text_big">{{ item.gdState.name }}</text>
  67. </view>
  68. <view class="page_item_top_R" v-if="
  69. item.taskType.associationType.value == 'inspect' &&
  70. item.gdState.value == 5
  71. ">
  72. <text class="text_big">待送回</text>
  73. </view>
  74. <!-- <view class="page_item_top_R type">
  75. {{
  76. item.isHalfInspect === 1 ? "半程陪检" : item.taskType.taskName
  77. }}<template v-if="item.goodsRemark">-{{item.goodsRemark}}</template>
  78. </view> -->
  79. </view>
  80. <view class="page_item_cont" @click="itemInfo(item)">
  81. <view class="page_item_cont_T">
  82. <view class="page_item_cont_title">
  83. <text> <text class="starting">起</text> 点科室 </text>
  84. <text class="text_big">{{ item.startDept.dept }}</text>
  85. </view>
  86. <!-- <view class="page_item_cont_start emergency1" v-if="item.emergencyType.value == 1">
  87. <image mode="widthFix" class="page_item_cont_start-img" src="../../static/img/icon_shandian.png">
  88. </image>
  89. {{ item.emergencyType.name }}
  90. </view>
  91. <view class="page_item_cont_start emergency" v-if="item.emergencyType.value == 2">
  92. <image mode="widthFix" class="page_item_cont_start-img" src="../../static/img/icon_shandian.png">
  93. </image>
  94. {{ item.emergencyType.name }}
  95. </view>
  96. <view class="page_item_cont_start emergencys" v-if="item.emergencyType.value == 3">
  97. <image mode="widthFix" class="page_item_cont_start-img" src="../../static/img/icon_shandian.png">
  98. </image>
  99. {{ item.emergencyType.name }}
  100. </view> -->
  101. </view>
  102. <view class="page_item_conts" v-if="item.taskType.associationType.value == 'specimen'">
  103. <view v-if="item.overdueTime">{{ item.overdueTime }}前送达</view>
  104. <view>扫描标本数量 : {{ item.actualReceiveNum || '无'}}</view>
  105. <view class="line"></view>
  106. </view>
  107. <view class="page_item_conts" v-else-if="item.taskType.associationType.value == 'ordinary' && item.taskType.ordinaryField.value == 'blood'">
  108. <view v-if="item.overdueTime">{{ item.overdueTime }}前送达</view>
  109. <view>接收数量 : {{ item.actualReceiveNum || '无'}}</view>
  110. <view class="line"></view>
  111. </view>
  112. <view class="page_item_conts" v-else-if="item.taskType.associationType.value == 'inspect'">
  113. <view v-if="item.overdueTime">{{ item.overdueTime }}前送达</view>
  114. <view>
  115. 预约时间 : {{ item.yyTime | yyTimeFilter
  116. }}<text v-if="item.reservationNumber">({{ item.reservationNumber }})</text>
  117. </view>
  118. <view>
  119. 床号 : {{ item.patient ? item.patient.patientName : "-" }}({{
  120. item.patient ? item.patient.bedNum : "-"
  121. }})
  122. </view>
  123. <view v-if="item.goods">
  124. 携带设备 :
  125. <text>{{ item.goods || "暂无" }}</text>
  126. </view>
  127. <view style="word-break: break-all;" v-if="item.workOrderRemark">
  128. 备注信息 :
  129. <text>{{ item.workOrderRemark || "暂无" }}</text>
  130. </view>
  131. <view v-if="item.patient.careLevel">
  132. 护理等级 :
  133. <text :class="[
  134. item.patient.careLevel.value == 0 ||
  135. item.patient.careLevel.value == 1
  136. ? 'red'
  137. : 'green',
  138. ]">{{ item.patient.careLevel.name }}</text>
  139. </view>
  140. <view v-if="item.patient.illnessState">
  141. 病情级别 :
  142. <text :class="{
  143. red:
  144. item.patient.illnessState.value == 2 ||
  145. item.patient.illnessState.value == 3,
  146. }">{{ item.patient.illnessState.name }}</text>
  147. </view>
  148. <view v-if="item.isAccompany === 1 || item.isAccompany === 0">
  149. 陪同情况 :
  150. <text :class="{ red: item.isAccompany === 1 }">{{
  151. item.isAccompany === 1 ? "需要医护陪同" : "无需医护陪同"
  152. }}</text>
  153. </view>
  154. <view class="line"></view>
  155. </view>
  156. <view class="page_item_conts" v-else-if="item.taskType.associationType.value == 'patientTransport'">
  157. <view v-if="item.overdueTime">{{ item.overdueTime }}前送达</view>
  158. <view>
  159. 预约时间 : {{ item.yyjdTime | yyTimeFilter
  160. }}<text v-if="item.reservationNumber">({{ item.reservationNumber }})</text>
  161. </view>
  162. <view>
  163. 床号 : {{ item.patient ? item.patient.patientName : "-" }}({{
  164. item.patient ? item.patient.bedNum : "-"
  165. }})
  166. </view>
  167. <view v-if="item.goods">
  168. 携带设备 :
  169. <text>{{ item.goods || "暂无" }}</text>
  170. </view>
  171. <view style="word-break: break-all;" v-if="item.workOrderRemark">
  172. 备注信息 :
  173. <text>{{ item.workOrderRemark || "暂无" }}</text>
  174. </view>
  175. <view v-if="item.patient.careLevel">
  176. 护理等级 :
  177. <text :class="[
  178. item.patient.careLevel.value == 0 ||
  179. item.patient.careLevel.value == 1
  180. ? 'red'
  181. : 'green',
  182. ]">{{ item.patient.careLevel.name }}</text>
  183. </view>
  184. <view v-if="item.patient.illnessState">
  185. 病情级别 :
  186. <text :class="{
  187. red:
  188. item.patient.illnessState.value == 2 ||
  189. item.patient.illnessState.value == 3,
  190. }">{{ item.patient.illnessState.name }}</text>
  191. </view>
  192. <view v-if="item.isAccompany === 1 || item.isAccompany === 0">
  193. 陪同情况 :
  194. <text :class="{ red: item.isAccompany === 1 }">{{
  195. item.isAccompany === 1 ? "需要医护陪同" : "无需医护陪同"
  196. }}</text>
  197. </view>
  198. <view class="line"></view>
  199. </view>
  200. <view class="page_item_conts" v-else-if="item.taskType.associationType.value == 'drugsBag'">
  201. <view v-if="item.overdueTime">{{ item.overdueTime }}前送达</view>
  202. <view>
  203. 药包编码 : {{ item.drugs ? item.drugs.packid : "无" }}
  204. </view>
  205. <view class="line"></view>
  206. </view>
  207. <view class="page_item_conts" v-else-if="item.taskType.associationType.value == 'jPBag'">
  208. <view v-if="item.overdueTime">{{ item.overdueTime }}前送达</view>
  209. <view>
  210. 药包编码 :
  211. {{ item.staticDistri ? item.staticDistri.packid : "无" }}
  212. </view>
  213. <view class="line"></view>
  214. </view>
  215. <view class="page_item_conts" v-else>
  216. <view v-if="item.overdueTime">{{ item.overdueTime }}前送达</view>
  217. <view class="line"></view>
  218. </view>
  219. <view class="page_item_cont_B">
  220. <view class="page_item_cont_title" v-if="item.taskType.associationType.value != 'inspect'">
  221. <text> <text class="End">终</text> 点科室 </text>
  222. <text class="text_big" v-for="(dept, i) of item.endDepts" :key="i">{{ dept.dept }}</text>
  223. </view>
  224. <view class="page_item_cont_title" v-if="item.taskType.associationType.value == 'inspect'">
  225. <text> <text class="End">检</text> 查科室 </text>
  226. <text class="text_big" v-for="(dept, i) of item.middleDept" :key="i">{{ dept.dept }}</text>
  227. </view>
  228. </view>
  229. </view>
  230. <view v-if="
  231. item.taskType.associationType.value == 'inspect' ||
  232. item.taskType.associationType.value == 'patientTransport'
  233. ">
  234. <!-- 待抢单 -->
  235. <text class="red" v-if="item.gdState.value == 2">请扫描患者腕带,或者请扫描科室码</text>
  236. <!-- 待到达 -->
  237. <text class="red" v-if="item.gdState.value == 4">请扫描患者腕带</text>
  238. <!-- 执行中 -->
  239. <text class="red" v-if="item.gdState.value == 8">请扫描检查科室码,并扫描患者腕带</text>
  240. <!-- 待送达 -->
  241. <text class="red" v-if="item.gdState.value == 5">请扫描终点科室码,并扫描患者腕带</text>
  242. </view>
  243. <view v-else-if="item.taskType.associationType.value == 'other'">
  244. <!-- 待到达 -->
  245. <text class="red" v-if="item.gdState.value == 4 && item.taskType.carryingCourses[0].checkoutMethod.value == 1">可通过扫描科室码或者拍照进行签到</text>
  246. <text class="red" v-if="item.gdState.value == 4 && item.taskType.carryingCourses[0].checkoutMethod.value == 2">扫描交接人员二维码进行交接</text>
  247. </view>
  248. <!-- 如果不是患者陪检或患者转运或其他,万能交接 -->
  249. <view class="page_item_btn" v-if="
  250. selectedLabelSlots == '执行中' &&
  251. item.taskType.associationType.value != 'patientTransport' &&
  252. item.taskType.associationType.value != 'inspect' &&
  253. item.taskType.associationType.value != 'other' &&
  254. item.taskType.associationType.value != 'ordinary'
  255. " hover-class="seimin-btn-hover">
  256. <smallScreen :sData="item" :sType="2">扫码</smallScreen>
  257. </view>
  258. <!-- 如果不是静配,药配,标本配送,标本轮巡,万能交接 -->
  259. <view class="page_item_btn_wrap" v-if="
  260. selectedLabelSlots == '执行中' &&
  261. item.taskType.associationType.value != 'jPBag' &&
  262. item.taskType.associationType.value != 'drugsBag' &&
  263. item.taskType.associationType.value != 'specimen' &&
  264. item.taskType.associationType.value != 'specimenPlan' &&
  265. item.taskType.associationType.value != 'ordinary'
  266. ">
  267. <view v-if="!(item.taskType.associationType.value == 'other' && item.gdState.value == 5 && item.taskType.carryingCourses[1].actionsSwitch)" class="page_item_btn" hover-class="seimin-btn-hover">
  268. <smallScreen :sData="item" :sType="1">扫码</smallScreen>
  269. </view>
  270. <!-- 其他临床服务-完成工单-待送达 -->
  271. <view v-if="item.taskType.associationType.value == 'other' && item.gdState.value == 5 && item.taskType.carryingCourses[1].actionsSwitch" class="page_item_btn" @click="otherCompleteOrder(item)" hover-class="seimin-btn-hover">完成工单</view>
  272. <!-- 其他临床服务-拍照 -->
  273. <view v-if="item.taskType.associationType.value == 'other' && item.gdState.value == 4 && item.taskType.carryingCourses[0].photoSwitch" class="page_item_btn" @click="photographToOther(item, 'start')" hover-class="seimin-btn-hover">拍照</view>
  274. <view v-if="item.taskType.associationType.value != 'other' && item.gdState.value == 4" class="page_item_btn" @click="photograph(item)" hover-class="seimin-btn-hover">拍照</view>
  275. </view>
  276. <view class="page_item_btn" v-if="selectedLabelSlots == '待接单'" @click="showAlerts(item)" hover-class="seimin-btn-hover">接单</view>
  277. </view>
  278. <view class="L-l"></view>
  279. <view class="R-l"></view>
  280. </view>
  281. </scroll-view>
  282. </view>
  283. <!-- 底部扫一扫 -->
  284. <view class="bigScreenWrap">
  285. <bigScreen ref="bigscreen"></bigScreen>
  286. <view class="more" v-if="arrayBigScreen.length"></view>
  287. <picker class="more_picker" @click.stop @change="execFilterBigScreen($event)" :value="indexBigScreen"
  288. :range="arrayBigScreen" range-key="name" v-if="arrayBigScreen.length">
  289. <view class="uni-input">{{ arrayBigScreen[indexBigScreen].name }}</view>
  290. </picker>
  291. </view>
  292. <!-- 悬浮按钮 -->
  293. <uni-fab :pattern="pattern" :content="content" :direction="direction" @trigger="trigger"></uni-fab>
  294. <!-- 弹窗 -->
  295. <showModel :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content"
  296. @ok="ok" @cancel="cancel" @know="know" :operate="models.operate"></showModel>
  297. <!-- 我的二维码-弹窗 -->
  298. <showMyQrcode v-if="showMyQrcodeModel.disjunctor" :disjunctor="showMyQrcodeModel.disjunctor" @know="closeMyQrcodeModel"></showMyQrcode>
  299. <!-- 手动查询标本弹窗 -->
  300. <handViewSpecimen v-if="speModels.disjunctor" :title="speModels.title" :disjunctor="speModels.disjunctor"
  301. @ok="speOk" @cancel="speCancel">
  302. </handViewSpecimen>
  303. <!-- 手动查询药品弹窗 -->
  304. <handViewDrugsBag v-if="drugbagModels.disjunctor" :title="drugbagModels.title"
  305. :disjunctor="drugbagModels.disjunctor" @ok="drugbagOk" @cancel="drugbagCancel">
  306. </handViewDrugsBag>
  307. <!-- 填写交接人账号弹窗 -->
  308. <selectAccount v-if="hosModels.disjunctor" :title="hosModels.title" :disjunctor="hosModels.disjunctor" @ok="hosOk"
  309. @cancel="hosCancel">
  310. </selectAccount>
  311. </view>
  312. </template>
  313. <script>
  314. import selectAccount from "../../components/selectAccount/selectAccount.vue";
  315. import smallScreen from "../../components/smallScreen/smallScreen.vue";
  316. import showModel from "../../components/showModel/showModel.vue";
  317. import bigScreen from "../../components/bigScreen/bigScreen.vue";
  318. // https://ext.dcloud.net.cn/plugin?id=144
  319. import uniFab from "@/components/uni-fab/uni-fab.vue";
  320. import {
  321. get,
  322. post,
  323. SM,
  324. deleteIt,
  325. webHandle
  326. } from "../../http/http.js";
  327. import {
  328. photographTool,
  329. pathUrl
  330. } from "../../tools/photograph.js";
  331. export default {
  332. data() {
  333. return {
  334. // 填写交接人账号弹窗model
  335. hosModels: {
  336. disjunctor: false,
  337. },
  338. currentCode: '', //当前拍照使用的科室二维码
  339. currentData: {}, //当前小扫描的工单对象
  340. // 弹窗model
  341. showMyQrcodeModel: {
  342. disjunctor: false,
  343. },
  344. SMFlag: true,
  345. // 手动查询标本弹窗model
  346. speModels: {
  347. disjunctor: false,
  348. },
  349. // 手动查询药品弹窗model
  350. drugbagModels: {
  351. disjunctor: false,
  352. },
  353. // 筛选条件
  354. array: [{
  355. id: 0,
  356. name: "全部",
  357. },
  358. {
  359. id: 71,
  360. name: "待到达",
  361. },
  362. {
  363. id: 72,
  364. name: "待送达",
  365. },
  366. {
  367. id: 75,
  368. name: "执行中",
  369. },
  370. ],
  371. // 筛选条件
  372. arrayBigScreen: [],
  373. index: 0,
  374. indexBigScreen: 0,
  375. arrayKey: 0,
  376. arrayKeyBigScreen: 0,
  377. // 当前登录人是否是药房角色
  378. pharmacistFlag: false,
  379. // 抢单的id
  380. qdId: "",
  381. // 弹窗model
  382. models: {
  383. disjunctor: false,
  384. },
  385. // 悬浮按钮样式
  386. pattern: {
  387. buttonColor: "#6cc076",
  388. },
  389. // 悬浮按钮展开菜单显示方式
  390. direction: "vertical",
  391. // 悬浮按钮展开菜单内容配置项
  392. content: [{
  393. text: "我的任务",
  394. }, ],
  395. // 当前选中tab页名称
  396. selectedLabelSlots: "待接单",
  397. // tab页信息
  398. tabs: [{
  399. label: "待接单", //tab页名称
  400. value: "1", //值
  401. num: 0, //数量
  402. },
  403. {
  404. label: "执行中",
  405. value: "2",
  406. num: 0,
  407. },
  408. ],
  409. //列表数据
  410. zxzData: [],
  411. //分页页码
  412. idx: 0,
  413. // 列表项总数
  414. totalNum: -1,
  415. triggered: false, //下拉刷新状态
  416. freshing: false, //上拉加载开关
  417. scroll_top: 0, //距离顶部的距离
  418. scroll_refresher_enabled: true, //是否开启自定义下拉刷新
  419. };
  420. },
  421. filters: {
  422. // 自定义管道 yyTime
  423. yyTimeFilter: function(data) {
  424. if (data) {
  425. let nDate = null;
  426. if (typeof data == 'string') {
  427. let arr = data.split(/[-:\s]/);
  428. nDate = new Date(
  429. arr[0] - 0,
  430. arr[1] - 1,
  431. arr[2] - 0,
  432. arr[3] - 0,
  433. arr[4] - 0,
  434. 0
  435. );
  436. } else if (typeof data == 'number') {
  437. nDate = new Date(data);
  438. }
  439. const month = (nDate.getMonth() + 1).toString().padStart(2, 0);
  440. const date = nDate.getDate().toString().padStart(2, 0);
  441. const hour = nDate.getHours().toString().padStart(2, 0);
  442. const minute = nDate.getMinutes().toString().padStart(2, 0);
  443. return `${month}-${date} ${hour}:${minute}`;
  444. } else {
  445. return "-";
  446. }
  447. },
  448. },
  449. components: {
  450. uniFab,
  451. showModel,
  452. bigScreen,
  453. selectAccount,
  454. },
  455. methods: {
  456. // 前往其他临床服务完成工单确认页面
  457. otherCompleteOrder(data){
  458. console.log(data);
  459. uni.navigateTo({
  460. url: `../otherCompleteOrder/otherCompleteOrder?orderId=${data.id}&taskType=${data.taskType ? encodeURIComponent(JSON.stringify(data.taskType)) : ''}&order=${data ? encodeURIComponent(JSON.stringify(data)) : ''}`,
  461. });
  462. },
  463. // 手动查询药品-确认
  464. drugbagOk(data) {
  465. console.log(data);
  466. if (!data.id) {
  467. //没有查询到药品
  468. uni.showModal({
  469. title: '提示',
  470. content: "没有查询到发药单号!",
  471. showCancel: false,
  472. success: function(res) {
  473. if (res.confirm) {
  474. console.log('用户点击确定');
  475. } else if (res.cancel) {
  476. console.log('用户点击取消');
  477. }
  478. }
  479. });
  480. return;
  481. }
  482. this.drugbagModels.disjunctor = false;
  483. uni.navigateTo({
  484. url: `/pages/scanning_drug/scanning_drug?drugsBagId=${data.id}`,
  485. });
  486. },
  487. // 手动查询药品-取消
  488. drugbagCancel() {
  489. this.drugbagModels.disjunctor = false;
  490. },
  491. // 手动查询药品弹窗
  492. showHandViewDrugsbag() {
  493. console.log(1)
  494. this.drugbagModels = {
  495. title: '填写发药单号',
  496. disjunctor: true,
  497. }
  498. },
  499. // 手动查询标本-确认
  500. speOk(data) {
  501. console.log(data);
  502. if (!data.id) {
  503. //没有查询到标本
  504. uni.showModal({
  505. title: '提示',
  506. content: "没有查询到标本!",
  507. showCancel: false,
  508. success: function(res) {
  509. if (res.confirm) {
  510. console.log('用户点击确定');
  511. } else if (res.cancel) {
  512. console.log('用户点击取消');
  513. }
  514. }
  515. });
  516. return;
  517. }
  518. this.speModels.disjunctor = false;
  519. let infoDATA = {
  520. stype: data.stype,
  521. scode: data.scode,
  522. patientName: data.patientName,
  523. sickRoom: data.sickRoom ?
  524. data.sickRoom.dept : "-",
  525. checkDept: data.checkDept ?
  526. data.checkDept.dept : "-",
  527. bedNum: data.bedNum,
  528. };
  529. uni.navigateTo({
  530. url: `../scanning_B/scanning_B?res=${encodeURIComponent(
  531. JSON.stringify({data,status:666,scanCodeSpecimenOrderSign:data.scanCodeSpecimenOrderSign,workOrder:data.workOrderDTO})
  532. )}&infoDATA=${encodeURIComponent(
  533. JSON.stringify(infoDATA)
  534. )}`,
  535. });
  536. },
  537. // 手动查询标本-取消
  538. speCancel() {
  539. this.speModels.disjunctor = false;
  540. },
  541. // 手动查询标本弹窗
  542. showHandViewSpecimen() {
  543. this.speModels = {
  544. title: '填写标本编码',
  545. disjunctor: true,
  546. }
  547. },
  548. // 执行中筛选
  549. execFilter({
  550. detail: {
  551. value
  552. }
  553. }) {
  554. this.index = value;
  555. this.arrayKey = this.array[value].id;
  556. this.zxzData = [];
  557. this.totalNum = -1;
  558. this.idx = 0;
  559. this.selectedLabelSlots = "执行中";
  560. this.executingOrders(0);
  561. },
  562. // 大扫描筛选
  563. execFilterBigScreen({
  564. detail: {
  565. value
  566. }
  567. }) {
  568. this.indexBigScreen = value;
  569. this.arrayKeyBigScreen = this.arrayBigScreen[value].id;
  570. console.log(this.arrayKeyBigScreen);
  571. console.log(this.$refs.bigscreen);
  572. this.$refs.bigscreen.Scanning(this.arrayKeyBigScreen);
  573. },
  574. // 获取科室二维码设置开关
  575. getMenu() {
  576. let menu = uni.getStorageSync("userData").menu;
  577. //判断当前登陆人具体角色 start
  578. let roles = uni.getStorageSync("userData").user.role;
  579. this.pharmacistFlag = roles.some(
  580. (item) => item.rolecode === "pharmacist"
  581. );
  582. //判断当前登陆人具体角色 end
  583. console.log(menu);
  584. this.arrayBigScreen = [];
  585. menu.forEach((item) => {
  586. if (item.link === "wxInspect") {
  587. this.content.push({
  588. text: "检查信息",
  589. });
  590. } else if (item.link === "wxPatient") {
  591. this.content.push({
  592. text: "患者信息",
  593. });
  594. } else if (item.link === "wxPharmacy") {
  595. // 如果是配药师人员,则增加药房
  596. if (this.pharmacistFlag) {
  597. this.content.push({
  598. text: "药房",
  599. });
  600. }
  601. } else if (item.link === "wxCode") {
  602. this.content.push({
  603. text: "二维码设置",
  604. });
  605. } else if (item.link === "wxSpecimenEntry") {
  606. this.content.push({
  607. text: "标本录入",
  608. });
  609. } else if (item.link === "wxDrugsbagEntry") {
  610. this.content.push({
  611. text: "药品录入",
  612. });
  613. } else if (item.link === "wxTakeMedicine") {
  614. this.content.push({
  615. text: "摆药取药",
  616. });
  617. } else if (item.link === "myQrcode") {
  618. this.content.push({
  619. text: "我的二维码",
  620. });
  621. } else if (item.link === "formManagementWechat") {
  622. this.content.push({
  623. text: "查看表单",
  624. });
  625. } else if (item.link === "BIAOBEN") {
  626. this.arrayBigScreen.push({
  627. id: 'BIAOBEN|$|',
  628. name: "标本",
  629. });
  630. } else if (item.link === "YAOPING") {
  631. this.arrayBigScreen.push({
  632. id: 'YAOPING|$|',
  633. name: "药品",
  634. });
  635. } else if (item.link === "HUANZHE") {
  636. this.arrayBigScreen.push({
  637. id: 'HUANZHE|$|',
  638. name: "患者",
  639. });
  640. } else if (item.link === "XIEZHIPING") {
  641. this.arrayBigScreen.push({
  642. id: 'XIEZHIPING|$|',
  643. name: "血制品",
  644. });
  645. } else if (item.link === "KJJD") {
  646. this.arrayBigScreen.push({
  647. id: 'KJJD|$|',
  648. name: "快捷建单",
  649. });
  650. }
  651. });
  652. },
  653. // 拍照
  654. photograph(data) {
  655. photographTool(data);
  656. },
  657. // 如果不是静配,药配,标本配送,标本轮巡
  658. // 科室签到(小扫描)-拍照
  659. nextDeptOrder_ss(data, accountObj) {
  660. console.log(this.currentCode);
  661. let isKs = 0;
  662. let ids = [];
  663. let id = data.id;
  664. ids.push(id);
  665. let list = {
  666. code: "",
  667. ids: ids,
  668. };
  669. let code = "";
  670. let type = "";
  671. if (this.currentCode) {
  672. let gdStateValue = data.gdState.value; //工单状态value
  673. let associationTypeValue = data.taskType.associationType.value; //关联类型value
  674. // 其他临床服务,并且工单状态是待到达||工单状态待送达
  675. if (
  676. (associationTypeValue == "other" &&
  677. gdStateValue == "4") ||
  678. gdStateValue == "5"
  679. ) {
  680. code = this.currentCode;
  681. type = "orderSign/" + code;
  682. list = {
  683. ids
  684. };
  685. if (accountObj) {
  686. list.handover = [accountObj.accountId];
  687. }
  688. isKs = 1;
  689. }
  690. uni.showLoading({
  691. title: "加载中",
  692. mask: true,
  693. });
  694. post("/workerOrder/" + type, list).then((res) => {
  695. uni.hideLoading();
  696. if (res) {
  697. if (res.status == 200) {
  698. if (
  699. gdStateValue == "4" &&
  700. associationTypeValue == "other"
  701. ) {
  702. uni.navigateTo({
  703. url: `../../pages/scanning_code/scanning_code?type=${associationTypeValue}&type1=${res.type}&id=${data.id}&deptCode=${code}&dept=${res.dept}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}`,
  704. });
  705. }
  706. if (gdStateValue == "5") {
  707. uni.navigateTo({
  708. url: `../../pages/scanning_code/scanning_code?type=${associationTypeValue}&type1=${res.type}&id=${data.id}&deptCode=${code}&dept=${res.dept}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}`,
  709. });
  710. }
  711. } else {
  712. uni.navigateTo({
  713. url: `../../pages/scanning_Result/scanning_Result?type=${
  714. associationTypeValue
  715. }&type1=${res.type}&id=${data.id}&status=600&msg=${
  716. res.msg
  717. }&isKs=${isKs}&model=${encodeURIComponent(
  718. JSON.stringify(res)
  719. )}&qrcode=${this.currentCode}`,
  720. });
  721. }
  722. } else {
  723. uni.navigateTo({
  724. url: `../../pages/scanning_Result/scanning_Result?id=${data.id}&status=600&msg=扫码失败!请扫描正确的二维码!&isKs=${isKs}&qrcode=${this.currentCode}`,
  725. });
  726. }
  727. });
  728. }
  729. },
  730. // 填写交接人账号-确认
  731. hosOk(data) {
  732. console.log(data);
  733. const {
  734. accountName,
  735. account,
  736. accountId
  737. } = data;
  738. if (!accountName && !account) {
  739. //没有填写交接人
  740. uni.showModal({
  741. title: '提示',
  742. content: "请填写交接人账号!",
  743. showCancel: false,
  744. success: function(res) {
  745. if (res.confirm) {
  746. console.log('用户点击确定');
  747. } else if (res.cancel) {
  748. console.log('用户点击取消');
  749. }
  750. }
  751. });
  752. return;
  753. } else if (!accountName && account || accountName && !account) {
  754. //没有填写交接人
  755. uni.showModal({
  756. title: '提示',
  757. content: "请填写正确的交接人账号!",
  758. showCancel: false,
  759. success: function(res) {
  760. if (res.confirm) {
  761. console.log('用户点击确定');
  762. } else if (res.cancel) {
  763. console.log('用户点击取消');
  764. }
  765. }
  766. });
  767. return;
  768. }
  769. this.hosModels.disjunctor = false;
  770. let associationTypeValue = this.currentData.taskType.associationType.value;
  771. console.log(associationTypeValue)
  772. this.uploadToOther(this.currentData, data, 'start');
  773. },
  774. // 填写交接人账号-取消
  775. hosCancel() {
  776. this.hosModels.disjunctor = false;
  777. },
  778. // 填写交接人账号弹窗
  779. showSelectAccount() {
  780. this.hosModels = {
  781. title: '填写交接人账号',
  782. disjunctor: true,
  783. }
  784. },
  785. // 拍照-上传
  786. uploadToOther(data, accountObj, type){
  787. // 其他临床服务拍照签到
  788. console.log(data, 1111);
  789. let id_seimin;
  790. let asTypeValue_seimin;
  791. let gdStateValue_seimin;
  792. if (data.status != 200 && data.status !== undefined) {
  793. id_seimin = data.id;
  794. asTypeValue_seimin = data.type;
  795. gdStateValue_seimin = JSON.parse(data.model).gdstate2; //type改成gdstate
  796. } else {
  797. id_seimin = data.id;
  798. asTypeValue_seimin = data.taskType.associationType.value;
  799. gdStateValue_seimin = data.gdState.value;
  800. }
  801. //#ifdef H5
  802. uni.chooseImage({
  803. count: 1,
  804. sourceType: ['camera'],
  805. success: (chooseImageRes) => {
  806. console.log(chooseImageRes, pathUrl)
  807. const tempFilePaths = chooseImageRes.tempFilePaths;
  808. const tempFiles = chooseImageRes.tempFiles;
  809. let tp = tempFilePaths[0];
  810. uni.showLoading({
  811. mask: true,
  812. title: '加载中'
  813. });
  814. post('/workerOrder/findRecordInfoByOrderId', {
  815. orderId: id_seimin,
  816. gdOperate: 21,
  817. }).then(result => {
  818. console.log(result)
  819. if (result.state == 200) {
  820. uni.getImageInfo({
  821. src: tp,
  822. success: (res) => {
  823. console.log('压缩前', res)
  824. let canvasWidth = res.width //图片原始长宽
  825. let canvasHeight = res.height
  826. let img = new Image()
  827. img.src = res.path
  828. let canvas = document.createElement('canvas');
  829. let ctx = canvas.getContext('2d')
  830. canvas.width = canvasWidth
  831. canvas.height = canvasHeight
  832. ctx.drawImage(img, 0, 0, canvasWidth, canvasHeight)
  833. canvas.toBlob((fileSrc) => {
  834. tp = window.URL.createObjectURL(fileSrc)
  835. console.log('压缩后', tp);
  836. uni.uploadFile({
  837. url: pathUrl + '/common/common/uploadAttachment/'+(type == 'start' ? 'orderStartPhoto' : 'orderEndPhoto')+'/' + id_seimin + '/' + result.recordId,
  838. filePath: tp,
  839. name: 'file',
  840. formData: {
  841. 'filename': tempFiles[0].name ? tempFiles[0].name.split('.')[0] + '.jpg' : tempFiles[
  842. 0].path.split(
  843. /[\\/]/).reverse()[0].split('.')[0] + '.jpg'
  844. },
  845. success: (uploadFileRes) => {
  846. console.log(uploadFileRes, 10086, asTypeValue_seimin);
  847. this.nextDeptOrder_ss(data, accountObj, type);
  848. },
  849. fail: err => {
  850. console.error(err);
  851. uni.hideLoading();
  852. uni.showToast({
  853. icon: 'none',
  854. title: '上传失败',
  855. duration: 2000
  856. });
  857. }
  858. });
  859. }, 'image/jpeg', 0.3)
  860. },
  861. fail: function () {
  862. uni.hideLoading();
  863. uni.showToast({
  864. icon: 'none',
  865. title: '上传失败',
  866. duration: 2000
  867. });
  868. }
  869. })
  870. } else {
  871. uni.hideLoading();
  872. uni.showToast({
  873. icon: "none",
  874. title: "请求失败!",
  875. });
  876. }
  877. })
  878. }
  879. });
  880. //#endif
  881. //#ifdef APP-PLUS
  882. uni.chooseImage({
  883. count: 1,
  884. sourceType: ['camera'],
  885. sizeType: ['compressed'],
  886. success: (chooseImageRes) => {
  887. console.log(chooseImageRes, pathUrl)
  888. const tempFilePaths = chooseImageRes.tempFilePaths;
  889. const tempFiles = chooseImageRes.tempFiles;
  890. let tp = tempFilePaths[0];
  891. uni.showLoading({
  892. mask: true,
  893. title: '加载中'
  894. });
  895. post('/workerOrder/findRecordInfoByOrderId', {
  896. orderId: id_seimin,
  897. gdOperate: 21,
  898. }).then(result => {
  899. console.log(result)
  900. if (result.state == 200) {
  901. uni.compressImage({
  902. src: tp,
  903. quality: 30,
  904. success: (res) => {
  905. console.log('压缩前', res)
  906. tp = res.tempFilePath;
  907. console.log('压缩后', tp);
  908. uni.uploadFile({
  909. url: pathUrl + '/common/common/uploadAttachment/'+(type == 'start' ? 'orderStartPhoto' : 'orderEndPhoto')+'/' + id_seimin + '/' + result.recordId,
  910. filePath: tp,
  911. name: 'file',
  912. formData: {
  913. 'filename': tempFiles[0].name ? tempFiles[0].name.split('.')[0] + '.jpg' : tempFiles[
  914. 0].path.split(
  915. /[\\/]/).reverse()[0].split('.')[0] + '.jpg'
  916. },
  917. success: (uploadFileRes) => {
  918. console.log(uploadFileRes, 10086, asTypeValue_seimin);
  919. this.nextDeptOrder_ss(data, accountObj, type);
  920. },
  921. fail: err => {
  922. console.error(err);
  923. uni.hideLoading();
  924. uni.showToast({
  925. icon: 'none',
  926. title: '上传失败',
  927. duration: 2000
  928. });
  929. }
  930. });
  931. },
  932. fail: function () {
  933. uni.hideLoading();
  934. uni.showToast({
  935. icon: 'none',
  936. title: '上传失败',
  937. duration: 2000
  938. });
  939. }
  940. })
  941. } else {
  942. uni.hideLoading();
  943. uni.showToast({
  944. icon: "none",
  945. title: "请求失败!",
  946. });
  947. }
  948. })
  949. }
  950. });
  951. //#endif
  952. },
  953. // 拍照-其他
  954. async photographToOther(data, type) {
  955. this.currentData = data;
  956. uni.showLoading({
  957. title: "加载中",
  958. mask: true,
  959. });
  960. // 其他临床服务
  961. let result = await post("/dept/scanning", {
  962. content: type === 'start' ? data.startDept.qrcode : data.endDepts[0].qrcode,
  963. taskTypeId: data.taskType.id,
  964. gdState: data.gdState.id,
  965. });
  966. uni.hideLoading();
  967. this.currentCode = result.code;
  968. if (result.state == 200 || result.state == 201) {
  969. uni.showModal({
  970. title: '提示',
  971. content: '请尽量拍摄角度覆盖清洁区域?',
  972. success: (res) => {
  973. if (res.confirm) {
  974. if (result.account) {
  975. this.uploadToOther(data, {
  976. account: result.account,
  977. accountName: result.name,
  978. accountId: result.id,
  979. }, type);
  980. } else {
  981. this.uploadToOther(data, undefined, type);
  982. }
  983. } else if (res.cancel) {
  984. console.log('用户点击取消');
  985. }
  986. }
  987. });
  988. } else if (result.state == '0000') {
  989. this.showSelectAccount();
  990. } else {
  991. uni.showToast({
  992. icon: "none",
  993. title: "请求失败!",
  994. });
  995. }
  996. },
  997. // 悬浮按钮点击事件
  998. trigger(e) {
  999. if (e.item.text === "我的任务") {
  1000. uni.navigateTo({
  1001. url: "../mypage/mypage",
  1002. });
  1003. } else if (e.item.text === "退出登录") {
  1004. // 假登录
  1005. uni.showToast({
  1006. title: "退出成功!",
  1007. });
  1008. let ip = uni.getStorageSync("ip"); //记住域名或ip
  1009. let username = uni.getStorageSync("username"); //记住用户名
  1010. let password = uni.getStorageSync("password"); //记住密码
  1011. let savePasswordTime = uni.getStorageSync("savePasswordTime"); //记住密码的时间戳
  1012. let clientid = uni.getStorageSync("clientid");
  1013. uni.clearStorageSync();
  1014. if (username) {
  1015. uni.setStorageSync("ip", ip); //记住域名或ip
  1016. uni.setStorageSync("username", username); //记住用户名
  1017. uni.setStorageSync("password", password); //记住密码
  1018. uni.setStorageSync("savePasswordTime", savePasswordTime); //记住密码的时间戳
  1019. }
  1020. uni.setStorageSync("clientid", clientid);
  1021. uni.navigateTo({
  1022. url: "../homePage/homePage",
  1023. });
  1024. // 假登录
  1025. deleteIt("/auth/logout2").then((result) => {
  1026. if (result.status == 200) {
  1027. uni.showToast({
  1028. title: "退出成功!",
  1029. });
  1030. let ip = uni.getStorageSync("ip"); //记住域名或ip
  1031. let username = uni.getStorageSync("username"); //记住用户名
  1032. let password = uni.getStorageSync("password"); //记住密码
  1033. let clientid = uni.getStorageSync("clientid");
  1034. uni.clearStorageSync();
  1035. uni.setStorageSync("ip", ip); //记住域名或ip
  1036. uni.setStorageSync("username", username); //记住用户名
  1037. uni.setStorageSync("password", password); //记住密码
  1038. uni.setStorageSync("clientid", clientid);
  1039. uni.navigateTo({
  1040. url: "../homePage/homePage",
  1041. });
  1042. } else {
  1043. uni.showToast({
  1044. icon: "none",
  1045. title: "请求失败!",
  1046. });
  1047. }
  1048. });
  1049. } else if (e.item.text === "药房") {
  1050. uni.navigateTo({
  1051. url: "../pharmacy/pharmacy",
  1052. });
  1053. } else if (e.item.text === "患者信息") {
  1054. uni.navigateTo({
  1055. url: "../patientInformationList/patientInformationList",
  1056. });
  1057. } else if (e.item.text === "负责科室") {
  1058. if (uni.getStorageSync("setDepts")) {
  1059. uni.removeStorageSync("setDepts"); //清空选择的科室,初始化
  1060. }
  1061. let obj = uni.getStorageSync("setDeptConfg");
  1062. uni.navigateTo({
  1063. url: `../setDept/setDept?configName=${obj.configName}&id=${obj.id}&changedept=1`,
  1064. });
  1065. } else if (e.item.text === "检查信息") {
  1066. uni.navigateTo({
  1067. url: "../inspectList/inspectList",
  1068. });
  1069. } else if (e.item.text === "二维码设置") {
  1070. uni.navigateTo({
  1071. url: "../settingCode/settingCode",
  1072. });
  1073. } else if (e.item.text === "标本录入") {
  1074. this.showHandViewSpecimen();
  1075. } else if (e.item.text === "药品录入") {
  1076. this.showHandViewDrugsbag();
  1077. } else if (e.item.text === "摆药取药") {
  1078. this.handleTakeMedicine()
  1079. } else if (e.item.text === "我的二维码") {
  1080. this.myQrcodeHandler()
  1081. } else if (e.item.text === "查看表单") {
  1082. uni.navigateTo({
  1083. url: "../formManagementWechat/formManagementWechat",
  1084. });
  1085. }
  1086. },
  1087. // 我的二维码
  1088. myQrcodeHandler(){
  1089. this.showMyQrcodeModel = {
  1090. disjunctor: true,
  1091. };
  1092. },
  1093. closeMyQrcodeModel(){
  1094. this.showMyQrcodeModel.disjunctor = false;
  1095. },
  1096. // 摆药取药
  1097. handleTakeMedicine() {
  1098. if (!this.SMFlag) {
  1099. return;
  1100. }
  1101. this.SMFlag = false;
  1102. SM().then((content) => {
  1103. uni.showLoading({
  1104. title: "加载中",
  1105. mask: true,
  1106. });
  1107. //检验二维码的有效性(扫码前必须验证)
  1108. post("/dept/scanning", {
  1109. content,
  1110. })
  1111. .then((result) => {
  1112. this.currentCode = result.code;
  1113. this.SMFlag = true;
  1114. // 200检测通过,201没有有效期也通过。
  1115. if (result.state == 200 || result.state == 201) {
  1116. uni.hideLoading();
  1117. uni.navigateTo({
  1118. url: `../promptPage/promptPage?code=${result.code}`,
  1119. });
  1120. } else {
  1121. uni.hideLoading();
  1122. uni.showToast({
  1123. icon: "none",
  1124. title: '请求失败',
  1125. });
  1126. }
  1127. })
  1128. }).catch(err => {
  1129. this.SMFlag = true;
  1130. });
  1131. },
  1132. // 点击tab页切换
  1133. clickHandler(key) {
  1134. this.selectedLabelSlots = key;
  1135. this.idx = 0;
  1136. this.totalNum = -1;
  1137. // this.zxzData = [];
  1138. this.scroll_top = Math.random(); //回到顶部
  1139. if (key === "待接单") {
  1140. this.waitingOrders(0);
  1141. } else if (key === "执行中") {
  1142. this.executingOrders(0);
  1143. }
  1144. },
  1145. // 进入详情页
  1146. itemInfo(workOrder) {
  1147. console.log(workOrder);
  1148. uni.navigateTo({
  1149. url: `../receipt_infopage/receipt_infopage?id=${workOrder.id}&associationTypeValue=${workOrder.taskType.associationType.value}&associationTypeId=${workOrder.taskType.associationType.id}&taskTypeId=${workOrder.taskType.id}`,
  1150. });
  1151. },
  1152. //抢单后知道了
  1153. know() {
  1154. this.models.disjunctor = false;
  1155. this.idx = 0;
  1156. this.totalNum = -1;
  1157. // this.zxzData = [];
  1158. this.executingOrdersGetNum();
  1159. this.waitingOrders(0); //seimin
  1160. this.scroll_top = Math.random(); //回到顶部
  1161. },
  1162. //抢单确定
  1163. ok() {
  1164. this.models.disjunctor = false;
  1165. get("/workerOrder/takeOrder/" + this.qdId.id).then((res) => {
  1166. let msg = "接单失败";
  1167. let icon = "error";
  1168. if (res.status == 200) {
  1169. msg = "接单成功";
  1170. icon = "success";
  1171. }
  1172. this.models = {
  1173. disjunctor: true,
  1174. content: msg,
  1175. icon: icon,
  1176. operate: {
  1177. know: "知道了",
  1178. },
  1179. };
  1180. });
  1181. },
  1182. //抢单取消
  1183. cancel() {
  1184. this.models.disjunctor = false;
  1185. },
  1186. // 抢单
  1187. showAlerts(data) {
  1188. this.qdId = data;
  1189. this.models = {
  1190. disjunctor: true,
  1191. title: "提示",
  1192. content: "是否确定接单?",
  1193. icon: "warn",
  1194. operate: {
  1195. ok: "确定",
  1196. cancel: "取消",
  1197. },
  1198. };
  1199. },
  1200. //执行中列表数据获取
  1201. executingOrders(idx) {
  1202. console.log(this.zxzData.length, this.totalNum);
  1203. if (this.zxzData.length == this.totalNum) {
  1204. uni.showToast({
  1205. icon: "none",
  1206. title: "没有更多数据了!",
  1207. });
  1208. this.freshing = true;
  1209. return;
  1210. }
  1211. let data = {
  1212. idx,
  1213. sum: 20,
  1214. };
  1215. if (this.arrayKey) {
  1216. data.keyWord = this.arrayKey;
  1217. } else {
  1218. delete data.keyWord;
  1219. }
  1220. uni.showLoading({
  1221. title: "加载中",
  1222. mask: true,
  1223. });
  1224. post("/workerOrder/executingOrders", data).then((res) => {
  1225. uni.hideLoading();
  1226. if (res.status == 200) {
  1227. this.triggered = false;
  1228. this.freshing = true;
  1229. this.totalNum = res.data.resultCount;
  1230. if (idx === 0) {
  1231. this.zxzData = res.data.data;
  1232. } else {
  1233. this.zxzData.push(...res.data.data);
  1234. }
  1235. this.tabs[1].num = res.data.resultCount;
  1236. } else {
  1237. uni.showToast({
  1238. icon: "none",
  1239. title: "请求失败!",
  1240. });
  1241. }
  1242. });
  1243. },
  1244. //待抢单列表数据获取
  1245. waitingOrders(idx) {
  1246. if (this.zxzData.length == this.totalNum) {
  1247. uni.showToast({
  1248. icon: "none",
  1249. title: "没有更多数据了!",
  1250. });
  1251. this.freshing = true;
  1252. return;
  1253. }
  1254. let data = {
  1255. idx,
  1256. sum: 20,
  1257. };
  1258. uni.showLoading({
  1259. title: "加载中",
  1260. mask: true,
  1261. });
  1262. // 请求列表数据
  1263. post("/workerOrder/waitingOrders", data).then((res) => {
  1264. uni.hideLoading();
  1265. if (res.status == 200) {
  1266. this.triggered = false;
  1267. this.freshing = true;
  1268. this.totalNum = res.data.resultCount;
  1269. if (idx === 0) {
  1270. this.zxzData = res.data.data;
  1271. } else {
  1272. this.zxzData.push(...res.data.data);
  1273. }
  1274. this.tabs[0].num = res.data.resultCount;
  1275. } else {
  1276. uni.showToast({
  1277. icon: "none",
  1278. title: "请求失败!",
  1279. });
  1280. }
  1281. });
  1282. },
  1283. //刷新
  1284. refresherrefresh() {
  1285. if (this.triggered) {
  1286. return;
  1287. }
  1288. this.triggered = true;
  1289. this.idx = 0;
  1290. this.totalNum = -1;
  1291. if (this.selectedLabelSlots == "待接单") {
  1292. this.waitingOrders(0);
  1293. } else if (this.selectedLabelSlots == "执行中") {
  1294. this.executingOrders(0);
  1295. }
  1296. },
  1297. // 滚动
  1298. scroll(e) {
  1299. if (e.detail.scrollTop < 20) {
  1300. this.scroll_refresher_enabled = true;
  1301. } else {
  1302. this.scroll_refresher_enabled = false;
  1303. }
  1304. },
  1305. // 下拉刷新复位
  1306. refresherrestore() {
  1307. this.triggered = false;
  1308. console.log("下拉刷新复位");
  1309. },
  1310. //下拉刷新中止
  1311. refresherabort() {
  1312. this.triggered = false;
  1313. console.log("下拉刷新中止");
  1314. },
  1315. //分页,上拉加载
  1316. scrolltolower() {
  1317. if (this.freshing) {
  1318. this.freshing = false;
  1319. if (this.selectedLabelSlots == "待接单") {
  1320. this.waitingOrders(++this.idx);
  1321. } else if (this.selectedLabelSlots == "执行中") {
  1322. this.executingOrders(++this.idx);
  1323. }
  1324. }
  1325. },
  1326. // 执行中获取数字
  1327. executingOrdersGetNum() {
  1328. let data = {
  1329. idx: 0,
  1330. sum: 20,
  1331. };
  1332. if (this.arrayKey) {
  1333. data.keyWord = this.arrayKey;
  1334. } else {
  1335. delete data.keyWord;
  1336. }
  1337. post("/workerOrder/executingOrders", data).then((res) => {
  1338. if (res.status == 200) {
  1339. this.tabs[1].num = res.data.resultCount;
  1340. } else {
  1341. uni.showToast({
  1342. icon: "none",
  1343. title: "请求失败!",
  1344. });
  1345. }
  1346. });
  1347. },
  1348. // 待接单获取数字
  1349. waitingOrdersGetNum() {
  1350. let data = {
  1351. idx: 0,
  1352. sum: 20,
  1353. };
  1354. post("/workerOrder/waitingOrders", data).then((res) => {
  1355. if (res.status == 200) {
  1356. this.tabs[0].num = res.data.resultCount;
  1357. } else {
  1358. uni.showToast({
  1359. icon: "none",
  1360. title: "请求失败!",
  1361. });
  1362. }
  1363. });
  1364. },
  1365. // 阻止浏览器滑动
  1366. stop(e) {
  1367. e.preventDefault();
  1368. },
  1369. },
  1370. onLoad() {
  1371. // 获取菜单权限
  1372. this.getMenu();
  1373. post("/auth/getUserWorkDept", {}).then((ress) => {
  1374. if (ress.status == 200) {
  1375. let userId = uni.getStorageSync("userData").user.id;
  1376. let groupManager = ress.settings && ress.settings.groupManager; //当前工作组合选择的组
  1377. let workType = ress.settings ? ress.settings.workType : -1; //1是综合,2是自主
  1378. let ruleType = ress.settings ? ress.settings.ruleType : -1; //3是科室绑定人员,4是科室绑定分组,2是绑定分组
  1379. if (workType == 2 && (ruleType == 3 || (ruleType == 4 && userId == groupManager.manager))) {
  1380. //自选排班,科室绑定分组,当前登陆人是组长
  1381. this.content.unshift({
  1382. text: "负责科室",
  1383. });
  1384. }
  1385. }
  1386. });
  1387. // let setDeptConfg = uni.getStorageSync("setDeptConfg");
  1388. // let manager = uni.getStorageSync("manager");
  1389. // let userId = uni.getStorageSync("userData").user.id;
  1390. // console.log(setDeptConfg, manager, userId);
  1391. // if (
  1392. // setDeptConfg.workSchemeType == 2 &&
  1393. // (setDeptConfg.ruleType == 3 ||
  1394. // (setDeptConfg.ruleType == 4 && userId == manager))
  1395. // ) {
  1396. // //自选排班,科室绑定人员 || 科室绑定分组 && 组长是当前登陆人
  1397. // this.content.unshift({
  1398. // text: "负责科室",
  1399. // });
  1400. // }
  1401. // #ifdef APP-PLUS
  1402. // this.content.push({
  1403. // text: "退出登录",
  1404. // });
  1405. // #endif
  1406. this.selectedLabelSlots = "执行中";
  1407. this.waitingOrdersGetNum();
  1408. this.executingOrders(0);
  1409. // #ifdef APP-PLUS
  1410. webHandle("no", "app");
  1411. // #endif
  1412. // #ifdef H5
  1413. webHandle("no", "wx");
  1414. // #endif
  1415. },
  1416. onShow() {
  1417. this.SMFlag = true;
  1418. // #ifdef H5
  1419. document.body.addEventListener("touchmove", this.stop, {
  1420. passive: false,
  1421. });
  1422. // #endif
  1423. },
  1424. onHide() {
  1425. // #ifdef H5
  1426. document.body.removeEventListener("touchmove", this.stop, {
  1427. passive: false,
  1428. });
  1429. // #endif
  1430. },
  1431. };
  1432. </script>
  1433. <style lang="less">
  1434. .Receiptpage {
  1435. width: 100%;
  1436. height: 100%;
  1437. position: relative;
  1438. .more {
  1439. position: absolute;
  1440. right: 20rpx;
  1441. width: 40rpx;
  1442. height: 4rpx;
  1443. border-top: 2px solid #49b856;
  1444. border-bottom: 2px solid #49b856;
  1445. background-color: #49b856;
  1446. padding: 5px 0;
  1447. background-clip: content-box;
  1448. z-index: 9999;
  1449. top: 50%;
  1450. transform: translateY(-50%);
  1451. }
  1452. .more_picker {
  1453. position: absolute;
  1454. right: 0;
  1455. height: 100%;
  1456. opacity: 0;
  1457. z-index: 9999;
  1458. }
  1459. .bigScreenWrap{
  1460. position: fixed;
  1461. left: 0;
  1462. right: 0;
  1463. bottom: 30rpx;
  1464. z-index: 999;
  1465. height: 88rpx;
  1466. }
  1467. .red {
  1468. color: red !important;
  1469. font-weight: bold !important;
  1470. }
  1471. .page_tab {
  1472. width: 100%;
  1473. height: 96rpx;
  1474. display: flex;
  1475. position: fixed;
  1476. left: 0;
  1477. top: 0;
  1478. z-index: 999;
  1479. .page_tab_bar {
  1480. flex: 1;
  1481. font-size: 36rpx;
  1482. background: #fff;
  1483. display: flex;
  1484. justify-content: center;
  1485. align-items: center;
  1486. position: relative;
  1487. &:after {
  1488. content: "";
  1489. position: absolute;
  1490. left: 0;
  1491. bottom: 0;
  1492. height: 2rpx;
  1493. width: 100%;
  1494. background-color: transparent;
  1495. }
  1496. .tab_num {
  1497. color: #ff3b53;
  1498. margin-left: 8rpx;
  1499. }
  1500. &.active {
  1501. color: #49b856;
  1502. &:after {
  1503. background-color: #49b856;
  1504. }
  1505. }
  1506. }
  1507. }
  1508. .zwsj {
  1509. position: absolute;
  1510. left: 50%;
  1511. top: 180rpx;
  1512. transform: translateX(-50%);
  1513. .zwsj-img {
  1514. width: 560rpx;
  1515. }
  1516. .zwsj-txt {
  1517. font-size: 36rpx;
  1518. font-weight: 700;
  1519. margin-top: 20rpx;
  1520. text-align: center;
  1521. }
  1522. }
  1523. .page_items {
  1524. height: calc(100vh - 214rpx);
  1525. padding: 0 20rpx;
  1526. // padding-bottom: 88rpx;
  1527. padding-top: 96rpx;
  1528. .page_items_scroll {
  1529. height: 100%;
  1530. .page_item_wrap {
  1531. position: relative;
  1532. margin-bottom: 32rpx;
  1533. .page_item {
  1534. margin-bottom: 16rpx;
  1535. // min-height: 356rpx;
  1536. background: #fff;
  1537. border-radius: 8rpx;
  1538. overflow: hidden;
  1539. border: 2rpx solid #e5e9ed;
  1540. .L {
  1541. width: 40rpx;
  1542. height: 40rpx;
  1543. border-radius: 50%;
  1544. background: #f9fafb;
  1545. position: absolute;
  1546. left: -24rpx;
  1547. top: 68rpx;
  1548. border: 2rpx solid #e5e9ed;
  1549. }
  1550. .R {
  1551. width: 40rpx;
  1552. height: 40rpx;
  1553. border-radius: 50%;
  1554. background: #f9fafb;
  1555. position: absolute;
  1556. float: right;
  1557. right: -24rpx;
  1558. top: 68rpx;
  1559. border: 2rpx solid #e5e9ed;
  1560. }
  1561. .starting {
  1562. width: 40rpx;
  1563. height: 40rpx;
  1564. color: #fff;
  1565. background: #49b856;
  1566. display: inline-block;
  1567. border-radius: 50%;
  1568. text-align: center;
  1569. line-height: 40rpx;
  1570. font-size: 28rpx;
  1571. }
  1572. .End {
  1573. width: 40rpx;
  1574. height: 40rpx;
  1575. color: #fff;
  1576. background: #39b199;
  1577. display: inline-block;
  1578. border-radius: 50%;
  1579. text-align: center;
  1580. line-height: 40rpx;
  1581. font-size: 28rpx;
  1582. }
  1583. .page_item_top {
  1584. height: 86rpx;
  1585. border-bottom: 2rpx dashed #e5e9ed;
  1586. padding: 0 16rpx;
  1587. .page_item_top_L {
  1588. height: 100%;
  1589. float: left;
  1590. line-height: 88rpx;
  1591. display: flex;
  1592. align-items: center;
  1593. .emergencys {
  1594. background: #ff3b53 !important;
  1595. width: 124rpx !important;
  1596. }
  1597. .emergency {
  1598. background: #ff3b53 !important;
  1599. }
  1600. .emergency1 {
  1601. background: #49b856 !important;
  1602. }
  1603. .page_item_cont_start {
  1604. text-align: center;
  1605. height: 44rpx;
  1606. width: 104rpx;
  1607. line-height: 44rpx;
  1608. border-radius: 8rpx;
  1609. background: #49b856;
  1610. color: #fff;
  1611. .page_item_cont_start-img {
  1612. width: 22rpx;
  1613. position: relative;
  1614. top: 6rpx;
  1615. margin-right: 8rpx;
  1616. }
  1617. }
  1618. .L_iocn {
  1619. display: inline-block;
  1620. width: 44rpx;
  1621. height: 44rpx;
  1622. line-height: 42rpx;
  1623. border-radius: 100rpx;
  1624. color: #6cc076;
  1625. font-size: 32rpx;
  1626. border: 4rpx solid #6cc076;
  1627. background: #f0f6ed;
  1628. text-align: center;
  1629. margin-right: 8rpx;
  1630. }
  1631. .L_time {
  1632. color: #6cc076;
  1633. font-size: 32rpx;
  1634. }
  1635. .L_text {
  1636. font-size: 32rpx;
  1637. }
  1638. }
  1639. .page_item_top_R {
  1640. height: 100%;
  1641. float: right;
  1642. line-height: 88rpx;
  1643. font-size: 32rpx;
  1644. &.type {
  1645. margin-right: 32rpx;
  1646. color: red;
  1647. max-width: 260rpx;
  1648. white-space: nowrap;
  1649. text-overflow: ellipsis;
  1650. overflow: hidden;
  1651. }
  1652. .text_big{
  1653. font-weight: bold;
  1654. }
  1655. }
  1656. }
  1657. .page_item_cont {
  1658. min-height: 180rpx;
  1659. padding: 0 16rpx;
  1660. text-align: left;
  1661. position: relative;
  1662. display: flex;
  1663. flex-direction: column;
  1664. justify-content: space-between;
  1665. .text_big {
  1666. font-size: 32rpx;
  1667. margin-left: 10rpx;
  1668. font-weight: 700;
  1669. }
  1670. .line {
  1671. height: 100%;
  1672. width: 2rpx;
  1673. border-left: 2rpx solid #e5e9ed;
  1674. position: absolute;
  1675. // top: 70rpx;
  1676. top: 50%;
  1677. left: 20rpx;
  1678. transform: translateY(-50%);
  1679. }
  1680. .lines {
  1681. height: 40%;
  1682. width: 2rpx;
  1683. border-left: 2rpx solid #e5e9ed;
  1684. position: absolute;
  1685. top: 23%;
  1686. left: 36rpx;
  1687. }
  1688. .emergencys {
  1689. background: #ff3b53 !important;
  1690. width: 124rpx !important;
  1691. }
  1692. .emergency {
  1693. background: #ff3b53 !important;
  1694. }
  1695. .emergency1 {
  1696. background: #49b856 !important;
  1697. }
  1698. .page_item_cont_T {
  1699. // min-height: 80rpx;
  1700. // max-height: 324rpx;
  1701. font-size: 28rpx;
  1702. margin-top: 16rpx;
  1703. display: flex;
  1704. justify-content: space-between;
  1705. .page_item_cont_title {
  1706. height: 100%;
  1707. // float: left;
  1708. }
  1709. .page_item_cont_start {
  1710. text-align: center;
  1711. // float: right;
  1712. height: 44rpx;
  1713. width: 104rpx;
  1714. line-height: 44rpx;
  1715. border-radius: 8rpx;
  1716. background: #49b856;
  1717. color: #fff;
  1718. .page_item_cont_start-img {
  1719. width: 22rpx;
  1720. position: relative;
  1721. top: 6rpx;
  1722. margin-right: 8rpx;
  1723. }
  1724. }
  1725. }
  1726. .page_item_conts {
  1727. min-height: 30rpx;
  1728. color: rgb(102, 102, 102);
  1729. padding-left: 50rpx;
  1730. font-size: 28rpx;
  1731. margin: 16rpx 0;
  1732. position: relative;
  1733. view:not(.line) {
  1734. line-height: 1.2;
  1735. }
  1736. text {
  1737. color: #49b856;
  1738. }
  1739. }
  1740. .page_item_cont_B {
  1741. // padding-top: 20rpx;
  1742. font-size: 28rpx;
  1743. // overflow: hidden;
  1744. margin-bottom: 16rpx;
  1745. .page_item_cont_title {
  1746. height: 100%;
  1747. float: left;
  1748. }
  1749. }
  1750. }
  1751. .page_item_btn_wrap {
  1752. display: flex;
  1753. justify-content: space-between;
  1754. .page_item_btn {
  1755. height: 88rpx;
  1756. flex: 1;
  1757. margin-left: 1%;
  1758. margin-right: 1%;
  1759. background-image: linear-gradient(to right, #72c172, #3bb197);
  1760. border-radius: 8rpx;
  1761. line-height: 88rpx;
  1762. color: #fff;
  1763. font-size: 36rpx;
  1764. font-weight: 700;
  1765. text-align: center;
  1766. }
  1767. }
  1768. .page_item_btn {
  1769. height: 88rpx;
  1770. background-image: linear-gradient(to right, #72c172, #3bb197);
  1771. border-radius: 8rpx;
  1772. line-height: 88rpx;
  1773. color: #fff;
  1774. font-size: 36rpx;
  1775. font-weight: 700;
  1776. text-align: center;
  1777. }
  1778. }
  1779. .L-l {
  1780. width: 2rpx;
  1781. height: 40rpx;
  1782. background: #f9fafb;
  1783. position: absolute;
  1784. left: 20rpx;
  1785. top: 72rpx;
  1786. display: none;
  1787. }
  1788. .R-l {
  1789. width: 2rpx;
  1790. height: 40rpx;
  1791. background: #f9fafb;
  1792. position: absolute;
  1793. right: 20rpx;
  1794. top: 72rpx;
  1795. display: none;
  1796. }
  1797. }
  1798. }
  1799. }
  1800. .text {
  1801. font-size: 36rpx;
  1802. }
  1803. .wt_icon {
  1804. font-size: 40rpx;
  1805. }
  1806. }
  1807. </style>