scanning_code.vue 40 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219
  1. <template>
  2. <view class="Scanning_code" v-if="infoDATA.emergencyType">
  3. <view class="Scanning_top">
  4. <view class="Scanning_top_icon">
  5. <text class="cubeic-ok icon_transport transport-duigou"></text>
  6. </view>
  7. <view class="Scanning_top_text">
  8. <view class="text1" v-if="infoDATA.gdState.value != '6'">签到成功</view>
  9. <view class="text1" v-if="infoDATA.gdState.value == '6'">扫描成功</view>
  10. <!-- 工单状态->value -->
  11. <!-- 待抢单-2,待接单-3,带到达-4,待送达-5,待评价-6,已完成-7,执行中-8 -->
  12. <view class="text2">
  13. 您已到达
  14. <text style="font-weight: 600" v-if="
  15. infoType == 'plan-spe-ddd-1' ||
  16. infoType == 'spe-ddd-1' ||
  17. infoType == 'plan-spe-ddd-2' ||
  18. infoType == 'spe-ddd-2' ||
  19. infoType == 'drug-ddd-2' ||
  20. infoType == 'jp-ddd-2'
  21. ">{{ infoDATA.startDept.dept }}</text>
  22. <text style="font-weight: 600"
  23. v-if="infoType == 'drug-dsd-2' || infoType == 'jp-dsd-2'">{{ infoDATA.endDepts[0].dept }}</text>
  24. <text style="font-weight: 600" v-if="
  25. infoType == 'plan-spe-dsd-2' ||
  26. infoType == 'plan-spe-dsd-3' ||
  27. infoType == 'plan-spe-dsd-1' ||
  28. infoType == 'spe-dsd-2' ||
  29. infoType == 'spe-dsd-3' ||
  30. infoType == 'spe-dsd-1' ||
  31. infoType == 'ins-zxz-1' ||
  32. infoType == 'ins-dsd-1' ||
  33. infoType == 'trans-dsd-1' ||
  34. (infoType == 'qt-ddd-1' && infoDATA.gdState.value == '5') ||
  35. infoDATA.gdState.value == '6' ||
  36. infoDATA.gdState.value == '8'
  37. ">{{ DEPT }}</text>
  38. <text v-if="
  39. infoType == 'ins-zxz-1' ||
  40. infoType == 'ins-dsd-1' ||
  41. infoType == 'trans-dsd-1'
  42. ">, 请扫描患者腕带</text>
  43. <text v-if="
  44. infoType == 'plan-spe-ddd-2' ||
  45. infoType == 'spe-ddd-2' ||
  46. infoType == 'spe-ddd-1' ||
  47. infoType == 'plan-spe-ddd-1'
  48. ">,请取标本</text>
  49. <text v-if="infoType == 'drug-ddd-2' || infoType == 'jp-ddd-2'">, 请取药包</text>
  50. <text v-if="infoType == 'drug-dsd-2' || infoType == 'jp-dsd-2'">, 请放置药包</text>
  51. <text v-if="
  52. (infoType == 'spe-dsd-3' && infoDATA.gdState.value == '5') ||
  53. (infoType == 'plan-spe-dsd-3' && infoDATA.gdState.value == '5')
  54. ">,请扫描标本</text>
  55. <text v-if="
  56. infoType == 'plan-spe-dsd-1' ||
  57. infoType == 'plan-spe-dsd-2' ||
  58. (infoType == 'plan-spe-dsd-2' && infoDATA.gdState.value == '5') ||
  59. infoType == 'spe-dsd-1' ||
  60. infoType == 'spe-dsd-2' ||
  61. (infoType == 'spe-dsd-2' && infoDATA.gdState.value == '5')
  62. ">,请放置标本</text>
  63. </view>
  64. <text v-if="infoType == 'qt-dsd-1'">工单已完成。</text>
  65. </view>
  66. </view>
  67. <view class="page_item footerOtherMargin">
  68. <view class="page_item_top">
  69. <view class="page_item_top_L">
  70. <text class="L_text">单号:{{ infoDATA.gdcode }}</text>
  71. <view class="page_item_cont_start emergency1" v-if="infoDATA.emergencyType.value == 1">
  72. <text class="page_item_cont_start_txt">
  73. <text class="cubeic-star icon_transport transport-shiwujiaoxing" style="font-size: 14px"></text>
  74. {{ infoDATA.emergencyType.name }}
  75. </text>
  76. </view>
  77. <view class="page_item_cont_start emergency" v-if="infoDATA.emergencyType.value == 2">
  78. <text class="page_item_cont_start_txt">
  79. <text class="cubeic-star icon_transport transport-shiwujiaoxing" style="font-size: 14px"></text>
  80. {{ infoDATA.emergencyType.name }}
  81. </text>
  82. </view>
  83. <view class="page_item_cont_start emergencys" v-if="infoDATA.emergencyType.value == 3">
  84. <text class="page_item_cont_start_txt">
  85. <text class="cubeic-star icon_transport transport-shiwujiaoxing" style="font-size: 14px"></text>
  86. {{ infoDATA.emergencyType.name }}
  87. </text>
  88. </view>
  89. </view>
  90. <view class="page_item_top_R">
  91. <text class="L_iocn"
  92. v-if="!(infoDATA.gdState.value == '5'&&infoDATA.taskType.associationType.value == 'inspect')">{{ infoDATA.gdState.name }}</text>
  93. <text class="L_iocn"
  94. v-if="infoDATA.gdState.value == '5'&&infoDATA.taskType.associationType.value == 'inspect'">待送回</text>
  95. </view>
  96. <view class="L"></view>
  97. <view class="R"></view>
  98. </view>
  99. <view class="page_item_cont">
  100. <view class="page_item_cont_T">
  101. <view class="page_item_cont_title">
  102. <text> <text class="starting">起</text> 点科室 </text>
  103. <text class="text_big">{{ infoDATA.startDept.dept }}</text>
  104. </view>
  105. </view>
  106. <view class="line"></view>
  107. <view class="page_item_cont_B">
  108. <view class="page_item_cont_title" v-for="(dept, i) in infoDATA.middleDept" :key="'middleDept-' + i">
  109. <view v-if="infoDATA.taskType.associationType.value == 'inspect'">
  110. <text> <text class="End">检</text> 查科室 </text>
  111. <text class="text_big">{{ dept.dept }}</text>
  112. </view>
  113. </view>
  114. <view class="page_item_cont_title" v-for="(dept, i) in infoDATA.endDepts" :key="'endDepts-' + i">
  115. <view v-if="infoDATA.taskType.associationType.value != 'inspect'">
  116. <text> <text class="End">终</text> 点科室 </text>
  117. <text class="text_big">{{ dept.dept }}</text>
  118. </view>
  119. </view>
  120. </view>
  121. </view>
  122. <view class="page_item_foot">
  123. <view class="page_item_foot_text" v-if="accountObj && (infoType === 'drug-ddd-1' || infoType === 'drug-dsd-1')">
  124. <text class="text1">交接人账号</text>
  125. <text class="text2">{{ accountObj.account }}</text>
  126. </view>
  127. <view class="page_item_foot_text" v-if="accountObj && (infoType === 'drug-ddd-1' || infoType === 'drug-dsd-1')">
  128. <text class="text1">交接人姓名</text>
  129. <text class="text2">{{ accountObj.accountName }}</text>
  130. </view>
  131. <view class="page_item_foot_text">
  132. <text class="text1">状态</text>
  133. <text class="text2"
  134. v-if="!(infoDATA.gdState.value == '5'&&infoDATA.taskType.associationType.value == 'inspect')">{{ infoDATA.gdState.name }}</text>
  135. <text class="text2"
  136. v-if="infoDATA.gdState.value == '5'&&infoDATA.taskType.associationType.value == 'inspect'">待送回</text>
  137. </view>
  138. <view class="page_item_foot_text">
  139. <text class="text1">关联类型</text>
  140. <text class="text2">{{ infoDATA.taskType.associationType.name }}</text>
  141. </view>
  142. <view class="page_item_foot_text">
  143. <text class="text1">任务类型</text>
  144. <text class="text2">{{ infoDATA.taskType.taskName }}</text>
  145. </view>
  146. <view class="page_item_foot_text" v-if="infoDATA.taskType.associationType.value==='inspect'">
  147. <text class="text1">是否半程陪检</text>
  148. <text class="text2">{{ infoDATA.isHalfInspect===1?'是':'否' }}</text>
  149. </view>
  150. <view class="page_item_foot_text" v-if="infoDATA.gdState.value == '2'">
  151. <text class="text1">预计响应时间</text>
  152. <text class="text2">{{ infoDATA.estimeResponseTime || 0 }}</text>
  153. </view>
  154. <view class="page_item_foot_text" v-if="infoDATA.gdState.value == '5'">
  155. <text class="text1" v-if="!(infoDATA.taskType.associationType.value == 'inspect')">预计送达时间</text>
  156. <text class="text1" v-if="infoDATA.taskType.associationType.value == 'inspect'">预计送回时间</text>
  157. <text class="text2">{{ infoDATA.estimeCompleteTime || 0 }}</text>
  158. </view>
  159. <view class="page_item_foot_text" v-if="infoDATA.gdState.value == '4'">
  160. <text class="text1">预计到达时间</text>
  161. <text class="text2">{{ infoDATA.estimateArriveTime || 0 }}</text>
  162. </view>
  163. <view class="page_item_foot_text">
  164. <text class="text1">创建时间</text>
  165. <text class="text2">{{ infoDATA.startTime }}</text>
  166. </view>
  167. <view class="page_item_foot_text" v-if="
  168. infoDATA.taskType.associationType.value == 'inspect' ||
  169. infoDATA.taskType.associationType.value == 'patientTransport'
  170. ">
  171. <text class="text1">携带设备</text>
  172. <text class="text2">{{ infoDATA.goods || "暂无" }}</text>
  173. </view>
  174. <view class="page_item_foot_text" v-if="
  175. infoDATA.taskType.associationType.value == 'inspect' ||
  176. infoDATA.taskType.associationType.value == 'patientTransport'
  177. ">
  178. <text class="text1">患者姓名</text>
  179. <text class="text2">{{ infoDATA.patient.patientName }}({{
  180. infoDATA.patient.patientCode
  181. }})</text>
  182. </view>
  183. </view>
  184. <!-- 药包 -->
  185. <view class="page_item_info" v-if="infoDATA.taskType.associationType.value == 'drugsBag'">
  186. <text class="page_item_info_title">药包信息</text>
  187. <text class="text">#{{ infoDATA.drugs.packid }}</text>
  188. </view>
  189. <!-- 标本 送达-->
  190. <view class="page_item_info" v-if="
  191. infoDATA.taskType.associationType.value == 'specimen' ||
  192. infoDATA.taskType.associationType.value == 'specimenPlan'
  193. ">
  194. <text class="page_item_info_title">标本信息</text>
  195. <!-- <text class="text" v-if="infoType=='plan-spe-ddd-1'||infoType=='plan-spe-dsd-2'||infoType=='plan-spe-dsd-3'&&infoDATA.gdState.value=='5'||infoType=='spe-ddd-1'||infoType=='spe-dsd-2'||infoType=='spe-dsd-3'&&infoDATA.gdState.value=='5'"> -->
  196. <!-- <text class="text" v-if="infoType=='plan-spe-ddd-1'||infoType=='plan-spe-dsd-2'||infoType=='plan-spe-dsd-3'&&infoDATA.gdState.value=='5'||infoType=='spe-ddd-1'||infoType=='spe-dsd-2'"> -->
  197. <text class="text" v-if="
  198. infoType == 'plan-spe-ddd-1' ||
  199. infoType == 'plan-spe-dsd-2' ||
  200. infoType == 'spe-ddd-1' ||
  201. infoType == 'spe-dsd-2'
  202. ">
  203. 预计标本总数
  204. <text class="text_span">{{ infoDATA.expectReceiveNum || 0 }}</text>
  205. </text>
  206. <text class="text" v-if="
  207. (infoType == 'plan-spe-ddd-2' && infoDATA.gdState.value == '4') ||
  208. (infoType == 'spe-ddd-2' && infoDATA.gdState.value == '4')
  209. ">
  210. 预计标本总数
  211. <text>{{ infoDATA.expectReceiveNum || 0 }}</text>
  212. </text>
  213. <text class="text" v-if="
  214. (infoType == 'plan-spe-dsd-2' && infoDATA.gdState.value == '6') ||
  215. (infoType == 'spe-dsd-2' && infoDATA.gdState.value == '6')
  216. ">
  217. 已扫描标本总数
  218. <text>{{ infoDATA.actualReceiveNum || 0 }}</text>
  219. </text>
  220. <text class="text" v-if="
  221. (infoType == 'plan-spe-dsd-3' && infoDATA.gdState.value == '5') ||
  222. (infoType == 'spe-dsd-3' && infoDATA.gdState.value == '5')
  223. ">
  224. 已收取标本总数
  225. <text>{{ infoDATA.actualReceiveNum || 0 }}</text>
  226. </text>
  227. </view>
  228. <!-- 静配 -->
  229. <view class="page_item_info" v-if="infoDATA.taskType.associationType.value == 'jPBag'">
  230. <text class="page_item_info_title">静配信息</text>
  231. <text class="text">#{{ infoDATA.staticDistri.packid }}</text>
  232. </view>
  233. <!-- 陪检 -->
  234. <view v-if="infoDATA.taskType.associationType.value == 'inspect'">
  235. <view class="page_item_info">
  236. <text class="page_item_info_title">检查信息</text>
  237. </view>
  238. <view id="infos" :animation="animationData">
  239. <view class="page_item_infos" v-for="(item, i) of infoDATA.checkList" :key="i">
  240. <view class="page_item_info2">
  241. <view class="page_item_foot_text">
  242. <text class="text1">检查科室</text>
  243. <text class="text2">{{ item.execDept.dept }}</text>
  244. </view>
  245. <view class="page_item_foot_text">
  246. <text class="text1">检查项</text>
  247. <text class="text2">{{ item.inspectName }}</text>
  248. </view>
  249. <view class="page_item_foot_text">
  250. <text class="text1">预约时间</text>
  251. <text class="text2">{{ item.yyTime || "-" }}</text>
  252. </view>
  253. </view>
  254. </view>
  255. </view>
  256. <view id="pulldown" @click="show('show')" v-if="showType == 'hiddle'">
  257. 点击可查看检查详情
  258. <text class="cubeic-pulldown icon_transport transport-paixujiantouxia"></text>
  259. </view>
  260. <view id="pullup" @click="show('hiddle')" v-if="showType == 'show'">
  261. 点击可收起检查详情
  262. <text class="cubeic-pullup icon_transport transport-paixujiantoushang"></text>
  263. </view>
  264. </view>
  265. </view>
  266. <view class="foot_btn2 footerPadding" v-if="infoType == 'plan-spe-ddd-1' || infoType == 'spe-ddd-1'">
  267. <view class="btn2" @click="Scanning_complete(dataId)">知道了</view>
  268. </view>
  269. <view class="foot_btn1 footerPadding" v-if="
  270. (infoType == 'plan-spe-dsd-1' && infoDATA.gdState.value == '5') ||
  271. (infoType == 'spe-dsd-1' && infoDATA.gdState.value == '5')
  272. ">
  273. <view class="btn1" @click="Scanning_complete(dataId)">工单完成</view>
  274. <view class="btn2" @click="showAlert">继续配送</view>
  275. </view>
  276. <view class="foot_btn1 footerPadding" v-if="
  277. (infoType == 'plan-spe-ddd-2' && infoDATA.gdState.value == '4') ||
  278. (infoType == 'spe-ddd-2' && infoDATA.gdState.value == '4')
  279. ">
  280. <view class="btn1" @click="Scanning_again(dataId)" v-if="
  281. infoDATA.taskType.associationType.value == 'specimen' ||
  282. infoDATA.taskType.associationType.value == 'specimenPlan'
  283. ">扫描标本</view>
  284. <view class="btn1" @click="Scanning_again(dataId)" v-if="
  285. infoDATA.taskType.associationType.value == 'jPBag' ||
  286. infoDATA.taskType.associationType.value == 'drugsBag'
  287. ">扫描药包</view>
  288. </view>
  289. <view class="foot_btn1 footerPadding" v-if="
  290. (infoType == 'plan-spe-dsd-3' && infoDATA.gdState.value == '5') ||
  291. (infoType == 'spe-dsd-3' && infoDATA.gdState.value == '5')
  292. ">
  293. <view class="btn1" @click="Scanning_again(dataId)" v-if="
  294. infoDATA.taskType.associationType.value == 'specimen' ||
  295. infoDATA.taskType.associationType.value == 'specimenPlan'
  296. ">扫描标本</view>
  297. <view class="btn1" @click="Scanning_again(dataId)" v-if="
  298. infoDATA.taskType.associationType.value == 'jPBag' ||
  299. infoDATA.taskType.associationType.value == 'drugsBag'
  300. ">扫描药包</view>
  301. <view class="btn2" @click="Scanning_complete1(dataId)">完成工单</view>
  302. </view>
  303. <view class="foot_btn2 footerPadding" v-if="
  304. infoType == 'plan-spe-ddd-2' ||
  305. infoType == 'plan-spe-dsd-2' ||
  306. (infoType == 'plan-spe-dsd-3' && infoDATA.gdState.value == '5') ||
  307. infoType == 'spe-ddd-2' ||
  308. infoType == 'spe-dsd-2' ||
  309. (infoType == 'spe-dsd-3' && infoDATA.gdState.value == '5')
  310. ">
  311. <view class="btn3" @click="Scanning_again(dataId)">继续扫描</view>
  312. <view class="btn3" @click="showHandViewSpecimen()">手动录入</view>
  313. </view>
  314. <view class="foot_btn2 footerPadding" v-if="
  315. infoType == 'ins-dsd-1' ||
  316. infoType == 'ins-zxz-1' ||
  317. infoType == 'trans-dsd-1'
  318. ">
  319. <view class="btn3" @click="Scanning_again(dataId)">继续扫描患者腕带</view>
  320. <view class="btn3" @click="photograph(infoDATA, { DEPTCode, DEPT, infoType })">拍照</view>
  321. </view>
  322. <view class="foot_btn2 footerPadding" v-if="
  323. infoType == 'plan-spe-ddd-1' ||
  324. infoType == 'spe-ddd-1' ||
  325. infoDATA.gdState.value == '6'
  326. ">
  327. <view class="btn2" @click="showAlert">知道了</view>
  328. </view>
  329. <view class="foot_btn2 footerPadding" v-if="
  330. infoType == 'drug-ddd-2' ||
  331. infoType == 'drug-dsd-2' ||
  332. infoType == 'jp-ddd-2' ||
  333. infoType == 'jp-dsd-2'
  334. ">
  335. <view class="btn2" @click="Scanning_again(dataId)">继续扫描</view>
  336. <view class="btn3" @click="showHandViewDrugsbag()">手动录入</view>
  337. </view>
  338. <view class="foot_btn2 footerPadding" v-if="
  339. infoType == 'drug-ddd-1' ||
  340. infoType == 'drug-dsd-1' ||
  341. infoType == 'jp-ddd-1' ||
  342. infoType == 'jp-dsd-1'
  343. ">
  344. <view class="btn2" @click="showAlert">知道了</view>
  345. </view>
  346. <view class="foot_btn2 footerPadding" v-if="infoType == 'qt-ddd-1' && infoDATA.gdState.value == '5'">
  347. <view class="btn2" @click="showAlert">知道了</view>
  348. </view>
  349. <!-- 弹窗 -->
  350. <showModel :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content"
  351. @ok="ok" @cancel="cancel" :operate="models.operate"></showModel>
  352. <!-- 手动查询标本弹窗 -->
  353. <handViewSpecimen v-if="speModels.disjunctor" :title="speModels.title" :disjunctor="speModels.disjunctor"
  354. @ok="speOk" @cancel="speCancel">
  355. </handViewSpecimen>
  356. <!-- 手动查询药品弹窗 -->
  357. <handViewDrugsBag v-if="drugbagModels.disjunctor" :title="drugbagModels.title"
  358. :disjunctor="drugbagModels.disjunctor" @ok="drugbagOk" @cancel="drugbagCancel">
  359. </handViewDrugsBag>
  360. </view>
  361. </template>
  362. <script>
  363. import showModel from "../../components/showModel/showModel.vue";
  364. import {
  365. get,
  366. post,
  367. SM,
  368. webHandle
  369. } from "../../http/http.js";
  370. import {
  371. photographTool
  372. } from "../../tools/photograph.js";
  373. export default {
  374. data() {
  375. return {
  376. currentCode: '', //当前小扫描的科室二维码
  377. // 手动查询标本弹窗model
  378. speModels: {
  379. disjunctor: false,
  380. },
  381. // 手动查询药品弹窗model
  382. drugbagModels: {
  383. disjunctor: false,
  384. },
  385. SMFlag: true,
  386. // 交接人信息
  387. accountObj: undefined,
  388. deptId: undefined,
  389. // 完成工单的id
  390. wcId: "",
  391. // 弹窗model
  392. models: {
  393. disjunctor: false,
  394. },
  395. modelFlag: "", //完成工单标识
  396. animationData: {},
  397. showType: "hiddle",
  398. infoDATA: {},
  399. infoType: "",
  400. DEPTCode: "",
  401. DEPT: "",
  402. dataId: "",
  403. queryObj: {}, //路由传过来的对象
  404. };
  405. },
  406. methods: {
  407. // 手动查询药品-确认
  408. drugbagOk(data) {
  409. console.log(data);
  410. if (!data.id) {
  411. //没有查询到药品
  412. uni.showModal({
  413. title: '提示',
  414. content: "没有查询到发药单号!",
  415. showCancel: false,
  416. success: function(res) {
  417. if (res.confirm) {
  418. console.log('用户点击确定');
  419. } else if (res.cancel) {
  420. console.log('用户点击取消');
  421. }
  422. }
  423. });
  424. return;
  425. }
  426. this.drugbagModels.disjunctor = false;
  427. this.hand_scanning_common(data.packid, 'hand');
  428. },
  429. // 手动查询药品-取消
  430. drugbagCancel() {
  431. this.drugbagModels.disjunctor = false;
  432. },
  433. // 手动查询药品弹窗
  434. showHandViewDrugsbag() {
  435. this.drugbagModels = {
  436. title: '填写发药单号',
  437. disjunctor: true,
  438. }
  439. },
  440. // 手动查询标本-确认
  441. speOk(data) {
  442. console.log(data);
  443. if (!data.id) {
  444. //没有查询到标本
  445. uni.showModal({
  446. title: '提示',
  447. content: "没有查询到标本!",
  448. showCancel: false,
  449. success: function(res) {
  450. if (res.confirm) {
  451. console.log('用户点击确定');
  452. } else if (res.cancel) {
  453. console.log('用户点击取消');
  454. }
  455. }
  456. });
  457. return;
  458. }
  459. this.speModels.disjunctor = false;
  460. this.hand_scanning_common(data.scode, 'hand');
  461. },
  462. // 手动查询标本-取消
  463. speCancel() {
  464. this.speModels.disjunctor = false;
  465. },
  466. // 手动查询标本弹窗
  467. showHandViewSpecimen() {
  468. this.speModels = {
  469. title: '填写标本编码',
  470. disjunctor: true,
  471. }
  472. },
  473. // 拍照
  474. photograph(data, obj) {
  475. photographTool(data, obj);
  476. },
  477. // 手动输入标本和扫码公共方法,type----scan是扫码,hand是手动录入
  478. hand_scanning_common(ress1, type) {
  479. // ----------------
  480. uni.showLoading({
  481. title: "加载中",
  482. mask: true,
  483. });
  484. //检验二维码的有效性
  485. post("/dept/scanning", {
  486. content: ress1,
  487. }).then((result) => {
  488. this.SMFlag = true;
  489. if (result.state == 200 || result.state == 201) {
  490. this.currentCode = result.code;
  491. let codes = result.code;
  492. if (codes) {
  493. let speCode = codes;
  494. let data = {
  495. code: speCode,
  496. type: this.infoType,
  497. deptCode: this.DEPTCode,
  498. ids: [this.dataId],
  499. };
  500. let postType = "";
  501. if (
  502. this.infoDATA.taskType.associationType.value == "jPBag" ||
  503. this.infoDATA.taskType.associationType.value == "drugsBag"
  504. ) {
  505. postType = "handleDrugsAndJp";
  506. delete data.ids;
  507. if (this.accountObj) {
  508. data.handover = this.accountObj.accountId;
  509. }
  510. if (this.queryObj.grabOrders) {
  511. data.grabOrders = '666';
  512. }
  513. data.deptId = this.deptId;
  514. }
  515. if (this.infoDATA.taskType.associationType.value == "specimen") {
  516. data["speCode"] = data.code;
  517. delete data.code;
  518. postType = "handleSpes";
  519. }
  520. if (
  521. this.infoDATA.taskType.associationType.value == "specimenPlan"
  522. ) {
  523. data["speCode"] = data.code;
  524. delete data.code;
  525. postType = "handlePlanSpes";
  526. }
  527. if (this.infoDATA.taskType.associationType.value == "inspect") {
  528. // delete data.type;//seimin
  529. postType = "handleIns";
  530. }
  531. if (
  532. this.infoDATA.taskType.associationType.value ==
  533. "patientTransport"
  534. ) {
  535. postType = "handleTrans";
  536. }
  537. //扫描
  538. post("/workerOrder/" + postType, data).then((ress) => {
  539. console.log(ress, 1111)
  540. if (ress.status == 200) {
  541. //标本和标本轮巡工单,扫描标本后会自动调用摄像头,继续扫描,直到status不是200
  542. if (this.infoDATA.taskType.associationType.value == 'specimen' || this.infoDATA.taskType
  543. .associationType.value == 'specimenPlan') {
  544. if (type === 'scan') {
  545. setTimeout(()=>{
  546. this.Scanning_again(this.dataId);
  547. },500)
  548. }
  549. }
  550. if (
  551. this.infoDATA.taskType.associationType.value == "drugsBag"
  552. ) {
  553. uni.hideLoading();
  554. // --------start----------
  555. uni.navigateTo({
  556. url: `../scanning_Result/scanning_Result?type=${
  557. this.queryObj.type
  558. }&type1=${
  559. this.queryObj.type1
  560. }&infoData=${encodeURIComponent(
  561. JSON.stringify(ress.data)
  562. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  563. this.queryObj.deptCode
  564. }&dept=${
  565. this.queryObj.dept
  566. }&id=${this.dataId}&model=${encodeURIComponent(
  567. JSON.stringify(ress)
  568. )}&accountObj=${encodeURIComponent(JSON.stringify(this.accountObj))}&deptId=${this.deptId}&handover=${this.handover}`,
  569. });
  570. // ------------end------------
  571. } else {
  572. uni.hideLoading();
  573. // --------start----------
  574. // 患者陪检执行中或待送达,患者转运待送达
  575. if (
  576. ress.type == "ins-zxz-1" ||
  577. ress.type == "ins-dsd-1" ||
  578. ress.type == "trans-dsd-1"
  579. ) {
  580. console.log(ress.patientName, "code");
  581. uni.navigateTo({
  582. url: `../scanning_Result/scanning_Result?type=${
  583. this.queryObj.type
  584. }&type1=${
  585. this.queryObj.type1
  586. }&infoData=${encodeURIComponent(
  587. JSON.stringify(ress.data)
  588. )}&status=${ress.status}&msg=${ress.msg}&patient=${
  589. ress.patient
  590. }&patientCode=${ress.patientCode}&deptName=${
  591. ress.deptName
  592. }&bedNum=${ress.bedNum}&deptCode=${
  593. this.queryObj.deptCode
  594. }&dept=${
  595. this.queryObj.dept
  596. }&id=${this.dataId}&model=${encodeURIComponent(
  597. JSON.stringify(ress)
  598. )}`,
  599. });
  600. } else {
  601. uni.navigateTo({
  602. url: `../scanning_Result/scanning_Result?type=${
  603. this.queryObj.type
  604. }&type1=${
  605. this.queryObj.type1
  606. }&infoData=${encodeURIComponent(
  607. JSON.stringify(ress.data)
  608. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  609. this.queryObj.deptCode
  610. }&dept=${
  611. this.queryObj.dept
  612. }&id=${this.dataId}&model=${encodeURIComponent(
  613. JSON.stringify(ress)
  614. )}&speNum=${ress.specimenCount}&scanOrHand=${type}`,
  615. });
  616. }
  617. // ------------end------------
  618. }
  619. } else {
  620. uni.hideLoading();
  621. uni.navigateTo({
  622. url: `../scanning_Result/scanning_Result?type=${
  623. this.queryObj.type
  624. }&type1=${this.queryObj.type1}&status=${ress.status}&msg=${
  625. ress.msg
  626. }&deptCode=${this.queryObj.deptCode}&dept=${
  627. this.queryObj.dept
  628. }&id=${this.dataId}&model=${encodeURIComponent(
  629. JSON.stringify(ress)
  630. )}&accountObj=${encodeURIComponent(JSON.stringify(this.accountObj))}&deptId=${this.deptId}&handover=${this.handover}&scanOrHand=${type}&qrcode=${this.currentCode}`,
  631. });
  632. }
  633. });
  634. }
  635. } else {
  636. uni.hideLoading();
  637. uni.showToast({
  638. icon: "none",
  639. title: "请求失败!",
  640. });
  641. }
  642. });
  643. // ------------------------------
  644. },
  645. // 扫描
  646. Scanning_again(id) {
  647. if (!this.SMFlag) {
  648. return;
  649. }
  650. this.SMFlag = false;
  651. SM().then((ress1) => {
  652. this.hand_scanning_common(ress1, 'scan');
  653. }).catch(err => {
  654. this.SMFlag = true;
  655. });
  656. },
  657. show(type) {
  658. this.showType = type;
  659. if (type === "show") {
  660. //展开
  661. // 计算高度
  662. const query = uni.createSelectorQuery().in(this);
  663. query
  664. .selectAll(".page_item_infos")
  665. .boundingClientRect((data) => {
  666. let len = data.reduce((prev, current) => {
  667. return prev + current.height;
  668. }, 0);
  669. this.animation.height(len).step();
  670. this.animationData = this.animation.export();
  671. })
  672. .exec();
  673. } else if (type === "hiddle") {
  674. this.animation.height(0).step();
  675. this.animationData = this.animation.export();
  676. }
  677. },
  678. // 确定
  679. ok() {
  680. this.models.disjunctor = false;
  681. if (this.modelFlag == "complete1") {
  682. //一对多完成扫描
  683. let ids = [];
  684. ids.push(this.wcId);
  685. let data = {
  686. type: this.infoType,
  687. ids,
  688. };
  689. uni.showLoading({
  690. title: '加载中',
  691. mask: true,
  692. });
  693. post("/workerOrder/finishSpes", data).then((res) => {
  694. if (res.status == 200) {
  695. uni.reLaunch({
  696. url: "../receiptpage/receiptpage",
  697. });
  698. } else {
  699. uni.hideLoading();
  700. uni.showToast({
  701. icon: "none",
  702. title: "请求失败!",
  703. });
  704. }
  705. });
  706. } else if (this.modelFlag == "complete") {
  707. //一对一完成扫描
  708. let ids = [];
  709. ids.push(this.wcId);
  710. uni.showLoading({
  711. title: '加载中',
  712. mask: true,
  713. });
  714. post("/workerOrder/finishSpeOrder", ids).then((res) => {
  715. if (res.status == 200) {
  716. uni.reLaunch({
  717. url: "../receiptpage/receiptpage",
  718. });
  719. } else {
  720. uni.hideLoading();
  721. uni.showToast({
  722. icon: "none",
  723. title: "请求失败!",
  724. });
  725. }
  726. });
  727. }
  728. },
  729. // 取消
  730. cancel() {
  731. this.models.disjunctor = false;
  732. },
  733. //一对多完成扫描
  734. Scanning_complete1(id) {
  735. this.wcId = id;
  736. this.modelFlag = "complete1";
  737. this.models = {
  738. disjunctor: true,
  739. title: "提示",
  740. content: "是否确定标本配送完成?",
  741. icon: "warn",
  742. operate: {
  743. ok: "确定",
  744. cancel: "取消",
  745. },
  746. };
  747. },
  748. //一对一完成扫描
  749. Scanning_complete(id) {
  750. this.wcId = id;
  751. this.modelFlag = "complete";
  752. this.models = {
  753. disjunctor: true,
  754. title: "提示",
  755. content: "是否确定标本配送完成?",
  756. icon: "warn",
  757. operate: {
  758. ok: "确定",
  759. cancel: "取消",
  760. },
  761. };
  762. },
  763. // 知道了
  764. showAlert() {
  765. uni.navigateTo({
  766. url: "../receiptpage/receiptpage",
  767. });
  768. },
  769. // 工单详情
  770. getInfo(id) {
  771. uni.showLoading({
  772. title: "加载中",
  773. mask: true,
  774. });
  775. get("/api/fetchData/workOrder/" + id).then((res) => {
  776. uni.hideLoading();
  777. if (res.status == 200) {
  778. this.infoDATA = res.data;
  779. } else {
  780. uni.showToast({
  781. icon: "none",
  782. title: "请求失败!",
  783. });
  784. }
  785. });
  786. },
  787. },
  788. onShow() {
  789. this.SMFlag = true;
  790. },
  791. onLoad(options) {
  792. console.log(options);
  793. if (options.accountObj && options.accountObj != "undefined") {
  794. this.accountObj = JSON.parse(options.accountObj);
  795. }
  796. if (options.deptId && options.deptId != "undefined") {
  797. this.deptId = options.deptId;
  798. }
  799. this.queryObj = options;
  800. let id = options.id;
  801. this.dataId = id; //工单ID
  802. this.infoType = options.type1; //type类型
  803. this.DEPTCode = options.deptCode; //二维码
  804. this.DEPT = options.dept; //科室名称
  805. this.getInfo(this.dataId);
  806. // 创建动画
  807. this.animation = uni.createAnimation({
  808. duration: 500,
  809. timingFunction: "ease",
  810. });
  811. // #ifdef APP-PLUS
  812. webHandle("no", "app");
  813. // #endif
  814. // #ifdef H5
  815. webHandle("no", "wx");
  816. // #endif
  817. },
  818. onUnload() {
  819. // 页面关闭后清空数据
  820. this.animationData = {};
  821. },
  822. };
  823. </script>
  824. <style lang="less">
  825. .Scanning_code {
  826. padding: 0 20rpx;
  827. padding-bottom: 124rpx;
  828. .Scanning_top {
  829. height: 340rpx;
  830. .Scanning_top_icon {
  831. width: 140rpx;
  832. height: 140rpx;
  833. margin: 0 auto;
  834. margin-top: 36rpx;
  835. border-radius: 50%;
  836. line-height: 140rpx;
  837. .cubeic-ok {
  838. font-size: 140rpx;
  839. color: #35b34a;
  840. }
  841. }
  842. .Scanning_top_text {
  843. text-align: center;
  844. .text1 {
  845. margin-top: 40rpx;
  846. font-size: 48rpx;
  847. }
  848. .text2 {
  849. margin-top: 16rpx;
  850. font-size: 36rpx;
  851. }
  852. }
  853. }
  854. .page_item {
  855. margin-top: 16rpx;
  856. min-height: 356rpx;
  857. background: #fff;
  858. border-radius: 8rpx;
  859. overflow: hidden;
  860. padding: 0 16rpx;
  861. border: 2rpx solid #e5e9ed;
  862. .L {
  863. width: 40rpx;
  864. height: 40rpx;
  865. border-radius: 50%;
  866. background: #f9fafb;
  867. position: relative;
  868. left: -50rpx;
  869. top: 66rpx;
  870. }
  871. .R {
  872. width: 40rpx;
  873. height: 40rpx;
  874. border-radius: 50%;
  875. background: #f9fafb;
  876. position: relative;
  877. float: right;
  878. right: -50rpx;
  879. top: 26rpx;
  880. }
  881. .starting {
  882. width: 50rpx;
  883. height: 50rpx;
  884. color: #fff;
  885. background: #49b856;
  886. display: inline-block;
  887. border-radius: 50%;
  888. text-align: center;
  889. line-height: 46rpx;
  890. font-size: 32rpx;
  891. margin-right: 6rpx;
  892. }
  893. .End {
  894. width: 50rpx;
  895. height: 50rpx;
  896. color: #fff;
  897. background: #39b199;
  898. display: inline-block;
  899. border-radius: 50%;
  900. text-align: center;
  901. line-height: 46rpx;
  902. font-size: 32rpx;
  903. margin-right: 6rpx;
  904. }
  905. .page_item_top {
  906. height: 86rpx;
  907. border-bottom: 2rpx dashed #e5e9ed;
  908. padding: 0 16rpx;
  909. .page_item_top_L {
  910. height: 100%;
  911. float: left;
  912. line-height: 88rpx;
  913. .emergencys {
  914. background: #ff3b53 !important;
  915. width: 124rpx !important;
  916. }
  917. .emergency {
  918. background: #ff3b53 !important;
  919. }
  920. .emergency1 {
  921. background: #49b856 !important;
  922. }
  923. .page_item_cont_start {
  924. text-align: center;
  925. height: 44rpx;
  926. width: 104rpx;
  927. line-height: 44rpx;
  928. border-radius: 8rpx;
  929. background: #49b856;
  930. color: #fff;
  931. display: inline-block;
  932. .page_item_cont_start_txt {
  933. font-size: 28rpx;
  934. display: flex;
  935. align-items: center;
  936. justify-content: center;
  937. }
  938. }
  939. .L_time {
  940. color: #6cc076;
  941. font-size: 32rpx;
  942. }
  943. .L_text {
  944. font-size: 32rpx;
  945. display: inline-block;
  946. font-weight: 700;
  947. margin-right: 8rpx;
  948. }
  949. }
  950. .page_item_top_R {
  951. height: 60rpx;
  952. float: right;
  953. padding-top: 20rpx;
  954. font-size: 32rpx;
  955. position: absolute;
  956. right: 50rpx;
  957. .L_iocn {
  958. display: inline-block;
  959. height: 52rpx;
  960. line-height: 48rpx;
  961. color: rgb(7, 134, 60);
  962. font-size: 36rpx;
  963. font-weight: 700;
  964. }
  965. }
  966. }
  967. .page_item_cont {
  968. min-height: 180rpx;
  969. padding: 0 16rpx;
  970. text-align: left;
  971. position: relative;
  972. .text_big {
  973. font-size: 32rpx;
  974. position: absolute;
  975. right: 16rpx;
  976. font-weight: 700;
  977. margin-top: 10rpx;
  978. }
  979. .text_big2 {
  980. font-size: 32rpx;
  981. position: absolute;
  982. right: 16rpx;
  983. font-weight: 700;
  984. }
  985. .line {
  986. height: 20rpx;
  987. width: 2rpx;
  988. border-left: 2rpx solid #e5e9ed;
  989. position: absolute;
  990. top: 82rpx;
  991. left: 40rpx;
  992. }
  993. .lines {
  994. height: 40%;
  995. width: 2rpx;
  996. border-left: 2rpx solid #e5e9ed;
  997. position: absolute;
  998. top: 23%;
  999. left: 36rpx;
  1000. }
  1001. .page_item_cont_T {
  1002. padding-top: 28rpx;
  1003. font-size: 28rpx;
  1004. .page_item_cont_title {
  1005. height: 100%;
  1006. font-size: 32rpx;
  1007. }
  1008. }
  1009. .page_item_cont_B {
  1010. padding-top: 28rpx;
  1011. margin-bottom: 28rpx;
  1012. .page_item_cont_title {
  1013. height: 60rpx;
  1014. font-size: 32rpx;
  1015. }
  1016. .page_item_cont_title1 {
  1017. height: 60rpx;
  1018. line-height: 60rpx;
  1019. font-size: 32rpx;
  1020. padding-left: 64rpx;
  1021. }
  1022. }
  1023. }
  1024. .page_item_foot {
  1025. border-top: 2rpx dashed #e5e9ed;
  1026. border-bottom: 2rpx dashed #e5e9ed;
  1027. padding: 28rpx 16rpx;
  1028. text-align: left;
  1029. .page_item_foot_text {
  1030. font-size: 32rpx;
  1031. margin-bottom: 20rpx;
  1032. display: flex;
  1033. justify-content: space-between;
  1034. align-items: center;
  1035. .text1 {
  1036. color: rgb(102, 102, 102);
  1037. }
  1038. .text2 {
  1039. font-weight: 700;
  1040. }
  1041. }
  1042. .text_padd {
  1043. padding: 0 10% 0 10%;
  1044. }
  1045. }
  1046. .page_item_info {
  1047. padding: 20rpx 16rpx;
  1048. text-align: left;
  1049. line-height: 60rpx;
  1050. font-size: 32rpx;
  1051. .page_item_info_title {
  1052. font-weight: 700;
  1053. }
  1054. .text {
  1055. float: right;
  1056. font-weight: 700;
  1057. .text_span {
  1058. color: #49b856;
  1059. }
  1060. }
  1061. }
  1062. #infos {
  1063. height: 0;
  1064. overflow: hidden;
  1065. }
  1066. .page_item_infos {
  1067. padding-bottom: 20rpx;
  1068. border-bottom: 2rpx dashed #e5e9ed;
  1069. .page_item_info2 {
  1070. text-align: left;
  1071. line-height: 60rpx;
  1072. font-size: 32rpx;
  1073. padding-left: 16rpx;
  1074. .page_item_foot_text {
  1075. font-size: 32rpx;
  1076. margin-bottom: 20rpx;
  1077. .text1 {
  1078. color: rgb(102, 102, 102);
  1079. }
  1080. .text2 {
  1081. float: right;
  1082. font-weight: 700;
  1083. }
  1084. }
  1085. }
  1086. }
  1087. #pulldown {
  1088. color: #49b856;
  1089. font-size: 36rpx;
  1090. height: 60rpx;
  1091. text-align: center;
  1092. .cubeic-pulldown {
  1093. font-size: 48rpx;
  1094. position: relative;
  1095. bottom: 6rpx;
  1096. }
  1097. }
  1098. #pullup {
  1099. color: #49b856;
  1100. font-size: 36rpx;
  1101. height: 60rpx;
  1102. text-align: center;
  1103. .cubeic-pullup {
  1104. font-size: 48rpx;
  1105. position: relative;
  1106. top: 12rpx;
  1107. }
  1108. }
  1109. }
  1110. .foot_btn2 {
  1111. position: fixed;
  1112. bottom: 0;
  1113. right: 20rpx;
  1114. left: 20rpx;
  1115. line-height: 66rpx;
  1116. height: 100rpx;
  1117. border-top: 2rpx solid #e5e9ed;
  1118. background: #f9fafb;
  1119. display: flex;
  1120. justify-content: space-between;
  1121. .btn2,
  1122. .btn3 {
  1123. height: 66rpx;
  1124. flex: 1;
  1125. background-image: linear-gradient(to right, #72c172, #3bb197);
  1126. color: #fff;
  1127. border-radius: 8rpx;
  1128. font-size: 32rpx;
  1129. margin-top: 16rpx;
  1130. margin-right: 16rpx;
  1131. text-align: center;
  1132. &:last-of-type {
  1133. margin-right: 0;
  1134. }
  1135. }
  1136. }
  1137. .foot_btn1 {
  1138. position: fixed;
  1139. bottom: 0;
  1140. right: 20rpx;
  1141. left: 20rpx;
  1142. line-height: 66rpx;
  1143. height: 100rpx;
  1144. border-top: 2rpx solid #e5e9ed;
  1145. background: #f9fafb;
  1146. .btn1,
  1147. .btn2 {
  1148. height: 66rpx;
  1149. flex: 1;
  1150. background-image: linear-gradient(to right, #72c172, #3bb197);
  1151. color: #fff;
  1152. border-radius: 8rpx;
  1153. font-size: 32rpx;
  1154. margin-top: 16rpx;
  1155. text-align: center;
  1156. }
  1157. }
  1158. }
  1159. </style>