scanning_code.vue 37 KB

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