receiptpage.vue 88 KB

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