receiptpage.vue 65 KB

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