receiptpage.vue 66 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886
  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 === '执行中'"></view>
  9. <picker class="more_picker" v-if="item.label === '执行中'" @click.stop @change="execFilter($event)" :value="index"
  10. :range="array" range-key="name">
  11. <view class="uni-input">{{ array[index].name }}</view>
  12. </picker>
  13. </view>
  14. </view>
  15. <view v-if="zxzData.length == 0" class="zwsj">
  16. <image class="zwsj-img" mode="widthFix" src="../../static/img/zanwushuju.png"></image>
  17. <view class="zwsj-txt">暂无数据</view>
  18. </view>
  19. <view class="page_items">
  20. <scroll-view class="page_items_scroll" scroll-y :refresher-enabled="scroll_refresher_enabled"
  21. :refresher-triggered="triggered" @refresherrefresh="refresherrefresh" @refresherrestore="refresherrestore"
  22. @scroll="scroll" @scrolltolower="scrolltolower" :scroll-top="scroll_top" @refresherabort="refresherabort">
  23. <view class="page_item_wrap" v-for="(item, index) of zxzData" :key="index">
  24. <view class="page_item">
  25. <view class="L"></view>
  26. <view class="R"></view>
  27. <view class="page_item_top">
  28. <view class="page_item_top_L">
  29. <!-- <text class="L_iocn" v-if="item.taskType.associationType.value == 'specimen'">标</text>
  30. <text class="L_iocn" v-if="item.taskType.associationType.value == 'drugsBag'">药</text>
  31. <text class="L_iocn" v-if="item.taskType.associationType.value == 'specimenPlan'">巡</text>
  32. <text class="L_iocn" v-if="item.taskType.associationType.value == 'jPBag'">静</text>
  33. <text class="L_iocn" v-if="item.taskType.associationType.value == 'inspect'">病</text>
  34. <text class="L_iocn" v-if="
  35. item.taskType.associationType.value == 'patientTransport'
  36. ">病</text>
  37. <text class="L_iocn" v-if="item.taskType.associationType.value == 'other'">其</text> -->
  38. <view class="page_item_cont_start emergency1" v-if="item.emergencyType.value == 1">
  39. <image mode="widthFix" class="page_item_cont_start-img" src="../../static/img/icon_shandian.png">
  40. </image>
  41. {{ item.emergencyType.name }}
  42. </view>
  43. <view class="page_item_cont_start emergency" v-if="item.emergencyType.value == 2">
  44. <image mode="widthFix" class="page_item_cont_start-img" src="../../static/img/icon_shandian.png">
  45. </image>
  46. {{ item.emergencyType.name }}
  47. </view>
  48. <view class="page_item_cont_start emergencys" v-if="item.emergencyType.value == 3">
  49. <image mode="widthFix" class="page_item_cont_start-img" src="../../static/img/icon_shandian.png">
  50. </image>
  51. {{ item.emergencyType.name }}
  52. </view>
  53. <view class="page_item_top_R type" style="margin-left: 16rpx;">
  54. {{
  55. item.isHalfInspect === 1 ? "半程陪检" : item.taskType.taskName
  56. }}<template v-if="item.goodsRemark">-{{item.goodsRemark}}</template>
  57. </view>
  58. <!-- <text class="L_time" v-if="item.overdueTime">{{ item.overdueTime }}前送达</text> -->
  59. </view>
  60. <view class="page_item_top_R" v-if="
  61. !(
  62. item.taskType.associationType.value == 'inspect' &&
  63. item.gdState.value == 5
  64. )
  65. ">
  66. <text class="text_big">{{ item.gdState.name }}</text>
  67. </view>
  68. <view class="page_item_top_R" v-if="
  69. item.taskType.associationType.value == 'inspect' &&
  70. item.gdState.value == 5
  71. ">
  72. <text class="text_big">待送回</text>
  73. </view>
  74. <!-- <view class="page_item_top_R type">
  75. {{
  76. item.isHalfInspect === 1 ? "半程陪检" : item.taskType.taskName
  77. }}<template v-if="item.goodsRemark">-{{item.goodsRemark}}</template>
  78. </view> -->
  79. </view>
  80. <view class="page_item_cont" @click="itemInfo(item)">
  81. <view class="page_item_cont_T">
  82. <view class="page_item_cont_title">
  83. <text> <text class="starting">起</text> 点科室 </text>
  84. <text class="text_big">{{ item.startDept.dept }}</text>
  85. </view>
  86. <!-- <view class="page_item_cont_start emergency1" v-if="item.emergencyType.value == 1">
  87. <image mode="widthFix" class="page_item_cont_start-img" src="../../static/img/icon_shandian.png">
  88. </image>
  89. {{ item.emergencyType.name }}
  90. </view>
  91. <view class="page_item_cont_start emergency" v-if="item.emergencyType.value == 2">
  92. <image mode="widthFix" class="page_item_cont_start-img" src="../../static/img/icon_shandian.png">
  93. </image>
  94. {{ item.emergencyType.name }}
  95. </view>
  96. <view class="page_item_cont_start emergencys" v-if="item.emergencyType.value == 3">
  97. <image mode="widthFix" class="page_item_cont_start-img" src="../../static/img/icon_shandian.png">
  98. </image>
  99. {{ item.emergencyType.name }}
  100. </view> -->
  101. </view>
  102. <view class="page_item_conts" v-if="item.taskType.associationType.value == 'specimen'">
  103. <view v-if="item.overdueTime">{{ item.overdueTime }}前送达</view>
  104. <view>扫描标本数量 : {{ item.actualReceiveNum || '无'}}</view>
  105. <view class="line"></view>
  106. </view>
  107. <view class="page_item_conts" v-else-if="item.taskType.associationType.value == 'ordinary' && item.taskType.ordinaryField.value == 'blood'">
  108. <view v-if="item.overdueTime">{{ item.overdueTime }}前送达</view>
  109. <view>接收数量 : {{ item.actualReceiveNum || '无'}}</view>
  110. <view class="line"></view>
  111. </view>
  112. <view class="page_item_conts" v-else-if="item.taskType.associationType.value == 'inspect'">
  113. <view v-if="item.overdueTime">{{ item.overdueTime }}前送达</view>
  114. <view>
  115. 预约时间 : {{ item.yyTime | yyTimeFilter
  116. }}<text v-if="item.reservationNumber">({{ item.reservationNumber }})</text>
  117. </view>
  118. <view>
  119. 床号 : {{ item.patient ? item.patient.patientName : "-" }}({{
  120. item.patient ? item.patient.bedNum : "-"
  121. }})
  122. </view>
  123. <view v-if="item.goods">
  124. 携带设备 :
  125. <text>{{ item.goods || "暂无" }}</text>
  126. </view>
  127. <view style="word-break: break-all;" v-if="item.workOrderRemark">
  128. 备注信息 :
  129. <text>{{ item.workOrderRemark || "暂无" }}</text>
  130. </view>
  131. <view v-if="item.patient.careLevel">
  132. 护理等级 :
  133. <text :class="[
  134. item.patient.careLevel.value == 0 ||
  135. item.patient.careLevel.value == 1
  136. ? 'red'
  137. : 'green',
  138. ]">{{ item.patient.careLevel.name }}</text>
  139. </view>
  140. <view v-if="item.patient.illnessState">
  141. 病情级别 :
  142. <text :class="{
  143. red:
  144. item.patient.illnessState.value == 2 ||
  145. item.patient.illnessState.value == 3,
  146. }">{{ item.patient.illnessState.name }}</text>
  147. </view>
  148. <view v-if="item.isAccompany === 1 || item.isAccompany === 0">
  149. 陪同情况 :
  150. <text :class="{ red: item.isAccompany === 1 }">{{
  151. item.isAccompany === 1 ? "需要医护陪同" : "无需医护陪同"
  152. }}</text>
  153. </view>
  154. <view class="line"></view>
  155. </view>
  156. <view class="page_item_conts" v-else-if="item.taskType.associationType.value == 'patientTransport'">
  157. <view v-if="item.overdueTime">{{ item.overdueTime }}前送达</view>
  158. <view>
  159. 预约时间 : {{ item.yyjdTime | yyTimeFilter
  160. }}<text v-if="item.reservationNumber">({{ item.reservationNumber }})</text>
  161. </view>
  162. <view>
  163. 床号 : {{ item.patient ? item.patient.patientName : "-" }}({{
  164. item.patient ? item.patient.bedNum : "-"
  165. }})
  166. </view>
  167. <view v-if="item.goods">
  168. 携带设备 :
  169. <text>{{ item.goods || "暂无" }}</text>
  170. </view>
  171. <view style="word-break: break-all;" v-if="item.workOrderRemark">
  172. 备注信息 :
  173. <text>{{ item.workOrderRemark || "暂无" }}</text>
  174. </view>
  175. <view v-if="item.patient.careLevel">
  176. 护理等级 :
  177. <text :class="[
  178. item.patient.careLevel.value == 0 ||
  179. item.patient.careLevel.value == 1
  180. ? 'red'
  181. : 'green',
  182. ]">{{ item.patient.careLevel.name }}</text>
  183. </view>
  184. <view v-if="item.patient.illnessState">
  185. 病情级别 :
  186. <text :class="{
  187. red:
  188. item.patient.illnessState.value == 2 ||
  189. item.patient.illnessState.value == 3,
  190. }">{{ item.patient.illnessState.name }}</text>
  191. </view>
  192. <view v-if="item.isAccompany === 1 || item.isAccompany === 0">
  193. 陪同情况 :
  194. <text :class="{ red: item.isAccompany === 1 }">{{
  195. item.isAccompany === 1 ? "需要医护陪同" : "无需医护陪同"
  196. }}</text>
  197. </view>
  198. <view class="line"></view>
  199. </view>
  200. <view class="page_item_conts" v-else-if="item.taskType.associationType.value == 'drugsBag'">
  201. <view v-if="item.overdueTime">{{ item.overdueTime }}前送达</view>
  202. <view>
  203. 药包编码 : {{ item.drugs ? item.drugs.packid : "无" }}
  204. </view>
  205. <view class="line"></view>
  206. </view>
  207. <view class="page_item_conts" v-else-if="item.taskType.associationType.value == 'jPBag'">
  208. <view v-if="item.overdueTime">{{ item.overdueTime }}前送达</view>
  209. <view>
  210. 药包编码 :
  211. {{ item.staticDistri ? item.staticDistri.packid : "无" }}
  212. </view>
  213. <view class="line"></view>
  214. </view>
  215. <view class="page_item_conts" v-else>
  216. <view v-if="item.overdueTime">{{ item.overdueTime }}前送达</view>
  217. <view style="word-break: break-all;" v-if="item.workOrderRemark">
  218. 备注信息 :
  219. <text>{{ item.workOrderRemark || "暂无" }}</text>
  220. </view>
  221. <view class="line"></view>
  222. </view>
  223. <view class="page_item_cont_B">
  224. <view class="page_item_cont_title" v-if="item.taskType.associationType.value != 'inspect'">
  225. <text> <text class="End">终</text> 点科室 </text>
  226. <text class="text_big" v-for="(dept, i) of item.endDepts" :key="i">{{ dept.dept }}</text>
  227. </view>
  228. <view class="page_item_cont_title" v-if="item.taskType.associationType.value == 'inspect'">
  229. <text> <text class="End">检</text> 查科室 </text>
  230. <text class="text_big" v-for="(dept, i) of item.middleDept" :key="i">{{ dept.dept }}</text>
  231. </view>
  232. </view>
  233. </view>
  234. <view v-if="
  235. item.taskType.associationType.value == 'inspect' ||
  236. item.taskType.associationType.value == 'patientTransport'
  237. ">
  238. <!-- 待抢单 -->
  239. <text class="red" v-if="item.gdState.value == 2">请扫描患者腕带,或者请扫描科室码</text>
  240. <!-- 待到达 -->
  241. <text class="red" v-if="item.gdState.value == 4">请扫描患者腕带</text>
  242. <!-- 执行中 -->
  243. <text class="red" v-if="item.gdState.value == 8">请扫描检查科室码,并扫描患者腕带</text>
  244. <!-- 待送达 -->
  245. <text class="red" v-if="item.gdState.value == 5">请扫描终点科室码,并扫描患者腕带</text>
  246. </view>
  247. <view v-else-if="item.taskType.associationType.value == 'other'">
  248. <!-- 待到达 -->
  249. <text class="red" v-if="item.gdState.value == 4 && item.taskType.carryingCourses[0].checkoutMethod.value == 1">可通过扫描科室码或者拍照进行签到</text>
  250. <text class="red" v-if="item.gdState.value == 4 && item.taskType.carryingCourses[0].checkoutMethod.value == 2">扫描交接人员二维码进行交接</text>
  251. </view>
  252. <!-- 如果不是患者陪检或患者转运或其他,万能交接 -->
  253. <view class="page_item_btn" v-if="
  254. selectedLabelSlots == '执行中' &&
  255. item.taskType.associationType.value != 'patientTransport' &&
  256. item.taskType.associationType.value != 'inspect' &&
  257. item.taskType.associationType.value != 'other' &&
  258. item.taskType.associationType.value != 'ordinary'
  259. " hover-class="seimin-btn-hover">
  260. <smallScreen :sData="item" :sType="2">扫码</smallScreen>
  261. </view>
  262. <!-- 如果不是静配,药配,标本配送,标本轮巡,万能交接 -->
  263. <view class="page_item_btn_wrap" v-if="
  264. selectedLabelSlots == '执行中' &&
  265. item.taskType.associationType.value != 'jPBag' &&
  266. item.taskType.associationType.value != 'drugsBag' &&
  267. item.taskType.associationType.value != 'specimen' &&
  268. item.taskType.associationType.value != 'specimenPlan' &&
  269. item.taskType.associationType.value != 'ordinary'
  270. ">
  271. <view v-if="!(item.taskType.associationType.value == 'other' && (item.gdState.value == 4 && item.taskType.carryingCourses[0].actionsSwitch || item.gdState.value == 5 && item.taskType.carryingCourses[1].actionsSwitch))" class="page_item_btn" hover-class="seimin-btn-hover">
  272. <smallScreen :sData="item" :sType="1">扫码</smallScreen>
  273. </view>
  274. <!-- 其他临床服务-完成工单-待到达 -->
  275. <view v-if="item.taskType.associationType.value == 'other' && item.gdState.value == 4 && item.taskType.carryingCourses[0].actionsSwitch" class="page_item_btn" @click="otherCompleteOrder(item)" hover-class="seimin-btn-hover">确认到达</view>
  276. <!-- 其他临床服务-完成工单-待送达 -->
  277. <view v-if="item.taskType.associationType.value == 'other' && item.gdState.value == 5 && item.taskType.carryingCourses[1].actionsSwitch" class="page_item_btn" @click="otherCompleteOrder(item)" hover-class="seimin-btn-hover">完成工单</view>
  278. <!-- 其他临床服务-拍照 -->
  279. <view v-if="item.taskType.associationType.value == 'other' && item.gdState.value == 4 && item.taskType.carryingCourses[0].photoSwitch" class="page_item_btn" @click="photographToOther(item, 'start')" hover-class="seimin-btn-hover">拍照</view>
  280. <view v-if="item.taskType.associationType.value != 'other' && item.gdState.value == 4" class="page_item_btn" @click="photograph(item)" hover-class="seimin-btn-hover">拍照</view>
  281. </view>
  282. <view class="page_item_btn" v-if="selectedLabelSlots == '待接单'" @click="showAlerts(item)" hover-class="seimin-btn-hover">接单</view>
  283. </view>
  284. <view class="L-l"></view>
  285. <view class="R-l"></view>
  286. </view>
  287. </scroll-view>
  288. </view>
  289. <!-- 底部扫一扫 -->
  290. <view class="bigScreenWrap">
  291. <bigScreen ref="bigscreen"></bigScreen>
  292. <view class="more" v-if="arrayBigScreen.length"></view>
  293. <picker class="more_picker" @click.stop @change="execFilterBigScreen($event)" :value="indexBigScreen"
  294. :range="arrayBigScreen" range-key="name" v-if="arrayBigScreen.length">
  295. <view class="uni-input">{{ arrayBigScreen[indexBigScreen].name }}</view>
  296. </picker>
  297. </view>
  298. <!-- 悬浮按钮 -->
  299. <uni-fab :pattern="pattern" :content="content" :direction="direction" @trigger="trigger"></uni-fab>
  300. <!-- 弹窗 -->
  301. <showModel :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content"
  302. @ok="ok" @cancel="cancel" @know="know" :operate="models.operate"></showModel>
  303. <!-- 我的二维码-弹窗 -->
  304. <showMyQrcode v-if="showMyQrcodeModel.disjunctor" :disjunctor="showMyQrcodeModel.disjunctor" @know="closeMyQrcodeModel"></showMyQrcode>
  305. <!-- 手动查询标本弹窗 -->
  306. <handViewSpecimen v-if="speModels.disjunctor" :title="speModels.title" :disjunctor="speModels.disjunctor"
  307. @ok="speOk" @cancel="speCancel">
  308. </handViewSpecimen>
  309. <!-- 手动查询药品弹窗 -->
  310. <handViewDrugsBag v-if="drugbagModels.disjunctor" :title="drugbagModels.title"
  311. :disjunctor="drugbagModels.disjunctor" @ok="drugbagOk" @cancel="drugbagCancel">
  312. </handViewDrugsBag>
  313. <!-- 填写交接人账号弹窗 -->
  314. <selectAccount v-if="hosModels.disjunctor" :title="hosModels.title" :disjunctor="hosModels.disjunctor" @ok="hosOk"
  315. @cancel="hosCancel">
  316. </selectAccount>
  317. </view>
  318. </template>
  319. <script>
  320. import selectAccount from "../../components/selectAccount/selectAccount.vue";
  321. import smallScreen from "../../components/smallScreen/smallScreen.vue";
  322. import showModel from "../../components/showModel/showModel.vue";
  323. import bigScreen from "../../components/bigScreen/bigScreen.vue";
  324. // https://ext.dcloud.net.cn/plugin?id=144
  325. import uniFab from "@/components/uni-fab/uni-fab.vue";
  326. import {
  327. get,
  328. post,
  329. SM,
  330. deleteIt,
  331. webHandle
  332. } from "../../http/http.js";
  333. import {
  334. photographTool,
  335. pathUrl
  336. } from "../../tools/photograph.js";
  337. export default {
  338. data() {
  339. return {
  340. // 填写交接人账号弹窗model
  341. hosModels: {
  342. disjunctor: false,
  343. },
  344. currentCode: '', //当前拍照使用的科室二维码
  345. currentData: {}, //当前小扫描的工单对象
  346. // 弹窗model
  347. showMyQrcodeModel: {
  348. disjunctor: false,
  349. },
  350. SMFlag: true,
  351. // 手动查询标本弹窗model
  352. speModels: {
  353. disjunctor: false,
  354. },
  355. // 手动查询药品弹窗model
  356. drugbagModels: {
  357. disjunctor: false,
  358. },
  359. // 筛选条件
  360. array: [{
  361. id: 0,
  362. name: "全部",
  363. },
  364. {
  365. id: 71,
  366. name: "待到达",
  367. },
  368. {
  369. id: 72,
  370. name: "待送达",
  371. },
  372. {
  373. id: 75,
  374. name: "执行中",
  375. },
  376. ],
  377. // 筛选条件
  378. arrayBigScreen: [],
  379. index: 0,
  380. indexBigScreen: 0,
  381. arrayKey: 0,
  382. arrayKeyBigScreen: 0,
  383. // 当前登录人是否是药房角色
  384. pharmacistFlag: false,
  385. // 抢单的id
  386. qdId: "",
  387. // 弹窗model
  388. models: {
  389. disjunctor: false,
  390. },
  391. // 悬浮按钮样式
  392. pattern: {
  393. buttonColor: "#6cc076",
  394. },
  395. // 悬浮按钮展开菜单显示方式
  396. direction: "vertical",
  397. // 悬浮按钮展开菜单内容配置项
  398. content: [{
  399. text: "我的任务",
  400. }, ],
  401. // 当前选中tab页名称
  402. selectedLabelSlots: "待接单",
  403. // tab页信息
  404. tabs: [{
  405. label: "待接单", //tab页名称
  406. value: "1", //值
  407. num: 0, //数量
  408. },
  409. {
  410. label: "执行中",
  411. value: "2",
  412. num: 0,
  413. },
  414. ],
  415. //列表数据
  416. zxzData: [],
  417. //分页页码
  418. idx: 0,
  419. // 列表项总数
  420. totalNum: -1,
  421. triggered: false, //下拉刷新状态
  422. freshing: false, //上拉加载开关
  423. scroll_top: 0, //距离顶部的距离
  424. scroll_refresher_enabled: true, //是否开启自定义下拉刷新
  425. };
  426. },
  427. filters: {
  428. // 自定义管道 yyTime
  429. yyTimeFilter: function(data) {
  430. if (data) {
  431. let nDate = null;
  432. if (typeof data == 'string') {
  433. let arr = data.split(/[-:\s]/);
  434. nDate = new Date(
  435. arr[0] - 0,
  436. arr[1] - 1,
  437. arr[2] - 0,
  438. arr[3] - 0,
  439. arr[4] - 0,
  440. 0
  441. );
  442. } else if (typeof data == 'number') {
  443. nDate = new Date(data);
  444. }
  445. const month = (nDate.getMonth() + 1).toString().padStart(2, 0);
  446. const date = nDate.getDate().toString().padStart(2, 0);
  447. const hour = nDate.getHours().toString().padStart(2, 0);
  448. const minute = nDate.getMinutes().toString().padStart(2, 0);
  449. return `${month}-${date} ${hour}:${minute}`;
  450. } else {
  451. return "-";
  452. }
  453. },
  454. },
  455. components: {
  456. uniFab,
  457. showModel,
  458. bigScreen,
  459. selectAccount,
  460. },
  461. methods: {
  462. // 前往其他临床服务完成工单确认页面
  463. otherCompleteOrder(data){
  464. console.log(data);
  465. uni.navigateTo({
  466. url: `../otherCompleteOrder/otherCompleteOrder?orderId=${data.id}&taskType=${data.taskType ? encodeURIComponent(JSON.stringify(data.taskType)) : ''}&order=${data ? encodeURIComponent(JSON.stringify(data)) : ''}`,
  467. });
  468. },
  469. // 手动查询药品-确认
  470. drugbagOk(data) {
  471. console.log(data);
  472. if (!data.id) {
  473. //没有查询到药品
  474. uni.showModal({
  475. title: '提示',
  476. content: "没有查询到发药单号!",
  477. showCancel: false,
  478. success: function(res) {
  479. if (res.confirm) {
  480. console.log('用户点击确定');
  481. } else if (res.cancel) {
  482. console.log('用户点击取消');
  483. }
  484. }
  485. });
  486. return;
  487. }
  488. this.drugbagModels.disjunctor = false;
  489. uni.navigateTo({
  490. url: `/pages/scanning_drug/scanning_drug?drugsBagId=${data.id}`,
  491. });
  492. },
  493. // 手动查询药品-取消
  494. drugbagCancel() {
  495. this.drugbagModels.disjunctor = false;
  496. },
  497. // 手动查询药品弹窗
  498. showHandViewDrugsbag() {
  499. console.log(1)
  500. this.drugbagModels = {
  501. title: '填写发药单号',
  502. disjunctor: true,
  503. }
  504. },
  505. // 手动查询标本-确认
  506. speOk(data) {
  507. console.log(data);
  508. if (!data.id) {
  509. //没有查询到标本
  510. uni.showModal({
  511. title: '提示',
  512. content: "没有查询到标本!",
  513. showCancel: false,
  514. success: function(res) {
  515. if (res.confirm) {
  516. console.log('用户点击确定');
  517. } else if (res.cancel) {
  518. console.log('用户点击取消');
  519. }
  520. }
  521. });
  522. return;
  523. }
  524. this.speModels.disjunctor = false;
  525. let infoDATA = {
  526. stype: data.stype,
  527. scode: data.scode,
  528. patientName: data.patientName,
  529. sickRoom: data.sickRoom ?
  530. data.sickRoom.dept : "-",
  531. checkDept: data.checkDept ?
  532. data.checkDept.dept : "-",
  533. bedNum: data.bedNum,
  534. };
  535. uni.navigateTo({
  536. url: `../scanning_B/scanning_B?res=${encodeURIComponent(
  537. JSON.stringify({data,status:666,scanCodeSpecimenOrderSign:data.scanCodeSpecimenOrderSign,workOrder:data.workOrderDTO})
  538. )}&infoDATA=${encodeURIComponent(
  539. JSON.stringify(infoDATA)
  540. )}`,
  541. });
  542. },
  543. // 手动查询标本-取消
  544. speCancel() {
  545. this.speModels.disjunctor = false;
  546. },
  547. // 手动查询标本弹窗
  548. showHandViewSpecimen() {
  549. this.speModels = {
  550. title: '填写标本编码',
  551. disjunctor: true,
  552. }
  553. },
  554. // 执行中筛选
  555. execFilter({
  556. detail: {
  557. value
  558. }
  559. }) {
  560. this.index = value;
  561. this.arrayKey = this.array[value].id;
  562. this.zxzData = [];
  563. this.totalNum = -1;
  564. this.idx = 0;
  565. this.selectedLabelSlots = "执行中";
  566. this.executingOrders(0);
  567. },
  568. // 大扫描筛选
  569. execFilterBigScreen({
  570. detail: {
  571. value
  572. }
  573. }) {
  574. this.indexBigScreen = value;
  575. this.arrayKeyBigScreen = this.arrayBigScreen[value].id;
  576. console.log(this.arrayKeyBigScreen);
  577. console.log(this.$refs.bigscreen);
  578. this.$refs.bigscreen.Scanning(this.arrayKeyBigScreen);
  579. },
  580. // 获取科室二维码设置开关
  581. getMenu() {
  582. let menu = uni.getStorageSync("userData").menu;
  583. //判断当前登陆人具体角色 start
  584. let roles = uni.getStorageSync("userData").user.role;
  585. this.pharmacistFlag = roles.some(
  586. (item) => item.rolecode === "pharmacist"
  587. );
  588. //判断当前登陆人具体角色 end
  589. console.log(menu);
  590. this.arrayBigScreen = [];
  591. menu.forEach((item) => {
  592. if (item.link === "wxInspect") {
  593. this.content.push({
  594. text: "检查信息",
  595. });
  596. } else if (item.link === "wxPatient") {
  597. this.content.push({
  598. text: "患者信息",
  599. });
  600. } else if (item.link === "wxPharmacy") {
  601. // 如果是配药师人员,则增加药房
  602. if (this.pharmacistFlag) {
  603. this.content.push({
  604. text: "药房",
  605. });
  606. }
  607. } else if (item.link === "wxCode") {
  608. this.content.push({
  609. text: "二维码设置",
  610. });
  611. } else if (item.link === "wxSpecimenEntry") {
  612. this.content.push({
  613. text: "标本录入",
  614. });
  615. } else if (item.link === "wxDrugsbagEntry") {
  616. this.content.push({
  617. text: "药品录入",
  618. });
  619. } else if (item.link === "wxTakeMedicine") {
  620. this.content.push({
  621. text: "摆药取药",
  622. });
  623. } else if (item.link === "myQrcode") {
  624. this.content.push({
  625. text: "我的二维码",
  626. });
  627. } else if (item.link === "formManagementWechat") {
  628. this.content.push({
  629. text: "查看表单",
  630. });
  631. } else if (item.link === "BIAOBEN") {
  632. this.arrayBigScreen.push({
  633. id: 'BIAOBEN|$|',
  634. name: "标本",
  635. });
  636. } else if (item.link === "YAOPING") {
  637. this.arrayBigScreen.push({
  638. id: 'YAOPING|$|',
  639. name: "药品",
  640. });
  641. } else if (item.link === "HUANZHE") {
  642. this.arrayBigScreen.push({
  643. id: 'HUANZHE|$|',
  644. name: "患者",
  645. });
  646. } else if (item.link === "XIEZHIPING") {
  647. this.arrayBigScreen.push({
  648. id: 'XIEZHIPING|$|',
  649. name: "血制品",
  650. });
  651. } else if (item.link === "KJJD") {
  652. this.arrayBigScreen.push({
  653. id: 'KJJD|$|',
  654. name: "快捷建单",
  655. });
  656. } else if (item.link === "kuaijiejiedan") {
  657. this.arrayBigScreen.push({
  658. id: 'kuaijiejiedan|$|',
  659. name: "快捷接单",
  660. });
  661. } else if (item.link === "quickOrderAcceptanceWx") {
  662. this.content.push({
  663. text: "快捷接单",
  664. });
  665. }
  666. });
  667. },
  668. // 拍照
  669. photograph(data) {
  670. photographTool(data);
  671. },
  672. // 如果不是静配,药配,标本配送,标本轮巡
  673. // 科室签到(小扫描)-拍照
  674. nextDeptOrder_ss(data, accountObj) {
  675. console.log(this.currentCode);
  676. let isKs = 0;
  677. let ids = [];
  678. let id = data.id;
  679. ids.push(id);
  680. let list = {
  681. code: "",
  682. ids: ids,
  683. };
  684. let code = "";
  685. let type = "";
  686. if (this.currentCode) {
  687. let gdStateValue = data.gdState.value; //工单状态value
  688. let associationTypeValue = data.taskType.associationType.value; //关联类型value
  689. // 其他临床服务,并且工单状态是待到达||工单状态待送达
  690. if (
  691. (associationTypeValue == "other" &&
  692. gdStateValue == "4") ||
  693. gdStateValue == "5"
  694. ) {
  695. code = this.currentCode;
  696. type = "orderSign/" + code;
  697. list = {
  698. ids
  699. };
  700. if (accountObj) {
  701. list.handover = [accountObj.accountId];
  702. }
  703. isKs = 1;
  704. }
  705. uni.showLoading({
  706. title: "加载中",
  707. mask: true,
  708. });
  709. post("/workerOrder/" + type, list).then((res) => {
  710. uni.hideLoading();
  711. if (res) {
  712. if (res.status == 200) {
  713. if (
  714. gdStateValue == "4" &&
  715. associationTypeValue == "other"
  716. ) {
  717. uni.navigateTo({
  718. url: `../../pages/scanning_code/scanning_code?type=${associationTypeValue}&type1=${res.type}&id=${data.id}&deptCode=${code}&dept=${res.dept}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}`,
  719. });
  720. }
  721. if (gdStateValue == "5") {
  722. uni.navigateTo({
  723. url: `../../pages/scanning_code/scanning_code?type=${associationTypeValue}&type1=${res.type}&id=${data.id}&deptCode=${code}&dept=${res.dept}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}`,
  724. });
  725. }
  726. } else {
  727. uni.navigateTo({
  728. url: `../../pages/scanning_Result/scanning_Result?type=${
  729. associationTypeValue
  730. }&type1=${res.type}&id=${data.id}&status=600&msg=${
  731. res.msg
  732. }&isKs=${isKs}&model=${encodeURIComponent(
  733. JSON.stringify(res)
  734. )}&qrcode=${this.currentCode}`,
  735. });
  736. }
  737. } else {
  738. uni.navigateTo({
  739. url: `../../pages/scanning_Result/scanning_Result?id=${data.id}&status=600&msg=扫码失败!请扫描正确的二维码!&isKs=${isKs}&qrcode=${this.currentCode}`,
  740. });
  741. }
  742. });
  743. }
  744. },
  745. // 填写交接人账号-确认
  746. hosOk(data) {
  747. console.log(data);
  748. const {
  749. accountName,
  750. account,
  751. accountId
  752. } = data;
  753. if (!accountName && !account) {
  754. //没有填写交接人
  755. uni.showModal({
  756. title: '提示',
  757. content: "请填写交接人账号!",
  758. showCancel: false,
  759. success: function(res) {
  760. if (res.confirm) {
  761. console.log('用户点击确定');
  762. } else if (res.cancel) {
  763. console.log('用户点击取消');
  764. }
  765. }
  766. });
  767. return;
  768. } else if (!accountName && account || accountName && !account) {
  769. //没有填写交接人
  770. uni.showModal({
  771. title: '提示',
  772. content: "请填写正确的交接人账号!",
  773. showCancel: false,
  774. success: function(res) {
  775. if (res.confirm) {
  776. console.log('用户点击确定');
  777. } else if (res.cancel) {
  778. console.log('用户点击取消');
  779. }
  780. }
  781. });
  782. return;
  783. }
  784. this.hosModels.disjunctor = false;
  785. let associationTypeValue = this.currentData.taskType.associationType.value;
  786. console.log(associationTypeValue)
  787. this.uploadToOther(this.currentData, data, 'start');
  788. },
  789. // 填写交接人账号-取消
  790. hosCancel() {
  791. this.hosModels.disjunctor = false;
  792. },
  793. // 填写交接人账号弹窗
  794. showSelectAccount() {
  795. this.hosModels = {
  796. title: '填写交接人账号',
  797. disjunctor: true,
  798. }
  799. },
  800. // 拍照-上传
  801. uploadToOther(data, accountObj, type){
  802. // 其他临床服务拍照签到
  803. console.log(data, 1111);
  804. let id_seimin;
  805. let asTypeValue_seimin;
  806. let gdStateValue_seimin;
  807. if (data.status != 200 && data.status !== undefined) {
  808. id_seimin = data.id;
  809. asTypeValue_seimin = data.type;
  810. gdStateValue_seimin = JSON.parse(data.model).gdstate2; //type改成gdstate
  811. } else {
  812. id_seimin = data.id;
  813. asTypeValue_seimin = data.taskType.associationType.value;
  814. gdStateValue_seimin = data.gdState.value;
  815. }
  816. //#ifdef H5
  817. uni.chooseImage({
  818. count: 1,
  819. sourceType: ['camera'],
  820. success: (chooseImageRes) => {
  821. console.log(chooseImageRes, pathUrl)
  822. const tempFilePaths = chooseImageRes.tempFilePaths;
  823. const tempFiles = chooseImageRes.tempFiles;
  824. let tp = tempFilePaths[0];
  825. uni.showLoading({
  826. mask: true,
  827. title: '加载中'
  828. });
  829. post('/workerOrder/findRecordInfoByOrderId', {
  830. orderId: id_seimin,
  831. gdOperate: 21,
  832. }).then(result => {
  833. console.log(result)
  834. if (result.state == 200) {
  835. uni.getImageInfo({
  836. src: tp,
  837. success: (res) => {
  838. console.log('压缩前', res)
  839. let canvasWidth = res.width //图片原始长宽
  840. let canvasHeight = res.height
  841. let img = new Image()
  842. img.src = res.path
  843. let canvas = document.createElement('canvas');
  844. let ctx = canvas.getContext('2d')
  845. canvas.width = canvasWidth
  846. canvas.height = canvasHeight
  847. ctx.drawImage(img, 0, 0, canvasWidth, canvasHeight)
  848. canvas.toBlob((fileSrc) => {
  849. tp = window.URL.createObjectURL(fileSrc)
  850. console.log('压缩后', tp);
  851. uni.uploadFile({
  852. url: pathUrl + '/common/common/uploadAttachment/'+(type == 'start' ? 'orderStartPhoto' : 'orderEndPhoto')+'/' + id_seimin + '/' + result.recordId,
  853. filePath: tp,
  854. name: 'file',
  855. formData: {
  856. 'filename': tempFiles[0].name ? tempFiles[0].name.split('.')[0] + '.jpg' : tempFiles[
  857. 0].path.split(
  858. /[\\/]/).reverse()[0].split('.')[0] + '.jpg'
  859. },
  860. success: (uploadFileRes) => {
  861. console.log(uploadFileRes, 10086, asTypeValue_seimin);
  862. this.nextDeptOrder_ss(data, accountObj, type);
  863. },
  864. fail: err => {
  865. console.error(err);
  866. uni.hideLoading();
  867. uni.showToast({
  868. icon: 'none',
  869. title: '上传失败',
  870. duration: 2000
  871. });
  872. }
  873. });
  874. }, 'image/jpeg', 0.3)
  875. },
  876. fail: function () {
  877. uni.hideLoading();
  878. uni.showToast({
  879. icon: 'none',
  880. title: '上传失败',
  881. duration: 2000
  882. });
  883. }
  884. })
  885. } else {
  886. uni.hideLoading();
  887. uni.showToast({
  888. icon: "none",
  889. title: result.msg || "接口获取数据失败!",
  890. });
  891. }
  892. })
  893. }
  894. });
  895. //#endif
  896. //#ifdef APP-PLUS
  897. uni.chooseImage({
  898. count: 1,
  899. sourceType: ['camera'],
  900. sizeType: ['compressed'],
  901. success: (chooseImageRes) => {
  902. console.log(chooseImageRes, pathUrl)
  903. const tempFilePaths = chooseImageRes.tempFilePaths;
  904. const tempFiles = chooseImageRes.tempFiles;
  905. let tp = tempFilePaths[0];
  906. uni.showLoading({
  907. mask: true,
  908. title: '加载中'
  909. });
  910. post('/workerOrder/findRecordInfoByOrderId', {
  911. orderId: id_seimin,
  912. gdOperate: 21,
  913. }).then(result => {
  914. console.log(result)
  915. if (result.state == 200) {
  916. uni.compressImage({
  917. src: tp,
  918. quality: 30,
  919. success: (res) => {
  920. console.log('压缩前', res)
  921. tp = res.tempFilePath;
  922. console.log('压缩后', tp);
  923. uni.uploadFile({
  924. url: pathUrl + '/common/common/uploadAttachment/'+(type == 'start' ? 'orderStartPhoto' : 'orderEndPhoto')+'/' + id_seimin + '/' + result.recordId,
  925. filePath: tp,
  926. name: 'file',
  927. formData: {
  928. 'filename': tempFiles[0].name ? tempFiles[0].name.split('.')[0] + '.jpg' : tempFiles[
  929. 0].path.split(
  930. /[\\/]/).reverse()[0].split('.')[0] + '.jpg'
  931. },
  932. success: (uploadFileRes) => {
  933. console.log(uploadFileRes, 10086, asTypeValue_seimin);
  934. this.nextDeptOrder_ss(data, accountObj, type);
  935. },
  936. fail: err => {
  937. console.error(err);
  938. uni.hideLoading();
  939. uni.showToast({
  940. icon: 'none',
  941. title: '上传失败',
  942. duration: 2000
  943. });
  944. }
  945. });
  946. },
  947. fail: function () {
  948. uni.hideLoading();
  949. uni.showToast({
  950. icon: 'none',
  951. title: '上传失败',
  952. duration: 2000
  953. });
  954. }
  955. })
  956. } else {
  957. uni.hideLoading();
  958. uni.showToast({
  959. icon: "none",
  960. title: result.msg || "接口获取数据失败!",
  961. });
  962. }
  963. })
  964. }
  965. });
  966. //#endif
  967. },
  968. // 拍照-其他
  969. async photographToOther(data, type) {
  970. this.currentData = data;
  971. uni.showLoading({
  972. title: "加载中",
  973. mask: true,
  974. });
  975. // 其他临床服务
  976. let result = await post("/dept/scanning", {
  977. content: type === 'start' ? data.startDept.qrcode : data.endDepts[0].qrcode,
  978. taskTypeId: data.taskType.id,
  979. gdState: data.gdState.id,
  980. });
  981. uni.hideLoading();
  982. this.currentCode = result.code;
  983. if (result.state == 200 || result.state == 201) {
  984. uni.showModal({
  985. title: '提示',
  986. content: '请尽量拍摄角度覆盖清洁区域?',
  987. success: (res) => {
  988. if (res.confirm) {
  989. if (result.account) {
  990. this.uploadToOther(data, {
  991. account: result.account,
  992. accountName: result.name,
  993. accountId: result.id,
  994. }, type);
  995. } else {
  996. this.uploadToOther(data, undefined, type);
  997. }
  998. } else if (res.cancel) {
  999. console.log('用户点击取消');
  1000. }
  1001. }
  1002. });
  1003. } else if (result.state == '0000') {
  1004. this.showSelectAccount();
  1005. } else {
  1006. uni.showToast({
  1007. icon: "none",
  1008. title: result.msg || "接口获取数据失败!",
  1009. });
  1010. }
  1011. },
  1012. // 悬浮按钮点击事件
  1013. trigger(e) {
  1014. if (e.item.text === "我的任务") {
  1015. uni.navigateTo({
  1016. url: "../mypage/mypage",
  1017. });
  1018. } else if (e.item.text === "退出登录") {
  1019. // 假登录
  1020. uni.showToast({
  1021. title: "退出成功!",
  1022. });
  1023. let ip = uni.getStorageSync("ip"); //记住域名或ip
  1024. let username = uni.getStorageSync("username"); //记住用户名
  1025. let password = uni.getStorageSync("password"); //记住密码
  1026. let savePasswordTime = uni.getStorageSync("savePasswordTime"); //记住密码的时间戳
  1027. let clientid = uni.getStorageSync("clientid");
  1028. uni.clearStorageSync();
  1029. if (username) {
  1030. uni.setStorageSync("ip", ip); //记住域名或ip
  1031. uni.setStorageSync("username", username); //记住用户名
  1032. uni.setStorageSync("password", password); //记住密码
  1033. uni.setStorageSync("savePasswordTime", savePasswordTime); //记住密码的时间戳
  1034. }
  1035. uni.setStorageSync("clientid", clientid);
  1036. uni.navigateTo({
  1037. url: "../homePage/homePage",
  1038. });
  1039. // 假登录
  1040. deleteIt("/auth/logout2").then((result) => {
  1041. if (result.status == 200) {
  1042. uni.showToast({
  1043. title: "退出成功!",
  1044. });
  1045. let ip = uni.getStorageSync("ip"); //记住域名或ip
  1046. let username = uni.getStorageSync("username"); //记住用户名
  1047. let password = uni.getStorageSync("password"); //记住密码
  1048. let clientid = uni.getStorageSync("clientid");
  1049. uni.clearStorageSync();
  1050. uni.setStorageSync("ip", ip); //记住域名或ip
  1051. uni.setStorageSync("username", username); //记住用户名
  1052. uni.setStorageSync("password", password); //记住密码
  1053. uni.setStorageSync("clientid", clientid);
  1054. uni.navigateTo({
  1055. url: "../homePage/homePage",
  1056. });
  1057. } else {
  1058. uni.showToast({
  1059. icon: "none",
  1060. title: result.msg || "接口获取数据失败!",
  1061. });
  1062. }
  1063. });
  1064. } else if (e.item.text === "药房") {
  1065. uni.navigateTo({
  1066. url: "../pharmacy/pharmacy",
  1067. });
  1068. } else if (e.item.text === "患者信息") {
  1069. uni.navigateTo({
  1070. url: "../patientInformationList/patientInformationList",
  1071. });
  1072. } else if (e.item.text === "负责科室") {
  1073. if (uni.getStorageSync("setDepts")) {
  1074. uni.removeStorageSync("setDepts"); //清空选择的科室,初始化
  1075. }
  1076. let obj = uni.getStorageSync("setDeptConfg");
  1077. uni.navigateTo({
  1078. url: `../setDept/setDept?configName=${obj.configName}&id=${obj.id}&changedept=1`,
  1079. });
  1080. } else if (e.item.text === "检查信息") {
  1081. uni.navigateTo({
  1082. url: "../inspectList/inspectList",
  1083. });
  1084. } else if (e.item.text === "二维码设置") {
  1085. uni.navigateTo({
  1086. url: "../settingCode/settingCode",
  1087. });
  1088. } else if (e.item.text === "标本录入") {
  1089. this.showHandViewSpecimen();
  1090. } else if (e.item.text === "药品录入") {
  1091. this.showHandViewDrugsbag();
  1092. } else if (e.item.text === "摆药取药") {
  1093. this.handleTakeMedicine()
  1094. } else if (e.item.text === "我的二维码") {
  1095. this.myQrcodeHandler()
  1096. } else if (e.item.text === "查看表单") {
  1097. uni.navigateTo({
  1098. url: "../formManagementWechat/formManagementWechat",
  1099. });
  1100. } else if (e.item.text === "快捷接单") {
  1101. uni.navigateTo({
  1102. url: "../quickOrderAcceptanceWx/quickOrderAcceptanceWx",
  1103. });
  1104. }
  1105. },
  1106. // 我的二维码
  1107. myQrcodeHandler(){
  1108. this.showMyQrcodeModel = {
  1109. disjunctor: true,
  1110. };
  1111. },
  1112. closeMyQrcodeModel(){
  1113. this.showMyQrcodeModel.disjunctor = false;
  1114. },
  1115. // 摆药取药
  1116. handleTakeMedicine() {
  1117. if (!this.SMFlag) {
  1118. return;
  1119. }
  1120. this.SMFlag = false;
  1121. SM().then((content) => {
  1122. uni.showLoading({
  1123. title: "加载中",
  1124. mask: true,
  1125. });
  1126. //检验二维码的有效性(扫码前必须验证)
  1127. post("/dept/scanning", {
  1128. content,
  1129. })
  1130. .then((result) => {
  1131. this.currentCode = result.code;
  1132. this.SMFlag = true;
  1133. // 200检测通过,201没有有效期也通过。
  1134. if (result.state == 200 || result.state == 201) {
  1135. uni.hideLoading();
  1136. uni.navigateTo({
  1137. url: `../promptPage/promptPage?code=${result.code}`,
  1138. });
  1139. } else {
  1140. uni.hideLoading();
  1141. uni.showToast({
  1142. icon: "none",
  1143. title: result.msg || "接口获取数据失败!",
  1144. });
  1145. }
  1146. })
  1147. }).catch(err => {
  1148. this.SMFlag = true;
  1149. });
  1150. },
  1151. // 点击tab页切换
  1152. clickHandler(key) {
  1153. this.selectedLabelSlots = key;
  1154. this.idx = 0;
  1155. this.totalNum = -1;
  1156. // this.zxzData = [];
  1157. this.scroll_top = Math.random(); //回到顶部
  1158. if (key === "待接单") {
  1159. this.waitingOrders(0);
  1160. } else if (key === "执行中") {
  1161. this.executingOrders(0);
  1162. }
  1163. },
  1164. // 进入详情页
  1165. itemInfo(workOrder) {
  1166. console.log(workOrder);
  1167. uni.navigateTo({
  1168. url: `../receipt_infopage/receipt_infopage?id=${workOrder.id}&associationTypeValue=${workOrder.taskType.associationType.value}&associationTypeId=${workOrder.taskType.associationType.id}&taskTypeId=${workOrder.taskType.id}`,
  1169. });
  1170. },
  1171. //抢单后知道了
  1172. know() {
  1173. this.models.disjunctor = false;
  1174. this.idx = 0;
  1175. this.totalNum = -1;
  1176. // this.zxzData = [];
  1177. this.executingOrdersGetNum();
  1178. this.waitingOrders(0); //seimin
  1179. this.scroll_top = Math.random(); //回到顶部
  1180. },
  1181. //抢单确定
  1182. ok() {
  1183. this.models.disjunctor = false;
  1184. get("/workerOrder/takeOrder/" + this.qdId.id).then((res) => {
  1185. let msg = "接单失败";
  1186. let icon = "error";
  1187. if (res.status == 200) {
  1188. msg = "接单成功";
  1189. icon = "success";
  1190. }
  1191. this.models = {
  1192. disjunctor: true,
  1193. content: msg,
  1194. icon: icon,
  1195. operate: {
  1196. know: "知道了",
  1197. },
  1198. };
  1199. });
  1200. },
  1201. //抢单取消
  1202. cancel() {
  1203. this.models.disjunctor = false;
  1204. },
  1205. // 抢单
  1206. showAlerts(data) {
  1207. this.qdId = data;
  1208. this.models = {
  1209. disjunctor: true,
  1210. title: "提示",
  1211. content: "是否确定接单?",
  1212. icon: "warn",
  1213. operate: {
  1214. ok: "确定",
  1215. cancel: "取消",
  1216. },
  1217. };
  1218. },
  1219. //执行中列表数据获取
  1220. executingOrders(idx) {
  1221. console.log(this.zxzData.length, this.totalNum);
  1222. if (this.zxzData.length == this.totalNum) {
  1223. uni.showToast({
  1224. icon: "none",
  1225. title: "没有更多数据了!",
  1226. });
  1227. this.freshing = true;
  1228. return;
  1229. }
  1230. let data = {
  1231. idx,
  1232. sum: 20,
  1233. };
  1234. if (this.arrayKey) {
  1235. data.keyWord = this.arrayKey;
  1236. } else {
  1237. delete data.keyWord;
  1238. }
  1239. uni.showLoading({
  1240. title: "加载中",
  1241. mask: true,
  1242. });
  1243. post("/workerOrder/executingOrders", data).then((res) => {
  1244. uni.hideLoading();
  1245. if (res.status == 200) {
  1246. this.triggered = false;
  1247. this.freshing = true;
  1248. this.totalNum = res.data.resultCount;
  1249. if (idx === 0) {
  1250. this.zxzData = res.data.data;
  1251. } else {
  1252. this.zxzData.push(...res.data.data);
  1253. }
  1254. this.tabs[1].num = res.data.resultCount;
  1255. } else {
  1256. uni.showToast({
  1257. icon: "none",
  1258. title: res.msg || "接口获取数据失败!",
  1259. });
  1260. }
  1261. });
  1262. },
  1263. //待抢单列表数据获取
  1264. waitingOrders(idx) {
  1265. if (this.zxzData.length == this.totalNum) {
  1266. uni.showToast({
  1267. icon: "none",
  1268. title: "没有更多数据了!",
  1269. });
  1270. this.freshing = true;
  1271. return;
  1272. }
  1273. let data = {
  1274. idx,
  1275. sum: 20,
  1276. };
  1277. uni.showLoading({
  1278. title: "加载中",
  1279. mask: true,
  1280. });
  1281. // 请求列表数据
  1282. post("/workerOrder/waitingOrders", data).then((res) => {
  1283. uni.hideLoading();
  1284. if (res.status == 200) {
  1285. this.triggered = false;
  1286. this.freshing = true;
  1287. this.totalNum = res.data.resultCount;
  1288. if (idx === 0) {
  1289. this.zxzData = res.data.data;
  1290. } else {
  1291. this.zxzData.push(...res.data.data);
  1292. }
  1293. this.tabs[0].num = res.data.resultCount;
  1294. } else {
  1295. uni.showToast({
  1296. icon: "none",
  1297. title: res.msg || "接口获取数据失败!",
  1298. });
  1299. }
  1300. });
  1301. },
  1302. //刷新
  1303. refresherrefresh() {
  1304. if (this.triggered) {
  1305. return;
  1306. }
  1307. this.triggered = true;
  1308. this.idx = 0;
  1309. this.totalNum = -1;
  1310. if (this.selectedLabelSlots == "待接单") {
  1311. this.waitingOrders(0);
  1312. } else if (this.selectedLabelSlots == "执行中") {
  1313. this.executingOrders(0);
  1314. }
  1315. },
  1316. // 滚动
  1317. scroll(e) {
  1318. if (e.detail.scrollTop < 20) {
  1319. this.scroll_refresher_enabled = true;
  1320. } else {
  1321. this.scroll_refresher_enabled = false;
  1322. }
  1323. },
  1324. // 下拉刷新复位
  1325. refresherrestore() {
  1326. this.triggered = false;
  1327. console.log("下拉刷新复位");
  1328. },
  1329. //下拉刷新中止
  1330. refresherabort() {
  1331. this.triggered = false;
  1332. console.log("下拉刷新中止");
  1333. },
  1334. //分页,上拉加载
  1335. scrolltolower() {
  1336. if (this.freshing) {
  1337. this.freshing = false;
  1338. if (this.selectedLabelSlots == "待接单") {
  1339. this.waitingOrders(++this.idx);
  1340. } else if (this.selectedLabelSlots == "执行中") {
  1341. this.executingOrders(++this.idx);
  1342. }
  1343. }
  1344. },
  1345. // 执行中获取数字
  1346. executingOrdersGetNum() {
  1347. let data = {
  1348. idx: 0,
  1349. sum: 20,
  1350. };
  1351. if (this.arrayKey) {
  1352. data.keyWord = this.arrayKey;
  1353. } else {
  1354. delete data.keyWord;
  1355. }
  1356. post("/workerOrder/executingOrders", data).then((res) => {
  1357. if (res.status == 200) {
  1358. this.tabs[1].num = res.data.resultCount;
  1359. } else {
  1360. uni.showToast({
  1361. icon: "none",
  1362. title: res.msg || "接口获取数据失败!",
  1363. });
  1364. }
  1365. });
  1366. },
  1367. // 待接单获取数字
  1368. waitingOrdersGetNum() {
  1369. let data = {
  1370. idx: 0,
  1371. sum: 20,
  1372. };
  1373. post("/workerOrder/waitingOrders", data).then((res) => {
  1374. if (res.status == 200) {
  1375. this.tabs[0].num = res.data.resultCount;
  1376. } else {
  1377. uni.showToast({
  1378. icon: "none",
  1379. title: res.msg || "接口获取数据失败!",
  1380. });
  1381. }
  1382. });
  1383. },
  1384. // 阻止浏览器滑动
  1385. stop(e) {
  1386. e.preventDefault();
  1387. },
  1388. },
  1389. onLoad() {
  1390. // 获取菜单权限
  1391. this.getMenu();
  1392. post("/auth/getUserWorkDept", {}).then((ress) => {
  1393. if (ress.status == 200) {
  1394. let userId = uni.getStorageSync("userData").user.id;
  1395. let groupManager = ress.settings && ress.settings.groupManager; //当前工作组合选择的组
  1396. let workType = ress.settings ? ress.settings.workType : -1; //1是综合,2是自主
  1397. let ruleType = ress.settings ? ress.settings.ruleType : -1; //3是科室绑定人员,4是科室绑定分组,2是绑定分组
  1398. if (workType == 2 && (ruleType == 3 || (ruleType == 4 && userId == groupManager.manager))) {
  1399. //自选排班,科室绑定分组,当前登陆人是组长
  1400. this.content.unshift({
  1401. text: "负责科室",
  1402. });
  1403. }
  1404. }
  1405. });
  1406. // let setDeptConfg = uni.getStorageSync("setDeptConfg");
  1407. // let manager = uni.getStorageSync("manager");
  1408. // let userId = uni.getStorageSync("userData").user.id;
  1409. // console.log(setDeptConfg, manager, userId);
  1410. // if (
  1411. // setDeptConfg.workSchemeType == 2 &&
  1412. // (setDeptConfg.ruleType == 3 ||
  1413. // (setDeptConfg.ruleType == 4 && userId == manager))
  1414. // ) {
  1415. // //自选排班,科室绑定人员 || 科室绑定分组 && 组长是当前登陆人
  1416. // this.content.unshift({
  1417. // text: "负责科室",
  1418. // });
  1419. // }
  1420. // #ifdef APP-PLUS
  1421. // this.content.push({
  1422. // text: "退出登录",
  1423. // });
  1424. // #endif
  1425. this.selectedLabelSlots = "执行中";
  1426. this.waitingOrdersGetNum();
  1427. this.executingOrders(0);
  1428. // #ifdef APP-PLUS
  1429. webHandle("no", "app");
  1430. // #endif
  1431. // #ifdef H5
  1432. webHandle("no", "wx");
  1433. // #endif
  1434. },
  1435. onShow() {
  1436. this.SMFlag = true;
  1437. // #ifdef H5
  1438. document.body.addEventListener("touchmove", this.stop, {
  1439. passive: false,
  1440. });
  1441. // #endif
  1442. },
  1443. onHide() {
  1444. // #ifdef H5
  1445. document.body.removeEventListener("touchmove", this.stop, {
  1446. passive: false,
  1447. });
  1448. // #endif
  1449. },
  1450. };
  1451. </script>
  1452. <style lang="less">
  1453. .Receiptpage {
  1454. width: 100%;
  1455. height: 100%;
  1456. position: relative;
  1457. .more {
  1458. position: absolute;
  1459. right: 20rpx;
  1460. width: 40rpx;
  1461. height: 4rpx;
  1462. border-top: 2px solid #49b856;
  1463. border-bottom: 2px solid #49b856;
  1464. background-color: #49b856;
  1465. padding: 5px 0;
  1466. background-clip: content-box;
  1467. z-index: 9999;
  1468. top: 50%;
  1469. transform: translateY(-50%);
  1470. }
  1471. .more_picker {
  1472. position: absolute;
  1473. right: 0;
  1474. height: 100%;
  1475. opacity: 0;
  1476. z-index: 9999;
  1477. }
  1478. .bigScreenWrap{
  1479. position: fixed;
  1480. left: 0;
  1481. right: 0;
  1482. bottom: 30rpx;
  1483. z-index: 999;
  1484. height: 88rpx;
  1485. }
  1486. .red {
  1487. color: red !important;
  1488. font-weight: bold !important;
  1489. }
  1490. .page_tab {
  1491. width: 100%;
  1492. height: 96rpx;
  1493. display: flex;
  1494. position: fixed;
  1495. left: 0;
  1496. top: 0;
  1497. z-index: 999;
  1498. .page_tab_bar {
  1499. flex: 1;
  1500. font-size: 36rpx;
  1501. background: #fff;
  1502. display: flex;
  1503. justify-content: center;
  1504. align-items: center;
  1505. position: relative;
  1506. &:after {
  1507. content: "";
  1508. position: absolute;
  1509. left: 0;
  1510. bottom: 0;
  1511. height: 2rpx;
  1512. width: 100%;
  1513. background-color: transparent;
  1514. }
  1515. .tab_num {
  1516. color: #ff3b53;
  1517. margin-left: 8rpx;
  1518. }
  1519. &.active {
  1520. color: #49b856;
  1521. &:after {
  1522. background-color: #49b856;
  1523. }
  1524. }
  1525. }
  1526. }
  1527. .zwsj {
  1528. position: absolute;
  1529. left: 50%;
  1530. top: 180rpx;
  1531. transform: translateX(-50%);
  1532. .zwsj-img {
  1533. width: 560rpx;
  1534. }
  1535. .zwsj-txt {
  1536. font-size: 36rpx;
  1537. font-weight: 700;
  1538. margin-top: 20rpx;
  1539. text-align: center;
  1540. }
  1541. }
  1542. .page_items {
  1543. height: calc(100vh - 214rpx);
  1544. padding: 0 20rpx;
  1545. // padding-bottom: 88rpx;
  1546. padding-top: 96rpx;
  1547. .page_items_scroll {
  1548. height: 100%;
  1549. .page_item_wrap {
  1550. position: relative;
  1551. margin-bottom: 32rpx;
  1552. .page_item {
  1553. margin-bottom: 16rpx;
  1554. // min-height: 356rpx;
  1555. background: #fff;
  1556. border-radius: 8rpx;
  1557. overflow: hidden;
  1558. border: 2rpx solid #e5e9ed;
  1559. .L {
  1560. width: 40rpx;
  1561. height: 40rpx;
  1562. border-radius: 50%;
  1563. background: #f9fafb;
  1564. position: absolute;
  1565. left: -24rpx;
  1566. top: 68rpx;
  1567. border: 2rpx solid #e5e9ed;
  1568. }
  1569. .R {
  1570. width: 40rpx;
  1571. height: 40rpx;
  1572. border-radius: 50%;
  1573. background: #f9fafb;
  1574. position: absolute;
  1575. float: right;
  1576. right: -24rpx;
  1577. top: 68rpx;
  1578. border: 2rpx solid #e5e9ed;
  1579. }
  1580. .starting {
  1581. width: 40rpx;
  1582. height: 40rpx;
  1583. color: #fff;
  1584. background: #49b856;
  1585. display: inline-block;
  1586. border-radius: 50%;
  1587. text-align: center;
  1588. line-height: 40rpx;
  1589. font-size: 28rpx;
  1590. }
  1591. .End {
  1592. width: 40rpx;
  1593. height: 40rpx;
  1594. color: #fff;
  1595. background: #39b199;
  1596. display: inline-block;
  1597. border-radius: 50%;
  1598. text-align: center;
  1599. line-height: 40rpx;
  1600. font-size: 28rpx;
  1601. }
  1602. .page_item_top {
  1603. height: 86rpx;
  1604. border-bottom: 2rpx dashed #e5e9ed;
  1605. padding: 0 16rpx;
  1606. .page_item_top_L {
  1607. height: 100%;
  1608. float: left;
  1609. line-height: 88rpx;
  1610. display: flex;
  1611. align-items: center;
  1612. .emergencys {
  1613. background: #ff3b53 !important;
  1614. width: 124rpx !important;
  1615. }
  1616. .emergency {
  1617. background: #ff3b53 !important;
  1618. }
  1619. .emergency1 {
  1620. background: #49b856 !important;
  1621. }
  1622. .page_item_cont_start {
  1623. text-align: center;
  1624. height: 44rpx;
  1625. width: 104rpx;
  1626. line-height: 44rpx;
  1627. border-radius: 8rpx;
  1628. background: #49b856;
  1629. color: #fff;
  1630. .page_item_cont_start-img {
  1631. width: 22rpx;
  1632. position: relative;
  1633. top: 6rpx;
  1634. margin-right: 8rpx;
  1635. }
  1636. }
  1637. .L_iocn {
  1638. display: inline-block;
  1639. width: 44rpx;
  1640. height: 44rpx;
  1641. line-height: 42rpx;
  1642. border-radius: 100rpx;
  1643. color: #6cc076;
  1644. font-size: 32rpx;
  1645. border: 4rpx solid #6cc076;
  1646. background: #f0f6ed;
  1647. text-align: center;
  1648. margin-right: 8rpx;
  1649. }
  1650. .L_time {
  1651. color: #6cc076;
  1652. font-size: 32rpx;
  1653. }
  1654. .L_text {
  1655. font-size: 32rpx;
  1656. }
  1657. }
  1658. .page_item_top_R {
  1659. height: 100%;
  1660. float: right;
  1661. line-height: 88rpx;
  1662. font-size: 32rpx;
  1663. &.type {
  1664. margin-right: 32rpx;
  1665. color: red;
  1666. max-width: 260rpx;
  1667. white-space: nowrap;
  1668. text-overflow: ellipsis;
  1669. overflow: hidden;
  1670. }
  1671. .text_big{
  1672. font-weight: bold;
  1673. }
  1674. }
  1675. }
  1676. .page_item_cont {
  1677. min-height: 180rpx;
  1678. padding: 0 16rpx;
  1679. text-align: left;
  1680. position: relative;
  1681. display: flex;
  1682. flex-direction: column;
  1683. justify-content: space-between;
  1684. .text_big {
  1685. font-size: 32rpx;
  1686. margin-left: 10rpx;
  1687. font-weight: 700;
  1688. }
  1689. .line {
  1690. height: 100%;
  1691. width: 2rpx;
  1692. border-left: 2rpx solid #e5e9ed;
  1693. position: absolute;
  1694. // top: 70rpx;
  1695. top: 50%;
  1696. left: 20rpx;
  1697. transform: translateY(-50%);
  1698. }
  1699. .lines {
  1700. height: 40%;
  1701. width: 2rpx;
  1702. border-left: 2rpx solid #e5e9ed;
  1703. position: absolute;
  1704. top: 23%;
  1705. left: 36rpx;
  1706. }
  1707. .emergencys {
  1708. background: #ff3b53 !important;
  1709. width: 124rpx !important;
  1710. }
  1711. .emergency {
  1712. background: #ff3b53 !important;
  1713. }
  1714. .emergency1 {
  1715. background: #49b856 !important;
  1716. }
  1717. .page_item_cont_T {
  1718. // min-height: 80rpx;
  1719. // max-height: 324rpx;
  1720. font-size: 28rpx;
  1721. margin-top: 16rpx;
  1722. display: flex;
  1723. justify-content: space-between;
  1724. .page_item_cont_title {
  1725. height: 100%;
  1726. // float: left;
  1727. }
  1728. .page_item_cont_start {
  1729. text-align: center;
  1730. // float: right;
  1731. height: 44rpx;
  1732. width: 104rpx;
  1733. line-height: 44rpx;
  1734. border-radius: 8rpx;
  1735. background: #49b856;
  1736. color: #fff;
  1737. .page_item_cont_start-img {
  1738. width: 22rpx;
  1739. position: relative;
  1740. top: 6rpx;
  1741. margin-right: 8rpx;
  1742. }
  1743. }
  1744. }
  1745. .page_item_conts {
  1746. min-height: 30rpx;
  1747. color: rgb(102, 102, 102);
  1748. padding-left: 50rpx;
  1749. font-size: 28rpx;
  1750. margin: 16rpx 0;
  1751. position: relative;
  1752. view:not(.line) {
  1753. line-height: 1.2;
  1754. }
  1755. text {
  1756. color: #49b856;
  1757. }
  1758. }
  1759. .page_item_cont_B {
  1760. // padding-top: 20rpx;
  1761. font-size: 28rpx;
  1762. // overflow: hidden;
  1763. margin-bottom: 16rpx;
  1764. .page_item_cont_title {
  1765. height: 100%;
  1766. float: left;
  1767. }
  1768. }
  1769. }
  1770. .page_item_btn_wrap {
  1771. display: flex;
  1772. justify-content: space-between;
  1773. .page_item_btn {
  1774. height: 88rpx;
  1775. flex: 1;
  1776. margin-left: 1%;
  1777. margin-right: 1%;
  1778. background-image: linear-gradient(to right, #72c172, #3bb197);
  1779. border-radius: 8rpx;
  1780. line-height: 88rpx;
  1781. color: #fff;
  1782. font-size: 36rpx;
  1783. font-weight: 700;
  1784. text-align: center;
  1785. }
  1786. }
  1787. .page_item_btn {
  1788. height: 88rpx;
  1789. background-image: linear-gradient(to right, #72c172, #3bb197);
  1790. border-radius: 8rpx;
  1791. line-height: 88rpx;
  1792. color: #fff;
  1793. font-size: 36rpx;
  1794. font-weight: 700;
  1795. text-align: center;
  1796. }
  1797. }
  1798. .L-l {
  1799. width: 2rpx;
  1800. height: 40rpx;
  1801. background: #f9fafb;
  1802. position: absolute;
  1803. left: 20rpx;
  1804. top: 72rpx;
  1805. display: none;
  1806. }
  1807. .R-l {
  1808. width: 2rpx;
  1809. height: 40rpx;
  1810. background: #f9fafb;
  1811. position: absolute;
  1812. right: 20rpx;
  1813. top: 72rpx;
  1814. display: none;
  1815. }
  1816. }
  1817. }
  1818. }
  1819. .text {
  1820. font-size: 36rpx;
  1821. }
  1822. .wt_icon {
  1823. font-size: 40rpx;
  1824. }
  1825. }
  1826. </style>