scanning_code.vue 38 KB

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