scanning_code.vue 58 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660
  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 || '无' }}</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 || '无' }}</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 || '无' }}</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.residenceNo
  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="
  196. infoType == 'plan-spe-ddd-1' ||
  197. infoType == 'plan-spe-dsd-2' ||
  198. infoType == 'spe-ddd-1' ||
  199. infoType == 'spe-dsd-2'
  200. ">
  201. 预计标本总数
  202. <text class="text_span">{{ infoDATA.expectReceiveNum || 0 }}</text>
  203. </text>
  204. <text class="text" v-if="
  205. (infoType == 'plan-spe-ddd-2' && infoDATA.gdState.value == '4') ||
  206. (infoType == 'spe-ddd-2' && infoDATA.gdState.value == '4')
  207. ">
  208. 预计标本总数
  209. <text>{{ infoDATA.expectReceiveNum || 0 }}</text>
  210. </text>
  211. <text class="text" v-if="
  212. (infoType == 'plan-spe-dsd-2' && infoDATA.gdState.value == '6') ||
  213. (infoType == 'spe-dsd-2' && infoDATA.gdState.value == '6')
  214. ">
  215. 已扫描标本总数
  216. <text>{{ infoDATA.actualReceiveNum || 0 }}</text>
  217. </text>
  218. <text class="text" v-if="
  219. (infoType == 'plan-spe-dsd-3' && infoDATA.gdState.value == '5') ||
  220. (infoType == 'spe-dsd-3' && infoDATA.gdState.value == '5')
  221. ">
  222. 已收取标本总数
  223. <text>{{ infoDATA.actualReceiveNum || 0 }}</text>
  224. </text> -->
  225. </view>
  226. <!-- 静配 -->
  227. <view class="page_item_info" v-if="infoDATA.taskType.associationType.value == 'jPBag'">
  228. <text class="page_item_info_title">静配信息</text>
  229. <text class="text">#{{ infoDATA.staticDistri.packid }}</text>
  230. </view>
  231. <!-- 陪检 -->
  232. <view v-if="infoDATA.taskType.associationType.value == 'inspect'">
  233. <view class="page_item_info">
  234. <text class="page_item_info_title">检查信息</text>
  235. </view>
  236. <view id="infos" :animation="animationData">
  237. <view class="page_item_infos" v-for="(item, i) of infoDATA.checkList" :key="i">
  238. <view class="page_item_info2">
  239. <view class="page_item_foot_text">
  240. <text class="text1">检查科室</text>
  241. <text class="text2">{{ item.execDept.dept }}</text>
  242. </view>
  243. <view class="page_item_foot_text">
  244. <text class="text1">检查项</text>
  245. <text class="text2">{{ item.inspectName }}</text>
  246. </view>
  247. <view class="page_item_foot_text">
  248. <text class="text1">预约时间</text>
  249. <text class="text2">{{ item.yyTime || "-" }}</text>
  250. </view>
  251. </view>
  252. </view>
  253. </view>
  254. <view id="pulldown" @click="show('show')" v-if="showType == 'hiddle'">
  255. 点击可查看检查详情
  256. <text class="cubeic-pulldown icon_transport transport-paixujiantouxia"></text>
  257. </view>
  258. <view id="pullup" @click="show('hiddle')" v-if="showType == 'show'">
  259. 点击可收起检查详情
  260. <text class="cubeic-pullup icon_transport transport-paixujiantoushang"></text>
  261. </view>
  262. </view>
  263. </view>
  264. <view class="foot_btn2 footerPadding" v-if="infoType == 'plan-spe-ddd-1' || infoType == 'spe-ddd-1'">
  265. <view class="btn2" @click="Scanning_complete(dataId)">知道了</view>
  266. </view>
  267. <view class="foot_btn1 footerPadding" v-if="
  268. (infoType == 'plan-spe-dsd-1' && infoDATA.gdState.value == '5') ||
  269. (infoType == 'spe-dsd-1' && infoDATA.gdState.value == '5')
  270. ">
  271. <view class="btn1" @click="Scanning_complete(dataId)">工单完成</view>
  272. <view class="btn2" @click="showAlert">继续配送</view>
  273. </view>
  274. <view class="foot_btn1 footerPadding" v-if="
  275. (infoType == 'plan-spe-ddd-2' && infoDATA.gdState.value == '4') ||
  276. (infoType == 'spe-ddd-2' && infoDATA.gdState.value == '4')
  277. ">
  278. <view class="btn1" @click="Scanning_again(dataId)" v-if="
  279. infoDATA.taskType.associationType.value == 'specimen' ||
  280. infoDATA.taskType.associationType.value == 'specimenPlan'
  281. ">扫描标本</view>
  282. <view class="btn1" @click="Scanning_again(dataId)" v-if="
  283. infoDATA.taskType.associationType.value == 'jPBag' ||
  284. infoDATA.taskType.associationType.value == 'drugsBag'
  285. ">扫描药包</view>
  286. </view>
  287. <view class="foot_btn1 footerPadding" v-if="
  288. (infoType == 'plan-spe-dsd-3' && infoDATA.gdState.value == '5') ||
  289. (infoType == 'spe-dsd-3' && infoDATA.gdState.value == '5')
  290. ">
  291. <view class="btn1" @click="Scanning_again(dataId)" v-if="
  292. infoDATA.taskType.associationType.value == 'specimen' ||
  293. infoDATA.taskType.associationType.value == 'specimenPlan'
  294. ">扫描标本</view>
  295. <view class="btn1" @click="Scanning_again(dataId)" v-if="
  296. infoDATA.taskType.associationType.value == 'jPBag' ||
  297. infoDATA.taskType.associationType.value == 'drugsBag'
  298. ">扫描药包</view>
  299. <view class="btn2" @click="Scanning_complete1(dataId)">完成工单</view>
  300. </view>
  301. <view class="foot_btn2 footerPadding" v-if="
  302. infoType == 'plan-spe-ddd-2' ||
  303. infoType == 'plan-spe-dsd-2' ||
  304. (infoType == 'plan-spe-dsd-3' && infoDATA.gdState.value == '5') ||
  305. infoType == 'spe-ddd-2' ||
  306. infoType == 'spe-dsd-2' ||
  307. (infoType == 'spe-dsd-3' && infoDATA.gdState.value == '5')
  308. ">
  309. <view class="btn3" @click="Scanning_again(dataId)">继续扫描</view>
  310. <view class="btn3" @click="showHandViewSpecimen()">手动录入</view>
  311. <view class="btn3" v-if="infoDATA.taskType.isDigitalHandover==1" @click="checkNumber(infoDATA)">数量核对</view>
  312. <view class="btn3" @click="next()" v-if="queryObj.fromSpecimenBuild">下一步</view>
  313. </view>
  314. <view class="foot_btn2 footerPadding" v-if="
  315. infoType == 'ins-dsd-1' ||
  316. infoType == 'ins-zxz-1' ||
  317. infoType == 'trans-dsd-1'
  318. ">
  319. <view class="btn3" @click="Scanning_again(dataId)">继续扫描患者腕带</view>
  320. <view class="btn3" @click="photograph(infoDATA, { DEPTCode, DEPT, infoType })">拍照</view>
  321. </view>
  322. <view class="foot_btn2 footerPadding" v-if="
  323. infoType == 'plan-spe-ddd-1' ||
  324. infoType == 'spe-ddd-1' ||
  325. infoDATA.gdState.value == '6'
  326. ">
  327. <view class="btn2" @click="showAlert">知道了</view>
  328. </view>
  329. <view class="foot_btn2 footerPadding" v-if="
  330. infoType == 'drug-ddd-2' ||
  331. infoType == 'drug-dsd-2' ||
  332. infoType == 'jp-ddd-2' ||
  333. infoType == 'jp-dsd-2'
  334. ">
  335. <view class="btn2" @click="Scanning_again(dataId)">继续扫描</view>
  336. <view class="btn3" @click="showHandViewDrugsbag()">手动录入</view>
  337. </view>
  338. <view class="foot_btn2 footerPadding" v-if="
  339. infoType == 'drug-ddd-1' ||
  340. infoType == 'drug-dsd-1' ||
  341. infoType == 'jp-ddd-1' ||
  342. infoType == 'jp-dsd-1'
  343. ">
  344. <view class="btn2" @click="showAlert">知道了</view>
  345. </view>
  346. <view class="foot_btn2 footerPadding" v-if="infoType == 'qt-ddd-1' && infoDATA.gdState.value == '5'">
  347. <view class="btn2" @click="showAlert">知道了</view>
  348. </view>
  349. <!-- 弹窗 -->
  350. <showModel :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content"
  351. @ok="ok" @cancel="cancel" :operate="models.operate"></showModel>
  352. <!-- 手动查询标本弹窗 -->
  353. <handViewSpecimen v-if="speModels.disjunctor" :title="speModels.title" :disjunctor="speModels.disjunctor"
  354. @ok="speOk" @cancel="speCancel">
  355. </handViewSpecimen>
  356. <!-- 手动查询药品弹窗 -->
  357. <handViewDrugsBag v-if="drugbagModels.disjunctor" :title="drugbagModels.title"
  358. :disjunctor="drugbagModels.disjunctor" @ok="drugbagOk" @cancel="drugbagCancel">
  359. </handViewDrugsBag>
  360. <!-- 修改标本数量弹窗 -->
  361. <changeSpeNum v-if="changeSpeModels.disjunctor" :operate="{ok:'确认数量',check:'详细核对',cancel:'取消'}" :title="changeSpeModels.title" :content="changeSpeModels.content"
  362. :disjunctor="changeSpeModels.disjunctor" @ok="changeSpeOk" @check="changeSpeCheck" @cancel="changeSpeCancel" :num="speNumChange" :modifyReason="modifyReason" :isFirstShowReason="false">
  363. </changeSpeNum>
  364. </view>
  365. </template>
  366. <script>
  367. import showModel from "../../components/showModel/showModel.vue";
  368. import {
  369. get,
  370. post,
  371. SM,
  372. webHandle
  373. } from "../../http/http.js";
  374. import {
  375. photographTool
  376. } from "../../tools/photograph.js";
  377. export default {
  378. data() {
  379. return {
  380. speNumChange: 0,
  381. modifyReason:'',
  382. changeSpeObj: {},
  383. // 修改标本数量弹窗model
  384. changeSpeModels: {
  385. disjunctor: false,
  386. },
  387. currentCode: '', //当前小扫描的科室二维码
  388. // 手动查询标本弹窗model
  389. speModels: {
  390. disjunctor: false,
  391. },
  392. // 手动查询药品弹窗model
  393. drugbagModels: {
  394. disjunctor: false,
  395. },
  396. SMFlag: true,
  397. // 交接人信息
  398. accountObj: undefined,
  399. deptId: undefined,
  400. // 完成工单的id
  401. wcId: "",
  402. // 弹窗model
  403. models: {
  404. disjunctor: false,
  405. },
  406. modelFlag: "", //完成工单标识
  407. animationData: {},
  408. showType: "hiddle",
  409. infoDATA: {},
  410. infoType: "",
  411. DEPTCode: "",
  412. DEPT: "",
  413. dataId: "",
  414. queryObj: {}, //路由传过来的对象
  415. };
  416. },
  417. methods: {
  418. // 修改标本数量-核对
  419. changeSpeCheck(){
  420. console.log(this.infoDATA);
  421. this.changeSpeModels.disjunctor = false;
  422. let deptId = this.queryObj.deptId;
  423. let endDepts = this.queryObj.endDepts;
  424. if (deptId) {
  425. // 小扫描
  426. uni.navigateTo({
  427. url: `/pages/specimenCheckingDetail/specimenCheckingDetail?infoDATA=${encodeURIComponent(JSON.stringify({startDept:this.infoDATA.startDept.id,uuid:this.infoDATA.id}))}&id=${deptId}&t=small&gdState=${this.infoDATA.gdState.value}&endDepts=${endDepts}`
  428. })
  429. } else {
  430. // 快捷建单进入小扫描
  431. uni.navigateTo({
  432. url: `/pages/specimenCheckingDetail/specimenCheckingDetail?infoDATA=${encodeURIComponent(JSON.stringify({startDept:this.infoDATA.startDept.id,uuid:this.infoDATA.id}))}&id=${deptId}&t=small&endDepts=${endDepts}`
  433. })
  434. }
  435. },
  436. // 修改标本数量-确认
  437. changeSpeOk(data) {
  438. console.log(data);
  439. const pathUrl = uni.getStorageSync("path");
  440. const {
  441. speNum,
  442. reason,
  443. imageValue
  444. } = data;
  445. this.changeSpeModels.disjunctor = false;
  446. uni.showLoading({
  447. mask: true,
  448. title: "加载中",
  449. });
  450. let postData = {
  451. checkDept: this.changeSpeObj.endDepts, //终点科室
  452. transDeptId: this.changeSpeObj.infoDATA.startDept,
  453. gdId: this.changeSpeObj.infoDATA.uuid,
  454. deptId: this.changeSpeObj.id == "undefined" ?
  455. this.changeSpeObj.infoDATA.startDept : this.changeSpeObj.id,
  456. specimensNum: speNum,
  457. modifyReason: reason,
  458. };
  459. post("/api/updateCheckDeptSpecimensNum", postData).then((res) => {
  460. if (res.status == 200) {
  461. console.log(imageValue);
  462. if (!imageValue.length) {
  463. uni.hideLoading();
  464. if (this.changeSpeObj.t == "big") {
  465. if (this.changeSpeObj.gdState == 4) {
  466. // 待到达
  467. uni.navigateTo({
  468. url: `../../pages/receiptpage/receiptpage`,
  469. });
  470. } else if (this.changeSpeObj.gdState == 5) {
  471. // 待送达
  472. if (res.type1 === "plan-spe-ddd-2") {} else {
  473. let content = `本工单已签到<strong class="red">${
  474. res.scanSet ? res.scanSet.join("、") : ""
  475. }</strong>,剩余需签到科室<strong class="red">${
  476. res.notScanSet ? res.notScanSet.join("、") : ""
  477. }</strong>,您确定完成工单吗?`;
  478. uni.navigateTo({
  479. url: `../scanning/scanning?type=${res.type}&type1=${
  480. res.type1
  481. }&id=${encodeURIComponent(
  482. JSON.stringify([res.gdid])
  483. )}&content=${content}`,
  484. });
  485. }
  486. }
  487. } else if (this.changeSpeObj.t == "small") {
  488. if (this.changeSpeObj.id == "undefined") {
  489. //快捷建单建单进入
  490. uni.navigateTo({
  491. url: `../../pages/receiptpage/receiptpage`,
  492. });
  493. } else {
  494. if (this.changeSpeObj.gdState == 4) {
  495. // 待到达
  496. uni.navigateTo({
  497. url: `../../pages/receiptpage/receiptpage`,
  498. });
  499. } else if (this.changeSpeObj.gdState == 5) {
  500. // 待送达
  501. if (res.type1 === "plan-spe-ddd-2") {} else {
  502. let content = `本工单已签到<strong class="red">${
  503. res.scanSet ? res.scanSet.join("、") : ""
  504. }</strong>,剩余需签到科室<strong class="red">${
  505. res.notScanSet ? res.notScanSet.join("、") : ""
  506. }</strong>,您确定完成工单吗?`;
  507. uni.navigateTo({
  508. url: `../scanning/scanning?type=${res.type}&type1=${
  509. res.type1
  510. }&id=${encodeURIComponent(
  511. JSON.stringify([res.gdid])
  512. )}&content=${content}`,
  513. });
  514. }
  515. }
  516. }
  517. } else {
  518. uni.navigateTo({
  519. url: `../../pages/specimenChecking/specimenChecking?infoDATA=${encodeURIComponent(
  520. JSON.stringify(this.changeSpeObj.infoDATA)
  521. )}`,
  522. });
  523. }
  524. return;
  525. }
  526. let n = 0;
  527. imageValue.forEach((v) => {
  528. // 图片上传 start
  529. console.log("压缩前");
  530. let canvasWidth = v.image.width; //图片原始长宽
  531. let canvasHeight = v.image.height;
  532. let img = new Image();
  533. img.src = v.path;
  534. let canvas = document.createElement("canvas");
  535. let ctx = canvas.getContext("2d");
  536. canvas.width = canvasWidth;
  537. canvas.height = canvasHeight;
  538. ctx.drawImage(img, 0, 0, canvasWidth, canvasHeight);
  539. canvas.toBlob(
  540. (fileSrc) => {
  541. let tp = window.URL.createObjectURL(fileSrc);
  542. console.log("压缩后");
  543. n++;
  544. uni.uploadFile({
  545. url: pathUrl +
  546. "/common/common/uploadAttachment/specimenPhotos/" +
  547. res.deptSpecimensNumId +
  548. "/666",
  549. filePath: tp,
  550. name: "file",
  551. formData: {
  552. filename: v.name,
  553. },
  554. success: (uploadFileRes) => {
  555. console.log(uploadFileRes);
  556. if (--n === 0) {
  557. uni.hideLoading();
  558. if (this.changeSpeObj.t == "big") {
  559. if (this.changeSpeObj.gdState == 4) {
  560. // 待到达
  561. uni.navigateTo({
  562. url: `../../pages/receiptpage/receiptpage`,
  563. });
  564. } else if (this.changeSpeObj.gdState == 5) {
  565. // 待送达
  566. if (res.type1 === "plan-spe-ddd-2") {} else {
  567. let content = `本工单已签到<strong class="red">${
  568. res.scanSet ? res.scanSet.join("、") : ""
  569. }</strong>,剩余需签到科室<strong class="red">${
  570. res.notScanSet ? res.notScanSet.join("、") : ""
  571. }</strong>,您确定完成工单吗?`;
  572. uni.navigateTo({
  573. url: `../scanning/scanning?type=${res.type}&type1=${
  574. res.type1
  575. }&id=${encodeURIComponent(
  576. JSON.stringify([res.gdid])
  577. )}&content=${content}`,
  578. });
  579. }
  580. }
  581. } else if (this.changeSpeObj.t == "small") {
  582. if (this.changeSpeObj.id == "undefined") {
  583. //快捷建单建单进入
  584. uni.navigateTo({
  585. url: `../../pages/receiptpage/receiptpage`,
  586. });
  587. } else {
  588. if (this.changeSpeObj.gdState == 4) {
  589. // 待到达
  590. uni.navigateTo({
  591. url: `../../pages/receiptpage/receiptpage`,
  592. });
  593. } else if (this.changeSpeObj.gdState == 5) {
  594. // 待送达
  595. if (res.type1 === "plan-spe-ddd-2") {} else {
  596. let content = `本工单已签到<strong class="red">${
  597. res.scanSet ? res.scanSet.join("、") : ""
  598. }</strong>,剩余需签到科室<strong class="red">${
  599. res.notScanSet ? res.notScanSet.join("、") : ""
  600. }</strong>,您确定完成工单吗?`;
  601. uni.navigateTo({
  602. url: `../scanning/scanning?type=${res.type}&type1=${
  603. res.type1
  604. }&id=${encodeURIComponent(
  605. JSON.stringify([res.gdid])
  606. )}&content=${content}`,
  607. });
  608. }
  609. }
  610. }
  611. } else {
  612. uni.navigateTo({
  613. url: `../../pages/specimenChecking/specimenChecking?infoDATA=${encodeURIComponent(
  614. JSON.stringify(this.changeSpeObj.infoDATA)
  615. )}`,
  616. });
  617. }
  618. }
  619. },
  620. fail: (err) => {
  621. n--;
  622. console.error(err);
  623. uni.hideLoading();
  624. uni.showToast({
  625. icon: "none",
  626. title: "上传失败",
  627. duration: 2000,
  628. });
  629. },
  630. });
  631. },
  632. "image/jpeg",
  633. 0.3
  634. );
  635. // 图片上传 end
  636. });
  637. } else {
  638. uni.hideLoading();
  639. uni.showToast({
  640. icon: "none",
  641. title: res.msg || "接口获取数据失败!",
  642. });
  643. }
  644. });
  645. },
  646. // 修改标本数量-取消
  647. changeSpeCancel() {
  648. this.changeSpeModels.disjunctor = false;
  649. },
  650. // 修改标本数量弹窗
  651. showChangeSpe() {
  652. uni.showLoading({
  653. mask: true,
  654. title: "加载中",
  655. });
  656. let postData = {
  657. deptId: this.deptId,
  658. gdId: this.dataId,
  659. };
  660. post(`/api/getStartDeptSpecimensNum`, postData).then((res) => {
  661. uni.hideLoading();
  662. if (res.status == 200) {
  663. this.speNumChange = res.data[0].deptSpecimensNum;
  664. this.modifyReason = res.data[0].modifyReason;
  665. this.changeSpeModels = {
  666. title: "修改标本数量",
  667. content: `您已到达<span class="red">${this.DEPT}</span>本科室标本数量为<span class="red">${this.speNumChange}</span>,请确认标本数量`,
  668. disjunctor: true,
  669. };
  670. } else {
  671. this.speNumChange = "";
  672. this.modifyReason = '';
  673. uni.showToast({
  674. icon: "none",
  675. title: res.msg || "接口获取数据失败!",
  676. });
  677. }
  678. });
  679. },
  680. // 数量核对
  681. checkNumber(infoDATA) {
  682. let deptId = this.queryObj.deptId;
  683. let endDepts = this.queryObj.endDepts;
  684. console.log(endDepts, 'scanning_code');
  685. // 存数据
  686. if (deptId) {
  687. // 小扫描
  688. this.changeSpeObj = {
  689. infoDATA: {
  690. startDept: this.infoDATA.startDept.id,
  691. uuid: this.infoDATA.id
  692. },
  693. id: deptId,
  694. t: 'small',
  695. gdState: this.infoDATA.gdState.value,
  696. endDepts,
  697. }
  698. } else {
  699. // 快捷建单进入小扫描
  700. this.changeSpeObj = {
  701. infoDATA: {
  702. startDept: this.infoDATA.startDept.id,
  703. uuid: this.infoDATA.id
  704. },
  705. id: deptId,
  706. t: 'small',
  707. endDepts,
  708. }
  709. }
  710. this.showChangeSpe();
  711. },
  712. // 手动查询药品-确认
  713. drugbagOk(data) {
  714. console.log(data);
  715. if (!data.id) {
  716. //没有查询到药品
  717. uni.showModal({
  718. title: '提示',
  719. content: "没有查询到发药单号!",
  720. showCancel: false,
  721. success: function(res) {
  722. if (res.confirm) {
  723. console.log('用户点击确定');
  724. } else if (res.cancel) {
  725. console.log('用户点击取消');
  726. }
  727. }
  728. });
  729. return;
  730. }
  731. this.drugbagModels.disjunctor = false;
  732. this.hand_scanning_common(data.packid, 'hand');
  733. },
  734. // 手动查询药品-取消
  735. drugbagCancel() {
  736. this.drugbagModels.disjunctor = false;
  737. },
  738. // 手动查询药品弹窗
  739. showHandViewDrugsbag() {
  740. this.drugbagModels = {
  741. title: '填写发药单号',
  742. disjunctor: true,
  743. }
  744. },
  745. // 手动查询标本-确认
  746. speOk(data) {
  747. console.log(data);
  748. if (!data.id) {
  749. //没有查询到标本
  750. uni.showModal({
  751. title: '提示',
  752. content: "没有查询到标本!",
  753. showCancel: false,
  754. success: function(res) {
  755. if (res.confirm) {
  756. console.log('用户点击确定');
  757. } else if (res.cancel) {
  758. console.log('用户点击取消');
  759. }
  760. }
  761. });
  762. return;
  763. }
  764. this.speModels.disjunctor = false;
  765. this.hand_scanning_common(data.scode, 'hand');
  766. },
  767. // 手动查询标本-取消
  768. speCancel() {
  769. this.speModels.disjunctor = false;
  770. },
  771. // 手动查询标本弹窗
  772. showHandViewSpecimen() {
  773. this.speModels = {
  774. title: '填写标本编码',
  775. disjunctor: true,
  776. }
  777. },
  778. // 下一步
  779. next() {
  780. uni.showLoading({
  781. title: '加载中',
  782. mask: true,
  783. })
  784. post('/workerOrder/getSpecimenCount', {
  785. gdId: this.queryObj.id
  786. }).then(res => {
  787. get('/api/fetchData/specimen/' + this.queryObj.specimenId).then(ress => {
  788. uni.hideLoading();
  789. console.log(ress);
  790. ress.msg = '成功';
  791. ress.specimenCount = res.specimenCount;
  792. ress.type = this.queryObj.type1;
  793. uni.navigateTo({
  794. url: `../scanning_Result/scanning_Result?type=${
  795. this.queryObj.type
  796. }&type1=${
  797. this.queryObj.type1
  798. }&infoData=${encodeURIComponent(
  799. JSON.stringify(ress.data)
  800. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  801. this.queryObj.deptCode
  802. }&dept=${
  803. this.queryObj.dept
  804. }&deptId=${this.deptId}&id=${this.dataId}&model=${encodeURIComponent(
  805. JSON.stringify(ress)
  806. )}&speNum=${res.specimenCount}`,
  807. });
  808. })
  809. })
  810. },
  811. // 拍照
  812. photograph(data, obj) {
  813. photographTool(data, obj);
  814. },
  815. // 手动输入标本和扫码公共方法,type----scan是扫码,hand是手动录入
  816. hand_scanning_common(ress1, type) {
  817. // ----------------
  818. uni.showLoading({
  819. title: "加载中",
  820. mask: true,
  821. });
  822. //检验二维码的有效性
  823. post("/dept/scanning", {
  824. content: ress1,
  825. }).then((result) => {
  826. this.SMFlag = true;
  827. if (result.state == 200 || result.state == 201) {
  828. this.currentCode = result.code;
  829. let codes = result.code;
  830. if (codes) {
  831. let speCode = codes;
  832. let data = {
  833. code: speCode,
  834. type: this.infoType,
  835. deptCode: this.DEPTCode,
  836. ids: [this.dataId],
  837. };
  838. let postType = "";
  839. if (
  840. this.infoDATA.taskType.associationType.value == "jPBag" ||
  841. this.infoDATA.taskType.associationType.value == "drugsBag"
  842. ) {
  843. postType = "handleDrugsAndJp";
  844. if(this.infoDATA.taskType.associationType.value == "drugsBag"){
  845. delete data.ids;
  846. }
  847. if (this.accountObj) {
  848. data.handover = this.accountObj.accountId;
  849. }
  850. if (this.queryObj.grabOrders) {
  851. data.grabOrders = '666';
  852. }
  853. data.deptId = this.deptId;
  854. }
  855. if (this.infoDATA.taskType.associationType.value == "specimen") {
  856. data["speCode"] = data.code;
  857. delete data.code;
  858. postType = "handleSpes";
  859. }
  860. if (
  861. this.infoDATA.taskType.associationType.value == "specimenPlan"
  862. ) {
  863. data["speCode"] = data.code;
  864. delete data.code;
  865. postType = "handlePlanSpes";
  866. }
  867. if (this.infoDATA.taskType.associationType.value == "inspect") {
  868. // delete data.type;//seimin
  869. postType = "handleIns";
  870. }
  871. if (
  872. this.infoDATA.taskType.associationType.value ==
  873. "patientTransport"
  874. ) {
  875. postType = "handleTrans";
  876. }
  877. //扫描
  878. post("/workerOrder/" + postType, data).then((ress) => {
  879. console.log(ress, 1111)
  880. if (ress.status == 200 || ress.status == 11111) {
  881. //标本和标本轮巡工单,扫描标本后会自动调用摄像头,继续扫描,直到status不是200
  882. if ((this.infoDATA.taskType.associationType.value == 'specimen' || this.infoDATA.taskType
  883. .associationType.value == 'specimenPlan') && ress.status != 11111) {
  884. if (type === 'scan') {
  885. setTimeout(() => {
  886. this.Scanning_again(this.dataId);
  887. }, 500)
  888. }
  889. }
  890. if (
  891. this.infoDATA.taskType.associationType.value == "drugsBag"
  892. ) {
  893. uni.hideLoading();
  894. // --------start----------
  895. uni.navigateTo({
  896. url: `../scanning_Result/scanning_Result?type=${
  897. this.queryObj.type
  898. }&type1=${
  899. this.queryObj.type1
  900. }&infoData=${encodeURIComponent(
  901. JSON.stringify(ress.data)
  902. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  903. this.queryObj.deptCode
  904. }&dept=${
  905. this.queryObj.dept
  906. }&id=${this.dataId}&model=${encodeURIComponent(
  907. JSON.stringify(ress)
  908. )}&accountObj=${encodeURIComponent(JSON.stringify(this.accountObj))}&deptId=${this.deptId}&handover=${this.handover}`,
  909. });
  910. // ------------end------------
  911. } else {
  912. uni.hideLoading();
  913. // --------start----------
  914. if(this.infoDATA.taskType.associationType.value == 'patientTransport' && this.infoDATA.gdState.value == 5){
  915. // 门诊服务点,有orderList
  916. if(ress.orderList){
  917. uni.navigateTo({
  918. url: `/pages/outpatient/outpatientEndSignIn/outpatientEndSignIn?model=${encodeURIComponent(JSON.stringify(ress))}`,
  919. });
  920. }else{
  921. // 患者陪检执行中或待送达,患者转运待送达
  922. if (
  923. ress.type == "ins-zxz-1" ||
  924. ress.type == "ins-dsd-1" ||
  925. ress.type == "trans-dsd-1"
  926. ) {
  927. console.log(ress.patientName, "code");
  928. uni.navigateTo({
  929. url: `../scanning_Result/scanning_Result?type=${
  930. this.queryObj.type
  931. }&type1=${
  932. this.queryObj.type1
  933. }&infoData=${encodeURIComponent(
  934. JSON.stringify(ress.data)
  935. )}&status=${ress.status}&msg=${ress.msg}&patient=${
  936. ress.patient
  937. }&patientCode=${ress.patientCode}&deptName=${
  938. ress.deptName
  939. }&bedNum=${ress.bedNum}&deptCode=${
  940. this.queryObj.deptCode
  941. }&dept=${
  942. this.queryObj.dept
  943. }&id=${this.dataId}&model=${encodeURIComponent(
  944. JSON.stringify(ress)
  945. )}`,
  946. });
  947. } else {
  948. uni.navigateTo({
  949. url: `../scanning_Result/scanning_Result?type=${
  950. this.queryObj.type
  951. }&type1=${
  952. this.queryObj.type1
  953. }&infoData=${encodeURIComponent(
  954. JSON.stringify(ress.data)
  955. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  956. this.queryObj.deptCode
  957. }&dept=${
  958. this.queryObj.dept
  959. }&deptId=${this.deptId}&id=${this.dataId}&model=${encodeURIComponent(
  960. JSON.stringify(ress)
  961. )}&speNum=${ress.specimenCount}&scanOrHand=${type}`,
  962. });
  963. }
  964. }
  965. }else{
  966. // 患者陪检执行中或待送达,患者转运待送达
  967. if (
  968. ress.type == "ins-zxz-1" ||
  969. ress.type == "ins-dsd-1" ||
  970. ress.type == "trans-dsd-1"
  971. ) {
  972. console.log(ress.patientName, "code");
  973. uni.navigateTo({
  974. url: `../scanning_Result/scanning_Result?type=${
  975. this.queryObj.type
  976. }&type1=${
  977. this.queryObj.type1
  978. }&infoData=${encodeURIComponent(
  979. JSON.stringify(ress.data)
  980. )}&status=${ress.status}&msg=${ress.msg}&patient=${
  981. ress.patient
  982. }&patientCode=${ress.patientCode}&deptName=${
  983. ress.deptName
  984. }&bedNum=${ress.bedNum}&deptCode=${
  985. this.queryObj.deptCode
  986. }&dept=${
  987. this.queryObj.dept
  988. }&id=${this.dataId}&model=${encodeURIComponent(
  989. JSON.stringify(ress)
  990. )}`,
  991. });
  992. } else {
  993. uni.navigateTo({
  994. url: `../scanning_Result/scanning_Result?type=${
  995. this.queryObj.type
  996. }&type1=${
  997. this.queryObj.type1
  998. }&infoData=${encodeURIComponent(
  999. JSON.stringify(ress.data)
  1000. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  1001. this.queryObj.deptCode
  1002. }&dept=${
  1003. this.queryObj.dept
  1004. }&deptId=${this.deptId}&id=${this.dataId}&model=${encodeURIComponent(
  1005. JSON.stringify(ress)
  1006. )}&speNum=${ress.specimenCount}&scanOrHand=${type}`,
  1007. });
  1008. }
  1009. }
  1010. // ------------end------------
  1011. }
  1012. } else {
  1013. uni.hideLoading();
  1014. uni.navigateTo({
  1015. url: `../scanning_Result/scanning_Result?type=${
  1016. this.queryObj.type
  1017. }&type1=${this.queryObj.type1}&status=${ress.status}&msg=${
  1018. ress.msg
  1019. }&deptCode=${this.queryObj.deptCode}&dept=${
  1020. this.queryObj.dept
  1021. }&id=${this.dataId}&model=${encodeURIComponent(
  1022. JSON.stringify(ress)
  1023. )}&accountObj=${encodeURIComponent(JSON.stringify(this.accountObj))}&deptId=${this.deptId}&handover=${this.handover}&scanOrHand=${type}&qrcode=${this.currentCode}`,
  1024. });
  1025. }
  1026. });
  1027. }
  1028. } else {
  1029. uni.hideLoading();
  1030. uni.showToast({
  1031. icon: "none",
  1032. title: result.info || "接口获取数据失败!",
  1033. });
  1034. }
  1035. });
  1036. // ------------------------------
  1037. },
  1038. // 扫描
  1039. Scanning_again(id) {
  1040. if (!this.SMFlag) {
  1041. return;
  1042. }
  1043. this.SMFlag = false;
  1044. SM().then((ress1) => {
  1045. this.hand_scanning_common(ress1, 'scan');
  1046. }).catch(err => {
  1047. this.SMFlag = true;
  1048. });
  1049. },
  1050. show(type) {
  1051. this.showType = type;
  1052. if (type === "show") {
  1053. //展开
  1054. // 计算高度
  1055. const query = uni.createSelectorQuery().in(this);
  1056. query
  1057. .selectAll(".page_item_infos")
  1058. .boundingClientRect((data) => {
  1059. let len = data.reduce((prev, current) => {
  1060. return prev + current.height;
  1061. }, 0);
  1062. this.animation.height(len).step();
  1063. this.animationData = this.animation.export();
  1064. })
  1065. .exec();
  1066. } else if (type === "hiddle") {
  1067. this.animation.height(0).step();
  1068. this.animationData = this.animation.export();
  1069. }
  1070. },
  1071. // 确定
  1072. ok() {
  1073. this.models.disjunctor = false;
  1074. if (this.modelFlag == "complete1") {
  1075. //一对多完成扫描
  1076. let ids = [];
  1077. ids.push(this.wcId);
  1078. let data = {
  1079. type: this.infoType,
  1080. ids,
  1081. };
  1082. uni.showLoading({
  1083. title: '加载中',
  1084. mask: true,
  1085. });
  1086. post("/workerOrder/finishSpes", data).then((res) => {
  1087. if (res.status == 200) {
  1088. uni.reLaunch({
  1089. url: "../receiptpage/receiptpage",
  1090. });
  1091. } else {
  1092. uni.hideLoading();
  1093. uni.showToast({
  1094. icon: "none",
  1095. title: res.msg || "接口获取数据失败!",
  1096. });
  1097. }
  1098. });
  1099. } else if (this.modelFlag == "complete") {
  1100. //一对一完成扫描
  1101. let ids = [];
  1102. ids.push(this.wcId);
  1103. uni.showLoading({
  1104. title: '加载中',
  1105. mask: true,
  1106. });
  1107. post("/workerOrder/finishSpeOrder", ids).then((res) => {
  1108. if (res.status == 200) {
  1109. uni.reLaunch({
  1110. url: "../receiptpage/receiptpage",
  1111. });
  1112. } else {
  1113. uni.hideLoading();
  1114. uni.showToast({
  1115. icon: "none",
  1116. title: res.msg || "接口获取数据失败!",
  1117. });
  1118. }
  1119. });
  1120. }
  1121. },
  1122. // 取消
  1123. cancel() {
  1124. this.models.disjunctor = false;
  1125. },
  1126. //一对多完成扫描
  1127. Scanning_complete1(id) {
  1128. this.wcId = id;
  1129. this.modelFlag = "complete1";
  1130. this.models = {
  1131. disjunctor: true,
  1132. title: "提示",
  1133. content: "是否确定标本配送完成?",
  1134. icon: "warn",
  1135. operate: {
  1136. ok: "确定",
  1137. cancel: "取消",
  1138. },
  1139. };
  1140. },
  1141. //一对一完成扫描
  1142. Scanning_complete(id) {
  1143. this.wcId = id;
  1144. this.modelFlag = "complete";
  1145. this.models = {
  1146. disjunctor: true,
  1147. title: "提示",
  1148. content: "是否确定标本配送完成?",
  1149. icon: "warn",
  1150. operate: {
  1151. ok: "确定",
  1152. cancel: "取消",
  1153. },
  1154. };
  1155. },
  1156. // 知道了
  1157. showAlert() {
  1158. uni.navigateTo({
  1159. url: "../receiptpage/receiptpage",
  1160. });
  1161. },
  1162. // 请求详细页面的数据(除标本轮巡和标本配送)
  1163. getInfo(id) {
  1164. uni.showLoading({
  1165. title: "加载中",
  1166. mask: true,
  1167. });
  1168. get("/api/fetchData/workOrder/" + id).then((res) => {
  1169. uni.hideLoading();
  1170. if (res.status == 200) {
  1171. this.infoDATA = res.data;
  1172. if(this.infoDATA.taskType.isDigitalHandover==1){
  1173. this.checkNumber(this.infoDATA);//自动弹出数量核对
  1174. }
  1175. } else {
  1176. uni.showToast({
  1177. icon: "none",
  1178. title: res.msg || "接口获取数据失败!",
  1179. });
  1180. }
  1181. });
  1182. },
  1183. // 请求详细页面的数据
  1184. getInfoBySpecimen(id) {
  1185. uni.showLoading({
  1186. title: "加载中",
  1187. mask: true,
  1188. });
  1189. post("/api/getWechatItem", {
  1190. id
  1191. }).then((res) => {
  1192. uni.hideLoading();
  1193. if (res.state == 200) {
  1194. this.infoDATA = res.data;
  1195. if(this.infoDATA.taskType.isDigitalHandover==1){
  1196. this.checkNumber(this.infoDATA);//自动弹出数量核对
  1197. }
  1198. // 计算高度
  1199. setTimeout(() => {
  1200. const query = uni.createSelectorQuery().in(this);
  1201. query
  1202. .selectAll(".page_item_infos")
  1203. .boundingClientRect((data) => {
  1204. let len = data.reduce((prev, current) => {
  1205. return prev + current.height;
  1206. }, 0);
  1207. this.animation.height(len).step();
  1208. this.animationData = this.animation.export();
  1209. })
  1210. .exec();
  1211. }, 500)
  1212. } else {
  1213. uni.showToast({
  1214. icon: "none",
  1215. title: res.msg || "接口获取数据失败!",
  1216. });
  1217. }
  1218. });
  1219. },
  1220. },
  1221. onShow() {
  1222. this.SMFlag = true;
  1223. },
  1224. onLoad(options) {
  1225. console.log(options);
  1226. if (options.accountObj && options.accountObj != "undefined") {
  1227. this.accountObj = JSON.parse(options.accountObj);
  1228. }
  1229. if (options.deptId && options.deptId != "undefined") {
  1230. this.deptId = options.deptId;
  1231. }
  1232. this.queryObj = options;
  1233. let id = options.id;
  1234. this.dataId = id; //工单ID
  1235. this.infoType = options.type1; //type类型
  1236. this.DEPTCode = options.deptCode; //二维码
  1237. this.DEPT = options.dept; //科室名称
  1238. if (
  1239. options.type == 'specimen' ||
  1240. options.type == 'specimenPlan'
  1241. ) {
  1242. this.getInfoBySpecimen(id);
  1243. } else {
  1244. this.getInfo(id);
  1245. }
  1246. // 创建动画
  1247. this.animation = uni.createAnimation({
  1248. duration: 500,
  1249. timingFunction: "ease",
  1250. });
  1251. // #ifdef APP-PLUS
  1252. webHandle("no", "app");
  1253. // #endif
  1254. // #ifdef H5
  1255. webHandle("no", "wx");
  1256. // #endif
  1257. },
  1258. onUnload() {
  1259. // 页面关闭后清空数据
  1260. this.animationData = {};
  1261. },
  1262. };
  1263. </script>
  1264. <style lang="less">
  1265. .Scanning_code {
  1266. padding: 0 20rpx;
  1267. padding-bottom: 124rpx;
  1268. .Scanning_top {
  1269. height: 340rpx;
  1270. .Scanning_top_icon {
  1271. width: 140rpx;
  1272. height: 140rpx;
  1273. margin: 0 auto;
  1274. margin-top: 36rpx;
  1275. border-radius: 50%;
  1276. line-height: 140rpx;
  1277. .cubeic-ok {
  1278. font-size: 140rpx;
  1279. color: #35b34a;
  1280. }
  1281. }
  1282. .Scanning_top_text {
  1283. text-align: center;
  1284. .text1 {
  1285. margin-top: 40rpx;
  1286. font-size: 48rpx;
  1287. }
  1288. .text2 {
  1289. margin-top: 16rpx;
  1290. font-size: 36rpx;
  1291. }
  1292. }
  1293. }
  1294. .page_item {
  1295. margin-top: 16rpx;
  1296. min-height: 356rpx;
  1297. background: #fff;
  1298. border-radius: 8rpx;
  1299. overflow: hidden;
  1300. padding: 0 16rpx;
  1301. border: 2rpx solid #e5e9ed;
  1302. .L {
  1303. width: 40rpx;
  1304. height: 40rpx;
  1305. border-radius: 50%;
  1306. background: #f9fafb;
  1307. position: relative;
  1308. left: -50rpx;
  1309. top: 66rpx;
  1310. }
  1311. .R {
  1312. width: 40rpx;
  1313. height: 40rpx;
  1314. border-radius: 50%;
  1315. background: #f9fafb;
  1316. position: relative;
  1317. float: right;
  1318. right: -50rpx;
  1319. top: 26rpx;
  1320. }
  1321. .starting {
  1322. width: 50rpx;
  1323. height: 50rpx;
  1324. color: #fff;
  1325. background: #49b856;
  1326. display: inline-block;
  1327. border-radius: 50%;
  1328. text-align: center;
  1329. line-height: 46rpx;
  1330. font-size: 32rpx;
  1331. margin-right: 6rpx;
  1332. }
  1333. .End {
  1334. width: 50rpx;
  1335. height: 50rpx;
  1336. color: #fff;
  1337. background: #39b199;
  1338. display: inline-block;
  1339. border-radius: 50%;
  1340. text-align: center;
  1341. line-height: 46rpx;
  1342. font-size: 32rpx;
  1343. margin-right: 6rpx;
  1344. }
  1345. .page_item_top {
  1346. height: 86rpx;
  1347. border-bottom: 2rpx dashed #e5e9ed;
  1348. padding: 0 16rpx;
  1349. .page_item_top_L {
  1350. height: 100%;
  1351. float: left;
  1352. line-height: 88rpx;
  1353. .emergencys {
  1354. background: #ff3b53 !important;
  1355. width: 124rpx !important;
  1356. }
  1357. .emergency {
  1358. background: #ff3b53 !important;
  1359. }
  1360. .emergency1 {
  1361. background: #49b856 !important;
  1362. }
  1363. .page_item_cont_start {
  1364. text-align: center;
  1365. height: 44rpx;
  1366. width: 104rpx;
  1367. line-height: 44rpx;
  1368. border-radius: 8rpx;
  1369. background: #49b856;
  1370. color: #fff;
  1371. display: inline-block;
  1372. .page_item_cont_start_txt {
  1373. font-size: 28rpx;
  1374. display: flex;
  1375. align-items: center;
  1376. justify-content: center;
  1377. }
  1378. }
  1379. .L_time {
  1380. color: #6cc076;
  1381. font-size: 32rpx;
  1382. }
  1383. .L_text {
  1384. font-size: 32rpx;
  1385. display: inline-block;
  1386. font-weight: 700;
  1387. margin-right: 8rpx;
  1388. }
  1389. }
  1390. .page_item_top_R {
  1391. height: 60rpx;
  1392. float: right;
  1393. padding-top: 20rpx;
  1394. font-size: 32rpx;
  1395. position: absolute;
  1396. right: 50rpx;
  1397. .L_iocn {
  1398. display: inline-block;
  1399. height: 52rpx;
  1400. line-height: 48rpx;
  1401. color: rgb(7, 134, 60);
  1402. font-size: 36rpx;
  1403. font-weight: 700;
  1404. }
  1405. }
  1406. }
  1407. .page_item_cont {
  1408. min-height: 180rpx;
  1409. padding: 0 16rpx;
  1410. text-align: left;
  1411. position: relative;
  1412. .text_big {
  1413. font-size: 32rpx;
  1414. position: absolute;
  1415. right: 16rpx;
  1416. font-weight: 700;
  1417. margin-top: 10rpx;
  1418. }
  1419. .text_big2 {
  1420. font-size: 32rpx;
  1421. position: absolute;
  1422. right: 16rpx;
  1423. font-weight: 700;
  1424. }
  1425. .line {
  1426. height: 20rpx;
  1427. width: 2rpx;
  1428. border-left: 2rpx solid #e5e9ed;
  1429. position: absolute;
  1430. top: 82rpx;
  1431. left: 40rpx;
  1432. }
  1433. .lines {
  1434. height: 40%;
  1435. width: 2rpx;
  1436. border-left: 2rpx solid #e5e9ed;
  1437. position: absolute;
  1438. top: 23%;
  1439. left: 36rpx;
  1440. }
  1441. .page_item_cont_T {
  1442. padding-top: 28rpx;
  1443. font-size: 28rpx;
  1444. .page_item_cont_title {
  1445. height: 100%;
  1446. font-size: 32rpx;
  1447. }
  1448. }
  1449. .page_item_cont_B {
  1450. padding-top: 28rpx;
  1451. margin-bottom: 28rpx;
  1452. .page_item_cont_title {
  1453. height: 60rpx;
  1454. font-size: 32rpx;
  1455. }
  1456. .page_item_cont_title1 {
  1457. height: 60rpx;
  1458. line-height: 60rpx;
  1459. font-size: 32rpx;
  1460. padding-left: 64rpx;
  1461. }
  1462. }
  1463. }
  1464. .page_item_foot {
  1465. border-top: 2rpx dashed #e5e9ed;
  1466. border-bottom: 2rpx dashed #e5e9ed;
  1467. padding: 28rpx 16rpx;
  1468. text-align: left;
  1469. .page_item_foot_text {
  1470. font-size: 32rpx;
  1471. margin-bottom: 20rpx;
  1472. display: flex;
  1473. justify-content: space-between;
  1474. align-items: center;
  1475. .text1 {
  1476. color: rgb(102, 102, 102);
  1477. }
  1478. .text2 {
  1479. font-weight: 700;
  1480. }
  1481. }
  1482. .text_padd {
  1483. padding: 0 10% 0 10%;
  1484. }
  1485. }
  1486. .page_item_info {
  1487. padding: 20rpx 16rpx;
  1488. text-align: left;
  1489. line-height: 60rpx;
  1490. font-size: 32rpx;
  1491. .page_item_info_title {
  1492. font-weight: 700;
  1493. }
  1494. .text {
  1495. float: right;
  1496. font-weight: 700;
  1497. .text_span {
  1498. color: #49b856;
  1499. }
  1500. }
  1501. }
  1502. #infos {
  1503. height: 0;
  1504. overflow: hidden;
  1505. }
  1506. .page_item_infos {
  1507. padding-bottom: 20rpx;
  1508. border-bottom: 2rpx dashed #e5e9ed;
  1509. .page_item_info2 {
  1510. text-align: left;
  1511. line-height: 60rpx;
  1512. font-size: 32rpx;
  1513. padding-left: 16rpx;
  1514. .page_item_foot_text {
  1515. font-size: 32rpx;
  1516. margin-bottom: 20rpx;
  1517. .text1 {
  1518. color: rgb(102, 102, 102);
  1519. }
  1520. .text2 {
  1521. float: right;
  1522. font-weight: 700;
  1523. }
  1524. }
  1525. }
  1526. }
  1527. #pulldown {
  1528. color: #49b856;
  1529. font-size: 36rpx;
  1530. height: 60rpx;
  1531. text-align: center;
  1532. .cubeic-pulldown {
  1533. font-size: 48rpx;
  1534. position: relative;
  1535. bottom: 6rpx;
  1536. }
  1537. }
  1538. #pullup {
  1539. color: #49b856;
  1540. font-size: 36rpx;
  1541. height: 60rpx;
  1542. text-align: center;
  1543. .cubeic-pullup {
  1544. font-size: 48rpx;
  1545. position: relative;
  1546. top: 12rpx;
  1547. }
  1548. }
  1549. }
  1550. .foot_btn2 {
  1551. position: fixed;
  1552. bottom: 0;
  1553. right: 20rpx;
  1554. left: 20rpx;
  1555. line-height: 66rpx;
  1556. height: 100rpx;
  1557. border-top: 2rpx solid #e5e9ed;
  1558. background: #f9fafb;
  1559. display: flex;
  1560. justify-content: space-between;
  1561. .btn2,
  1562. .btn3 {
  1563. height: 66rpx;
  1564. flex: 1;
  1565. background-image: linear-gradient(to right, #72c172, #3bb197);
  1566. color: #fff;
  1567. border-radius: 8rpx;
  1568. font-size: 32rpx;
  1569. margin-top: 16rpx;
  1570. margin-right: 16rpx;
  1571. text-align: center;
  1572. &:last-of-type {
  1573. margin-right: 0;
  1574. }
  1575. }
  1576. }
  1577. .foot_btn1 {
  1578. position: fixed;
  1579. bottom: 0;
  1580. right: 20rpx;
  1581. left: 20rpx;
  1582. line-height: 66rpx;
  1583. height: 100rpx;
  1584. border-top: 2rpx solid #e5e9ed;
  1585. background: #f9fafb;
  1586. display: flex;
  1587. .btn1,
  1588. .btn2 {
  1589. height: 66rpx;
  1590. flex: 1;
  1591. margin: 0 1%;
  1592. background-image: linear-gradient(to right, #72c172, #3bb197);
  1593. color: #fff;
  1594. border-radius: 8rpx;
  1595. font-size: 32rpx;
  1596. margin-top: 16rpx;
  1597. text-align: center;
  1598. }
  1599. }
  1600. }
  1601. </style>