scanning_code.vue 37 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135
  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="btn2" @click="Scanning_again(dataId)">继续扫描</view>
  312. </view>
  313. <view class="foot_btn2 footerPadding" v-if="
  314. infoType == 'ins-dsd-1' ||
  315. infoType == 'ins-zxz-1' ||
  316. infoType == 'trans-dsd-1'
  317. ">
  318. <view class="btn3" @click="Scanning_again(dataId)">继续扫描患者腕带</view>
  319. <view class="btn3" @click="photograph(infoDATA, { DEPTCode, DEPT, infoType })">拍照</view>
  320. </view>
  321. <view class="foot_btn2 footerPadding" v-if="
  322. infoType == 'plan-spe-ddd-1' ||
  323. infoType == 'spe-ddd-1' ||
  324. infoDATA.gdState.value == '6'
  325. ">
  326. <view class="btn2" @click="showAlert">知道了</view>
  327. </view>
  328. <view class="foot_btn2 footerPadding" v-if="
  329. infoType == 'drug-ddd-2' ||
  330. infoType == 'drug-dsd-2' ||
  331. infoType == 'jp-ddd-2' ||
  332. infoType == 'jp-dsd-2'
  333. ">
  334. <view class="btn2" @click="Scanning_again(dataId)">继续扫描</view>
  335. </view>
  336. <view class="foot_btn2 footerPadding" v-if="
  337. infoType == 'drug-ddd-1' ||
  338. infoType == 'drug-dsd-1' ||
  339. infoType == 'jp-ddd-1' ||
  340. infoType == 'jp-dsd-1'
  341. ">
  342. <view class="btn2" @click="showAlert">知道了</view>
  343. </view>
  344. <view class="foot_btn2 footerPadding" v-if="infoType == 'qt-ddd-1' && infoDATA.gdState.value == '5'">
  345. <view class="btn2" @click="showAlert">知道了</view>
  346. </view>
  347. <!-- 弹窗 -->
  348. <showModel :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content"
  349. @ok="ok" @cancel="cancel" :operate="models.operate"></showModel>
  350. </view>
  351. </template>
  352. <script>
  353. import showModel from "../../components/showModel/showModel.vue";
  354. import {
  355. get,
  356. post,
  357. SM,
  358. webHandle
  359. } from "../../http/http.js";
  360. import {
  361. photographTool
  362. } from "../../tools/photograph.js";
  363. export default {
  364. data() {
  365. return {
  366. SMFlag:true,
  367. // 交接人信息
  368. accountObj:undefined,
  369. deptId:undefined,
  370. // 完成工单的id
  371. wcId: "",
  372. // 弹窗model
  373. models: {
  374. disjunctor: false,
  375. },
  376. modelFlag: "", //完成工单标识
  377. animationData: {},
  378. showType: "hiddle",
  379. infoDATA: {},
  380. infoType: "",
  381. DEPTCode: "",
  382. DEPT: "",
  383. dataId: "",
  384. queryObj: {}, //路由传过来的对象
  385. };
  386. },
  387. methods: {
  388. // 拍照
  389. photograph(data, obj) {
  390. photographTool(data, obj);
  391. },
  392. // 扫描
  393. Scanning_again(id) {
  394. if (!this.SMFlag) {
  395. return;
  396. }
  397. this.SMFlag = false;
  398. SM().then((ress1) => {
  399. // ----------------
  400. uni.showLoading({
  401. title: "加载中",
  402. mask: true,
  403. });
  404. //检验二维码的有效性
  405. post("/dept/scanning", {
  406. content: ress1,
  407. }).then((result) => {
  408. this.SMFlag = true;
  409. if (result.state == 200 || result.state == 201) {
  410. let codes = result.code;
  411. if (codes) {
  412. let speCode = codes;
  413. let data = {
  414. code: speCode,
  415. type: this.infoType,
  416. deptCode: this.DEPTCode,
  417. ids: [],
  418. };
  419. data.ids.push(id);
  420. let postType = "";
  421. if (
  422. this.infoDATA.taskType.associationType.value == "jPBag" ||
  423. this.infoDATA.taskType.associationType.value == "drugsBag"
  424. ) {
  425. postType = "handleDrugsAndJp";
  426. delete data.ids;
  427. if(this.accountObj){
  428. data.handover = this.accountObj.accountId;
  429. }
  430. if(this.queryObj.grabOrders){
  431. data.grabOrders = '666';
  432. }
  433. data.deptId = this.deptId;
  434. }
  435. if (this.infoDATA.taskType.associationType.value == "specimen") {
  436. data["speCode"] = data.code;
  437. delete data.code;
  438. postType = "handleSpes";
  439. }
  440. if (
  441. this.infoDATA.taskType.associationType.value == "specimenPlan"
  442. ) {
  443. data["speCode"] = data.code;
  444. delete data.code;
  445. postType = "handlePlanSpes";
  446. }
  447. if (this.infoDATA.taskType.associationType.value == "inspect") {
  448. // delete data.type;//seimin
  449. postType = "handleIns";
  450. }
  451. if (
  452. this.infoDATA.taskType.associationType.value ==
  453. "patientTransport"
  454. ) {
  455. postType = "handleTrans";
  456. }
  457. //扫描
  458. post("/workerOrder/" + postType, data).then((ress) => {
  459. console.log(ress,1111)
  460. if (ress.status == 200) {
  461. if (
  462. this.infoDATA.taskType.associationType.value == "drugsBag"
  463. ) {
  464. uni.hideLoading();
  465. // --------start----------
  466. uni.navigateTo({
  467. url: `../scanning_Result/scanning_Result?type=${
  468. this.queryObj.type
  469. }&type1=${
  470. this.queryObj.type1
  471. }&infoData=${encodeURIComponent(
  472. JSON.stringify(ress.data)
  473. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  474. this.queryObj.deptCode
  475. }&dept=${
  476. this.queryObj.dept
  477. }&id=${id}&model=${encodeURIComponent(
  478. JSON.stringify(ress)
  479. )}&accountObj=${encodeURIComponent(JSON.stringify(this.accountObj))}&deptId=${this.deptId}&handover=${this.handover}`,
  480. });
  481. // ------------end------------
  482. } else {
  483. uni.hideLoading();
  484. // --------start----------
  485. // 患者陪检执行中或待送达,患者转运待送达
  486. if (
  487. ress.type == "ins-zxz-1" ||
  488. ress.type == "ins-dsd-1" ||
  489. ress.type == "trans-dsd-1"
  490. ) {
  491. console.log(ress.patientName, "code");
  492. uni.navigateTo({
  493. url: `../scanning_Result/scanning_Result?type=${
  494. this.queryObj.type
  495. }&type1=${
  496. this.queryObj.type1
  497. }&infoData=${encodeURIComponent(
  498. JSON.stringify(ress.data)
  499. )}&status=${ress.status}&msg=${ress.msg}&patient=${
  500. ress.patient
  501. }&patientCode=${ress.patientCode}&deptName=${
  502. ress.deptName
  503. }&bedNum=${ress.bedNum}&deptCode=${
  504. this.queryObj.deptCode
  505. }&dept=${
  506. this.queryObj.dept
  507. }&id=${id}&model=${encodeURIComponent(
  508. JSON.stringify(ress)
  509. )}`,
  510. });
  511. } else {
  512. uni.navigateTo({
  513. url: `../scanning_Result/scanning_Result?type=${
  514. this.queryObj.type
  515. }&type1=${
  516. this.queryObj.type1
  517. }&infoData=${encodeURIComponent(
  518. JSON.stringify(ress.data)
  519. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  520. this.queryObj.deptCode
  521. }&dept=${
  522. this.queryObj.dept
  523. }&id=${id}&model=${encodeURIComponent(
  524. JSON.stringify(ress)
  525. )}&speNum=${ress.specimenCount}`,
  526. });
  527. }
  528. // ------------end------------
  529. }
  530. } else {
  531. uni.hideLoading();
  532. uni.navigateTo({
  533. url: `../scanning_Result/scanning_Result?type=${
  534. this.queryObj.type
  535. }&type1=${this.queryObj.type1}&status=${ress.status}&msg=${
  536. ress.msg
  537. }&deptCode=${this.queryObj.deptCode}&dept=${
  538. this.queryObj.dept
  539. }&id=${id}&model=${encodeURIComponent(
  540. JSON.stringify(ress)
  541. )}&accountObj=${encodeURIComponent(JSON.stringify(this.accountObj))}&deptId=${this.deptId}&handover=${this.handover}`,
  542. });
  543. }
  544. });
  545. }
  546. } else {
  547. uni.hideLoading();
  548. uni.showToast({
  549. icon: "none",
  550. title: "请求失败!",
  551. });
  552. }
  553. });
  554. // ------------------------------
  555. }).catch(err=>{
  556. this.SMFlag = true;
  557. });
  558. },
  559. show(type) {
  560. this.showType = type;
  561. if (type === "show") {
  562. //展开
  563. // 计算高度
  564. const query = uni.createSelectorQuery().in(this);
  565. query
  566. .selectAll(".page_item_infos")
  567. .boundingClientRect((data) => {
  568. let len = data.reduce((prev, current) => {
  569. return prev + current.height;
  570. }, 0);
  571. this.animation.height(len).step();
  572. this.animationData = this.animation.export();
  573. })
  574. .exec();
  575. } else if (type === "hiddle") {
  576. this.animation.height(0).step();
  577. this.animationData = this.animation.export();
  578. }
  579. },
  580. // 确定
  581. ok() {
  582. this.models.disjunctor = false;
  583. if (this.modelFlag == "complete1") {
  584. //一对多完成扫描
  585. let ids = [];
  586. ids.push(this.wcId);
  587. let data = {
  588. type: this.infoType,
  589. ids,
  590. };
  591. uni.showLoading({
  592. title: '加载中',
  593. mask: true,
  594. });
  595. post("/workerOrder/finishSpes", data).then((res) => {
  596. if (res.status == 200) {
  597. uni.reLaunch({
  598. url: "../receiptpage/receiptpage",
  599. });
  600. } else {
  601. uni.hideLoading();
  602. uni.showToast({
  603. icon: "none",
  604. title: "请求失败!",
  605. });
  606. }
  607. });
  608. } else if (this.modelFlag == "complete") {
  609. //一对一完成扫描
  610. let ids = [];
  611. ids.push(this.wcId);
  612. uni.showLoading({
  613. title: '加载中',
  614. mask: true,
  615. });
  616. post("/workerOrder/finishSpeOrder", ids).then((res) => {
  617. if (res.status == 200) {
  618. uni.reLaunch({
  619. url: "../receiptpage/receiptpage",
  620. });
  621. } else {
  622. uni.hideLoading();
  623. uni.showToast({
  624. icon: "none",
  625. title: "请求失败!",
  626. });
  627. }
  628. });
  629. }
  630. },
  631. // 取消
  632. cancel() {
  633. this.models.disjunctor = false;
  634. },
  635. //一对多完成扫描
  636. Scanning_complete1(id) {
  637. this.wcId = id;
  638. this.modelFlag = "complete1";
  639. this.models = {
  640. disjunctor: true,
  641. title: "提示",
  642. content: "是否确定标本配送完成?",
  643. icon: "warn",
  644. operate: {
  645. ok: "确定",
  646. cancel: "取消",
  647. },
  648. };
  649. },
  650. //一对一完成扫描
  651. Scanning_complete(id) {
  652. this.wcId = id;
  653. this.modelFlag = "complete";
  654. this.models = {
  655. disjunctor: true,
  656. title: "提示",
  657. content: "是否确定标本配送完成?",
  658. icon: "warn",
  659. operate: {
  660. ok: "确定",
  661. cancel: "取消",
  662. },
  663. };
  664. },
  665. // 知道了
  666. showAlert() {
  667. uni.navigateTo({
  668. url: "../receiptpage/receiptpage",
  669. });
  670. },
  671. // 工单详情
  672. getInfo(id) {
  673. uni.showLoading({
  674. title: "加载中",
  675. mask: true,
  676. });
  677. get("/api/fetchData/workOrder/" + id).then((res) => {
  678. uni.hideLoading();
  679. if (res.status == 200) {
  680. this.infoDATA = res.data;
  681. } else {
  682. uni.showToast({
  683. icon: "none",
  684. title: "请求失败!",
  685. });
  686. }
  687. });
  688. },
  689. },
  690. onShow(){
  691. this.SMFlag = true;
  692. },
  693. onLoad(options) {
  694. console.log(options);
  695. if(options.accountObj && options.accountObj != "undefined"){
  696. this.accountObj = JSON.parse(options.accountObj);
  697. }
  698. if (options.deptId && options.deptId != "undefined") {
  699. this.deptId = options.deptId;
  700. }
  701. this.queryObj = options;
  702. let id = options.id;
  703. this.dataId = id; //工单ID
  704. this.infoType = options.type1; //type类型
  705. this.DEPTCode = options.deptCode; //二维码
  706. this.DEPT = options.dept; //科室名称
  707. this.getInfo(this.dataId);
  708. // 创建动画
  709. this.animation = uni.createAnimation({
  710. duration: 500,
  711. timingFunction: "ease",
  712. });
  713. // #ifdef APP-PLUS
  714. webHandle("no", "app");
  715. // #endif
  716. // #ifdef H5
  717. webHandle("no", "wx");
  718. // #endif
  719. },
  720. onUnload() {
  721. // 页面关闭后清空数据
  722. this.animationData = {};
  723. },
  724. };
  725. </script>
  726. <style lang="less">
  727. .Scanning_code {
  728. padding: 0 20rpx;
  729. padding-bottom: 124rpx;
  730. .Scanning_top {
  731. height: 340rpx;
  732. .Scanning_top_icon {
  733. width: 140rpx;
  734. height: 140rpx;
  735. margin: 0 auto;
  736. margin-top: 36rpx;
  737. border-radius: 50%;
  738. line-height: 140rpx;
  739. .cubeic-ok {
  740. font-size: 140rpx;
  741. color: #35b34a;
  742. }
  743. }
  744. .Scanning_top_text {
  745. text-align: center;
  746. .text1 {
  747. margin-top: 40rpx;
  748. font-size: 48rpx;
  749. }
  750. .text2 {
  751. margin-top: 16rpx;
  752. font-size: 36rpx;
  753. }
  754. }
  755. }
  756. .page_item {
  757. margin-top: 16rpx;
  758. min-height: 356rpx;
  759. background: #fff;
  760. border-radius: 8rpx;
  761. overflow: hidden;
  762. padding: 0 16rpx;
  763. border: 2rpx solid #e5e9ed;
  764. .L {
  765. width: 40rpx;
  766. height: 40rpx;
  767. border-radius: 50%;
  768. background: #f9fafb;
  769. position: relative;
  770. left: -50rpx;
  771. top: 66rpx;
  772. }
  773. .R {
  774. width: 40rpx;
  775. height: 40rpx;
  776. border-radius: 50%;
  777. background: #f9fafb;
  778. position: relative;
  779. float: right;
  780. right: -50rpx;
  781. top: 26rpx;
  782. }
  783. .starting {
  784. width: 50rpx;
  785. height: 50rpx;
  786. color: #fff;
  787. background: #49b856;
  788. display: inline-block;
  789. border-radius: 50%;
  790. text-align: center;
  791. line-height: 46rpx;
  792. font-size: 32rpx;
  793. margin-right: 6rpx;
  794. }
  795. .End {
  796. width: 50rpx;
  797. height: 50rpx;
  798. color: #fff;
  799. background: #39b199;
  800. display: inline-block;
  801. border-radius: 50%;
  802. text-align: center;
  803. line-height: 46rpx;
  804. font-size: 32rpx;
  805. margin-right: 6rpx;
  806. }
  807. .page_item_top {
  808. height: 86rpx;
  809. border-bottom: 2rpx dashed #e5e9ed;
  810. padding: 0 16rpx;
  811. .page_item_top_L {
  812. height: 100%;
  813. float: left;
  814. line-height: 88rpx;
  815. .emergencys {
  816. background: #ff3b53 !important;
  817. width: 124rpx !important;
  818. }
  819. .emergency {
  820. background: #ff3b53 !important;
  821. }
  822. .emergency1 {
  823. background: #49b856 !important;
  824. }
  825. .page_item_cont_start {
  826. text-align: center;
  827. height: 44rpx;
  828. width: 104rpx;
  829. line-height: 44rpx;
  830. border-radius: 8rpx;
  831. background: #49b856;
  832. color: #fff;
  833. display: inline-block;
  834. .page_item_cont_start_txt {
  835. font-size: 28rpx;
  836. display: flex;
  837. align-items: center;
  838. justify-content: center;
  839. }
  840. }
  841. .L_time {
  842. color: #6cc076;
  843. font-size: 32rpx;
  844. }
  845. .L_text {
  846. font-size: 32rpx;
  847. display: inline-block;
  848. font-weight: 700;
  849. margin-right: 8rpx;
  850. }
  851. }
  852. .page_item_top_R {
  853. height: 60rpx;
  854. float: right;
  855. padding-top: 20rpx;
  856. font-size: 32rpx;
  857. position: absolute;
  858. right: 50rpx;
  859. .L_iocn {
  860. display: inline-block;
  861. height: 52rpx;
  862. line-height: 48rpx;
  863. color: rgb(7, 134, 60);
  864. font-size: 36rpx;
  865. font-weight: 700;
  866. }
  867. }
  868. }
  869. .page_item_cont {
  870. min-height: 180rpx;
  871. padding: 0 16rpx;
  872. text-align: left;
  873. position: relative;
  874. .text_big {
  875. font-size: 32rpx;
  876. position: absolute;
  877. right: 16rpx;
  878. font-weight: 700;
  879. margin-top: 10rpx;
  880. }
  881. .text_big2 {
  882. font-size: 32rpx;
  883. position: absolute;
  884. right: 16rpx;
  885. font-weight: 700;
  886. }
  887. .line {
  888. height: 20rpx;
  889. width: 2rpx;
  890. border-left: 2rpx solid #e5e9ed;
  891. position: absolute;
  892. top: 82rpx;
  893. left: 40rpx;
  894. }
  895. .lines {
  896. height: 40%;
  897. width: 2rpx;
  898. border-left: 2rpx solid #e5e9ed;
  899. position: absolute;
  900. top: 23%;
  901. left: 36rpx;
  902. }
  903. .page_item_cont_T {
  904. padding-top: 28rpx;
  905. font-size: 28rpx;
  906. .page_item_cont_title {
  907. height: 100%;
  908. font-size: 32rpx;
  909. }
  910. }
  911. .page_item_cont_B {
  912. padding-top: 28rpx;
  913. margin-bottom: 28rpx;
  914. .page_item_cont_title {
  915. height: 60rpx;
  916. font-size: 32rpx;
  917. }
  918. .page_item_cont_title1 {
  919. height: 60rpx;
  920. line-height: 60rpx;
  921. font-size: 32rpx;
  922. padding-left: 64rpx;
  923. }
  924. }
  925. }
  926. .page_item_foot {
  927. border-top: 2rpx dashed #e5e9ed;
  928. border-bottom: 2rpx dashed #e5e9ed;
  929. padding: 28rpx 16rpx;
  930. text-align: left;
  931. .page_item_foot_text {
  932. font-size: 32rpx;
  933. margin-bottom: 20rpx;
  934. display: flex;
  935. justify-content: space-between;
  936. align-items: center;
  937. .text1 {
  938. color: rgb(102, 102, 102);
  939. }
  940. .text2 {
  941. font-weight: 700;
  942. }
  943. }
  944. .text_padd {
  945. padding: 0 10% 0 10%;
  946. }
  947. }
  948. .page_item_info {
  949. padding: 20rpx 16rpx;
  950. text-align: left;
  951. line-height: 60rpx;
  952. font-size: 32rpx;
  953. .page_item_info_title {
  954. font-weight: 700;
  955. }
  956. .text {
  957. float: right;
  958. font-weight: 700;
  959. .text_span {
  960. color: #49b856;
  961. }
  962. }
  963. }
  964. #infos {
  965. height: 0;
  966. overflow: hidden;
  967. }
  968. .page_item_infos {
  969. padding-bottom: 20rpx;
  970. border-bottom: 2rpx dashed #e5e9ed;
  971. .page_item_info2 {
  972. text-align: left;
  973. line-height: 60rpx;
  974. font-size: 32rpx;
  975. padding-left: 16rpx;
  976. .page_item_foot_text {
  977. font-size: 32rpx;
  978. margin-bottom: 20rpx;
  979. .text1 {
  980. color: rgb(102, 102, 102);
  981. }
  982. .text2 {
  983. float: right;
  984. font-weight: 700;
  985. }
  986. }
  987. }
  988. }
  989. #pulldown {
  990. color: #49b856;
  991. font-size: 36rpx;
  992. height: 60rpx;
  993. text-align: center;
  994. .cubeic-pulldown {
  995. font-size: 48rpx;
  996. position: relative;
  997. bottom: 6rpx;
  998. }
  999. }
  1000. #pullup {
  1001. color: #49b856;
  1002. font-size: 36rpx;
  1003. height: 60rpx;
  1004. text-align: center;
  1005. .cubeic-pullup {
  1006. font-size: 48rpx;
  1007. position: relative;
  1008. top: 12rpx;
  1009. }
  1010. }
  1011. }
  1012. .foot_btn2 {
  1013. position: fixed;
  1014. bottom: 0;
  1015. right: 20rpx;
  1016. left: 20rpx;
  1017. line-height: 66rpx;
  1018. height: 100rpx;
  1019. border-top: 2rpx solid #e5e9ed;
  1020. background: #f9fafb;
  1021. display: flex;
  1022. justify-content: space-between;
  1023. .btn2 {
  1024. height: 66rpx;
  1025. width: 100%;
  1026. background-image: linear-gradient(to right, #72c172, #3bb197);
  1027. color: #fff;
  1028. border-radius: 8rpx;
  1029. font-size: 32rpx;
  1030. margin-top: 16rpx;
  1031. text-align: center;
  1032. }
  1033. .btn3 {
  1034. height: 66rpx;
  1035. width: 48%;
  1036. background-image: linear-gradient(to right, #72c172, #3bb197);
  1037. color: #fff;
  1038. border-radius: 8rpx;
  1039. font-size: 32rpx;
  1040. margin-top: 16rpx;
  1041. text-align: center;
  1042. }
  1043. }
  1044. .foot_btn1 {
  1045. position: fixed;
  1046. bottom: 0;
  1047. right: 20rpx;
  1048. left: 20rpx;
  1049. line-height: 66rpx;
  1050. height: 100rpx;
  1051. border-top: 2rpx solid #e5e9ed;
  1052. background: #f9fafb;
  1053. .btn1,
  1054. .btn2 {
  1055. height: 66rpx;
  1056. width: 45%;
  1057. background-image: linear-gradient(to right, #72c172, #3bb197);
  1058. color: #fff;
  1059. border-radius: 8rpx;
  1060. font-size: 32rpx;
  1061. margin-top: 16rpx;
  1062. text-align: center;
  1063. }
  1064. .btn1 {
  1065. float: left;
  1066. }
  1067. .btn2 {
  1068. float: right;
  1069. text-align: center;
  1070. }
  1071. }
  1072. }
  1073. </style>