receiptpage.vue 65 KB

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