scanning_code.vue 40 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217
  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="showHandViewSpecimen()">手动录入</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. </view>
  361. </template>
  362. <script>
  363. import showModel from "../../components/showModel/showModel.vue";
  364. import {
  365. get,
  366. post,
  367. SM,
  368. webHandle
  369. } from "../../http/http.js";
  370. import {
  371. photographTool
  372. } from "../../tools/photograph.js";
  373. export default {
  374. data() {
  375. return {
  376. currentCode: '', //当前小扫描的科室二维码
  377. // 手动查询标本弹窗model
  378. speModels: {
  379. disjunctor: false,
  380. },
  381. // 手动查询药品弹窗model
  382. drugbagModels: {
  383. disjunctor: false,
  384. },
  385. SMFlag: true,
  386. // 交接人信息
  387. accountObj: undefined,
  388. deptId: undefined,
  389. // 完成工单的id
  390. wcId: "",
  391. // 弹窗model
  392. models: {
  393. disjunctor: false,
  394. },
  395. modelFlag: "", //完成工单标识
  396. animationData: {},
  397. showType: "hiddle",
  398. infoDATA: {},
  399. infoType: "",
  400. DEPTCode: "",
  401. DEPT: "",
  402. dataId: "",
  403. queryObj: {}, //路由传过来的对象
  404. };
  405. },
  406. methods: {
  407. // 手动查询药品-确认
  408. drugbagOk(data) {
  409. console.log(data);
  410. if (!data.id) {
  411. //没有查询到药品
  412. uni.showModal({
  413. title: '提示',
  414. content: "没有查询到发药单号!",
  415. showCancel: false,
  416. success: function(res) {
  417. if (res.confirm) {
  418. console.log('用户点击确定');
  419. } else if (res.cancel) {
  420. console.log('用户点击取消');
  421. }
  422. }
  423. });
  424. return;
  425. }
  426. this.drugbagModels.disjunctor = false;
  427. this.hand_scanning_common(data.packid, 'hand');
  428. },
  429. // 手动查询药品-取消
  430. drugbagCancel() {
  431. this.drugbagModels.disjunctor = false;
  432. },
  433. // 手动查询药品弹窗
  434. showHandViewDrugsbag() {
  435. this.drugbagModels = {
  436. title: '填写发药单号',
  437. disjunctor: true,
  438. }
  439. },
  440. // 手动查询标本-确认
  441. speOk(data) {
  442. console.log(data);
  443. if (!data.id) {
  444. //没有查询到标本
  445. uni.showModal({
  446. title: '提示',
  447. content: "没有查询到标本!",
  448. showCancel: false,
  449. success: function(res) {
  450. if (res.confirm) {
  451. console.log('用户点击确定');
  452. } else if (res.cancel) {
  453. console.log('用户点击取消');
  454. }
  455. }
  456. });
  457. return;
  458. }
  459. this.speModels.disjunctor = false;
  460. this.hand_scanning_common(data.scode, 'hand');
  461. },
  462. // 手动查询标本-取消
  463. speCancel() {
  464. this.speModels.disjunctor = false;
  465. },
  466. // 手动查询标本弹窗
  467. showHandViewSpecimen() {
  468. this.speModels = {
  469. title: '填写标本编码',
  470. disjunctor: true,
  471. }
  472. },
  473. // 拍照
  474. photograph(data, obj) {
  475. photographTool(data, obj);
  476. },
  477. // 手动输入标本和扫码公共方法,type----scan是扫码,hand是手动录入
  478. hand_scanning_common(ress1, type) {
  479. // ----------------
  480. uni.showLoading({
  481. title: "加载中",
  482. mask: true,
  483. });
  484. //检验二维码的有效性
  485. post("/dept/scanning", {
  486. content: ress1,
  487. }).then((result) => {
  488. this.SMFlag = true;
  489. if (result.state == 200 || result.state == 201) {
  490. this.currentCode = result.code;
  491. let codes = result.code;
  492. if (codes) {
  493. let speCode = codes;
  494. let data = {
  495. code: speCode,
  496. type: this.infoType,
  497. deptCode: this.DEPTCode,
  498. ids: [this.dataId],
  499. };
  500. let postType = "";
  501. if (
  502. this.infoDATA.taskType.associationType.value == "jPBag" ||
  503. this.infoDATA.taskType.associationType.value == "drugsBag"
  504. ) {
  505. postType = "handleDrugsAndJp";
  506. delete data.ids;
  507. if (this.accountObj) {
  508. data.handover = this.accountObj.accountId;
  509. }
  510. if (this.queryObj.grabOrders) {
  511. data.grabOrders = '666';
  512. }
  513. data.deptId = this.deptId;
  514. }
  515. if (this.infoDATA.taskType.associationType.value == "specimen") {
  516. data["speCode"] = data.code;
  517. delete data.code;
  518. postType = "handleSpes";
  519. }
  520. if (
  521. this.infoDATA.taskType.associationType.value == "specimenPlan"
  522. ) {
  523. data["speCode"] = data.code;
  524. delete data.code;
  525. postType = "handlePlanSpes";
  526. }
  527. if (this.infoDATA.taskType.associationType.value == "inspect") {
  528. // delete data.type;//seimin
  529. postType = "handleIns";
  530. }
  531. if (
  532. this.infoDATA.taskType.associationType.value ==
  533. "patientTransport"
  534. ) {
  535. postType = "handleTrans";
  536. }
  537. //扫描
  538. post("/workerOrder/" + postType, data).then((ress) => {
  539. console.log(ress, 1111)
  540. if (ress.status == 200) {
  541. //标本和标本轮巡工单,扫描标本后会自动调用摄像头,继续扫描,直到status不是200
  542. if (this.infoDATA.taskType.associationType.value == 'specimen' || this.infoDATA.taskType
  543. .associationType.value == 'specimenPlan') {
  544. if (type === 'scan') {
  545. this.Scanning_again(this.dataId);
  546. }
  547. }
  548. if (
  549. this.infoDATA.taskType.associationType.value == "drugsBag"
  550. ) {
  551. uni.hideLoading();
  552. // --------start----------
  553. uni.navigateTo({
  554. url: `../scanning_Result/scanning_Result?type=${
  555. this.queryObj.type
  556. }&type1=${
  557. this.queryObj.type1
  558. }&infoData=${encodeURIComponent(
  559. JSON.stringify(ress.data)
  560. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  561. this.queryObj.deptCode
  562. }&dept=${
  563. this.queryObj.dept
  564. }&id=${this.dataId}&model=${encodeURIComponent(
  565. JSON.stringify(ress)
  566. )}&accountObj=${encodeURIComponent(JSON.stringify(this.accountObj))}&deptId=${this.deptId}&handover=${this.handover}`,
  567. });
  568. // ------------end------------
  569. } else {
  570. uni.hideLoading();
  571. // --------start----------
  572. // 患者陪检执行中或待送达,患者转运待送达
  573. if (
  574. ress.type == "ins-zxz-1" ||
  575. ress.type == "ins-dsd-1" ||
  576. ress.type == "trans-dsd-1"
  577. ) {
  578. console.log(ress.patientName, "code");
  579. uni.navigateTo({
  580. url: `../scanning_Result/scanning_Result?type=${
  581. this.queryObj.type
  582. }&type1=${
  583. this.queryObj.type1
  584. }&infoData=${encodeURIComponent(
  585. JSON.stringify(ress.data)
  586. )}&status=${ress.status}&msg=${ress.msg}&patient=${
  587. ress.patient
  588. }&patientCode=${ress.patientCode}&deptName=${
  589. ress.deptName
  590. }&bedNum=${ress.bedNum}&deptCode=${
  591. this.queryObj.deptCode
  592. }&dept=${
  593. this.queryObj.dept
  594. }&id=${this.dataId}&model=${encodeURIComponent(
  595. JSON.stringify(ress)
  596. )}`,
  597. });
  598. } else {
  599. uni.navigateTo({
  600. url: `../scanning_Result/scanning_Result?type=${
  601. this.queryObj.type
  602. }&type1=${
  603. this.queryObj.type1
  604. }&infoData=${encodeURIComponent(
  605. JSON.stringify(ress.data)
  606. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  607. this.queryObj.deptCode
  608. }&dept=${
  609. this.queryObj.dept
  610. }&id=${this.dataId}&model=${encodeURIComponent(
  611. JSON.stringify(ress)
  612. )}&speNum=${ress.specimenCount}&scanOrHand=${type}`,
  613. });
  614. }
  615. // ------------end------------
  616. }
  617. } else {
  618. uni.hideLoading();
  619. uni.navigateTo({
  620. url: `../scanning_Result/scanning_Result?type=${
  621. this.queryObj.type
  622. }&type1=${this.queryObj.type1}&status=${ress.status}&msg=${
  623. ress.msg
  624. }&deptCode=${this.queryObj.deptCode}&dept=${
  625. this.queryObj.dept
  626. }&id=${this.dataId}&model=${encodeURIComponent(
  627. JSON.stringify(ress)
  628. )}&accountObj=${encodeURIComponent(JSON.stringify(this.accountObj))}&deptId=${this.deptId}&handover=${this.handover}&scanOrHand=${type}&qrcode=${this.currentCode}`,
  629. });
  630. }
  631. });
  632. }
  633. } else {
  634. uni.hideLoading();
  635. uni.showToast({
  636. icon: "none",
  637. title: "请求失败!",
  638. });
  639. }
  640. });
  641. // ------------------------------
  642. },
  643. // 扫描
  644. Scanning_again(id) {
  645. if (!this.SMFlag) {
  646. return;
  647. }
  648. this.SMFlag = false;
  649. SM().then((ress1) => {
  650. this.hand_scanning_common(ress1, 'scan');
  651. }).catch(err => {
  652. this.SMFlag = true;
  653. });
  654. },
  655. show(type) {
  656. this.showType = type;
  657. if (type === "show") {
  658. //展开
  659. // 计算高度
  660. const query = uni.createSelectorQuery().in(this);
  661. query
  662. .selectAll(".page_item_infos")
  663. .boundingClientRect((data) => {
  664. let len = data.reduce((prev, current) => {
  665. return prev + current.height;
  666. }, 0);
  667. this.animation.height(len).step();
  668. this.animationData = this.animation.export();
  669. })
  670. .exec();
  671. } else if (type === "hiddle") {
  672. this.animation.height(0).step();
  673. this.animationData = this.animation.export();
  674. }
  675. },
  676. // 确定
  677. ok() {
  678. this.models.disjunctor = false;
  679. if (this.modelFlag == "complete1") {
  680. //一对多完成扫描
  681. let ids = [];
  682. ids.push(this.wcId);
  683. let data = {
  684. type: this.infoType,
  685. ids,
  686. };
  687. uni.showLoading({
  688. title: '加载中',
  689. mask: true,
  690. });
  691. post("/workerOrder/finishSpes", data).then((res) => {
  692. if (res.status == 200) {
  693. uni.reLaunch({
  694. url: "../receiptpage/receiptpage",
  695. });
  696. } else {
  697. uni.hideLoading();
  698. uni.showToast({
  699. icon: "none",
  700. title: "请求失败!",
  701. });
  702. }
  703. });
  704. } else if (this.modelFlag == "complete") {
  705. //一对一完成扫描
  706. let ids = [];
  707. ids.push(this.wcId);
  708. uni.showLoading({
  709. title: '加载中',
  710. mask: true,
  711. });
  712. post("/workerOrder/finishSpeOrder", ids).then((res) => {
  713. if (res.status == 200) {
  714. uni.reLaunch({
  715. url: "../receiptpage/receiptpage",
  716. });
  717. } else {
  718. uni.hideLoading();
  719. uni.showToast({
  720. icon: "none",
  721. title: "请求失败!",
  722. });
  723. }
  724. });
  725. }
  726. },
  727. // 取消
  728. cancel() {
  729. this.models.disjunctor = false;
  730. },
  731. //一对多完成扫描
  732. Scanning_complete1(id) {
  733. this.wcId = id;
  734. this.modelFlag = "complete1";
  735. this.models = {
  736. disjunctor: true,
  737. title: "提示",
  738. content: "是否确定标本配送完成?",
  739. icon: "warn",
  740. operate: {
  741. ok: "确定",
  742. cancel: "取消",
  743. },
  744. };
  745. },
  746. //一对一完成扫描
  747. Scanning_complete(id) {
  748. this.wcId = id;
  749. this.modelFlag = "complete";
  750. this.models = {
  751. disjunctor: true,
  752. title: "提示",
  753. content: "是否确定标本配送完成?",
  754. icon: "warn",
  755. operate: {
  756. ok: "确定",
  757. cancel: "取消",
  758. },
  759. };
  760. },
  761. // 知道了
  762. showAlert() {
  763. uni.navigateTo({
  764. url: "../receiptpage/receiptpage",
  765. });
  766. },
  767. // 工单详情
  768. getInfo(id) {
  769. uni.showLoading({
  770. title: "加载中",
  771. mask: true,
  772. });
  773. get("/api/fetchData/workOrder/" + id).then((res) => {
  774. uni.hideLoading();
  775. if (res.status == 200) {
  776. this.infoDATA = res.data;
  777. } else {
  778. uni.showToast({
  779. icon: "none",
  780. title: "请求失败!",
  781. });
  782. }
  783. });
  784. },
  785. },
  786. onShow() {
  787. this.SMFlag = true;
  788. },
  789. onLoad(options) {
  790. console.log(options);
  791. if (options.accountObj && options.accountObj != "undefined") {
  792. this.accountObj = JSON.parse(options.accountObj);
  793. }
  794. if (options.deptId && options.deptId != "undefined") {
  795. this.deptId = options.deptId;
  796. }
  797. this.queryObj = options;
  798. let id = options.id;
  799. this.dataId = id; //工单ID
  800. this.infoType = options.type1; //type类型
  801. this.DEPTCode = options.deptCode; //二维码
  802. this.DEPT = options.dept; //科室名称
  803. this.getInfo(this.dataId);
  804. // 创建动画
  805. this.animation = uni.createAnimation({
  806. duration: 500,
  807. timingFunction: "ease",
  808. });
  809. // #ifdef APP-PLUS
  810. webHandle("no", "app");
  811. // #endif
  812. // #ifdef H5
  813. webHandle("no", "wx");
  814. // #endif
  815. },
  816. onUnload() {
  817. // 页面关闭后清空数据
  818. this.animationData = {};
  819. },
  820. };
  821. </script>
  822. <style lang="less">
  823. .Scanning_code {
  824. padding: 0 20rpx;
  825. padding-bottom: 124rpx;
  826. .Scanning_top {
  827. height: 340rpx;
  828. .Scanning_top_icon {
  829. width: 140rpx;
  830. height: 140rpx;
  831. margin: 0 auto;
  832. margin-top: 36rpx;
  833. border-radius: 50%;
  834. line-height: 140rpx;
  835. .cubeic-ok {
  836. font-size: 140rpx;
  837. color: #35b34a;
  838. }
  839. }
  840. .Scanning_top_text {
  841. text-align: center;
  842. .text1 {
  843. margin-top: 40rpx;
  844. font-size: 48rpx;
  845. }
  846. .text2 {
  847. margin-top: 16rpx;
  848. font-size: 36rpx;
  849. }
  850. }
  851. }
  852. .page_item {
  853. margin-top: 16rpx;
  854. min-height: 356rpx;
  855. background: #fff;
  856. border-radius: 8rpx;
  857. overflow: hidden;
  858. padding: 0 16rpx;
  859. border: 2rpx solid #e5e9ed;
  860. .L {
  861. width: 40rpx;
  862. height: 40rpx;
  863. border-radius: 50%;
  864. background: #f9fafb;
  865. position: relative;
  866. left: -50rpx;
  867. top: 66rpx;
  868. }
  869. .R {
  870. width: 40rpx;
  871. height: 40rpx;
  872. border-radius: 50%;
  873. background: #f9fafb;
  874. position: relative;
  875. float: right;
  876. right: -50rpx;
  877. top: 26rpx;
  878. }
  879. .starting {
  880. width: 50rpx;
  881. height: 50rpx;
  882. color: #fff;
  883. background: #49b856;
  884. display: inline-block;
  885. border-radius: 50%;
  886. text-align: center;
  887. line-height: 46rpx;
  888. font-size: 32rpx;
  889. margin-right: 6rpx;
  890. }
  891. .End {
  892. width: 50rpx;
  893. height: 50rpx;
  894. color: #fff;
  895. background: #39b199;
  896. display: inline-block;
  897. border-radius: 50%;
  898. text-align: center;
  899. line-height: 46rpx;
  900. font-size: 32rpx;
  901. margin-right: 6rpx;
  902. }
  903. .page_item_top {
  904. height: 86rpx;
  905. border-bottom: 2rpx dashed #e5e9ed;
  906. padding: 0 16rpx;
  907. .page_item_top_L {
  908. height: 100%;
  909. float: left;
  910. line-height: 88rpx;
  911. .emergencys {
  912. background: #ff3b53 !important;
  913. width: 124rpx !important;
  914. }
  915. .emergency {
  916. background: #ff3b53 !important;
  917. }
  918. .emergency1 {
  919. background: #49b856 !important;
  920. }
  921. .page_item_cont_start {
  922. text-align: center;
  923. height: 44rpx;
  924. width: 104rpx;
  925. line-height: 44rpx;
  926. border-radius: 8rpx;
  927. background: #49b856;
  928. color: #fff;
  929. display: inline-block;
  930. .page_item_cont_start_txt {
  931. font-size: 28rpx;
  932. display: flex;
  933. align-items: center;
  934. justify-content: center;
  935. }
  936. }
  937. .L_time {
  938. color: #6cc076;
  939. font-size: 32rpx;
  940. }
  941. .L_text {
  942. font-size: 32rpx;
  943. display: inline-block;
  944. font-weight: 700;
  945. margin-right: 8rpx;
  946. }
  947. }
  948. .page_item_top_R {
  949. height: 60rpx;
  950. float: right;
  951. padding-top: 20rpx;
  952. font-size: 32rpx;
  953. position: absolute;
  954. right: 50rpx;
  955. .L_iocn {
  956. display: inline-block;
  957. height: 52rpx;
  958. line-height: 48rpx;
  959. color: rgb(7, 134, 60);
  960. font-size: 36rpx;
  961. font-weight: 700;
  962. }
  963. }
  964. }
  965. .page_item_cont {
  966. min-height: 180rpx;
  967. padding: 0 16rpx;
  968. text-align: left;
  969. position: relative;
  970. .text_big {
  971. font-size: 32rpx;
  972. position: absolute;
  973. right: 16rpx;
  974. font-weight: 700;
  975. margin-top: 10rpx;
  976. }
  977. .text_big2 {
  978. font-size: 32rpx;
  979. position: absolute;
  980. right: 16rpx;
  981. font-weight: 700;
  982. }
  983. .line {
  984. height: 20rpx;
  985. width: 2rpx;
  986. border-left: 2rpx solid #e5e9ed;
  987. position: absolute;
  988. top: 82rpx;
  989. left: 40rpx;
  990. }
  991. .lines {
  992. height: 40%;
  993. width: 2rpx;
  994. border-left: 2rpx solid #e5e9ed;
  995. position: absolute;
  996. top: 23%;
  997. left: 36rpx;
  998. }
  999. .page_item_cont_T {
  1000. padding-top: 28rpx;
  1001. font-size: 28rpx;
  1002. .page_item_cont_title {
  1003. height: 100%;
  1004. font-size: 32rpx;
  1005. }
  1006. }
  1007. .page_item_cont_B {
  1008. padding-top: 28rpx;
  1009. margin-bottom: 28rpx;
  1010. .page_item_cont_title {
  1011. height: 60rpx;
  1012. font-size: 32rpx;
  1013. }
  1014. .page_item_cont_title1 {
  1015. height: 60rpx;
  1016. line-height: 60rpx;
  1017. font-size: 32rpx;
  1018. padding-left: 64rpx;
  1019. }
  1020. }
  1021. }
  1022. .page_item_foot {
  1023. border-top: 2rpx dashed #e5e9ed;
  1024. border-bottom: 2rpx dashed #e5e9ed;
  1025. padding: 28rpx 16rpx;
  1026. text-align: left;
  1027. .page_item_foot_text {
  1028. font-size: 32rpx;
  1029. margin-bottom: 20rpx;
  1030. display: flex;
  1031. justify-content: space-between;
  1032. align-items: center;
  1033. .text1 {
  1034. color: rgb(102, 102, 102);
  1035. }
  1036. .text2 {
  1037. font-weight: 700;
  1038. }
  1039. }
  1040. .text_padd {
  1041. padding: 0 10% 0 10%;
  1042. }
  1043. }
  1044. .page_item_info {
  1045. padding: 20rpx 16rpx;
  1046. text-align: left;
  1047. line-height: 60rpx;
  1048. font-size: 32rpx;
  1049. .page_item_info_title {
  1050. font-weight: 700;
  1051. }
  1052. .text {
  1053. float: right;
  1054. font-weight: 700;
  1055. .text_span {
  1056. color: #49b856;
  1057. }
  1058. }
  1059. }
  1060. #infos {
  1061. height: 0;
  1062. overflow: hidden;
  1063. }
  1064. .page_item_infos {
  1065. padding-bottom: 20rpx;
  1066. border-bottom: 2rpx dashed #e5e9ed;
  1067. .page_item_info2 {
  1068. text-align: left;
  1069. line-height: 60rpx;
  1070. font-size: 32rpx;
  1071. padding-left: 16rpx;
  1072. .page_item_foot_text {
  1073. font-size: 32rpx;
  1074. margin-bottom: 20rpx;
  1075. .text1 {
  1076. color: rgb(102, 102, 102);
  1077. }
  1078. .text2 {
  1079. float: right;
  1080. font-weight: 700;
  1081. }
  1082. }
  1083. }
  1084. }
  1085. #pulldown {
  1086. color: #49b856;
  1087. font-size: 36rpx;
  1088. height: 60rpx;
  1089. text-align: center;
  1090. .cubeic-pulldown {
  1091. font-size: 48rpx;
  1092. position: relative;
  1093. bottom: 6rpx;
  1094. }
  1095. }
  1096. #pullup {
  1097. color: #49b856;
  1098. font-size: 36rpx;
  1099. height: 60rpx;
  1100. text-align: center;
  1101. .cubeic-pullup {
  1102. font-size: 48rpx;
  1103. position: relative;
  1104. top: 12rpx;
  1105. }
  1106. }
  1107. }
  1108. .foot_btn2 {
  1109. position: fixed;
  1110. bottom: 0;
  1111. right: 20rpx;
  1112. left: 20rpx;
  1113. line-height: 66rpx;
  1114. height: 100rpx;
  1115. border-top: 2rpx solid #e5e9ed;
  1116. background: #f9fafb;
  1117. display: flex;
  1118. justify-content: space-between;
  1119. .btn2,
  1120. .btn3 {
  1121. height: 66rpx;
  1122. flex: 1;
  1123. background-image: linear-gradient(to right, #72c172, #3bb197);
  1124. color: #fff;
  1125. border-radius: 8rpx;
  1126. font-size: 32rpx;
  1127. margin-top: 16rpx;
  1128. margin-right: 16rpx;
  1129. text-align: center;
  1130. &:last-of-type {
  1131. margin-right: 0;
  1132. }
  1133. }
  1134. }
  1135. .foot_btn1 {
  1136. position: fixed;
  1137. bottom: 0;
  1138. right: 20rpx;
  1139. left: 20rpx;
  1140. line-height: 66rpx;
  1141. height: 100rpx;
  1142. border-top: 2rpx solid #e5e9ed;
  1143. background: #f9fafb;
  1144. .btn1,
  1145. .btn2 {
  1146. height: 66rpx;
  1147. flex: 1;
  1148. background-image: linear-gradient(to right, #72c172, #3bb197);
  1149. color: #fff;
  1150. border-radius: 8rpx;
  1151. font-size: 32rpx;
  1152. margin-top: 16rpx;
  1153. text-align: center;
  1154. }
  1155. }
  1156. }
  1157. </style>