receiptpage.vue 106 KB

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