receiptpage.vue 127 KB

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