receiptpage.vue 127 KB

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