scanning_code.vue 37 KB

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