scanning_code.vue 61 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746
  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 || '无' }}</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 || '无' }}</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 || '无' }}</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. <text v-if="infoDATA.patient.residenceNo">
  181. ({{
  182. infoDATA.patient.residenceNo
  183. }})
  184. </text>
  185. <text v-if="!infoDATA.patient.residenceNo">
  186. ({{
  187. infoDATA.patient.cardNo
  188. }})
  189. </text>
  190. </text>
  191. </view>
  192. <view class="page_item_foot_text" v-if="
  193. !infoDATA.patient.residenceNo &&
  194. (infoDATA.taskType.associationType.value == 'inspect' ||
  195. infoDATA.taskType.associationType.value == 'patientTransport')
  196. ">
  197. <text class="text1">身份证号</text>
  198. <text class="text2">{{ infoDATA.patient.identityCardNo }}
  199. </text>
  200. </view>
  201. <view class="page_item_foot_text" v-if="
  202. infoDATA.patient.residenceNo &&
  203. (infoDATA.taskType.associationType.value == 'inspect' ||
  204. infoDATA.taskType.associationType.value == 'patientTransport')
  205. ">
  206. <text class="text1">床位</text>
  207. <text class="text2">{{ infoDATA.patient.bedNum }}
  208. </text>
  209. </view>
  210. </view>
  211. <!-- 药包 -->
  212. <view class="page_item_info" v-if="infoDATA.taskType.associationType.value == 'drugsBag'">
  213. <text class="page_item_info_title">药包信息</text>
  214. <text class="text">#{{ infoDATA.drugs.packid }}</text>
  215. </view>
  216. <!-- 标本 送达-->
  217. <view class="page_item_info" v-if="
  218. infoDATA.taskType.associationType.value == 'specimen' ||
  219. infoDATA.taskType.associationType.value == 'specimenPlan'
  220. ">
  221. <!-- <text class="page_item_info_title">标本信息</text> -->
  222. <!-- <text class="text" v-if="
  223. infoType == 'plan-spe-ddd-1' ||
  224. infoType == 'plan-spe-dsd-2' ||
  225. infoType == 'spe-ddd-1' ||
  226. infoType == 'spe-dsd-2'
  227. ">
  228. 预计标本总数
  229. <text class="text_span">{{ infoDATA.expectReceiveNum || 0 }}</text>
  230. </text>
  231. <text class="text" v-if="
  232. (infoType == 'plan-spe-ddd-2' && infoDATA.gdState.value == '4') ||
  233. (infoType == 'spe-ddd-2' && infoDATA.gdState.value == '4')
  234. ">
  235. 预计标本总数
  236. <text>{{ infoDATA.expectReceiveNum || 0 }}</text>
  237. </text>
  238. <text class="text" v-if="
  239. (infoType == 'plan-spe-dsd-2' && infoDATA.gdState.value == '6') ||
  240. (infoType == 'spe-dsd-2' && infoDATA.gdState.value == '6')
  241. ">
  242. 已扫描标本总数
  243. <text>{{ infoDATA.actualReceiveNum || 0 }}</text>
  244. </text>
  245. <text class="text" v-if="
  246. (infoType == 'plan-spe-dsd-3' && infoDATA.gdState.value == '5') ||
  247. (infoType == 'spe-dsd-3' && infoDATA.gdState.value == '5')
  248. ">
  249. 已收取标本总数
  250. <text>{{ infoDATA.actualReceiveNum || 0 }}</text>
  251. </text> -->
  252. </view>
  253. <!-- 静配 -->
  254. <view class="page_item_info" v-if="infoDATA.taskType.associationType.value == 'jPBag'">
  255. <text class="page_item_info_title">静配信息</text>
  256. <text class="text">#{{ infoDATA.staticDistri.packid }}</text>
  257. </view>
  258. <!-- 陪检 -->
  259. <view v-if="infoDATA.taskType.associationType.value == 'inspect'">
  260. <view class="page_item_info">
  261. <text class="page_item_info_title">检查信息</text>
  262. </view>
  263. <view id="infos" :animation="animationData">
  264. <view class="page_item_infos" v-for="(item, i) of infoDATA.checkList" :key="i">
  265. <view class="page_item_info2">
  266. <view class="page_item_foot_text">
  267. <text class="text1">检查科室</text>
  268. <text class="text2">{{ item.execDept.dept }}</text>
  269. </view>
  270. <view class="page_item_foot_text">
  271. <text class="text1">检查项</text>
  272. <text class="text2">{{ item.inspectName }}</text>
  273. </view>
  274. <view class="page_item_foot_text">
  275. <text class="text1">预约时间</text>
  276. <text class="text2">{{ item.yyTime || "-" }}</text>
  277. </view>
  278. </view>
  279. </view>
  280. </view>
  281. <view id="pulldown" @click="show('show')" v-if="showType == 'hiddle'">
  282. 点击可查看检查详情
  283. <text class="cubeic-pulldown icon_transport transport-paixujiantouxia"></text>
  284. </view>
  285. <view id="pullup" @click="show('hiddle')" v-if="showType == 'show'">
  286. 点击可收起检查详情
  287. <text class="cubeic-pullup icon_transport transport-paixujiantoushang"></text>
  288. </view>
  289. </view>
  290. </view>
  291. <view class="foot_btn2 footerPadding" v-if="infoType == 'plan-spe-ddd-1' || infoType == 'spe-ddd-1'">
  292. <view class="btn2" @click="Scanning_complete(dataId)">知道了</view>
  293. </view>
  294. <view class="foot_btn1 footerPadding" v-if="
  295. (infoType == 'plan-spe-dsd-1' && infoDATA.gdState.value == '5') ||
  296. (infoType == 'spe-dsd-1' && infoDATA.gdState.value == '5')
  297. ">
  298. <view class="btn1" @click="Scanning_complete(dataId)">工单完成</view>
  299. <view class="btn2" @click="showAlert">继续配送</view>
  300. </view>
  301. <view class="foot_btn1 footerPadding" v-if="
  302. (infoType == 'plan-spe-ddd-2' && infoDATA.gdState.value == '4') ||
  303. (infoType == 'spe-ddd-2' && infoDATA.gdState.value == '4')
  304. ">
  305. <view class="btn1" @click="Scanning_again(dataId)" v-if="
  306. infoDATA.taskType.associationType.value == 'specimen' ||
  307. infoDATA.taskType.associationType.value == 'specimenPlan'
  308. ">扫描标本</view>
  309. <view class="btn1" @click="Scanning_again(dataId)" v-if="
  310. infoDATA.taskType.associationType.value == 'jPBag' ||
  311. infoDATA.taskType.associationType.value == 'drugsBag'
  312. ">扫描药包</view>
  313. </view>
  314. <view class="foot_btn1 footerPadding" v-if="
  315. (infoType == 'plan-spe-dsd-3' && infoDATA.gdState.value == '5') ||
  316. (infoType == 'spe-dsd-3' && infoDATA.gdState.value == '5')
  317. ">
  318. <view class="btn1" @click="Scanning_again(dataId)" v-if="
  319. infoDATA.taskType.associationType.value == 'specimen' ||
  320. infoDATA.taskType.associationType.value == 'specimenPlan'
  321. ">扫描标本</view>
  322. <view class="btn1" @click="Scanning_again(dataId)" v-if="
  323. infoDATA.taskType.associationType.value == 'jPBag' ||
  324. infoDATA.taskType.associationType.value == 'drugsBag'
  325. ">扫描药包</view>
  326. <view class="btn2" @click="Scanning_complete1(dataId)">完成工单</view>
  327. </view>
  328. <view class="foot_btn2 footerPadding" v-if="
  329. infoType == 'plan-spe-ddd-2' ||
  330. infoType == 'plan-spe-dsd-2' ||
  331. (infoType == 'plan-spe-dsd-3' && infoDATA.gdState.value == '5') ||
  332. infoType == 'spe-ddd-2' ||
  333. infoType == 'spe-dsd-2' ||
  334. (infoType == 'spe-dsd-3' && infoDATA.gdState.value == '5')
  335. ">
  336. <view class="btn3" @click="Scanning_again(dataId)">继续扫描</view>
  337. <view class="btn3" @click="showHandViewSpecimen()">手动录入</view>
  338. <view class="btn3" v-if="infoDATA.taskType.isDigitalHandover==1" @click="checkNumber(infoDATA)">数量核对</view>
  339. <view class="btn3" @click="next()" v-if="queryObj.fromSpecimenBuild">下一步</view>
  340. </view>
  341. <view class="foot_btn2 footerPadding" v-if="
  342. infoType == 'ins-dsd-1' ||
  343. infoType == 'ins-zxz-1' ||
  344. infoType == 'trans-dsd-1'
  345. ">
  346. <view class="btn3" @click="Scanning_again(dataId)">继续扫描患者腕带</view>
  347. <view class="btn3" @click="photograph(infoDATA, { DEPTCode, DEPT, infoType })">拍照</view>
  348. </view>
  349. <view class="foot_btn2 footerPadding" v-if="
  350. infoType == 'plan-spe-ddd-1' ||
  351. infoType == 'spe-ddd-1' ||
  352. infoDATA.gdState.value == '6'
  353. ">
  354. <view class="btn2" @click="showAlert">知道了</view>
  355. </view>
  356. <view class="foot_btn2 footerPadding" v-if="
  357. infoType == 'drug-ddd-2' ||
  358. infoType == 'drug-dsd-2' ||
  359. infoType == 'jp-ddd-2' ||
  360. infoType == 'jp-dsd-2'
  361. ">
  362. <view class="btn2" @click="Scanning_again(dataId)">继续扫描</view>
  363. <view class="btn3" @click="showHandViewDrugsbag()">手动录入</view>
  364. </view>
  365. <view class="foot_btn2 footerPadding" v-if="
  366. infoType == 'drug-ddd-1' ||
  367. infoType == 'drug-dsd-1' ||
  368. infoType == 'jp-ddd-1' ||
  369. infoType == 'jp-dsd-1'
  370. ">
  371. <view class="btn2" @click="showAlert">知道了</view>
  372. </view>
  373. <view class="foot_btn2 footerPadding" v-if="infoType == 'qt-ddd-1' && infoDATA.gdState.value == '5'">
  374. <view class="btn2" @click="showAlert">知道了</view>
  375. </view>
  376. <!-- 弹窗 -->
  377. <showModel :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content"
  378. @ok="ok" @cancel="cancel" :operate="models.operate"></showModel>
  379. <!-- 手动查询标本弹窗 -->
  380. <handViewSpecimen v-if="speModels.disjunctor" :title="speModels.title" :disjunctor="speModels.disjunctor"
  381. @ok="speOk" @cancel="speCancel">
  382. </handViewSpecimen>
  383. <!-- 手动查询药品弹窗 -->
  384. <handViewDrugsBag v-if="drugbagModels.disjunctor" :title="drugbagModels.title"
  385. :disjunctor="drugbagModels.disjunctor" @ok="drugbagOk" @cancel="drugbagCancel">
  386. </handViewDrugsBag>
  387. <!-- 修改标本数量弹窗 -->
  388. <changeSpeNum v-if="changeSpeModels.disjunctor" :operate="{ok:'确认数量',check:'详细核对',cancel:'取消'}" :title="changeSpeModels.title" :content="changeSpeModels.content"
  389. :disjunctor="changeSpeModels.disjunctor" @ok="changeSpeOk" @check="changeSpeCheck" @cancel="changeSpeCancel" :num="speNumChange" :modifyReason="modifyReason" :isFirstShowReason="false">
  390. </changeSpeNum>
  391. <!-- 调查问卷二维码 -->
  392. <questionCode v-if="isQuestionModel" :orderId="infoDATA.id" @know="isQuestionModel = false"></questionCode>
  393. </view>
  394. </template>
  395. <script>
  396. import showModel from "../../components/showModel/showModel.vue";
  397. import questionCode from "../../components/questionCode/questionCode.vue";
  398. import {
  399. get,
  400. post,
  401. SM,
  402. webHandle
  403. } from "../../http/http.js";
  404. import {
  405. photographTool
  406. } from "../../tools/photograph.js";
  407. export default {
  408. components:{
  409. questionCode
  410. },
  411. data() {
  412. return {
  413. // 调研二维码
  414. isQuestionModel:false,
  415. speNumChange: 0,
  416. modifyReason:'',
  417. changeSpeObj: {},
  418. // 修改标本数量弹窗model
  419. changeSpeModels: {
  420. disjunctor: false,
  421. },
  422. currentCode: '', //当前小扫描的科室二维码
  423. // 手动查询标本弹窗model
  424. speModels: {
  425. disjunctor: false,
  426. },
  427. // 手动查询药品弹窗model
  428. drugbagModels: {
  429. disjunctor: false,
  430. },
  431. SMFlag: true,
  432. // 交接人信息
  433. accountObj: undefined,
  434. deptId: undefined,
  435. // 完成工单的id
  436. wcId: "",
  437. // 弹窗model
  438. models: {
  439. disjunctor: false,
  440. },
  441. modelFlag: "", //完成工单标识
  442. animationData: {},
  443. showType: "hiddle",
  444. infoDATA: {},
  445. infoType: "",
  446. DEPTCode: "",
  447. DEPT: "",
  448. dataId: "",
  449. queryObj: {}, //路由传过来的对象
  450. };
  451. },
  452. methods: {
  453. // 修改标本数量-核对
  454. changeSpeCheck(){
  455. console.log(this.infoDATA);
  456. this.changeSpeModels.disjunctor = false;
  457. let deptId = this.queryObj.deptId;
  458. let endDepts = this.queryObj.endDepts;
  459. if (deptId) {
  460. // 小扫描
  461. uni.navigateTo({
  462. url: `/pages/specimenCheckingDetail/specimenCheckingDetail?infoDATA=${encodeURIComponent(JSON.stringify({startDept:this.infoDATA.startDept.id,uuid:this.infoDATA.id}))}&id=${deptId}&t=small&gdState=${this.infoDATA.gdState.value}&endDepts=${endDepts}`
  463. })
  464. } else {
  465. // 快捷建单进入小扫描
  466. uni.navigateTo({
  467. url: `/pages/specimenCheckingDetail/specimenCheckingDetail?infoDATA=${encodeURIComponent(JSON.stringify({startDept:this.infoDATA.startDept.id,uuid:this.infoDATA.id}))}&id=${deptId}&t=small&endDepts=${endDepts}`
  468. })
  469. }
  470. },
  471. // 修改标本数量-确认
  472. changeSpeOk(data) {
  473. console.log(data);
  474. const pathUrl = uni.getStorageSync("path");
  475. const {
  476. speNum,
  477. reason,
  478. imageValue
  479. } = data;
  480. this.changeSpeModels.disjunctor = false;
  481. uni.showLoading({
  482. mask: true,
  483. title: "加载中",
  484. });
  485. let postData = {
  486. checkDept: this.changeSpeObj.endDepts, //终点科室
  487. transDeptId: this.changeSpeObj.infoDATA.startDept,
  488. gdId: this.changeSpeObj.infoDATA.uuid,
  489. deptId: this.changeSpeObj.id == "undefined" ?
  490. this.changeSpeObj.infoDATA.startDept : this.changeSpeObj.id,
  491. specimensNum: speNum,
  492. modifyReason: reason,
  493. };
  494. post("/api/updateCheckDeptSpecimensNum", postData).then((res) => {
  495. if (res.status == 200) {
  496. console.log(imageValue);
  497. if (!imageValue.length) {
  498. uni.hideLoading();
  499. if (this.changeSpeObj.t == "big") {
  500. if (this.changeSpeObj.gdState == 4) {
  501. // 待到达
  502. uni.navigateTo({
  503. url: `../../pages/receiptpage/receiptpage`,
  504. });
  505. } else if (this.changeSpeObj.gdState == 5) {
  506. // 待送达
  507. if (res.type1 === "plan-spe-ddd-2") {} else {
  508. let content = `本工单已签到<strong class="red">${
  509. res.scanSet ? res.scanSet.join("、") : ""
  510. }</strong>,剩余需签到科室<strong class="red">${
  511. res.notScanSet ? res.notScanSet.join("、") : ""
  512. }</strong>,您确定完成工单吗?`;
  513. uni.navigateTo({
  514. url: `../scanning/scanning?type=${res.type}&type1=${
  515. res.type1
  516. }&id=${encodeURIComponent(
  517. JSON.stringify([res.gdid])
  518. )}&content=${content}`,
  519. });
  520. }
  521. }
  522. } else if (this.changeSpeObj.t == "small") {
  523. if (this.changeSpeObj.id == "undefined") {
  524. //快捷建单建单进入
  525. uni.navigateTo({
  526. url: `../../pages/receiptpage/receiptpage`,
  527. });
  528. } else {
  529. if (this.changeSpeObj.gdState == 4) {
  530. // 待到达
  531. uni.navigateTo({
  532. url: `../../pages/receiptpage/receiptpage`,
  533. });
  534. } else if (this.changeSpeObj.gdState == 5) {
  535. // 待送达
  536. if (res.type1 === "plan-spe-ddd-2") {} else {
  537. let content = `本工单已签到<strong class="red">${
  538. res.scanSet ? res.scanSet.join("、") : ""
  539. }</strong>,剩余需签到科室<strong class="red">${
  540. res.notScanSet ? res.notScanSet.join("、") : ""
  541. }</strong>,您确定完成工单吗?`;
  542. uni.navigateTo({
  543. url: `../scanning/scanning?type=${res.type}&type1=${
  544. res.type1
  545. }&id=${encodeURIComponent(
  546. JSON.stringify([res.gdid])
  547. )}&content=${content}`,
  548. });
  549. }
  550. }
  551. }
  552. } else {
  553. uni.navigateTo({
  554. url: `../../pages/specimenChecking/specimenChecking?infoDATA=${encodeURIComponent(
  555. JSON.stringify(this.changeSpeObj.infoDATA)
  556. )}`,
  557. });
  558. }
  559. return;
  560. }
  561. let n = 0;
  562. imageValue.forEach((v) => {
  563. // 图片上传 start
  564. console.log("压缩前");
  565. let canvasWidth = v.image.width; //图片原始长宽
  566. let canvasHeight = v.image.height;
  567. let img = new Image();
  568. img.src = v.path;
  569. let canvas = document.createElement("canvas");
  570. let ctx = canvas.getContext("2d");
  571. canvas.width = canvasWidth;
  572. canvas.height = canvasHeight;
  573. ctx.drawImage(img, 0, 0, canvasWidth, canvasHeight);
  574. canvas.toBlob(
  575. (fileSrc) => {
  576. let tp = window.URL.createObjectURL(fileSrc);
  577. console.log("压缩后");
  578. n++;
  579. uni.uploadFile({
  580. url: pathUrl +
  581. "/common/common/uploadAttachment/specimenPhotos/" +
  582. res.deptSpecimensNumId +
  583. "/666",
  584. filePath: tp,
  585. name: "file",
  586. formData: {
  587. filename: v.name,
  588. },
  589. success: (uploadFileRes) => {
  590. console.log(uploadFileRes);
  591. if (--n === 0) {
  592. uni.hideLoading();
  593. if (this.changeSpeObj.t == "big") {
  594. if (this.changeSpeObj.gdState == 4) {
  595. // 待到达
  596. uni.navigateTo({
  597. url: `../../pages/receiptpage/receiptpage`,
  598. });
  599. } else if (this.changeSpeObj.gdState == 5) {
  600. // 待送达
  601. if (res.type1 === "plan-spe-ddd-2") {} else {
  602. let content = `本工单已签到<strong class="red">${
  603. res.scanSet ? res.scanSet.join("、") : ""
  604. }</strong>,剩余需签到科室<strong class="red">${
  605. res.notScanSet ? res.notScanSet.join("、") : ""
  606. }</strong>,您确定完成工单吗?`;
  607. uni.navigateTo({
  608. url: `../scanning/scanning?type=${res.type}&type1=${
  609. res.type1
  610. }&id=${encodeURIComponent(
  611. JSON.stringify([res.gdid])
  612. )}&content=${content}`,
  613. });
  614. }
  615. }
  616. } else if (this.changeSpeObj.t == "small") {
  617. if (this.changeSpeObj.id == "undefined") {
  618. //快捷建单建单进入
  619. uni.navigateTo({
  620. url: `../../pages/receiptpage/receiptpage`,
  621. });
  622. } else {
  623. if (this.changeSpeObj.gdState == 4) {
  624. // 待到达
  625. uni.navigateTo({
  626. url: `../../pages/receiptpage/receiptpage`,
  627. });
  628. } else if (this.changeSpeObj.gdState == 5) {
  629. // 待送达
  630. if (res.type1 === "plan-spe-ddd-2") {} else {
  631. let content = `本工单已签到<strong class="red">${
  632. res.scanSet ? res.scanSet.join("、") : ""
  633. }</strong>,剩余需签到科室<strong class="red">${
  634. res.notScanSet ? res.notScanSet.join("、") : ""
  635. }</strong>,您确定完成工单吗?`;
  636. uni.navigateTo({
  637. url: `../scanning/scanning?type=${res.type}&type1=${
  638. res.type1
  639. }&id=${encodeURIComponent(
  640. JSON.stringify([res.gdid])
  641. )}&content=${content}`,
  642. });
  643. }
  644. }
  645. }
  646. } else {
  647. uni.navigateTo({
  648. url: `../../pages/specimenChecking/specimenChecking?infoDATA=${encodeURIComponent(
  649. JSON.stringify(this.changeSpeObj.infoDATA)
  650. )}`,
  651. });
  652. }
  653. }
  654. },
  655. fail: (err) => {
  656. n--;
  657. console.error(err);
  658. uni.hideLoading();
  659. uni.showToast({
  660. icon: "none",
  661. title: "上传失败",
  662. duration: 2000,
  663. });
  664. },
  665. });
  666. },
  667. "image/jpeg",
  668. 0.3
  669. );
  670. // 图片上传 end
  671. });
  672. } else {
  673. uni.hideLoading();
  674. uni.showToast({
  675. icon: "none",
  676. title: res.msg || "接口获取数据失败!",
  677. });
  678. }
  679. });
  680. },
  681. // 修改标本数量-取消
  682. changeSpeCancel() {
  683. this.changeSpeModels.disjunctor = false;
  684. },
  685. // 修改标本数量弹窗
  686. showChangeSpe() {
  687. uni.showLoading({
  688. mask: true,
  689. title: "加载中",
  690. });
  691. let postData = {
  692. deptId: this.deptId,
  693. gdId: this.dataId,
  694. };
  695. post(`/api/getStartDeptSpecimensNum`, postData).then((res) => {
  696. uni.hideLoading();
  697. if (res.status == 200) {
  698. this.speNumChange = res.data[0].deptSpecimensNum;
  699. this.modifyReason = res.data[0].modifyReason;
  700. this.changeSpeModels = {
  701. title: "修改标本数量",
  702. content: `您已到达<span class="red">${this.DEPT}</span>本科室标本数量为<span class="red">${this.speNumChange}</span>,请确认标本数量`,
  703. disjunctor: true,
  704. };
  705. } else {
  706. this.speNumChange = "";
  707. this.modifyReason = '';
  708. uni.showToast({
  709. icon: "none",
  710. title: res.msg || "接口获取数据失败!",
  711. });
  712. }
  713. });
  714. },
  715. // 数量核对
  716. checkNumber(infoDATA) {
  717. let deptId = this.queryObj.deptId;
  718. let endDepts = this.queryObj.endDepts;
  719. console.log(endDepts, 'scanning_code');
  720. // 存数据
  721. if (deptId) {
  722. // 小扫描
  723. this.changeSpeObj = {
  724. infoDATA: {
  725. startDept: this.infoDATA.startDept.id,
  726. uuid: this.infoDATA.id
  727. },
  728. id: deptId,
  729. t: 'small',
  730. gdState: this.infoDATA.gdState.value,
  731. endDepts,
  732. }
  733. } else {
  734. // 快捷建单进入小扫描
  735. this.changeSpeObj = {
  736. infoDATA: {
  737. startDept: this.infoDATA.startDept.id,
  738. uuid: this.infoDATA.id
  739. },
  740. id: deptId,
  741. t: 'small',
  742. endDepts,
  743. }
  744. }
  745. this.showChangeSpe();
  746. },
  747. // 手动查询药品-确认
  748. drugbagOk(data) {
  749. console.log(data);
  750. if (!data.id) {
  751. //没有查询到药品
  752. uni.showModal({
  753. title: '提示',
  754. content: "没有查询到发药单号!",
  755. showCancel: false,
  756. success: function(res) {
  757. if (res.confirm) {
  758. console.log('用户点击确定');
  759. } else if (res.cancel) {
  760. console.log('用户点击取消');
  761. }
  762. }
  763. });
  764. return;
  765. }
  766. this.drugbagModels.disjunctor = false;
  767. this.hand_scanning_common(data.packid, 'hand');
  768. },
  769. // 手动查询药品-取消
  770. drugbagCancel() {
  771. this.drugbagModels.disjunctor = false;
  772. },
  773. // 手动查询药品弹窗
  774. showHandViewDrugsbag() {
  775. this.drugbagModels = {
  776. title: '填写发药单号',
  777. disjunctor: true,
  778. }
  779. },
  780. // 手动查询标本-确认
  781. speOk(data) {
  782. console.log(data);
  783. if (!data.id) {
  784. //没有查询到标本
  785. uni.showModal({
  786. title: '提示',
  787. content: "没有查询到标本!",
  788. showCancel: false,
  789. success: function(res) {
  790. if (res.confirm) {
  791. console.log('用户点击确定');
  792. } else if (res.cancel) {
  793. console.log('用户点击取消');
  794. }
  795. }
  796. });
  797. return;
  798. }
  799. this.speModels.disjunctor = false;
  800. this.hand_scanning_common(data.scode, 'hand');
  801. },
  802. // 手动查询标本-取消
  803. speCancel() {
  804. this.speModels.disjunctor = false;
  805. },
  806. // 手动查询标本弹窗
  807. showHandViewSpecimen() {
  808. this.speModels = {
  809. title: '填写标本编码',
  810. disjunctor: true,
  811. }
  812. },
  813. // 下一步
  814. next() {
  815. uni.showLoading({
  816. title: '加载中',
  817. mask: true,
  818. })
  819. post('/workerOrder/getSpecimenCount', {
  820. gdId: this.queryObj.id
  821. }).then(res => {
  822. get('/api/fetchData/specimen/' + this.queryObj.specimenId).then(ress => {
  823. uni.hideLoading();
  824. console.log(ress);
  825. ress.msg = '成功';
  826. ress.specimenCount = res.specimenCount;
  827. ress.type = this.queryObj.type1;
  828. uni.navigateTo({
  829. url: `../scanning_Result/scanning_Result?type=${
  830. this.queryObj.type
  831. }&type1=${
  832. this.queryObj.type1
  833. }&infoData=${encodeURIComponent(
  834. JSON.stringify(ress.data)
  835. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  836. this.queryObj.deptCode
  837. }&dept=${
  838. this.queryObj.dept
  839. }&taskTypeId=${
  840. this.infoDATA.taskType.id
  841. }&deptId=${this.deptId}&id=${this.dataId}&model=${encodeURIComponent(
  842. JSON.stringify(ress)
  843. )}&speNum=${res.specimenCount}`,
  844. });
  845. })
  846. })
  847. },
  848. // 拍照
  849. photograph(data, obj) {
  850. photographTool(data, obj);
  851. },
  852. // 手动输入标本和扫码公共方法,type----scan是扫码,hand是手动录入
  853. hand_scanning_common(ress1, type) {
  854. // ----------------
  855. uni.showLoading({
  856. title: "加载中",
  857. mask: true,
  858. });
  859. //检验二维码的有效性
  860. post("/dept/scanning", {
  861. content: ress1,
  862. }).then((result) => {
  863. this.SMFlag = true;
  864. if (result.state == 200 || result.state == 201) {
  865. this.currentCode = result.code;
  866. let codes = result.code;
  867. if (codes) {
  868. let speCode = codes;
  869. let data = {
  870. code: speCode,
  871. type: this.infoType,
  872. deptCode: this.DEPTCode,
  873. ids: [this.dataId],
  874. };
  875. let postType = "";
  876. if (
  877. this.infoDATA.taskType.associationType.value == "jPBag" ||
  878. this.infoDATA.taskType.associationType.value == "drugsBag"
  879. ) {
  880. postType = "handleDrugsAndJp";
  881. if(this.infoDATA.taskType.associationType.value == "drugsBag"){
  882. delete data.ids;
  883. }
  884. if (this.accountObj) {
  885. data.handover = this.accountObj.accountId;
  886. }
  887. if (this.queryObj.grabOrders) {
  888. data.grabOrders = '666';
  889. }
  890. data.deptId = this.deptId;
  891. }
  892. if (this.infoDATA.taskType.associationType.value == "specimen") {
  893. data["speCode"] = data.code;
  894. delete data.code;
  895. postType = "handleSpes";
  896. }
  897. if (
  898. this.infoDATA.taskType.associationType.value == "specimenPlan"
  899. ) {
  900. data["speCode"] = data.code;
  901. delete data.code;
  902. postType = "handlePlanSpes";
  903. }
  904. if (this.infoDATA.taskType.associationType.value == "inspect") {
  905. // delete data.type;//seimin
  906. postType = "handleIns";
  907. }
  908. if (
  909. this.infoDATA.taskType.associationType.value ==
  910. "patientTransport"
  911. ) {
  912. postType = "handleTrans";
  913. }
  914. //扫描
  915. post("/workerOrder/" + postType, data).then((ress) => {
  916. console.log(ress, 1111)
  917. if (ress.status == 200 || ress.status == 11111) {
  918. //标本和标本轮巡工单,扫描标本后会自动调用摄像头,继续扫描,直到status不是200
  919. if ((this.infoDATA.taskType.associationType.value == 'specimen' || this.infoDATA.taskType
  920. .associationType.value == 'specimenPlan') && ress.status != 11111) {
  921. if (type === 'scan') {
  922. setTimeout(() => {
  923. this.Scanning_again(this.dataId);
  924. }, 500)
  925. }
  926. }
  927. if (
  928. this.infoDATA.taskType.associationType.value == "drugsBag"
  929. ) {
  930. uni.hideLoading();
  931. // --------start----------
  932. uni.navigateTo({
  933. url: `../scanning_Result/scanning_Result?type=${
  934. this.queryObj.type
  935. }&type1=${
  936. this.queryObj.type1
  937. }&infoData=${encodeURIComponent(
  938. JSON.stringify(ress.data)
  939. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  940. this.queryObj.deptCode
  941. }&dept=${
  942. this.queryObj.dept
  943. }&taskTypeId=${
  944. this.infoDATA.taskType.id
  945. }&id=${this.dataId}&model=${encodeURIComponent(
  946. JSON.stringify(ress)
  947. )}&accountObj=${encodeURIComponent(JSON.stringify(this.accountObj))}&deptId=${this.deptId}&handover=${this.handover}`,
  948. });
  949. // ------------end------------
  950. } else {
  951. uni.hideLoading();
  952. // --------start----------
  953. if(this.infoDATA.taskType.associationType.value == 'patientTransport' && this.infoDATA.gdState.value == 5){
  954. // 门诊服务点,有orderList
  955. if(ress.orderList){
  956. uni.navigateTo({
  957. url: `/pages/outpatient/outpatientEndSignIn/outpatientEndSignIn?model=${encodeURIComponent(JSON.stringify(ress))}`,
  958. });
  959. }else{
  960. // 患者陪检执行中或待送达,患者转运待送达
  961. if (
  962. ress.type == "ins-zxz-1" ||
  963. ress.type == "ins-dsd-1" ||
  964. ress.type == "trans-dsd-1"
  965. ) {
  966. console.log(ress.patientName, "code");
  967. uni.navigateTo({
  968. url: `../scanning_Result/scanning_Result?type=${
  969. this.queryObj.type
  970. }&type1=${
  971. this.queryObj.type1
  972. }&infoData=${encodeURIComponent(
  973. JSON.stringify(ress.data)
  974. )}&status=${ress.status}&msg=${ress.msg}&patient=${
  975. ress.patient
  976. }&patientCode=${ress.patientCode}&deptName=${
  977. ress.deptName
  978. }&bedNum=${ress.bedNum}&deptCode=${
  979. this.queryObj.deptCode
  980. }&dept=${
  981. this.queryObj.dept
  982. }&taskTypeId=${
  983. this.infoDATA.taskType.id
  984. }&id=${this.dataId}&model=${encodeURIComponent(
  985. JSON.stringify(ress)
  986. )}`,
  987. });
  988. } else {
  989. uni.navigateTo({
  990. url: `../scanning_Result/scanning_Result?type=${
  991. this.queryObj.type
  992. }&type1=${
  993. this.queryObj.type1
  994. }&infoData=${encodeURIComponent(
  995. JSON.stringify(ress.data)
  996. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  997. this.queryObj.deptCode
  998. }&dept=${
  999. this.queryObj.dept
  1000. }&taskTypeId=${
  1001. this.infoDATA.taskType.id
  1002. }&deptId=${this.deptId}&id=${this.dataId}&model=${encodeURIComponent(
  1003. JSON.stringify(ress)
  1004. )}&speNum=${ress.specimenCount}&scanOrHand=${type}`,
  1005. });
  1006. }
  1007. }
  1008. }else{
  1009. // 患者陪检执行中或待送达,患者转运待送达
  1010. if (
  1011. ress.type == "ins-zxz-1" ||
  1012. ress.type == "ins-dsd-1" ||
  1013. ress.type == "trans-dsd-1"
  1014. ) {
  1015. console.log(ress.patientName, "code");
  1016. uni.navigateTo({
  1017. url: `../scanning_Result/scanning_Result?type=${
  1018. this.queryObj.type
  1019. }&type1=${
  1020. this.queryObj.type1
  1021. }&infoData=${encodeURIComponent(
  1022. JSON.stringify(ress.data)
  1023. )}&status=${ress.status}&msg=${ress.msg}&patient=${
  1024. ress.patient
  1025. }&patientCode=${ress.patientCode}&deptName=${
  1026. ress.deptName
  1027. }&bedNum=${ress.bedNum}&deptCode=${
  1028. this.queryObj.deptCode
  1029. }&dept=${
  1030. this.queryObj.dept
  1031. }&taskTypeId=${
  1032. this.infoDATA.taskType.id
  1033. }&id=${this.dataId}&model=${encodeURIComponent(
  1034. JSON.stringify(ress)
  1035. )}`,
  1036. });
  1037. } else {
  1038. uni.navigateTo({
  1039. url: `../scanning_Result/scanning_Result?type=${
  1040. this.queryObj.type
  1041. }&type1=${
  1042. this.queryObj.type1
  1043. }&infoData=${encodeURIComponent(
  1044. JSON.stringify(ress.data)
  1045. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  1046. this.queryObj.deptCode
  1047. }&dept=${
  1048. this.queryObj.dept
  1049. }&taskTypeId=${
  1050. this.infoDATA.taskType.id
  1051. }&deptId=${this.deptId}&id=${this.dataId}&model=${encodeURIComponent(
  1052. JSON.stringify(ress)
  1053. )}&speNum=${ress.specimenCount}&scanOrHand=${type}`,
  1054. });
  1055. }
  1056. }
  1057. // ------------end------------
  1058. }
  1059. } else {
  1060. uni.hideLoading();
  1061. uni.navigateTo({
  1062. url: `../scanning_Result/scanning_Result?type=${
  1063. this.queryObj.type
  1064. }&type1=${this.queryObj.type1}&status=${ress.status}&msg=${
  1065. ress.msg
  1066. }&deptCode=${this.queryObj.deptCode}&dept=${
  1067. this.queryObj.dept
  1068. }&taskTypeId=${
  1069. this.infoDATA.taskType.id
  1070. }&id=${this.dataId}&model=${encodeURIComponent(
  1071. JSON.stringify(ress)
  1072. )}&accountObj=${encodeURIComponent(JSON.stringify(this.accountObj))}&deptId=${this.deptId}&handover=${this.handover}&scanOrHand=${type}&qrcode=${this.currentCode}`,
  1073. });
  1074. }
  1075. });
  1076. }
  1077. } else {
  1078. uni.hideLoading();
  1079. uni.showToast({
  1080. icon: "none",
  1081. title: result.info || "接口获取数据失败!",
  1082. });
  1083. }
  1084. });
  1085. // ------------------------------
  1086. },
  1087. // 扫描
  1088. Scanning_again(id) {
  1089. if (!this.SMFlag) {
  1090. return;
  1091. }
  1092. this.SMFlag = false;
  1093. SM().then((ress1) => {
  1094. this.hand_scanning_common(ress1, 'scan');
  1095. }).catch(err => {
  1096. this.SMFlag = true;
  1097. });
  1098. },
  1099. show(type) {
  1100. this.showType = type;
  1101. if (type === "show") {
  1102. //展开
  1103. // 计算高度
  1104. const query = uni.createSelectorQuery().in(this);
  1105. query
  1106. .selectAll(".page_item_infos")
  1107. .boundingClientRect((data) => {
  1108. let len = data.reduce((prev, current) => {
  1109. return prev + current.height;
  1110. }, 0);
  1111. this.animation.height(len).step();
  1112. this.animationData = this.animation.export();
  1113. })
  1114. .exec();
  1115. } else if (type === "hiddle") {
  1116. this.animation.height(0).step();
  1117. this.animationData = this.animation.export();
  1118. }
  1119. },
  1120. // 确定
  1121. ok() {
  1122. this.models.disjunctor = false;
  1123. if (this.modelFlag == "complete1") {
  1124. //一对多完成扫描
  1125. let ids = [];
  1126. ids.push(this.wcId);
  1127. let data = {
  1128. type: this.infoType,
  1129. ids,
  1130. };
  1131. uni.showLoading({
  1132. title: '加载中',
  1133. mask: true,
  1134. });
  1135. post("/workerOrder/finishSpes", data).then((res) => {
  1136. if (res.status == 200) {
  1137. uni.reLaunch({
  1138. url: "../receiptpage/receiptpage",
  1139. });
  1140. } else {
  1141. uni.hideLoading();
  1142. uni.showToast({
  1143. icon: "none",
  1144. title: res.msg || "接口获取数据失败!",
  1145. });
  1146. }
  1147. });
  1148. } else if (this.modelFlag == "complete") {
  1149. //一对一完成扫描
  1150. let ids = [];
  1151. ids.push(this.wcId);
  1152. uni.showLoading({
  1153. title: '加载中',
  1154. mask: true,
  1155. });
  1156. post("/workerOrder/finishSpeOrder", ids).then((res) => {
  1157. if (res.status == 200) {
  1158. uni.reLaunch({
  1159. url: "../receiptpage/receiptpage",
  1160. });
  1161. } else {
  1162. uni.hideLoading();
  1163. uni.showToast({
  1164. icon: "none",
  1165. title: res.msg || "接口获取数据失败!",
  1166. });
  1167. }
  1168. });
  1169. }
  1170. },
  1171. // 取消
  1172. cancel() {
  1173. this.models.disjunctor = false;
  1174. },
  1175. //一对多完成扫描
  1176. Scanning_complete1(id) {
  1177. this.wcId = id;
  1178. this.modelFlag = "complete1";
  1179. this.models = {
  1180. disjunctor: true,
  1181. title: "提示",
  1182. content: "是否确定标本配送完成?",
  1183. icon: "warn",
  1184. operate: {
  1185. ok: "确定",
  1186. cancel: "取消",
  1187. },
  1188. };
  1189. },
  1190. //一对一完成扫描
  1191. Scanning_complete(id) {
  1192. this.wcId = id;
  1193. this.modelFlag = "complete";
  1194. this.models = {
  1195. disjunctor: true,
  1196. title: "提示",
  1197. content: "是否确定标本配送完成?",
  1198. icon: "warn",
  1199. operate: {
  1200. ok: "确定",
  1201. cancel: "取消",
  1202. },
  1203. };
  1204. },
  1205. // 知道了
  1206. showAlert() {
  1207. uni.navigateTo({
  1208. url: "../receiptpage/receiptpage",
  1209. });
  1210. },
  1211. // 请求详细页面的数据(除标本轮巡和标本配送)
  1212. getInfo(id) {
  1213. uni.showLoading({
  1214. title: "加载中",
  1215. mask: true,
  1216. });
  1217. get("/api/fetchData/workOrder/" + id).then((res) => {
  1218. uni.hideLoading();
  1219. if (res.status == 200) {
  1220. this.infoDATA = res.data;
  1221. if(this.infoDATA.gdState.value=='6' || this.infoDATA.gdState.value=='7'){//7已完成
  1222. this.getQuestionnaireSet()
  1223. }
  1224. if(this.infoDATA.taskType.isDigitalHandover==1){
  1225. this.checkNumber(this.infoDATA);//自动弹出数量核对
  1226. }
  1227. } else {
  1228. uni.showToast({
  1229. icon: "none",
  1230. title: res.msg || "接口获取数据失败!",
  1231. });
  1232. }
  1233. });
  1234. },
  1235. // 请求详细页面的数据
  1236. getInfoBySpecimen(id) {
  1237. uni.showLoading({
  1238. title: "加载中",
  1239. mask: true,
  1240. });
  1241. post("/api/getWechatItem", {
  1242. id
  1243. }).then((res) => {
  1244. uni.hideLoading();
  1245. if (res.state == 200) {
  1246. this.infoDATA = res.data;
  1247. if(this.infoDATA.gdState.value=='6' || this.infoDATA.gdState.value=='7'){//7已完成
  1248. this.getQuestionnaireSet()
  1249. }
  1250. if(this.infoDATA.taskType.isDigitalHandover==1){
  1251. this.checkNumber(this.infoDATA);//自动弹出数量核对
  1252. }
  1253. // 计算高度
  1254. setTimeout(() => {
  1255. const query = uni.createSelectorQuery().in(this);
  1256. query
  1257. .selectAll(".page_item_infos")
  1258. .boundingClientRect((data) => {
  1259. let len = data.reduce((prev, current) => {
  1260. return prev + current.height;
  1261. }, 0);
  1262. this.animation.height(len).step();
  1263. this.animationData = this.animation.export();
  1264. })
  1265. .exec();
  1266. }, 500)
  1267. } else {
  1268. uni.showToast({
  1269. icon: "none",
  1270. title: res.msg || "接口获取数据失败!",
  1271. });
  1272. }
  1273. });
  1274. },
  1275. // 获取问卷配置
  1276. getQuestionnaireSet(){
  1277. uni.showLoading({
  1278. title: "加载中",
  1279. mask: true,
  1280. });
  1281. const userData = uni.getStorageSync("userData");
  1282. post("/simple/data/fetchDataList/questionnaireConfig",{
  1283. questionnaireConfig:{
  1284. hosId:userData.user.currentHospital.id
  1285. },
  1286. idx:0,
  1287. sum:10
  1288. }).then((res) => {
  1289. uni.hideLoading();
  1290. if (res.status == 200) {
  1291. let data = res.list[0];
  1292. if(data.taskTypeDTOS.length>0 && data.questionnaireDTOS.length>0){
  1293. let isQuestion = data.taskTypeDTOS.find(i=> i.id == this.infoDATA.taskType.id)
  1294. if(isQuestion){
  1295. this.isQuestionModel = true
  1296. }
  1297. }
  1298. } else {
  1299. uni.showToast({
  1300. icon: "none",
  1301. title: res.msg || "接口获取数据失败!",
  1302. });
  1303. }
  1304. });
  1305. }
  1306. },
  1307. onShow() {
  1308. this.SMFlag = true;
  1309. },
  1310. onLoad(options) {
  1311. console.log(options);
  1312. if (options.accountObj && options.accountObj != "undefined") {
  1313. this.accountObj = JSON.parse(options.accountObj);
  1314. }
  1315. if (options.deptId && options.deptId != "undefined") {
  1316. this.deptId = options.deptId;
  1317. }
  1318. this.queryObj = options;
  1319. let id = options.id;
  1320. this.dataId = id; //工单ID
  1321. this.infoType = options.type1; //type类型
  1322. this.DEPTCode = options.deptCode; //二维码
  1323. this.DEPT = options.dept; //科室名称
  1324. if (
  1325. options.type == 'specimen' ||
  1326. options.type == 'specimenPlan'
  1327. ) {
  1328. this.getInfoBySpecimen(id);
  1329. } else {
  1330. this.getInfo(id);
  1331. }
  1332. // 创建动画
  1333. this.animation = uni.createAnimation({
  1334. duration: 500,
  1335. timingFunction: "ease",
  1336. });
  1337. // #ifdef APP-PLUS
  1338. webHandle("no", "app");
  1339. // #endif
  1340. // #ifdef H5
  1341. webHandle("no", "wx");
  1342. // #endif
  1343. },
  1344. onUnload() {
  1345. // 页面关闭后清空数据
  1346. this.animationData = {};
  1347. },
  1348. };
  1349. </script>
  1350. <style lang="less">
  1351. .Scanning_code {
  1352. padding: 0 20rpx;
  1353. padding-bottom: 124rpx;
  1354. .Scanning_top {
  1355. height: 340rpx;
  1356. .Scanning_top_icon {
  1357. width: 140rpx;
  1358. height: 140rpx;
  1359. margin: 0 auto;
  1360. margin-top: 36rpx;
  1361. border-radius: 50%;
  1362. line-height: 140rpx;
  1363. .cubeic-ok {
  1364. font-size: 140rpx;
  1365. color: #35b34a;
  1366. }
  1367. }
  1368. .Scanning_top_text {
  1369. text-align: center;
  1370. .text1 {
  1371. margin-top: 40rpx;
  1372. font-size: 48rpx;
  1373. }
  1374. .text2 {
  1375. margin-top: 16rpx;
  1376. font-size: 36rpx;
  1377. }
  1378. }
  1379. }
  1380. .page_item {
  1381. margin-top: 16rpx;
  1382. min-height: 356rpx;
  1383. background: #fff;
  1384. border-radius: 8rpx;
  1385. overflow: hidden;
  1386. padding: 0 16rpx;
  1387. border: 2rpx solid #e5e9ed;
  1388. .L {
  1389. width: 40rpx;
  1390. height: 40rpx;
  1391. border-radius: 50%;
  1392. background: #f9fafb;
  1393. position: relative;
  1394. left: -50rpx;
  1395. top: 66rpx;
  1396. }
  1397. .R {
  1398. width: 40rpx;
  1399. height: 40rpx;
  1400. border-radius: 50%;
  1401. background: #f9fafb;
  1402. position: relative;
  1403. float: right;
  1404. right: -50rpx;
  1405. top: 26rpx;
  1406. }
  1407. .starting {
  1408. width: 50rpx;
  1409. height: 50rpx;
  1410. color: #fff;
  1411. background: #49b856;
  1412. display: inline-block;
  1413. border-radius: 50%;
  1414. text-align: center;
  1415. line-height: 46rpx;
  1416. font-size: 32rpx;
  1417. margin-right: 6rpx;
  1418. }
  1419. .End {
  1420. width: 50rpx;
  1421. height: 50rpx;
  1422. color: #fff;
  1423. background: #39b199;
  1424. display: inline-block;
  1425. border-radius: 50%;
  1426. text-align: center;
  1427. line-height: 46rpx;
  1428. font-size: 32rpx;
  1429. margin-right: 6rpx;
  1430. }
  1431. .page_item_top {
  1432. height: 86rpx;
  1433. border-bottom: 2rpx dashed #e5e9ed;
  1434. padding: 0 16rpx;
  1435. .page_item_top_L {
  1436. height: 100%;
  1437. float: left;
  1438. line-height: 88rpx;
  1439. .emergencys {
  1440. background: #ff3b53 !important;
  1441. width: 124rpx !important;
  1442. }
  1443. .emergency {
  1444. background: #ff3b53 !important;
  1445. }
  1446. .emergency1 {
  1447. background: #49b856 !important;
  1448. }
  1449. .page_item_cont_start {
  1450. text-align: center;
  1451. height: 44rpx;
  1452. width: 104rpx;
  1453. line-height: 44rpx;
  1454. border-radius: 8rpx;
  1455. background: #49b856;
  1456. color: #fff;
  1457. display: inline-block;
  1458. .page_item_cont_start_txt {
  1459. font-size: 28rpx;
  1460. display: flex;
  1461. align-items: center;
  1462. justify-content: center;
  1463. }
  1464. }
  1465. .L_time {
  1466. color: #6cc076;
  1467. font-size: 32rpx;
  1468. }
  1469. .L_text {
  1470. font-size: 32rpx;
  1471. display: inline-block;
  1472. font-weight: 700;
  1473. margin-right: 8rpx;
  1474. }
  1475. }
  1476. .page_item_top_R {
  1477. height: 60rpx;
  1478. float: right;
  1479. padding-top: 20rpx;
  1480. font-size: 32rpx;
  1481. position: absolute;
  1482. right: 50rpx;
  1483. .L_iocn {
  1484. display: inline-block;
  1485. height: 52rpx;
  1486. line-height: 48rpx;
  1487. color: rgb(7, 134, 60);
  1488. font-size: 36rpx;
  1489. font-weight: 700;
  1490. }
  1491. }
  1492. }
  1493. .page_item_cont {
  1494. min-height: 180rpx;
  1495. padding: 0 16rpx;
  1496. text-align: left;
  1497. position: relative;
  1498. .text_big {
  1499. font-size: 32rpx;
  1500. position: absolute;
  1501. right: 16rpx;
  1502. font-weight: 700;
  1503. margin-top: 10rpx;
  1504. }
  1505. .text_big2 {
  1506. font-size: 32rpx;
  1507. position: absolute;
  1508. right: 16rpx;
  1509. font-weight: 700;
  1510. }
  1511. .line {
  1512. height: 20rpx;
  1513. width: 2rpx;
  1514. border-left: 2rpx solid #e5e9ed;
  1515. position: absolute;
  1516. top: 82rpx;
  1517. left: 40rpx;
  1518. }
  1519. .lines {
  1520. height: 40%;
  1521. width: 2rpx;
  1522. border-left: 2rpx solid #e5e9ed;
  1523. position: absolute;
  1524. top: 23%;
  1525. left: 36rpx;
  1526. }
  1527. .page_item_cont_T {
  1528. padding-top: 28rpx;
  1529. font-size: 28rpx;
  1530. .page_item_cont_title {
  1531. height: 100%;
  1532. font-size: 32rpx;
  1533. }
  1534. }
  1535. .page_item_cont_B {
  1536. padding-top: 28rpx;
  1537. margin-bottom: 28rpx;
  1538. .page_item_cont_title {
  1539. height: 60rpx;
  1540. font-size: 32rpx;
  1541. }
  1542. .page_item_cont_title1 {
  1543. height: 60rpx;
  1544. line-height: 60rpx;
  1545. font-size: 32rpx;
  1546. padding-left: 64rpx;
  1547. }
  1548. }
  1549. }
  1550. .page_item_foot {
  1551. border-top: 2rpx dashed #e5e9ed;
  1552. border-bottom: 2rpx dashed #e5e9ed;
  1553. padding: 28rpx 16rpx;
  1554. text-align: left;
  1555. .page_item_foot_text {
  1556. font-size: 32rpx;
  1557. margin-bottom: 20rpx;
  1558. display: flex;
  1559. justify-content: space-between;
  1560. align-items: center;
  1561. .text1 {
  1562. color: rgb(102, 102, 102);
  1563. }
  1564. .text2 {
  1565. font-weight: 700;
  1566. }
  1567. }
  1568. .text_padd {
  1569. padding: 0 10% 0 10%;
  1570. }
  1571. }
  1572. .page_item_info {
  1573. padding: 20rpx 16rpx;
  1574. text-align: left;
  1575. line-height: 60rpx;
  1576. font-size: 32rpx;
  1577. .page_item_info_title {
  1578. font-weight: 700;
  1579. }
  1580. .text {
  1581. float: right;
  1582. font-weight: 700;
  1583. .text_span {
  1584. color: #49b856;
  1585. }
  1586. }
  1587. }
  1588. #infos {
  1589. height: 0;
  1590. overflow: hidden;
  1591. }
  1592. .page_item_infos {
  1593. padding-bottom: 20rpx;
  1594. border-bottom: 2rpx dashed #e5e9ed;
  1595. .page_item_info2 {
  1596. text-align: left;
  1597. line-height: 60rpx;
  1598. font-size: 32rpx;
  1599. padding-left: 16rpx;
  1600. .page_item_foot_text {
  1601. font-size: 32rpx;
  1602. margin-bottom: 20rpx;
  1603. .text1 {
  1604. color: rgb(102, 102, 102);
  1605. }
  1606. .text2 {
  1607. float: right;
  1608. font-weight: 700;
  1609. }
  1610. }
  1611. }
  1612. }
  1613. #pulldown {
  1614. color: #49b856;
  1615. font-size: 36rpx;
  1616. height: 60rpx;
  1617. text-align: center;
  1618. .cubeic-pulldown {
  1619. font-size: 48rpx;
  1620. position: relative;
  1621. bottom: 6rpx;
  1622. }
  1623. }
  1624. #pullup {
  1625. color: #49b856;
  1626. font-size: 36rpx;
  1627. height: 60rpx;
  1628. text-align: center;
  1629. .cubeic-pullup {
  1630. font-size: 48rpx;
  1631. position: relative;
  1632. top: 12rpx;
  1633. }
  1634. }
  1635. }
  1636. .foot_btn2 {
  1637. position: fixed;
  1638. bottom: 0;
  1639. right: 20rpx;
  1640. left: 20rpx;
  1641. line-height: 66rpx;
  1642. height: 100rpx;
  1643. border-top: 2rpx solid #e5e9ed;
  1644. background: #f9fafb;
  1645. display: flex;
  1646. justify-content: space-between;
  1647. .btn2,
  1648. .btn3 {
  1649. height: 66rpx;
  1650. flex: 1;
  1651. background-image: linear-gradient(to right, #72c172, #3bb197);
  1652. color: #fff;
  1653. border-radius: 8rpx;
  1654. font-size: 32rpx;
  1655. margin-top: 16rpx;
  1656. margin-right: 16rpx;
  1657. text-align: center;
  1658. &:last-of-type {
  1659. margin-right: 0;
  1660. }
  1661. }
  1662. }
  1663. .foot_btn1 {
  1664. position: fixed;
  1665. bottom: 0;
  1666. right: 20rpx;
  1667. left: 20rpx;
  1668. line-height: 66rpx;
  1669. height: 100rpx;
  1670. border-top: 2rpx solid #e5e9ed;
  1671. background: #f9fafb;
  1672. display: flex;
  1673. .btn1,
  1674. .btn2 {
  1675. height: 66rpx;
  1676. flex: 1;
  1677. margin: 0 1%;
  1678. background-image: linear-gradient(to right, #72c172, #3bb197);
  1679. color: #fff;
  1680. border-radius: 8rpx;
  1681. font-size: 32rpx;
  1682. margin-top: 16rpx;
  1683. text-align: center;
  1684. }
  1685. }
  1686. }
  1687. </style>