scanning_code.vue 37 KB

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