receiptpage.vue 127 KB

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