scanning_code.vue 37 KB

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