receiptpage.vue 125 KB

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