receiptpage.vue 88 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512
  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 === '执行中'" @click.stop="execFilter"></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 style="word-break: break-all;" v-if="item.workOrderRemark">
  218. 备注信息 :
  219. <text>{{ item.workOrderRemark || "暂无" }}</text>
  220. </view>
  221. <view class="line"></view>
  222. </view>
  223. <view class="page_item_cont_B">
  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.endDepts" :key="i">{{ dept.dept }}</text>
  227. </view>
  228. <view class="page_item_cont_title" v-if="item.taskType.associationType.value == 'inspect'">
  229. <text> <text class="End">检</text> 查科室 </text>
  230. <text class="text_big" v-for="(dept, i) of item.middleDept" :key="i">{{ dept.dept }}</text>
  231. </view>
  232. </view>
  233. </view>
  234. <view v-if="
  235. item.taskType.associationType.value == 'inspect' ||
  236. item.taskType.associationType.value == 'patientTransport'
  237. ">
  238. <!-- 待抢单 -->
  239. <text class="red" v-if="item.gdState.value == 2">请扫描患者腕带,或者请扫描科室码</text>
  240. <!-- 待到达 -->
  241. <text class="red" v-if="item.gdState.value == 4">请扫描患者腕带</text>
  242. <!-- 执行中 -->
  243. <text class="red" v-if="item.gdState.value == 8">请扫描检查科室码,并扫描患者腕带</text>
  244. <!-- 待送达 -->
  245. <text class="red" v-if="item.gdState.value == 5">请扫描终点科室码,并扫描患者腕带</text>
  246. </view>
  247. <view v-if="item.taskType.associationType.value == 'ordinary' && item.taskType.ordinaryField.value == 'clothingGet'">
  248. <!-- 待送达 -->
  249. <text class="red" v-if="item.gdState.value == 5">请扫描终点科室二维码</text>
  250. </view>
  251. <view v-if="item.taskType.associationType.value == 'ordinary' && item.taskType.ordinaryField.value == 'clothingSend'">
  252. <!-- 待到达 -->
  253. <text class="red" v-if="item.gdState.value == 4">请扫描起点科室二维码</text>
  254. <!-- 待送达 -->
  255. <text class="red" v-if="item.gdState.value == 5">请扫描终点科室二维码</text>
  256. </view>
  257. <view v-else-if="item.taskType.associationType.value == 'other'">
  258. <!-- 待到达 -->
  259. <text class="red" v-if="item.gdState.value == 4 && item.taskType.carryingCourses[0].checkoutMethod.value == 1">可通过扫描科室码或者拍照进行签到</text>
  260. <text class="red" v-if="item.gdState.value == 4 && item.taskType.carryingCourses[0].checkoutMethod.value == 2">扫描交接人员二维码进行交接</text>
  261. </view>
  262. <!-- 如果不是患者陪检或患者转运或其他,万能交接 -->
  263. <view class="page_item_btn" v-if="
  264. selectedLabelSlots == '执行中' &&
  265. item.taskType.associationType.value != 'patientTransport' &&
  266. item.taskType.associationType.value != 'inspect' &&
  267. item.taskType.associationType.value != 'other' &&
  268. item.taskType.associationType.value != 'ordinary'
  269. " hover-class="seimin-btn-hover">
  270. <smallScreen :sData="item" :sType="2">扫码</smallScreen>
  271. </view>
  272. <!-- 如果不是静配,药配,标本配送,标本轮巡,万能交接 -->
  273. <view class="page_item_btn_wrap" v-if="
  274. selectedLabelSlots == '执行中' &&
  275. item.taskType.associationType.value != 'jPBag' &&
  276. item.taskType.associationType.value != 'drugsBag' &&
  277. item.taskType.associationType.value != 'specimen' &&
  278. item.taskType.associationType.value != 'specimenPlan' &&
  279. item.taskType.associationType.value != 'ordinary'
  280. ">
  281. <view v-if="!(item.taskType.associationType.value == 'other' && (item.gdState.value == 4 && item.taskType.carryingCourses[0].actionsSwitch || item.gdState.value == 5 && item.taskType.carryingCourses[1].actionsSwitch))" class="page_item_btn" hover-class="seimin-btn-hover">
  282. <smallScreen :sData="item" :sType="1">扫码</smallScreen>
  283. </view>
  284. <!-- 其他临床服务-完成工单-待到达 -->
  285. <view v-if="item.taskType.associationType.value == 'other' && item.gdState.value == 4 && item.taskType.carryingCourses[0].actionsSwitch" class="page_item_btn" @click="otherCompleteOrder(item)" hover-class="seimin-btn-hover">确认到达</view>
  286. <!-- 其他临床服务-完成工单-待送达 -->
  287. <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>
  288. <!-- 其他临床服务-拍照 -->
  289. <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>
  290. <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>
  291. <!-- 其他临床服务-追加 -->
  292. <view v-if="item.taskType.associationType.value == 'other' && item.worker && item.worker.id && clinicalMultiplayerMode === 1 && showAppendUser === 1 && item.clinicalTaskIdsFlag && !item.copyBy" class="page_item_btn" @click="additionalUser(item)" hover-class="seimin-btn-hover">追加</view>
  293. </view>
  294. <!-- 如果是万能交接-血制品 -->
  295. <view class="page_item_btn" v-if="selectedLabelSlots == '执行中' && item.taskType.associationType.value == 'ordinary' && delivery === 1 && item.taskType.ordinaryField.value == 'blood' && item.gdState.value == 5" hover-class="seimin-btn-hover">
  296. <view class="page_item_btn" @click="goTobloodEnd(item)" hover-class="seimin-btn-hover">送达交接</view>
  297. </view>
  298. <!-- 如果是万能交接-被服洗涤送回 -->
  299. <view class="page_item_btn" v-if="item.taskType.associationType.value == 'ordinary' && item.taskType.ordinaryField.value == 'clothingSend' && item.gdState.value == 5" hover-class="seimin-btn-hover">
  300. <view class="page_item_btn" @click="goToWashingEnd(item)" hover-class="seimin-btn-hover">核对被服</view>
  301. </view>
  302. <view class="page_item_btn" v-if="selectedLabelSlots == '待接单'" @click="showAlerts(item)" hover-class="seimin-btn-hover">接单</view>
  303. </view>
  304. <view class="L-l"></view>
  305. <view class="R-l"></view>
  306. </view>
  307. </scroll-view>
  308. </view>
  309. <!-- 底部扫一扫 -->
  310. <view class="bigScreenWrap">
  311. <bigScreen ref="bigscreen"></bigScreen>
  312. <view class="more" v-if="arrayBigScreen.length"></view>
  313. <picker class="more_picker" @click.stop @change="execFilterBigScreen($event)" :value="indexBigScreen"
  314. :range="arrayBigScreen" range-key="name" v-if="arrayBigScreen.length">
  315. <view class="uni-input">{{ arrayBigScreen[indexBigScreen].name }}</view>
  316. </picker>
  317. </view>
  318. <!-- 悬浮按钮 -->
  319. <uni-fab :pattern="pattern" :content="content" :direction="direction" @trigger="trigger"></uni-fab>
  320. <!-- 弹窗 -->
  321. <showModel :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content"
  322. @ok="ok" @cancel="cancel" @know="know" :operate="models.operate"></showModel>
  323. <!-- 我的二维码-弹窗 -->
  324. <showMyQrcode v-if="showMyQrcodeModel.disjunctor" :disjunctor="showMyQrcodeModel.disjunctor" @know="closeMyQrcodeModel"></showMyQrcode>
  325. <!-- 科室二维码-弹窗 -->
  326. <showDepartmentQrcode v-if="showDepartmentQrcodeModel.disjunctor" :disjunctor="showDepartmentQrcodeModel.disjunctor" @know="closeDepartmentQrcodeModel"></showDepartmentQrcode>
  327. <!-- 手动查询标本弹窗 -->
  328. <handViewSpecimen v-if="speModels.disjunctor" :title="speModels.title" :disjunctor="speModels.disjunctor"
  329. @ok="speOk" @cancel="speCancel">
  330. </handViewSpecimen>
  331. <!-- 手动查询药品弹窗 -->
  332. <handViewDrugsBag v-if="drugbagModels.disjunctor" :title="drugbagModels.title"
  333. :disjunctor="drugbagModels.disjunctor" @ok="drugbagOk" @cancel="drugbagCancel">
  334. </handViewDrugsBag>
  335. <!-- 填写交接人工号弹窗 -->
  336. <selectAccount v-if="hosModels.disjunctor" :disjunctor="hosModels.disjunctor" @ok="hosOk"
  337. @cancel="hosCancel">
  338. </selectAccount>
  339. <!-- 手动查询弹窗 -->
  340. <checkboxModal v-if="checkboxModels.disjunctor" :content="checkboxModels.content" :disjunctor="checkboxModels.disjunctor"
  341. @ok="checkboxOk" @cancel="checkboxCancel">
  342. </checkboxModal>
  343. <!-- 执行中筛选 -->
  344. <view class="execFilterMask" v-if="isShowExecFilter" @click="isShowExecFilter = false">
  345. <view class="execFilter" @click.stop>
  346. <view class="execFilterHeader">
  347. 全部筛选
  348. </view>
  349. <view class="execFilterBody">
  350. <view class="execFilterItem">
  351. <view class="execFilterItemHeader">
  352. 工单状态
  353. </view>
  354. <view class="execFilterItemBody">
  355. <view class="execFilterItemBox" @click="currentId = item.id" :class="{active: item.id == currentId}" v-for="item in array" :key="item.id">
  356. {{item.name}}
  357. </view>
  358. </view>
  359. </view>
  360. <view class="execFilterItem">
  361. <view class="execFilterItemHeader">
  362. 申请科室
  363. </view>
  364. <view class="execFilterItemBody">
  365. <input class="deptName" v-model.trim="deptName" placeholder="请输入科室名称" placeholder-style="color:#cecece" />
  366. </view>
  367. </view>
  368. </view>
  369. <view class="execFilterFooter">
  370. <view class="btn" @click="execFilterReset()">重置</view>
  371. <view class="btn" @click="execFilterOk()">完成</view>
  372. </view>
  373. </view>
  374. </view>
  375. <!-- 被服洗涤弹窗 -->
  376. <showModel :title="models1.title" :icon="models1.icon" :disjunctor="models1.disjunctor" :content="models1.content"
  377. @ok="ok1" @cancel="cancel1" :operate="models1.operate"></showModel>
  378. </view>
  379. </template>
  380. <script>
  381. import selectAccount from "../../components/selectAccount/selectAccount.vue";
  382. import smallScreen from "../../components/smallScreen/smallScreen.vue";
  383. import showModel from "../../components/showModel/showModel.vue";
  384. import bigScreen from "../../components/bigScreen/bigScreen.vue";
  385. // https://ext.dcloud.net.cn/plugin?id=144
  386. import uniFab from "@/components/uni-fab/uni-fab.vue";
  387. import {
  388. get,
  389. post,
  390. SM,
  391. deleteIt,
  392. webHandle
  393. } from "../../http/http.js";
  394. import {
  395. photographTool,
  396. pathUrl
  397. } from "../../tools/photograph.js";
  398. export default {
  399. data() {
  400. return {
  401. isShowExecFilter: false,
  402. deptName: '',
  403. currentId: 0,
  404. otherAssociationTypeId: null,
  405. hosId: uni.getStorageSync('userData').user.currentHospital.id,
  406. clinicalMultiplayerMode: 0,
  407. showAppendUser: 0,
  408. delivery: 0,
  409. clinicalTaskIds: [],
  410. other: {
  411. user: {},
  412. data: {},
  413. },
  414. // 手动查询弹窗model
  415. checkboxModels: {
  416. disjunctor: false,
  417. },
  418. // 填写交接人工号弹窗model
  419. hosModels: {
  420. disjunctor: false,
  421. },
  422. currentCode: '', //当前拍照使用的科室二维码
  423. currentData: {}, //当前小扫描的工单对象
  424. // 弹窗model
  425. showMyQrcodeModel: {
  426. disjunctor: false,
  427. },
  428. // 弹窗model
  429. showDepartmentQrcodeModel: {
  430. disjunctor: false,
  431. },
  432. SMFlag: true,
  433. // 手动查询标本弹窗model
  434. speModels: {
  435. disjunctor: false,
  436. },
  437. // 手动查询药品弹窗model
  438. drugbagModels: {
  439. disjunctor: false,
  440. },
  441. // 筛选条件
  442. array: [{
  443. id: 0,
  444. name: "全部",
  445. },
  446. {
  447. id: 71,
  448. name: "待到达",
  449. },
  450. {
  451. id: 72,
  452. name: "待送达",
  453. },
  454. {
  455. id: 75,
  456. name: "执行中",
  457. },
  458. ],
  459. // 筛选条件
  460. arrayBigScreen: [],
  461. index: 0,
  462. indexBigScreen: 0,
  463. arrayKey: 0,
  464. arrayKeyBigScreen: 0,
  465. // 当前登录人是否是药房角色
  466. pharmacistFlag: false,
  467. // 抢单的id
  468. qdId: "",
  469. quiltData: {},
  470. // 弹窗model
  471. models: {
  472. disjunctor: false,
  473. },
  474. // 弹窗model
  475. models1: {
  476. disjunctor: false,
  477. },
  478. // 悬浮按钮样式
  479. pattern: {
  480. buttonColor: "#6cc076",
  481. },
  482. // 悬浮按钮展开菜单显示方式
  483. direction: "vertical",
  484. // 悬浮按钮展开菜单内容配置项
  485. content: [{
  486. text: "我的任务",
  487. }, ],
  488. // 当前选中tab页名称
  489. selectedLabelSlots: "待接单",
  490. // tab页信息
  491. tabs: [{
  492. label: "待接单", //tab页名称
  493. value: "1", //值
  494. num: 0, //数量
  495. },
  496. {
  497. label: "执行中",
  498. value: "2",
  499. num: 0,
  500. },
  501. ],
  502. //列表数据
  503. zxzData: [],
  504. //分页页码
  505. idx: 0,
  506. // 列表项总数
  507. totalNum: -1,
  508. triggered: false, //下拉刷新状态
  509. freshing: false, //上拉加载开关
  510. scroll_top: 0, //距离顶部的距离
  511. scroll_refresher_enabled: true, //是否开启自定义下拉刷新
  512. quiltCode: '',
  513. };
  514. },
  515. filters: {
  516. // 自定义管道 yyTime
  517. yyTimeFilter: function(data) {
  518. if (data) {
  519. let nDate = null;
  520. if (typeof data == 'string') {
  521. let arr = data.split(/[-:\s]/);
  522. nDate = new Date(
  523. arr[0] - 0,
  524. arr[1] - 1,
  525. arr[2] - 0,
  526. arr[3] - 0,
  527. arr[4] - 0,
  528. 0
  529. );
  530. } else if (typeof data == 'number') {
  531. nDate = new Date(data);
  532. }
  533. const month = (nDate.getMonth() + 1).toString().padStart(2, 0);
  534. const date = nDate.getDate().toString().padStart(2, 0);
  535. const hour = nDate.getHours().toString().padStart(2, 0);
  536. const minute = nDate.getMinutes().toString().padStart(2, 0);
  537. return `${month}-${date} ${hour}:${minute}`;
  538. } else {
  539. return "-";
  540. }
  541. },
  542. },
  543. components: {
  544. uniFab,
  545. showModel,
  546. bigScreen,
  547. selectAccount,
  548. },
  549. methods: {
  550. goTobloodEnd(order){
  551. uni.navigateTo({
  552. url: `../endOrderSignBlood/endOrderSignBlood?orderIds=${order.id}&deptName=${order.endDepts[0].dept}&deptId=${order.endDepts[0].id}&type=delivery`,
  553. });
  554. },
  555. goToWashingEnd(order){
  556. uni.navigateTo({
  557. url: `../quiltWashing/quiltWashingSendSignIn/quiltWashingSendSignIn?orderId=${order.id}&endDeptId=${order.endDepts[0].id}&endDeptName=${order.endDepts[0].dept}`,
  558. });
  559. },
  560. async initList(){
  561. uni.showLoading({
  562. title: "加载中",
  563. mask: true,
  564. });
  565. //获取其他临床服务业务类型
  566. let res = await this.getOtherAssociationTypes();
  567. let otherAssociationType = res.find(v => v.value === 'other');
  568. this.otherAssociationTypeId = otherAssociationType ? otherAssociationType.id : null;
  569. if(this.otherAssociationTypeId){
  570. // 获取临床服务页面控制开关
  571. let result = await this.getTaskOtherConfig();
  572. if (result.status == 200) {
  573. if(result.list && result.list[0]){
  574. this.clinicalMultiplayerMode = result.list[0].clinicalMultiplayerMode;
  575. this.showAppendUser = result.list[0].showAppendUser;
  576. this.clinicalTaskIds = result.list[0].clinicalTaskIds ? result.list[0].clinicalTaskIds.split(',') : [] ;
  577. }else{
  578. this.clinicalMultiplayerMode = 0;
  579. this.showAppendUser = 0;
  580. }
  581. } else {
  582. this.clinicalMultiplayerMode = 0;
  583. this.showAppendUser = 0;
  584. }
  585. }else{
  586. uni.showToast({
  587. icon: 'none',
  588. title: '未设置其他临床服务业务类型!'
  589. })
  590. }
  591. this.getBloodPageConfig()
  592. this.waitingOrdersGetNum();
  593. this.executingOrders(0);
  594. },
  595. // 获取血制品页面控制开关
  596. async getBloodPageConfig(){
  597. let result = await this.getTaskBloodConfig();
  598. if (result.status == 200) {
  599. if(result.list && result.list[0]){
  600. this.delivery = result.list[0].delivery;
  601. }else{
  602. this.delivery = 0;
  603. }
  604. } else {
  605. this.delivery = 0;
  606. }
  607. },
  608. //获取其他临床服务业务类型
  609. getOtherAssociationTypes(){
  610. return post('/common/common/getDictionary', {
  611. "type": "list",
  612. "key": "association_types"
  613. });
  614. },
  615. // 获取临床服务页面控制开关
  616. getTaskOtherConfig(){
  617. return post("/simple/data/fetchDataList/taskTypeConfig", {
  618. "idx": 0,
  619. "sum": 10,
  620. "taskTypeConfig": {
  621. "hosId": this.hosId,
  622. "associationType": this.otherAssociationTypeId,
  623. }
  624. });
  625. },
  626. // 获取血制品页面控制开关
  627. getTaskBloodConfig(){
  628. return post("/simple/data/fetchDataList/taskTypeConfig", {
  629. "idx": 0,
  630. "sum": 10,
  631. "taskTypeConfig": {
  632. "taskTypeDTO": {
  633. "hosId": {
  634. "id": this.hosId
  635. },
  636. "ordinaryField": {
  637. "key": "ordinary_field",
  638. "value": "blood"
  639. }
  640. }
  641. }
  642. });
  643. },
  644. // 手动查询-确认
  645. checkboxOk(bulkCopy) {
  646. console.log(bulkCopy);
  647. this.checkboxModels.disjunctor = false;
  648. let { user, data } = this.other;
  649. this.additionalUserCommon(user, data.id, data.worker.id, bulkCopy);
  650. },
  651. // 手动查询-取消
  652. checkboxCancel() {
  653. this.checkboxModels.disjunctor = false;
  654. },
  655. // 手动查询弹窗
  656. showCheckboxModal(user, data) {
  657. this.other = {
  658. user,
  659. data,
  660. };
  661. this.checkboxModels = {
  662. content: `您要最追加的人员为${user.name},您确认要追加吗?`,
  663. disjunctor: true,
  664. }
  665. },
  666. // 追加陪检人/执行人按钮
  667. additionalUser(data) {
  668. if (!this.SMFlag) {
  669. return;
  670. }
  671. this.SMFlag = false;
  672. console.log(data, 'data');
  673. SM().then((ress1) => {
  674. uni.showLoading({
  675. title: "加载中",
  676. mask: true,
  677. });
  678. //检验二维码的有效性
  679. post("/dept/scanning", {
  680. content: ress1,
  681. taskTypeId: data.taskType.id,
  682. gdState: data.gdState.id,
  683. }).then((result) => {
  684. this.SMFlag = true;
  685. // this.currentCode = result.code;
  686. if (result.state == 200 || result.state == 201) {
  687. console.log(result);
  688. let user;
  689. try{
  690. // json对象字符串
  691. user = JSON.parse(result.code);
  692. // 不是json对象字符串
  693. if(Object.prototype.toString.call(user).slice(8, -1).toLowerCase() !== 'object'){
  694. user = result.code;
  695. }
  696. }catch(e){
  697. user = result.code;
  698. }
  699. if(Object.prototype.toString.call(user).slice(8, -1).toLowerCase() === 'object' && user.type == 'myQrCode' && user.id && user.name){
  700. user.qrcode = ress1;
  701. uni.hideLoading();
  702. if(data.taskType.associationType.value == 'other'){
  703. this.showCheckboxModal(user, data);
  704. }else{
  705. uni.showModal({
  706. title: "提示",
  707. content: `您要最追加的人员为${user.name},您确认要追加吗?`,
  708. success: (res) => {
  709. if (res.confirm) {
  710. console.log("用户点击确定");
  711. this.additionalUserCommon(user, data.id, data.worker.id, false);
  712. } else if (res.cancel) {
  713. console.log("用户点击取消");
  714. }
  715. },
  716. });
  717. }
  718. }else if(Object.prototype.toString.call(user).slice(8, -1).toLowerCase() === 'string'){
  719. let identityCardNumber = user;
  720. // 根据身份证获取name
  721. // todo
  722. post("/data/fetchDataList/user", {idx: 0, sum: 1, user: { identityCardNumber }}).then((result) => {
  723. uni.hideLoading();
  724. if(result.status == 200){
  725. result.list = result.list || [];
  726. if(result.list.length){
  727. let user = {name: result.list[0].name, identityCardNumber, qrcode: ress1};
  728. if(data.taskType.associationType.value == 'other'){
  729. this.showCheckboxModal(user, data);
  730. }else{
  731. uni.showModal({
  732. title: "提示",
  733. content: `您要最追加的人员为${user.name},您确认要追加吗?`,
  734. success: (res) => {
  735. if (res.confirm) {
  736. console.log("用户点击确定");
  737. this.additionalUserCommon(user, data.id, data.worker.id, false);
  738. } else if (res.cancel) {
  739. console.log("用户点击取消");
  740. }
  741. },
  742. });
  743. }
  744. }else{
  745. uni.navigateTo({
  746. url: `../result_error/result_error?qrcode=${ress1}&msg=扫描二维码无法找到用户!`,
  747. });
  748. }
  749. }else{
  750. uni.navigateTo({
  751. url: `../result_error/result_error?qrcode=${ress1}&msg=请扫描正确的二维码!`,
  752. });
  753. }
  754. })
  755. }else{
  756. uni.hideLoading();
  757. uni.navigateTo({
  758. url: `../result_error/result_error?qrcode=${ress1}&msg=请扫描正确的二维码!`,
  759. });
  760. }
  761. } else {
  762. uni.hideLoading();
  763. uni.navigateTo({
  764. url: `../result_error/result_error?qrcode=${ress1}&msg=${result.info || '接口获取数据失败!'}`,
  765. });
  766. }
  767. });
  768. }).catch(err=>{
  769. this.SMFlag = true;
  770. });
  771. },
  772. // 追加陪检人/执行人
  773. additionalUserCommon(user, gdId, workerId, bulkCopy) {
  774. console.log(user, gdId, workerId, bulkCopy);
  775. uni.showLoading({
  776. title: "加载中",
  777. mask: true,
  778. });
  779. // 二维码里有id则传userid,没有则传identityCardNumber
  780. post("/workerOrder/additionalAccompanyingPersonnel", {
  781. userId: user.id || undefined,
  782. identityCardNumber: !user.id ? user.identityCardNumber : undefined,
  783. gdId,
  784. workerId,
  785. bulkCopy: bulkCopy ? 1 : undefined,
  786. }).then((result) => {
  787. uni.hideLoading();
  788. if (result.state == 200) {
  789. uni.showToast({
  790. icon: 'none',
  791. duration: 4000,
  792. title: '操作成功!'
  793. })
  794. uni.redirectTo({
  795. url: `../receiptpage/receiptpage`,
  796. });
  797. } else {
  798. uni.navigateTo({
  799. url: `../result_error/result_error?qrcode=${user.qrcode}&msg=${result.msg || '接口获取数据失败!'}`,
  800. });
  801. }
  802. });
  803. },
  804. // 前往其他临床服务完成工单确认页面
  805. otherCompleteOrder(data){
  806. console.log(data);
  807. uni.navigateTo({
  808. url: `../otherCompleteOrder/otherCompleteOrder?orderId=${data.id}&taskType=${data.taskType ? encodeURIComponent(JSON.stringify(data.taskType)) : ''}&order=${data ? encodeURIComponent(JSON.stringify(data)) : ''}`,
  809. });
  810. },
  811. // 手动查询药品-确认
  812. drugbagOk(data) {
  813. console.log(data);
  814. if (!data.id) {
  815. //没有查询到药品
  816. uni.showModal({
  817. title: '提示',
  818. content: "没有查询到发药单号!",
  819. showCancel: false,
  820. success: function(res) {
  821. if (res.confirm) {
  822. console.log('用户点击确定');
  823. } else if (res.cancel) {
  824. console.log('用户点击取消');
  825. }
  826. }
  827. });
  828. return;
  829. }
  830. this.drugbagModels.disjunctor = false;
  831. uni.navigateTo({
  832. url: `/pages/scanning_drug/scanning_drug?drugsBagId=${data.id}`,
  833. });
  834. },
  835. // 手动查询药品-取消
  836. drugbagCancel() {
  837. this.drugbagModels.disjunctor = false;
  838. },
  839. // 手动查询药品弹窗
  840. showHandViewDrugsbag() {
  841. console.log(1)
  842. this.drugbagModels = {
  843. title: '填写发药单号',
  844. disjunctor: true,
  845. }
  846. },
  847. // 手动查询标本-确认
  848. speOk(data) {
  849. console.log(data);
  850. if (!data.id) {
  851. //没有查询到标本
  852. uni.showModal({
  853. title: '提示',
  854. content: "没有查询到标本!",
  855. showCancel: false,
  856. success: function(res) {
  857. if (res.confirm) {
  858. console.log('用户点击确定');
  859. } else if (res.cancel) {
  860. console.log('用户点击取消');
  861. }
  862. }
  863. });
  864. return;
  865. }
  866. this.speModels.disjunctor = false;
  867. let infoDATA = {
  868. stype: data.stype,
  869. scode: data.scode,
  870. patientName: data.patientName,
  871. sickRoom: data.sickRoom ?
  872. data.sickRoom.dept : "-",
  873. checkDept: data.checkDept ?
  874. data.checkDept.dept : "-",
  875. bedNum: data.bedNum,
  876. };
  877. uni.navigateTo({
  878. url: `../scanning_B/scanning_B?res=${encodeURIComponent(
  879. JSON.stringify({data,status:666,scanCodeSpecimenOrderSign:data.scanCodeSpecimenOrderSign,workOrder:data.workOrderDTO})
  880. )}&infoDATA=${encodeURIComponent(
  881. JSON.stringify(infoDATA)
  882. )}`,
  883. });
  884. },
  885. // 手动查询标本-取消
  886. speCancel() {
  887. this.speModels.disjunctor = false;
  888. },
  889. // 手动查询标本弹窗
  890. showHandViewSpecimen() {
  891. this.speModels = {
  892. title: '填写标本编码',
  893. disjunctor: true,
  894. }
  895. },
  896. // 执行中筛选
  897. // execFilter({
  898. // detail: {
  899. // value
  900. // }
  901. // }) {
  902. // this.index = value;
  903. // this.arrayKey = this.array[value].id;
  904. // this.zxzData = [];
  905. // this.totalNum = -1;
  906. // this.idx = 0;
  907. // this.selectedLabelSlots = "执行中";
  908. // this.executingOrders(0);
  909. // },
  910. // 执行中筛选
  911. execFilter() {
  912. this.isShowExecFilter = true;
  913. },
  914. // 执行中确定
  915. execFilterOk() {
  916. this.isShowExecFilter = false;
  917. this.zxzData = [];
  918. this.totalNum = -1;
  919. this.idx = 0;
  920. this.selectedLabelSlots = "执行中";
  921. this.executingOrders(0);
  922. },
  923. // 执行中重置
  924. execFilterReset() {
  925. this.currentId = 0;
  926. this.deptName = '';
  927. },
  928. // 大扫描筛选
  929. execFilterBigScreen({
  930. detail: {
  931. value
  932. }
  933. }) {
  934. this.indexBigScreen = value;
  935. this.arrayKeyBigScreen = this.arrayBigScreen[value].id;
  936. console.log(this.arrayKeyBigScreen);
  937. console.log(this.$refs.bigscreen);
  938. this.$refs.bigscreen.Scanning(this.arrayKeyBigScreen);
  939. },
  940. // 获取科室二维码设置开关
  941. getMenu() {
  942. let menu = uni.getStorageSync("userData").menu;
  943. //判断当前登陆人具体角色 start
  944. let roles = uni.getStorageSync("userData").user.role;
  945. this.pharmacistFlag = roles.some(
  946. (item) => item.rolecode === "pharmacist"
  947. );
  948. //判断当前登陆人具体角色 end
  949. console.log(menu);
  950. this.arrayBigScreen = [];
  951. menu.forEach((item) => {
  952. if (item.link === "wxInspect") {
  953. this.content.push({
  954. text: "检查信息",
  955. });
  956. } else if (item.link === "wxPatient") {
  957. this.content.push({
  958. text: "患者信息",
  959. });
  960. } else if (item.link === "wxPharmacy") {
  961. // 如果是配药师人员,则增加药房
  962. if (this.pharmacistFlag) {
  963. this.content.push({
  964. text: "药房",
  965. });
  966. }
  967. } else if (item.link === "wxCode") {
  968. this.content.push({
  969. text: "二维码设置",
  970. });
  971. } else if (item.link === "wxSpecimenEntry") {
  972. this.content.push({
  973. text: "标本录入",
  974. });
  975. } else if (item.link === "wxDrugsbagEntry") {
  976. this.content.push({
  977. text: "药品录入",
  978. });
  979. } else if (item.link === "wxTakeMedicine") {
  980. this.content.push({
  981. text: "摆药取药",
  982. });
  983. } else if (item.link === "myQrcode") {
  984. this.content.push({
  985. text: "我的二维码",
  986. });
  987. } else if (item.link === "departmentQrcode") {
  988. this.content.push({
  989. text: "科室二维码",
  990. });
  991. } else if (item.link === "formManagementWechat") {
  992. this.content.push({
  993. text: "查看表单",
  994. });
  995. } else if (item.link === "BIAOBEN") {
  996. this.arrayBigScreen.push({
  997. id: 'BIAOBEN|$|',
  998. name: "标本",
  999. });
  1000. } else if (item.link === "YAOPING") {
  1001. this.arrayBigScreen.push({
  1002. id: 'YAOPING|$|',
  1003. name: "药品",
  1004. });
  1005. } else if (item.link === "HUANZHE") {
  1006. this.arrayBigScreen.push({
  1007. id: 'HUANZHE|$|',
  1008. name: "患者",
  1009. });
  1010. } else if (item.link === "XIEZHIPING") {
  1011. this.arrayBigScreen.push({
  1012. id: 'XIEZHIPING|$|',
  1013. name: "血制品",
  1014. });
  1015. } else if (item.link === "KJJD") {
  1016. this.arrayBigScreen.push({
  1017. id: 'KJJD|$|',
  1018. name: "快捷建单",
  1019. });
  1020. } else if (item.link === "kuaijiejiedan") {
  1021. this.arrayBigScreen.push({
  1022. id: 'kuaijiejiedan|$|',
  1023. name: "快捷接单",
  1024. });
  1025. } else if (item.link === "quickOrderAcceptanceWx") {
  1026. this.content.push({
  1027. text: "快捷接单",
  1028. });
  1029. } else if (item.link === "wxQuiltRecovery") {
  1030. this.content.push({
  1031. text: "被服回收",
  1032. });
  1033. }
  1034. });
  1035. },
  1036. // 拍照
  1037. photograph(data) {
  1038. photographTool(data);
  1039. },
  1040. // 如果不是静配,药配,标本配送,标本轮巡
  1041. // 科室签到(小扫描)-拍照
  1042. nextDeptOrder_ss(data, accountObj) {
  1043. console.log(this.currentCode);
  1044. let isKs = 0;
  1045. let ids = [];
  1046. let id = data.id;
  1047. ids.push(id);
  1048. let list = {
  1049. code: "",
  1050. ids: ids,
  1051. };
  1052. let code = "";
  1053. let type = "";
  1054. if (this.currentCode) {
  1055. let gdStateValue = data.gdState.value; //工单状态value
  1056. let associationTypeValue = data.taskType.associationType.value; //关联类型value
  1057. // 其他临床服务,并且工单状态是待到达||工单状态待送达
  1058. if (
  1059. (associationTypeValue == "other" &&
  1060. gdStateValue == "4") ||
  1061. gdStateValue == "5"
  1062. ) {
  1063. code = this.currentCode;
  1064. type = "orderSign/" + code;
  1065. list = {
  1066. ids
  1067. };
  1068. if (accountObj) {
  1069. list.handover = [accountObj.accountId];
  1070. }
  1071. isKs = 1;
  1072. }
  1073. uni.showLoading({
  1074. title: "加载中",
  1075. mask: true,
  1076. });
  1077. post("/workerOrder/" + type, list).then((res) => {
  1078. uni.hideLoading();
  1079. if (res) {
  1080. if (res.status == 200) {
  1081. if (
  1082. gdStateValue == "4" &&
  1083. associationTypeValue == "other"
  1084. ) {
  1085. uni.navigateTo({
  1086. url: `../../pages/scanning_code/scanning_code?type=${associationTypeValue}&type1=${res.type}&id=${data.id}&deptCode=${code}&dept=${res.dept}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}`,
  1087. });
  1088. }
  1089. if (gdStateValue == "5") {
  1090. uni.navigateTo({
  1091. url: `../../pages/scanning_code/scanning_code?type=${associationTypeValue}&type1=${res.type}&id=${data.id}&deptCode=${code}&dept=${res.dept}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}`,
  1092. });
  1093. }
  1094. } else {
  1095. uni.navigateTo({
  1096. url: `../../pages/scanning_Result/scanning_Result?type=${
  1097. associationTypeValue
  1098. }&type1=${res.type}&id=${data.id}&status=600&msg=${
  1099. res.msg
  1100. }&isKs=${isKs}&model=${encodeURIComponent(
  1101. JSON.stringify(res)
  1102. )}&qrcode=${this.currentCode}`,
  1103. });
  1104. }
  1105. } else {
  1106. uni.navigateTo({
  1107. url: `../../pages/scanning_Result/scanning_Result?id=${data.id}&status=600&msg=扫码失败!请扫描正确的二维码!&isKs=${isKs}&qrcode=${this.currentCode}`,
  1108. });
  1109. }
  1110. });
  1111. }
  1112. },
  1113. // 填写交接人工号-确认
  1114. hosOk(data) {
  1115. console.log(data);
  1116. const {
  1117. accountName,
  1118. account,
  1119. accountId
  1120. } = data;
  1121. if (!accountName && !account) {
  1122. //没有填写交接人
  1123. uni.showModal({
  1124. title: '提示',
  1125. content: "请填写交接人工号!",
  1126. showCancel: false,
  1127. success: function(res) {
  1128. if (res.confirm) {
  1129. console.log('用户点击确定');
  1130. } else if (res.cancel) {
  1131. console.log('用户点击取消');
  1132. }
  1133. }
  1134. });
  1135. return;
  1136. } else if (!accountName && account || accountName && !account) {
  1137. //没有填写交接人
  1138. uni.showModal({
  1139. title: '提示',
  1140. content: "请填写正确的交接人工号!",
  1141. showCancel: false,
  1142. success: function(res) {
  1143. if (res.confirm) {
  1144. console.log('用户点击确定');
  1145. } else if (res.cancel) {
  1146. console.log('用户点击取消');
  1147. }
  1148. }
  1149. });
  1150. return;
  1151. }
  1152. this.hosModels.disjunctor = false;
  1153. let associationTypeValue = this.currentData.taskType.associationType.value;
  1154. console.log(associationTypeValue)
  1155. this.uploadToOther(this.currentData, data, 'start');
  1156. },
  1157. // 填写交接人工号-取消
  1158. hosCancel() {
  1159. this.hosModels.disjunctor = false;
  1160. },
  1161. // 填写交接人工号弹窗
  1162. showSelectAccount() {
  1163. this.hosModels = {
  1164. disjunctor: true,
  1165. }
  1166. },
  1167. // 拍照-上传
  1168. uploadToOther(data, accountObj, type){
  1169. // 其他临床服务拍照签到
  1170. console.log(data, 1111);
  1171. let id_seimin;
  1172. let asTypeValue_seimin;
  1173. let gdStateValue_seimin;
  1174. if (data.status != 200 && data.status !== undefined) {
  1175. id_seimin = data.id;
  1176. asTypeValue_seimin = data.type;
  1177. gdStateValue_seimin = JSON.parse(data.model).gdstate2; //type改成gdstate
  1178. } else {
  1179. id_seimin = data.id;
  1180. asTypeValue_seimin = data.taskType.associationType.value;
  1181. gdStateValue_seimin = data.gdState.value;
  1182. }
  1183. //#ifdef H5
  1184. uni.chooseImage({
  1185. count: 1,
  1186. sourceType: ['camera'],
  1187. success: (chooseImageRes) => {
  1188. console.log(chooseImageRes, pathUrl)
  1189. const tempFilePaths = chooseImageRes.tempFilePaths;
  1190. const tempFiles = chooseImageRes.tempFiles;
  1191. let tp = tempFilePaths[0];
  1192. uni.showLoading({
  1193. mask: true,
  1194. title: '加载中'
  1195. });
  1196. post('/workerOrder/findRecordInfoByOrderId', {
  1197. orderId: id_seimin,
  1198. gdOperate: 21,
  1199. }).then(result => {
  1200. console.log(result)
  1201. if (result.state == 200) {
  1202. uni.getImageInfo({
  1203. src: tp,
  1204. success: (res) => {
  1205. console.log('压缩前', res)
  1206. let canvasWidth = res.width //图片原始长宽
  1207. let canvasHeight = res.height
  1208. let img = new Image()
  1209. img.src = res.path
  1210. let canvas = document.createElement('canvas');
  1211. let ctx = canvas.getContext('2d')
  1212. canvas.width = canvasWidth
  1213. canvas.height = canvasHeight
  1214. ctx.drawImage(img, 0, 0, canvasWidth, canvasHeight)
  1215. canvas.toBlob((fileSrc) => {
  1216. tp = window.URL.createObjectURL(fileSrc)
  1217. console.log('压缩后', tp);
  1218. uni.uploadFile({
  1219. url: pathUrl + '/common/common/uploadAttachment/'+(type == 'start' ? 'orderStartPhoto' : 'orderEndPhoto')+'/' + id_seimin + '/' + result.recordId,
  1220. filePath: tp,
  1221. name: 'file',
  1222. formData: {
  1223. 'filename': tempFiles[0].name ? tempFiles[0].name.split('.')[0] + '.jpg' : tempFiles[
  1224. 0].path.split(
  1225. /[\\/]/).reverse()[0].split('.')[0] + '.jpg'
  1226. },
  1227. success: (uploadFileRes) => {
  1228. console.log(uploadFileRes, 10086, asTypeValue_seimin);
  1229. this.nextDeptOrder_ss(data, accountObj, type);
  1230. },
  1231. fail: err => {
  1232. console.error(err);
  1233. uni.hideLoading();
  1234. uni.showToast({
  1235. icon: 'none',
  1236. title: '上传失败',
  1237. duration: 2000
  1238. });
  1239. }
  1240. });
  1241. }, 'image/jpeg', 0.3)
  1242. },
  1243. fail: function () {
  1244. uni.hideLoading();
  1245. uni.showToast({
  1246. icon: 'none',
  1247. title: '上传失败',
  1248. duration: 2000
  1249. });
  1250. }
  1251. })
  1252. } else {
  1253. uni.hideLoading();
  1254. uni.showToast({
  1255. icon: "none",
  1256. title: result.msg || "接口获取数据失败!",
  1257. });
  1258. }
  1259. })
  1260. }
  1261. });
  1262. //#endif
  1263. //#ifdef APP-PLUS
  1264. uni.chooseImage({
  1265. count: 1,
  1266. sourceType: ['camera'],
  1267. sizeType: ['compressed'],
  1268. success: (chooseImageRes) => {
  1269. console.log(chooseImageRes, pathUrl)
  1270. const tempFilePaths = chooseImageRes.tempFilePaths;
  1271. const tempFiles = chooseImageRes.tempFiles;
  1272. let tp = tempFilePaths[0];
  1273. uni.showLoading({
  1274. mask: true,
  1275. title: '加载中'
  1276. });
  1277. post('/workerOrder/findRecordInfoByOrderId', {
  1278. orderId: id_seimin,
  1279. gdOperate: 21,
  1280. }).then(result => {
  1281. console.log(result)
  1282. if (result.state == 200) {
  1283. uni.compressImage({
  1284. src: tp,
  1285. quality: 30,
  1286. success: (res) => {
  1287. console.log('压缩前', res)
  1288. tp = res.tempFilePath;
  1289. console.log('压缩后', tp);
  1290. uni.uploadFile({
  1291. url: pathUrl + '/common/common/uploadAttachment/'+(type == 'start' ? 'orderStartPhoto' : 'orderEndPhoto')+'/' + id_seimin + '/' + result.recordId,
  1292. filePath: tp,
  1293. name: 'file',
  1294. formData: {
  1295. 'filename': tempFiles[0].name ? tempFiles[0].name.split('.')[0] + '.jpg' : tempFiles[
  1296. 0].path.split(
  1297. /[\\/]/).reverse()[0].split('.')[0] + '.jpg'
  1298. },
  1299. success: (uploadFileRes) => {
  1300. console.log(uploadFileRes, 10086, asTypeValue_seimin);
  1301. this.nextDeptOrder_ss(data, accountObj, type);
  1302. },
  1303. fail: err => {
  1304. console.error(err);
  1305. uni.hideLoading();
  1306. uni.showToast({
  1307. icon: 'none',
  1308. title: '上传失败',
  1309. duration: 2000
  1310. });
  1311. }
  1312. });
  1313. },
  1314. fail: function () {
  1315. uni.hideLoading();
  1316. uni.showToast({
  1317. icon: 'none',
  1318. title: '上传失败',
  1319. duration: 2000
  1320. });
  1321. }
  1322. })
  1323. } else {
  1324. uni.hideLoading();
  1325. uni.showToast({
  1326. icon: "none",
  1327. title: result.msg || "接口获取数据失败!",
  1328. });
  1329. }
  1330. })
  1331. }
  1332. });
  1333. //#endif
  1334. },
  1335. // 拍照-其他
  1336. async photographToOther(data, type) {
  1337. this.currentData = data;
  1338. uni.showLoading({
  1339. title: "加载中",
  1340. mask: true,
  1341. });
  1342. // 其他临床服务
  1343. let result = await post("/dept/scanning", {
  1344. content: type === 'start' ? data.startDept.qrcode : data.endDepts[0].qrcode,
  1345. taskTypeId: data.taskType.id,
  1346. gdState: data.gdState.id,
  1347. });
  1348. uni.hideLoading();
  1349. this.currentCode = result.code;
  1350. if (result.state == 200 || result.state == 201) {
  1351. uni.showModal({
  1352. title: '提示',
  1353. content: '请尽量拍摄角度覆盖清洁区域?',
  1354. success: (res) => {
  1355. if (res.confirm) {
  1356. if (result.account) {
  1357. this.uploadToOther(data, {
  1358. account: result.account,
  1359. accountName: result.name,
  1360. accountId: result.id,
  1361. }, type);
  1362. } else {
  1363. this.uploadToOther(data, undefined, type);
  1364. }
  1365. } else if (res.cancel) {
  1366. console.log('用户点击取消');
  1367. }
  1368. }
  1369. });
  1370. } else if (result.state == '0000') {
  1371. this.showSelectAccount();
  1372. } else {
  1373. uni.showToast({
  1374. icon: "none",
  1375. title: result.info || "接口获取数据失败!",
  1376. });
  1377. }
  1378. },
  1379. // 悬浮按钮点击事件
  1380. trigger(e) {
  1381. if (e.item.text === "我的任务") {
  1382. uni.navigateTo({
  1383. url: "../mypage/mypage",
  1384. });
  1385. } else if (e.item.text === "退出登录") {
  1386. // 假登录
  1387. uni.showToast({
  1388. title: "退出成功!",
  1389. });
  1390. let ip = uni.getStorageSync("ip"); //记住域名或ip
  1391. let username = uni.getStorageSync("username"); //记住用户名
  1392. let password = uni.getStorageSync("password"); //记住密码
  1393. let savePasswordTime = uni.getStorageSync("savePasswordTime"); //记住密码的时间戳
  1394. let clientid = uni.getStorageSync("clientid");
  1395. uni.clearStorageSync();
  1396. if (username) {
  1397. uni.setStorageSync("ip", ip); //记住域名或ip
  1398. uni.setStorageSync("username", username); //记住用户名
  1399. uni.setStorageSync("password", password); //记住密码
  1400. uni.setStorageSync("savePasswordTime", savePasswordTime); //记住密码的时间戳
  1401. }
  1402. uni.setStorageSync("clientid", clientid);
  1403. uni.navigateTo({
  1404. url: "../homePage/homePage",
  1405. });
  1406. // 假登录
  1407. deleteIt("/auth/logout2").then((result) => {
  1408. if (result.status == 200) {
  1409. uni.showToast({
  1410. title: "退出成功!",
  1411. });
  1412. let ip = uni.getStorageSync("ip"); //记住域名或ip
  1413. let username = uni.getStorageSync("username"); //记住用户名
  1414. let password = uni.getStorageSync("password"); //记住密码
  1415. let clientid = uni.getStorageSync("clientid");
  1416. uni.clearStorageSync();
  1417. uni.setStorageSync("ip", ip); //记住域名或ip
  1418. uni.setStorageSync("username", username); //记住用户名
  1419. uni.setStorageSync("password", password); //记住密码
  1420. uni.setStorageSync("clientid", clientid);
  1421. uni.navigateTo({
  1422. url: "../homePage/homePage",
  1423. });
  1424. } else {
  1425. uni.showToast({
  1426. icon: "none",
  1427. title: result.msg || "接口获取数据失败!",
  1428. });
  1429. }
  1430. });
  1431. } else if (e.item.text === "药房") {
  1432. uni.navigateTo({
  1433. url: "../pharmacy/pharmacy",
  1434. });
  1435. } else if (e.item.text === "患者信息") {
  1436. uni.navigateTo({
  1437. url: "../patientInformationList/patientInformationList",
  1438. });
  1439. } else if (e.item.text === "负责科室") {
  1440. if (uni.getStorageSync("setDepts")) {
  1441. uni.removeStorageSync("setDepts"); //清空选择的科室,初始化
  1442. }
  1443. let obj = uni.getStorageSync("setDeptConfg");
  1444. uni.navigateTo({
  1445. url: `../setDept/setDept?configName=${obj.configName}&id=${obj.id}&changedept=1`,
  1446. });
  1447. } else if (e.item.text === "检查信息") {
  1448. uni.navigateTo({
  1449. url: "../inspectList/inspectList",
  1450. });
  1451. } else if (e.item.text === "二维码设置") {
  1452. uni.navigateTo({
  1453. url: "../settingCode/settingCode",
  1454. });
  1455. } else if (e.item.text === "标本录入") {
  1456. this.showHandViewSpecimen();
  1457. } else if (e.item.text === "药品录入") {
  1458. this.showHandViewDrugsbag();
  1459. } else if (e.item.text === "摆药取药") {
  1460. this.handleTakeMedicine()
  1461. } else if (e.item.text === "我的二维码") {
  1462. this.myQrcodeHandler()
  1463. } else if (e.item.text === "科室二维码") {
  1464. this.departmentQrcodeHandler()
  1465. } else if (e.item.text === "查看表单") {
  1466. uni.navigateTo({
  1467. url: "../formManagementWechat/formManagementWechat",
  1468. });
  1469. } else if (e.item.text === "快捷接单") {
  1470. uni.navigateTo({
  1471. url: "../quickOrderAcceptanceWx/quickOrderAcceptanceWx",
  1472. });
  1473. } else if (e.item.text === "被服回收") {
  1474. this.quiltScan();
  1475. }
  1476. },
  1477. //确定
  1478. ok1() {
  1479. this.models1.disjunctor = false;
  1480. uni.showLoading({
  1481. title: "加载中",
  1482. mask: true,
  1483. });
  1484. post("/transflow/createOrTakeOrder", {
  1485. type: 'clothingGet',
  1486. id: 0,
  1487. startDeptId: this.quiltData.dept.id,
  1488. hosId: this.hosId,
  1489. }).then((res) => {
  1490. uni.hideLoading();
  1491. if (res.data && res.data.state == 200) {
  1492. uni.showModal({
  1493. title: "提示",
  1494. content: "建单成功",
  1495. showCancel: false,
  1496. success: (result) => {
  1497. if (result.confirm) {
  1498. console.log("用户点击确定");
  1499. uni.navigateTo({
  1500. url: `../quiltWashing/quiltWashingGetSignIn/quiltWashingGetSignIn?quiltCode=${this.quiltCode}&startDeptId=${this.quiltData.dept.id}&startDeptName=${this.quiltData.dept.dept}&orderId=${res.data.orderId}&name=${this.quiltData.name}`,
  1501. });
  1502. }
  1503. },
  1504. });
  1505. }else{
  1506. uni.showToast({
  1507. icon: "none",
  1508. title: res.data ? res.data.msg : "接口获取数据失败!",
  1509. });
  1510. }
  1511. });
  1512. },
  1513. //取消
  1514. cancel1() {
  1515. this.models1.disjunctor = false;
  1516. },
  1517. // 被服回收弹窗
  1518. showQuiltData(data) {
  1519. this.quiltData = data;
  1520. this.models1 = {
  1521. disjunctor: true,
  1522. title: "提示",
  1523. content: `您扫描的是${data.name}的工号,是否建立${data.dept.dept}的被服回收工单吗?`,
  1524. icon: "warn",
  1525. operate: {
  1526. ok: "建立工单",
  1527. cancel: "取消",
  1528. },
  1529. };
  1530. },
  1531. // 扫描工牌-被服洗涤
  1532. quiltScan() {
  1533. if (!this.SMFlag) {
  1534. return;
  1535. }
  1536. this.SMFlag = false;
  1537. SM().then((content) => {
  1538. uni.showLoading({
  1539. title: "加载中",
  1540. mask: true,
  1541. });
  1542. //检验二维码的有效性(扫码前必须验证)
  1543. post("/dept/scanning", {
  1544. content,
  1545. })
  1546. .then((result) => {
  1547. this.quiltCode = result.code;
  1548. this.SMFlag = true;
  1549. // 200检测通过,201没有有效期也通过。
  1550. if (result.state == 200 || result.state == 201) {
  1551. let data = {
  1552. code: this.quiltCode, //二维码
  1553. };
  1554. post("/transflow/bigScan", { type: 'clothingGet', code: this.quiltCode })
  1555. .then((res) => {
  1556. uni.hideLoading();
  1557. if (res.state == 200) {
  1558. this.showQuiltData(res.data)
  1559. } else {
  1560. uni.navigateTo({
  1561. url: `../scanning_Result/scanning_Result?status=${res.state}&msg=${res.msg}&qrcode=${this.quiltCode}`,
  1562. });
  1563. }
  1564. });
  1565. } else {
  1566. uni.hideLoading();
  1567. uni.showToast({
  1568. icon: "none",
  1569. title: result.info || "接口获取数据失败!",
  1570. });
  1571. }
  1572. })
  1573. }).catch(err => {
  1574. this.SMFlag = true;
  1575. });
  1576. },
  1577. // 我的二维码
  1578. myQrcodeHandler(){
  1579. this.showMyQrcodeModel = {
  1580. disjunctor: true,
  1581. };
  1582. },
  1583. closeMyQrcodeModel(){
  1584. this.showMyQrcodeModel.disjunctor = false;
  1585. },
  1586. // 科室二维码
  1587. departmentQrcodeHandler(){
  1588. this.showDepartmentQrcodeModel = {
  1589. disjunctor: true,
  1590. };
  1591. },
  1592. closeDepartmentQrcodeModel(){
  1593. this.showDepartmentQrcodeModel.disjunctor = false;
  1594. },
  1595. // 摆药取药
  1596. handleTakeMedicine() {
  1597. if (!this.SMFlag) {
  1598. return;
  1599. }
  1600. this.SMFlag = false;
  1601. SM().then((content) => {
  1602. uni.showLoading({
  1603. title: "加载中",
  1604. mask: true,
  1605. });
  1606. //检验二维码的有效性(扫码前必须验证)
  1607. post("/dept/scanning", {
  1608. content,
  1609. })
  1610. .then((result) => {
  1611. this.currentCode = result.code;
  1612. this.SMFlag = true;
  1613. // 200检测通过,201没有有效期也通过。
  1614. if (result.state == 200 || result.state == 201) {
  1615. uni.hideLoading();
  1616. uni.navigateTo({
  1617. url: `../promptPage/promptPage?code=${result.code}`,
  1618. });
  1619. } else {
  1620. uni.hideLoading();
  1621. uni.showToast({
  1622. icon: "none",
  1623. title: result.info || "接口获取数据失败!",
  1624. });
  1625. }
  1626. })
  1627. }).catch(err => {
  1628. this.SMFlag = true;
  1629. });
  1630. },
  1631. // 点击tab页切换
  1632. clickHandler(key) {
  1633. this.selectedLabelSlots = key;
  1634. this.idx = 0;
  1635. this.totalNum = -1;
  1636. // this.zxzData = [];
  1637. this.scroll_top = Math.random(); //回到顶部
  1638. if (key === "待接单") {
  1639. this.waitingOrders(0);
  1640. } else if (key === "执行中") {
  1641. this.executingOrders(0);
  1642. }
  1643. },
  1644. // 进入详情页
  1645. itemInfo(workOrder) {
  1646. console.log(workOrder);
  1647. uni.navigateTo({
  1648. url: `../receipt_infopage/receipt_infopage?id=${workOrder.id}&associationTypeValue=${workOrder.taskType.associationType.value}&associationTypeId=${workOrder.taskType.associationType.id}&taskTypeId=${workOrder.taskType.id}`,
  1649. });
  1650. },
  1651. //抢单后知道了
  1652. know() {
  1653. this.models.disjunctor = false;
  1654. this.idx = 0;
  1655. this.totalNum = -1;
  1656. // this.zxzData = [];
  1657. this.executingOrdersGetNum();
  1658. this.waitingOrders(0); //seimin
  1659. this.scroll_top = Math.random(); //回到顶部
  1660. },
  1661. //抢单确定
  1662. ok() {
  1663. this.models.disjunctor = false;
  1664. get("/workerOrder/takeOrder/" + this.qdId.id).then((res) => {
  1665. let msg = "接单失败";
  1666. let icon = "error";
  1667. if (res.status == 200) {
  1668. msg = "接单成功";
  1669. icon = "success";
  1670. }
  1671. this.models = {
  1672. disjunctor: true,
  1673. content: msg,
  1674. icon: icon,
  1675. operate: {
  1676. know: "知道了",
  1677. },
  1678. };
  1679. });
  1680. },
  1681. //抢单取消
  1682. cancel() {
  1683. this.models.disjunctor = false;
  1684. },
  1685. // 抢单
  1686. showAlerts(data) {
  1687. this.qdId = data;
  1688. this.models = {
  1689. disjunctor: true,
  1690. title: "提示",
  1691. content: "是否确定接单?",
  1692. icon: "warn",
  1693. operate: {
  1694. ok: "确定",
  1695. cancel: "取消",
  1696. },
  1697. };
  1698. },
  1699. //执行中列表数据获取
  1700. executingOrders(idx) {
  1701. console.log(this.zxzData.length, this.totalNum);
  1702. if (this.zxzData.length == this.totalNum) {
  1703. uni.showToast({
  1704. icon: "none",
  1705. title: "没有更多数据了!",
  1706. });
  1707. this.freshing = true;
  1708. return;
  1709. }
  1710. let data = {
  1711. idx,
  1712. sum: 20,
  1713. };
  1714. // if (this.arrayKey) {
  1715. // data.keyWord = this.arrayKey;
  1716. // } else {
  1717. // delete data.keyWord;
  1718. // }
  1719. if (this.currentId) {
  1720. data.keyWord = this.currentId;
  1721. } else {
  1722. delete data.keyWord;
  1723. }
  1724. if (this.deptName) {
  1725. data.deptName = this.deptName;
  1726. } else {
  1727. delete data.deptName;
  1728. }
  1729. uni.showLoading({
  1730. title: "加载中",
  1731. mask: true,
  1732. });
  1733. post("/workerOrder/executingOrders", data).then((res) => {
  1734. uni.hideLoading();
  1735. if (res.status == 200) {
  1736. this.triggered = false;
  1737. this.freshing = true;
  1738. this.totalNum = res.data.resultCount;
  1739. res.data.data = res.data.data || [];
  1740. res.data.data.forEach(v => {
  1741. v.clinicalTaskIdsFlag = this.clinicalTaskIds.includes(v.taskType.id.toString());
  1742. })
  1743. if (idx === 0) {
  1744. this.zxzData = res.data.data;
  1745. } else {
  1746. this.zxzData.push(...res.data.data);
  1747. }
  1748. this.tabs[1].num = res.data.resultCount;
  1749. } else {
  1750. uni.showToast({
  1751. icon: "none",
  1752. title: res.msg || "接口获取数据失败!",
  1753. });
  1754. }
  1755. });
  1756. },
  1757. //待抢单列表数据获取
  1758. waitingOrders(idx) {
  1759. if (this.zxzData.length == this.totalNum) {
  1760. uni.showToast({
  1761. icon: "none",
  1762. title: "没有更多数据了!",
  1763. });
  1764. this.freshing = true;
  1765. return;
  1766. }
  1767. let data = {
  1768. idx,
  1769. sum: 20,
  1770. };
  1771. uni.showLoading({
  1772. title: "加载中",
  1773. mask: true,
  1774. });
  1775. // 请求列表数据
  1776. post("/workerOrder/waitingOrders", data).then((res) => {
  1777. uni.hideLoading();
  1778. if (res.status == 200) {
  1779. this.triggered = false;
  1780. this.freshing = true;
  1781. this.totalNum = res.data.resultCount;
  1782. if (idx === 0) {
  1783. this.zxzData = res.data.data;
  1784. } else {
  1785. this.zxzData.push(...res.data.data);
  1786. }
  1787. this.tabs[0].num = res.data.resultCount;
  1788. } else {
  1789. uni.showToast({
  1790. icon: "none",
  1791. title: res.msg || "接口获取数据失败!",
  1792. });
  1793. }
  1794. });
  1795. },
  1796. //刷新
  1797. refresherrefresh() {
  1798. if (this.triggered) {
  1799. return;
  1800. }
  1801. this.triggered = true;
  1802. this.idx = 0;
  1803. this.totalNum = -1;
  1804. if (this.selectedLabelSlots == "待接单") {
  1805. this.waitingOrders(0);
  1806. } else if (this.selectedLabelSlots == "执行中") {
  1807. this.executingOrders(0);
  1808. }
  1809. },
  1810. // 滚动
  1811. scroll(e) {
  1812. if (e.detail.scrollTop < 20) {
  1813. this.scroll_refresher_enabled = true;
  1814. } else {
  1815. this.scroll_refresher_enabled = false;
  1816. }
  1817. },
  1818. // 下拉刷新复位
  1819. refresherrestore() {
  1820. this.triggered = false;
  1821. console.log("下拉刷新复位");
  1822. },
  1823. //下拉刷新中止
  1824. refresherabort() {
  1825. this.triggered = false;
  1826. console.log("下拉刷新中止");
  1827. },
  1828. //分页,上拉加载
  1829. scrolltolower() {
  1830. if (this.freshing) {
  1831. this.freshing = false;
  1832. if (this.selectedLabelSlots == "待接单") {
  1833. this.waitingOrders(++this.idx);
  1834. } else if (this.selectedLabelSlots == "执行中") {
  1835. this.executingOrders(++this.idx);
  1836. }
  1837. }
  1838. },
  1839. // 执行中获取数字
  1840. executingOrdersGetNum() {
  1841. let data = {
  1842. idx: 0,
  1843. sum: 20,
  1844. };
  1845. if (this.arrayKey) {
  1846. data.keyWord = this.arrayKey;
  1847. } else {
  1848. delete data.keyWord;
  1849. }
  1850. post("/workerOrder/executingOrders", data).then((res) => {
  1851. if (res.status == 200) {
  1852. this.tabs[1].num = res.data.resultCount;
  1853. } else {
  1854. uni.showToast({
  1855. icon: "none",
  1856. title: res.msg || "接口获取数据失败!",
  1857. });
  1858. }
  1859. });
  1860. },
  1861. // 待接单获取数字
  1862. waitingOrdersGetNum() {
  1863. let data = {
  1864. idx: 0,
  1865. sum: 20,
  1866. };
  1867. post("/workerOrder/waitingOrders", data).then((res) => {
  1868. if (res.status == 200) {
  1869. this.tabs[0].num = res.data.resultCount;
  1870. } else {
  1871. uni.showToast({
  1872. icon: "none",
  1873. title: res.msg || "接口获取数据失败!",
  1874. });
  1875. }
  1876. });
  1877. },
  1878. // 阻止浏览器滑动
  1879. stop(e) {
  1880. e.preventDefault();
  1881. },
  1882. // 更新用户所在科室
  1883. updateUser(dept) {
  1884. post("/user/data/bindDutyDept", {dutyDept: +dept.id}).then((res) => {
  1885. if (res.status == 200) {
  1886. this.getCurrentUserNow();
  1887. }else{
  1888. uni.showToast({
  1889. icon: "none",
  1890. title: res.msg || "接口获取数据失败!",
  1891. });
  1892. }
  1893. })
  1894. },
  1895. // 重新获取用户信息
  1896. getCurrentUserNow() {
  1897. get("/user/data/getCurrentUser").then((res) => {
  1898. if (res.status == 200) {
  1899. let userData = uni.getStorageSync('userData');
  1900. userData.user = res.data;
  1901. uni.setStorageSync('userData', userData);
  1902. // 显示科室二维码
  1903. this.departmentQrcodeHandler()
  1904. }else{
  1905. uni.showToast({
  1906. icon: "none",
  1907. title: res.msg || "接口获取数据失败!",
  1908. });
  1909. }
  1910. })
  1911. },
  1912. },
  1913. onLoad(options) {
  1914. console.log(options, 'options');
  1915. // 获取菜单权限
  1916. this.getMenu();
  1917. post("/auth/getUserWorkDept", {}).then((ress) => {
  1918. if (ress.status == 200) {
  1919. let userId = uni.getStorageSync("userData").user.id;
  1920. let groupManager = ress.settings && ress.settings.groupManager; //当前工作组合选择的组
  1921. let workType = ress.settings ? ress.settings.workType : -1; //1是综合,2是自主
  1922. let ruleType = ress.settings ? ress.settings.ruleType : -1; //3是科室绑定人员,4是科室绑定分组,2是绑定分组
  1923. if (workType == 2 && (ruleType == 3 || (ruleType == 4 && userId == groupManager.manager))) {
  1924. //自选排班,科室绑定分组,当前登陆人是组长
  1925. this.content.unshift({
  1926. text: "负责科室",
  1927. });
  1928. }
  1929. }
  1930. });
  1931. // let setDeptConfg = uni.getStorageSync("setDeptConfg");
  1932. // let manager = uni.getStorageSync("manager");
  1933. // let userId = uni.getStorageSync("userData").user.id;
  1934. // console.log(setDeptConfg, manager, userId);
  1935. // if (
  1936. // setDeptConfg.workSchemeType == 2 &&
  1937. // (setDeptConfg.ruleType == 3 ||
  1938. // (setDeptConfg.ruleType == 4 && userId == manager))
  1939. // ) {
  1940. // //自选排班,科室绑定人员 || 科室绑定分组 && 组长是当前登陆人
  1941. // this.content.unshift({
  1942. // text: "负责科室",
  1943. // });
  1944. // }
  1945. // #ifdef APP-PLUS
  1946. // this.content.push({
  1947. // text: "退出登录",
  1948. // });
  1949. // #endif
  1950. this.selectedLabelSlots = "执行中";
  1951. this.initList();
  1952. // 科室二维码切换科室回显
  1953. if (options.showDepartmentQrcodeId && options.showDepartmentQrcodeDept) {
  1954. this.updateUser({id: options.showDepartmentQrcodeId, dept: options.showDepartmentQrcodeDept})
  1955. }
  1956. // #ifdef APP-PLUS
  1957. webHandle("no", "app");
  1958. // #endif
  1959. // #ifdef H5
  1960. webHandle("no", "wx");
  1961. // #endif
  1962. },
  1963. onShow() {
  1964. this.SMFlag = true;
  1965. // #ifdef H5
  1966. document.body.addEventListener("touchmove", this.stop, {
  1967. passive: false,
  1968. });
  1969. // #endif
  1970. },
  1971. onHide() {
  1972. // #ifdef H5
  1973. document.body.removeEventListener("touchmove", this.stop, {
  1974. passive: false,
  1975. });
  1976. // #endif
  1977. },
  1978. };
  1979. </script>
  1980. <style lang="less">
  1981. .Receiptpage {
  1982. width: 100%;
  1983. height: 100%;
  1984. position: relative;
  1985. .execFilterMask{
  1986. position: fixed;
  1987. top: 0;
  1988. right: 0;
  1989. bottom: 0;
  1990. left: 0;
  1991. z-index: 9999;
  1992. background-color: rgba(0, 0, 0, 0.5);
  1993. display: flex;
  1994. flex-direction: column;
  1995. justify-content: flex-end;
  1996. .execFilter{
  1997. position: relative;
  1998. background-color: #fff;
  1999. height: 90vh;
  2000. border-radius: 100rpx 100rpx 0 0;
  2001. .execFilterHeader{
  2002. height: 100rpx;
  2003. display: flex;
  2004. justify-content: center;
  2005. align-items: center;
  2006. border-bottom: 2rpx solid #ccc;
  2007. }
  2008. .execFilterBody{
  2009. .execFilterItem{
  2010. padding: 40rpx;
  2011. border-bottom: 2rpx dashed #ccc;
  2012. &:last-of-type{
  2013. border-bottom: none;
  2014. }
  2015. .execFilterItemHeader{}
  2016. .execFilterItemBody{
  2017. display: flex;
  2018. flex-wrap: wrap;
  2019. padding: 40rpx 0 0;
  2020. justify-content: space-between;
  2021. text-align: left;
  2022. .execFilterItemBox{
  2023. width: 200rpx;
  2024. height: 80rpx;
  2025. text-align: center;
  2026. line-height: 80rpx;
  2027. background-color: #f6f6f6;
  2028. margin-bottom: 20rpx;
  2029. border-radius: 80rpx;
  2030. &.active{
  2031. color: #fff;
  2032. background-color: #49b856;
  2033. }
  2034. }
  2035. .deptName {
  2036. height: 80rpx;
  2037. background-color: #f6f6f6;
  2038. border-radius: 20rpx;
  2039. padding: 0 20rpx;
  2040. }
  2041. }
  2042. }
  2043. }
  2044. .execFilterFooter {
  2045. position: absolute;
  2046. bottom: 0;
  2047. right: 0;
  2048. left: 0;
  2049. line-height: 66rpx;
  2050. height: 100rpx;
  2051. display: flex;
  2052. justify-content: space-between;
  2053. .btn {
  2054. height: 66rpx;
  2055. flex: 1;
  2056. margin: 0 1%;
  2057. background-image: linear-gradient(to right, #72c172, #3bb197);
  2058. color: #fff;
  2059. border-radius: 8rpx;
  2060. font-size: 28rpx;
  2061. margin-top: 16rpx;
  2062. text-align: center;
  2063. }
  2064. }
  2065. }
  2066. }
  2067. .more {
  2068. position: absolute;
  2069. right: 20rpx;
  2070. width: 40rpx;
  2071. height: 4rpx;
  2072. border-top: 2px solid #49b856;
  2073. border-bottom: 2px solid #49b856;
  2074. background-color: #49b856;
  2075. padding: 5px 0;
  2076. background-clip: content-box;
  2077. z-index: 9999;
  2078. top: 50%;
  2079. transform: translateY(-50%);
  2080. }
  2081. .more_picker {
  2082. position: absolute;
  2083. right: 0;
  2084. height: 100%;
  2085. opacity: 0;
  2086. z-index: 9999;
  2087. }
  2088. .bigScreenWrap{
  2089. position: fixed;
  2090. left: 0;
  2091. right: 0;
  2092. bottom: 30rpx;
  2093. z-index: 999;
  2094. height: 88rpx;
  2095. }
  2096. .red {
  2097. color: red !important;
  2098. font-weight: bold !important;
  2099. }
  2100. .page_tab {
  2101. width: 100%;
  2102. height: 96rpx;
  2103. display: flex;
  2104. position: fixed;
  2105. left: 0;
  2106. top: 0;
  2107. z-index: 999;
  2108. .page_tab_bar {
  2109. flex: 1;
  2110. font-size: 36rpx;
  2111. background: #fff;
  2112. display: flex;
  2113. justify-content: center;
  2114. align-items: center;
  2115. position: relative;
  2116. &:after {
  2117. content: "";
  2118. position: absolute;
  2119. left: 0;
  2120. bottom: 0;
  2121. height: 2rpx;
  2122. width: 100%;
  2123. background-color: transparent;
  2124. }
  2125. .tab_num {
  2126. color: #ff3b53;
  2127. margin-left: 8rpx;
  2128. }
  2129. &.active {
  2130. color: #49b856;
  2131. &:after {
  2132. background-color: #49b856;
  2133. }
  2134. }
  2135. }
  2136. }
  2137. .zwsj {
  2138. position: absolute;
  2139. left: 50%;
  2140. top: 180rpx;
  2141. transform: translateX(-50%);
  2142. .zwsj-img {
  2143. width: 560rpx;
  2144. }
  2145. .zwsj-txt {
  2146. font-size: 36rpx;
  2147. font-weight: 700;
  2148. margin-top: 20rpx;
  2149. text-align: center;
  2150. }
  2151. }
  2152. .page_items {
  2153. height: calc(100vh - 214rpx);
  2154. padding: 0 20rpx;
  2155. // padding-bottom: 88rpx;
  2156. padding-top: 96rpx;
  2157. .page_items_scroll {
  2158. height: 100%;
  2159. .page_item_wrap {
  2160. position: relative;
  2161. margin-bottom: 32rpx;
  2162. .page_item {
  2163. margin-bottom: 16rpx;
  2164. // min-height: 356rpx;
  2165. background: #fff;
  2166. border-radius: 8rpx;
  2167. overflow: hidden;
  2168. border: 2rpx solid #e5e9ed;
  2169. .L {
  2170. width: 40rpx;
  2171. height: 40rpx;
  2172. border-radius: 50%;
  2173. background: #f9fafb;
  2174. position: absolute;
  2175. left: -24rpx;
  2176. top: 68rpx;
  2177. border: 2rpx solid #e5e9ed;
  2178. }
  2179. .R {
  2180. width: 40rpx;
  2181. height: 40rpx;
  2182. border-radius: 50%;
  2183. background: #f9fafb;
  2184. position: absolute;
  2185. float: right;
  2186. right: -24rpx;
  2187. top: 68rpx;
  2188. border: 2rpx solid #e5e9ed;
  2189. }
  2190. .starting {
  2191. width: 40rpx;
  2192. height: 40rpx;
  2193. color: #fff;
  2194. background: #49b856;
  2195. display: inline-block;
  2196. border-radius: 50%;
  2197. text-align: center;
  2198. line-height: 40rpx;
  2199. font-size: 28rpx;
  2200. }
  2201. .End {
  2202. width: 40rpx;
  2203. height: 40rpx;
  2204. color: #fff;
  2205. background: #39b199;
  2206. display: inline-block;
  2207. border-radius: 50%;
  2208. text-align: center;
  2209. line-height: 40rpx;
  2210. font-size: 28rpx;
  2211. }
  2212. .page_item_top {
  2213. height: 86rpx;
  2214. border-bottom: 2rpx dashed #e5e9ed;
  2215. padding: 0 16rpx;
  2216. .page_item_top_L {
  2217. height: 100%;
  2218. float: left;
  2219. line-height: 88rpx;
  2220. display: flex;
  2221. align-items: center;
  2222. .emergencys {
  2223. background: #ff3b53 !important;
  2224. width: 124rpx !important;
  2225. }
  2226. .emergency {
  2227. background: #ff3b53 !important;
  2228. }
  2229. .emergency1 {
  2230. background: #49b856 !important;
  2231. }
  2232. .page_item_cont_start {
  2233. text-align: center;
  2234. height: 44rpx;
  2235. width: 104rpx;
  2236. line-height: 44rpx;
  2237. border-radius: 8rpx;
  2238. background: #49b856;
  2239. color: #fff;
  2240. .page_item_cont_start-img {
  2241. width: 22rpx;
  2242. position: relative;
  2243. top: 6rpx;
  2244. margin-right: 8rpx;
  2245. }
  2246. }
  2247. .L_iocn {
  2248. display: inline-block;
  2249. width: 44rpx;
  2250. height: 44rpx;
  2251. line-height: 42rpx;
  2252. border-radius: 100rpx;
  2253. color: #6cc076;
  2254. font-size: 32rpx;
  2255. border: 4rpx solid #6cc076;
  2256. background: #f0f6ed;
  2257. text-align: center;
  2258. margin-right: 8rpx;
  2259. }
  2260. .L_time {
  2261. color: #6cc076;
  2262. font-size: 32rpx;
  2263. }
  2264. .L_text {
  2265. font-size: 32rpx;
  2266. }
  2267. }
  2268. .page_item_top_R {
  2269. height: 100%;
  2270. float: right;
  2271. line-height: 88rpx;
  2272. font-size: 32rpx;
  2273. &.type {
  2274. margin-right: 32rpx;
  2275. color: red;
  2276. max-width: 260rpx;
  2277. white-space: nowrap;
  2278. text-overflow: ellipsis;
  2279. overflow: hidden;
  2280. }
  2281. .text_big{
  2282. font-weight: bold;
  2283. }
  2284. }
  2285. }
  2286. .page_item_cont {
  2287. min-height: 180rpx;
  2288. padding: 0 16rpx;
  2289. text-align: left;
  2290. position: relative;
  2291. display: flex;
  2292. flex-direction: column;
  2293. justify-content: space-between;
  2294. .text_big {
  2295. font-size: 32rpx;
  2296. margin-left: 10rpx;
  2297. font-weight: 700;
  2298. }
  2299. .line {
  2300. height: 100%;
  2301. width: 2rpx;
  2302. border-left: 2rpx solid #e5e9ed;
  2303. position: absolute;
  2304. // top: 70rpx;
  2305. top: 50%;
  2306. left: 20rpx;
  2307. transform: translateY(-50%);
  2308. }
  2309. .lines {
  2310. height: 40%;
  2311. width: 2rpx;
  2312. border-left: 2rpx solid #e5e9ed;
  2313. position: absolute;
  2314. top: 23%;
  2315. left: 36rpx;
  2316. }
  2317. .emergencys {
  2318. background: #ff3b53 !important;
  2319. width: 124rpx !important;
  2320. }
  2321. .emergency {
  2322. background: #ff3b53 !important;
  2323. }
  2324. .emergency1 {
  2325. background: #49b856 !important;
  2326. }
  2327. .page_item_cont_T {
  2328. // min-height: 80rpx;
  2329. // max-height: 324rpx;
  2330. font-size: 28rpx;
  2331. margin-top: 16rpx;
  2332. display: flex;
  2333. justify-content: space-between;
  2334. .page_item_cont_title {
  2335. height: 100%;
  2336. // float: left;
  2337. }
  2338. .page_item_cont_start {
  2339. text-align: center;
  2340. // float: right;
  2341. height: 44rpx;
  2342. width: 104rpx;
  2343. line-height: 44rpx;
  2344. border-radius: 8rpx;
  2345. background: #49b856;
  2346. color: #fff;
  2347. .page_item_cont_start-img {
  2348. width: 22rpx;
  2349. position: relative;
  2350. top: 6rpx;
  2351. margin-right: 8rpx;
  2352. }
  2353. }
  2354. }
  2355. .page_item_conts {
  2356. min-height: 30rpx;
  2357. color: rgb(102, 102, 102);
  2358. padding-left: 50rpx;
  2359. font-size: 28rpx;
  2360. margin: 16rpx 0;
  2361. position: relative;
  2362. view:not(.line) {
  2363. line-height: 1.2;
  2364. }
  2365. text {
  2366. color: #49b856;
  2367. }
  2368. }
  2369. .page_item_cont_B {
  2370. // padding-top: 20rpx;
  2371. font-size: 28rpx;
  2372. // overflow: hidden;
  2373. margin-bottom: 16rpx;
  2374. .page_item_cont_title {
  2375. height: 100%;
  2376. float: left;
  2377. }
  2378. }
  2379. }
  2380. .page_item_btn_wrap {
  2381. display: flex;
  2382. justify-content: space-between;
  2383. .page_item_btn {
  2384. height: 88rpx;
  2385. flex: 1;
  2386. margin-left: 1%;
  2387. margin-right: 1%;
  2388. background-image: linear-gradient(to right, #72c172, #3bb197);
  2389. border-radius: 8rpx;
  2390. line-height: 88rpx;
  2391. color: #fff;
  2392. font-size: 36rpx;
  2393. font-weight: 700;
  2394. text-align: center;
  2395. }
  2396. }
  2397. .page_item_btn {
  2398. height: 88rpx;
  2399. background-image: linear-gradient(to right, #72c172, #3bb197);
  2400. border-radius: 8rpx;
  2401. line-height: 88rpx;
  2402. color: #fff;
  2403. font-size: 36rpx;
  2404. font-weight: 700;
  2405. text-align: center;
  2406. }
  2407. }
  2408. .L-l {
  2409. width: 2rpx;
  2410. height: 40rpx;
  2411. background: #f9fafb;
  2412. position: absolute;
  2413. left: 20rpx;
  2414. top: 72rpx;
  2415. display: none;
  2416. }
  2417. .R-l {
  2418. width: 2rpx;
  2419. height: 40rpx;
  2420. background: #f9fafb;
  2421. position: absolute;
  2422. right: 20rpx;
  2423. top: 72rpx;
  2424. display: none;
  2425. }
  2426. }
  2427. }
  2428. }
  2429. .text {
  2430. font-size: 36rpx;
  2431. }
  2432. .wt_icon {
  2433. font-size: 40rpx;
  2434. }
  2435. }
  2436. </style>