receiptpage.vue 87 KB

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