scanning_code.vue 39 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181
  1. <template>
  2. <view class="Scanning_code" v-if="infoDATA.emergencyType">
  3. <view class="Scanning_top">
  4. <view class="Scanning_top_icon">
  5. <text class="cubeic-ok icon_transport transport-duigou"></text>
  6. </view>
  7. <view class="Scanning_top_text">
  8. <view class="text1" v-if="infoDATA.gdState.value != '6'">签到成功</view>
  9. <view class="text1" v-if="infoDATA.gdState.value == '6'">扫描成功</view>
  10. <!-- 工单状态->value -->
  11. <!-- 待抢单-2,待接单-3,带到达-4,待送达-5,待评价-6,已完成-7,执行中-8 -->
  12. <view class="text2">
  13. 您已到达
  14. <text style="font-weight: 600" v-if="
  15. infoType == 'plan-spe-ddd-1' ||
  16. infoType == 'spe-ddd-1' ||
  17. infoType == 'plan-spe-ddd-2' ||
  18. infoType == 'spe-ddd-2' ||
  19. infoType == 'drug-ddd-2' ||
  20. infoType == 'jp-ddd-2'
  21. ">{{ infoDATA.startDept.dept }}</text>
  22. <text style="font-weight: 600"
  23. v-if="infoType == 'drug-dsd-2' || infoType == 'jp-dsd-2'">{{ infoDATA.endDepts[0].dept }}</text>
  24. <text style="font-weight: 600" v-if="
  25. infoType == 'plan-spe-dsd-2' ||
  26. infoType == 'plan-spe-dsd-3' ||
  27. infoType == 'plan-spe-dsd-1' ||
  28. infoType == 'spe-dsd-2' ||
  29. infoType == 'spe-dsd-3' ||
  30. infoType == 'spe-dsd-1' ||
  31. infoType == 'ins-zxz-1' ||
  32. infoType == 'ins-dsd-1' ||
  33. infoType == 'trans-dsd-1' ||
  34. (infoType == 'qt-ddd-1' && infoDATA.gdState.value == '5') ||
  35. infoDATA.gdState.value == '6' ||
  36. infoDATA.gdState.value == '8'
  37. ">{{ DEPT }}</text>
  38. <text v-if="
  39. infoType == 'ins-zxz-1' ||
  40. infoType == 'ins-dsd-1' ||
  41. infoType == 'trans-dsd-1'
  42. ">, 请扫描患者腕带</text>
  43. <text v-if="
  44. infoType == 'plan-spe-ddd-2' ||
  45. infoType == 'spe-ddd-2' ||
  46. infoType == 'spe-ddd-1' ||
  47. infoType == 'plan-spe-ddd-1'
  48. ">,请取标本</text>
  49. <text v-if="infoType == 'drug-ddd-2' || infoType == 'jp-ddd-2'">, 请取药包</text>
  50. <text v-if="infoType == 'drug-dsd-2' || infoType == 'jp-dsd-2'">, 请放置药包</text>
  51. <text v-if="
  52. (infoType == 'spe-dsd-3' && infoDATA.gdState.value == '5') ||
  53. (infoType == 'plan-spe-dsd-3' && infoDATA.gdState.value == '5')
  54. ">,请扫描标本</text>
  55. <text v-if="
  56. infoType == 'plan-spe-dsd-1' ||
  57. infoType == 'plan-spe-dsd-2' ||
  58. (infoType == 'plan-spe-dsd-2' && infoDATA.gdState.value == '5') ||
  59. infoType == 'spe-dsd-1' ||
  60. infoType == 'spe-dsd-2' ||
  61. (infoType == 'spe-dsd-2' && infoDATA.gdState.value == '5')
  62. ">,请放置标本</text>
  63. </view>
  64. <text v-if="infoType == 'qt-dsd-1'">工单已完成。</text>
  65. </view>
  66. </view>
  67. <view class="page_item footerOtherMargin">
  68. <view class="page_item_top">
  69. <view class="page_item_top_L">
  70. <text class="L_text">单号:{{ infoDATA.gdcode }}</text>
  71. <view class="page_item_cont_start emergency1" v-if="infoDATA.emergencyType.value == 1">
  72. <text class="page_item_cont_start_txt">
  73. <text class="cubeic-star icon_transport transport-shiwujiaoxing" style="font-size: 14px"></text>
  74. {{ infoDATA.emergencyType.name }}
  75. </text>
  76. </view>
  77. <view class="page_item_cont_start emergency" v-if="infoDATA.emergencyType.value == 2">
  78. <text class="page_item_cont_start_txt">
  79. <text class="cubeic-star icon_transport transport-shiwujiaoxing" style="font-size: 14px"></text>
  80. {{ infoDATA.emergencyType.name }}
  81. </text>
  82. </view>
  83. <view class="page_item_cont_start emergencys" v-if="infoDATA.emergencyType.value == 3">
  84. <text class="page_item_cont_start_txt">
  85. <text class="cubeic-star icon_transport transport-shiwujiaoxing" style="font-size: 14px"></text>
  86. {{ infoDATA.emergencyType.name }}
  87. </text>
  88. </view>
  89. </view>
  90. <view class="page_item_top_R">
  91. <text class="L_iocn"
  92. v-if="!(infoDATA.gdState.value == '5'&&infoDATA.taskType.associationType.value == 'inspect')">{{ infoDATA.gdState.name }}</text>
  93. <text class="L_iocn"
  94. v-if="infoDATA.gdState.value == '5'&&infoDATA.taskType.associationType.value == 'inspect'">待送回</text>
  95. </view>
  96. <view class="L"></view>
  97. <view class="R"></view>
  98. </view>
  99. <view class="page_item_cont">
  100. <view class="page_item_cont_T">
  101. <view class="page_item_cont_title">
  102. <text> <text class="starting">起</text> 点科室 </text>
  103. <text class="text_big">{{ infoDATA.startDept.dept }}</text>
  104. </view>
  105. </view>
  106. <view class="line"></view>
  107. <view class="page_item_cont_B">
  108. <view class="page_item_cont_title" v-for="(dept, i) in infoDATA.middleDept" :key="'middleDept-' + i">
  109. <view v-if="infoDATA.taskType.associationType.value == 'inspect'">
  110. <text> <text class="End">检</text> 查科室 </text>
  111. <text class="text_big">{{ dept.dept }}</text>
  112. </view>
  113. </view>
  114. <view class="page_item_cont_title" v-for="(dept, i) in infoDATA.endDepts" :key="'endDepts-' + i">
  115. <view v-if="infoDATA.taskType.associationType.value != 'inspect'">
  116. <text> <text class="End">终</text> 点科室 </text>
  117. <text class="text_big">{{ dept.dept }}</text>
  118. </view>
  119. </view>
  120. </view>
  121. </view>
  122. <view class="page_item_foot">
  123. <view class="page_item_foot_text" v-if="accountObj && (infoType === 'drug-ddd-1' || infoType === 'drug-dsd-1')">
  124. <text class="text1">交接人账号</text>
  125. <text class="text2">{{ accountObj.account }}</text>
  126. </view>
  127. <view class="page_item_foot_text" v-if="accountObj && (infoType === 'drug-ddd-1' || infoType === 'drug-dsd-1')">
  128. <text class="text1">交接人姓名</text>
  129. <text class="text2">{{ accountObj.accountName }}</text>
  130. </view>
  131. <view class="page_item_foot_text">
  132. <text class="text1">状态</text>
  133. <text class="text2"
  134. v-if="!(infoDATA.gdState.value == '5'&&infoDATA.taskType.associationType.value == 'inspect')">{{ infoDATA.gdState.name }}</text>
  135. <text class="text2"
  136. v-if="infoDATA.gdState.value == '5'&&infoDATA.taskType.associationType.value == 'inspect'">待送回</text>
  137. </view>
  138. <view class="page_item_foot_text">
  139. <text class="text1">关联类型</text>
  140. <text class="text2">{{ infoDATA.taskType.associationType.name }}</text>
  141. </view>
  142. <view class="page_item_foot_text">
  143. <text class="text1">任务类型</text>
  144. <text class="text2">{{ infoDATA.taskType.taskName }}</text>
  145. </view>
  146. <view class="page_item_foot_text" v-if="infoDATA.taskType.associationType.value==='inspect'">
  147. <text class="text1">是否半程陪检</text>
  148. <text class="text2">{{ infoDATA.isHalfInspect===1?'是':'否' }}</text>
  149. </view>
  150. <view class="page_item_foot_text" v-if="infoDATA.gdState.value == '2'">
  151. <text class="text1">预计响应时间</text>
  152. <text class="text2">{{ infoDATA.estimeResponseTime || 0 }}</text>
  153. </view>
  154. <view class="page_item_foot_text" v-if="infoDATA.gdState.value == '5'">
  155. <text class="text1" v-if="!(infoDATA.taskType.associationType.value == 'inspect')">预计送达时间</text>
  156. <text class="text1" v-if="infoDATA.taskType.associationType.value == 'inspect'">预计送回时间</text>
  157. <text class="text2">{{ infoDATA.estimeCompleteTime || 0 }}</text>
  158. </view>
  159. <view class="page_item_foot_text" v-if="infoDATA.gdState.value == '4'">
  160. <text class="text1">预计到达时间</text>
  161. <text class="text2">{{ infoDATA.estimateArriveTime || 0 }}</text>
  162. </view>
  163. <view class="page_item_foot_text">
  164. <text class="text1">创建时间</text>
  165. <text class="text2">{{ infoDATA.startTime }}</text>
  166. </view>
  167. <view class="page_item_foot_text" v-if="
  168. infoDATA.taskType.associationType.value == 'inspect' ||
  169. infoDATA.taskType.associationType.value == 'patientTransport'
  170. ">
  171. <text class="text1">携带设备</text>
  172. <text class="text2">{{ infoDATA.goods || "暂无" }}</text>
  173. </view>
  174. <view class="page_item_foot_text" v-if="
  175. infoDATA.taskType.associationType.value == 'inspect' ||
  176. infoDATA.taskType.associationType.value == 'patientTransport'
  177. ">
  178. <text class="text1">患者姓名</text>
  179. <text class="text2">{{ infoDATA.patient.patientName }}({{
  180. infoDATA.patient.patientCode
  181. }})</text>
  182. </view>
  183. </view>
  184. <!-- 药包 -->
  185. <view class="page_item_info" v-if="infoDATA.taskType.associationType.value == 'drugsBag'">
  186. <text class="page_item_info_title">药包信息</text>
  187. <text class="text">#{{ infoDATA.drugs.packid }}</text>
  188. </view>
  189. <!-- 标本 送达-->
  190. <view class="page_item_info" v-if="
  191. infoDATA.taskType.associationType.value == 'specimen' ||
  192. infoDATA.taskType.associationType.value == 'specimenPlan'
  193. ">
  194. <text class="page_item_info_title">标本信息</text>
  195. <!-- <text class="text" v-if="infoType=='plan-spe-ddd-1'||infoType=='plan-spe-dsd-2'||infoType=='plan-spe-dsd-3'&&infoDATA.gdState.value=='5'||infoType=='spe-ddd-1'||infoType=='spe-dsd-2'||infoType=='spe-dsd-3'&&infoDATA.gdState.value=='5'"> -->
  196. <!-- <text class="text" v-if="infoType=='plan-spe-ddd-1'||infoType=='plan-spe-dsd-2'||infoType=='plan-spe-dsd-3'&&infoDATA.gdState.value=='5'||infoType=='spe-ddd-1'||infoType=='spe-dsd-2'"> -->
  197. <text class="text" v-if="
  198. infoType == 'plan-spe-ddd-1' ||
  199. infoType == 'plan-spe-dsd-2' ||
  200. infoType == 'spe-ddd-1' ||
  201. infoType == 'spe-dsd-2'
  202. ">
  203. 预计标本总数
  204. <text class="text_span">{{ infoDATA.expectReceiveNum || 0 }}</text>
  205. </text>
  206. <text class="text" v-if="
  207. (infoType == 'plan-spe-ddd-2' && infoDATA.gdState.value == '4') ||
  208. (infoType == 'spe-ddd-2' && infoDATA.gdState.value == '4')
  209. ">
  210. 预计标本总数
  211. <text>{{ infoDATA.expectReceiveNum || 0 }}</text>
  212. </text>
  213. <text class="text" v-if="
  214. (infoType == 'plan-spe-dsd-2' && infoDATA.gdState.value == '6') ||
  215. (infoType == 'spe-dsd-2' && infoDATA.gdState.value == '6')
  216. ">
  217. 已扫描标本总数
  218. <text>{{ infoDATA.actualReceiveNum || 0 }}</text>
  219. </text>
  220. <text class="text" v-if="
  221. (infoType == 'plan-spe-dsd-3' && infoDATA.gdState.value == '5') ||
  222. (infoType == 'spe-dsd-3' && infoDATA.gdState.value == '5')
  223. ">
  224. 已收取标本总数
  225. <text>{{ infoDATA.actualReceiveNum || 0 }}</text>
  226. </text>
  227. </view>
  228. <!-- 静配 -->
  229. <view class="page_item_info" v-if="infoDATA.taskType.associationType.value == 'jPBag'">
  230. <text class="page_item_info_title">静配信息</text>
  231. <text class="text">#{{ infoDATA.staticDistri.packid }}</text>
  232. </view>
  233. <!-- 陪检 -->
  234. <view v-if="infoDATA.taskType.associationType.value == 'inspect'">
  235. <view class="page_item_info">
  236. <text class="page_item_info_title">检查信息</text>
  237. </view>
  238. <view id="infos" :animation="animationData">
  239. <view class="page_item_infos" v-for="(item, i) of infoDATA.checkList" :key="i">
  240. <view class="page_item_info2">
  241. <view class="page_item_foot_text">
  242. <text class="text1">检查科室</text>
  243. <text class="text2">{{ item.execDept.dept }}</text>
  244. </view>
  245. <view class="page_item_foot_text">
  246. <text class="text1">检查项</text>
  247. <text class="text2">{{ item.inspectName }}</text>
  248. </view>
  249. <view class="page_item_foot_text">
  250. <text class="text1">预约时间</text>
  251. <text class="text2">{{ item.yyTime || "-" }}</text>
  252. </view>
  253. </view>
  254. </view>
  255. </view>
  256. <view id="pulldown" @click="show('show')" v-if="showType == 'hiddle'">
  257. 点击可查看检查详情
  258. <text class="cubeic-pulldown icon_transport transport-paixujiantouxia"></text>
  259. </view>
  260. <view id="pullup" @click="show('hiddle')" v-if="showType == 'show'">
  261. 点击可收起检查详情
  262. <text class="cubeic-pullup icon_transport transport-paixujiantoushang"></text>
  263. </view>
  264. </view>
  265. </view>
  266. <view class="foot_btn2 footerPadding" v-if="infoType == 'plan-spe-ddd-1' || infoType == 'spe-ddd-1'">
  267. <view class="btn2" @click="Scanning_complete(dataId)">知道了</view>
  268. </view>
  269. <view class="foot_btn1 footerPadding" v-if="
  270. (infoType == 'plan-spe-dsd-1' && infoDATA.gdState.value == '5') ||
  271. (infoType == 'spe-dsd-1' && infoDATA.gdState.value == '5')
  272. ">
  273. <view class="btn1" @click="Scanning_complete(dataId)">工单完成</view>
  274. <view class="btn2" @click="showAlert">继续配送</view>
  275. </view>
  276. <view class="foot_btn1 footerPadding" v-if="
  277. (infoType == 'plan-spe-ddd-2' && infoDATA.gdState.value == '4') ||
  278. (infoType == 'spe-ddd-2' && infoDATA.gdState.value == '4')
  279. ">
  280. <view class="btn1" @click="Scanning_again(dataId)" v-if="
  281. infoDATA.taskType.associationType.value == 'specimen' ||
  282. infoDATA.taskType.associationType.value == 'specimenPlan'
  283. ">扫描标本</view>
  284. <view class="btn1" @click="Scanning_again(dataId)" v-if="
  285. infoDATA.taskType.associationType.value == 'jPBag' ||
  286. infoDATA.taskType.associationType.value == 'drugsBag'
  287. ">扫描药包</view>
  288. </view>
  289. <view class="foot_btn1 footerPadding" v-if="
  290. (infoType == 'plan-spe-dsd-3' && infoDATA.gdState.value == '5') ||
  291. (infoType == 'spe-dsd-3' && infoDATA.gdState.value == '5')
  292. ">
  293. <view class="btn1" @click="Scanning_again(dataId)" v-if="
  294. infoDATA.taskType.associationType.value == 'specimen' ||
  295. infoDATA.taskType.associationType.value == 'specimenPlan'
  296. ">扫描标本</view>
  297. <view class="btn1" @click="Scanning_again(dataId)" v-if="
  298. infoDATA.taskType.associationType.value == 'jPBag' ||
  299. infoDATA.taskType.associationType.value == 'drugsBag'
  300. ">扫描药包</view>
  301. <view class="btn2" @click="Scanning_complete1(dataId)">完成工单</view>
  302. </view>
  303. <view class="foot_btn2 footerPadding" v-if="
  304. infoType == 'plan-spe-ddd-2' ||
  305. infoType == 'plan-spe-dsd-2' ||
  306. (infoType == 'plan-spe-dsd-3' && infoDATA.gdState.value == '5') ||
  307. infoType == 'spe-ddd-2' ||
  308. infoType == 'spe-dsd-2' ||
  309. (infoType == 'spe-dsd-3' && infoDATA.gdState.value == '5')
  310. ">
  311. <view class="btn3" @click="Scanning_again(dataId)">继续扫描</view>
  312. <view class="btn3" @click="hand_again(dataId)">手动录入</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>
  337. <view class="foot_btn2 footerPadding" v-if="
  338. infoType == 'drug-ddd-1' ||
  339. infoType == 'drug-dsd-1' ||
  340. infoType == 'jp-ddd-1' ||
  341. infoType == 'jp-dsd-1'
  342. ">
  343. <view class="btn2" @click="showAlert">知道了</view>
  344. </view>
  345. <view class="foot_btn2 footerPadding" v-if="infoType == 'qt-ddd-1' && infoDATA.gdState.value == '5'">
  346. <view class="btn2" @click="showAlert">知道了</view>
  347. </view>
  348. <!-- 弹窗 -->
  349. <showModel :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content"
  350. @ok="ok" @cancel="cancel" :operate="models.operate"></showModel>
  351. <!-- 手动查询标本弹窗 -->
  352. <handViewSpecimen v-if="speModels.disjunctor" :title="speModels.title" :disjunctor="speModels.disjunctor"
  353. @ok="speOk" @cancel="speCancel">
  354. </handViewSpecimen>
  355. </view>
  356. </template>
  357. <script>
  358. import showModel from "../../components/showModel/showModel.vue";
  359. import {
  360. get,
  361. post,
  362. SM,
  363. webHandle
  364. } from "../../http/http.js";
  365. import {
  366. photographTool
  367. } from "../../tools/photograph.js";
  368. export default {
  369. data() {
  370. return {
  371. currentCode: '', //当前小扫描的科室二维码
  372. // 手动查询标本弹窗model
  373. speModels: {
  374. disjunctor: false,
  375. },
  376. SMFlag: true,
  377. // 交接人信息
  378. accountObj: undefined,
  379. deptId: undefined,
  380. // 完成工单的id
  381. wcId: "",
  382. // 弹窗model
  383. models: {
  384. disjunctor: false,
  385. },
  386. modelFlag: "", //完成工单标识
  387. animationData: {},
  388. showType: "hiddle",
  389. infoDATA: {},
  390. infoType: "",
  391. DEPTCode: "",
  392. DEPT: "",
  393. dataId: "",
  394. queryObj: {}, //路由传过来的对象
  395. };
  396. },
  397. methods: {
  398. // 手动查询标本-确认
  399. speOk(data) {
  400. console.log(data);
  401. if (!data.id) {
  402. //没有查询到标本
  403. uni.showModal({
  404. title: '提示',
  405. content: "没有查询到标本!",
  406. showCancel: false,
  407. success: function(res) {
  408. if (res.confirm) {
  409. console.log('用户点击确定');
  410. } else if (res.cancel) {
  411. console.log('用户点击取消');
  412. }
  413. }
  414. });
  415. return;
  416. }
  417. this.speModels.disjunctor = false;
  418. this.hand_scanning_common(data.scode, 'hand');
  419. },
  420. // 手动查询标本-取消
  421. speCancel() {
  422. this.speModels.disjunctor = false;
  423. },
  424. // 手动查询标本弹窗
  425. showHandViewSpecimen() {
  426. this.speModels = {
  427. title: '填写标本编码',
  428. disjunctor: true,
  429. }
  430. },
  431. // 手动录入标本
  432. hand_again(id) {
  433. this.showHandViewSpecimen();
  434. },
  435. // 拍照
  436. photograph(data, obj) {
  437. photographTool(data, obj);
  438. },
  439. // 手动输入标本和扫码公共方法,type----scan是扫码,hand是手动录入
  440. hand_scanning_common(ress1, type) {
  441. // ----------------
  442. uni.showLoading({
  443. title: "加载中",
  444. mask: true,
  445. });
  446. //检验二维码的有效性
  447. post("/dept/scanning", {
  448. content: ress1,
  449. }).then((result) => {
  450. this.SMFlag = true;
  451. if (result.state == 200 || result.state == 201) {
  452. this.currentCode = result.code;
  453. let codes = result.code;
  454. if (codes) {
  455. let speCode = codes;
  456. let data = {
  457. code: speCode,
  458. type: this.infoType,
  459. deptCode: this.DEPTCode,
  460. ids: [this.dataId],
  461. };
  462. let postType = "";
  463. if (
  464. this.infoDATA.taskType.associationType.value == "jPBag" ||
  465. this.infoDATA.taskType.associationType.value == "drugsBag"
  466. ) {
  467. postType = "handleDrugsAndJp";
  468. delete data.ids;
  469. if (this.accountObj) {
  470. data.handover = this.accountObj.accountId;
  471. }
  472. if (this.queryObj.grabOrders) {
  473. data.grabOrders = '666';
  474. }
  475. data.deptId = this.deptId;
  476. }
  477. if (this.infoDATA.taskType.associationType.value == "specimen") {
  478. data["speCode"] = data.code;
  479. delete data.code;
  480. postType = "handleSpes";
  481. }
  482. if (
  483. this.infoDATA.taskType.associationType.value == "specimenPlan"
  484. ) {
  485. data["speCode"] = data.code;
  486. delete data.code;
  487. postType = "handlePlanSpes";
  488. }
  489. if (this.infoDATA.taskType.associationType.value == "inspect") {
  490. // delete data.type;//seimin
  491. postType = "handleIns";
  492. }
  493. if (
  494. this.infoDATA.taskType.associationType.value ==
  495. "patientTransport"
  496. ) {
  497. postType = "handleTrans";
  498. }
  499. //扫描
  500. post("/workerOrder/" + postType, data).then((ress) => {
  501. console.log(ress, 1111)
  502. if (ress.status == 200) {
  503. //标本和标本轮巡工单,扫描标本后会自动调用摄像头,继续扫描,直到status不是200
  504. if (this.infoDATA.taskType.associationType.value == 'specimen' || this.infoDATA.taskType
  505. .associationType.value == 'specimenPlan') {
  506. if (type === 'scan') {
  507. this.Scanning_again(this.dataId);
  508. } else if (type === 'hand') {
  509. // this.hand_again(this.dataId);
  510. }
  511. }
  512. if (
  513. this.infoDATA.taskType.associationType.value == "drugsBag"
  514. ) {
  515. uni.hideLoading();
  516. // --------start----------
  517. uni.navigateTo({
  518. url: `../scanning_Result/scanning_Result?type=${
  519. this.queryObj.type
  520. }&type1=${
  521. this.queryObj.type1
  522. }&infoData=${encodeURIComponent(
  523. JSON.stringify(ress.data)
  524. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  525. this.queryObj.deptCode
  526. }&dept=${
  527. this.queryObj.dept
  528. }&id=${this.dataId}&model=${encodeURIComponent(
  529. JSON.stringify(ress)
  530. )}&accountObj=${encodeURIComponent(JSON.stringify(this.accountObj))}&deptId=${this.deptId}&handover=${this.handover}`,
  531. });
  532. // ------------end------------
  533. } else {
  534. uni.hideLoading();
  535. // --------start----------
  536. // 患者陪检执行中或待送达,患者转运待送达
  537. if (
  538. ress.type == "ins-zxz-1" ||
  539. ress.type == "ins-dsd-1" ||
  540. ress.type == "trans-dsd-1"
  541. ) {
  542. console.log(ress.patientName, "code");
  543. uni.navigateTo({
  544. url: `../scanning_Result/scanning_Result?type=${
  545. this.queryObj.type
  546. }&type1=${
  547. this.queryObj.type1
  548. }&infoData=${encodeURIComponent(
  549. JSON.stringify(ress.data)
  550. )}&status=${ress.status}&msg=${ress.msg}&patient=${
  551. ress.patient
  552. }&patientCode=${ress.patientCode}&deptName=${
  553. ress.deptName
  554. }&bedNum=${ress.bedNum}&deptCode=${
  555. this.queryObj.deptCode
  556. }&dept=${
  557. this.queryObj.dept
  558. }&id=${this.dataId}&model=${encodeURIComponent(
  559. JSON.stringify(ress)
  560. )}`,
  561. });
  562. } else {
  563. uni.navigateTo({
  564. url: `../scanning_Result/scanning_Result?type=${
  565. this.queryObj.type
  566. }&type1=${
  567. this.queryObj.type1
  568. }&infoData=${encodeURIComponent(
  569. JSON.stringify(ress.data)
  570. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  571. this.queryObj.deptCode
  572. }&dept=${
  573. this.queryObj.dept
  574. }&id=${this.dataId}&model=${encodeURIComponent(
  575. JSON.stringify(ress)
  576. )}&speNum=${ress.specimenCount}&scanOrHand=${type}`,
  577. });
  578. }
  579. // ------------end------------
  580. }
  581. } else {
  582. uni.hideLoading();
  583. uni.navigateTo({
  584. url: `../scanning_Result/scanning_Result?type=${
  585. this.queryObj.type
  586. }&type1=${this.queryObj.type1}&status=${ress.status}&msg=${
  587. ress.msg
  588. }&deptCode=${this.queryObj.deptCode}&dept=${
  589. this.queryObj.dept
  590. }&id=${this.dataId}&model=${encodeURIComponent(
  591. JSON.stringify(ress)
  592. )}&accountObj=${encodeURIComponent(JSON.stringify(this.accountObj))}&deptId=${this.deptId}&handover=${this.handover}&scanOrHand=${type}&qrcode=${this.currentCode}`,
  593. });
  594. }
  595. });
  596. }
  597. } else {
  598. uni.hideLoading();
  599. uni.showToast({
  600. icon: "none",
  601. title: "请求失败!",
  602. });
  603. }
  604. });
  605. // ------------------------------
  606. },
  607. // 扫描
  608. Scanning_again(id) {
  609. if (!this.SMFlag) {
  610. return;
  611. }
  612. this.SMFlag = false;
  613. SM().then((ress1) => {
  614. this.hand_scanning_common(ress1, 'scan');
  615. }).catch(err => {
  616. this.SMFlag = true;
  617. });
  618. },
  619. show(type) {
  620. this.showType = type;
  621. if (type === "show") {
  622. //展开
  623. // 计算高度
  624. const query = uni.createSelectorQuery().in(this);
  625. query
  626. .selectAll(".page_item_infos")
  627. .boundingClientRect((data) => {
  628. let len = data.reduce((prev, current) => {
  629. return prev + current.height;
  630. }, 0);
  631. this.animation.height(len).step();
  632. this.animationData = this.animation.export();
  633. })
  634. .exec();
  635. } else if (type === "hiddle") {
  636. this.animation.height(0).step();
  637. this.animationData = this.animation.export();
  638. }
  639. },
  640. // 确定
  641. ok() {
  642. this.models.disjunctor = false;
  643. if (this.modelFlag == "complete1") {
  644. //一对多完成扫描
  645. let ids = [];
  646. ids.push(this.wcId);
  647. let data = {
  648. type: this.infoType,
  649. ids,
  650. };
  651. uni.showLoading({
  652. title: '加载中',
  653. mask: true,
  654. });
  655. post("/workerOrder/finishSpes", data).then((res) => {
  656. if (res.status == 200) {
  657. uni.reLaunch({
  658. url: "../receiptpage/receiptpage",
  659. });
  660. } else {
  661. uni.hideLoading();
  662. uni.showToast({
  663. icon: "none",
  664. title: "请求失败!",
  665. });
  666. }
  667. });
  668. } else if (this.modelFlag == "complete") {
  669. //一对一完成扫描
  670. let ids = [];
  671. ids.push(this.wcId);
  672. uni.showLoading({
  673. title: '加载中',
  674. mask: true,
  675. });
  676. post("/workerOrder/finishSpeOrder", ids).then((res) => {
  677. if (res.status == 200) {
  678. uni.reLaunch({
  679. url: "../receiptpage/receiptpage",
  680. });
  681. } else {
  682. uni.hideLoading();
  683. uni.showToast({
  684. icon: "none",
  685. title: "请求失败!",
  686. });
  687. }
  688. });
  689. }
  690. },
  691. // 取消
  692. cancel() {
  693. this.models.disjunctor = false;
  694. },
  695. //一对多完成扫描
  696. Scanning_complete1(id) {
  697. this.wcId = id;
  698. this.modelFlag = "complete1";
  699. this.models = {
  700. disjunctor: true,
  701. title: "提示",
  702. content: "是否确定标本配送完成?",
  703. icon: "warn",
  704. operate: {
  705. ok: "确定",
  706. cancel: "取消",
  707. },
  708. };
  709. },
  710. //一对一完成扫描
  711. Scanning_complete(id) {
  712. this.wcId = id;
  713. this.modelFlag = "complete";
  714. this.models = {
  715. disjunctor: true,
  716. title: "提示",
  717. content: "是否确定标本配送完成?",
  718. icon: "warn",
  719. operate: {
  720. ok: "确定",
  721. cancel: "取消",
  722. },
  723. };
  724. },
  725. // 知道了
  726. showAlert() {
  727. uni.navigateTo({
  728. url: "../receiptpage/receiptpage",
  729. });
  730. },
  731. // 工单详情
  732. getInfo(id) {
  733. uni.showLoading({
  734. title: "加载中",
  735. mask: true,
  736. });
  737. get("/api/fetchData/workOrder/" + id).then((res) => {
  738. uni.hideLoading();
  739. if (res.status == 200) {
  740. this.infoDATA = res.data;
  741. } else {
  742. uni.showToast({
  743. icon: "none",
  744. title: "请求失败!",
  745. });
  746. }
  747. });
  748. },
  749. },
  750. onShow() {
  751. this.SMFlag = true;
  752. },
  753. onLoad(options) {
  754. console.log(options);
  755. if (options.accountObj && options.accountObj != "undefined") {
  756. this.accountObj = JSON.parse(options.accountObj);
  757. }
  758. if (options.deptId && options.deptId != "undefined") {
  759. this.deptId = options.deptId;
  760. }
  761. this.queryObj = options;
  762. let id = options.id;
  763. this.dataId = id; //工单ID
  764. this.infoType = options.type1; //type类型
  765. this.DEPTCode = options.deptCode; //二维码
  766. this.DEPT = options.dept; //科室名称
  767. this.getInfo(this.dataId);
  768. // 创建动画
  769. this.animation = uni.createAnimation({
  770. duration: 500,
  771. timingFunction: "ease",
  772. });
  773. // #ifdef APP-PLUS
  774. webHandle("no", "app");
  775. // #endif
  776. // #ifdef H5
  777. webHandle("no", "wx");
  778. // #endif
  779. },
  780. onUnload() {
  781. // 页面关闭后清空数据
  782. this.animationData = {};
  783. },
  784. };
  785. </script>
  786. <style lang="less">
  787. .Scanning_code {
  788. padding: 0 20rpx;
  789. padding-bottom: 124rpx;
  790. .Scanning_top {
  791. height: 340rpx;
  792. .Scanning_top_icon {
  793. width: 140rpx;
  794. height: 140rpx;
  795. margin: 0 auto;
  796. margin-top: 36rpx;
  797. border-radius: 50%;
  798. line-height: 140rpx;
  799. .cubeic-ok {
  800. font-size: 140rpx;
  801. color: #35b34a;
  802. }
  803. }
  804. .Scanning_top_text {
  805. text-align: center;
  806. .text1 {
  807. margin-top: 40rpx;
  808. font-size: 48rpx;
  809. }
  810. .text2 {
  811. margin-top: 16rpx;
  812. font-size: 36rpx;
  813. }
  814. }
  815. }
  816. .page_item {
  817. margin-top: 16rpx;
  818. min-height: 356rpx;
  819. background: #fff;
  820. border-radius: 8rpx;
  821. overflow: hidden;
  822. padding: 0 16rpx;
  823. border: 2rpx solid #e5e9ed;
  824. .L {
  825. width: 40rpx;
  826. height: 40rpx;
  827. border-radius: 50%;
  828. background: #f9fafb;
  829. position: relative;
  830. left: -50rpx;
  831. top: 66rpx;
  832. }
  833. .R {
  834. width: 40rpx;
  835. height: 40rpx;
  836. border-radius: 50%;
  837. background: #f9fafb;
  838. position: relative;
  839. float: right;
  840. right: -50rpx;
  841. top: 26rpx;
  842. }
  843. .starting {
  844. width: 50rpx;
  845. height: 50rpx;
  846. color: #fff;
  847. background: #49b856;
  848. display: inline-block;
  849. border-radius: 50%;
  850. text-align: center;
  851. line-height: 46rpx;
  852. font-size: 32rpx;
  853. margin-right: 6rpx;
  854. }
  855. .End {
  856. width: 50rpx;
  857. height: 50rpx;
  858. color: #fff;
  859. background: #39b199;
  860. display: inline-block;
  861. border-radius: 50%;
  862. text-align: center;
  863. line-height: 46rpx;
  864. font-size: 32rpx;
  865. margin-right: 6rpx;
  866. }
  867. .page_item_top {
  868. height: 86rpx;
  869. border-bottom: 2rpx dashed #e5e9ed;
  870. padding: 0 16rpx;
  871. .page_item_top_L {
  872. height: 100%;
  873. float: left;
  874. line-height: 88rpx;
  875. .emergencys {
  876. background: #ff3b53 !important;
  877. width: 124rpx !important;
  878. }
  879. .emergency {
  880. background: #ff3b53 !important;
  881. }
  882. .emergency1 {
  883. background: #49b856 !important;
  884. }
  885. .page_item_cont_start {
  886. text-align: center;
  887. height: 44rpx;
  888. width: 104rpx;
  889. line-height: 44rpx;
  890. border-radius: 8rpx;
  891. background: #49b856;
  892. color: #fff;
  893. display: inline-block;
  894. .page_item_cont_start_txt {
  895. font-size: 28rpx;
  896. display: flex;
  897. align-items: center;
  898. justify-content: center;
  899. }
  900. }
  901. .L_time {
  902. color: #6cc076;
  903. font-size: 32rpx;
  904. }
  905. .L_text {
  906. font-size: 32rpx;
  907. display: inline-block;
  908. font-weight: 700;
  909. margin-right: 8rpx;
  910. }
  911. }
  912. .page_item_top_R {
  913. height: 60rpx;
  914. float: right;
  915. padding-top: 20rpx;
  916. font-size: 32rpx;
  917. position: absolute;
  918. right: 50rpx;
  919. .L_iocn {
  920. display: inline-block;
  921. height: 52rpx;
  922. line-height: 48rpx;
  923. color: rgb(7, 134, 60);
  924. font-size: 36rpx;
  925. font-weight: 700;
  926. }
  927. }
  928. }
  929. .page_item_cont {
  930. min-height: 180rpx;
  931. padding: 0 16rpx;
  932. text-align: left;
  933. position: relative;
  934. .text_big {
  935. font-size: 32rpx;
  936. position: absolute;
  937. right: 16rpx;
  938. font-weight: 700;
  939. margin-top: 10rpx;
  940. }
  941. .text_big2 {
  942. font-size: 32rpx;
  943. position: absolute;
  944. right: 16rpx;
  945. font-weight: 700;
  946. }
  947. .line {
  948. height: 20rpx;
  949. width: 2rpx;
  950. border-left: 2rpx solid #e5e9ed;
  951. position: absolute;
  952. top: 82rpx;
  953. left: 40rpx;
  954. }
  955. .lines {
  956. height: 40%;
  957. width: 2rpx;
  958. border-left: 2rpx solid #e5e9ed;
  959. position: absolute;
  960. top: 23%;
  961. left: 36rpx;
  962. }
  963. .page_item_cont_T {
  964. padding-top: 28rpx;
  965. font-size: 28rpx;
  966. .page_item_cont_title {
  967. height: 100%;
  968. font-size: 32rpx;
  969. }
  970. }
  971. .page_item_cont_B {
  972. padding-top: 28rpx;
  973. margin-bottom: 28rpx;
  974. .page_item_cont_title {
  975. height: 60rpx;
  976. font-size: 32rpx;
  977. }
  978. .page_item_cont_title1 {
  979. height: 60rpx;
  980. line-height: 60rpx;
  981. font-size: 32rpx;
  982. padding-left: 64rpx;
  983. }
  984. }
  985. }
  986. .page_item_foot {
  987. border-top: 2rpx dashed #e5e9ed;
  988. border-bottom: 2rpx dashed #e5e9ed;
  989. padding: 28rpx 16rpx;
  990. text-align: left;
  991. .page_item_foot_text {
  992. font-size: 32rpx;
  993. margin-bottom: 20rpx;
  994. display: flex;
  995. justify-content: space-between;
  996. align-items: center;
  997. .text1 {
  998. color: rgb(102, 102, 102);
  999. }
  1000. .text2 {
  1001. font-weight: 700;
  1002. }
  1003. }
  1004. .text_padd {
  1005. padding: 0 10% 0 10%;
  1006. }
  1007. }
  1008. .page_item_info {
  1009. padding: 20rpx 16rpx;
  1010. text-align: left;
  1011. line-height: 60rpx;
  1012. font-size: 32rpx;
  1013. .page_item_info_title {
  1014. font-weight: 700;
  1015. }
  1016. .text {
  1017. float: right;
  1018. font-weight: 700;
  1019. .text_span {
  1020. color: #49b856;
  1021. }
  1022. }
  1023. }
  1024. #infos {
  1025. height: 0;
  1026. overflow: hidden;
  1027. }
  1028. .page_item_infos {
  1029. padding-bottom: 20rpx;
  1030. border-bottom: 2rpx dashed #e5e9ed;
  1031. .page_item_info2 {
  1032. text-align: left;
  1033. line-height: 60rpx;
  1034. font-size: 32rpx;
  1035. padding-left: 16rpx;
  1036. .page_item_foot_text {
  1037. font-size: 32rpx;
  1038. margin-bottom: 20rpx;
  1039. .text1 {
  1040. color: rgb(102, 102, 102);
  1041. }
  1042. .text2 {
  1043. float: right;
  1044. font-weight: 700;
  1045. }
  1046. }
  1047. }
  1048. }
  1049. #pulldown {
  1050. color: #49b856;
  1051. font-size: 36rpx;
  1052. height: 60rpx;
  1053. text-align: center;
  1054. .cubeic-pulldown {
  1055. font-size: 48rpx;
  1056. position: relative;
  1057. bottom: 6rpx;
  1058. }
  1059. }
  1060. #pullup {
  1061. color: #49b856;
  1062. font-size: 36rpx;
  1063. height: 60rpx;
  1064. text-align: center;
  1065. .cubeic-pullup {
  1066. font-size: 48rpx;
  1067. position: relative;
  1068. top: 12rpx;
  1069. }
  1070. }
  1071. }
  1072. .foot_btn2 {
  1073. position: fixed;
  1074. bottom: 0;
  1075. right: 20rpx;
  1076. left: 20rpx;
  1077. line-height: 66rpx;
  1078. height: 100rpx;
  1079. border-top: 2rpx solid #e5e9ed;
  1080. background: #f9fafb;
  1081. display: flex;
  1082. justify-content: space-between;
  1083. .btn2,
  1084. .btn3 {
  1085. height: 66rpx;
  1086. flex: 1;
  1087. background-image: linear-gradient(to right, #72c172, #3bb197);
  1088. color: #fff;
  1089. border-radius: 8rpx;
  1090. font-size: 32rpx;
  1091. margin-top: 16rpx;
  1092. margin-right: 16rpx;
  1093. text-align: center;
  1094. &:last-of-type {
  1095. margin-right: 0;
  1096. }
  1097. }
  1098. }
  1099. .foot_btn1 {
  1100. position: fixed;
  1101. bottom: 0;
  1102. right: 20rpx;
  1103. left: 20rpx;
  1104. line-height: 66rpx;
  1105. height: 100rpx;
  1106. border-top: 2rpx solid #e5e9ed;
  1107. background: #f9fafb;
  1108. .btn1,
  1109. .btn2 {
  1110. height: 66rpx;
  1111. flex: 1;
  1112. background-image: linear-gradient(to right, #72c172, #3bb197);
  1113. color: #fff;
  1114. border-radius: 8rpx;
  1115. font-size: 32rpx;
  1116. margin-top: 16rpx;
  1117. text-align: center;
  1118. }
  1119. }
  1120. }
  1121. </style>