scanning_code.vue 64 KB

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