receiptpage.vue 127 KB

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