scanning_code.vue 37 KB

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