scanning_code.vue 60 KB

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