receiptpage.vue 61 KB

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