scanning_code.vue 39 KB

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