receiptpage.vue 127 KB

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