receiptpage.vue 103 KB

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