scanning_code.vue 39 KB

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