receiptpage.vue 126 KB

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