receiptpage.vue 83 KB

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