receiptpage.vue 125 KB

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