receiptpage.vue 127 KB

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