receiptpage.vue 124 KB

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