receiptpage.vue 126 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547
  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.prevent="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-if="item.taskType.associationType.value == 'ordinary' && (item.taskType.ordinaryField.value == 'drugsJpbag' || item.taskType.ordinaryField.value == 'drugsWestern' || item.taskType.ordinaryField.value == 'drugsReturn' || item.taskType.ordinaryField.value == 'drugsPoison' || item.taskType.ordinaryField.value == 'drugsHerbal')">
  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_conts" v-else>
  224. <view v-if="item.overdueTime">{{ item.overdueTime }}前送达</view>
  225. <view>
  226. 预约时间 : {{ item.yyjdTime | yyTimeFilter}}
  227. </view>
  228. <view style="word-break: break-all;" v-if="item.workOrderRemark">
  229. 备注信息 :
  230. <text>{{ item.workOrderRemark || "暂无" }}</text>
  231. </view>
  232. <view class="line"></view>
  233. </view>
  234. <view class="page_item_cont_B">
  235. <view class="page_item_cont_title" v-if="item.taskType.associationType.value != 'inspect'">
  236. <text> <text class="End">终</text> 点科室 </text>
  237. <text class="text_big" v-for="(dept, i) of item.endDepts" :key="i">{{ dept.dept }}</text>
  238. </view>
  239. <view class="page_item_cont_title" v-if="item.taskType.associationType.value == 'inspect'">
  240. <text> <text class="End">检</text> 查科室 </text>
  241. <text class="text_big" v-for="(dept, i) of item.middleDept" :key="i">{{ dept.dept }}</text>
  242. </view>
  243. </view>
  244. </view>
  245. <view v-if="
  246. item.taskType.associationType.value == 'inspect' ||
  247. item.taskType.associationType.value == 'patientTransport'
  248. ">
  249. <!-- 待抢单 -->
  250. <text class="red" v-if="item.gdState.value == 2">请扫描患者腕带,或者请扫描科室码</text>
  251. <!-- 待到达 -->
  252. <text class="red" v-if="item.gdState.value == 4">请扫描患者腕带</text>
  253. <!-- 执行中 -->
  254. <text class="red" v-if="item.gdState.value == 8">请扫描检查科室码,并扫描患者腕带</text>
  255. <!-- 待送达 -->
  256. <text class="red" v-if="item.gdState.value == 5">请扫描终点科室码,并扫描患者腕带</text>
  257. </view>
  258. <view v-if="item.taskType.associationType.value == 'ordinary' && item.taskType.ordinaryField.value == 'clothingGet'">
  259. <!-- 待送达 -->
  260. <text class="red" v-if="item.gdState.value == 5">请扫描终点科室二维码</text>
  261. </view>
  262. <view v-if="item.taskType.associationType.value == 'ordinary' && item.taskType.ordinaryField.value == 'clothingSend'">
  263. <!-- 待到达 -->
  264. <text class="red" v-if="item.gdState.value == 4">请扫描起点科室二维码</text>
  265. <!-- 待送达 -->
  266. <text class="red" v-if="item.gdState.value == 5">请扫描终点科室二维码</text>
  267. </view>
  268. <view v-else-if="item.taskType.associationType.value == 'other'">
  269. <!-- 待到达 -->
  270. <text class="red" v-if="item.gdState.value == 4 && item.taskType.carryingCourses[0].checkoutMethod.value == 1">可通过扫描科室码或者拍照进行签到</text>
  271. <text class="red" v-if="item.gdState.value == 4 && item.taskType.carryingCourses[0].checkoutMethod.value == 2">扫描交接人员二维码进行交接</text>
  272. </view>
  273. <!-- 如果不是患者陪检或患者转运或其他,万能交接 -->
  274. <view class="page_item_btn" v-if="
  275. selectedLabelSlots == '执行中' &&
  276. item.taskType.associationType.value != 'patientTransport' &&
  277. item.taskType.associationType.value != 'inspect' &&
  278. item.taskType.associationType.value != 'other' &&
  279. item.taskType.associationType.value != 'ordinary' &&
  280. !(item.taskType.associationType.value == 'specimen' && item.taskType.carryingCourses[1].checkoutMethod.value == 3 && item.gdState.value == 5)
  281. " hover-class="seimin-btn-hover">
  282. <smallScreen :sData="item" :sType="2">扫码</smallScreen>
  283. </view>
  284. <!-- 如果不是静配,药配,标本配送,标本轮巡,万能交接 -->
  285. <view class="page_item_btn_wrap" v-if="
  286. selectedLabelSlots == '执行中' &&
  287. item.taskType.associationType.value != 'jPBag' &&
  288. item.taskType.associationType.value != 'drugsBag' &&
  289. item.taskType.associationType.value != 'specimen' &&
  290. item.taskType.associationType.value != 'specimenPlan' &&
  291. item.taskType.associationType.value != 'ordinary'
  292. ">
  293. <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">
  294. <smallScreen :sData="item" :sType="1">扫码</smallScreen>
  295. </view>
  296. <!-- 其他临床服务-完成工单-待到达 -->
  297. <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>
  298. <!-- 其他临床服务-完成工单-待送达 -->
  299. <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>
  300. <!-- 其他临床服务-拍照 -->
  301. <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>
  302. <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>
  303. <!-- 其他临床服务-追加 -->
  304. <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>
  305. </view>
  306. <!-- 如果是万能交接-血制品 -->
  307. <view class="page_item_btn_wrap" v-if="selectedLabelSlots == '执行中' && item.taskType.associationType.value == 'ordinary' && signType4 && item.taskType.ordinaryField.value == 'blood'">
  308. <!-- 送达交接 -->
  309. <view class="page_item_btn" @click="goTobloodEnd(item)" hover-class="seimin-btn-hover" v-if="delivery === 1 && item.gdState.value == 5">送达交接</view>
  310. <!-- 领血证 -->
  311. <view class="page_item_btn" @click="certificatHandler(item)" hover-class="seimin-btn-hover" v-if="useTakeCode == 1">领血证</view>
  312. </view>
  313. <!-- 如果是万能交接-被服洗涤送回 -->
  314. <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">
  315. <view class="page_item_btn" @click="goToWashingEnd(item)" hover-class="seimin-btn-hover">核对被服</view>
  316. </view>
  317. <view class="page_item_btn" v-if="selectedLabelSlots == '待接单'" @click="showAlerts(item)" hover-class="seimin-btn-hover">接单</view>
  318. </view>
  319. <view class="L-l"></view>
  320. <view class="R-l"></view>
  321. </view>
  322. </scroll-view>
  323. </view>
  324. <view class="bigScreenWrap">
  325. <view class="left" @click="isShowKey" v-if="isNumberKey">
  326. <text class="left-icon newicon newicon-miyue"></text>
  327. <view class="left-title">数字密钥</view>
  328. </view>
  329. <!-- 底部扫一扫 -->
  330. <view class="right" :class="!isNumberKey?'right-100':''">
  331. <bigScreen ref="bigscreen" :isNumberKey="isNumberKey"></bigScreen>
  332. <view class="more" v-if="arrayBigScreen.length"></view>
  333. <picker class="more_picker" @cancel="cancelPicker" @click.stop @change="execFilterBigScreen($event)" :value="indexBigScreen"
  334. :range="arrayBigScreen" range-key="name" v-if="arrayBigScreen.length">
  335. <view class="uni-input">{{ arrayBigScreen[indexBigScreen].name }}</view>
  336. </picker>
  337. </view>
  338. </view>
  339. <!-- 悬浮按钮 -->
  340. <uni-fab :pattern="pattern" :content="content" :direction="direction" @fabClick="fabClick" @trigger="trigger"></uni-fab>
  341. <!-- 弹窗 -->
  342. <showModel :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content"
  343. @ok="ok" @cancel="cancel" @know="know" :operate="models.operate"></showModel>
  344. <!-- 我的二维码-弹窗 -->
  345. <showMyQrcode v-if="showMyQrcodeModel.disjunctor" :disjunctor="showMyQrcodeModel.disjunctor" @know="closeMyQrcodeModel"></showMyQrcode>
  346. <!-- 领血证-弹窗 -->
  347. <showCertificat v-if="showCertificatModel.disjunctor" :disjunctor="showCertificatModel.disjunctor" :id="showCertificatModel.id" @know="closeCertificatModel"></showCertificat>
  348. <!-- 科室二维码-弹窗 -->
  349. <showDepartmentQrcode v-if="showDepartmentQrcodeModel.disjunctor" :disjunctor="showDepartmentQrcodeModel.disjunctor" @know="closeDepartmentQrcodeModel"></showDepartmentQrcode>
  350. <!-- 手动查询标本弹窗 -->
  351. <handViewSpecimen v-if="speModels.disjunctor" :title="speModels.title" :disjunctor="speModels.disjunctor"
  352. @ok="speOk" @cancel="speCancel">
  353. </handViewSpecimen>
  354. <!-- 手动查询药品弹窗 -->
  355. <handViewDrugsBag v-if="drugbagModels.disjunctor" :title="drugbagModels.title"
  356. :disjunctor="drugbagModels.disjunctor" @ok="drugbagOk" @cancel="drugbagCancel">
  357. </handViewDrugsBag>
  358. <!-- 填写交接人工号弹窗 -->
  359. <selectAccount v-if="hosModels.disjunctor" :disjunctor="hosModels.disjunctor" @ok="hosOk"
  360. @cancel="hosCancel">
  361. </selectAccount>
  362. <!-- 手动查询弹窗 -->
  363. <checkboxModal v-if="checkboxModels.disjunctor" :content="checkboxModels.content" :disjunctor="checkboxModels.disjunctor"
  364. @ok="checkboxOk" @cancel="checkboxCancel">
  365. </checkboxModal>
  366. <!-- 执行中筛选 -->
  367. <uni-drawer width="400px" :visible="isShowExecFilter" mode="right" @close="closeDrawer()">
  368. <view class="execFilterMask">
  369. <view class="execFilter" @click.stop>
  370. <view class="execFilterHeader">
  371. 全部筛选
  372. </view>
  373. <view class="execFilterBody">
  374. <view class="execFilterItem">
  375. <view class="execFilterItemHeader">
  376. 工单状态
  377. </view>
  378. <view class="execFilterItemBody">
  379. <view class="execFilterItemBox" @click="currentId = item.id" :class="{active: item.id == currentId}" v-for="item in array" :key="item.id">
  380. {{item.name}}
  381. </view>
  382. </view>
  383. </view>
  384. <view class="execFilterItem">
  385. <view class="execFilterItemHeader">
  386. 申请科室
  387. </view>
  388. <view class="execFilterItemBody">
  389. <input class="deptName" @click="searchAdm" v-model.trim="deptName" placeholder="请选择科室名称" placeholder-style="color:#cecece" />
  390. </view>
  391. </view>
  392. <view class="execFilterItem">
  393. <view class="execFilterItemHeader">
  394. 任务类型
  395. </view>
  396. <view class="execFilterItemBody">
  397. <uni-data-picker class="value" placeholder="请选择任务类型"
  398. :localdata="taskData" v-model="taskTypeId" :clear-icon="false">
  399. </uni-data-picker>
  400. </view>
  401. </view>
  402. </view>
  403. <view class="execFilterFooter">
  404. <view class="btn" @click="execFilterReset()">重置</view>
  405. <view class="btn" @click="execFilterOk()">完成</view>
  406. </view>
  407. </view>
  408. </view>
  409. </uni-drawer>
  410. <!-- </view> -->
  411. <!-- 被服洗涤弹窗 -->
  412. <showModel :title="models1.title" :icon="models1.icon" :disjunctor="models1.disjunctor" :content="models1.content"
  413. @ok="ok1" @cancel="cancel1" :operate="models1.operate"></showModel>
  414. <!-- 父级科室弹窗 -->
  415. <showModel :title="models2.title" icon="" :disjunctor="models2.disjunctor" :content="models2.content" @ok="ok2" @cancel="cancel2" :operate="models2.operate" :childrenDeptList="models2.list"></showModel>
  416. <!-- 父级科室弹窗 -->
  417. <showModel :title="models3.title" icon="" :disjunctor="models3.disjunctor" :content="models3.content" @know="know3" @ok="ok3" @cancel="cancel3" :operate="models3.operate" :busyContentList="models3.list"></showModel>
  418. <!-- 示闲弹窗 -->
  419. <showModel :title="models4.title" icon="models4.icon" :disjunctor="models4.disjunctor" :content="models4.content" @know="know4" @ok="ok4" @cancel="cancel4" :operate="models4.operate"></showModel>
  420. <scanner></scanner>
  421. <!-- 动态密钥 -->
  422. <numberKeyModel v-if="showKey" :keyArr="keyArr" @cancel="showKey = false" @confirm="confirmKey($event)"></numberKeyModel>
  423. </view>
  424. </template>
  425. <script>
  426. import selectAccount from "../../components/selectAccount/selectAccount.vue";
  427. import smallScreen from "../../components/smallScreen/smallScreen.vue";
  428. import scanner from "../../components/scanner/scanner.vue";
  429. import showModel from "../../components/showModel/showModel.vue";
  430. import bigScreen from "../../components/bigScreen/bigScreen.vue";
  431. import numberKeyModel from "../../components/numberKeyModel/numberKeyModel.vue";
  432. // https://ext.dcloud.net.cn/plugin?id=144
  433. import uniFab from "@/components/uni-fab/uni-fab.vue";
  434. import uniDrawer from "@/components/uni-drawer/uni-drawer.vue";
  435. import ldSelect from "@/components/ld-select/ld-select.vue";
  436. import MxDatePicker from "@/components/mx-datepicker/mx-datepicker.vue";
  437. import {
  438. get,
  439. post,
  440. SM,
  441. deleteIt,
  442. webHandle
  443. } from "../../http/http.js";
  444. import {
  445. photographTool,
  446. pathUrl
  447. } from "../../tools/photograph.js";
  448. export default {
  449. data() {
  450. return {
  451. workStateList: [],
  452. clothingType: '',//被服回收扫码的类型,dept|user
  453. isShowExecFilter: false,
  454. deptName: '',//科室名称
  455. deptId:null,//科室id
  456. taskTypeId:null,//任务类型id
  457. taskData:[], //任务类型数据
  458. currentId: 0,
  459. otherAssociationTypeId: null,
  460. hosId: uni.getStorageSync('userData').user.currentHospital.id,
  461. workState: '1',
  462. clinicalMultiplayerMode: 0,
  463. showAppendUser: 0,
  464. signType4: false,
  465. delivery: 0,
  466. useTakeCode: 0,
  467. takeCodeType: {},
  468. clinicalTaskIds: [],
  469. other: {
  470. user: {},
  471. data: {},
  472. },
  473. // 手动查询弹窗model
  474. checkboxModels: {
  475. disjunctor: false,
  476. },
  477. // 填写交接人工号弹窗model
  478. hosModels: {
  479. disjunctor: false,
  480. },
  481. currentCode: '', //当前拍照使用的科室二维码
  482. currentData: {}, //当前小扫描的工单对象
  483. // 弹窗model
  484. showMyQrcodeModel: {
  485. disjunctor: false,
  486. },
  487. // 弹窗model
  488. showCertificatModel: {
  489. disjunctor: false,
  490. },
  491. // 弹窗model
  492. showDepartmentQrcodeModel: {
  493. disjunctor: false,
  494. },
  495. SMFlag: true,
  496. // 手动查询标本弹窗model
  497. speModels: {
  498. disjunctor: false,
  499. },
  500. // 手动查询药品弹窗model
  501. drugbagModels: {
  502. disjunctor: false,
  503. },
  504. // 筛选条件
  505. array: [{
  506. id: 0,
  507. name: "全部",
  508. },
  509. {
  510. id: 71,
  511. name: "待到达",
  512. },
  513. {
  514. id: 72,
  515. name: "待送达",
  516. },
  517. {
  518. id: 75,
  519. name: "执行中",
  520. },
  521. ],
  522. // 筛选条件
  523. arrayBigScreen: [],
  524. index: 0,
  525. indexBigScreen: 0,
  526. arrayKey: 0,
  527. arrayKeyBigScreen: 0,
  528. // 当前登录人是否是药房角色
  529. pharmacistFlag: false,
  530. // 抢单的id
  531. qdId: "",
  532. quiltData: {},
  533. // 弹窗model
  534. models: {
  535. disjunctor: false,
  536. },
  537. // 弹窗model
  538. models1: {
  539. disjunctor: false,
  540. },
  541. // 弹窗model
  542. models2: {
  543. disjunctor: false,
  544. },
  545. // 弹窗model
  546. models3: {
  547. disjunctor: false,
  548. },
  549. // 弹窗model
  550. models4: {
  551. disjunctor: false,
  552. },
  553. // 悬浮按钮样式
  554. pattern: {
  555. buttonColor: "#6cc076",
  556. },
  557. // 悬浮按钮展开菜单显示方式
  558. direction: "vertical",
  559. // 悬浮按钮展开菜单内容配置项
  560. content: [{
  561. text: "我的任务",
  562. },],
  563. // 当前选中tab页名称
  564. selectedLabelSlots: "待接单",
  565. // tab页信息
  566. tabs: [{
  567. label: "待接单", //tab页名称
  568. value: "1", //值
  569. num: 0, //数量
  570. },
  571. {
  572. label: "执行中",
  573. value: "2",
  574. num: 0,
  575. },
  576. ],
  577. //列表数据
  578. zxzData: [],
  579. //分页页码
  580. idx: 0,
  581. // 列表项总数
  582. totalNum: -1,
  583. triggered: false, //下拉刷新状态
  584. freshing: false, //上拉加载开关
  585. scroll_top: 0, //距离顶部的距离
  586. scroll_refresher_enabled: true, //是否开启自定义下拉刷新
  587. quiltCode: '',
  588. tabType: "", //当前选中项
  589. selectArr: [], //选中项
  590. workData: [],
  591. userId: {
  592. ids: [],
  593. },
  594. code: "",
  595. showKey:false,
  596. keyNum:4, //密钥位数
  597. isNumberKey:false, //是否开启动态密钥
  598. keyArr: []
  599. };
  600. },
  601. components: {
  602. uniDrawer,
  603. MxDatePicker,
  604. ldSelect
  605. },
  606. filters: {
  607. // 自定义管道 yyTime
  608. yyTimeFilter: function(data) {
  609. if (data) {
  610. let nDate = null;
  611. if (typeof data == 'string') {
  612. let arr = data.split(/[-:\s]/);
  613. nDate = new Date(
  614. arr[0] - 0,
  615. arr[1] - 1,
  616. arr[2] - 0,
  617. arr[3] - 0,
  618. arr[4] - 0,
  619. 0
  620. );
  621. } else if (typeof data == 'number') {
  622. nDate = new Date(data);
  623. }
  624. const month = (nDate.getMonth() + 1).toString().padStart(2, 0);
  625. const date = nDate.getDate().toString().padStart(2, 0);
  626. const hour = nDate.getHours().toString().padStart(2, 0);
  627. const minute = nDate.getMinutes().toString().padStart(2, 0);
  628. return `${month}-${date} ${hour}:${minute}`;
  629. } else {
  630. return "-";
  631. }
  632. },
  633. },
  634. components: {
  635. uniFab,
  636. showModel,
  637. bigScreen,
  638. numberKeyModel,
  639. scanner,
  640. selectAccount,
  641. },
  642. methods: {
  643. confirmKey(data){
  644. this.padChange(data)
  645. this.showKey = false
  646. },
  647. isShowKey(){
  648. this.showKey = true
  649. },
  650. // 获取配置
  651. getConfig() {
  652. let postData = {
  653. idx: 0,
  654. sum: 9999,
  655. hospitalConfig:{
  656. hosId:this.hosId,
  657. model:"all"
  658. }
  659. };
  660. post("/simple/data/fetchDataList/hospitalConfig",postData).then((result) => {
  661. if (result.status == 200) {
  662. this.keyArr = []
  663. for(let i of result.list){
  664. if(i.key=='digitalSecretKey'){
  665. if(i.value==1){
  666. this.isNumberKey = true
  667. }else{
  668. this.isNumberKey = false
  669. }
  670. }else if(i.key=='numberDigitalSecretKey'){
  671. this.keyNum = Number(i.value)
  672. }
  673. }
  674. for(let i = 0; i < this.keyNum; i++){
  675. this.keyArr.push({
  676. value:null
  677. })
  678. }
  679. console.log(444,this.keyArr)
  680. }
  681. });
  682. },
  683. // 标本配送-待送达-运输过程-标本数字交接,则,科室签到不需要填写交接人
  684. validateHandoverSpecimen(){
  685. return post("/simple/data/fetchDataList/taskType", {
  686. "idx": 0,
  687. "sum": 1,
  688. "taskType": {
  689. "hosId": {
  690. "id": this.hosId
  691. },
  692. "associationType": {
  693. "key": "association_types",
  694. "value": "specimen"
  695. }
  696. }
  697. });
  698. },
  699. //科室签到
  700. //trueBigScanner----判断是否大扫描
  701. //bigScanner----判断是否需要交接人
  702. //accountObj----弹窗填写的交接人信息
  703. async orderDeptHandler(bigScanner, accountObj) {
  704. console.log(this.infoDATA);
  705. uni.showLoading({
  706. title: "加载中",
  707. mask: true,
  708. });
  709. if(this.tabType === 'specimen' && this.infoDATA.specimen && this.infoDATA.specimen[0].gdState.value == 5){
  710. let result = await this.validateHandoverSpecimen();
  711. if (result.status == 200) {
  712. if(result.list.length){
  713. // 标本-运送过程-终点科室-标本数字交接
  714. if(result.list[0].carryingCourses[1].checkoutMethod.value == 3){
  715. bigScanner = false;
  716. }
  717. }else{
  718. uni.showToast({
  719. icon: "none",
  720. title: "请配置标本配送任务类型!",
  721. });
  722. uni.hideLoading();
  723. return;
  724. }
  725. }
  726. }
  727. let type = "orderSign/" + this.code;
  728. let list = {
  729. ids: this.userId.ids,
  730. trueBigScanner: ['666']
  731. };
  732. bigScanner && (list.bigScanner = ['666']);
  733. if (accountObj) {
  734. list.handover = [accountObj.accountId];
  735. }
  736. post("/workerOrder/" + type, list).then((res) => {
  737. console.log(this.tabType)
  738. uni.hideLoading();
  739. if (res.status == 200) {
  740. if (this.tabType == 'specimenPlan') {
  741. // -----------------------------
  742. console.log(this.selectArr, '选中工单')
  743. let gd = this.infoDATA.specimenPlan.find(v => v.id == this.selectArr[0]);
  744. let startDeptId = gd.startDept.id; //起点科室id
  745. let isDigitalHandover = gd.taskType.isDigitalHandover; //是否数字交接开关
  746. let signDeptId = res.deptId; //签到的科室id
  747. let gdId = gd.id;
  748. let gdState = gd.gdState.value;
  749. let endDepts = gd.endDepts.map(v => v.id).toString();
  750. uni.navigateTo({
  751. url: `../scanning_djEnd/scanning_djEnd?type=${
  752. this.tabType
  753. }&type1=${res.type}&code=${this.code}&dept=${
  754. res.dept
  755. }&ids=${encodeURIComponent(
  756. JSON.stringify(this.userId.ids)
  757. )}&model=${encodeURIComponent(JSON.stringify(res))}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}&deptId=${res.deptId}&startDeptId=${startDeptId}&isDigitalHandover=${isDigitalHandover}&signDeptId=${signDeptId}&gdId=${gdId}&gdState=${gdState}&endDepts=${endDepts}`,
  758. });
  759. } else if (this.tabType == 'specimen') {
  760. // 同济是false
  761. if (res.deptType && res.deptType.value === 'middleRoom') {
  762. // if (false) {
  763. // 如果是中转科室
  764. uni.navigateTo({
  765. url: `../checkAfterBigScreen/checkAfterBigScreen?type=${
  766. this.tabType
  767. }&type1=${res.type}&code=${this.code}&dept=${
  768. res.dept
  769. }&ids=${encodeURIComponent(
  770. JSON.stringify(this.userId.ids)
  771. )}&model=${encodeURIComponent(JSON.stringify(res))}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}&deptId=${res.deptId}`,
  772. });
  773. } else if(res.type === 'spe-dsd-4'){
  774. // 检验方式是标本数字交接
  775. uni.navigateTo({
  776. url: `/pages/specimenHandoverNew/specimenHandoverNew?type=${
  777. this.tabType
  778. }&type1=${res.type}&code=${this.code}&dept=${
  779. res.dept
  780. }&ids=${encodeURIComponent(
  781. JSON.stringify(this.userId.ids)
  782. )}&model=${encodeURIComponent(JSON.stringify(res))}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}&deptId=${res.deptId}`,
  783. });
  784. } else{
  785. uni.navigateTo({
  786. url: `../scanning_djEnd/scanning_djEnd?type=${
  787. this.tabType
  788. }&type1=${res.type}&code=${this.code}&dept=${
  789. res.dept
  790. }&ids=${encodeURIComponent(
  791. JSON.stringify(this.userId.ids)
  792. )}&model=${encodeURIComponent(JSON.stringify(res))}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}&deptId=${res.deptId}`,
  793. });
  794. }
  795. }
  796. } else if (res.status == "0000") {
  797. this.showSelectAccount();
  798. } else {
  799. this.flag = true;
  800. uni.navigateTo({
  801. url: `../scanning_djEnd/scanning_djEnd?type=${this.tabType}&type1=${
  802. res.type
  803. }&code=${this.code}&dept=${res.dept}&ids=${encodeURIComponent(
  804. JSON.stringify(this.userId.ids)
  805. )}&model=${encodeURIComponent(JSON.stringify(res))}&deptId=${res.deptId}`,
  806. });
  807. }
  808. });
  809. },
  810. padChange(scannerCode){
  811. if(!this.isNumberKey){
  812. scannerCode = scannerCode.replace('\n','')
  813. }
  814. if (!this.SMFlag) {
  815. return;
  816. }
  817. let qrcodePrefix = '';
  818. this.SMFlag = false;
  819. // SM().then((content) => {
  820. uni.showLoading({
  821. title: "加载中",
  822. mask: true,
  823. });
  824. //检验二维码的有效性(扫码前必须验证)
  825. post("/dept/scanning", {
  826. content:scannerCode
  827. })
  828. .then((result) => {
  829. this.currentCode = result.code;
  830. this.SMFlag = true;
  831. // 200检测通过,201没有有效期也通过。
  832. if (result.state == 200 || result.state == 201) {
  833. let data = {
  834. code: result.code, //二维码
  835. };
  836. //微信—大扫描(科室码,患者码,标本码,快捷建单码,药包码)
  837. let code = result.code.includes(qrcodePrefix) ? result.code : qrcodePrefix + result.code;
  838. post("/workerOrder/scanCode", { code, hosId: this.hosId })
  839. .then((res) => {
  840. uni.hideLoading();
  841. if (res.status == 200) {
  842. // 扫描标本码
  843. if (res.type == "specimen") {
  844. let infoDATA = {
  845. stype: res.data.stype,
  846. scode: res.data.scode,
  847. patientName: res.data.patientName,
  848. sickRoom: res.data.sickRoom ?
  849. res.data.sickRoom.dept : "-",
  850. checkDept: res.data.checkDept ?
  851. res.data.checkDept.dept : "-",
  852. bedNum: res.data.bedNum,
  853. };
  854. uni.navigateTo({
  855. url: `../scanning_B/scanning_B?res=${encodeURIComponent(
  856. JSON.stringify(res)
  857. )}&infoDATA=${encodeURIComponent(
  858. JSON.stringify(infoDATA)
  859. )}`,
  860. });
  861. } else if (res.type == "patient") {
  862. //如果是患者腕带码
  863. // code: data.code //二维码
  864. res.workOrder = res.workOrder ? res.workOrder : []; //liao
  865. uni.navigateTo({
  866. url: `../scanning_ins/scanning_ins?code=${
  867. data.code
  868. }&infoDATA=${encodeURIComponent(
  869. JSON.stringify(res.data)
  870. )}&workData=${encodeURIComponent(
  871. JSON.stringify(res.workOrder)
  872. )}&patientOrders=${encodeURIComponent(
  873. JSON.stringify(res.patientOrders)
  874. )}`,
  875. });
  876. } else if (res.type == "quickOrder") {
  877. //快捷建单
  878. if(res.data.isDigitalHandover == 1){
  879. uni.navigateTo({
  880. url: `../specimenChecking/specimenChecking?infoDATA=${encodeURIComponent(
  881. JSON.stringify(res.data)
  882. )}`,
  883. });
  884. }else{
  885. uni.navigateTo({
  886. url: `../shortcutbuildOrders/shortcutbuildOrders?infoDATA=${encodeURIComponent(
  887. JSON.stringify(res.data)
  888. )}`,
  889. });
  890. }
  891. } else if (res.type == "dept") {
  892. // 扫描科室码
  893. // code: data.code //二维码
  894. let infoDATA = res.data;
  895. console.log(infoDATA)
  896. // 判断是否是标本配送,并且仅仅只有这一种业务类型,默认全选,并跳转到下一步;
  897. // 判断是否是标本轮巡 ,并且仅仅只有这一种业务类型,并且只有一个工单,默认选中,并跳转到下一步;
  898. if(Object.keys(infoDATA).length === 1 && (infoDATA.specimen || (infoDATA.specimenPlan && infoDATA.specimenPlan.length === 1))){
  899. this.infoDATA = infoDATA;
  900. this.workData = infoDATA.specimen || infoDATA.specimenPlan;
  901. this.tabType = infoDATA.specimen ? 'specimen' : 'specimenPlan';
  902. this.code = data.code;
  903. this.selectArr = [];
  904. for (var i = 0; i < this.workData.length; i++) {
  905. this.selectArr.push(this.workData[i].id);
  906. }
  907. this.userId.ids = this.selectArr;
  908. this.orderDeptHandler(true);
  909. }else if(res.deptHandoverType && res.deptHandoverType.value == 'clinicalWaste'){
  910. // 医废
  911. uni.navigateTo({
  912. url: `/pages/medicalWaste/medicalWasteSignIn/medicalWasteSignIn?code=${data.code}&deptName=${res.deptName}&deptId=${res.deptId}`,
  913. });
  914. }else{
  915. uni.navigateTo({
  916. url: `../scanning_all/scanning_all?infoDATA=${encodeURIComponent(
  917. JSON.stringify(infoDATA)
  918. )}&code=${data.code}&deptName=${res.deptName}&deptId=${res.deptId}`,
  919. });
  920. }
  921. } else if (res.type == 'drugsBag') {
  922. //扫药包码
  923. uni.navigateTo({
  924. url: `/pages/scanning_drug/scanning_drug?drugsBagId=${res.drugsBagId}&drugsBagBatchNo=${res.drugsBagBatchNo}`,
  925. });
  926. } else if (res.type == 'nucleicAcid') {
  927. //扫核酸码
  928. uni.navigateTo({
  929. url: `/pages/scanning_nucleicAcid/scanning_nucleicAcid?qrcode=${data.code}`,
  930. });
  931. } else if (res.type == 'blood') {
  932. //扫血制品
  933. // 判断size,多个则进入新页面选择
  934. if(res.size > 1){
  935. uni.navigateTo({
  936. url: `/pages/bloodSelect/bloodSelect?qrcode=${data.code}&navigateTo=scanning_blood`,
  937. });
  938. } else {
  939. uni.navigateTo({
  940. url: `/pages/scanning_blood/scanning_blood?qrcode=${data.code}`,
  941. });
  942. }
  943. } else if (res.type == 'receiveOrder') {
  944. //扫快捷接单
  945. uni.showModal({
  946. title: "提示",
  947. content: `您本次接单包括${res.names.join('、')},一共含有${res.data.length}个工单,是否确认接单?`,
  948. success: function(result) {
  949. if (result.confirm) {
  950. uni.showLoading({
  951. title: "加载中",
  952. mask: true,
  953. });
  954. post("/workerOrder/receiveOrders", {ids: res.data.toString()}).then((result) => {
  955. uni.hideLoading();
  956. if (result.status == 200) {
  957. uni.showModal({
  958. title: "提示",
  959. content: `本次接单包括${res.names.join('、')},${res.data.length}个工单已接单完成`,
  960. showCancel: false,
  961. success: function(res) {
  962. if (res.confirm) {
  963. console.log("用户点击确定");
  964. uni.redirectTo({
  965. url: "../receiptpage/receiptpage",
  966. });
  967. } else if (res.cancel) {
  968. console.log("用户点击取消");
  969. }
  970. },
  971. });
  972. } else {
  973. uni.showToast({
  974. icon: "none",
  975. title: result.msg || "接口获取数据失败!",
  976. });
  977. }
  978. });
  979. } else if (result.cancel) {
  980. console.log("用户点击取消");
  981. }
  982. },
  983. });
  984. } else if (res.type == 'bloodTake') {
  985. if(res.data){
  986. //新血制品-扫科室
  987. uni.navigateTo({
  988. url: `/pages/newBlood/startOrderSignBlood/startOrderSignBlood?deptId=${res.deptId}&deptName=${res.deptName}&taskTypeId=${res.taskTypeId}`,
  989. });
  990. }else{
  991. // 走type是dept的流程
  992. // 扫描科室码
  993. // code: data.code //二维码
  994. let infoDATA = res.data;
  995. console.log(infoDATA)
  996. // 判断是否是标本配送,并且仅仅只有这一种业务类型,默认全选,并跳转到下一步;
  997. // 判断是否是标本轮巡 ,并且仅仅只有这一种业务类型,并且只有一个工单,默认选中,并跳转到下一步;
  998. if(Object.keys(infoDATA).length === 1 && (infoDATA.specimen || (infoDATA.specimenPlan && infoDATA.specimenPlan.length === 1))){
  999. this.infoDATA = infoDATA;
  1000. this.workData = infoDATA.specimen || infoDATA.specimenPlan;
  1001. this.tabType = infoDATA.specimen ? 'specimen' : 'specimenPlan';
  1002. this.code = data.code;
  1003. this.selectArr = [];
  1004. for (var i = 0; i < this.workData.length; i++) {
  1005. this.selectArr.push(this.workData[i].id);
  1006. }
  1007. this.userId.ids = this.selectArr;
  1008. this.orderDeptHandler(true);
  1009. }else{
  1010. uni.navigateTo({
  1011. url: `../scanning_all/scanning_all?infoDATA=${encodeURIComponent(
  1012. JSON.stringify(infoDATA)
  1013. )}&code=${data.code}&deptName=${res.deptName}&deptId=${res.deptId}`,
  1014. });
  1015. }
  1016. }
  1017. } else if(res.type == 'clinicalWaste'){
  1018. // 医废
  1019. if(res.wasteDetails){
  1020. uni.navigateTo({
  1021. url: `/pages/medicalWaste/medicalWasteDetail/medicalWasteDetail?qrcode=${res.code}`,
  1022. });
  1023. }else{
  1024. uni.navigateTo({
  1025. url: `/pages/medicalWaste/medicalWasteBind/medicalWasteBind?qrcode=${res.code}`,
  1026. });
  1027. }
  1028. }
  1029. } else {
  1030. if(res.bigScanSpecialMsg){
  1031. uni.navigateTo({
  1032. url: `../scanning_big_Result/scanning_big_Result?msg=${res.msg || ''}&qrcode=${this.currentCode}&bigScanSpecialMsg=${encodeURIComponent(JSON.stringify(res.bigScanSpecialMsg))}`,
  1033. });
  1034. }else{
  1035. uni.navigateTo({
  1036. url: `../scanning_Result/scanning_Result?status=${res.status}&msg=${res.msg}&qrcode=${this.currentCode}`,
  1037. });
  1038. }
  1039. }
  1040. });
  1041. } else {
  1042. uni.hideLoading();
  1043. uni.showToast({
  1044. icon: "none",
  1045. title: result.info || "接口获取数据失败!",
  1046. });
  1047. }
  1048. })
  1049. // }).catch(err => {
  1050. // this.SMFlag = true;
  1051. // });
  1052. },
  1053. // 搜索科室
  1054. searchAdm(){
  1055. let data = {
  1056. currentId:this.currentId, //工单状态
  1057. taskType:this.taskTypeId, //任务类型
  1058. selectedLabelSlots:this.selectedLabelSlots, //tab选中状态
  1059. taskData:JSON.stringify(this.taskData)
  1060. }
  1061. uni.setStorageSync("admStore",data)
  1062. let setDeptConfg = uni.getStorageSync("setDeptConfg") || {};
  1063. uni.navigateTo({
  1064. url: `../search/search?type=takeOrder&id=${this.id}&changedept=${this.changedept}&quickCombinationId=${setDeptConfg.id || ''}`,
  1065. });
  1066. },
  1067. goTobloodEnd(order){
  1068. uni.navigateTo({
  1069. url: `/pages/newBlood/endOrderSignBlood/endOrderSignBlood?orderIds=${order.id}&deptName=${order.endDepts[0].dept}&deptId=${order.endDepts[0].id}&type=delivery`,
  1070. });
  1071. },
  1072. goToWashingEnd(order){
  1073. uni.navigateTo({
  1074. url: `../quiltWashing/quiltWashingSendSignIn/quiltWashingSendSignIn?orderId=${order.id}&endDeptId=${order.endDepts[0].id}&endDeptName=${order.endDepts[0].dept}`,
  1075. });
  1076. },
  1077. async initList(){
  1078. uni.showLoading({
  1079. title: "加载中",
  1080. mask: true,
  1081. });
  1082. //获取其他临床服务业务类型
  1083. let res = await this.getOtherAssociationTypes();
  1084. let otherAssociationType = res.find(v => v.value === 'other');
  1085. this.otherAssociationTypeId = otherAssociationType ? otherAssociationType.id : null;
  1086. if(this.otherAssociationTypeId){
  1087. // 获取临床服务页面控制开关
  1088. let result = await this.getTaskOtherConfig();
  1089. if (result.status == 200) {
  1090. if(result.list && result.list[0]){
  1091. this.clinicalMultiplayerMode = result.list[0].clinicalMultiplayerMode;
  1092. this.showAppendUser = result.list[0].showAppendUser;
  1093. this.clinicalTaskIds = result.list[0].clinicalTaskIds ? result.list[0].clinicalTaskIds.split(',') : [] ;
  1094. }else{
  1095. this.clinicalMultiplayerMode = 0;
  1096. this.showAppendUser = 0;
  1097. }
  1098. } else {
  1099. this.clinicalMultiplayerMode = 0;
  1100. this.showAppendUser = 0;
  1101. }
  1102. }else{
  1103. uni.showToast({
  1104. icon: 'none',
  1105. title: '未设置其他临床服务业务类型!'
  1106. })
  1107. }
  1108. this.getBloodPageConfig()
  1109. this.waitingOrdersGetNum();
  1110. this.executingOrders(0);
  1111. this.getWorkStateList();
  1112. },
  1113. getWorkStateList(){
  1114. post('/common/common/getDictionary', {
  1115. "type": "list",
  1116. "key": "user_work_state"
  1117. }).then(res => {
  1118. this.workStateList = res;
  1119. });
  1120. },
  1121. // 获取血制品页面控制开关
  1122. async getBloodPageConfig(){
  1123. let result = await this.getTaskBloodConfig();
  1124. if (result.status == 200) {
  1125. if(result.list && result.list[0]){
  1126. let signTypeList = result.list[0].signTypeList || [];
  1127. this.signType4 = signTypeList.some(v => v.value == 4);
  1128. this.delivery = result.list[0].delivery;
  1129. this.useTakeCode = result.list[0].useTakeCode;
  1130. this.takeCodeType = result.list[0].takeCodeType;
  1131. }else{
  1132. this.signType4 = false;
  1133. this.delivery = 0;
  1134. this.useTakeCode = 0;
  1135. this.takeCodeType = {};
  1136. }
  1137. } else {
  1138. this.signType4 = false;
  1139. this.delivery = 0;
  1140. this.useTakeCode = 0;
  1141. this.takeCodeType = {};
  1142. }
  1143. },
  1144. //获取其他临床服务业务类型
  1145. getOtherAssociationTypes(){
  1146. return post('/common/common/getDictionary', {
  1147. "type": "list",
  1148. "key": "association_types"
  1149. });
  1150. },
  1151. // 获取临床服务页面控制开关
  1152. getTaskOtherConfig(){
  1153. return post("/simple/data/fetchDataList/taskTypeConfig", {
  1154. "idx": 0,
  1155. "sum": 10,
  1156. "taskTypeConfig": {
  1157. "hosId": this.hosId,
  1158. "associationType": this.otherAssociationTypeId,
  1159. }
  1160. });
  1161. },
  1162. // 获取血制品页面控制开关
  1163. getTaskBloodConfig(){
  1164. return post("/simple/data/fetchDataList/taskTypeConfig", {
  1165. "idx": 0,
  1166. "sum": 10,
  1167. "taskTypeConfig": {
  1168. "taskTypeDTO": {
  1169. "hosId": {
  1170. "id": this.hosId
  1171. },
  1172. "ordinaryField": {
  1173. "key": "ordinary_field",
  1174. "value": "blood"
  1175. }
  1176. }
  1177. }
  1178. });
  1179. },
  1180. // 手动查询-确认
  1181. checkboxOk(bulkCopy) {
  1182. console.log(bulkCopy);
  1183. this.checkboxModels.disjunctor = false;
  1184. let { user, data } = this.other;
  1185. this.additionalUserCommon(user, data.id, data.worker.id, bulkCopy);
  1186. },
  1187. // 手动查询-取消
  1188. checkboxCancel() {
  1189. this.checkboxModels.disjunctor = false;
  1190. },
  1191. // 手动查询弹窗
  1192. showCheckboxModal(user, data) {
  1193. this.other = {
  1194. user,
  1195. data,
  1196. };
  1197. this.checkboxModels = {
  1198. content: `您要最追加的人员为${user.name},您确认要追加吗?`,
  1199. disjunctor: true,
  1200. }
  1201. },
  1202. // 追加陪检人/执行人按钮
  1203. additionalUser(data) {
  1204. if (!this.SMFlag) {
  1205. return;
  1206. }
  1207. this.SMFlag = false;
  1208. console.log(data, 'data');
  1209. SM().then((ress1) => {
  1210. uni.showLoading({
  1211. title: "加载中",
  1212. mask: true,
  1213. });
  1214. //检验二维码的有效性
  1215. post("/dept/scanning", {
  1216. content: ress1,
  1217. taskTypeId: data.taskType.id,
  1218. gdState: data.gdState.id,
  1219. }).then((result) => {
  1220. this.SMFlag = true;
  1221. // this.currentCode = result.code;
  1222. if (result.state == 200 || result.state == 201) {
  1223. console.log(result);
  1224. let user;
  1225. try{
  1226. // json对象字符串
  1227. user = JSON.parse(result.code);
  1228. // 不是json对象字符串
  1229. if(Object.prototype.toString.call(user).slice(8, -1).toLowerCase() !== 'object'){
  1230. user = result.code;
  1231. }
  1232. }catch(e){
  1233. user = result.code;
  1234. }
  1235. if(Object.prototype.toString.call(user).slice(8, -1).toLowerCase() === 'object' && user.type == 'myQrCode' && user.id && user.name){
  1236. user.qrcode = ress1;
  1237. uni.hideLoading();
  1238. if(data.taskType.associationType.value == 'other'){
  1239. this.showCheckboxModal(user, data);
  1240. }else{
  1241. uni.showModal({
  1242. title: "提示",
  1243. content: `您要最追加的人员为${user.name},您确认要追加吗?`,
  1244. success: (res) => {
  1245. if (res.confirm) {
  1246. console.log("用户点击确定");
  1247. this.additionalUserCommon(user, data.id, data.worker.id, false);
  1248. } else if (res.cancel) {
  1249. console.log("用户点击取消");
  1250. }
  1251. },
  1252. });
  1253. }
  1254. }else if(Object.prototype.toString.call(user).slice(8, -1).toLowerCase() === 'string'){
  1255. let identityCardNumber = user;
  1256. // 根据身份证获取name
  1257. post("/data/fetchDataList/user", {idx: 0, sum: 1, user: { identityCardNumber }}).then((result) => {
  1258. uni.hideLoading();
  1259. if(result.status == 200){
  1260. result.list = result.list || [];
  1261. if(result.list.length){
  1262. let user = {name: result.list[0].name, identityCardNumber, qrcode: ress1};
  1263. if(data.taskType.associationType.value == 'other'){
  1264. this.showCheckboxModal(user, data);
  1265. }else{
  1266. uni.showModal({
  1267. title: "提示",
  1268. content: `您要最追加的人员为${user.name},您确认要追加吗?`,
  1269. success: (res) => {
  1270. if (res.confirm) {
  1271. console.log("用户点击确定");
  1272. this.additionalUserCommon(user, data.id, data.worker.id, false);
  1273. } else if (res.cancel) {
  1274. console.log("用户点击取消");
  1275. }
  1276. },
  1277. });
  1278. }
  1279. }else{
  1280. uni.navigateTo({
  1281. url: `../result_error/result_error?qrcode=${ress1}&msg=扫描二维码无法找到用户!`,
  1282. });
  1283. }
  1284. }else{
  1285. uni.navigateTo({
  1286. url: `../result_error/result_error?qrcode=${ress1}&msg=请扫描正确的二维码!`,
  1287. });
  1288. }
  1289. })
  1290. }else{
  1291. uni.hideLoading();
  1292. uni.navigateTo({
  1293. url: `../result_error/result_error?qrcode=${ress1}&msg=请扫描正确的二维码!`,
  1294. });
  1295. }
  1296. } else {
  1297. uni.hideLoading();
  1298. uni.navigateTo({
  1299. url: `../result_error/result_error?qrcode=${ress1}&msg=${result.info || '接口获取数据失败!'}`,
  1300. });
  1301. }
  1302. });
  1303. }).catch(err=>{
  1304. this.SMFlag = true;
  1305. });
  1306. },
  1307. // 追加陪检人/执行人
  1308. additionalUserCommon(user, gdId, workerId, bulkCopy) {
  1309. console.log(user, gdId, workerId, bulkCopy);
  1310. uni.showLoading({
  1311. title: "加载中",
  1312. mask: true,
  1313. });
  1314. // 二维码里有id则传userid,没有则传identityCardNumber
  1315. post("/workerOrder/additionalAccompanyingPersonnel", {
  1316. userId: user.id || undefined,
  1317. identityCardNumber: !user.id ? user.identityCardNumber : undefined,
  1318. gdId,
  1319. workerId,
  1320. bulkCopy: bulkCopy ? 1 : undefined,
  1321. }).then((result) => {
  1322. uni.hideLoading();
  1323. if (result.state == 200) {
  1324. uni.showToast({
  1325. icon: 'none',
  1326. duration: 4000,
  1327. title: '操作成功!'
  1328. })
  1329. uni.redirectTo({
  1330. url: `../receiptpage/receiptpage`,
  1331. });
  1332. } else {
  1333. uni.navigateTo({
  1334. url: `../result_error/result_error?qrcode=${user.qrcode}&msg=${result.msg || '接口获取数据失败!'}`,
  1335. });
  1336. }
  1337. });
  1338. },
  1339. // 前往其他临床服务完成工单确认页面
  1340. otherCompleteOrder(data){
  1341. console.log(data);
  1342. uni.navigateTo({
  1343. url: `../otherCompleteOrder/otherCompleteOrder?orderId=${data.id}&taskType=${data.taskType ? encodeURIComponent(JSON.stringify(data.taskType)) : ''}&order=${data ? encodeURIComponent(JSON.stringify(data)) : ''}`,
  1344. });
  1345. },
  1346. // 手动查询药品-确认
  1347. drugbagOk(data) {
  1348. console.log(data);
  1349. if (!data.id) {
  1350. //没有查询到药品
  1351. uni.showModal({
  1352. title: '提示',
  1353. content: "没有查询到发药单号!",
  1354. showCancel: false,
  1355. success: function(res) {
  1356. if (res.confirm) {
  1357. console.log('用户点击确定');
  1358. } else if (res.cancel) {
  1359. console.log('用户点击取消');
  1360. }
  1361. }
  1362. });
  1363. return;
  1364. }
  1365. this.drugbagModels.disjunctor = false;
  1366. uni.navigateTo({
  1367. url: `/pages/scanning_drug/scanning_drug?drugsBagId=${data.id}`,
  1368. });
  1369. },
  1370. // 手动查询药品-取消
  1371. drugbagCancel() {
  1372. this.drugbagModels.disjunctor = false;
  1373. },
  1374. // 手动查询药品弹窗
  1375. showHandViewDrugsbag() {
  1376. console.log(1)
  1377. this.drugbagModels = {
  1378. title: '填写发药单号',
  1379. disjunctor: true,
  1380. }
  1381. },
  1382. //确定
  1383. ok4() {
  1384. this.models4.disjunctor = false;
  1385. uni.showLoading({
  1386. title: "加载中",
  1387. mask: true,
  1388. });
  1389. post("/user/data/changeWorkState", {
  1390. workState: this.workStateList.find(v => v.value == 1).id,
  1391. }).then((res) => {
  1392. uni.hideLoading();
  1393. if (res.status == 200) {
  1394. this.getCurrentUserNow();
  1395. this.models4 = {
  1396. disjunctor: true,
  1397. title: "提示",
  1398. content: `示闲成功`,
  1399. icon: "warn",
  1400. operate: {
  1401. know: "知道了",
  1402. },
  1403. };
  1404. }else{
  1405. uni.showToast({
  1406. icon: "none",
  1407. title: res.msg || "接口获取数据失败!",
  1408. });
  1409. }
  1410. });
  1411. },
  1412. //取消
  1413. cancel4() {
  1414. this.models4.disjunctor = false;
  1415. },
  1416. //取消
  1417. know4() {
  1418. this.models4.disjunctor = false;
  1419. },
  1420. // 示闲
  1421. showLeisure(){
  1422. this.models4 = {
  1423. disjunctor: true,
  1424. title: "提示",
  1425. content: "您确认要示闲吗?",
  1426. icon: "warn",
  1427. operate: {
  1428. ok: "确定",
  1429. cancel: "取消",
  1430. },
  1431. };
  1432. },
  1433. // 示忙
  1434. showBusy(){
  1435. uni.showLoading({
  1436. title: "加载中",
  1437. mask: true,
  1438. });
  1439. let postData = {"idx":0,"workScheme":{"status":1,"hosId":this.hosId},"sum":1};
  1440. post("/simple/data/fetchDataList/workScheme", postData).then((res) => {
  1441. uni.hideLoading();
  1442. if (res.status == 200) {
  1443. let config = res.list.length ? res.list[0] : {};
  1444. let list = [];
  1445. for (let key in config) {
  1446. if(key.includes('busyContent') && config[key]){
  1447. list.push({
  1448. busyContent: config[key],
  1449. busyMinute: config['busyMinute' + key.replace('busyContent', '')],
  1450. });
  1451. }
  1452. }
  1453. this.models3 = {
  1454. disjunctor: true,
  1455. title: "提示",
  1456. content: "请选择暂停工作的原因。",
  1457. icon: "warn",
  1458. list,
  1459. operate: {
  1460. cancel: "取消",
  1461. },
  1462. };
  1463. } else {
  1464. uni.showToast({
  1465. icon: "none",
  1466. title: res.msg || "接口获取数据失败!",
  1467. });
  1468. }
  1469. });
  1470. },
  1471. // 手动查询标本-确认
  1472. speOk(data) {
  1473. console.log(data);
  1474. if (!data.id) {
  1475. //没有查询到标本
  1476. uni.showModal({
  1477. title: '提示',
  1478. content: "没有查询到标本!",
  1479. showCancel: false,
  1480. success: function(res) {
  1481. if (res.confirm) {
  1482. console.log('用户点击确定');
  1483. } else if (res.cancel) {
  1484. console.log('用户点击取消');
  1485. }
  1486. }
  1487. });
  1488. return;
  1489. }
  1490. this.speModels.disjunctor = false;
  1491. let infoDATA = {
  1492. stype: data.stype,
  1493. scode: data.scode,
  1494. patientName: data.patientName,
  1495. sickRoom: data.sickRoom ?
  1496. data.sickRoom.dept : "-",
  1497. checkDept: data.checkDept ?
  1498. data.checkDept.dept : "-",
  1499. bedNum: data.bedNum,
  1500. };
  1501. uni.navigateTo({
  1502. url: `../scanning_B/scanning_B?res=${encodeURIComponent(
  1503. JSON.stringify({data,status:666,scanCodeSpecimenOrderSign:data.scanCodeSpecimenOrderSign,workOrder:data.workOrderDTO})
  1504. )}&infoDATA=${encodeURIComponent(
  1505. JSON.stringify(infoDATA)
  1506. )}`,
  1507. });
  1508. },
  1509. // 手动查询标本-取消
  1510. speCancel() {
  1511. this.speModels.disjunctor = false;
  1512. },
  1513. // 手动查询标本弹窗
  1514. showHandViewSpecimen() {
  1515. this.speModels = {
  1516. title: '填写标本编码',
  1517. disjunctor: true,
  1518. }
  1519. },
  1520. // 执行中筛选
  1521. // execFilter({
  1522. // detail: {
  1523. // value
  1524. // }
  1525. // }) {
  1526. // this.index = value;
  1527. // this.arrayKey = this.array[value].id;
  1528. // this.zxzData = [];
  1529. // this.totalNum = -1;
  1530. // this.idx = 0;
  1531. // this.selectedLabelSlots = "执行中";
  1532. // this.executingOrders(0);
  1533. // },
  1534. // 获取任务类型
  1535. getTaskData(){
  1536. let data = {
  1537. idx:0,
  1538. sum: 9999,
  1539. };
  1540. let url = null
  1541. if(this.selectedLabelSlots=='待接单'){
  1542. url = '/workerOrder/waitingOrdersByTaskType'
  1543. }else{
  1544. url = '/workerOrder/executingOrdersByTaskType'
  1545. }
  1546. post(url, data).then(res => {
  1547. this.taskData = res.data.map(i=>{
  1548. return {
  1549. text:i.name+'('+i.count+')',
  1550. value:i.id
  1551. }
  1552. })
  1553. });
  1554. },
  1555. closeDrawer() {
  1556. this.isShowExecFilter = false;
  1557. let data = uni.getStorageSync("admStore")
  1558. data.isSearch = false
  1559. uni.setStorageSync("admStore",data)
  1560. },
  1561. // 执行中筛选
  1562. execFilter() {
  1563. this.getTaskData()
  1564. this.isShowExecFilter = true;
  1565. },
  1566. // 筛选确定之后数据操作
  1567. setScreenData(){
  1568. let data = {
  1569. deptName:this.deptName,
  1570. deptId:this.deptId,
  1571. currentId:this.currentId, //工单状态
  1572. taskType:this.taskTypeId, //任务类型
  1573. selectedLabelSlots:this.selectedLabelSlots, //tab选中状态
  1574. taskData:JSON.stringify(this.taskData),
  1575. isSearch:false
  1576. }
  1577. uni.setStorageSync("admStore",data)
  1578. },
  1579. // 执行中确定
  1580. execFilterOk() {
  1581. this.isShowExecFilter = false;
  1582. this.zxzData = [];
  1583. this.totalNum = -1;
  1584. this.idx = 0;
  1585. this.setScreenData()
  1586. if (this.selectedLabelSlots == "待接单") {
  1587. this.waitingOrders(0);
  1588. } else if (this.selectedLabelSlots == "执行中") {
  1589. this.executingOrders(0);
  1590. }
  1591. },
  1592. // 执行中重置
  1593. execFilterReset() {
  1594. this.currentId = 0;
  1595. this.deptName = '';
  1596. this.deptId = ''//科室id
  1597. this.taskTypeId = '' //任务类型
  1598. uni.setStorageSync("admStore",{})
  1599. },
  1600. cancelPicker(){
  1601. },
  1602. // 大扫描筛选
  1603. execFilterBigScreen({
  1604. detail: {
  1605. value
  1606. }
  1607. }) {
  1608. this.indexBigScreen = value;
  1609. this.arrayKeyBigScreen = this.arrayBigScreen[value].id;
  1610. console.log(this.arrayKeyBigScreen);
  1611. console.log(this.$refs.bigscreen);
  1612. this.$refs.bigscreen.Scanning(this.arrayKeyBigScreen);
  1613. },
  1614. // 获取科室二维码设置开关
  1615. getMenu() {
  1616. let menu = uni.getStorageSync("userData").menu;
  1617. //判断当前登陆人具体角色 start
  1618. let roles = uni.getStorageSync("userData").user.role;
  1619. this.pharmacistFlag = roles.some(
  1620. (item) => item.rolecode === "pharmacist"
  1621. );
  1622. //判断当前登陆人具体角色 end
  1623. // console.log(menu);
  1624. this.arrayBigScreen = [];
  1625. menu.forEach((item) => {
  1626. if (item.link === "wxInspect") {
  1627. this.content.push({
  1628. text: "检查信息",
  1629. });
  1630. } else if (item.link === "wxPatient") {
  1631. this.content.push({
  1632. text: "患者信息",
  1633. });
  1634. } else if (item.link === "wxPharmacy") {
  1635. // 如果是配药师人员,则增加药房
  1636. if (this.pharmacistFlag) {
  1637. this.content.push({
  1638. text: "药房",
  1639. });
  1640. }
  1641. } else if (item.link === "wxCode") {
  1642. this.content.push({
  1643. text: "二维码设置",
  1644. });
  1645. } else if (item.link === "wxSpecimenEntry") {
  1646. this.content.push({
  1647. text: "标本录入",
  1648. });
  1649. } else if (item.link === "wxDrugsbagEntry") {
  1650. this.content.push({
  1651. text: "药品录入",
  1652. });
  1653. } else if (item.link === "workState" && this.workState == 1) {
  1654. this.content.push({
  1655. text: "示闲",
  1656. });
  1657. } else if (item.link === "workState" && this.workState == 2) {
  1658. this.content.push({
  1659. text: "示忙",
  1660. });
  1661. } else if (item.link === "sendBuild") {
  1662. this.content.push({
  1663. text: "送回发起",
  1664. });
  1665. } else if (item.link === "sendHandover") {
  1666. this.content.push({
  1667. text: "领取交接",
  1668. });
  1669. } else if (item.link === "medicalWasteOut") {
  1670. this.content.push({
  1671. text: "医废出库",
  1672. });
  1673. } else if (item.link === "wxTakeMedicine") {
  1674. this.content.push({
  1675. text: "摆药取药",
  1676. });
  1677. } else if (item.link === "myQrcode") {
  1678. this.content.push({
  1679. text: "我的二维码",
  1680. });
  1681. } else if (item.link === "departmentQrcode") {
  1682. this.content.push({
  1683. text: "科室二维码",
  1684. });
  1685. } else if (item.link === "formManagementWechat") {
  1686. this.content.push({
  1687. text: "查看表单",
  1688. });
  1689. } else if (item.link === "BIAOBEN") {
  1690. this.arrayBigScreen.push({
  1691. id: 'BIAOBEN|$|',
  1692. name: "标本",
  1693. });
  1694. } else if (item.link === "YAOPING") {
  1695. this.arrayBigScreen.push({
  1696. id: 'YAOPING|$|',
  1697. name: "药品",
  1698. });
  1699. } else if (item.link === "HUANZHE") {
  1700. this.arrayBigScreen.push({
  1701. id: 'HUANZHE|$|',
  1702. name: "患者",
  1703. });
  1704. } else if (item.link === "XIEZHIPING") {
  1705. this.arrayBigScreen.push({
  1706. id: 'XIEZHIPING|$|',
  1707. name: "血制品",
  1708. });
  1709. } else if (item.link === "KJJD") {
  1710. this.arrayBigScreen.push({
  1711. id: 'KJJD|$|',
  1712. name: "快捷建单",
  1713. });
  1714. } else if (item.link === "kuaijiejiedan") {
  1715. this.arrayBigScreen.push({
  1716. id: 'kuaijiejiedan|$|',
  1717. name: "快捷接单",
  1718. });
  1719. } else if (item.link === "quickOrderAcceptanceWx") {
  1720. this.content.push({
  1721. text: "快捷接单",
  1722. });
  1723. } else if (item.link === "wxQuiltRecovery") {
  1724. this.content.push({
  1725. text: "被服回收",
  1726. });
  1727. }
  1728. });
  1729. },
  1730. // 拍照
  1731. photograph(data) {
  1732. photographTool(data);
  1733. },
  1734. // 如果不是静配,药配,标本配送,标本轮巡
  1735. // 科室签到(小扫描)-拍照
  1736. nextDeptOrder_ss(data, accountObj) {
  1737. console.log(this.currentCode);
  1738. let isKs = 0;
  1739. let ids = [];
  1740. let id = data.id;
  1741. ids.push(id);
  1742. let list = {
  1743. code: "",
  1744. ids: ids,
  1745. };
  1746. let code = "";
  1747. let type = "";
  1748. if (this.currentCode) {
  1749. let gdStateValue = data.gdState.value; //工单状态value
  1750. let associationTypeValue = data.taskType.associationType.value; //关联类型value
  1751. // 其他临床服务,并且工单状态是待到达||工单状态待送达
  1752. if (
  1753. (associationTypeValue == "other" &&
  1754. gdStateValue == "4") ||
  1755. gdStateValue == "5"
  1756. ) {
  1757. code = this.currentCode;
  1758. type = "orderSign/" + code;
  1759. list = {
  1760. ids
  1761. };
  1762. if (accountObj) {
  1763. list.handover = [accountObj.accountId];
  1764. }
  1765. isKs = 1;
  1766. }
  1767. uni.showLoading({
  1768. title: "加载中",
  1769. mask: true,
  1770. });
  1771. post("/workerOrder/" + type, list).then((res) => {
  1772. uni.hideLoading();
  1773. if (res) {
  1774. if (res.status == 200) {
  1775. if (
  1776. gdStateValue == "4" &&
  1777. associationTypeValue == "other"
  1778. ) {
  1779. uni.navigateTo({
  1780. url: `../../pages/scanning_code/scanning_code?type=${associationTypeValue}&type1=${res.type}&id=${data.id}&deptCode=${code}&dept=${res.dept}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}`,
  1781. });
  1782. }
  1783. if (gdStateValue == "5") {
  1784. uni.navigateTo({
  1785. url: `../../pages/scanning_code/scanning_code?type=${associationTypeValue}&type1=${res.type}&id=${data.id}&deptCode=${code}&dept=${res.dept}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}`,
  1786. });
  1787. }
  1788. } else {
  1789. uni.navigateTo({
  1790. url: `../../pages/scanning_Result/scanning_Result?type=${
  1791. associationTypeValue
  1792. }&type1=${res.type}&id=${data.id}&status=600&msg=${
  1793. res.msg
  1794. }&taskTypeId=${
  1795. this.infoDATA.taskType.id
  1796. }&isKs=${isKs}&model=${encodeURIComponent(
  1797. JSON.stringify(res)
  1798. )}&qrcode=${this.currentCode}`,
  1799. });
  1800. }
  1801. } else {
  1802. uni.navigateTo({
  1803. url: `../../pages/scanning_Result/scanning_Result?id=${data.id}&status=600&msg=扫码失败!请扫描正确的二维码!&isKs=${isKs}&qrcode=${this.currentCode}`,
  1804. });
  1805. }
  1806. });
  1807. }
  1808. },
  1809. // 填写交接人工号-确认
  1810. hosOk(data) {
  1811. console.log(data);
  1812. const {
  1813. accountName,
  1814. account,
  1815. accountId
  1816. } = data;
  1817. if (!accountName && !account) {
  1818. //没有填写交接人
  1819. uni.showModal({
  1820. title: '提示',
  1821. content: "请填写交接人工号!",
  1822. showCancel: false,
  1823. success: function(res) {
  1824. if (res.confirm) {
  1825. console.log('用户点击确定');
  1826. } else if (res.cancel) {
  1827. console.log('用户点击取消');
  1828. }
  1829. }
  1830. });
  1831. return;
  1832. } else if (!accountName && account || accountName && !account) {
  1833. //没有填写交接人
  1834. uni.showModal({
  1835. title: '提示',
  1836. content: "请填写正确的交接人工号!",
  1837. showCancel: false,
  1838. success: function(res) {
  1839. if (res.confirm) {
  1840. console.log('用户点击确定');
  1841. } else if (res.cancel) {
  1842. console.log('用户点击取消');
  1843. }
  1844. }
  1845. });
  1846. return;
  1847. }
  1848. this.hosModels.disjunctor = false;
  1849. let associationTypeValue = this.currentData.taskType.associationType.value;
  1850. console.log(associationTypeValue)
  1851. this.uploadToOther(this.currentData, data, 'start');
  1852. },
  1853. // 填写交接人工号-取消
  1854. hosCancel() {
  1855. this.hosModels.disjunctor = false;
  1856. },
  1857. // 填写交接人工号弹窗
  1858. showSelectAccount() {
  1859. this.hosModels = {
  1860. disjunctor: true,
  1861. }
  1862. },
  1863. // 拍照-上传
  1864. uploadToOther(data, accountObj, type){
  1865. // 其他临床服务拍照签到
  1866. console.log(data, 1111);
  1867. let id_seimin;
  1868. let asTypeValue_seimin;
  1869. let gdStateValue_seimin;
  1870. if (data.status != 200 && data.status !== undefined) {
  1871. id_seimin = data.id;
  1872. asTypeValue_seimin = data.type;
  1873. gdStateValue_seimin = JSON.parse(data.model).gdstate2; //type改成gdstate
  1874. } else {
  1875. id_seimin = data.id;
  1876. asTypeValue_seimin = data.taskType.associationType.value;
  1877. gdStateValue_seimin = data.gdState.value;
  1878. }
  1879. //#ifdef H5
  1880. uni.chooseImage({
  1881. count: 1,
  1882. sourceType: ['camera'],
  1883. success: (chooseImageRes) => {
  1884. console.log(chooseImageRes, pathUrl)
  1885. const tempFilePaths = chooseImageRes.tempFilePaths;
  1886. const tempFiles = chooseImageRes.tempFiles;
  1887. let tp = tempFilePaths[0];
  1888. uni.showLoading({
  1889. mask: true,
  1890. title: '加载中'
  1891. });
  1892. post('/workerOrder/findRecordInfoByOrderId', {
  1893. orderId: id_seimin,
  1894. gdOperate: 21,
  1895. }).then(result => {
  1896. console.log(result)
  1897. if (result.state == 200) {
  1898. uni.getImageInfo({
  1899. src: tp,
  1900. success: (res) => {
  1901. console.log('压缩前', res)
  1902. let canvasWidth = res.width //图片原始长宽
  1903. let canvasHeight = res.height
  1904. let img = new Image()
  1905. img.src = res.path
  1906. let canvas = document.createElement('canvas');
  1907. let ctx = canvas.getContext('2d')
  1908. canvas.width = canvasWidth
  1909. canvas.height = canvasHeight
  1910. ctx.drawImage(img, 0, 0, canvasWidth, canvasHeight)
  1911. canvas.toBlob((fileSrc) => {
  1912. tp = window.URL.createObjectURL(fileSrc)
  1913. console.log('压缩后', tp);
  1914. uni.uploadFile({
  1915. url: pathUrl + '/common/common/uploadAttachment/'+(type == 'start' ? 'orderStartPhoto' : 'orderEndPhoto')+'/' + id_seimin + '/' + result.recordId,
  1916. filePath: tp,
  1917. name: 'file',
  1918. formData: {
  1919. 'filename': tempFiles[0].name ? tempFiles[0].name.split('.')[0] + '.jpg' : tempFiles[
  1920. 0].path.split(
  1921. /[\\/]/).reverse()[0].split('.')[0] + '.jpg'
  1922. },
  1923. success: (uploadFileRes) => {
  1924. console.log(uploadFileRes, 10086, asTypeValue_seimin);
  1925. this.nextDeptOrder_ss(data, accountObj, type);
  1926. },
  1927. fail: err => {
  1928. console.error(err);
  1929. uni.hideLoading();
  1930. uni.showToast({
  1931. icon: 'none',
  1932. title: '上传失败',
  1933. duration: 2000
  1934. });
  1935. }
  1936. });
  1937. }, 'image/jpeg', 0.3)
  1938. },
  1939. fail: function () {
  1940. uni.hideLoading();
  1941. uni.showToast({
  1942. icon: 'none',
  1943. title: '上传失败',
  1944. duration: 2000
  1945. });
  1946. }
  1947. })
  1948. } else {
  1949. uni.hideLoading();
  1950. uni.showToast({
  1951. icon: "none",
  1952. title: result.msg || "接口获取数据失败!",
  1953. });
  1954. }
  1955. })
  1956. }
  1957. });
  1958. //#endif
  1959. //#ifdef APP-PLUS
  1960. uni.chooseImage({
  1961. count: 1,
  1962. sourceType: ['camera'],
  1963. sizeType: ['compressed'],
  1964. success: (chooseImageRes) => {
  1965. console.log(chooseImageRes, pathUrl)
  1966. const tempFilePaths = chooseImageRes.tempFilePaths;
  1967. const tempFiles = chooseImageRes.tempFiles;
  1968. let tp = tempFilePaths[0];
  1969. uni.showLoading({
  1970. mask: true,
  1971. title: '加载中'
  1972. });
  1973. post('/workerOrder/findRecordInfoByOrderId', {
  1974. orderId: id_seimin,
  1975. gdOperate: 21,
  1976. }).then(result => {
  1977. console.log(result)
  1978. if (result.state == 200) {
  1979. uni.compressImage({
  1980. src: tp,
  1981. quality: 30,
  1982. success: (res) => {
  1983. console.log('压缩前', res)
  1984. tp = res.tempFilePath;
  1985. console.log('压缩后', tp);
  1986. uni.uploadFile({
  1987. url: pathUrl + '/common/common/uploadAttachment/'+(type == 'start' ? 'orderStartPhoto' : 'orderEndPhoto')+'/' + id_seimin + '/' + result.recordId,
  1988. filePath: tp,
  1989. name: 'file',
  1990. formData: {
  1991. 'filename': tempFiles[0].name ? tempFiles[0].name.split('.')[0] + '.jpg' : tempFiles[
  1992. 0].path.split(
  1993. /[\\/]/).reverse()[0].split('.')[0] + '.jpg'
  1994. },
  1995. success: (uploadFileRes) => {
  1996. console.log(uploadFileRes, 10086, asTypeValue_seimin);
  1997. this.nextDeptOrder_ss(data, accountObj, type);
  1998. },
  1999. fail: err => {
  2000. console.error(err);
  2001. uni.hideLoading();
  2002. uni.showToast({
  2003. icon: 'none',
  2004. title: '上传失败',
  2005. duration: 2000
  2006. });
  2007. }
  2008. });
  2009. },
  2010. fail: function () {
  2011. uni.hideLoading();
  2012. uni.showToast({
  2013. icon: 'none',
  2014. title: '上传失败',
  2015. duration: 2000
  2016. });
  2017. }
  2018. })
  2019. } else {
  2020. uni.hideLoading();
  2021. uni.showToast({
  2022. icon: "none",
  2023. title: result.msg || "接口获取数据失败!",
  2024. });
  2025. }
  2026. })
  2027. }
  2028. });
  2029. //#endif
  2030. },
  2031. // 拍照-其他
  2032. async photographToOther(data, type) {
  2033. this.currentData = data;
  2034. uni.showLoading({
  2035. title: "加载中",
  2036. mask: true,
  2037. });
  2038. // 其他临床服务
  2039. let result = await post("/dept/scanning", {
  2040. content: type === 'start' ? data.startDept.qrcode : data.endDepts[0].qrcode,
  2041. taskTypeId: data.taskType.id,
  2042. gdState: data.gdState.id,
  2043. });
  2044. uni.hideLoading();
  2045. this.currentCode = result.code;
  2046. if (result.state == 200 || result.state == 201) {
  2047. uni.showModal({
  2048. title: '提示',
  2049. content: '请尽量拍摄角度覆盖清洁区域?',
  2050. success: (res) => {
  2051. if (res.confirm) {
  2052. if (result.account) {
  2053. this.uploadToOther(data, {
  2054. account: result.account,
  2055. accountName: result.name,
  2056. accountId: result.id,
  2057. }, type);
  2058. } else {
  2059. this.uploadToOther(data, undefined, type);
  2060. }
  2061. } else if (res.cancel) {
  2062. console.log('用户点击取消');
  2063. }
  2064. }
  2065. });
  2066. } else if (result.state == '0000') {
  2067. this.showSelectAccount();
  2068. } else {
  2069. uni.showToast({
  2070. icon: "none",
  2071. title: result.info || "接口获取数据失败!",
  2072. });
  2073. }
  2074. },
  2075. fabClick(){
  2076. },
  2077. // 悬浮按钮点击事件
  2078. trigger(e) {
  2079. if (e.item.text === "我的任务") {
  2080. uni.navigateTo({
  2081. url: "../mypage/mypage",
  2082. });
  2083. } else if (e.item.text === "退出登录") {
  2084. // 假登录
  2085. uni.showToast({
  2086. title: "退出成功!",
  2087. });
  2088. let ip = uni.getStorageSync("ip"); //记住域名或ip
  2089. let username = uni.getStorageSync("username"); //记住用户名
  2090. let password = uni.getStorageSync("password"); //记住密码
  2091. let savePasswordTime = uni.getStorageSync("savePasswordTime"); //记住密码的时间戳
  2092. let clientid = uni.getStorageSync("clientid");
  2093. uni.clearStorageSync();
  2094. if (username) {
  2095. uni.setStorageSync("ip", ip); //记住域名或ip
  2096. uni.setStorageSync("username", username); //记住用户名
  2097. uni.setStorageSync("password", password); //记住密码
  2098. uni.setStorageSync("savePasswordTime", savePasswordTime); //记住密码的时间戳
  2099. }
  2100. uni.setStorageSync("clientid", clientid);
  2101. uni.navigateTo({
  2102. url: "../homePage/homePage",
  2103. });
  2104. // 假登录
  2105. deleteIt("/auth/logout2").then((result) => {
  2106. if (result.status == 200) {
  2107. uni.showToast({
  2108. title: "退出成功!",
  2109. });
  2110. let ip = uni.getStorageSync("ip"); //记住域名或ip
  2111. let username = uni.getStorageSync("username"); //记住用户名
  2112. let password = uni.getStorageSync("password"); //记住密码
  2113. let clientid = uni.getStorageSync("clientid");
  2114. uni.clearStorageSync();
  2115. uni.setStorageSync("ip", ip); //记住域名或ip
  2116. uni.setStorageSync("username", username); //记住用户名
  2117. uni.setStorageSync("password", password); //记住密码
  2118. uni.setStorageSync("clientid", clientid);
  2119. uni.navigateTo({
  2120. url: "../homePage/homePage",
  2121. });
  2122. } else {
  2123. uni.showToast({
  2124. icon: "none",
  2125. title: result.msg || "接口获取数据失败!",
  2126. });
  2127. }
  2128. });
  2129. } else if (e.item.text === "药房") {
  2130. uni.navigateTo({
  2131. url: "../pharmacy/pharmacy",
  2132. });
  2133. } else if (e.item.text === "患者信息") {
  2134. uni.navigateTo({
  2135. url: "../patientInformationList/patientInformationList",
  2136. });
  2137. } else if (e.item.text === "负责科室") {
  2138. if (uni.getStorageSync("setDepts")) {
  2139. uni.removeStorageSync("setDepts"); //清空选择的科室,初始化
  2140. }
  2141. let obj = uni.getStorageSync("setDeptConfg");
  2142. uni.navigateTo({
  2143. url: `../setDept/setDept?configName=${obj.configName}&id=${obj.id}&changedept=1`,
  2144. });
  2145. } else if (e.item.text === "检查信息") {
  2146. uni.navigateTo({
  2147. url: "../inspectList/inspectList",
  2148. });
  2149. } else if (e.item.text === "二维码设置") {
  2150. uni.navigateTo({
  2151. url: "../settingCode/settingCode",
  2152. });
  2153. } else if (e.item.text === "标本录入") {
  2154. this.showHandViewSpecimen();
  2155. } else if (e.item.text === "药品录入") {
  2156. this.showHandViewDrugsbag();
  2157. } else if (e.item.text === "示忙") {
  2158. this.showLeisure();
  2159. } else if (e.item.text === "示闲") {
  2160. this.showBusy();
  2161. } else if (e.item.text === "摆药取药") {
  2162. this.handleTakeMedicine()
  2163. } else if (e.item.text === "我的二维码") {
  2164. this.myQrcodeHandler()
  2165. } else if (e.item.text === "科室二维码") {
  2166. this.departmentQrcodeHandler()
  2167. } else if (e.item.text === "查看表单") {
  2168. uni.navigateTo({
  2169. url: "../formManagementWechat/formManagementWechat",
  2170. });
  2171. } else if (e.item.text === "快捷接单") {
  2172. uni.navigateTo({
  2173. url: "../quickOrderAcceptanceWx/quickOrderAcceptanceWx",
  2174. });
  2175. } else if (e.item.text === "被服回收") {
  2176. this.quiltScan();
  2177. } else if (e.item.text === "送回发起") {
  2178. uni.navigateTo({
  2179. url: "/pages/quiltWashing/quiltWashingSendSelectDept/quiltWashingSendSelectDept",
  2180. });
  2181. } else if (e.item.text === "领取交接") {
  2182. this.quiltScan_send();
  2183. } else if (e.item.text === "医废出库") {
  2184. uni.navigateTo({
  2185. url: "/pages/medicalWaste/medicalWasteSelect/medicalWasteSelect",
  2186. });
  2187. }
  2188. },
  2189. //确定
  2190. ok1() {
  2191. this.models1.disjunctor = false;
  2192. uni.showLoading({
  2193. title: "加载中",
  2194. mask: true,
  2195. });
  2196. let startDeptId, startDeptName, handoverId, handoverName;
  2197. if(this.clothingType === 'user'){
  2198. startDeptId = this.quiltData.dept.id;
  2199. startDeptName = this.quiltData.dept.dept;
  2200. handoverId = this.quiltData.id;
  2201. handoverName = this.quiltData.name;
  2202. }else if(this.clothingType === 'dept'){
  2203. startDeptId = this.quiltData.id;
  2204. startDeptName = this.quiltData.dept;
  2205. handoverId = undefined;
  2206. handoverName = '';
  2207. }
  2208. post("/transflow/createOrTakeOrder", {
  2209. type: 'clothingGet',
  2210. id: 0,
  2211. startDeptId,
  2212. hosId: this.hosId,
  2213. handoverId,
  2214. }).then((res) => {
  2215. uni.hideLoading();
  2216. if (res.data && res.data.state == 200) {
  2217. uni.navigateTo({
  2218. url: `../quiltWashing/quiltWashingGetSignIn/quiltWashingGetSignIn?quiltCode=${this.quiltCode}&startDeptId=${startDeptId}&startDeptName=${startDeptName}&orderId=${res.data.orderId}&name=${handoverName}`,
  2219. });
  2220. }else{
  2221. uni.showToast({
  2222. icon: "none",
  2223. title: res.data ? res.data.msg : "接口获取数据失败!",
  2224. });
  2225. }
  2226. });
  2227. },
  2228. //取消
  2229. cancel1() {
  2230. this.models1.disjunctor = false;
  2231. },
  2232. // 被服回收弹窗
  2233. showQuiltData(data) {
  2234. this.quiltData = data;
  2235. let content = '';
  2236. if(this.clothingType === 'user'){
  2237. content = `您扫描的是<strong class="red">${data.name}</strong>的工号,是否建立<strong class="red">${data.dept.dept}</strong>的被服回收工单吗?`;
  2238. }else if(this.clothingType === 'dept'){
  2239. content = `您扫描的科室码,是否建立<strong class="red">${data.dept}</strong>的被服回收工单吗?`;
  2240. }
  2241. this.models1 = {
  2242. disjunctor: true,
  2243. title: "提示",
  2244. content,
  2245. icon: "warn",
  2246. operate: {
  2247. ok: "建立工单",
  2248. cancel: "取消",
  2249. },
  2250. };
  2251. },
  2252. //确定
  2253. ok2(deptDto) {
  2254. console.log(deptDto);
  2255. this.models2.disjunctor = false;
  2256. uni.showLoading({
  2257. title: "加载中",
  2258. mask: true,
  2259. });
  2260. let startDeptId, startDeptName, handoverId, handoverName;
  2261. if(this.clothingType === 'user'){
  2262. startDeptId = deptDto.id;
  2263. startDeptName = deptDto.dept;
  2264. handoverId = this.quiltData.id;
  2265. handoverName = this.quiltData.name;
  2266. }else if(this.clothingType === 'dept'){
  2267. startDeptId = deptDto.id;
  2268. startDeptName = deptDto.dept;
  2269. handoverId = undefined;
  2270. handoverName = '';
  2271. }
  2272. post("/transflow/createOrTakeOrder", {
  2273. type: 'clothingGet',
  2274. id: 0,
  2275. startDeptId,
  2276. hosId: this.hosId,
  2277. handoverId,
  2278. }).then((res) => {
  2279. uni.hideLoading();
  2280. if (res.data && res.data.state == 200) {
  2281. uni.navigateTo({
  2282. url: `../quiltWashing/quiltWashingGetSignIn/quiltWashingGetSignIn?quiltCode=${this.quiltCode}&startDeptId=${startDeptId}&startDeptName=${startDeptName}&orderId=${res.data.orderId}&name=${handoverName}`,
  2283. });
  2284. }else{
  2285. uni.showToast({
  2286. icon: "none",
  2287. title: res.data ? res.data.msg : "接口获取数据失败!",
  2288. });
  2289. }
  2290. });
  2291. },
  2292. //取消
  2293. cancel2() {
  2294. this.models2.disjunctor = false;
  2295. },
  2296. showParentQuiltData(data){
  2297. this.quiltData = data;
  2298. // 判断是否是父级科室
  2299. let startDeptId, startDeptName, handoverId, handoverName, content;
  2300. if(this.clothingType === 'user'){
  2301. startDeptId = this.quiltData.dept.id;
  2302. startDeptName = this.quiltData.dept.dept;
  2303. handoverId = this.quiltData.id;
  2304. handoverName = this.quiltData.name;
  2305. content = `您扫描的是<strong class="red">${handoverName}</strong>的工号,科室为<strong class="red">${startDeptName}</strong>,需要选择相应的子级科室建单。`;
  2306. }else if(this.clothingType === 'dept'){
  2307. startDeptId = this.quiltData.id;
  2308. startDeptName = this.quiltData.dept;
  2309. handoverId = undefined;
  2310. handoverName = '';
  2311. content = `您扫描的是科室为<strong class="red">${startDeptName}</strong>,需要选择相应的子级科室建单。`;
  2312. }
  2313. uni.showLoading({
  2314. title: "加载中",
  2315. mask: true,
  2316. });
  2317. post("/data/fetchDataList/department", {
  2318. "idx": 0,
  2319. "sum": 9999,
  2320. "department": {
  2321. "cascadeHosId": this.hosId,
  2322. "parent": {
  2323. "id": startDeptId
  2324. },
  2325. "searchType": 1,// 简单查询
  2326. }
  2327. }).then((res) => {
  2328. uni.hideLoading();
  2329. if (res.status == 200) {
  2330. if(res.list.length > 0){
  2331. this.models2 = {
  2332. disjunctor: true,
  2333. title: "提示",
  2334. content,
  2335. icon: "warn",
  2336. list: res.list,
  2337. operate: {
  2338. cancel: "取消",
  2339. },
  2340. };
  2341. }else{
  2342. this.showQuiltData(data)
  2343. }
  2344. }else{
  2345. uni.showToast({
  2346. icon: "none",
  2347. title: res.data ? res.data.msg : "接口获取数据失败!",
  2348. });
  2349. }
  2350. });
  2351. },
  2352. //确定
  2353. ok3(busyContent) {
  2354. console.log(busyContent);
  2355. this.models3.disjunctor = false;
  2356. uni.showLoading({
  2357. title: "加载中",
  2358. mask: true,
  2359. });
  2360. post("/user/data/changeWorkState", {
  2361. workState: this.workStateList.find(v => v.value == 2).id,
  2362. minute: busyContent.busyMinute,
  2363. workStateRemark: busyContent.busyContent,
  2364. }).then((res) => {
  2365. uni.hideLoading();
  2366. if (res.status == 200) {
  2367. this.getCurrentUserNow();
  2368. this.models3 = {
  2369. disjunctor: true,
  2370. title: "提示",
  2371. content: `您上班状态修改为<strong class="red">${busyContent.busyContent}</strong>,<strong class="red">${busyContent.busyMinute}</strong>分钟后自动恢复`,
  2372. icon: "warn",
  2373. operate: {
  2374. know: "知道了",
  2375. },
  2376. };
  2377. }else{
  2378. uni.showToast({
  2379. icon: "none",
  2380. title: res.msg || "接口获取数据失败!",
  2381. });
  2382. }
  2383. });
  2384. },
  2385. //取消
  2386. cancel3() {
  2387. this.models3.disjunctor = false;
  2388. },
  2389. //知道了
  2390. know3() {
  2391. this.models3.disjunctor = false;
  2392. },
  2393. // 扫描工牌-被服洗涤
  2394. quiltScan() {
  2395. if (!this.SMFlag) {
  2396. return;
  2397. }
  2398. this.SMFlag = false;
  2399. SM().then((content) => {
  2400. uni.showLoading({
  2401. title: "加载中",
  2402. mask: true,
  2403. });
  2404. //检验二维码的有效性(扫码前必须验证)
  2405. post("/dept/scanning", {
  2406. content,
  2407. })
  2408. .then((result) => {
  2409. this.quiltCode = result.code;
  2410. this.SMFlag = true;
  2411. // 200检测通过,201没有有效期也通过。
  2412. if (result.state == 200 || result.state == 201) {
  2413. let data = {
  2414. code: this.quiltCode, //二维码
  2415. };
  2416. post("/transflow/bigScan", { type: 'clothingGet', code: this.quiltCode })
  2417. .then((res) => {
  2418. uni.hideLoading();
  2419. if (res.state == 200) {
  2420. this.clothingType = res.type;
  2421. // 如果当前科室有回收单,并且配送人员是当前登陆人
  2422. if(res.orderId){
  2423. if(res.type == 'user'){
  2424. uni.navigateTo({
  2425. url: `../quiltWashing/quiltWashingGetSignIn/quiltWashingGetSignIn?quiltCode=${this.quiltCode}&startDeptId=${res.data.dept.id}&startDeptName=${res.data.dept.dept}&orderId=${res.orderId}&name=${res.data.name}&nameId=${res.data.id}`,
  2426. });
  2427. } else if(res.type == 'dept'){
  2428. uni.navigateTo({
  2429. url: `../quiltWashing/quiltWashingGetSignIn/quiltWashingGetSignIn?quiltCode=${this.quiltCode}&startDeptId=${res.data.id}&startDeptName=${res.data.dept}&orderId=${res.orderId}&name=`,
  2430. });
  2431. }
  2432. }else{
  2433. this.showParentQuiltData(res.data);
  2434. }
  2435. } else {
  2436. uni.navigateTo({
  2437. url: `../scanning_Result/scanning_Result?status=${res.state}&msg=${res.msg}&qrcode=${this.quiltCode}`,
  2438. });
  2439. }
  2440. });
  2441. } else {
  2442. uni.hideLoading();
  2443. uni.showToast({
  2444. icon: "none",
  2445. title: result.info || "接口获取数据失败!",
  2446. });
  2447. }
  2448. })
  2449. }).catch(err => {
  2450. this.SMFlag = true;
  2451. });
  2452. },
  2453. // 扫描工牌-被服洗涤
  2454. quiltScan_send() {
  2455. if (!this.SMFlag) {
  2456. return;
  2457. }
  2458. this.SMFlag = false;
  2459. SM().then((content) => {
  2460. uni.showLoading({
  2461. title: "加载中",
  2462. mask: true,
  2463. });
  2464. //检验二维码的有效性(扫码前必须验证)
  2465. post("/dept/scanning", {
  2466. content,
  2467. })
  2468. .then((result) => {
  2469. this.quiltCode = result.code;
  2470. this.SMFlag = true;
  2471. // 200检测通过,201没有有效期也通过。
  2472. if (result.state == 200 || result.state == 201) {
  2473. let data = {
  2474. code: this.quiltCode, //二维码
  2475. };
  2476. post("/transflow/extra", { type: 'clothingSend', receiveAndHandover: true, code: this.quiltCode }).then((res) => {
  2477. uni.hideLoading();
  2478. if (res.data && res.data.state == 200) {
  2479. uni.navigateTo({
  2480. url: `../quiltWashing/quiltWashingSendsendHandover/quiltWashingSendsendHandover?quiltCode=${this.quiltCode}`,
  2481. });
  2482. } else {
  2483. uni.navigateTo({
  2484. url: `../scanning_Result/scanning_Result?status=${res.data ? res.data.state : 500}&msg=${res.data ? res.data.msg : ''}&qrcode=${this.quiltCode}`,
  2485. });
  2486. }
  2487. });
  2488. } else {
  2489. uni.hideLoading();
  2490. uni.showToast({
  2491. icon: "none",
  2492. title: result.info || "接口获取数据失败!",
  2493. });
  2494. }
  2495. })
  2496. }).catch(err => {
  2497. this.SMFlag = true;
  2498. });
  2499. },
  2500. // 我的二维码
  2501. myQrcodeHandler(){
  2502. this.showMyQrcodeModel = {
  2503. disjunctor: true,
  2504. };
  2505. },
  2506. closeMyQrcodeModel(){
  2507. this.showMyQrcodeModel.disjunctor = false;
  2508. },
  2509. // 领血证二维码
  2510. certificatHandler(data){
  2511. this.showCertificatModel = {
  2512. disjunctor: true,
  2513. id: data.id,
  2514. };
  2515. },
  2516. closeCertificatModel(){
  2517. this.showCertificatModel.disjunctor = false;
  2518. },
  2519. // 科室二维码
  2520. departmentQrcodeHandler(){
  2521. this.showDepartmentQrcodeModel = {
  2522. disjunctor: true,
  2523. };
  2524. },
  2525. closeDepartmentQrcodeModel(){
  2526. this.showDepartmentQrcodeModel.disjunctor = false;
  2527. },
  2528. // 摆药取药
  2529. handleTakeMedicine() {
  2530. if (!this.SMFlag) {
  2531. return;
  2532. }
  2533. this.SMFlag = false;
  2534. SM().then((content) => {
  2535. uni.showLoading({
  2536. title: "加载中",
  2537. mask: true,
  2538. });
  2539. //检验二维码的有效性(扫码前必须验证)
  2540. post("/dept/scanning", {
  2541. content,
  2542. })
  2543. .then((result) => {
  2544. this.currentCode = result.code;
  2545. this.SMFlag = true;
  2546. // 200检测通过,201没有有效期也通过。
  2547. if (result.state == 200 || result.state == 201) {
  2548. uni.hideLoading();
  2549. uni.navigateTo({
  2550. url: `../promptPage/promptPage?code=${result.code}`,
  2551. });
  2552. } else {
  2553. uni.hideLoading();
  2554. uni.showToast({
  2555. icon: "none",
  2556. title: result.info || "接口获取数据失败!",
  2557. });
  2558. }
  2559. })
  2560. }).catch(err => {
  2561. this.SMFlag = true;
  2562. });
  2563. },
  2564. // 点击tab页切换
  2565. clickHandler(key) {
  2566. this.selectedLabelSlots = key;
  2567. this.idx = 0;
  2568. this.totalNum = -1;
  2569. this.scroll_top = Math.random(); //回到顶部
  2570. this.execFilterReset()
  2571. if (key === "待接单") {
  2572. this.waitingOrders(0);
  2573. } else if (key === "执行中") {
  2574. this.executingOrders(0);
  2575. }
  2576. },
  2577. // 进入详情页
  2578. itemInfo(workOrder) {
  2579. console.log(workOrder);
  2580. uni.navigateTo({
  2581. url: `../receipt_infopage/receipt_infopage?id=${workOrder.id}&associationTypeValue=${workOrder.taskType.associationType.value}&associationTypeId=${workOrder.taskType.associationType.id}&taskTypeId=${workOrder.taskType.id}`,
  2582. });
  2583. },
  2584. //抢单后知道了
  2585. know() {
  2586. this.models.disjunctor = false;
  2587. this.idx = 0;
  2588. this.totalNum = -1;
  2589. // this.zxzData = [];
  2590. this.executingOrdersGetNum();
  2591. this.waitingOrders(0); //seimin
  2592. this.scroll_top = Math.random(); //回到顶部
  2593. },
  2594. //抢单确定
  2595. ok() {
  2596. this.models.disjunctor = false;
  2597. get("/workerOrder/takeOrder/" + this.qdId.id).then((res) => {
  2598. let msg = "接单失败";
  2599. let icon = "error";
  2600. if (res.status == 200) {
  2601. msg = "接单成功";
  2602. icon = "success";
  2603. }
  2604. this.models = {
  2605. disjunctor: true,
  2606. content: msg,
  2607. icon: icon,
  2608. operate: {
  2609. know: "知道了",
  2610. },
  2611. };
  2612. });
  2613. },
  2614. //抢单取消
  2615. cancel() {
  2616. this.models.disjunctor = false;
  2617. },
  2618. // 抢单
  2619. showAlerts(data) {
  2620. this.qdId = data;
  2621. this.models = {
  2622. disjunctor: true,
  2623. title: "提示",
  2624. content: "是否确定接单?",
  2625. icon: "warn",
  2626. operate: {
  2627. ok: "确定",
  2628. cancel: "取消",
  2629. },
  2630. };
  2631. },
  2632. //执行中列表数据获取
  2633. executingOrders(idx,type) {
  2634. console.log(this.zxzData.length, this.totalNum);
  2635. if (this.zxzData.length == this.totalNum) {
  2636. uni.showToast({
  2637. icon: "none",
  2638. title: "没有更多数据了!",
  2639. });
  2640. this.freshing = true;
  2641. return;
  2642. }
  2643. let data = {
  2644. idx,
  2645. sum: 20,
  2646. };
  2647. if (this.currentId) {
  2648. data.keyWord = this.currentId;
  2649. } else {
  2650. delete data.keyWord;
  2651. }
  2652. if (this.deptId) {
  2653. data.deptId = this.deptId;
  2654. } else {
  2655. delete data.deptId;
  2656. }
  2657. if (this.taskTypeId) {
  2658. data.taskTypeId = this.taskTypeId;
  2659. } else {
  2660. delete data.taskTypeId;
  2661. }
  2662. uni.showLoading({
  2663. title: "加载中",
  2664. mask: true,
  2665. });
  2666. post("/workerOrder/executingOrders", data).then((res) => {
  2667. uni.hideLoading();
  2668. if (res.status == 200) {
  2669. this.triggered = false;
  2670. this.freshing = true;
  2671. this.totalNum = res.data.resultCount;
  2672. res.data.data = res.data.data || [];
  2673. res.data.data.forEach(v => {
  2674. v.clinicalTaskIdsFlag = this.clinicalTaskIds.includes(v.taskType.id.toString());
  2675. })
  2676. if (idx === 0) {
  2677. this.zxzData = res.data.data;
  2678. } else {
  2679. this.zxzData.push(...res.data.data);
  2680. }
  2681. this.tabs[1].num = res.data.resultCount;
  2682. } else {
  2683. uni.showToast({
  2684. icon: "none",
  2685. title: res.msg || "接口获取数据失败!",
  2686. });
  2687. }
  2688. });
  2689. },
  2690. //待抢单列表数据获取
  2691. waitingOrders(idx) {
  2692. if (this.zxzData.length == this.totalNum) {
  2693. uni.showToast({
  2694. icon: "none",
  2695. title: "没有更多数据了!",
  2696. });
  2697. this.freshing = true;
  2698. return;
  2699. }
  2700. let data = {
  2701. idx,
  2702. sum: 20,
  2703. };
  2704. if (this.deptId) {
  2705. data.deptId = this.deptId;
  2706. } else {
  2707. delete data.deptId;
  2708. }
  2709. if (this.taskTypeId) {
  2710. data.taskTypeId = this.taskTypeId;
  2711. } else {
  2712. delete data.taskTypeId;
  2713. }
  2714. uni.showLoading({
  2715. title: "加载中",
  2716. mask: true,
  2717. });
  2718. // 请求列表数据
  2719. post("/workerOrder/waitingOrders", data).then((res) => {
  2720. uni.hideLoading();
  2721. if (res.status == 200) {
  2722. this.triggered = false;
  2723. this.freshing = true;
  2724. this.totalNum = res.data.resultCount;
  2725. if (idx === 0) {
  2726. this.zxzData = res.data.data;
  2727. } else {
  2728. this.zxzData.push(...res.data.data);
  2729. }
  2730. this.tabs[0].num = res.data.resultCount;
  2731. } else {
  2732. uni.showToast({
  2733. icon: "none",
  2734. title: res.msg || "接口获取数据失败!",
  2735. });
  2736. }
  2737. });
  2738. },
  2739. //刷新
  2740. refresherrefresh() {
  2741. if (this.triggered) {
  2742. return;
  2743. }
  2744. this.triggered = true;
  2745. this.idx = 0;
  2746. this.totalNum = -1;
  2747. if (this.selectedLabelSlots == "待接单") {
  2748. this.waitingOrders(0);
  2749. } else if (this.selectedLabelSlots == "执行中") {
  2750. this.executingOrders(0);
  2751. }
  2752. },
  2753. // 滚动
  2754. scroll(e) {
  2755. if (e.detail.scrollTop < 20) {
  2756. this.scroll_refresher_enabled = true;
  2757. } else {
  2758. this.scroll_refresher_enabled = false;
  2759. }
  2760. },
  2761. // 下拉刷新复位
  2762. refresherrestore() {
  2763. this.triggered = false;
  2764. console.log("下拉刷新复位");
  2765. },
  2766. //下拉刷新中止
  2767. refresherabort() {
  2768. this.triggered = false;
  2769. console.log("下拉刷新中止");
  2770. },
  2771. //分页,上拉加载
  2772. scrolltolower() {
  2773. if (this.freshing) {
  2774. this.freshing = false;
  2775. if (this.selectedLabelSlots == "待接单") {
  2776. this.waitingOrders(++this.idx);
  2777. } else if (this.selectedLabelSlots == "执行中") {
  2778. this.executingOrders(++this.idx);
  2779. }
  2780. }
  2781. },
  2782. // 执行中获取数字
  2783. executingOrdersGetNum() {
  2784. let data = {
  2785. idx: 0,
  2786. sum: 20,
  2787. };
  2788. if (this.arrayKey) {
  2789. data.keyWord = this.arrayKey;
  2790. } else {
  2791. delete data.keyWord;
  2792. }
  2793. post("/workerOrder/executingOrders", data).then((res) => {
  2794. if (res.status == 200) {
  2795. this.tabs[1].num = res.data.resultCount;
  2796. } else {
  2797. uni.showToast({
  2798. icon: "none",
  2799. title: res.msg || "接口获取数据失败!",
  2800. });
  2801. }
  2802. });
  2803. },
  2804. // 待接单获取数字
  2805. waitingOrdersGetNum() {
  2806. let data = {
  2807. idx: 0,
  2808. sum: 20,
  2809. };
  2810. post("/workerOrder/waitingOrders", data).then((res) => {
  2811. if (res.status == 200) {
  2812. this.tabs[0].num = res.data.resultCount;
  2813. } else {
  2814. uni.showToast({
  2815. icon: "none",
  2816. title: res.msg || "接口获取数据失败!",
  2817. });
  2818. }
  2819. });
  2820. },
  2821. // 阻止浏览器滑动
  2822. stop(e) {
  2823. e.preventDefault();
  2824. },
  2825. // 更新用户所在科室
  2826. updateUser(dept) {
  2827. post("/user/data/bindDutyDept", {dutyDept: +dept.id}).then((res) => {
  2828. if (res.status == 200) {
  2829. this.getCurrentUserNow(true);
  2830. }else{
  2831. uni.showToast({
  2832. icon: "none",
  2833. title: res.msg || "接口获取数据失败!",
  2834. });
  2835. }
  2836. })
  2837. },
  2838. // 重新获取用户信息
  2839. getCurrentUserNow(updateDept = false) {
  2840. get("/user/data/getCurrentUser").then((res) => {
  2841. if (res.status == 200) {
  2842. let userData = uni.getStorageSync('userData');
  2843. userData.user = res.data;
  2844. uni.setStorageSync('userData', userData);
  2845. // 显示科室二维码
  2846. if(updateDept){
  2847. this.departmentQrcodeHandler()
  2848. }else{
  2849. this.workState = uni.getStorageSync('userData').user.workState ? uni.getStorageSync('userData').user.workState.value : '1';
  2850. this.content.forEach(v => {
  2851. if(v.text == '示忙' || v.text == '示闲'){
  2852. v.text = this.workState == 1 ? '示闲' : '示忙';
  2853. }
  2854. })
  2855. }
  2856. }else{
  2857. uni.showToast({
  2858. icon: "none",
  2859. title: res.msg || "接口获取数据失败!",
  2860. });
  2861. }
  2862. })
  2863. },
  2864. onLoad(options) {
  2865. let admStore = uni.getStorageSync("admStore");
  2866. if(admStore.type=='searchAdm'){
  2867. if(Object.keys(admStore).length != 0){
  2868. this.$nextTick(_=>{
  2869. if(admStore.isSearch){
  2870. this.isShowExecFilter = true
  2871. }else{
  2872. this.isShowExecFilter = false
  2873. }
  2874. this.deptName = admStore.dept //科室名称
  2875. this.deptId = admStore.deptId //科室id
  2876. this.currentId = admStore.currentId //工单状态
  2877. this.taskTypeId = admStore.taskType //任务类型
  2878. this.selectedLabelSlots = admStore.selectedLabelSlots //tab选中状态
  2879. this.taskData = JSON.parse(admStore.taskData) //任务类型数据
  2880. })
  2881. }
  2882. }
  2883. this.workState = uni.getStorageSync('userData').user.workState ? uni.getStorageSync('userData').user.workState.value : '1';
  2884. // 获取菜单权限
  2885. this.getMenu();
  2886. post("/auth/getUserWorkDept", {}).then((ress) => {
  2887. if (ress.status == 200) {
  2888. let userId = uni.getStorageSync("userData").user.id;
  2889. let groupManager = ress.settings && ress.settings.groupManager; //当前工作组合选择的组
  2890. let workType = ress.settings ? ress.settings.workType : -1; //1是综合,2是自主
  2891. let ruleType = ress.settings ? ress.settings.ruleType : -1; //3是科室绑定人员,4是科室绑定分组,2是绑定分组
  2892. if (workType == 2 && (ruleType == 3 || (ruleType == 4 && userId == groupManager.manager))) {
  2893. //自选排班,科室绑定分组,当前登陆人是组长
  2894. this.content.unshift({
  2895. text: "负责科室",
  2896. });
  2897. }
  2898. }
  2899. });
  2900. // let setDeptConfg = uni.getStorageSync("setDeptConfg");
  2901. // let manager = uni.getStorageSync("manager");
  2902. // let userId = uni.getStorageSync("userData").user.id;
  2903. // console.log(setDeptConfg, manager, userId);
  2904. // if (
  2905. // setDeptConfg.workSchemeType == 2 &&
  2906. // (setDeptConfg.ruleType == 3 ||
  2907. // (setDeptConfg.ruleType == 4 && userId == manager))
  2908. // ) {
  2909. // //自选排班,科室绑定人员 || 科室绑定分组 && 组长是当前登陆人
  2910. // this.content.unshift({
  2911. // text: "负责科室",
  2912. // });
  2913. // }
  2914. // #ifdef APP-PLUS
  2915. // this.content.push({
  2916. // text: "退出登录",
  2917. // });
  2918. // #endif
  2919. this.selectedLabelSlots = "执行中";
  2920. this.initList();
  2921. this.getConfig();
  2922. // 科室二维码切换科室回显
  2923. if (options.showDepartmentQrcodeId && options.showDepartmentQrcodeDept) {
  2924. this.updateUser({id: options.showDepartmentQrcodeId, dept: options.showDepartmentQrcodeDept})
  2925. }
  2926. // #ifdef APP-PLUS
  2927. webHandle("no", "app");
  2928. // #endif
  2929. // #ifdef H5
  2930. webHandle("no", "wx");
  2931. // #endif
  2932. },
  2933. onShow() {
  2934. this.getConfig();
  2935. let that = this
  2936. // #ifdef APP-PLUS
  2937. uni.$off('scan') // 每次进来先 移除全局自定义事件监听器
  2938. uni.$on('scan', function(data) {
  2939. that.padChange(data)
  2940. })
  2941. // #endif
  2942. this.SMFlag = true;
  2943. // #ifdef H5
  2944. document.body.addEventListener("touchmove", this.stop, {
  2945. passive: false,
  2946. });
  2947. // #endif
  2948. },
  2949. onHide() {
  2950. // #ifdef H5
  2951. document.body.removeEventListener("touchmove", this.stop, {
  2952. passive: false,
  2953. });
  2954. // #endif
  2955. },
  2956. }
  2957. };
  2958. </script>
  2959. <style lang="less">
  2960. .hideInput{
  2961. height: 40px;
  2962. position: absolute;
  2963. width: 100px;
  2964. top: 100px;
  2965. left: 100px;
  2966. z-index: 99999;
  2967. border: 1px solid;
  2968. padding-left: 10px;
  2969. }
  2970. /deep/ .uni-drawer__content{
  2971. width: 600rpx !important;
  2972. }
  2973. /deep/ .selected-item-active{
  2974. border-bottom: 4rpx solid #49b856;
  2975. }
  2976. .Receiptpage {
  2977. width: 100%;
  2978. height: 100%;
  2979. position: relative;
  2980. .execFilterMask{
  2981. // position: fixed;
  2982. // top: 0;
  2983. // right: 0;
  2984. // bottom: 0;
  2985. // left: 0;
  2986. // z-index: 9999;
  2987. // background-color: rgba(0, 0, 0, 0.5);
  2988. // display: flex;
  2989. // flex-direction: column;
  2990. // justify-content: flex-end;
  2991. .execFilter{
  2992. position: relative;
  2993. background-color: #fff;
  2994. height: 100vh;
  2995. border-radius: 100rpx 100rpx 0 0;
  2996. .execFilterHeader{
  2997. height: 70rpx;
  2998. display: flex;
  2999. justify-content: center;
  3000. align-items: center;
  3001. border-bottom: 2rpx solid #ccc;
  3002. }
  3003. .execFilterBody{
  3004. .execFilterItem{
  3005. padding: 32rpx;
  3006. border-bottom: 2rpx dashed #ccc;
  3007. &:last-of-type{
  3008. border-bottom: none;
  3009. }
  3010. .execFilterItemHeader{}
  3011. .execFilterItemBody{
  3012. display: flex;
  3013. flex-wrap: wrap;
  3014. padding: 32rpx 0 0;
  3015. justify-content: space-between;
  3016. text-align: left;
  3017. .execFilterItemBox{
  3018. width: 200rpx;
  3019. height: 80rpx;
  3020. text-align: center;
  3021. line-height: 80rpx;
  3022. background-color: #f6f6f6;
  3023. margin-bottom: 20rpx;
  3024. border-radius: 80rpx;
  3025. &.active{
  3026. color: #fff;
  3027. background-color: #49b856;
  3028. }
  3029. }
  3030. .deptName {
  3031. height: 80rpx;
  3032. background-color: #f6f6f6;
  3033. border-radius: 20rpx;
  3034. padding: 0 20rpx;
  3035. width: 100%;
  3036. }
  3037. }
  3038. }
  3039. }
  3040. .execFilterFooter {
  3041. position: absolute;
  3042. bottom: 0;
  3043. right: 0;
  3044. left: 0;
  3045. line-height: 66rpx;
  3046. height: 100rpx;
  3047. display: flex;
  3048. justify-content: space-between;
  3049. .btn {
  3050. height: 66rpx;
  3051. flex: 1;
  3052. margin: 0 1%;
  3053. background-image: linear-gradient(to right, #72c172, #3bb197);
  3054. color: #fff;
  3055. border-radius: 8rpx;
  3056. font-size: 28rpx;
  3057. margin-top: 16rpx;
  3058. text-align: center;
  3059. }
  3060. }
  3061. }
  3062. }
  3063. .more {
  3064. position: absolute;
  3065. right: 20rpx;
  3066. width: 40rpx;
  3067. height: 4rpx;
  3068. border-top: 2px solid #49b856;
  3069. border-bottom: 2px solid #49b856;
  3070. background-color: #49b856;
  3071. padding: 5px 0;
  3072. background-clip: content-box;
  3073. z-index: 9999;
  3074. top: 50%;
  3075. transform: translateY(-50%);
  3076. }
  3077. .more_picker {
  3078. position: absolute;
  3079. right: 0;
  3080. top: 0;
  3081. height: 100%;
  3082. opacity: 0;
  3083. z-index: 9999;
  3084. }
  3085. .bigScreenWrap{
  3086. position: fixed;
  3087. left: 0;
  3088. right: 0;
  3089. bottom: 30rpx;
  3090. z-index: 999;
  3091. height: 88rpx;
  3092. padding: 0 8rpx;
  3093. display: flex;
  3094. .left{
  3095. width: 25%;
  3096. background-color: #e5e9ed;
  3097. margin-right: 8rpx;
  3098. display: flex;
  3099. align-items: center;
  3100. justify-content: center;
  3101. .left-title{
  3102. font-size: 34rpx;
  3103. }
  3104. .left-icon{
  3105. font-size: 34rpx;
  3106. color: #07863c;
  3107. }
  3108. }
  3109. .right{
  3110. width: 75%;
  3111. background-color: #e5e9ed;
  3112. }
  3113. .right-100{
  3114. width: 100% !important;
  3115. }
  3116. }
  3117. .red {
  3118. color: red !important;
  3119. font-weight: bold !important;
  3120. }
  3121. .page_tab {
  3122. width: 100%;
  3123. height: 96rpx;
  3124. display: flex;
  3125. position: fixed;
  3126. left: 0;
  3127. top: 0;
  3128. z-index: 999;
  3129. .page_tab_bar {
  3130. flex: 1;
  3131. font-size: 36rpx;
  3132. background: #fff;
  3133. display: flex;
  3134. justify-content: center;
  3135. align-items: center;
  3136. position: relative;
  3137. &:after {
  3138. content: "";
  3139. position: absolute;
  3140. left: 0;
  3141. bottom: 0;
  3142. height: 2rpx;
  3143. width: 100%;
  3144. background-color: transparent;
  3145. }
  3146. .tab_num {
  3147. color: #ff3b53;
  3148. margin-left: 8rpx;
  3149. }
  3150. &.active {
  3151. color: #49b856;
  3152. &:after {
  3153. background-color: #49b856;
  3154. }
  3155. }
  3156. }
  3157. }
  3158. .zwsj {
  3159. position: absolute;
  3160. left: 50%;
  3161. top: 180rpx;
  3162. transform: translateX(-50%);
  3163. .zwsj-img {
  3164. width: 560rpx;
  3165. }
  3166. .zwsj-txt {
  3167. font-size: 36rpx;
  3168. font-weight: 700;
  3169. margin-top: 20rpx;
  3170. text-align: center;
  3171. }
  3172. }
  3173. .page_items {
  3174. height: calc(100vh - 214rpx);
  3175. padding: 0 20rpx;
  3176. // padding-bottom: 88rpx;
  3177. padding-top: 96rpx;
  3178. .page_items_scroll {
  3179. height: 100%;
  3180. .page_item_wrap {
  3181. position: relative;
  3182. margin-bottom: 32rpx;
  3183. .page_item {
  3184. margin-bottom: 16rpx;
  3185. // min-height: 356rpx;
  3186. background: #fff;
  3187. border-radius: 8rpx;
  3188. overflow: hidden;
  3189. border: 2rpx solid #e5e9ed;
  3190. .L {
  3191. width: 40rpx;
  3192. height: 40rpx;
  3193. border-radius: 50%;
  3194. background: #f9fafb;
  3195. position: absolute;
  3196. left: -24rpx;
  3197. top: 68rpx;
  3198. border: 2rpx solid #e5e9ed;
  3199. }
  3200. .R {
  3201. width: 40rpx;
  3202. height: 40rpx;
  3203. border-radius: 50%;
  3204. background: #f9fafb;
  3205. position: absolute;
  3206. float: right;
  3207. right: -24rpx;
  3208. top: 68rpx;
  3209. border: 2rpx solid #e5e9ed;
  3210. }
  3211. .starting {
  3212. width: 40rpx;
  3213. height: 40rpx;
  3214. color: #fff;
  3215. background: #49b856;
  3216. display: inline-block;
  3217. border-radius: 50%;
  3218. text-align: center;
  3219. line-height: 40rpx;
  3220. font-size: 28rpx;
  3221. }
  3222. .End {
  3223. width: 40rpx;
  3224. height: 40rpx;
  3225. color: #fff;
  3226. background: #39b199;
  3227. display: inline-block;
  3228. border-radius: 50%;
  3229. text-align: center;
  3230. line-height: 40rpx;
  3231. font-size: 28rpx;
  3232. }
  3233. .page_item_top {
  3234. height: 86rpx;
  3235. border-bottom: 2rpx dashed #e5e9ed;
  3236. padding: 0 16rpx;
  3237. .page_item_top_L {
  3238. height: 100%;
  3239. float: left;
  3240. line-height: 88rpx;
  3241. display: flex;
  3242. align-items: center;
  3243. .emergencys {
  3244. background: #ff3b53 !important;
  3245. width: 124rpx !important;
  3246. }
  3247. .emergency {
  3248. background: #ff3b53 !important;
  3249. }
  3250. .emergency1 {
  3251. background: #49b856 !important;
  3252. }
  3253. .page_item_cont_start {
  3254. text-align: center;
  3255. height: 44rpx;
  3256. width: 104rpx;
  3257. line-height: 44rpx;
  3258. border-radius: 8rpx;
  3259. background: #49b856;
  3260. color: #fff;
  3261. .page_item_cont_start-img {
  3262. width: 22rpx;
  3263. position: relative;
  3264. top: 6rpx;
  3265. margin-right: 8rpx;
  3266. }
  3267. }
  3268. .L_iocn {
  3269. display: inline-block;
  3270. width: 44rpx;
  3271. height: 44rpx;
  3272. line-height: 42rpx;
  3273. border-radius: 100rpx;
  3274. color: #6cc076;
  3275. font-size: 32rpx;
  3276. border: 4rpx solid #6cc076;
  3277. background: #f0f6ed;
  3278. text-align: center;
  3279. margin-right: 8rpx;
  3280. }
  3281. .L_time {
  3282. color: #6cc076;
  3283. font-size: 32rpx;
  3284. }
  3285. .L_text {
  3286. font-size: 32rpx;
  3287. }
  3288. }
  3289. .page_item_top_R {
  3290. height: 100%;
  3291. float: right;
  3292. line-height: 88rpx;
  3293. font-size: 32rpx;
  3294. &.type {
  3295. margin-right: 32rpx;
  3296. color: red;
  3297. max-width: 260rpx;
  3298. white-space: nowrap;
  3299. text-overflow: ellipsis;
  3300. overflow: hidden;
  3301. }
  3302. .text_big{
  3303. font-weight: bold;
  3304. }
  3305. }
  3306. }
  3307. .page_item_cont {
  3308. min-height: 180rpx;
  3309. padding: 0 16rpx;
  3310. text-align: left;
  3311. position: relative;
  3312. display: flex;
  3313. flex-direction: column;
  3314. justify-content: space-between;
  3315. .text_big {
  3316. font-size: 32rpx;
  3317. margin-left: 10rpx;
  3318. font-weight: 700;
  3319. }
  3320. .line {
  3321. height: 100%;
  3322. width: 2rpx;
  3323. border-left: 2rpx solid #e5e9ed;
  3324. position: absolute;
  3325. // top: 70rpx;
  3326. top: 50%;
  3327. left: 20rpx;
  3328. transform: translateY(-50%);
  3329. }
  3330. .lines {
  3331. height: 40%;
  3332. width: 2rpx;
  3333. border-left: 2rpx solid #e5e9ed;
  3334. position: absolute;
  3335. top: 23%;
  3336. left: 36rpx;
  3337. }
  3338. .emergencys {
  3339. background: #ff3b53 !important;
  3340. width: 124rpx !important;
  3341. }
  3342. .emergency {
  3343. background: #ff3b53 !important;
  3344. }
  3345. .emergency1 {
  3346. background: #49b856 !important;
  3347. }
  3348. .page_item_cont_T {
  3349. // min-height: 80rpx;
  3350. // max-height: 324rpx;
  3351. font-size: 28rpx;
  3352. margin-top: 16rpx;
  3353. display: flex;
  3354. justify-content: space-between;
  3355. .page_item_cont_title {
  3356. height: 100%;
  3357. // float: left;
  3358. }
  3359. .page_item_cont_start {
  3360. text-align: center;
  3361. // float: right;
  3362. height: 44rpx;
  3363. width: 104rpx;
  3364. line-height: 44rpx;
  3365. border-radius: 8rpx;
  3366. background: #49b856;
  3367. color: #fff;
  3368. .page_item_cont_start-img {
  3369. width: 22rpx;
  3370. position: relative;
  3371. top: 6rpx;
  3372. margin-right: 8rpx;
  3373. }
  3374. }
  3375. }
  3376. .page_item_conts {
  3377. min-height: 30rpx;
  3378. color: rgb(102, 102, 102);
  3379. padding-left: 50rpx;
  3380. font-size: 28rpx;
  3381. margin: 16rpx 0;
  3382. position: relative;
  3383. view:not(.line) {
  3384. line-height: 1.2;
  3385. }
  3386. text {
  3387. color: #49b856;
  3388. }
  3389. }
  3390. .page_item_cont_B {
  3391. // padding-top: 20rpx;
  3392. font-size: 28rpx;
  3393. // overflow: hidden;
  3394. margin-bottom: 16rpx;
  3395. .page_item_cont_title {
  3396. height: 100%;
  3397. float: left;
  3398. }
  3399. }
  3400. }
  3401. .page_item_btn_wrap {
  3402. display: flex;
  3403. justify-content: space-between;
  3404. .page_item_btn {
  3405. height: 88rpx;
  3406. flex: 1;
  3407. margin-left: 1%;
  3408. background-image: linear-gradient(to right, #72c172, #3bb197);
  3409. border-radius: 8rpx;
  3410. line-height: 88rpx;
  3411. color: #fff;
  3412. font-size: 36rpx;
  3413. font-weight: 700;
  3414. text-align: center;
  3415. &:first-of-type{
  3416. margin-left: 0;
  3417. }
  3418. }
  3419. }
  3420. .page_item_btn {
  3421. height: 88rpx;
  3422. background-image: linear-gradient(to right, #72c172, #3bb197);
  3423. border-radius: 8rpx;
  3424. line-height: 88rpx;
  3425. color: #fff;
  3426. font-size: 36rpx;
  3427. font-weight: 700;
  3428. text-align: center;
  3429. }
  3430. }
  3431. .L-l {
  3432. width: 2rpx;
  3433. height: 40rpx;
  3434. background: #f9fafb;
  3435. position: absolute;
  3436. left: 20rpx;
  3437. top: 72rpx;
  3438. display: none;
  3439. }
  3440. .R-l {
  3441. width: 2rpx;
  3442. height: 40rpx;
  3443. background: #f9fafb;
  3444. position: absolute;
  3445. right: 20rpx;
  3446. top: 72rpx;
  3447. display: none;
  3448. }
  3449. }
  3450. }
  3451. }
  3452. .text {
  3453. font-size: 36rpx;
  3454. }
  3455. .wt_icon {
  3456. font-size: 40rpx;
  3457. }
  3458. }
  3459. </style>