receiptpage.vue 106 KB

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