receiptpage.vue 106 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042
  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.execFilterReset()
  1116. this.isShowExecFilter = false;
  1117. },
  1118. // 执行中筛选
  1119. execFilter() {
  1120. this.getTaskData()
  1121. this.isShowExecFilter = true;
  1122. },
  1123. // 执行中确定
  1124. execFilterOk() {
  1125. this.isShowExecFilter = false;
  1126. this.zxzData = [];
  1127. this.totalNum = -1;
  1128. this.idx = 0;
  1129. // this.selectedLabelSlots = "执行中";
  1130. // this.executingOrders(0);
  1131. if (this.selectedLabelSlots == "待接单") {
  1132. this.waitingOrders(0,'submit');
  1133. } else if (this.selectedLabelSlots == "执行中") {
  1134. this.executingOrders(0,'submit');
  1135. }
  1136. },
  1137. // 执行中重置
  1138. execFilterReset() {
  1139. this.currentId = 0;
  1140. this.deptName = '';
  1141. this.deptId = ''//科室id
  1142. this.taskTypeId = '' //任务类型
  1143. uni.setStorageSync("admStore",{})
  1144. },
  1145. // 大扫描筛选
  1146. execFilterBigScreen({
  1147. detail: {
  1148. value
  1149. }
  1150. }) {
  1151. this.indexBigScreen = value;
  1152. this.arrayKeyBigScreen = this.arrayBigScreen[value].id;
  1153. console.log(this.arrayKeyBigScreen);
  1154. console.log(this.$refs.bigscreen);
  1155. this.$refs.bigscreen.Scanning(this.arrayKeyBigScreen);
  1156. },
  1157. // 获取科室二维码设置开关
  1158. getMenu() {
  1159. let menu = uni.getStorageSync("userData").menu;
  1160. //判断当前登陆人具体角色 start
  1161. let roles = uni.getStorageSync("userData").user.role;
  1162. this.pharmacistFlag = roles.some(
  1163. (item) => item.rolecode === "pharmacist"
  1164. );
  1165. //判断当前登陆人具体角色 end
  1166. console.log(menu);
  1167. this.arrayBigScreen = [];
  1168. menu.forEach((item) => {
  1169. if (item.link === "wxInspect") {
  1170. this.content.push({
  1171. text: "检查信息",
  1172. });
  1173. } else if (item.link === "wxPatient") {
  1174. this.content.push({
  1175. text: "患者信息",
  1176. });
  1177. } else if (item.link === "wxPharmacy") {
  1178. // 如果是配药师人员,则增加药房
  1179. if (this.pharmacistFlag) {
  1180. this.content.push({
  1181. text: "药房",
  1182. });
  1183. }
  1184. } else if (item.link === "wxCode") {
  1185. this.content.push({
  1186. text: "二维码设置",
  1187. });
  1188. } else if (item.link === "wxSpecimenEntry") {
  1189. this.content.push({
  1190. text: "标本录入",
  1191. });
  1192. } else if (item.link === "wxDrugsbagEntry") {
  1193. this.content.push({
  1194. text: "药品录入",
  1195. });
  1196. } else if (item.link === "workState" && this.workState == 1) {
  1197. this.content.push({
  1198. text: "示闲",
  1199. });
  1200. } else if (item.link === "workState" && this.workState == 2) {
  1201. this.content.push({
  1202. text: "示忙",
  1203. });
  1204. } else if (item.link === "sendBuild") {
  1205. this.content.push({
  1206. text: "送回发起",
  1207. });
  1208. } else if (item.link === "sendHandover") {
  1209. this.content.push({
  1210. text: "领取交接",
  1211. });
  1212. } else if (item.link === "medicalWasteOut") {
  1213. this.content.push({
  1214. text: "医废出库",
  1215. });
  1216. } else if (item.link === "wxTakeMedicine") {
  1217. this.content.push({
  1218. text: "摆药取药",
  1219. });
  1220. } else if (item.link === "myQrcode") {
  1221. this.content.push({
  1222. text: "我的二维码",
  1223. });
  1224. } else if (item.link === "departmentQrcode") {
  1225. this.content.push({
  1226. text: "科室二维码",
  1227. });
  1228. } else if (item.link === "formManagementWechat") {
  1229. this.content.push({
  1230. text: "查看表单",
  1231. });
  1232. } else if (item.link === "BIAOBEN") {
  1233. this.arrayBigScreen.push({
  1234. id: 'BIAOBEN|$|',
  1235. name: "标本",
  1236. });
  1237. } else if (item.link === "YAOPING") {
  1238. this.arrayBigScreen.push({
  1239. id: 'YAOPING|$|',
  1240. name: "药品",
  1241. });
  1242. } else if (item.link === "HUANZHE") {
  1243. this.arrayBigScreen.push({
  1244. id: 'HUANZHE|$|',
  1245. name: "患者",
  1246. });
  1247. } else if (item.link === "XIEZHIPING") {
  1248. this.arrayBigScreen.push({
  1249. id: 'XIEZHIPING|$|',
  1250. name: "血制品",
  1251. });
  1252. } else if (item.link === "KJJD") {
  1253. this.arrayBigScreen.push({
  1254. id: 'KJJD|$|',
  1255. name: "快捷建单",
  1256. });
  1257. } else if (item.link === "kuaijiejiedan") {
  1258. this.arrayBigScreen.push({
  1259. id: 'kuaijiejiedan|$|',
  1260. name: "快捷接单",
  1261. });
  1262. } else if (item.link === "quickOrderAcceptanceWx") {
  1263. this.content.push({
  1264. text: "快捷接单",
  1265. });
  1266. } else if (item.link === "wxQuiltRecovery") {
  1267. this.content.push({
  1268. text: "被服回收",
  1269. });
  1270. }
  1271. });
  1272. },
  1273. // 拍照
  1274. photograph(data) {
  1275. photographTool(data);
  1276. },
  1277. // 如果不是静配,药配,标本配送,标本轮巡
  1278. // 科室签到(小扫描)-拍照
  1279. nextDeptOrder_ss(data, accountObj) {
  1280. console.log(this.currentCode);
  1281. let isKs = 0;
  1282. let ids = [];
  1283. let id = data.id;
  1284. ids.push(id);
  1285. let list = {
  1286. code: "",
  1287. ids: ids,
  1288. };
  1289. let code = "";
  1290. let type = "";
  1291. if (this.currentCode) {
  1292. let gdStateValue = data.gdState.value; //工单状态value
  1293. let associationTypeValue = data.taskType.associationType.value; //关联类型value
  1294. // 其他临床服务,并且工单状态是待到达||工单状态待送达
  1295. if (
  1296. (associationTypeValue == "other" &&
  1297. gdStateValue == "4") ||
  1298. gdStateValue == "5"
  1299. ) {
  1300. code = this.currentCode;
  1301. type = "orderSign/" + code;
  1302. list = {
  1303. ids
  1304. };
  1305. if (accountObj) {
  1306. list.handover = [accountObj.accountId];
  1307. }
  1308. isKs = 1;
  1309. }
  1310. uni.showLoading({
  1311. title: "加载中",
  1312. mask: true,
  1313. });
  1314. post("/workerOrder/" + type, list).then((res) => {
  1315. uni.hideLoading();
  1316. if (res) {
  1317. if (res.status == 200) {
  1318. if (
  1319. gdStateValue == "4" &&
  1320. associationTypeValue == "other"
  1321. ) {
  1322. uni.navigateTo({
  1323. url: `../../pages/scanning_code/scanning_code?type=${associationTypeValue}&type1=${res.type}&id=${data.id}&deptCode=${code}&dept=${res.dept}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}`,
  1324. });
  1325. }
  1326. if (gdStateValue == "5") {
  1327. uni.navigateTo({
  1328. url: `../../pages/scanning_code/scanning_code?type=${associationTypeValue}&type1=${res.type}&id=${data.id}&deptCode=${code}&dept=${res.dept}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}`,
  1329. });
  1330. }
  1331. } else {
  1332. uni.navigateTo({
  1333. url: `../../pages/scanning_Result/scanning_Result?type=${
  1334. associationTypeValue
  1335. }&type1=${res.type}&id=${data.id}&status=600&msg=${
  1336. res.msg
  1337. }&isKs=${isKs}&model=${encodeURIComponent(
  1338. JSON.stringify(res)
  1339. )}&qrcode=${this.currentCode}`,
  1340. });
  1341. }
  1342. } else {
  1343. uni.navigateTo({
  1344. url: `../../pages/scanning_Result/scanning_Result?id=${data.id}&status=600&msg=扫码失败!请扫描正确的二维码!&isKs=${isKs}&qrcode=${this.currentCode}`,
  1345. });
  1346. }
  1347. });
  1348. }
  1349. },
  1350. // 填写交接人工号-确认
  1351. hosOk(data) {
  1352. console.log(data);
  1353. const {
  1354. accountName,
  1355. account,
  1356. accountId
  1357. } = data;
  1358. if (!accountName && !account) {
  1359. //没有填写交接人
  1360. uni.showModal({
  1361. title: '提示',
  1362. content: "请填写交接人工号!",
  1363. showCancel: false,
  1364. success: function(res) {
  1365. if (res.confirm) {
  1366. console.log('用户点击确定');
  1367. } else if (res.cancel) {
  1368. console.log('用户点击取消');
  1369. }
  1370. }
  1371. });
  1372. return;
  1373. } else if (!accountName && account || accountName && !account) {
  1374. //没有填写交接人
  1375. uni.showModal({
  1376. title: '提示',
  1377. content: "请填写正确的交接人工号!",
  1378. showCancel: false,
  1379. success: function(res) {
  1380. if (res.confirm) {
  1381. console.log('用户点击确定');
  1382. } else if (res.cancel) {
  1383. console.log('用户点击取消');
  1384. }
  1385. }
  1386. });
  1387. return;
  1388. }
  1389. this.hosModels.disjunctor = false;
  1390. let associationTypeValue = this.currentData.taskType.associationType.value;
  1391. console.log(associationTypeValue)
  1392. this.uploadToOther(this.currentData, data, 'start');
  1393. },
  1394. // 填写交接人工号-取消
  1395. hosCancel() {
  1396. this.hosModels.disjunctor = false;
  1397. },
  1398. // 填写交接人工号弹窗
  1399. showSelectAccount() {
  1400. this.hosModels = {
  1401. disjunctor: true,
  1402. }
  1403. },
  1404. // 拍照-上传
  1405. uploadToOther(data, accountObj, type){
  1406. // 其他临床服务拍照签到
  1407. console.log(data, 1111);
  1408. let id_seimin;
  1409. let asTypeValue_seimin;
  1410. let gdStateValue_seimin;
  1411. if (data.status != 200 && data.status !== undefined) {
  1412. id_seimin = data.id;
  1413. asTypeValue_seimin = data.type;
  1414. gdStateValue_seimin = JSON.parse(data.model).gdstate2; //type改成gdstate
  1415. } else {
  1416. id_seimin = data.id;
  1417. asTypeValue_seimin = data.taskType.associationType.value;
  1418. gdStateValue_seimin = data.gdState.value;
  1419. }
  1420. //#ifdef H5
  1421. uni.chooseImage({
  1422. count: 1,
  1423. sourceType: ['camera'],
  1424. success: (chooseImageRes) => {
  1425. console.log(chooseImageRes, pathUrl)
  1426. const tempFilePaths = chooseImageRes.tempFilePaths;
  1427. const tempFiles = chooseImageRes.tempFiles;
  1428. let tp = tempFilePaths[0];
  1429. uni.showLoading({
  1430. mask: true,
  1431. title: '加载中'
  1432. });
  1433. post('/workerOrder/findRecordInfoByOrderId', {
  1434. orderId: id_seimin,
  1435. gdOperate: 21,
  1436. }).then(result => {
  1437. console.log(result)
  1438. if (result.state == 200) {
  1439. uni.getImageInfo({
  1440. src: tp,
  1441. success: (res) => {
  1442. console.log('压缩前', res)
  1443. let canvasWidth = res.width //图片原始长宽
  1444. let canvasHeight = res.height
  1445. let img = new Image()
  1446. img.src = res.path
  1447. let canvas = document.createElement('canvas');
  1448. let ctx = canvas.getContext('2d')
  1449. canvas.width = canvasWidth
  1450. canvas.height = canvasHeight
  1451. ctx.drawImage(img, 0, 0, canvasWidth, canvasHeight)
  1452. canvas.toBlob((fileSrc) => {
  1453. tp = window.URL.createObjectURL(fileSrc)
  1454. console.log('压缩后', tp);
  1455. uni.uploadFile({
  1456. url: pathUrl + '/common/common/uploadAttachment/'+(type == 'start' ? 'orderStartPhoto' : 'orderEndPhoto')+'/' + id_seimin + '/' + result.recordId,
  1457. filePath: tp,
  1458. name: 'file',
  1459. formData: {
  1460. 'filename': tempFiles[0].name ? tempFiles[0].name.split('.')[0] + '.jpg' : tempFiles[
  1461. 0].path.split(
  1462. /[\\/]/).reverse()[0].split('.')[0] + '.jpg'
  1463. },
  1464. success: (uploadFileRes) => {
  1465. console.log(uploadFileRes, 10086, asTypeValue_seimin);
  1466. this.nextDeptOrder_ss(data, accountObj, type);
  1467. },
  1468. fail: err => {
  1469. console.error(err);
  1470. uni.hideLoading();
  1471. uni.showToast({
  1472. icon: 'none',
  1473. title: '上传失败',
  1474. duration: 2000
  1475. });
  1476. }
  1477. });
  1478. }, 'image/jpeg', 0.3)
  1479. },
  1480. fail: function () {
  1481. uni.hideLoading();
  1482. uni.showToast({
  1483. icon: 'none',
  1484. title: '上传失败',
  1485. duration: 2000
  1486. });
  1487. }
  1488. })
  1489. } else {
  1490. uni.hideLoading();
  1491. uni.showToast({
  1492. icon: "none",
  1493. title: result.msg || "接口获取数据失败!",
  1494. });
  1495. }
  1496. })
  1497. }
  1498. });
  1499. //#endif
  1500. //#ifdef APP-PLUS
  1501. uni.chooseImage({
  1502. count: 1,
  1503. sourceType: ['camera'],
  1504. sizeType: ['compressed'],
  1505. success: (chooseImageRes) => {
  1506. console.log(chooseImageRes, pathUrl)
  1507. const tempFilePaths = chooseImageRes.tempFilePaths;
  1508. const tempFiles = chooseImageRes.tempFiles;
  1509. let tp = tempFilePaths[0];
  1510. uni.showLoading({
  1511. mask: true,
  1512. title: '加载中'
  1513. });
  1514. post('/workerOrder/findRecordInfoByOrderId', {
  1515. orderId: id_seimin,
  1516. gdOperate: 21,
  1517. }).then(result => {
  1518. console.log(result)
  1519. if (result.state == 200) {
  1520. uni.compressImage({
  1521. src: tp,
  1522. quality: 30,
  1523. success: (res) => {
  1524. console.log('压缩前', res)
  1525. tp = res.tempFilePath;
  1526. console.log('压缩后', tp);
  1527. uni.uploadFile({
  1528. url: pathUrl + '/common/common/uploadAttachment/'+(type == 'start' ? 'orderStartPhoto' : 'orderEndPhoto')+'/' + id_seimin + '/' + result.recordId,
  1529. filePath: tp,
  1530. name: 'file',
  1531. formData: {
  1532. 'filename': tempFiles[0].name ? tempFiles[0].name.split('.')[0] + '.jpg' : tempFiles[
  1533. 0].path.split(
  1534. /[\\/]/).reverse()[0].split('.')[0] + '.jpg'
  1535. },
  1536. success: (uploadFileRes) => {
  1537. console.log(uploadFileRes, 10086, asTypeValue_seimin);
  1538. this.nextDeptOrder_ss(data, accountObj, type);
  1539. },
  1540. fail: err => {
  1541. console.error(err);
  1542. uni.hideLoading();
  1543. uni.showToast({
  1544. icon: 'none',
  1545. title: '上传失败',
  1546. duration: 2000
  1547. });
  1548. }
  1549. });
  1550. },
  1551. fail: function () {
  1552. uni.hideLoading();
  1553. uni.showToast({
  1554. icon: 'none',
  1555. title: '上传失败',
  1556. duration: 2000
  1557. });
  1558. }
  1559. })
  1560. } else {
  1561. uni.hideLoading();
  1562. uni.showToast({
  1563. icon: "none",
  1564. title: result.msg || "接口获取数据失败!",
  1565. });
  1566. }
  1567. })
  1568. }
  1569. });
  1570. //#endif
  1571. },
  1572. // 拍照-其他
  1573. async photographToOther(data, type) {
  1574. this.currentData = data;
  1575. uni.showLoading({
  1576. title: "加载中",
  1577. mask: true,
  1578. });
  1579. // 其他临床服务
  1580. let result = await post("/dept/scanning", {
  1581. content: type === 'start' ? data.startDept.qrcode : data.endDepts[0].qrcode,
  1582. taskTypeId: data.taskType.id,
  1583. gdState: data.gdState.id,
  1584. });
  1585. uni.hideLoading();
  1586. this.currentCode = result.code;
  1587. if (result.state == 200 || result.state == 201) {
  1588. uni.showModal({
  1589. title: '提示',
  1590. content: '请尽量拍摄角度覆盖清洁区域?',
  1591. success: (res) => {
  1592. if (res.confirm) {
  1593. if (result.account) {
  1594. this.uploadToOther(data, {
  1595. account: result.account,
  1596. accountName: result.name,
  1597. accountId: result.id,
  1598. }, type);
  1599. } else {
  1600. this.uploadToOther(data, undefined, type);
  1601. }
  1602. } else if (res.cancel) {
  1603. console.log('用户点击取消');
  1604. }
  1605. }
  1606. });
  1607. } else if (result.state == '0000') {
  1608. this.showSelectAccount();
  1609. } else {
  1610. uni.showToast({
  1611. icon: "none",
  1612. title: result.info || "接口获取数据失败!",
  1613. });
  1614. }
  1615. },
  1616. // 悬浮按钮点击事件
  1617. trigger(e) {
  1618. if (e.item.text === "我的任务") {
  1619. uni.navigateTo({
  1620. url: "../mypage/mypage",
  1621. });
  1622. } else if (e.item.text === "退出登录") {
  1623. // 假登录
  1624. uni.showToast({
  1625. title: "退出成功!",
  1626. });
  1627. let ip = uni.getStorageSync("ip"); //记住域名或ip
  1628. let username = uni.getStorageSync("username"); //记住用户名
  1629. let password = uni.getStorageSync("password"); //记住密码
  1630. let savePasswordTime = uni.getStorageSync("savePasswordTime"); //记住密码的时间戳
  1631. let clientid = uni.getStorageSync("clientid");
  1632. uni.clearStorageSync();
  1633. if (username) {
  1634. uni.setStorageSync("ip", ip); //记住域名或ip
  1635. uni.setStorageSync("username", username); //记住用户名
  1636. uni.setStorageSync("password", password); //记住密码
  1637. uni.setStorageSync("savePasswordTime", savePasswordTime); //记住密码的时间戳
  1638. }
  1639. uni.setStorageSync("clientid", clientid);
  1640. uni.navigateTo({
  1641. url: "../homePage/homePage",
  1642. });
  1643. // 假登录
  1644. deleteIt("/auth/logout2").then((result) => {
  1645. if (result.status == 200) {
  1646. uni.showToast({
  1647. title: "退出成功!",
  1648. });
  1649. let ip = uni.getStorageSync("ip"); //记住域名或ip
  1650. let username = uni.getStorageSync("username"); //记住用户名
  1651. let password = uni.getStorageSync("password"); //记住密码
  1652. let clientid = uni.getStorageSync("clientid");
  1653. uni.clearStorageSync();
  1654. uni.setStorageSync("ip", ip); //记住域名或ip
  1655. uni.setStorageSync("username", username); //记住用户名
  1656. uni.setStorageSync("password", password); //记住密码
  1657. uni.setStorageSync("clientid", clientid);
  1658. uni.navigateTo({
  1659. url: "../homePage/homePage",
  1660. });
  1661. } else {
  1662. uni.showToast({
  1663. icon: "none",
  1664. title: result.msg || "接口获取数据失败!",
  1665. });
  1666. }
  1667. });
  1668. } else if (e.item.text === "药房") {
  1669. uni.navigateTo({
  1670. url: "../pharmacy/pharmacy",
  1671. });
  1672. } else if (e.item.text === "患者信息") {
  1673. uni.navigateTo({
  1674. url: "../patientInformationList/patientInformationList",
  1675. });
  1676. } else if (e.item.text === "负责科室") {
  1677. if (uni.getStorageSync("setDepts")) {
  1678. uni.removeStorageSync("setDepts"); //清空选择的科室,初始化
  1679. }
  1680. let obj = uni.getStorageSync("setDeptConfg");
  1681. uni.navigateTo({
  1682. url: `../setDept/setDept?configName=${obj.configName}&id=${obj.id}&changedept=1`,
  1683. });
  1684. } else if (e.item.text === "检查信息") {
  1685. uni.navigateTo({
  1686. url: "../inspectList/inspectList",
  1687. });
  1688. } else if (e.item.text === "二维码设置") {
  1689. uni.navigateTo({
  1690. url: "../settingCode/settingCode",
  1691. });
  1692. } else if (e.item.text === "标本录入") {
  1693. this.showHandViewSpecimen();
  1694. } else if (e.item.text === "药品录入") {
  1695. this.showHandViewDrugsbag();
  1696. } else if (e.item.text === "示忙") {
  1697. this.showLeisure();
  1698. } else if (e.item.text === "示闲") {
  1699. this.showBusy();
  1700. } else if (e.item.text === "摆药取药") {
  1701. this.handleTakeMedicine()
  1702. } else if (e.item.text === "我的二维码") {
  1703. this.myQrcodeHandler()
  1704. } else if (e.item.text === "科室二维码") {
  1705. this.departmentQrcodeHandler()
  1706. } else if (e.item.text === "查看表单") {
  1707. uni.navigateTo({
  1708. url: "../formManagementWechat/formManagementWechat",
  1709. });
  1710. } else if (e.item.text === "快捷接单") {
  1711. uni.navigateTo({
  1712. url: "../quickOrderAcceptanceWx/quickOrderAcceptanceWx",
  1713. });
  1714. } else if (e.item.text === "被服回收") {
  1715. this.quiltScan();
  1716. } else if (e.item.text === "送回发起") {
  1717. uni.navigateTo({
  1718. url: "/pages/quiltWashing/quiltWashingSendSelectDept/quiltWashingSendSelectDept",
  1719. });
  1720. } else if (e.item.text === "领取交接") {
  1721. this.quiltScan_send();
  1722. } else if (e.item.text === "医废出库") {
  1723. uni.navigateTo({
  1724. url: "/pages/medicalWaste/medicalWasteSelect/medicalWasteSelect",
  1725. });
  1726. }
  1727. },
  1728. //确定
  1729. ok1() {
  1730. this.models1.disjunctor = false;
  1731. uni.showLoading({
  1732. title: "加载中",
  1733. mask: true,
  1734. });
  1735. let startDeptId, startDeptName, handoverId, handoverName;
  1736. if(this.clothingType === 'user'){
  1737. startDeptId = this.quiltData.dept.id;
  1738. startDeptName = this.quiltData.dept.dept;
  1739. handoverId = this.quiltData.id;
  1740. handoverName = this.quiltData.name;
  1741. }else if(this.clothingType === 'dept'){
  1742. startDeptId = this.quiltData.id;
  1743. startDeptName = this.quiltData.dept;
  1744. handoverId = undefined;
  1745. handoverName = '';
  1746. }
  1747. post("/transflow/createOrTakeOrder", {
  1748. type: 'clothingGet',
  1749. id: 0,
  1750. startDeptId,
  1751. hosId: this.hosId,
  1752. handoverId,
  1753. }).then((res) => {
  1754. uni.hideLoading();
  1755. if (res.data && res.data.state == 200) {
  1756. uni.navigateTo({
  1757. url: `../quiltWashing/quiltWashingGetSignIn/quiltWashingGetSignIn?quiltCode=${this.quiltCode}&startDeptId=${startDeptId}&startDeptName=${startDeptName}&orderId=${res.data.orderId}&name=${handoverName}`,
  1758. });
  1759. }else{
  1760. uni.showToast({
  1761. icon: "none",
  1762. title: res.data ? res.data.msg : "接口获取数据失败!",
  1763. });
  1764. }
  1765. });
  1766. },
  1767. //取消
  1768. cancel1() {
  1769. this.models1.disjunctor = false;
  1770. },
  1771. // 被服回收弹窗
  1772. showQuiltData(data) {
  1773. this.quiltData = data;
  1774. let content = '';
  1775. if(this.clothingType === 'user'){
  1776. content = `您扫描的是<strong class="red">${data.name}</strong>的工号,是否建立<strong class="red">${data.dept.dept}</strong>的被服回收工单吗?`;
  1777. }else if(this.clothingType === 'dept'){
  1778. content = `您扫描的科室码,是否建立<strong class="red">${data.dept}</strong>的被服回收工单吗?`;
  1779. }
  1780. this.models1 = {
  1781. disjunctor: true,
  1782. title: "提示",
  1783. content,
  1784. icon: "warn",
  1785. operate: {
  1786. ok: "建立工单",
  1787. cancel: "取消",
  1788. },
  1789. };
  1790. },
  1791. //确定
  1792. ok2(deptDto) {
  1793. console.log(deptDto);
  1794. this.models2.disjunctor = false;
  1795. uni.showLoading({
  1796. title: "加载中",
  1797. mask: true,
  1798. });
  1799. let startDeptId, startDeptName, handoverId, handoverName;
  1800. if(this.clothingType === 'user'){
  1801. startDeptId = deptDto.id;
  1802. startDeptName = deptDto.dept;
  1803. handoverId = this.quiltData.id;
  1804. handoverName = this.quiltData.name;
  1805. }else if(this.clothingType === 'dept'){
  1806. startDeptId = deptDto.id;
  1807. startDeptName = deptDto.dept;
  1808. handoverId = undefined;
  1809. handoverName = '';
  1810. }
  1811. post("/transflow/createOrTakeOrder", {
  1812. type: 'clothingGet',
  1813. id: 0,
  1814. startDeptId,
  1815. hosId: this.hosId,
  1816. handoverId,
  1817. }).then((res) => {
  1818. uni.hideLoading();
  1819. if (res.data && res.data.state == 200) {
  1820. uni.navigateTo({
  1821. url: `../quiltWashing/quiltWashingGetSignIn/quiltWashingGetSignIn?quiltCode=${this.quiltCode}&startDeptId=${startDeptId}&startDeptName=${startDeptName}&orderId=${res.data.orderId}&name=${handoverName}`,
  1822. });
  1823. }else{
  1824. uni.showToast({
  1825. icon: "none",
  1826. title: res.data ? res.data.msg : "接口获取数据失败!",
  1827. });
  1828. }
  1829. });
  1830. },
  1831. //取消
  1832. cancel2() {
  1833. this.models2.disjunctor = false;
  1834. },
  1835. showParentQuiltData(data){
  1836. this.quiltData = data;
  1837. // 判断是否是父级科室
  1838. let startDeptId, startDeptName, handoverId, handoverName, content;
  1839. if(this.clothingType === 'user'){
  1840. startDeptId = this.quiltData.dept.id;
  1841. startDeptName = this.quiltData.dept.dept;
  1842. handoverId = this.quiltData.id;
  1843. handoverName = this.quiltData.name;
  1844. content = `您扫描的是<strong class="red">${handoverName}</strong>的工号,科室为<strong class="red">${startDeptName}</strong>,需要选择相应的子级科室建单。`;
  1845. }else if(this.clothingType === 'dept'){
  1846. startDeptId = this.quiltData.id;
  1847. startDeptName = this.quiltData.dept;
  1848. handoverId = undefined;
  1849. handoverName = '';
  1850. content = `您扫描的是科室为<strong class="red">${startDeptName}</strong>,需要选择相应的子级科室建单。`;
  1851. }
  1852. uni.showLoading({
  1853. title: "加载中",
  1854. mask: true,
  1855. });
  1856. post("/data/fetchDataList/department", {
  1857. "idx": 0,
  1858. "sum": 9999,
  1859. "department": {
  1860. "cascadeHosId": this.hosId,
  1861. "parent": {
  1862. "id": startDeptId
  1863. },
  1864. "searchType": 1,// 简单查询
  1865. }
  1866. }).then((res) => {
  1867. uni.hideLoading();
  1868. if (res.status == 200) {
  1869. if(res.list.length > 0){
  1870. this.models2 = {
  1871. disjunctor: true,
  1872. title: "提示",
  1873. content,
  1874. icon: "warn",
  1875. list: res.list,
  1876. operate: {
  1877. cancel: "取消",
  1878. },
  1879. };
  1880. }else{
  1881. this.showQuiltData(data)
  1882. }
  1883. }else{
  1884. uni.showToast({
  1885. icon: "none",
  1886. title: res.data ? res.data.msg : "接口获取数据失败!",
  1887. });
  1888. }
  1889. });
  1890. },
  1891. //确定
  1892. ok3(busyContent) {
  1893. console.log(busyContent);
  1894. this.models3.disjunctor = false;
  1895. uni.showLoading({
  1896. title: "加载中",
  1897. mask: true,
  1898. });
  1899. post("/user/data/changeWorkState", {
  1900. workState: this.workStateList.find(v => v.value == 2).id,
  1901. minute: busyContent.busyMinute,
  1902. workStateRemark: busyContent.busyContent,
  1903. }).then((res) => {
  1904. uni.hideLoading();
  1905. if (res.status == 200) {
  1906. this.getCurrentUserNow();
  1907. this.models3 = {
  1908. disjunctor: true,
  1909. title: "提示",
  1910. content: `您上班状态修改为<strong class="red">${busyContent.busyContent}</strong>,<strong class="red">${busyContent.busyMinute}</strong>分钟后自动恢复`,
  1911. icon: "warn",
  1912. operate: {
  1913. know: "知道了",
  1914. },
  1915. };
  1916. }else{
  1917. uni.showToast({
  1918. icon: "none",
  1919. title: res.msg || "接口获取数据失败!",
  1920. });
  1921. }
  1922. });
  1923. },
  1924. //取消
  1925. cancel3() {
  1926. this.models3.disjunctor = false;
  1927. },
  1928. //知道了
  1929. know3() {
  1930. this.models3.disjunctor = false;
  1931. },
  1932. // 扫描工牌-被服洗涤
  1933. quiltScan() {
  1934. if (!this.SMFlag) {
  1935. return;
  1936. }
  1937. this.SMFlag = false;
  1938. SM().then((content) => {
  1939. uni.showLoading({
  1940. title: "加载中",
  1941. mask: true,
  1942. });
  1943. //检验二维码的有效性(扫码前必须验证)
  1944. post("/dept/scanning", {
  1945. content,
  1946. })
  1947. .then((result) => {
  1948. this.quiltCode = result.code;
  1949. this.SMFlag = true;
  1950. // 200检测通过,201没有有效期也通过。
  1951. if (result.state == 200 || result.state == 201) {
  1952. let data = {
  1953. code: this.quiltCode, //二维码
  1954. };
  1955. post("/transflow/bigScan", { type: 'clothingGet', code: this.quiltCode })
  1956. .then((res) => {
  1957. uni.hideLoading();
  1958. if (res.state == 200) {
  1959. this.clothingType = res.type;
  1960. // 如果当前科室有回收单,并且配送人员是当前登陆人
  1961. if(res.orderId){
  1962. if(res.type == 'user'){
  1963. uni.navigateTo({
  1964. 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}`,
  1965. });
  1966. } else if(res.type == 'dept'){
  1967. uni.navigateTo({
  1968. url: `../quiltWashing/quiltWashingGetSignIn/quiltWashingGetSignIn?quiltCode=${this.quiltCode}&startDeptId=${res.data.id}&startDeptName=${res.data.dept}&orderId=${res.orderId}&name=`,
  1969. });
  1970. }
  1971. }else{
  1972. this.showParentQuiltData(res.data);
  1973. }
  1974. } else {
  1975. uni.navigateTo({
  1976. url: `../scanning_Result/scanning_Result?status=${res.state}&msg=${res.msg}&qrcode=${this.quiltCode}`,
  1977. });
  1978. }
  1979. });
  1980. } else {
  1981. uni.hideLoading();
  1982. uni.showToast({
  1983. icon: "none",
  1984. title: result.info || "接口获取数据失败!",
  1985. });
  1986. }
  1987. })
  1988. }).catch(err => {
  1989. this.SMFlag = true;
  1990. });
  1991. },
  1992. // 扫描工牌-被服洗涤
  1993. quiltScan_send() {
  1994. if (!this.SMFlag) {
  1995. return;
  1996. }
  1997. this.SMFlag = false;
  1998. SM().then((content) => {
  1999. uni.showLoading({
  2000. title: "加载中",
  2001. mask: true,
  2002. });
  2003. //检验二维码的有效性(扫码前必须验证)
  2004. post("/dept/scanning", {
  2005. content,
  2006. })
  2007. .then((result) => {
  2008. this.quiltCode = result.code;
  2009. this.SMFlag = true;
  2010. // 200检测通过,201没有有效期也通过。
  2011. if (result.state == 200 || result.state == 201) {
  2012. let data = {
  2013. code: this.quiltCode, //二维码
  2014. };
  2015. post("/transflow/extra", { type: 'clothingSend', receiveAndHandover: true, code: this.quiltCode }).then((res) => {
  2016. uni.hideLoading();
  2017. if (res.data && res.data.state == 200) {
  2018. uni.navigateTo({
  2019. url: `../quiltWashing/quiltWashingSendsendHandover/quiltWashingSendsendHandover?quiltCode=${this.quiltCode}`,
  2020. });
  2021. } else {
  2022. uni.navigateTo({
  2023. url: `../scanning_Result/scanning_Result?status=${res.data ? res.data.state : 500}&msg=${res.data ? res.data.msg : ''}&qrcode=${this.quiltCode}`,
  2024. });
  2025. }
  2026. });
  2027. } else {
  2028. uni.hideLoading();
  2029. uni.showToast({
  2030. icon: "none",
  2031. title: result.info || "接口获取数据失败!",
  2032. });
  2033. }
  2034. })
  2035. }).catch(err => {
  2036. this.SMFlag = true;
  2037. });
  2038. },
  2039. // 我的二维码
  2040. myQrcodeHandler(){
  2041. this.showMyQrcodeModel = {
  2042. disjunctor: true,
  2043. };
  2044. },
  2045. closeMyQrcodeModel(){
  2046. this.showMyQrcodeModel.disjunctor = false;
  2047. },
  2048. // 领血证二维码
  2049. certificatHandler(data){
  2050. this.showCertificatModel = {
  2051. disjunctor: true,
  2052. id: data.id,
  2053. };
  2054. },
  2055. closeCertificatModel(){
  2056. this.showCertificatModel.disjunctor = false;
  2057. },
  2058. // 科室二维码
  2059. departmentQrcodeHandler(){
  2060. this.showDepartmentQrcodeModel = {
  2061. disjunctor: true,
  2062. };
  2063. },
  2064. closeDepartmentQrcodeModel(){
  2065. this.showDepartmentQrcodeModel.disjunctor = false;
  2066. },
  2067. // 摆药取药
  2068. handleTakeMedicine() {
  2069. if (!this.SMFlag) {
  2070. return;
  2071. }
  2072. this.SMFlag = false;
  2073. SM().then((content) => {
  2074. uni.showLoading({
  2075. title: "加载中",
  2076. mask: true,
  2077. });
  2078. //检验二维码的有效性(扫码前必须验证)
  2079. post("/dept/scanning", {
  2080. content,
  2081. })
  2082. .then((result) => {
  2083. this.currentCode = result.code;
  2084. this.SMFlag = true;
  2085. // 200检测通过,201没有有效期也通过。
  2086. if (result.state == 200 || result.state == 201) {
  2087. uni.hideLoading();
  2088. uni.navigateTo({
  2089. url: `../promptPage/promptPage?code=${result.code}`,
  2090. });
  2091. } else {
  2092. uni.hideLoading();
  2093. uni.showToast({
  2094. icon: "none",
  2095. title: result.info || "接口获取数据失败!",
  2096. });
  2097. }
  2098. })
  2099. }).catch(err => {
  2100. this.SMFlag = true;
  2101. });
  2102. },
  2103. // 点击tab页切换
  2104. clickHandler(key) {
  2105. this.selectedLabelSlots = key;
  2106. this.idx = 0;
  2107. this.totalNum = -1;
  2108. this.scroll_top = Math.random(); //回到顶部
  2109. this.execFilterReset()
  2110. if (key === "待接单") {
  2111. this.waitingOrders(0);
  2112. } else if (key === "执行中") {
  2113. this.executingOrders(0);
  2114. }
  2115. },
  2116. // 进入详情页
  2117. itemInfo(workOrder) {
  2118. console.log(workOrder);
  2119. uni.navigateTo({
  2120. url: `../receipt_infopage/receipt_infopage?id=${workOrder.id}&associationTypeValue=${workOrder.taskType.associationType.value}&associationTypeId=${workOrder.taskType.associationType.id}&taskTypeId=${workOrder.taskType.id}`,
  2121. });
  2122. },
  2123. //抢单后知道了
  2124. know() {
  2125. this.models.disjunctor = false;
  2126. this.idx = 0;
  2127. this.totalNum = -1;
  2128. // this.zxzData = [];
  2129. this.executingOrdersGetNum();
  2130. this.waitingOrders(0); //seimin
  2131. this.scroll_top = Math.random(); //回到顶部
  2132. },
  2133. //抢单确定
  2134. ok() {
  2135. this.models.disjunctor = false;
  2136. get("/workerOrder/takeOrder/" + this.qdId.id).then((res) => {
  2137. let msg = "接单失败";
  2138. let icon = "error";
  2139. if (res.status == 200) {
  2140. msg = "接单成功";
  2141. icon = "success";
  2142. }
  2143. this.models = {
  2144. disjunctor: true,
  2145. content: msg,
  2146. icon: icon,
  2147. operate: {
  2148. know: "知道了",
  2149. },
  2150. };
  2151. });
  2152. },
  2153. //抢单取消
  2154. cancel() {
  2155. this.models.disjunctor = false;
  2156. },
  2157. // 抢单
  2158. showAlerts(data) {
  2159. this.qdId = data;
  2160. this.models = {
  2161. disjunctor: true,
  2162. title: "提示",
  2163. content: "是否确定接单?",
  2164. icon: "warn",
  2165. operate: {
  2166. ok: "确定",
  2167. cancel: "取消",
  2168. },
  2169. };
  2170. },
  2171. //执行中列表数据获取
  2172. executingOrders(idx,type) {
  2173. console.log(this.zxzData.length, this.totalNum);
  2174. if (this.zxzData.length == this.totalNum) {
  2175. uni.showToast({
  2176. icon: "none",
  2177. title: "没有更多数据了!",
  2178. });
  2179. this.freshing = true;
  2180. return;
  2181. }
  2182. let data = {
  2183. idx,
  2184. sum: 20,
  2185. };
  2186. if (this.currentId) {
  2187. data.keyWord = this.currentId;
  2188. } else {
  2189. delete data.keyWord;
  2190. }
  2191. if (this.deptId) {
  2192. data.deptId = this.deptId;
  2193. } else {
  2194. delete data.deptId;
  2195. }
  2196. if (this.taskTypeId) {
  2197. data.taskTypeId = this.taskTypeId;
  2198. } else {
  2199. delete data.taskTypeId;
  2200. }
  2201. uni.showLoading({
  2202. title: "加载中",
  2203. mask: true,
  2204. });
  2205. post("/workerOrder/executingOrders", data).then((res) => {
  2206. uni.hideLoading();
  2207. if (res.status == 200) {
  2208. this.triggered = false;
  2209. this.freshing = true;
  2210. this.totalNum = res.data.resultCount;
  2211. res.data.data = res.data.data || [];
  2212. res.data.data.forEach(v => {
  2213. v.clinicalTaskIdsFlag = this.clinicalTaskIds.includes(v.taskType.id.toString());
  2214. })
  2215. if (idx === 0) {
  2216. this.zxzData = res.data.data;
  2217. } else {
  2218. this.zxzData.push(...res.data.data);
  2219. }
  2220. this.tabs[1].num = res.data.resultCount;
  2221. } else {
  2222. uni.showToast({
  2223. icon: "none",
  2224. title: res.msg || "接口获取数据失败!",
  2225. });
  2226. }
  2227. if(type=='submit'){
  2228. this.execFilterReset()
  2229. }
  2230. });
  2231. },
  2232. //待抢单列表数据获取
  2233. waitingOrders(idx,type) {
  2234. if (this.zxzData.length == this.totalNum) {
  2235. uni.showToast({
  2236. icon: "none",
  2237. title: "没有更多数据了!",
  2238. });
  2239. this.freshing = true;
  2240. return;
  2241. }
  2242. let data = {
  2243. idx,
  2244. sum: 20,
  2245. };
  2246. if (this.deptId) {
  2247. data.deptId = this.deptId;
  2248. } else {
  2249. delete data.deptId;
  2250. }
  2251. if (this.taskTypeId) {
  2252. data.taskTypeId = this.taskTypeId;
  2253. } else {
  2254. delete data.taskTypeId;
  2255. }
  2256. uni.showLoading({
  2257. title: "加载中",
  2258. mask: true,
  2259. });
  2260. // 请求列表数据
  2261. post("/workerOrder/waitingOrders", data).then((res) => {
  2262. uni.hideLoading();
  2263. if (res.status == 200) {
  2264. this.triggered = false;
  2265. this.freshing = true;
  2266. this.totalNum = res.data.resultCount;
  2267. if (idx === 0) {
  2268. this.zxzData = res.data.data;
  2269. } else {
  2270. this.zxzData.push(...res.data.data);
  2271. }
  2272. this.tabs[0].num = res.data.resultCount;
  2273. } else {
  2274. uni.showToast({
  2275. icon: "none",
  2276. title: res.msg || "接口获取数据失败!",
  2277. });
  2278. }
  2279. if(type=='submit'){
  2280. this.execFilterReset()
  2281. }
  2282. });
  2283. },
  2284. //刷新
  2285. refresherrefresh() {
  2286. if (this.triggered) {
  2287. return;
  2288. }
  2289. this.triggered = true;
  2290. this.idx = 0;
  2291. this.totalNum = -1;
  2292. if (this.selectedLabelSlots == "待接单") {
  2293. this.waitingOrders(0);
  2294. } else if (this.selectedLabelSlots == "执行中") {
  2295. this.executingOrders(0);
  2296. }
  2297. },
  2298. // 滚动
  2299. scroll(e) {
  2300. if (e.detail.scrollTop < 20) {
  2301. this.scroll_refresher_enabled = true;
  2302. } else {
  2303. this.scroll_refresher_enabled = false;
  2304. }
  2305. },
  2306. // 下拉刷新复位
  2307. refresherrestore() {
  2308. this.triggered = false;
  2309. console.log("下拉刷新复位");
  2310. },
  2311. //下拉刷新中止
  2312. refresherabort() {
  2313. this.triggered = false;
  2314. console.log("下拉刷新中止");
  2315. },
  2316. //分页,上拉加载
  2317. scrolltolower() {
  2318. if (this.freshing) {
  2319. this.freshing = false;
  2320. if (this.selectedLabelSlots == "待接单") {
  2321. this.waitingOrders(++this.idx);
  2322. } else if (this.selectedLabelSlots == "执行中") {
  2323. this.executingOrders(++this.idx);
  2324. }
  2325. }
  2326. },
  2327. // 执行中获取数字
  2328. executingOrdersGetNum() {
  2329. let data = {
  2330. idx: 0,
  2331. sum: 20,
  2332. };
  2333. if (this.arrayKey) {
  2334. data.keyWord = this.arrayKey;
  2335. } else {
  2336. delete data.keyWord;
  2337. }
  2338. post("/workerOrder/executingOrders", data).then((res) => {
  2339. if (res.status == 200) {
  2340. this.tabs[1].num = res.data.resultCount;
  2341. } else {
  2342. uni.showToast({
  2343. icon: "none",
  2344. title: res.msg || "接口获取数据失败!",
  2345. });
  2346. }
  2347. });
  2348. },
  2349. // 待接单获取数字
  2350. waitingOrdersGetNum() {
  2351. let data = {
  2352. idx: 0,
  2353. sum: 20,
  2354. };
  2355. post("/workerOrder/waitingOrders", data).then((res) => {
  2356. if (res.status == 200) {
  2357. this.tabs[0].num = res.data.resultCount;
  2358. } else {
  2359. uni.showToast({
  2360. icon: "none",
  2361. title: res.msg || "接口获取数据失败!",
  2362. });
  2363. }
  2364. });
  2365. },
  2366. // 阻止浏览器滑动
  2367. stop(e) {
  2368. e.preventDefault();
  2369. },
  2370. // 更新用户所在科室
  2371. updateUser(dept) {
  2372. post("/user/data/bindDutyDept", {dutyDept: +dept.id}).then((res) => {
  2373. if (res.status == 200) {
  2374. this.getCurrentUserNow(true);
  2375. }else{
  2376. uni.showToast({
  2377. icon: "none",
  2378. title: res.msg || "接口获取数据失败!",
  2379. });
  2380. }
  2381. })
  2382. },
  2383. // 重新获取用户信息
  2384. getCurrentUserNow(updateDept = false) {
  2385. get("/user/data/getCurrentUser").then((res) => {
  2386. if (res.status == 200) {
  2387. let userData = uni.getStorageSync('userData');
  2388. userData.user = res.data;
  2389. uni.setStorageSync('userData', userData);
  2390. // 显示科室二维码
  2391. if(updateDept){
  2392. this.departmentQrcodeHandler()
  2393. }else{
  2394. this.workState = uni.getStorageSync('userData').user.workState ? uni.getStorageSync('userData').user.workState.value : '1';
  2395. this.content.forEach(v => {
  2396. if(v.text == '示忙' || v.text == '示闲'){
  2397. v.text = this.workState == 1 ? '示闲' : '示忙';
  2398. }
  2399. })
  2400. }
  2401. }else{
  2402. uni.showToast({
  2403. icon: "none",
  2404. title: res.msg || "接口获取数据失败!",
  2405. });
  2406. }
  2407. })
  2408. },
  2409. },
  2410. onLoad(options) {
  2411. if(options.type=='searchAdm'){
  2412. let admStore = uni.getStorageSync("admStore");
  2413. if(Object.keys(admStore).length != 0){
  2414. this.deptName = options.dept //科室名称
  2415. this.deptId = options.deptId //科室id
  2416. this.isShowExecFilter = true
  2417. this.$nextTick(_=>{
  2418. this.currentId = admStore.currentId //工单状态
  2419. this.taskTypeId = admStore.taskType //任务类型
  2420. this.selectedLabelSlots = admStore.selectedLabelSlots //tab选中状态
  2421. this.taskData = JSON.parse(admStore.taskData) //任务类型数据
  2422. })
  2423. }
  2424. }
  2425. this.workState = uni.getStorageSync('userData').user.workState ? uni.getStorageSync('userData').user.workState.value : '1';
  2426. // 获取菜单权限
  2427. this.getMenu();
  2428. post("/auth/getUserWorkDept", {}).then((ress) => {
  2429. if (ress.status == 200) {
  2430. let userId = uni.getStorageSync("userData").user.id;
  2431. let groupManager = ress.settings && ress.settings.groupManager; //当前工作组合选择的组
  2432. let workType = ress.settings ? ress.settings.workType : -1; //1是综合,2是自主
  2433. let ruleType = ress.settings ? ress.settings.ruleType : -1; //3是科室绑定人员,4是科室绑定分组,2是绑定分组
  2434. if (workType == 2 && (ruleType == 3 || (ruleType == 4 && userId == groupManager.manager))) {
  2435. //自选排班,科室绑定分组,当前登陆人是组长
  2436. this.content.unshift({
  2437. text: "负责科室",
  2438. });
  2439. }
  2440. }
  2441. });
  2442. // let setDeptConfg = uni.getStorageSync("setDeptConfg");
  2443. // let manager = uni.getStorageSync("manager");
  2444. // let userId = uni.getStorageSync("userData").user.id;
  2445. // console.log(setDeptConfg, manager, userId);
  2446. // if (
  2447. // setDeptConfg.workSchemeType == 2 &&
  2448. // (setDeptConfg.ruleType == 3 ||
  2449. // (setDeptConfg.ruleType == 4 && userId == manager))
  2450. // ) {
  2451. // //自选排班,科室绑定人员 || 科室绑定分组 && 组长是当前登陆人
  2452. // this.content.unshift({
  2453. // text: "负责科室",
  2454. // });
  2455. // }
  2456. // #ifdef APP-PLUS
  2457. // this.content.push({
  2458. // text: "退出登录",
  2459. // });
  2460. // #endif
  2461. this.selectedLabelSlots = "执行中";
  2462. this.initList();
  2463. // 科室二维码切换科室回显
  2464. if (options.showDepartmentQrcodeId && options.showDepartmentQrcodeDept) {
  2465. this.updateUser({id: options.showDepartmentQrcodeId, dept: options.showDepartmentQrcodeDept})
  2466. }
  2467. // #ifdef APP-PLUS
  2468. webHandle("no", "app");
  2469. // #endif
  2470. // #ifdef H5
  2471. webHandle("no", "wx");
  2472. // #endif
  2473. },
  2474. onShow() {
  2475. this.SMFlag = true;
  2476. // #ifdef H5
  2477. document.body.addEventListener("touchmove", this.stop, {
  2478. passive: false,
  2479. });
  2480. // #endif
  2481. },
  2482. onHide() {
  2483. // #ifdef H5
  2484. document.body.removeEventListener("touchmove", this.stop, {
  2485. passive: false,
  2486. });
  2487. // #endif
  2488. },
  2489. };
  2490. </script>
  2491. <style lang="less">
  2492. /deep/ .uni-drawer__content{
  2493. width: 600rpx !important;
  2494. }
  2495. /deep/ .selected-item-active{
  2496. border-bottom: 4rpx solid #49b856;
  2497. }
  2498. .Receiptpage {
  2499. width: 100%;
  2500. height: 100%;
  2501. position: relative;
  2502. .execFilterMask{
  2503. // position: fixed;
  2504. // top: 0;
  2505. // right: 0;
  2506. // bottom: 0;
  2507. // left: 0;
  2508. // z-index: 9999;
  2509. // background-color: rgba(0, 0, 0, 0.5);
  2510. // display: flex;
  2511. // flex-direction: column;
  2512. // justify-content: flex-end;
  2513. .execFilter{
  2514. position: relative;
  2515. background-color: #fff;
  2516. height: 100vh;
  2517. border-radius: 100rpx 100rpx 0 0;
  2518. .execFilterHeader{
  2519. height: 70rpx;
  2520. display: flex;
  2521. justify-content: center;
  2522. align-items: center;
  2523. border-bottom: 2rpx solid #ccc;
  2524. }
  2525. .execFilterBody{
  2526. .execFilterItem{
  2527. padding: 32rpx;
  2528. border-bottom: 2rpx dashed #ccc;
  2529. &:last-of-type{
  2530. border-bottom: none;
  2531. }
  2532. .execFilterItemHeader{}
  2533. .execFilterItemBody{
  2534. display: flex;
  2535. flex-wrap: wrap;
  2536. padding: 32rpx 0 0;
  2537. justify-content: space-between;
  2538. text-align: left;
  2539. .execFilterItemBox{
  2540. width: 200rpx;
  2541. height: 80rpx;
  2542. text-align: center;
  2543. line-height: 80rpx;
  2544. background-color: #f6f6f6;
  2545. margin-bottom: 20rpx;
  2546. border-radius: 80rpx;
  2547. &.active{
  2548. color: #fff;
  2549. background-color: #49b856;
  2550. }
  2551. }
  2552. .deptName {
  2553. height: 80rpx;
  2554. background-color: #f6f6f6;
  2555. border-radius: 20rpx;
  2556. padding: 0 20rpx;
  2557. width: 100%;
  2558. }
  2559. }
  2560. }
  2561. }
  2562. .execFilterFooter {
  2563. position: absolute;
  2564. bottom: 0;
  2565. right: 0;
  2566. left: 0;
  2567. line-height: 66rpx;
  2568. height: 100rpx;
  2569. display: flex;
  2570. justify-content: space-between;
  2571. .btn {
  2572. height: 66rpx;
  2573. flex: 1;
  2574. margin: 0 1%;
  2575. background-image: linear-gradient(to right, #72c172, #3bb197);
  2576. color: #fff;
  2577. border-radius: 8rpx;
  2578. font-size: 28rpx;
  2579. margin-top: 16rpx;
  2580. text-align: center;
  2581. }
  2582. }
  2583. }
  2584. }
  2585. .more {
  2586. position: absolute;
  2587. right: 20rpx;
  2588. width: 40rpx;
  2589. height: 4rpx;
  2590. border-top: 2px solid #49b856;
  2591. border-bottom: 2px solid #49b856;
  2592. background-color: #49b856;
  2593. padding: 5px 0;
  2594. background-clip: content-box;
  2595. z-index: 9999;
  2596. top: 50%;
  2597. transform: translateY(-50%);
  2598. }
  2599. .more_picker {
  2600. position: absolute;
  2601. right: 0;
  2602. height: 100%;
  2603. opacity: 0;
  2604. z-index: 9999;
  2605. }
  2606. .bigScreenWrap{
  2607. position: fixed;
  2608. left: 0;
  2609. right: 0;
  2610. bottom: 30rpx;
  2611. z-index: 999;
  2612. height: 88rpx;
  2613. }
  2614. .red {
  2615. color: red !important;
  2616. font-weight: bold !important;
  2617. }
  2618. .page_tab {
  2619. width: 100%;
  2620. height: 96rpx;
  2621. display: flex;
  2622. position: fixed;
  2623. left: 0;
  2624. top: 0;
  2625. z-index: 999;
  2626. .page_tab_bar {
  2627. flex: 1;
  2628. font-size: 36rpx;
  2629. background: #fff;
  2630. display: flex;
  2631. justify-content: center;
  2632. align-items: center;
  2633. position: relative;
  2634. &:after {
  2635. content: "";
  2636. position: absolute;
  2637. left: 0;
  2638. bottom: 0;
  2639. height: 2rpx;
  2640. width: 100%;
  2641. background-color: transparent;
  2642. }
  2643. .tab_num {
  2644. color: #ff3b53;
  2645. margin-left: 8rpx;
  2646. }
  2647. &.active {
  2648. color: #49b856;
  2649. &:after {
  2650. background-color: #49b856;
  2651. }
  2652. }
  2653. }
  2654. }
  2655. .zwsj {
  2656. position: absolute;
  2657. left: 50%;
  2658. top: 180rpx;
  2659. transform: translateX(-50%);
  2660. .zwsj-img {
  2661. width: 560rpx;
  2662. }
  2663. .zwsj-txt {
  2664. font-size: 36rpx;
  2665. font-weight: 700;
  2666. margin-top: 20rpx;
  2667. text-align: center;
  2668. }
  2669. }
  2670. .page_items {
  2671. height: calc(100vh - 214rpx);
  2672. padding: 0 20rpx;
  2673. // padding-bottom: 88rpx;
  2674. padding-top: 96rpx;
  2675. .page_items_scroll {
  2676. height: 100%;
  2677. .page_item_wrap {
  2678. position: relative;
  2679. margin-bottom: 32rpx;
  2680. .page_item {
  2681. margin-bottom: 16rpx;
  2682. // min-height: 356rpx;
  2683. background: #fff;
  2684. border-radius: 8rpx;
  2685. overflow: hidden;
  2686. border: 2rpx solid #e5e9ed;
  2687. .L {
  2688. width: 40rpx;
  2689. height: 40rpx;
  2690. border-radius: 50%;
  2691. background: #f9fafb;
  2692. position: absolute;
  2693. left: -24rpx;
  2694. top: 68rpx;
  2695. border: 2rpx solid #e5e9ed;
  2696. }
  2697. .R {
  2698. width: 40rpx;
  2699. height: 40rpx;
  2700. border-radius: 50%;
  2701. background: #f9fafb;
  2702. position: absolute;
  2703. float: right;
  2704. right: -24rpx;
  2705. top: 68rpx;
  2706. border: 2rpx solid #e5e9ed;
  2707. }
  2708. .starting {
  2709. width: 40rpx;
  2710. height: 40rpx;
  2711. color: #fff;
  2712. background: #49b856;
  2713. display: inline-block;
  2714. border-radius: 50%;
  2715. text-align: center;
  2716. line-height: 40rpx;
  2717. font-size: 28rpx;
  2718. }
  2719. .End {
  2720. width: 40rpx;
  2721. height: 40rpx;
  2722. color: #fff;
  2723. background: #39b199;
  2724. display: inline-block;
  2725. border-radius: 50%;
  2726. text-align: center;
  2727. line-height: 40rpx;
  2728. font-size: 28rpx;
  2729. }
  2730. .page_item_top {
  2731. height: 86rpx;
  2732. border-bottom: 2rpx dashed #e5e9ed;
  2733. padding: 0 16rpx;
  2734. .page_item_top_L {
  2735. height: 100%;
  2736. float: left;
  2737. line-height: 88rpx;
  2738. display: flex;
  2739. align-items: center;
  2740. .emergencys {
  2741. background: #ff3b53 !important;
  2742. width: 124rpx !important;
  2743. }
  2744. .emergency {
  2745. background: #ff3b53 !important;
  2746. }
  2747. .emergency1 {
  2748. background: #49b856 !important;
  2749. }
  2750. .page_item_cont_start {
  2751. text-align: center;
  2752. height: 44rpx;
  2753. width: 104rpx;
  2754. line-height: 44rpx;
  2755. border-radius: 8rpx;
  2756. background: #49b856;
  2757. color: #fff;
  2758. .page_item_cont_start-img {
  2759. width: 22rpx;
  2760. position: relative;
  2761. top: 6rpx;
  2762. margin-right: 8rpx;
  2763. }
  2764. }
  2765. .L_iocn {
  2766. display: inline-block;
  2767. width: 44rpx;
  2768. height: 44rpx;
  2769. line-height: 42rpx;
  2770. border-radius: 100rpx;
  2771. color: #6cc076;
  2772. font-size: 32rpx;
  2773. border: 4rpx solid #6cc076;
  2774. background: #f0f6ed;
  2775. text-align: center;
  2776. margin-right: 8rpx;
  2777. }
  2778. .L_time {
  2779. color: #6cc076;
  2780. font-size: 32rpx;
  2781. }
  2782. .L_text {
  2783. font-size: 32rpx;
  2784. }
  2785. }
  2786. .page_item_top_R {
  2787. height: 100%;
  2788. float: right;
  2789. line-height: 88rpx;
  2790. font-size: 32rpx;
  2791. &.type {
  2792. margin-right: 32rpx;
  2793. color: red;
  2794. max-width: 260rpx;
  2795. white-space: nowrap;
  2796. text-overflow: ellipsis;
  2797. overflow: hidden;
  2798. }
  2799. .text_big{
  2800. font-weight: bold;
  2801. }
  2802. }
  2803. }
  2804. .page_item_cont {
  2805. min-height: 180rpx;
  2806. padding: 0 16rpx;
  2807. text-align: left;
  2808. position: relative;
  2809. display: flex;
  2810. flex-direction: column;
  2811. justify-content: space-between;
  2812. .text_big {
  2813. font-size: 32rpx;
  2814. margin-left: 10rpx;
  2815. font-weight: 700;
  2816. }
  2817. .line {
  2818. height: 100%;
  2819. width: 2rpx;
  2820. border-left: 2rpx solid #e5e9ed;
  2821. position: absolute;
  2822. // top: 70rpx;
  2823. top: 50%;
  2824. left: 20rpx;
  2825. transform: translateY(-50%);
  2826. }
  2827. .lines {
  2828. height: 40%;
  2829. width: 2rpx;
  2830. border-left: 2rpx solid #e5e9ed;
  2831. position: absolute;
  2832. top: 23%;
  2833. left: 36rpx;
  2834. }
  2835. .emergencys {
  2836. background: #ff3b53 !important;
  2837. width: 124rpx !important;
  2838. }
  2839. .emergency {
  2840. background: #ff3b53 !important;
  2841. }
  2842. .emergency1 {
  2843. background: #49b856 !important;
  2844. }
  2845. .page_item_cont_T {
  2846. // min-height: 80rpx;
  2847. // max-height: 324rpx;
  2848. font-size: 28rpx;
  2849. margin-top: 16rpx;
  2850. display: flex;
  2851. justify-content: space-between;
  2852. .page_item_cont_title {
  2853. height: 100%;
  2854. // float: left;
  2855. }
  2856. .page_item_cont_start {
  2857. text-align: center;
  2858. // float: right;
  2859. height: 44rpx;
  2860. width: 104rpx;
  2861. line-height: 44rpx;
  2862. border-radius: 8rpx;
  2863. background: #49b856;
  2864. color: #fff;
  2865. .page_item_cont_start-img {
  2866. width: 22rpx;
  2867. position: relative;
  2868. top: 6rpx;
  2869. margin-right: 8rpx;
  2870. }
  2871. }
  2872. }
  2873. .page_item_conts {
  2874. min-height: 30rpx;
  2875. color: rgb(102, 102, 102);
  2876. padding-left: 50rpx;
  2877. font-size: 28rpx;
  2878. margin: 16rpx 0;
  2879. position: relative;
  2880. view:not(.line) {
  2881. line-height: 1.2;
  2882. }
  2883. text {
  2884. color: #49b856;
  2885. }
  2886. }
  2887. .page_item_cont_B {
  2888. // padding-top: 20rpx;
  2889. font-size: 28rpx;
  2890. // overflow: hidden;
  2891. margin-bottom: 16rpx;
  2892. .page_item_cont_title {
  2893. height: 100%;
  2894. float: left;
  2895. }
  2896. }
  2897. }
  2898. .page_item_btn_wrap {
  2899. display: flex;
  2900. justify-content: space-between;
  2901. .page_item_btn {
  2902. height: 88rpx;
  2903. flex: 1;
  2904. margin-left: 1%;
  2905. background-image: linear-gradient(to right, #72c172, #3bb197);
  2906. border-radius: 8rpx;
  2907. line-height: 88rpx;
  2908. color: #fff;
  2909. font-size: 36rpx;
  2910. font-weight: 700;
  2911. text-align: center;
  2912. &:first-of-type{
  2913. margin-left: 0;
  2914. }
  2915. }
  2916. }
  2917. .page_item_btn {
  2918. height: 88rpx;
  2919. background-image: linear-gradient(to right, #72c172, #3bb197);
  2920. border-radius: 8rpx;
  2921. line-height: 88rpx;
  2922. color: #fff;
  2923. font-size: 36rpx;
  2924. font-weight: 700;
  2925. text-align: center;
  2926. }
  2927. }
  2928. .L-l {
  2929. width: 2rpx;
  2930. height: 40rpx;
  2931. background: #f9fafb;
  2932. position: absolute;
  2933. left: 20rpx;
  2934. top: 72rpx;
  2935. display: none;
  2936. }
  2937. .R-l {
  2938. width: 2rpx;
  2939. height: 40rpx;
  2940. background: #f9fafb;
  2941. position: absolute;
  2942. right: 20rpx;
  2943. top: 72rpx;
  2944. display: none;
  2945. }
  2946. }
  2947. }
  2948. }
  2949. .text {
  2950. font-size: 36rpx;
  2951. }
  2952. .wt_icon {
  2953. font-size: 40rpx;
  2954. }
  2955. }
  2956. </style>