receiptpage.vue 64 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866
  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" v-if="arrayBigScreen.length"></view>
  286. <picker class="more_picker" @click.stop @change="execFilterBigScreen($event)" :value="indexBigScreen"
  287. :range="arrayBigScreen" range-key="name" v-if="arrayBigScreen.length">
  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 === "formManagementWechat") {
  621. this.content.push({
  622. text: "查看表单",
  623. });
  624. } else if (item.link === "BIAOBEN") {
  625. this.arrayBigScreen.push({
  626. id: 'BIAOBEN|$|',
  627. name: "标本",
  628. });
  629. } else if (item.link === "YAOPING") {
  630. this.arrayBigScreen.push({
  631. id: 'YAOPING|$|',
  632. name: "药品",
  633. });
  634. } else if (item.link === "HUANZHE") {
  635. this.arrayBigScreen.push({
  636. id: 'HUANZHE|$|',
  637. name: "患者",
  638. });
  639. } else if (item.link === "XIEZHIPING") {
  640. this.arrayBigScreen.push({
  641. id: 'XIEZHIPING|$|',
  642. name: "血制品",
  643. });
  644. } else if (item.link === "KJJD") {
  645. this.arrayBigScreen.push({
  646. id: 'KJJD|$|',
  647. name: "快捷建单",
  648. });
  649. }
  650. });
  651. },
  652. // 拍照
  653. photograph(data) {
  654. photographTool(data);
  655. },
  656. // 如果不是静配,药配,标本配送,标本轮巡
  657. // 科室签到(小扫描)-拍照
  658. nextDeptOrder_ss(data, accountObj) {
  659. console.log(this.currentCode);
  660. let isKs = 0;
  661. let ids = [];
  662. let id = data.id;
  663. ids.push(id);
  664. let list = {
  665. code: "",
  666. ids: ids,
  667. };
  668. let code = "";
  669. let type = "";
  670. if (this.currentCode) {
  671. let gdStateValue = data.gdState.value; //工单状态value
  672. let associationTypeValue = data.taskType.associationType.value; //关联类型value
  673. // 其他临床服务,并且工单状态是待到达||工单状态待送达
  674. if (
  675. (associationTypeValue == "other" &&
  676. gdStateValue == "4") ||
  677. gdStateValue == "5"
  678. ) {
  679. code = this.currentCode;
  680. type = "orderSign/" + code;
  681. list = {
  682. ids
  683. };
  684. if (accountObj) {
  685. list.handover = [accountObj.accountId];
  686. }
  687. isKs = 1;
  688. }
  689. uni.showLoading({
  690. title: "加载中",
  691. mask: true,
  692. });
  693. post("/workerOrder/" + type, list).then((res) => {
  694. uni.hideLoading();
  695. if (res) {
  696. if (res.status == 200) {
  697. if (
  698. gdStateValue == "4" &&
  699. associationTypeValue == "other"
  700. ) {
  701. uni.navigateTo({
  702. url: `../../pages/scanning_code/scanning_code?type=${associationTypeValue}&type1=${res.type}&id=${data.id}&deptCode=${code}&dept=${res.dept}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}`,
  703. });
  704. }
  705. if (gdStateValue == "5") {
  706. uni.navigateTo({
  707. url: `../../pages/scanning_code/scanning_code?type=${associationTypeValue}&type1=${res.type}&id=${data.id}&deptCode=${code}&dept=${res.dept}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}`,
  708. });
  709. }
  710. } else {
  711. uni.navigateTo({
  712. url: `../../pages/scanning_Result/scanning_Result?type=${
  713. associationTypeValue
  714. }&type1=${res.type}&id=${data.id}&status=600&msg=${
  715. res.msg
  716. }&isKs=${isKs}&model=${encodeURIComponent(
  717. JSON.stringify(res)
  718. )}&qrcode=${this.currentCode}`,
  719. });
  720. }
  721. } else {
  722. uni.navigateTo({
  723. url: `../../pages/scanning_Result/scanning_Result?id=${data.id}&status=600&msg=扫码失败!请扫描正确的二维码!&isKs=${isKs}&qrcode=${this.currentCode}`,
  724. });
  725. }
  726. });
  727. }
  728. },
  729. // 填写交接人账号-确认
  730. hosOk(data) {
  731. console.log(data);
  732. const {
  733. accountName,
  734. account,
  735. accountId
  736. } = data;
  737. if (!accountName && !account) {
  738. //没有填写交接人
  739. uni.showModal({
  740. title: '提示',
  741. content: "请填写交接人账号!",
  742. showCancel: false,
  743. success: function(res) {
  744. if (res.confirm) {
  745. console.log('用户点击确定');
  746. } else if (res.cancel) {
  747. console.log('用户点击取消');
  748. }
  749. }
  750. });
  751. return;
  752. } else if (!accountName && account || accountName && !account) {
  753. //没有填写交接人
  754. uni.showModal({
  755. title: '提示',
  756. content: "请填写正确的交接人账号!",
  757. showCancel: false,
  758. success: function(res) {
  759. if (res.confirm) {
  760. console.log('用户点击确定');
  761. } else if (res.cancel) {
  762. console.log('用户点击取消');
  763. }
  764. }
  765. });
  766. return;
  767. }
  768. this.hosModels.disjunctor = false;
  769. let associationTypeValue = this.currentData.taskType.associationType.value;
  770. console.log(associationTypeValue)
  771. this.uploadToOther(this.currentData, data, 'start');
  772. },
  773. // 填写交接人账号-取消
  774. hosCancel() {
  775. this.hosModels.disjunctor = false;
  776. },
  777. // 填写交接人账号弹窗
  778. showSelectAccount() {
  779. this.hosModels = {
  780. title: '填写交接人账号',
  781. disjunctor: true,
  782. }
  783. },
  784. // 拍照-上传
  785. uploadToOther(data, accountObj, type){
  786. // 其他临床服务拍照签到
  787. console.log(data, 1111);
  788. let id_seimin;
  789. let asTypeValue_seimin;
  790. let gdStateValue_seimin;
  791. if (data.status != 200 && data.status !== undefined) {
  792. id_seimin = data.id;
  793. asTypeValue_seimin = data.type;
  794. gdStateValue_seimin = JSON.parse(data.model).gdstate2; //type改成gdstate
  795. } else {
  796. id_seimin = data.id;
  797. asTypeValue_seimin = data.taskType.associationType.value;
  798. gdStateValue_seimin = data.gdState.value;
  799. }
  800. //#ifdef H5
  801. uni.chooseImage({
  802. count: 1,
  803. sourceType: ['camera'],
  804. success: (chooseImageRes) => {
  805. console.log(chooseImageRes, pathUrl)
  806. const tempFilePaths = chooseImageRes.tempFilePaths;
  807. const tempFiles = chooseImageRes.tempFiles;
  808. let tp = tempFilePaths[0];
  809. uni.showLoading({
  810. mask: true,
  811. title: '加载中'
  812. });
  813. post('/workerOrder/findRecordInfoByOrderId', {
  814. orderId: id_seimin,
  815. gdOperate: 21,
  816. }).then(result => {
  817. console.log(result)
  818. if (result.state == 200) {
  819. uni.getImageInfo({
  820. src: tp,
  821. success: (res) => {
  822. console.log('压缩前', res)
  823. let canvasWidth = res.width //图片原始长宽
  824. let canvasHeight = res.height
  825. let img = new Image()
  826. img.src = res.path
  827. let canvas = document.createElement('canvas');
  828. let ctx = canvas.getContext('2d')
  829. canvas.width = canvasWidth
  830. canvas.height = canvasHeight
  831. ctx.drawImage(img, 0, 0, canvasWidth, canvasHeight)
  832. canvas.toBlob((fileSrc) => {
  833. tp = window.URL.createObjectURL(fileSrc)
  834. console.log('压缩后', tp);
  835. uni.uploadFile({
  836. url: pathUrl + '/common/common/uploadAttachment/'+(type == 'start' ? 'orderStartPhoto' : 'orderEndPhoto')+'/' + id_seimin + '/' + result.recordId,
  837. filePath: tp,
  838. name: 'file',
  839. formData: {
  840. 'filename': tempFiles[0].name ? tempFiles[0].name.split('.')[0] + '.jpg' : tempFiles[
  841. 0].path.split(
  842. /[\\/]/).reverse()[0].split('.')[0] + '.jpg'
  843. },
  844. success: (uploadFileRes) => {
  845. console.log(uploadFileRes, 10086, asTypeValue_seimin);
  846. this.nextDeptOrder_ss(data, accountObj, type);
  847. },
  848. fail: err => {
  849. console.error(err);
  850. uni.hideLoading();
  851. uni.showToast({
  852. icon: 'none',
  853. title: '上传失败',
  854. duration: 2000
  855. });
  856. }
  857. });
  858. }, 'image/jpeg', 0.3)
  859. },
  860. fail: function () {
  861. uni.hideLoading();
  862. uni.showToast({
  863. icon: 'none',
  864. title: '上传失败',
  865. duration: 2000
  866. });
  867. }
  868. })
  869. } else {
  870. uni.hideLoading();
  871. uni.showToast({
  872. icon: "none",
  873. title: "请求失败!",
  874. });
  875. }
  876. })
  877. }
  878. });
  879. //#endif
  880. //#ifdef APP-PLUS
  881. uni.chooseImage({
  882. count: 1,
  883. sourceType: ['camera'],
  884. sizeType: ['compressed'],
  885. success: (chooseImageRes) => {
  886. console.log(chooseImageRes, pathUrl)
  887. const tempFilePaths = chooseImageRes.tempFilePaths;
  888. const tempFiles = chooseImageRes.tempFiles;
  889. let tp = tempFilePaths[0];
  890. uni.showLoading({
  891. mask: true,
  892. title: '加载中'
  893. });
  894. post('/workerOrder/findRecordInfoByOrderId', {
  895. orderId: id_seimin,
  896. gdOperate: 21,
  897. }).then(result => {
  898. console.log(result)
  899. if (result.state == 200) {
  900. uni.compressImage({
  901. src: tp,
  902. quality: 30,
  903. success: (res) => {
  904. console.log('压缩前', res)
  905. tp = res.tempFilePath;
  906. console.log('压缩后', tp);
  907. uni.uploadFile({
  908. url: pathUrl + '/common/common/uploadAttachment/'+(type == 'start' ? 'orderStartPhoto' : 'orderEndPhoto')+'/' + id_seimin + '/' + result.recordId,
  909. filePath: tp,
  910. name: 'file',
  911. formData: {
  912. 'filename': tempFiles[0].name ? tempFiles[0].name.split('.')[0] + '.jpg' : tempFiles[
  913. 0].path.split(
  914. /[\\/]/).reverse()[0].split('.')[0] + '.jpg'
  915. },
  916. success: (uploadFileRes) => {
  917. console.log(uploadFileRes, 10086, asTypeValue_seimin);
  918. this.nextDeptOrder_ss(data, accountObj, type);
  919. },
  920. fail: err => {
  921. console.error(err);
  922. uni.hideLoading();
  923. uni.showToast({
  924. icon: 'none',
  925. title: '上传失败',
  926. duration: 2000
  927. });
  928. }
  929. });
  930. },
  931. fail: function () {
  932. uni.hideLoading();
  933. uni.showToast({
  934. icon: 'none',
  935. title: '上传失败',
  936. duration: 2000
  937. });
  938. }
  939. })
  940. } else {
  941. uni.hideLoading();
  942. uni.showToast({
  943. icon: "none",
  944. title: "请求失败!",
  945. });
  946. }
  947. })
  948. }
  949. });
  950. //#endif
  951. },
  952. // 拍照-其他
  953. async photographToOther(data, type) {
  954. this.currentData = data;
  955. uni.showLoading({
  956. title: "加载中",
  957. mask: true,
  958. });
  959. // 其他临床服务
  960. let result = await post("/dept/scanning", {
  961. content: type === 'start' ? data.startDept.qrcode : data.endDepts[0].qrcode,
  962. taskTypeId: data.taskType.id,
  963. gdState: data.gdState.id,
  964. });
  965. uni.hideLoading();
  966. this.currentCode = result.code;
  967. if (result.state == 200 || result.state == 201) {
  968. uni.showModal({
  969. title: '提示',
  970. content: '请尽量拍摄角度覆盖清洁区域?',
  971. success: (res) => {
  972. if (res.confirm) {
  973. if (result.account) {
  974. this.uploadToOther(data, {
  975. account: result.account,
  976. accountName: result.name,
  977. accountId: result.id,
  978. }, type);
  979. } else {
  980. this.uploadToOther(data, undefined, type);
  981. }
  982. } else if (res.cancel) {
  983. console.log('用户点击取消');
  984. }
  985. }
  986. });
  987. } else if (result.state == '0000') {
  988. this.showSelectAccount();
  989. } else {
  990. uni.showToast({
  991. icon: "none",
  992. title: "请求失败!",
  993. });
  994. }
  995. },
  996. // 悬浮按钮点击事件
  997. trigger(e) {
  998. if (e.item.text === "我的任务") {
  999. uni.navigateTo({
  1000. url: "../mypage/mypage",
  1001. });
  1002. } else if (e.item.text === "退出登录") {
  1003. // 假登录
  1004. uni.showToast({
  1005. title: "退出成功!",
  1006. });
  1007. let ip = uni.getStorageSync("ip"); //记住域名或ip
  1008. let username = uni.getStorageSync("username"); //记住用户名
  1009. let password = uni.getStorageSync("password"); //记住密码
  1010. let savePasswordTime = uni.getStorageSync("savePasswordTime"); //记住密码的时间戳
  1011. let clientid = uni.getStorageSync("clientid");
  1012. uni.clearStorageSync();
  1013. if (username) {
  1014. uni.setStorageSync("ip", ip); //记住域名或ip
  1015. uni.setStorageSync("username", username); //记住用户名
  1016. uni.setStorageSync("password", password); //记住密码
  1017. uni.setStorageSync("savePasswordTime", savePasswordTime); //记住密码的时间戳
  1018. }
  1019. uni.setStorageSync("clientid", clientid);
  1020. uni.navigateTo({
  1021. url: "../homePage/homePage",
  1022. });
  1023. // 假登录
  1024. deleteIt("/auth/logout2").then((result) => {
  1025. if (result.status == 200) {
  1026. uni.showToast({
  1027. title: "退出成功!",
  1028. });
  1029. let ip = uni.getStorageSync("ip"); //记住域名或ip
  1030. let username = uni.getStorageSync("username"); //记住用户名
  1031. let password = uni.getStorageSync("password"); //记住密码
  1032. let clientid = uni.getStorageSync("clientid");
  1033. uni.clearStorageSync();
  1034. uni.setStorageSync("ip", ip); //记住域名或ip
  1035. uni.setStorageSync("username", username); //记住用户名
  1036. uni.setStorageSync("password", password); //记住密码
  1037. uni.setStorageSync("clientid", clientid);
  1038. uni.navigateTo({
  1039. url: "../homePage/homePage",
  1040. });
  1041. } else {
  1042. uni.showToast({
  1043. icon: "none",
  1044. title: "请求失败!",
  1045. });
  1046. }
  1047. });
  1048. } else if (e.item.text === "药房") {
  1049. uni.navigateTo({
  1050. url: "../pharmacy/pharmacy",
  1051. });
  1052. } else if (e.item.text === "患者信息") {
  1053. uni.navigateTo({
  1054. url: "../patientInformationList/patientInformationList",
  1055. });
  1056. } else if (e.item.text === "负责科室") {
  1057. if (uni.getStorageSync("setDepts")) {
  1058. uni.removeStorageSync("setDepts"); //清空选择的科室,初始化
  1059. }
  1060. let obj = uni.getStorageSync("setDeptConfg");
  1061. uni.navigateTo({
  1062. url: `../setDept/setDept?configName=${obj.configName}&id=${obj.id}&changedept=1`,
  1063. });
  1064. } else if (e.item.text === "检查信息") {
  1065. uni.navigateTo({
  1066. url: "../inspectList/inspectList",
  1067. });
  1068. } else if (e.item.text === "二维码设置") {
  1069. uni.navigateTo({
  1070. url: "../settingCode/settingCode",
  1071. });
  1072. } else if (e.item.text === "标本录入") {
  1073. this.showHandViewSpecimen();
  1074. } else if (e.item.text === "药品录入") {
  1075. this.showHandViewDrugsbag();
  1076. } else if (e.item.text === "摆药取药") {
  1077. this.handleTakeMedicine()
  1078. } else if (e.item.text === "我的二维码") {
  1079. this.myQrcodeHandler()
  1080. } else if (e.item.text === "查看表单") {
  1081. uni.navigateTo({
  1082. url: "../formManagementWechat/formManagementWechat",
  1083. });
  1084. }
  1085. },
  1086. // 我的二维码
  1087. myQrcodeHandler(){
  1088. this.showMyQrcodeModel = {
  1089. disjunctor: true,
  1090. };
  1091. },
  1092. closeMyQrcodeModel(){
  1093. this.showMyQrcodeModel.disjunctor = false;
  1094. },
  1095. // 摆药取药
  1096. handleTakeMedicine() {
  1097. if (!this.SMFlag) {
  1098. return;
  1099. }
  1100. this.SMFlag = false;
  1101. SM().then((content) => {
  1102. uni.showLoading({
  1103. title: "加载中",
  1104. mask: true,
  1105. });
  1106. //检验二维码的有效性(扫码前必须验证)
  1107. post("/dept/scanning", {
  1108. content,
  1109. })
  1110. .then((result) => {
  1111. this.currentCode = result.code;
  1112. this.SMFlag = true;
  1113. // 200检测通过,201没有有效期也通过。
  1114. if (result.state == 200 || result.state == 201) {
  1115. uni.hideLoading();
  1116. uni.navigateTo({
  1117. url: `../promptPage/promptPage?code=${result.code}`,
  1118. });
  1119. } else {
  1120. uni.hideLoading();
  1121. uni.showToast({
  1122. icon: "none",
  1123. title: '请求失败',
  1124. });
  1125. }
  1126. })
  1127. }).catch(err => {
  1128. this.SMFlag = true;
  1129. });
  1130. },
  1131. // 点击tab页切换
  1132. clickHandler(key) {
  1133. this.selectedLabelSlots = key;
  1134. this.idx = 0;
  1135. this.totalNum = -1;
  1136. // this.zxzData = [];
  1137. this.scroll_top = Math.random(); //回到顶部
  1138. if (key === "待接单") {
  1139. this.waitingOrders(0);
  1140. } else if (key === "执行中") {
  1141. this.executingOrders(0);
  1142. }
  1143. },
  1144. // 进入详情页
  1145. itemInfo(workOrder) {
  1146. console.log(workOrder);
  1147. uni.navigateTo({
  1148. url: `../receipt_infopage/receipt_infopage?id=${workOrder.id}&associationTypeValue=${workOrder.taskType.associationType.value}`,
  1149. });
  1150. },
  1151. //抢单后知道了
  1152. know() {
  1153. this.models.disjunctor = false;
  1154. this.idx = 0;
  1155. this.totalNum = -1;
  1156. // this.zxzData = [];
  1157. this.executingOrdersGetNum();
  1158. this.waitingOrders(0); //seimin
  1159. this.scroll_top = Math.random(); //回到顶部
  1160. },
  1161. //抢单确定
  1162. ok() {
  1163. this.models.disjunctor = false;
  1164. get("/workerOrder/takeOrder/" + this.qdId.id).then((res) => {
  1165. let msg = "接单失败";
  1166. let icon = "error";
  1167. if (res.status == 200) {
  1168. msg = "接单成功";
  1169. icon = "success";
  1170. }
  1171. this.models = {
  1172. disjunctor: true,
  1173. content: msg,
  1174. icon: icon,
  1175. operate: {
  1176. know: "知道了",
  1177. },
  1178. };
  1179. });
  1180. },
  1181. //抢单取消
  1182. cancel() {
  1183. this.models.disjunctor = false;
  1184. },
  1185. // 抢单
  1186. showAlerts(data) {
  1187. this.qdId = data;
  1188. this.models = {
  1189. disjunctor: true,
  1190. title: "提示",
  1191. content: "是否确定接单?",
  1192. icon: "warn",
  1193. operate: {
  1194. ok: "确定",
  1195. cancel: "取消",
  1196. },
  1197. };
  1198. },
  1199. //执行中列表数据获取
  1200. executingOrders(idx) {
  1201. console.log(this.zxzData.length, this.totalNum);
  1202. if (this.zxzData.length == this.totalNum) {
  1203. uni.showToast({
  1204. icon: "none",
  1205. title: "没有更多数据了!",
  1206. });
  1207. this.freshing = true;
  1208. return;
  1209. }
  1210. let data = {
  1211. idx,
  1212. sum: 20,
  1213. };
  1214. if (this.arrayKey) {
  1215. data.keyWord = this.arrayKey;
  1216. } else {
  1217. delete data.keyWord;
  1218. }
  1219. uni.showLoading({
  1220. title: "加载中",
  1221. mask: true,
  1222. });
  1223. post("/workerOrder/executingOrders", data).then((res) => {
  1224. uni.hideLoading();
  1225. if (res.status == 200) {
  1226. this.triggered = false;
  1227. this.freshing = true;
  1228. this.totalNum = res.data.resultCount;
  1229. if (idx === 0) {
  1230. this.zxzData = res.data.data;
  1231. } else {
  1232. this.zxzData.push(...res.data.data);
  1233. }
  1234. this.tabs[1].num = res.data.resultCount;
  1235. } else {
  1236. uni.showToast({
  1237. icon: "none",
  1238. title: "请求失败!",
  1239. });
  1240. }
  1241. });
  1242. },
  1243. //待抢单列表数据获取
  1244. waitingOrders(idx) {
  1245. if (this.zxzData.length == this.totalNum) {
  1246. uni.showToast({
  1247. icon: "none",
  1248. title: "没有更多数据了!",
  1249. });
  1250. this.freshing = true;
  1251. return;
  1252. }
  1253. let data = {
  1254. idx,
  1255. sum: 20,
  1256. };
  1257. uni.showLoading({
  1258. title: "加载中",
  1259. mask: true,
  1260. });
  1261. // 请求列表数据
  1262. post("/workerOrder/waitingOrders", data).then((res) => {
  1263. uni.hideLoading();
  1264. if (res.status == 200) {
  1265. this.triggered = false;
  1266. this.freshing = true;
  1267. this.totalNum = res.data.resultCount;
  1268. if (idx === 0) {
  1269. this.zxzData = res.data.data;
  1270. } else {
  1271. this.zxzData.push(...res.data.data);
  1272. }
  1273. this.tabs[0].num = res.data.resultCount;
  1274. } else {
  1275. uni.showToast({
  1276. icon: "none",
  1277. title: "请求失败!",
  1278. });
  1279. }
  1280. });
  1281. },
  1282. //刷新
  1283. refresherrefresh() {
  1284. if (this.triggered) {
  1285. return;
  1286. }
  1287. this.triggered = true;
  1288. this.idx = 0;
  1289. this.totalNum = -1;
  1290. if (this.selectedLabelSlots == "待接单") {
  1291. this.waitingOrders(0);
  1292. } else if (this.selectedLabelSlots == "执行中") {
  1293. this.executingOrders(0);
  1294. }
  1295. },
  1296. // 滚动
  1297. scroll(e) {
  1298. if (e.detail.scrollTop < 20) {
  1299. this.scroll_refresher_enabled = true;
  1300. } else {
  1301. this.scroll_refresher_enabled = false;
  1302. }
  1303. },
  1304. // 下拉刷新复位
  1305. refresherrestore() {
  1306. this.triggered = false;
  1307. console.log("下拉刷新复位");
  1308. },
  1309. //下拉刷新中止
  1310. refresherabort() {
  1311. this.triggered = false;
  1312. console.log("下拉刷新中止");
  1313. },
  1314. //分页,上拉加载
  1315. scrolltolower() {
  1316. if (this.freshing) {
  1317. this.freshing = false;
  1318. if (this.selectedLabelSlots == "待接单") {
  1319. this.waitingOrders(++this.idx);
  1320. } else if (this.selectedLabelSlots == "执行中") {
  1321. this.executingOrders(++this.idx);
  1322. }
  1323. }
  1324. },
  1325. // 执行中获取数字
  1326. executingOrdersGetNum() {
  1327. let data = {
  1328. idx: 0,
  1329. sum: 20,
  1330. };
  1331. if (this.arrayKey) {
  1332. data.keyWord = this.arrayKey;
  1333. } else {
  1334. delete data.keyWord;
  1335. }
  1336. post("/workerOrder/executingOrders", data).then((res) => {
  1337. if (res.status == 200) {
  1338. this.tabs[1].num = res.data.resultCount;
  1339. } else {
  1340. uni.showToast({
  1341. icon: "none",
  1342. title: "请求失败!",
  1343. });
  1344. }
  1345. });
  1346. },
  1347. // 待接单获取数字
  1348. waitingOrdersGetNum() {
  1349. let data = {
  1350. idx: 0,
  1351. sum: 20,
  1352. };
  1353. post("/workerOrder/waitingOrders", data).then((res) => {
  1354. if (res.status == 200) {
  1355. this.tabs[0].num = res.data.resultCount;
  1356. } else {
  1357. uni.showToast({
  1358. icon: "none",
  1359. title: "请求失败!",
  1360. });
  1361. }
  1362. });
  1363. },
  1364. // 阻止浏览器滑动
  1365. stop(e) {
  1366. e.preventDefault();
  1367. },
  1368. },
  1369. onLoad() {
  1370. // 获取菜单权限
  1371. this.getMenu();
  1372. post("/auth/getUserWorkDept", {}).then((ress) => {
  1373. if (ress.status == 200) {
  1374. let userId = uni.getStorageSync("userData").user.id;
  1375. let groupManager = ress.settings && ress.settings.groupManager; //当前工作组合选择的组
  1376. let workType = ress.settings ? ress.settings.workType : -1; //1是综合,2是自主
  1377. let ruleType = ress.settings ? ress.settings.ruleType : -1; //3是科室绑定人员,4是科室绑定分组,2是绑定分组
  1378. if (workType == 2 && (ruleType == 3 || (ruleType == 4 && userId == groupManager.manager))) {
  1379. //自选排班,科室绑定分组,当前登陆人是组长
  1380. this.content.unshift({
  1381. text: "负责科室",
  1382. });
  1383. }
  1384. }
  1385. });
  1386. // let setDeptConfg = uni.getStorageSync("setDeptConfg");
  1387. // let manager = uni.getStorageSync("manager");
  1388. // let userId = uni.getStorageSync("userData").user.id;
  1389. // console.log(setDeptConfg, manager, userId);
  1390. // if (
  1391. // setDeptConfg.workSchemeType == 2 &&
  1392. // (setDeptConfg.ruleType == 3 ||
  1393. // (setDeptConfg.ruleType == 4 && userId == manager))
  1394. // ) {
  1395. // //自选排班,科室绑定人员 || 科室绑定分组 && 组长是当前登陆人
  1396. // this.content.unshift({
  1397. // text: "负责科室",
  1398. // });
  1399. // }
  1400. // #ifdef APP-PLUS
  1401. // this.content.push({
  1402. // text: "退出登录",
  1403. // });
  1404. // #endif
  1405. this.selectedLabelSlots = "执行中";
  1406. this.waitingOrdersGetNum();
  1407. this.executingOrders(0);
  1408. // #ifdef APP-PLUS
  1409. webHandle("no", "app");
  1410. // #endif
  1411. // #ifdef H5
  1412. webHandle("no", "wx");
  1413. // #endif
  1414. },
  1415. onShow() {
  1416. this.SMFlag = true;
  1417. // #ifdef H5
  1418. document.body.addEventListener("touchmove", this.stop, {
  1419. passive: false,
  1420. });
  1421. // #endif
  1422. },
  1423. onHide() {
  1424. // #ifdef H5
  1425. document.body.removeEventListener("touchmove", this.stop, {
  1426. passive: false,
  1427. });
  1428. // #endif
  1429. },
  1430. };
  1431. </script>
  1432. <style lang="less">
  1433. .Receiptpage {
  1434. width: 100%;
  1435. height: 100%;
  1436. position: relative;
  1437. .more {
  1438. position: absolute;
  1439. right: 20rpx;
  1440. width: 40rpx;
  1441. height: 4rpx;
  1442. border-top: 2px solid #49b856;
  1443. border-bottom: 2px solid #49b856;
  1444. background-color: #49b856;
  1445. padding: 5px 0;
  1446. background-clip: content-box;
  1447. z-index: 9999;
  1448. top: 50%;
  1449. transform: translateY(-50%);
  1450. }
  1451. .more_picker {
  1452. position: absolute;
  1453. right: 0;
  1454. height: 100%;
  1455. opacity: 0;
  1456. z-index: 9999;
  1457. }
  1458. .bigScreenWrap{
  1459. position: fixed;
  1460. left: 0;
  1461. right: 0;
  1462. bottom: 30rpx;
  1463. z-index: 999;
  1464. height: 88rpx;
  1465. }
  1466. .red {
  1467. color: red !important;
  1468. font-weight: bold !important;
  1469. }
  1470. .page_tab {
  1471. width: 100%;
  1472. height: 96rpx;
  1473. display: flex;
  1474. position: fixed;
  1475. left: 0;
  1476. top: 0;
  1477. z-index: 999;
  1478. .page_tab_bar {
  1479. flex: 1;
  1480. font-size: 36rpx;
  1481. background: #fff;
  1482. display: flex;
  1483. justify-content: center;
  1484. align-items: center;
  1485. position: relative;
  1486. &:after {
  1487. content: "";
  1488. position: absolute;
  1489. left: 0;
  1490. bottom: 0;
  1491. height: 2rpx;
  1492. width: 100%;
  1493. background-color: transparent;
  1494. }
  1495. .tab_num {
  1496. color: #ff3b53;
  1497. margin-left: 8rpx;
  1498. }
  1499. &.active {
  1500. color: #49b856;
  1501. &:after {
  1502. background-color: #49b856;
  1503. }
  1504. }
  1505. }
  1506. }
  1507. .zwsj {
  1508. position: absolute;
  1509. left: 50%;
  1510. top: 180rpx;
  1511. transform: translateX(-50%);
  1512. .zwsj-img {
  1513. width: 560rpx;
  1514. }
  1515. .zwsj-txt {
  1516. font-size: 36rpx;
  1517. font-weight: 700;
  1518. margin-top: 20rpx;
  1519. text-align: center;
  1520. }
  1521. }
  1522. .page_items {
  1523. height: calc(100vh - 214rpx);
  1524. padding: 0 20rpx;
  1525. // padding-bottom: 88rpx;
  1526. padding-top: 96rpx;
  1527. .page_items_scroll {
  1528. height: 100%;
  1529. .page_item_wrap {
  1530. position: relative;
  1531. margin-bottom: 32rpx;
  1532. .page_item {
  1533. margin-bottom: 16rpx;
  1534. // min-height: 356rpx;
  1535. background: #fff;
  1536. border-radius: 8rpx;
  1537. overflow: hidden;
  1538. border: 2rpx solid #e5e9ed;
  1539. .L {
  1540. width: 40rpx;
  1541. height: 40rpx;
  1542. border-radius: 50%;
  1543. background: #f9fafb;
  1544. position: absolute;
  1545. left: -24rpx;
  1546. top: 68rpx;
  1547. border: 2rpx solid #e5e9ed;
  1548. }
  1549. .R {
  1550. width: 40rpx;
  1551. height: 40rpx;
  1552. border-radius: 50%;
  1553. background: #f9fafb;
  1554. position: absolute;
  1555. float: right;
  1556. right: -24rpx;
  1557. top: 68rpx;
  1558. border: 2rpx solid #e5e9ed;
  1559. }
  1560. .starting {
  1561. width: 40rpx;
  1562. height: 40rpx;
  1563. color: #fff;
  1564. background: #49b856;
  1565. display: inline-block;
  1566. border-radius: 50%;
  1567. text-align: center;
  1568. line-height: 40rpx;
  1569. font-size: 28rpx;
  1570. }
  1571. .End {
  1572. width: 40rpx;
  1573. height: 40rpx;
  1574. color: #fff;
  1575. background: #39b199;
  1576. display: inline-block;
  1577. border-radius: 50%;
  1578. text-align: center;
  1579. line-height: 40rpx;
  1580. font-size: 28rpx;
  1581. }
  1582. .page_item_top {
  1583. height: 86rpx;
  1584. border-bottom: 2rpx dashed #e5e9ed;
  1585. padding: 0 16rpx;
  1586. .page_item_top_L {
  1587. height: 100%;
  1588. float: left;
  1589. line-height: 88rpx;
  1590. display: flex;
  1591. align-items: center;
  1592. .emergencys {
  1593. background: #ff3b53 !important;
  1594. width: 124rpx !important;
  1595. }
  1596. .emergency {
  1597. background: #ff3b53 !important;
  1598. }
  1599. .emergency1 {
  1600. background: #49b856 !important;
  1601. }
  1602. .page_item_cont_start {
  1603. text-align: center;
  1604. height: 44rpx;
  1605. width: 104rpx;
  1606. line-height: 44rpx;
  1607. border-radius: 8rpx;
  1608. background: #49b856;
  1609. color: #fff;
  1610. .page_item_cont_start-img {
  1611. width: 22rpx;
  1612. position: relative;
  1613. top: 6rpx;
  1614. margin-right: 8rpx;
  1615. }
  1616. }
  1617. .L_iocn {
  1618. display: inline-block;
  1619. width: 44rpx;
  1620. height: 44rpx;
  1621. line-height: 42rpx;
  1622. border-radius: 100rpx;
  1623. color: #6cc076;
  1624. font-size: 32rpx;
  1625. border: 4rpx solid #6cc076;
  1626. background: #f0f6ed;
  1627. text-align: center;
  1628. margin-right: 8rpx;
  1629. }
  1630. .L_time {
  1631. color: #6cc076;
  1632. font-size: 32rpx;
  1633. }
  1634. .L_text {
  1635. font-size: 32rpx;
  1636. }
  1637. }
  1638. .page_item_top_R {
  1639. height: 100%;
  1640. float: right;
  1641. line-height: 88rpx;
  1642. font-size: 32rpx;
  1643. &.type {
  1644. margin-right: 32rpx;
  1645. color: red;
  1646. max-width: 260rpx;
  1647. white-space: nowrap;
  1648. text-overflow: ellipsis;
  1649. overflow: hidden;
  1650. }
  1651. .text_big{
  1652. font-weight: bold;
  1653. }
  1654. }
  1655. }
  1656. .page_item_cont {
  1657. min-height: 180rpx;
  1658. padding: 0 16rpx;
  1659. text-align: left;
  1660. position: relative;
  1661. display: flex;
  1662. flex-direction: column;
  1663. justify-content: space-between;
  1664. .text_big {
  1665. font-size: 32rpx;
  1666. margin-left: 10rpx;
  1667. font-weight: 700;
  1668. }
  1669. .line {
  1670. height: 100%;
  1671. width: 2rpx;
  1672. border-left: 2rpx solid #e5e9ed;
  1673. position: absolute;
  1674. // top: 70rpx;
  1675. top: 50%;
  1676. left: 20rpx;
  1677. transform: translateY(-50%);
  1678. }
  1679. .lines {
  1680. height: 40%;
  1681. width: 2rpx;
  1682. border-left: 2rpx solid #e5e9ed;
  1683. position: absolute;
  1684. top: 23%;
  1685. left: 36rpx;
  1686. }
  1687. .emergencys {
  1688. background: #ff3b53 !important;
  1689. width: 124rpx !important;
  1690. }
  1691. .emergency {
  1692. background: #ff3b53 !important;
  1693. }
  1694. .emergency1 {
  1695. background: #49b856 !important;
  1696. }
  1697. .page_item_cont_T {
  1698. // min-height: 80rpx;
  1699. // max-height: 324rpx;
  1700. font-size: 28rpx;
  1701. margin-top: 16rpx;
  1702. display: flex;
  1703. justify-content: space-between;
  1704. .page_item_cont_title {
  1705. height: 100%;
  1706. // float: left;
  1707. }
  1708. .page_item_cont_start {
  1709. text-align: center;
  1710. // float: right;
  1711. height: 44rpx;
  1712. width: 104rpx;
  1713. line-height: 44rpx;
  1714. border-radius: 8rpx;
  1715. background: #49b856;
  1716. color: #fff;
  1717. .page_item_cont_start-img {
  1718. width: 22rpx;
  1719. position: relative;
  1720. top: 6rpx;
  1721. margin-right: 8rpx;
  1722. }
  1723. }
  1724. }
  1725. .page_item_conts {
  1726. min-height: 30rpx;
  1727. color: rgb(102, 102, 102);
  1728. padding-left: 50rpx;
  1729. font-size: 28rpx;
  1730. margin: 16rpx 0;
  1731. position: relative;
  1732. view:not(.line) {
  1733. line-height: 1.2;
  1734. }
  1735. text {
  1736. color: #49b856;
  1737. }
  1738. }
  1739. .page_item_cont_B {
  1740. // padding-top: 20rpx;
  1741. font-size: 28rpx;
  1742. // overflow: hidden;
  1743. margin-bottom: 16rpx;
  1744. .page_item_cont_title {
  1745. height: 100%;
  1746. float: left;
  1747. }
  1748. }
  1749. }
  1750. .page_item_btn_wrap {
  1751. display: flex;
  1752. justify-content: space-between;
  1753. .page_item_btn {
  1754. height: 88rpx;
  1755. flex: 1;
  1756. margin-left: 1%;
  1757. margin-right: 1%;
  1758. background-image: linear-gradient(to right, #72c172, #3bb197);
  1759. border-radius: 8rpx;
  1760. line-height: 88rpx;
  1761. color: #fff;
  1762. font-size: 36rpx;
  1763. font-weight: 700;
  1764. text-align: center;
  1765. }
  1766. }
  1767. .page_item_btn {
  1768. height: 88rpx;
  1769. background-image: linear-gradient(to right, #72c172, #3bb197);
  1770. border-radius: 8rpx;
  1771. line-height: 88rpx;
  1772. color: #fff;
  1773. font-size: 36rpx;
  1774. font-weight: 700;
  1775. text-align: center;
  1776. }
  1777. }
  1778. .L-l {
  1779. width: 2rpx;
  1780. height: 40rpx;
  1781. background: #f9fafb;
  1782. position: absolute;
  1783. left: 20rpx;
  1784. top: 72rpx;
  1785. display: none;
  1786. }
  1787. .R-l {
  1788. width: 2rpx;
  1789. height: 40rpx;
  1790. background: #f9fafb;
  1791. position: absolute;
  1792. right: 20rpx;
  1793. top: 72rpx;
  1794. display: none;
  1795. }
  1796. }
  1797. }
  1798. }
  1799. .text {
  1800. font-size: 36rpx;
  1801. }
  1802. .wt_icon {
  1803. font-size: 40rpx;
  1804. }
  1805. }
  1806. </style>