receiptpage.vue 126 KB

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