scanning_code.vue 65 KB

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