receipt_infopage.vue 85 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398
  1. <template>
  2. <view class="Receipt_infopage" v-if="Object.keys(infoDATA).length > 0">
  3. <view class="title">工单信息</view>
  4. <view class="page_item footerOtherMargin">
  5. <view class="page_item_top">
  6. <view class="page_item_top_L">
  7. <text class="L_text">单号:{{ infoDATA.gdcode }}</text>
  8. <view class="page_item_cont_start emergency1" v-if="infoDATA.emergencyType.value == 1">
  9. <text>
  10. <text class="cubeic-star newicon newicon-shiwujiaoxing"></text>
  11. {{ infoDATA.emergencyType.name }}
  12. </text>
  13. </view>
  14. <view class="page_item_cont_start emergency" v-if="infoDATA.emergencyType.value == 2">
  15. <text>
  16. <text class="cubeic-star newicon newicon-shiwujiaoxing"></text>
  17. {{ infoDATA.emergencyType.name }}
  18. </text>
  19. </view>
  20. <view class="page_item_cont_start emergencys" v-if="infoDATA.emergencyType.value == 3">
  21. <text>
  22. <text class="cubeic-star newicon newicon-shiwujiaoxing"></text>
  23. {{ infoDATA.emergencyType.name }}
  24. </text>
  25. </view>
  26. </view>
  27. <view class="page_item_top_R">
  28. <text class="L_iocn" v-if="
  29. !(
  30. infoDATA.gdState.value == 5 &&
  31. infoDATA.taskType.associationType.value == 'inspect'
  32. )
  33. ">{{ infoDATA.gdState.name }}</text>
  34. <text class="L_iocn" v-if="
  35. infoDATA.gdState.value == 5 &&
  36. infoDATA.taskType.associationType.value == 'inspect'
  37. ">待送回</text>
  38. </view>
  39. <view class="L"></view>
  40. <view class="R"></view>
  41. </view>
  42. <view class="page_item_cont">
  43. <view class="page_item_cont_T">
  44. <view class="page_item_cont_title">
  45. <text> <text class="starting">起</text> 点科室 </text>
  46. <text class="text_big">{{ infoDATA.startDept.dept }}</text>
  47. </view>
  48. </view>
  49. <view class="line"></view>
  50. <view class="page_item_cont_B">
  51. <view class="page_item_cont_title" v-for="(dept, index) of infoDATA.middleDept" :key="'ico' + index">
  52. <view v-if="infoDATA.taskType.associationType.value == 'inspect'">
  53. <text> <text class="End">检</text> 查科室 </text>
  54. <text class="text_big">{{ dept.dept }}</text>
  55. <view></view>
  56. </view>
  57. </view>
  58. <template v-if="infoDATA.taskType.associationType.value != 'inspect'">
  59. <view class="page_item_cont_title" v-for="(dept, i) of infoDATA.endDepts" :key="i">
  60. <view>
  61. <text> <text class="End">终</text> 点科室 </text>
  62. <text class="text_big">{{ dept.dept }}</text>
  63. </view>
  64. </view>
  65. </template>
  66. <view v-if="
  67. infoDATA.taskType.associationType.value == 'inspect' ||
  68. infoDATA.taskType.associationType.value == 'patientTransport'
  69. ">
  70. <!-- 待抢单 -->
  71. <text class="red" v-if="infoDATA.gdState.value == 2">请扫描患者腕带,或者请扫描科室码</text>
  72. <!-- 待到达 -->
  73. <text class="red" v-if="infoDATA.gdState.value == 4">请扫描患者腕带</text>
  74. <!-- 执行中 -->
  75. <text class="red" v-if="infoDATA.gdState.value == 8">请扫描检查科室码,并扫描患者腕带</text>
  76. <!-- 待送达 -->
  77. <text class="red" v-if="infoDATA.gdState.value == 5">请扫描终点科室码,并扫描患者腕带</text>
  78. </view>
  79. </view>
  80. </view>
  81. <view class="page_item_foot">
  82. <view class="page_item_foot_text">
  83. <text class="text1">状态</text>
  84. <text class="text2" v-if="
  85. !(
  86. infoDATA.gdState.value == 5 &&
  87. infoDATA.taskType.associationType.value == 'inspect'
  88. )
  89. ">{{ infoDATA.gdState.name }}</text>
  90. <text class="text2" v-if="
  91. infoDATA.gdState.value == 5 &&
  92. infoDATA.taskType.associationType.value == 'inspect'
  93. ">待送回</text>
  94. </view>
  95. <!-- <view class="page_item_foot_text">
  96. <text class="text1">关联类型</text>
  97. <text class="text2">{{ infoDATA.taskType.associationType.name }}</text>
  98. </view> -->
  99. <view class="page_item_foot_text">
  100. <text class="text1">任务类型</text>
  101. <text class="text2">{{ infoDATA.taskType.taskName }}<template
  102. v-if="infoDATA.goodsRemark">-{{infoDATA.goodsRemark}}</template></text>
  103. </view>
  104. <view class="page_item_foot_text" v-if="infoDATA.taskType.associationType.value==='inspect'">
  105. <text class="text1">是否半程陪检</text>
  106. <text class="text2">{{ infoDATA.isHalfInspect===1?'是':'否' }}</text>
  107. </view>
  108. <view class="page_item_foot_text">
  109. <text class="text1">执行人员</text>
  110. <text class="text2">{{ infoDATA.worker?infoDATA.worker.name:'-' }}</text>
  111. </view>
  112. <view class="page_item_foot_text" v-if="infoDATA.gdState.value == '2'">
  113. <text class="text1">预计响应时间</text>
  114. <text class="text2">{{ infoDATA.estimeResponseTime || '无' }}</text>
  115. </view>
  116. <view class="page_item_foot_text" v-if="infoDATA.gdState.value == '5'">
  117. <text class="text1" v-if="!(infoDATA.taskType.associationType.value == 'inspect')">预计送达时间</text>
  118. <text class="text1" v-if="infoDATA.taskType.associationType.value == 'inspect'">预计送回时间</text>
  119. <text class="text2">{{ infoDATA.estimeCompleteTime || '无' }}</text>
  120. </view>
  121. <view class="page_item_foot_text" v-if="infoDATA.gdState.value == '4'">
  122. <text class="text1">预计到达时间</text>
  123. <text class="text2">{{ infoDATA.estimateArriveTime || '无' }}</text>
  124. </view>
  125. <view class="page_item_foot_text">
  126. <text class="text1">创建时间</text>
  127. <text class="text2">{{ infoDATA.startTime || '无' }}</text>
  128. </view>
  129. <view class="page_item_foot_text" v-if="!(infoDATA.taskType.associationType.value == 'ordinary' && (infoDATA.taskType.ordinaryField.value == 'drugsJpbag' || infoDATA.taskType.ordinaryField.value == 'drugsWestern' || infoDATA.taskType.ordinaryField.value == 'drugsReturn' || infoDATA.taskType.ordinaryField.value == 'drugsPoison' || infoDATA.taskType.ordinaryField.value == 'drugsHerbal'))">
  130. <text class="text1">预约时间</text>
  131. <text class="text2" v-if="infoDATA.taskType.associationType.value == 'inspect'">{{ infoDATA.yyTime }}</text>
  132. <text class="text2"
  133. v-if="infoDATA.taskType.associationType.value == 'patientTransport' || infoDATA.taskType.associationType.value == 'other'">{{ infoDATA.yyjdTime|yyTimeFilter }}</text>
  134. </view>
  135. <view class="page_item_foot_text" v-if="
  136. infoDATA.taskType.associationType.value == 'inspect' ||
  137. infoDATA.taskType.associationType.value == 'patientTransport'
  138. ">
  139. <text class="text1" v-if="infoDATA.patient.residenceNo">床号</text>
  140. <text class="text2" v-if="infoDATA.patient.residenceNo">{{
  141. infoDATA.patient ? infoDATA.patient.bedNum : "-"
  142. }}</text>
  143. <text class="text1" v-if="!infoDATA.patient.residenceNo">身份证号</text>
  144. <text class="text2" v-if="!infoDATA.patient.residenceNo">{{
  145. infoDATA.patient ? infoDATA.patient.identityCardNo : "-"
  146. }}</text>
  147. </view>
  148. <view class="page_item_foot_text" v-if="
  149. infoDATA.taskType.associationType.value == 'inspect' ||
  150. infoDATA.taskType.associationType.value == 'patientTransport'
  151. ">
  152. <text class="text1">携带设备</text>
  153. <text class="text2">{{ infoDATA.goods || "暂无" }}</text>
  154. </view>
  155. <view class="page_item_info" style="padding: 0;" v-if="infoDATA.workOrderRemark !== undefined">
  156. <view class="page_item_foot_text">
  157. <view class="text1" v-if="infoDATA.taskType.associationType.value == 'inspect' || infoDATA.taskType.associationType.value == 'patientTransport'">注意事项</view>
  158. <view class="text1" v-else>工单备注</view>
  159. <view class="text2" style="float: none;word-break: break-all;">{{ infoDATA.workOrderRemark }}</view>
  160. </view>
  161. </view>
  162. <view class="page_item_foot_text" v-if="
  163. infoDATA.taskType.associationType.value == 'inspect' ||
  164. infoDATA.taskType.associationType.value == 'patientTransport'
  165. ">
  166. <text class="text1">患者姓名</text>
  167. <text class="text2">{{ infoDATA.patient.patientName }}
  168. <text v-if="infoDATA.patient.residenceNo">
  169. ({{
  170. infoDATA.patient.residenceNo
  171. }})
  172. </text>
  173. <text v-if="!infoDATA.patient.residenceNo">
  174. ({{
  175. infoDATA.patient.cardNo
  176. }})
  177. </text>
  178. </text>
  179. </view>
  180. <view class="page_item_foot_text" v-if="
  181. (infoDATA.taskType.associationType.value == 'inspect' ||
  182. infoDATA.taskType.associationType.value == 'patientTransport')&&infoDATA.patient.careLevel
  183. ">
  184. <text class="text1">{{infoDATA.patient.careLevel.desc}}</text>
  185. <text class="text2"
  186. :class="[(infoDATA.patient.careLevel.value==0||infoDATA.patient.careLevel.value==1)?'red':'green']">{{infoDATA.patient.careLevel.name}}</text>
  187. </view>
  188. <view class="page_item_foot_text" v-if="
  189. (infoDATA.taskType.associationType.value == 'inspect' ||
  190. infoDATA.taskType.associationType.value == 'patientTransport')&&infoDATA.patient.illnessState
  191. ">
  192. <text class="text1">{{infoDATA.patient.illnessState.desc}}</text>
  193. <text class="text2"
  194. :class="{red:infoDATA.patient.illnessState.value==2||infoDATA.patient.illnessState.value==3}">{{infoDATA.patient.illnessState.name}}</text>
  195. </view>
  196. <view class="page_item_foot_text"
  197. v-if="
  198. (infoDATA.taskType.associationType.value == 'inspect' ||
  199. infoDATA.taskType.associationType.value == 'patientTransport')&&(infoDATA.isAccompany===1||infoDATA.isAccompany===0)">
  200. <text class="text1">陪同情况</text>
  201. <text class="text2"
  202. :class="{red:infoDATA.isAccompany===1}">{{ infoDATA.isAccompany===1?'需要医护陪同':'无需医护陪同'}}</text>
  203. </view>
  204. <view class="page_item_foot_text"
  205. v-if="(infoDATA.taskType.associationType.value == 'inspect' || infoDATA.taskType.associationType.value == 'patientTransport') && infoDATA.inspectScore">
  206. <text class="text1">陪检方式</text>
  207. <text class="text2">{{ infoDATA.inspectScore.inspectMode }}</text>
  208. </view>
  209. <view class="page_item_foot_text"
  210. v-if="(infoDATA.taskType.associationType.value == 'inspect' || infoDATA.taskType.associationType.value == 'patientTransport') && infoDATA.inspectUsers">
  211. <text class="text1">陪检人员</text>
  212. <text class="text2">{{ infoDATA.inspectUsers }}</text>
  213. </view>
  214. <view class="page_item_foot_text"
  215. v-if="(infoDATA.taskType.associationType.value == 'inspect' || infoDATA.taskType.associationType.value == 'patientTransport') && infoDATA.inspectUsersNum">
  216. <text class="text1">陪检人数</text>
  217. <text class="text2">{{ infoDATA.inspectUsersNum }}</text>
  218. </view>
  219. <view class="page_item_foot_text" v-if="infoDATA.taskType.associationType.value == 'other' && infoDATA.inspectUsers">
  220. <text class="text1">执行人员</text>
  221. <text class="text2">{{ infoDATA.inspectUsers }}</text>
  222. </view>
  223. <view class="page_item_foot_text"
  224. v-if="infoDATA.taskType.associationType.value == 'other' && infoDATA.inspectUsersNum">
  225. <text class="text1">执行人数</text>
  226. <text class="text2">{{ infoDATA.inspectUsersNum }}</text>
  227. </view>
  228. </view>
  229. <!-- 药包 -->
  230. <view class="page_item_info" v-if="infoDATA.taskType.associationType.value == 'drugsBag'">
  231. <text class="page_item_info_title">药包编码</text>
  232. <text class="text">{{ infoDATA.drugs?infoDATA.drugs.packid:'无' }}</text>
  233. </view>
  234. <!-- 血制品 -->
  235. <view class="page_item_info" v-if="
  236. infoDATA.taskType.associationType.value == 'ordinary' &&
  237. infoDATA.taskType.ordinaryField.value == 'blood'
  238. ">
  239. <view>
  240. <text class="page_item_info_title">·</text>
  241. <text class="text">
  242. 送达数量
  243. <text class="page_item_info_txt">{{infoDATA.deliveryNum || '无'}}</text>
  244. </text>
  245. <text class="text">
  246. 实收数量
  247. <text class="page_item_info_txt">{{infoDATA.actualReceiveNum || '无'}}</text>
  248. </text>
  249. <text class="text">
  250. 应收数量
  251. <text class="page_item_info_txt">{{infoDATA.expectReceiveNum || '无'}}</text>
  252. </text>
  253. </view>
  254. </view>
  255. <!-- 标本打包 -->
  256. <view class="page_item_info" v-if="infoDATA.taskType.associationType.value == 'ordinary' && infoDATA.taskType.ordinaryField.value == 'specimenPackage'">
  257. <view>
  258. <text class="page_item_info_title">打包码</text>
  259. <text class="text">{{infoDATA.pathologyPackInfoDTO ? infoDATA.pathologyPackInfoDTO.packCode : ''}}</text>
  260. </view>
  261. <view>
  262. <text class="page_item_info_title">标本数量</text>
  263. <text class="text">{{infoDATA.pathologyPackInfoDTO ? infoDATA.pathologyPackInfoDTO.specimenNum : ''}}</text>
  264. </view>
  265. </view>
  266. <!-- 标本 -->
  267. <view class="page_item_info" v-if="
  268. infoDATA.taskType.associationType.value == 'specimen' ||
  269. infoDATA.taskType.associationType.value == 'specimenPlan'
  270. ">
  271. <view>
  272. <text class="page_item_info_title">标本信息</text>
  273. <text class="text">
  274. 预计接收
  275. <text class="page_item_info_txt">{{
  276. infoDATA.expectReceiveNum || '无'
  277. }}</text>
  278. </text>
  279. <text class="text"
  280. v-if="infoDATA.gdState.value == 5 || infoDATA.gdState.value == 6 || infoDATA.gdState.value == 7">
  281. 扫描接收
  282. <text class="page_item_info_txt">{{infoDATA.actualReceiveNum || '无'}}</text>
  283. </text>
  284. <text class="text" v-if="infoDATA.gdState.value == 6 || infoDATA.gdState.value == 7">
  285. 实际送达
  286. <text class="page_item_info_txt">{{actualDelivery || '无'}}</text>
  287. </text>
  288. </view>
  289. <view v-for="spe in infoDATA.specimenSet" :key="spe.id" class="spe_list">
  290. <view>
  291. <text class="page_item_info_title">标本类型</text>
  292. <text class="text">{{ spe.stype ? spe.stype.name : "-" }}({{
  293. spe.urgent == 1 ? "急" : "普"
  294. }})</text>
  295. </view>
  296. <view>
  297. <text class="page_item_info_title">标本编码</text>
  298. <text class="text">{{ spe.scode }}</text>
  299. </view>
  300. <view>
  301. <text class="page_item_info_title">患者姓名</text>
  302. <text class="text">{{ spe.patientName }}<text v-if="spe.bedNum">({{spe.bedNum}})</text></text>
  303. </view>
  304. <view>
  305. <text class="page_item_info_title">目标科室</text>
  306. <text class="text">{{
  307. spe.checkDept ? spe.checkDept.dept : "-"
  308. }}</text>
  309. </view>
  310. </view>
  311. </view>
  312. <!-- 静配 -->
  313. <view class="page_item_info" v-if="infoDATA.taskType.associationType.value == 'jPBag'">
  314. <text class="page_item_info_title">药包编码</text>
  315. <text class="text">{{ infoDATA.staticDistri?infoDATA.staticDistri.packid:'无' }}</text>
  316. </view>
  317. <!-- 陪检 -->
  318. <view v-if="infoDATA.taskType.associationType.value == 'inspect'">
  319. <view class="page_item_info">
  320. <text class="page_item_info_title">检查信息</text>
  321. </view>
  322. <view id="infos" :animation="animationData">
  323. <view class="page_item_infos" v-for="(item, index) of infoDATA.checkList" :key="index">
  324. <view class="page_item_info2">
  325. <view class="page_item_foot_text">
  326. <text class="text1">检查科室</text>
  327. <text class="text2">{{ item.execDept?item.execDept.dept:'-' }}</text>
  328. </view>
  329. <view class="page_item_foot_text">
  330. <text class="text1">检查项</text>
  331. <text class="text2">{{ item.inspectName||'-' }}</text>
  332. </view>
  333. <view class="page_item_foot_text">
  334. <text class="text1">叫号信息</text>
  335. <text class="text2">{{ item.reservationNumber||'-' }}</text>
  336. </view>
  337. <view class="page_item_foot_text">
  338. <text class="text1">预约时间</text>
  339. <text class="text2">{{ item.yyTime || "-" }}</text>
  340. </view>
  341. <!-- <view class="page_item_foot_text"
  342. v-show="item.inspectState.value==1||item.inspectState.value==2||item.inspectState.value==4">
  343. <view class="btn" @click.stop="remove(item)">移除</view>
  344. </view> -->
  345. <view class="page_item_foot_text" v-if="item.inspectState.value!=3">
  346. <view class="btn" @click.stop="remove(item)">移除</view>
  347. </view>
  348. </view>
  349. </view>
  350. </view>
  351. <view id="pulldown" @click="show('show')" v-if="showType == 'hiddle'">
  352. 点击可查看检查详情
  353. <text class="cubeic-pulldown newicon newicon-paixujiantouxia"></text>
  354. </view>
  355. <view id="pullup" @click="show('hiddle')" v-if="showType == 'show'">
  356. 点击可收起检查详情
  357. <text class="cubeic-pullup newicon newicon-paixujiantoushang"></text>
  358. </view>
  359. </view>
  360. </view>
  361. <view class="foot_btn2 footerPadding" style="flex-wrap: wrap;">
  362. <view class="btn2" @click="showAlert" v-if="infoDATA.gdState.value == 2">接单</view>
  363. <!-- 如果不是静配,药配,标本配送,标本轮巡,万能交接 -->
  364. <template
  365. v-if="((!infoDATA.worker)||(infoDATA.worker&&infoDATA.worker.id == currentUserId))&&infoDATA.gdState.value != 6&&infoDATA.gdState.value != 7&&infoDATA.gdState.value != 11">
  366. <!-- <view :class="[infoDATA.taskType.specialCloseButton == 1 ? 'btn3' : 'btn2']" v-if="
  367. (hideInspectScan != 1 || (hideInspectScan == 1 && infoDATA.gdState.value == 4)) &&
  368. infoDATA.gdState.value != 2 &&
  369. infoDATA.taskType.associationType.value != 'jPBag' &&
  370. infoDATA.taskType.associationType.value != 'drugsBag' &&
  371. infoDATA.taskType.associationType.value != 'specimen' &&
  372. infoDATA.taskType.associationType.value != 'specimenPlan' &&
  373. infoDATA.taskType.associationType.value != 'ordinary' &&
  374. !(infoDATA.taskType.associationType.value == 'other' && (infoDATA.gdState.value == 4 && infoDATA.taskType.carryingCourses[0].actionsSwitch || infoDATA.gdState.value == 5 && infoDATA.taskType.carryingCourses[1].actionsSwitch))
  375. " hover-class="seimin-btn-hover">
  376. <smallScreen :sData="infoDATA" :sType="1">扫码</smallScreen>
  377. </view> -->
  378. <!-- 其他临床服务-完成工单-待到达 -->
  379. <view v-if="infoDATA.taskType.associationType.value == 'other' && infoDATA.gdState.value == 4 && infoDATA.taskType.carryingCourses[0].actionsSwitch" class="btn2 page_item_btn" @click="otherCompleteOrder(infoDATA)" hover-class="seimin-btn-hover">确认到达</view>
  380. <!-- 其他临床服务-完成工单-待送达 -->
  381. <view v-if="infoDATA.taskType.associationType.value == 'other' && infoDATA.gdState.value == 5 && infoDATA.taskType.carryingCourses[1].actionsSwitch" class="btn2 page_item_btn" @click="otherCompleteOrder(infoDATA)" hover-class="seimin-btn-hover">完成工单</view>
  382. <!-- 其他临床服务-拍照 -->
  383. <!-- <view v-if="infoDATA.taskType.associationType.value == 'other' && infoDATA.gdState.value == 4 && infoDATA.taskType.carryingCourses[0].photoSwitch" class="btn2 page_item_btn" @click="photographToOther(infoDATA, 'start')" hover-class="seimin-btn-hover">拍照</view> -->
  384. <!-- <view :class="[infoDATA.taskType.specialCloseButton == 1 ? 'btn3' : 'btn2']" @click="photograph(infoDATA)" v-if="
  385. infoDATA.taskType.associationType.value != 'jPBag' &&
  386. infoDATA.taskType.associationType.value != 'drugsBag' &&
  387. infoDATA.taskType.associationType.value != 'specimen' &&
  388. infoDATA.taskType.associationType.value != 'specimenPlan' &&
  389. infoDATA.taskType.associationType.value != 'other' &&
  390. infoDATA.taskType.associationType.value != 'ordinary' &&
  391. infoDATA.gdState.value == 4
  392. " hover-class="seimin-btn-hover">拍照</view> -->
  393. <view class="btn3" @click="specialCloseClick()" v-if="
  394. infoDATA.gdState.value != 2 &&
  395. infoDATA.taskType.associationType.value != 'jPBag' &&
  396. infoDATA.taskType.associationType.value != 'drugsBag' &&
  397. infoDATA.taskType.associationType.value != 'specimen' &&
  398. infoDATA.taskType.associationType.value != 'specimenPlan' &&
  399. infoDATA.taskType.associationType.value != 'ordinary' &&
  400. infoDATA.taskType.specialCloseButton == 1
  401. " hover-class="seimin-btn-hover">特殊情况关闭</view>
  402. </template>
  403. <!-- 如果不是患者陪检或患者转运或其他,万能交接 -->
  404. <!-- <view :class="[infoDATA.taskType.specialCloseButton == 1 ? 'btn3' : 'btn2']" v-if="
  405. infoDATA.gdState.value != 2 &&
  406. infoDATA.taskType.associationType.value != 'patientTransport' &&
  407. infoDATA.taskType.associationType.value != 'inspect' &&
  408. infoDATA.taskType.associationType.value != 'other' &&
  409. infoDATA.taskType.associationType.value != 'ordinary'
  410. " hover-class="seimin-btn-hover">
  411. <smallScreen :sData="infoDATA" :sType="2">扫码</smallScreen>
  412. </view> -->
  413. <!-- 如果是万能交接 -->
  414. <view :class="[infoDATA.taskType.specialCloseButton == 1 ? 'btn3' : 'btn2']"
  415. v-if="infoDATA.taskType.associationType.value == 'ordinary'"
  416. hover-class="seimin-btn-hover" @click="goBack()">
  417. 返回
  418. </view>
  419. <view class="btn3" @click="specialCloseClick()" v-if="
  420. infoDATA.gdState.value != 2 &&
  421. infoDATA.taskType.associationType.value != 'patientTransport' &&
  422. infoDATA.taskType.associationType.value != 'inspect' &&
  423. infoDATA.taskType.associationType.value != 'other' &&
  424. infoDATA.taskType.specialCloseButton == 1
  425. " hover-class="seimin-btn-hover">特殊情况关闭</view>
  426. <view class="btn3" @click="viewSpecimen(infoDATA)" v-if="
  427. infoDATA.taskType.associationType.value == 'specimen' ||
  428. infoDATA.taskType.associationType.value == 'specimenPlan'
  429. " hover-class="seimin-btn-hover">查看标本</view>
  430. <view class="btn3" @click="redeployScan(infoDATA)" v-if="(infoDATA.taskType.associationType.value == 'specimen' ||
  431. infoDATA.taskType.associationType.value == 'specimenPlan') && sPehandoverOrder==1 && (infoDATA.gdState.value==4 || infoDATA.gdState.value==5 || infoDATA.gdState.value==8)" hover-class="seimin-btn-hover">转派</view>
  432. <view class="btn3" @click="viewDrugsBag(infoDATA)" v-if="infoDATA.taskType.associationType.value == 'drugsBag'" hover-class="seimin-btn-hover">查看业务流程</view>
  433. <view class="btn3" @click="toDrugBatches(infoDATA.drugs.batchNo)" v-if="infoDATA.taskType.associationType.value == 'drugsBag' && taskTypeConfig.drugsBatchInfo == 1" hover-class="seimin-btn-hover">药品批次</view>
  434. <view class="btn3" @click="viewBlood(infoDATA)" v-if="infoDATA.taskType.associationType.value == 'ordinary' && infoDATA.taskType.ordinaryField.value == 'blood'" hover-class="seimin-btn-hover">查看血制品</view>
  435. <view class="btn3" @click="viewNewDrugsBag(infoDATA, infoDATA.taskType.ordinaryField.value)" v-if="infoDATA.taskType.associationType.value == 'ordinary' && (infoDATA.taskType.ordinaryField.value == 'drugsJpbag' || infoDATA.taskType.ordinaryField.value == 'drugsWestern' || infoDATA.taskType.ordinaryField.value == 'drugsReturn' || infoDATA.taskType.ordinaryField.value == 'drugsPoison' || infoDATA.taskType.ordinaryField.value == 'drugsHerbal')" hover-class="seimin-btn-hover">业务数据</view>
  436. <view class="btn3" @click="additionalUser(infoDATA)" v-if="(infoDATA.taskType.associationType.value == 'inspect' || infoDATA.taskType.associationType.value == 'patientTransport') && infoDATA.worker && infoDATA.worker.id && multiplayerMode === 1" hover-class="seimin-btn-hover">追加陪检人员</view>
  437. <view class="btn3" @click="additionalUser(infoDATA)" v-if="infoDATA.taskType.associationType.value == 'other' && infoDATA.worker && infoDATA.worker.id && clinicalMultiplayerMode === 1 && clinicalTaskIdsFlag && !infoDATA.copyBy" hover-class="seimin-btn-hover">追加执行人员</view>
  438. <view class="btn3" style="flex-basis: 100%;" @click="patientHandover(infoDATA)" v-if="infoDATA.taskType.associationType.value == 'patientTransport' && infoDATA.worker && infoDATA.worker.id && handoverOrder === 1" hover-class="seimin-btn-hover">扫描交接</view>
  439. </view>
  440. <!-- 弹窗 -->
  441. <showModel :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content"
  442. @know="know" :operate="models.operate" @ok="ok" @cancel="cancel" :textareaFlag="textareaFlag"
  443. @textareaInput="textareaInput"></showModel>
  444. <!-- 弹窗 -->
  445. <inspectRemoveModel :title="models1.title" :icon="models1.icon" :disjunctor="models1.disjunctor"
  446. :content="models1.content" @know="know1" :operate="models1.operate" @ok="ok1" @cancel="cancel1" :remove="true">
  447. </inspectRemoveModel>
  448. <!-- 弹窗 -->
  449. <showModel :title="models2.title" :icon="models2.icon" :disjunctor="models2.disjunctor" :content="models2.content"
  450. :operate="models2.operate" @ok="ok2" @cancel="cancel2"></showModel>
  451. <!-- 填写交接人工号弹窗 -->
  452. <selectAccount v-if="hosModels.disjunctor" :disjunctor="hosModels.disjunctor" @ok="hosOk"
  453. @cancel="hosCancel">
  454. </selectAccount>
  455. <!-- 手动查询弹窗 -->
  456. <checkboxModal v-if="checkboxModels.disjunctor" :content="checkboxModels.content" :disjunctor="checkboxModels.disjunctor"
  457. @ok="checkboxOk" @cancel="checkboxCancel">
  458. </checkboxModal>
  459. <!-- PDA扫描 -->
  460. <scanner></scanner>
  461. <!-- 标本转派 -->
  462. <uni-popup ref="alertDialog" type="dialog" :mask-click="false">
  463. <uni-popup-dialog type="info" cancelText="否" confirmText="是" title="提示" @confirm="dialogConfirm"
  464. @close="dialogClose">
  465. <text v-html="speContent"></text>
  466. </uni-popup-dialog>
  467. </uni-popup>
  468. </view>
  469. </template>
  470. <script>
  471. import scanner from "../../components/scanner/scanner.vue";
  472. import selectAccount from "../../components/selectAccount/selectAccount.vue";
  473. import smallScreen from "../../components/smallScreen/smallScreen.vue";
  474. import {
  475. get,
  476. post,
  477. SM,
  478. webHandle
  479. } from "../../http/http.js";
  480. import {
  481. pathUrl,
  482. photographTool
  483. } from "../../tools/photograph.js";
  484. export default {
  485. components: {
  486. selectAccount,
  487. scanner
  488. },
  489. data() {
  490. return {
  491. patientHandoverData: {},
  492. patientHandoverCode: '',
  493. other: {
  494. user: {},
  495. data: {},
  496. },
  497. // 手动查询弹窗model
  498. checkboxModels: {
  499. disjunctor: false,
  500. },
  501. taskTypeConfig: {},
  502. // 填写交接人工号弹窗model
  503. hosModels: {
  504. disjunctor: false,
  505. },
  506. currentCode: '', //当前拍照使用的科室二维码
  507. currentData: {}, //当前小扫描的工单对象
  508. multiplayerMode: 0,
  509. handoverOrder: 0,
  510. hideInspectScan: 0,
  511. clinicalMultiplayerMode: 0,
  512. clinicalTaskIdsFlag: false,
  513. hosId: uni.getStorageSync('userData').user.currentHospital.id,
  514. SMFlag:true,
  515. actualDelivery: 0,
  516. currentUserId: 0,
  517. // 弹窗model
  518. models: {
  519. disjunctor: false,
  520. },
  521. // 弹窗model1
  522. models1: {
  523. disjunctor: false,
  524. },
  525. // 弹窗model1
  526. models2: {
  527. disjunctor: false,
  528. },
  529. currentInspect: null,
  530. showType: "show",
  531. infoDATA: {},
  532. dataId: "",
  533. animationData: {},
  534. // 特殊情况关闭原因开关
  535. textareaFlag: false,
  536. textareaText: "",
  537. tasktype: null,
  538. sPehandoverOrder: null ,//是否转派
  539. speContent: null,
  540. };
  541. },
  542. filters: {
  543. // 自定义管道 yyTime
  544. yyTimeFilter: function(data) {
  545. if (data) {
  546. let nDate = null;
  547. if (typeof data == 'string') {
  548. let arr = data.split(/[-:\s]/);
  549. nDate = new Date(
  550. arr[0] - 0,
  551. arr[1] - 1,
  552. arr[2] - 0,
  553. arr[3] - 0,
  554. arr[4] - 0,
  555. 0
  556. );
  557. } else if (typeof data == 'number') {
  558. nDate = new Date(data);
  559. }
  560. const month = (nDate.getMonth() + 1).toString().padStart(2, 0);
  561. const date = nDate.getDate().toString().padStart(2, 0);
  562. const hour = nDate.getHours().toString().padStart(2, 0);
  563. const minute = nDate.getMinutes().toString().padStart(2, 0);
  564. return `${month}-${date} ${hour}:${minute}`;
  565. } else {
  566. return "-";
  567. }
  568. },
  569. },
  570. methods: {
  571. ok2() {
  572. uni.showLoading({
  573. title: "加载中",
  574. mask: true,
  575. });
  576. post("/patient/patientHandover", {
  577. id: this.patientHandoverCode.id,
  578. patientCodes: this.patientHandoverData.patient.patientCode,
  579. }).then((result) => {
  580. this.models2.disjunctor = false;
  581. if (result.state == 200) {
  582. uni.hideLoading();
  583. uni.showToast({
  584. icon: "none",
  585. mask: true,
  586. title: "交接成功!",
  587. });
  588. setTimeout(() => {
  589. uni.navigateTo({
  590. url: `/pages/receiptpage/receiptpage`,
  591. });
  592. },300)
  593. } else {
  594. uni.hideLoading();
  595. uni.showToast({
  596. icon: "none",
  597. title: result.msg || "接口获取数据失败!",
  598. });
  599. }
  600. });
  601. },
  602. cancel2() {
  603. this.models2.disjunctor = false;
  604. },
  605. // 门诊患者交接
  606. patientHandover(infoDATA){
  607. console.log(infoDATA);
  608. this.patientHandoverData = infoDATA;
  609. if (!this.SMFlag) {
  610. return;
  611. }
  612. this.SMFlag = false;
  613. SM().then((content) => {
  614. uni.showLoading({
  615. title: "加载中",
  616. mask: true,
  617. });
  618. //检验二维码的有效性(扫码前必须验证)
  619. post("/dept/scanning", {
  620. content,
  621. })
  622. .then((result) => {
  623. try{
  624. this.patientHandoverCode = JSON.parse(result.code);
  625. }catch(e){
  626. this.patientHandoverCode = '';
  627. }
  628. this.SMFlag = true;
  629. // 200检测通过,201没有有效期也通过。
  630. if (result.state == 200 || result.state == 201) {
  631. uni.hideLoading();
  632. if(Object.prototype.toString.call(this.patientHandoverCode) === '[object Object]' && this.patientHandoverCode.name){
  633. this.models2 = {
  634. disjunctor: true,
  635. title: "提示",
  636. content: `您确认要与<span class="red">${this.patientHandoverCode.name}</span>交接吗?`,
  637. icon: "warn",
  638. operate: {
  639. ok: "确定",
  640. cancel: "取消",
  641. },
  642. };
  643. }else{
  644. uni.showToast({
  645. icon: "none",
  646. title: "请扫描正确的二维码!",
  647. });
  648. }
  649. } else {
  650. uni.hideLoading();
  651. uni.showToast({
  652. icon: "none",
  653. title: result.info || "接口获取数据失败!",
  654. });
  655. }
  656. })
  657. }).catch(err => {
  658. this.SMFlag = true;
  659. });
  660. },
  661. // 手动查询-确认
  662. checkboxOk(bulkCopy) {
  663. console.log(bulkCopy);
  664. this.checkboxModels.disjunctor = false;
  665. let { user, data } = this.other;
  666. this.additionalUserCommon(user, data.id, data.worker.id, bulkCopy);
  667. },
  668. // 手动查询-取消
  669. checkboxCancel() {
  670. this.checkboxModels.disjunctor = false;
  671. },
  672. // 手动查询弹窗
  673. showCheckboxModal(user, data) {
  674. this.other = {
  675. user,
  676. data,
  677. };
  678. this.checkboxModels = {
  679. content: `您要最追加的人员为${user.name},您确认要追加吗?`,
  680. disjunctor: true,
  681. }
  682. },
  683. // 判断药品页面控制-是否显示关联批次药品
  684. isShowDrugsBatchInfo(){
  685. post("/simple/data/fetchDataList/taskType", {
  686. "idx": 0,
  687. "sum": 10,
  688. "taskType": {
  689. "simpleQuery": true,
  690. "hosId": {
  691. "id": this.hosId
  692. },
  693. "associationType": {
  694. "key": "association_types",
  695. "value": "drugsBag"
  696. }
  697. }
  698. }).then((res) => {
  699. if (res.status == 200) {
  700. res.list = res.list || [];
  701. let taskType = res.list[0] || {};
  702. if(taskType.id){
  703. post("/simple/data/fetchDataList/taskTypeConfig", {
  704. "idx": 0,
  705. "sum": 10,
  706. "taskTypeConfig": {
  707. "taskTypeDTO": {
  708. "hosId": {
  709. "id": this.hosId
  710. },
  711. "associationType": taskType.associationType
  712. }
  713. }
  714. }).then((res) => {
  715. if (res.status == 200) {
  716. res.list = res.list || [];
  717. this.taskTypeConfig = res.list[0] || {};
  718. } else {
  719. uni.showToast({
  720. icon: "none",
  721. title: res.msg || "接口获取数据失败!",
  722. });
  723. }
  724. });
  725. }else{
  726. uni.showToast({
  727. icon: "none",
  728. title: "请配置药品任务类型!",
  729. });
  730. }
  731. } else {
  732. uni.showToast({
  733. icon: "none",
  734. title: res.msg || "接口获取数据失败!",
  735. });
  736. }
  737. });
  738. },
  739. // 跳转到药品批次页面
  740. toDrugBatches(batchNo){
  741. uni.navigateTo({
  742. url: `../drugBatches/drugBatches?batchNo=${batchNo}`,
  743. });
  744. },
  745. // 前往其他临床服务完成工单确认页面
  746. otherCompleteOrder(data){
  747. console.log(data);
  748. uni.navigateTo({
  749. url: `../otherCompleteOrder/otherCompleteOrder?orderId=${data.id}&taskType=${data.taskType ? encodeURIComponent(JSON.stringify(data.taskType)) : ''}&order=${data ? encodeURIComponent(JSON.stringify(data)) : ''}`,
  750. });
  751. },
  752. // 如果不是静配,药配,标本配送,标本轮巡
  753. // 科室签到(小扫描)-拍照
  754. nextDeptOrder_ss(data, accountObj) {
  755. console.log(this.currentCode);
  756. let isKs = 0;
  757. let ids = [];
  758. let id = data.id;
  759. ids.push(id);
  760. let list = {
  761. code: "",
  762. ids: ids,
  763. };
  764. let code = "";
  765. let type = "";
  766. if (this.currentCode) {
  767. let gdStateValue = data.gdState.value; //工单状态value
  768. let associationTypeValue = data.taskType.associationType.value; //关联类型value
  769. // 其他临床服务,并且工单状态是待到达||工单状态待送达
  770. if (
  771. (associationTypeValue == "other" &&
  772. gdStateValue == "4") ||
  773. gdStateValue == "5"
  774. ) {
  775. code = this.currentCode;
  776. type = "orderSign/" + code;
  777. list = {
  778. ids
  779. };
  780. if (accountObj) {
  781. list.handover = [accountObj.accountId];
  782. }
  783. isKs = 1;
  784. }
  785. uni.showLoading({
  786. title: "加载中",
  787. mask: true,
  788. });
  789. post("/workerOrder/" + type, list).then((res) => {
  790. uni.hideLoading();
  791. if (res) {
  792. if (res.status == 200) {
  793. if (
  794. gdStateValue == "4" &&
  795. associationTypeValue == "other"
  796. ) {
  797. uni.navigateTo({
  798. url: `../../pages/scanning_code/scanning_code?type=${associationTypeValue}&type1=${res.type}&id=${data.id}&deptCode=${code}&dept=${res.dept}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}`,
  799. });
  800. }
  801. if (gdStateValue == "5") {
  802. uni.navigateTo({
  803. url: `../../pages/scanning_code/scanning_code?type=${associationTypeValue}&type1=${res.type}&id=${data.id}&deptCode=${code}&dept=${res.dept}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}`,
  804. });
  805. }
  806. } else {
  807. uni.navigateTo({
  808. url: `../../pages/scanning_Result/scanning_Result?type=${
  809. associationTypeValue
  810. }&type1=${res.type}&id=${data.id}&status=600&msg=${
  811. res.msg
  812. }&isKs=${isKs}&model=${encodeURIComponent(
  813. JSON.stringify(res)
  814. )}&qrcode=${this.currentCode}`,
  815. });
  816. }
  817. } else {
  818. uni.navigateTo({
  819. url: `../../pages/scanning_Result/scanning_Result?id=${data.id}&status=600&msg=扫码失败!请扫描正确的二维码!&isKs=${isKs}&qrcode=${this.currentCode}`,
  820. });
  821. }
  822. });
  823. }
  824. },
  825. // 填写交接人工号-确认
  826. hosOk(data) {
  827. console.log(data);
  828. const {
  829. accountName,
  830. account,
  831. accountId
  832. } = data;
  833. if (!accountName && !account) {
  834. //没有填写交接人
  835. uni.showModal({
  836. title: '提示',
  837. content: "请填写交接人工号!",
  838. showCancel: false,
  839. success: function(res) {
  840. if (res.confirm) {
  841. console.log('用户点击确定');
  842. } else if (res.cancel) {
  843. console.log('用户点击取消');
  844. }
  845. }
  846. });
  847. return;
  848. } else if (!accountName && account || accountName && !account) {
  849. //没有填写交接人
  850. uni.showModal({
  851. title: '提示',
  852. content: "请填写正确的交接人工号!",
  853. showCancel: false,
  854. success: function(res) {
  855. if (res.confirm) {
  856. console.log('用户点击确定');
  857. } else if (res.cancel) {
  858. console.log('用户点击取消');
  859. }
  860. }
  861. });
  862. return;
  863. }
  864. this.hosModels.disjunctor = false;
  865. let associationTypeValue = this.currentData.taskType.associationType.value;
  866. console.log(associationTypeValue)
  867. this.uploadToOther(this.currentData, data, 'start');
  868. },
  869. // 填写交接人工号-取消
  870. hosCancel() {
  871. this.hosModels.disjunctor = false;
  872. },
  873. // 填写交接人工号弹窗
  874. showSelectAccount() {
  875. this.hosModels = {
  876. disjunctor: true,
  877. }
  878. },
  879. // 拍照-上传
  880. uploadToOther(data, accountObj, type){
  881. // 其他临床服务拍照签到
  882. console.log(data, 1111);
  883. let id_seimin;
  884. let asTypeValue_seimin;
  885. let gdStateValue_seimin;
  886. if (data.status != 200 && data.status !== undefined) {
  887. id_seimin = data.id;
  888. asTypeValue_seimin = data.type;
  889. gdStateValue_seimin = JSON.parse(data.model).gdstate2; //type改成gdstate
  890. } else {
  891. id_seimin = data.id;
  892. asTypeValue_seimin = data.taskType.associationType.value;
  893. gdStateValue_seimin = data.gdState.value;
  894. }
  895. //#ifdef H5
  896. uni.chooseImage({
  897. count: 1,
  898. sourceType: ['camera'],
  899. success: (chooseImageRes) => {
  900. console.log(chooseImageRes, pathUrl)
  901. const tempFilePaths = chooseImageRes.tempFilePaths;
  902. const tempFiles = chooseImageRes.tempFiles;
  903. let tp = tempFilePaths[0];
  904. uni.showLoading({
  905. mask: true,
  906. title: '加载中'
  907. });
  908. post('/workerOrder/findRecordInfoByOrderId', {
  909. orderId: id_seimin,
  910. gdOperate: 21,
  911. }).then(result => {
  912. console.log(result)
  913. if (result.state == 200) {
  914. uni.getImageInfo({
  915. src: tp,
  916. success: (res) => {
  917. console.log('压缩前', res)
  918. let canvasWidth = res.width //图片原始长宽
  919. let canvasHeight = res.height
  920. let img = new Image()
  921. img.src = res.path
  922. let canvas = document.createElement('canvas');
  923. let ctx = canvas.getContext('2d')
  924. canvas.width = canvasWidth
  925. canvas.height = canvasHeight
  926. ctx.drawImage(img, 0, 0, canvasWidth, canvasHeight)
  927. canvas.toBlob((fileSrc) => {
  928. tp = window.URL.createObjectURL(fileSrc)
  929. console.log('压缩后', tp);
  930. uni.uploadFile({
  931. url: pathUrl + '/common/common/uploadAttachment/'+(type == 'start' ? 'orderStartPhoto' : 'orderEndPhoto')+'/' + id_seimin + '/' + result.recordId,
  932. filePath: tp,
  933. name: 'file',
  934. formData: {
  935. 'filename': tempFiles[0].name ? tempFiles[0].name.split('.')[0] + '.jpg' : tempFiles[
  936. 0].path.split(
  937. /[\\/]/).reverse()[0].split('.')[0] + '.jpg'
  938. },
  939. success: (uploadFileRes) => {
  940. console.log(uploadFileRes, 10086, asTypeValue_seimin);
  941. this.nextDeptOrder_ss(data, accountObj, type);
  942. },
  943. fail: err => {
  944. console.error(err);
  945. uni.hideLoading();
  946. uni.showToast({
  947. icon: 'none',
  948. title: '上传失败',
  949. duration: 2000
  950. });
  951. }
  952. });
  953. }, 'image/jpeg', 0.3)
  954. },
  955. fail: function () {
  956. uni.hideLoading();
  957. uni.showToast({
  958. icon: 'none',
  959. title: '上传失败',
  960. duration: 2000
  961. });
  962. }
  963. })
  964. } else {
  965. uni.hideLoading();
  966. uni.showToast({
  967. icon: "none",
  968. title: result.msg || "接口获取数据失败!",
  969. });
  970. }
  971. })
  972. }
  973. });
  974. //#endif
  975. //#ifdef APP-PLUS
  976. uni.chooseImage({
  977. count: 1,
  978. sourceType: ['camera'],
  979. sizeType: ['compressed'],
  980. success: (chooseImageRes) => {
  981. console.log(chooseImageRes, pathUrl)
  982. const tempFilePaths = chooseImageRes.tempFilePaths;
  983. const tempFiles = chooseImageRes.tempFiles;
  984. let tp = tempFilePaths[0];
  985. uni.showLoading({
  986. mask: true,
  987. title: '加载中'
  988. });
  989. post('/workerOrder/findRecordInfoByOrderId', {
  990. orderId: id_seimin,
  991. gdOperate: 21,
  992. }).then(result => {
  993. console.log(result)
  994. if (result.state == 200) {
  995. uni.compressImage({
  996. src: tp,
  997. quality: 30,
  998. success: (res) => {
  999. console.log('压缩前', res)
  1000. tp = res.tempFilePath;
  1001. console.log('压缩后', tp);
  1002. uni.uploadFile({
  1003. url: pathUrl + '/common/common/uploadAttachment/'+(type == 'start' ? 'orderStartPhoto' : 'orderEndPhoto')+'/' + id_seimin + '/' + result.recordId,
  1004. filePath: tp,
  1005. name: 'file',
  1006. formData: {
  1007. 'filename': tempFiles[0].name ? tempFiles[0].name.split('.')[0] + '.jpg' : tempFiles[
  1008. 0].path.split(
  1009. /[\\/]/).reverse()[0].split('.')[0] + '.jpg'
  1010. },
  1011. success: (uploadFileRes) => {
  1012. console.log(uploadFileRes, 10086, asTypeValue_seimin);
  1013. this.nextDeptOrder_ss(data, accountObj, type);
  1014. },
  1015. fail: err => {
  1016. console.error(err);
  1017. uni.hideLoading();
  1018. uni.showToast({
  1019. icon: 'none',
  1020. title: '上传失败',
  1021. duration: 2000
  1022. });
  1023. }
  1024. });
  1025. },
  1026. fail: function () {
  1027. uni.hideLoading();
  1028. uni.showToast({
  1029. icon: 'none',
  1030. title: '上传失败',
  1031. duration: 2000
  1032. });
  1033. }
  1034. })
  1035. } else {
  1036. uni.hideLoading();
  1037. uni.showToast({
  1038. icon: "none",
  1039. title: result.msg || "接口获取数据失败!",
  1040. });
  1041. }
  1042. })
  1043. }
  1044. });
  1045. //#endif
  1046. },
  1047. // 拍照-其他
  1048. async photographToOther(data, type) {
  1049. this.currentData = data;
  1050. uni.showLoading({
  1051. title: "加载中",
  1052. mask: true,
  1053. });
  1054. // 其他临床服务
  1055. let result = await post("/dept/scanning", {
  1056. content: type === 'start' ? data.startDept.qrcode : data.endDepts[0].qrcode,
  1057. taskTypeId: data.taskType.id,
  1058. gdState: data.gdState.id,
  1059. });
  1060. uni.hideLoading();
  1061. this.currentCode = result.code;
  1062. if (result.state == 200 || result.state == 201) {
  1063. uni.showModal({
  1064. title: '提示',
  1065. content: '请尽量拍摄角度覆盖清洁区域?',
  1066. success: (res) => {
  1067. if (res.confirm) {
  1068. if (result.account) {
  1069. this.uploadToOther(data, {
  1070. account: result.account,
  1071. accountName: result.name,
  1072. accountId: result.id,
  1073. }, type);
  1074. } else {
  1075. this.uploadToOther(data, undefined, type);
  1076. }
  1077. } else if (res.cancel) {
  1078. console.log('用户点击取消');
  1079. }
  1080. }
  1081. });
  1082. } else if (result.state == '0000') {
  1083. this.showSelectAccount();
  1084. } else {
  1085. uni.showToast({
  1086. icon: "none",
  1087. title: result.info || "接口获取数据失败!",
  1088. });
  1089. }
  1090. },
  1091. goBack() {
  1092. uni.navigateTo({
  1093. url: "../receiptpage/receiptpage",
  1094. });
  1095. },
  1096. // 转派
  1097. redeployScan(workOrder){
  1098. if (!this.SMFlag) {
  1099. return;
  1100. }
  1101. this.SMFlag = false;
  1102. SM().then((content) => {
  1103. uni.showLoading({
  1104. title: "加载中",
  1105. mask: true,
  1106. });
  1107. // let content = '3262'
  1108. post("/workerOrder/transfer ", {
  1109. handoverId: content,
  1110. orderId: workOrder.id
  1111. })
  1112. .then((result) => {
  1113. this.SMFlag = true;
  1114. uni.hideLoading();
  1115. if (result.state == 205) {
  1116. this.speContent = result.msg
  1117. this.handoverId = content
  1118. this.$refs.alertDialog.open()
  1119. }else{
  1120. uni.showToast({
  1121. icon: "none",
  1122. title: result.msg,
  1123. });
  1124. }
  1125. })
  1126. }).catch(err => {
  1127. this.SMFlag = true;
  1128. });
  1129. },
  1130. dialogConfirm() {
  1131. uni.showLoading({
  1132. title: "加载中",
  1133. mask: true,
  1134. });
  1135. post("/workerOrder/transfer ", {
  1136. handoverId: this.handoverId,
  1137. orderId: this.infoDATA.id,
  1138. transferOrder: 1
  1139. })
  1140. .then((result) => {
  1141. this.SMFlag = true;
  1142. uni.hideLoading();
  1143. if (result.state == 200) {
  1144. uni.showToast({
  1145. icon: "none",
  1146. title: result.info || "转派成功",
  1147. });
  1148. setTimeout(_=>{
  1149. this.goBack()
  1150. },2000)
  1151. }
  1152. })
  1153. },
  1154. dialogClose() {
  1155. this.$refs.alertDialog.close()
  1156. this.speContent = null
  1157. },
  1158. // 查看标本
  1159. viewSpecimen(workOrder) {
  1160. uni.navigateTo({
  1161. url: `../specimenDetail/specimenDetail?workOrderId=${workOrder.id}&associationTypeValue=${workOrder.taskType.associationType.value}`,
  1162. });
  1163. },
  1164. // 查看药品业务数据
  1165. viewDrugsBag(workOrder) {
  1166. uni.navigateTo({
  1167. url: `../drugsBagHistory/drugsBagHistory?id=${workOrder.drugs.id}&packid=${workOrder.drugs.packid}`,
  1168. });
  1169. },
  1170. // 查看血制品
  1171. viewBlood(workOrder) {
  1172. uni.showLoading({
  1173. title: "加载中",
  1174. mask: true,
  1175. });
  1176. post('/transflow/checkData', {
  1177. "type": "blood",
  1178. "orderId": workOrder.id
  1179. }).then(res => {
  1180. uni.hideLoading();
  1181. if(res.state == 200){
  1182. uni.navigateTo({
  1183. url: `../blood_list/blood_list?bloods=${encodeURIComponent(JSON.stringify(res.data.all))}`,
  1184. });
  1185. }else{
  1186. uni.showToast({
  1187. icon: "none",
  1188. title: res.msg || "接口获取数据失败!",
  1189. });
  1190. }
  1191. })
  1192. },
  1193. // 查看新药品
  1194. viewNewDrugsBag(workOrder, type) {
  1195. uni.showLoading({
  1196. title: "加载中",
  1197. mask: true,
  1198. });
  1199. let postData = {
  1200. "idx": 0,
  1201. "sum": 1,
  1202. "taskTypeConfig": {
  1203. "taskTypeDTO": {
  1204. "hosId": {
  1205. "id": this.hosId
  1206. },
  1207. "ordinaryField": {
  1208. "key": "ordinary_field",
  1209. "value": type
  1210. }
  1211. }
  1212. }
  1213. };
  1214. post('/simple/data/fetchDataList/taskTypeConfig', postData).then(res => {
  1215. uni.hideLoading();
  1216. if(res.status == 200){
  1217. let list = res.list || [];
  1218. if(list.length){
  1219. let config = list[0];
  1220. if(config.drugsModel === 1){
  1221. uni.navigateTo({
  1222. url: `/pages/newDrug/detail?drugsBagType=${type}&orderId=${workOrder.id}&showPatientInfo=${config.showPatientInfo}`,
  1223. });
  1224. } else if(config.drugsModel === 2){
  1225. uni.navigateTo({
  1226. url: `/pages/newDrug/list?drugsBagType=${type}&orderId=${workOrder.id}&showPatientInfo=${config.showPatientInfo}`,
  1227. });
  1228. }
  1229. }else{
  1230. uni.showToast({
  1231. icon: "none",
  1232. title: "未查询到配置!",
  1233. });
  1234. }
  1235. }else{
  1236. uni.showToast({
  1237. icon: "none",
  1238. title: res.msg || "接口获取数据失败!",
  1239. });
  1240. }
  1241. })
  1242. },
  1243. // 移除检查->返回
  1244. know1() {
  1245. this.models1.disjunctor = false;
  1246. // this.getInfo(this.dataId);
  1247. uni.navigateTo({
  1248. url: '../receiptpage/receiptpage',
  1249. });
  1250. },
  1251. // 移除检查->确定
  1252. ok1(data) {
  1253. console.log(data);
  1254. const {
  1255. value,
  1256. yyTime
  1257. } = data;
  1258. if (!value) {
  1259. //没有选择移除原因
  1260. uni.showModal({
  1261. title: "提示",
  1262. content: "请选择移除原因!",
  1263. showCancel: false,
  1264. success: function(res) {
  1265. if (res.confirm) {
  1266. console.log("用户点击确定");
  1267. } else if (res.cancel) {
  1268. console.log("用户点击取消");
  1269. }
  1270. },
  1271. });
  1272. return;
  1273. } else if (value == 2 && !yyTime) {
  1274. //没有填写预约时间
  1275. uni.showModal({
  1276. title: "提示",
  1277. content: "请填写预约时间!",
  1278. showCancel: false,
  1279. success: function(res) {
  1280. if (res.confirm) {
  1281. console.log("用户点击确定");
  1282. } else if (res.cancel) {
  1283. console.log("用户点击取消");
  1284. }
  1285. },
  1286. });
  1287. return;
  1288. }
  1289. this.models1.disjunctor = false;
  1290. let postData = {
  1291. gdId: this.infoDATA.id,
  1292. inspectId: this.currentInspect.id,
  1293. reason: value == 1 ? 'checkDone' : value == 2 ? 'modificationTime' : 'wrongOrder',
  1294. yyTime: value == 2 ? yyTime : undefined,
  1295. };
  1296. uni.showLoading({
  1297. title: '移除中',
  1298. mask: true,
  1299. })
  1300. post('/workerOrder/removeInspectByOderId', postData).then(res => {
  1301. uni.hideLoading();
  1302. if (res.state == 200) {
  1303. uni.showToast({
  1304. icon: 'none',
  1305. title: '移除成功!',
  1306. success() {
  1307. setTimeout(() => {
  1308. uni.navigateTo({
  1309. url: '../receiptpage/receiptpage',
  1310. });
  1311. }, 1500)
  1312. }
  1313. })
  1314. } else {
  1315. uni.showToast({
  1316. icon: 'none',
  1317. title: '移除失败!',
  1318. })
  1319. }
  1320. })
  1321. },
  1322. // 移除检查->取消
  1323. cancel1() {
  1324. this.models1.disjunctor = false;
  1325. },
  1326. // 移除
  1327. remove(item) {
  1328. this.currentInspect = item;
  1329. this.models1 = {
  1330. disjunctor: true,
  1331. content: "请选择您移除检查的原因?检查移除后将会自动完成或删除工单!",
  1332. icon: "warn",
  1333. operate: {
  1334. ok: "确定",
  1335. cancel: "取消",
  1336. },
  1337. };
  1338. },
  1339. // 拍照
  1340. photograph(data) {
  1341. photographTool(data);
  1342. },
  1343. // 特殊情况输入文字
  1344. textareaInput(value) {
  1345. this.textareaText = value;
  1346. if (value.trim().length >= 5) {
  1347. this.models.operate = {
  1348. ok: "确定",
  1349. cancel: "取消",
  1350. };
  1351. } else {
  1352. this.models.operate = {
  1353. cancel: "取消",
  1354. };
  1355. }
  1356. },
  1357. // 追加陪检人/执行人按钮
  1358. additionalUser(data) {
  1359. if (!this.SMFlag) {
  1360. return;
  1361. }
  1362. this.SMFlag = false;
  1363. console.log(data, 'data');
  1364. SM().then((ress1) => {
  1365. uni.showLoading({
  1366. title: "加载中",
  1367. mask: true,
  1368. });
  1369. //检验二维码的有效性
  1370. post("/dept/scanning", {
  1371. content: ress1,
  1372. taskTypeId: data.taskType.id,
  1373. gdState: data.gdState.id,
  1374. }).then((result) => {
  1375. this.SMFlag = true;
  1376. // this.currentCode = result.code;
  1377. if (result.state == 200 || result.state == 201) {
  1378. console.log(result);
  1379. let user;
  1380. try{
  1381. // json对象字符串
  1382. user = JSON.parse(result.code);
  1383. // 不是json对象字符串
  1384. if(Object.prototype.toString.call(user).slice(8, -1).toLowerCase() !== 'object'){
  1385. user = result.code;
  1386. }
  1387. }catch(e){
  1388. user = result.code;
  1389. }
  1390. if(Object.prototype.toString.call(user).slice(8, -1).toLowerCase() === 'object' && user.type == 'myQrCode' && user.id && user.name){
  1391. user.qrcode = ress1;
  1392. uni.hideLoading();
  1393. if(data.taskType.associationType.value == 'other'){
  1394. this.showCheckboxModal(user, data);
  1395. }else{
  1396. uni.showModal({
  1397. title: "提示",
  1398. content: `您要最追加的人员为${user.name},您确认要追加吗?`,
  1399. success: (res) => {
  1400. if (res.confirm) {
  1401. console.log("用户点击确定");
  1402. this.additionalUserCommon(user, data.id, data.worker.id, false);
  1403. } else if (res.cancel) {
  1404. console.log("用户点击取消");
  1405. }
  1406. },
  1407. });
  1408. }
  1409. }else if(Object.prototype.toString.call(user).slice(8, -1).toLowerCase() === 'string'){
  1410. let identityCardNumber = user;
  1411. // 根据身份证获取name
  1412. // todo
  1413. post("/data/fetchDataList/user", {idx: 0, sum: 1, user: { identityCardNumber }}).then((result) => {
  1414. uni.hideLoading();
  1415. if(result.status == 200){
  1416. result.list = result.list || [];
  1417. if(result.list.length){
  1418. let user = {name: result.list[0].name, identityCardNumber, qrcode: ress1};
  1419. if(data.taskType.associationType.value == 'other'){
  1420. this.showCheckboxModal(user, data);
  1421. }else{
  1422. uni.showModal({
  1423. title: "提示",
  1424. content: `您要最追加的人员为${user.name},您确认要追加吗?`,
  1425. success: (res) => {
  1426. if (res.confirm) {
  1427. console.log("用户点击确定");
  1428. this.additionalUserCommon(user, data.id, data.worker.id, false);
  1429. } else if (res.cancel) {
  1430. console.log("用户点击取消");
  1431. }
  1432. },
  1433. });
  1434. }
  1435. }else{
  1436. uni.navigateTo({
  1437. url: `../result_error/result_error?qrcode=${ress1}&msg=扫描二维码无法找到用户!`,
  1438. });
  1439. }
  1440. }else{
  1441. uni.navigateTo({
  1442. url: `../result_error/result_error?qrcode=${ress1}&msg=请扫描正确的二维码!`,
  1443. });
  1444. }
  1445. })
  1446. }else{
  1447. uni.hideLoading();
  1448. uni.navigateTo({
  1449. url: `../result_error/result_error?qrcode=${ress1}&msg=请扫描正确的二维码!`,
  1450. });
  1451. }
  1452. } else {
  1453. uni.hideLoading();
  1454. uni.navigateTo({
  1455. url: `../result_error/result_error?qrcode=${ress1}&msg=${result.info || '接口获取数据失败!'}`,
  1456. });
  1457. }
  1458. });
  1459. }).catch(err=>{
  1460. this.SMFlag = true;
  1461. });
  1462. },
  1463. // 追加陪检人/执行人
  1464. additionalUserCommon(user, gdId, workerId, bulkCopy) {
  1465. console.log(user, gdId, workerId, bulkCopy);
  1466. uni.showLoading({
  1467. title: "加载中",
  1468. mask: true,
  1469. });
  1470. // 二维码里有id则传userid,没有则传identityCardNumber
  1471. post("/workerOrder/additionalAccompanyingPersonnel", {
  1472. userId: user.id || undefined,
  1473. identityCardNumber: !user.id ? user.identityCardNumber : undefined,
  1474. gdId,
  1475. workerId,
  1476. bulkCopy: bulkCopy ? 1 : undefined,
  1477. }).then((result) => {
  1478. uni.hideLoading();
  1479. if (result.state == 200) {
  1480. this.getInfo(gdId);
  1481. uni.showToast({
  1482. icon: 'none',
  1483. duration: 4000,
  1484. title: '操作成功!'
  1485. })
  1486. } else {
  1487. uni.navigateTo({
  1488. url: `../result_error/result_error?qrcode=${user.qrcode}&msg=${result.msg || '接口获取数据失败!'}`,
  1489. });
  1490. }
  1491. });
  1492. },
  1493. // 特殊情况关闭按钮
  1494. specialCloseClick() {
  1495. this.textareaFlag = true;
  1496. this.models = {
  1497. title: "特殊情况关闭",
  1498. disjunctor: true,
  1499. content: "",
  1500. icon: "",
  1501. operate: {
  1502. cancel: "取消",
  1503. },
  1504. };
  1505. },
  1506. ok() {
  1507. uni.showLoading({
  1508. title: "加载中",
  1509. mask: true,
  1510. });
  1511. post("/workerOrder/specialCaseClose", {
  1512. workOrderId: this.dataId,
  1513. reason: this.textareaText.trim(),
  1514. }).then((result) => {
  1515. this.models.disjunctor = false;
  1516. this.textareaFlag = false;
  1517. this.textareaText = "";
  1518. if (result.state == 200) {
  1519. uni.hideLoading();
  1520. this.models = {
  1521. disjunctor: true,
  1522. content: "工单关闭成功",
  1523. icon: "success",
  1524. operate: {
  1525. know: "返回",
  1526. },
  1527. };
  1528. } else {
  1529. uni.hideLoading();
  1530. this.models = {
  1531. disjunctor: true,
  1532. content: "工单关闭失败",
  1533. icon: "error",
  1534. operate: {
  1535. know: "返回",
  1536. },
  1537. };
  1538. }
  1539. });
  1540. },
  1541. cancel() {
  1542. this.models.disjunctor = false;
  1543. this.textareaFlag = false;
  1544. this.textareaText = "";
  1545. },
  1546. // 点击可查看检查详情
  1547. show(type) {
  1548. this.showType = type;
  1549. if (type === "show") {
  1550. //展开
  1551. // 计算高度
  1552. const query = uni.createSelectorQuery().in(this);
  1553. query
  1554. .selectAll(".page_item_infos")
  1555. .boundingClientRect((data) => {
  1556. let len = data.reduce((prev, current) => {
  1557. return prev + current.height;
  1558. }, 0);
  1559. this.animation.height(len).step();
  1560. this.animationData = this.animation.export();
  1561. })
  1562. .exec();
  1563. } else if (type === "hiddle") {
  1564. this.animation.height(0).step();
  1565. this.animationData = this.animation.export();
  1566. }
  1567. },
  1568. // 抢单->返回
  1569. know() {
  1570. this.models.disjunctor = false;
  1571. uni.navigateTo({
  1572. url: "../receiptpage/receiptpage",
  1573. });
  1574. },
  1575. // 抢单
  1576. showAlert() {
  1577. get("/workerOrder/takeOrder/" + this.infoDATA.id).then((res) => {
  1578. if (res.status == 200) {
  1579. this.models = {
  1580. disjunctor: true,
  1581. content: "接单成功",
  1582. icon: "success",
  1583. operate: {
  1584. know: "返回",
  1585. },
  1586. };
  1587. } else {
  1588. uni.showToast({
  1589. icon: "none",
  1590. title: res.msg || "接口获取数据失败!",
  1591. });
  1592. }
  1593. });
  1594. },
  1595. // 请求详细页面的数据(除标本轮巡和标本配送)
  1596. getInfo(id) {
  1597. uni.showLoading({
  1598. title: "加载中",
  1599. mask: true,
  1600. });
  1601. get("/api/fetchData/workOrder/" + id).then((res) => {
  1602. uni.hideLoading();
  1603. if (res.status == 200) {
  1604. this.infoDATA = res.data;
  1605. // 计算高度
  1606. setTimeout(() => {
  1607. const query = uni.createSelectorQuery().in(this);
  1608. query
  1609. .selectAll(".page_item_infos")
  1610. .boundingClientRect((data) => {
  1611. let len = data.reduce((prev, current) => {
  1612. return prev + current.height;
  1613. }, 0);
  1614. this.animation.height(len).step();
  1615. this.animationData = this.animation.export();
  1616. })
  1617. .exec();
  1618. }, 500)
  1619. } else {
  1620. uni.showToast({
  1621. icon: "none",
  1622. title: res.msg || "接口获取数据失败!",
  1623. });
  1624. }
  1625. });
  1626. },
  1627. // 请求详细页面的数据
  1628. getInfoBySpecimen(id) {
  1629. uni.showLoading({
  1630. title: "加载中",
  1631. mask: true,
  1632. });
  1633. post("/api/getWechatItem", {
  1634. id
  1635. }).then((res) => {
  1636. uni.hideLoading();
  1637. if (res.state == 200) {
  1638. this.actualDelivery = res.actualDelivery;
  1639. this.infoDATA = res.data;
  1640. // 计算高度
  1641. setTimeout(() => {
  1642. const query = uni.createSelectorQuery().in(this);
  1643. query
  1644. .selectAll(".page_item_infos")
  1645. .boundingClientRect((data) => {
  1646. let len = data.reduce((prev, current) => {
  1647. return prev + current.height;
  1648. }, 0);
  1649. this.animation.height(len).step();
  1650. this.animationData = this.animation.export();
  1651. })
  1652. .exec();
  1653. }, 500)
  1654. } else {
  1655. uni.showToast({
  1656. icon: "none",
  1657. title: res.msg || "接口获取数据失败!",
  1658. });
  1659. }
  1660. });
  1661. },
  1662. // 获取标本是否转派配置
  1663. getSpeTaskConfig(){
  1664. let postData = {
  1665. idx: 0,
  1666. sum: 10,
  1667. taskType: {
  1668. simpleQuery: true,
  1669. hosId: {
  1670. id: this.hosId
  1671. },
  1672. ordinaryField: {
  1673. key:"ordinary_field",
  1674. value: "specimenPackage"
  1675. }
  1676. }
  1677. };
  1678. post("/simple/data/fetchDataList/taskType", postData).then((result) => {
  1679. if (result.status == 200) {
  1680. this.tasktype = result.list[0] || {};
  1681. this.getSpeConfig();
  1682. }
  1683. });
  1684. },
  1685. // 获取配置
  1686. getSpeConfig() {
  1687. let postData = {
  1688. idx: 0,
  1689. sum: 10,
  1690. taskTypeConfig: {
  1691. taskTypeDTO: {
  1692. hosId: {
  1693. id: this.hosId
  1694. },
  1695. ordinaryField: this.tasktype.ordinaryField
  1696. }
  1697. }
  1698. };;
  1699. post("/simple/data/fetchDataList/taskTypeConfig", postData).then((result) => {
  1700. if (result.status == 200) {
  1701. this.configs = result.list[0] || {};
  1702. this.sPehandoverOrder = this.configs.handoverOrder || null;
  1703. }
  1704. });
  1705. },
  1706. // 获取检查页面控制开关
  1707. getTaskConfig(){
  1708. post("/simple/data/fetchDataList/taskTypeConfig", {
  1709. "idx": 0,
  1710. "sum": 10,
  1711. "taskTypeConfig": {
  1712. "taskTypeDTO": {
  1713. "hosId": {
  1714. "id": this.hosId
  1715. },
  1716. "associationType": {
  1717. "key": "association_types",
  1718. "value": "inspect"
  1719. }
  1720. }
  1721. }
  1722. }).then((result) => {
  1723. if (result.status == 200) {
  1724. if(result.list && result.list[0]){
  1725. this.multiplayerMode = result.list[0].multiplayerMode;
  1726. this.handoverOrder = result.list[0].handoverOrder;
  1727. this.hideInspectScan = result.list[0].hideInspectScan;
  1728. }else{
  1729. this.multiplayerMode = 0;
  1730. this.handoverOrder = 0;
  1731. this.hideInspectScan = 0;
  1732. }
  1733. } else {
  1734. this.multiplayerMode = 0;
  1735. this.handoverOrder = 0;
  1736. this.hideInspectScan = 0;
  1737. }
  1738. });
  1739. },
  1740. // 获取临床服务页面控制开关
  1741. getTaskOtherConfig(options){
  1742. post("/simple/data/fetchDataList/taskTypeConfig", {
  1743. "idx": 0,
  1744. "sum": 10,
  1745. "taskTypeConfig": {
  1746. "hosId": this.hosId,
  1747. "associationType": options.associationTypeId,
  1748. }
  1749. }).then((result) => {
  1750. if (result.status == 200) {
  1751. if(result.list && result.list[0]){
  1752. this.clinicalMultiplayerMode = result.list[0].clinicalMultiplayerMode;
  1753. let clinicalTaskIds = result.list[0].clinicalTaskIds ? result.list[0].clinicalTaskIds.split(',') : [] ;
  1754. this.clinicalTaskIdsFlag = clinicalTaskIds.includes(options.taskTypeId);
  1755. console.log(clinicalTaskIds, options.taskTypeId)
  1756. }else{
  1757. this.clinicalMultiplayerMode = 0;
  1758. this.clinicalTaskIdsFlag = false;
  1759. }
  1760. } else {
  1761. this.clinicalMultiplayerMode = 0;
  1762. this.clinicalTaskIdsFlag = false;
  1763. }
  1764. });
  1765. },
  1766. // 获取是否需要选择陪检方式
  1767. getInspectAndPatientTransform(content){
  1768. let sData = this.infoDATA
  1769. let sType = null
  1770. if(((!sData.worker)||(sData.worker&&sData.worker.id == this.currentUserId))&&sData.gdState.value != 6&&sData.gdState.value != 7&&sData.gdState.value != 11){
  1771. if(sData.gdState.value != 2 &&
  1772. sData.taskType.associationType.value != 'jPBag' &&
  1773. sData.taskType.associationType.value != 'drugsBag' &&
  1774. sData.taskType.associationType.value != 'specimen' &&
  1775. sData.taskType.associationType.value != 'specimenPlan' &&
  1776. sData.taskType.associationType.value != 'ordinary' &&
  1777. !(sData.taskType.associationType.value == 'other' && (sData.gdState.value == 4 && sData.taskType.carryingCourses[0].actionsSwitch || sData.gdState.value == 5 && sData.taskType.carryingCourses[1].actionsSwitch))){
  1778. sType = 1
  1779. }
  1780. }
  1781. if(sData.gdState.value != 2 &&
  1782. sData.taskType.associationType.value != 'patientTransport' &&
  1783. sData.taskType.associationType.value != 'inspect' &&
  1784. sData.taskType.associationType.value != 'other' &&
  1785. sData.taskType.associationType.value != 'ordinary'){
  1786. sType = 2
  1787. }
  1788. // 患者陪检,患者其他服务,工单状态是待到达
  1789. if((sData.taskType.associationType.value === 'inspect' || sData.taskType.associationType.value === 'patientTransport') && sData.gdState.value == 4){
  1790. const postData = {
  1791. "idx":0,
  1792. "sum":1,
  1793. "taskTypeConfig":{
  1794. "taskTypeDTO":{
  1795. "hosId": {"id": this.hosId},
  1796. "associationType": {
  1797. "key": "association_types",
  1798. "value":"inspect",
  1799. },
  1800. },
  1801. },
  1802. };
  1803. uni.showLoading({
  1804. mask: true,
  1805. title: '加载中'
  1806. })
  1807. post("/simple/data/fetchDataList/taskTypeConfig", postData).then((res) => {
  1808. console.log(res)
  1809. if (res.status == 200) {
  1810. res.list = res.list || [];
  1811. if(res.list[0] && res.list[0].signTypeIds){
  1812. // 如果开启
  1813. const postData = {
  1814. "idx":0,
  1815. "sum":9999,
  1816. "workOrderInspectScore":{
  1817. "hosId": this.hosId,
  1818. },
  1819. };
  1820. post("/simple/data/fetchDataList/workOrderInspectScore", postData).then((res) => {
  1821. console.log(res)
  1822. uni.hideLoading();
  1823. if (res.status == 200) {
  1824. res.list = res.list || [];
  1825. let radioInspectionDistanceItem = res.list.map(v => ({id: v.id + "__" + v.inspectMode, inspectMode: v.inspectMode}));
  1826. console.log(radioInspectionDistanceItem)
  1827. this.models4 = {
  1828. disjunctor: true,
  1829. title: "请选择陪检方式",
  1830. radioInspectionDistanceItem,
  1831. icon: "",
  1832. operate: {
  1833. ok: "确定",
  1834. cancel: "取消",
  1835. },
  1836. };
  1837. } else {
  1838. uni.showToast({
  1839. icon: "none",
  1840. title: res.msg || "接口获取数据失败!",
  1841. });
  1842. }
  1843. })
  1844. }else{
  1845. uni.hideLoading();
  1846. this.Scan_ss(content,sData,sType);
  1847. }
  1848. } else {
  1849. uni.hideLoading();
  1850. uni.showToast({
  1851. icon: "none",
  1852. title: res.msg || "接口获取数据失败!",
  1853. });
  1854. }
  1855. })
  1856. }else{
  1857. this.Scan_ss(content,sData,sType);
  1858. }
  1859. },
  1860. Scan_ss(content, data, type) {
  1861. if (!this.SMFlag) {
  1862. return;
  1863. }
  1864. this.SMFlag = false;
  1865. this.currentData = data;
  1866. if(content){
  1867. content = content.replace('\n','')
  1868. uni.showLoading({
  1869. title: "加载中",
  1870. mask: true,
  1871. });
  1872. //检验二维码的有效性
  1873. post("/dept/scanning", {
  1874. content: content,
  1875. taskTypeId: data.taskType.id,
  1876. gdState: data.gdState.id,
  1877. }).then((result) => {
  1878. this.SMFlag = true;
  1879. this.currentCode = result.code;
  1880. if (result.state == 200 || result.state == 201) {
  1881. if (result.account) {
  1882. if (type == 1) {
  1883. this.isOpenTransportationProcessRemarks(this.currentData, {
  1884. account: result.account,
  1885. accountName: result.name,
  1886. accountId: result.id,
  1887. }, 'nextDeptOrder_ss');
  1888. } else if (type == 2) {
  1889. this.nextDeptOrder_s(this.currentData, {
  1890. account: result.account,
  1891. accountName: result.name,
  1892. accountId: result.id,
  1893. });
  1894. }
  1895. } else {
  1896. if (type == 1) {
  1897. this.isOpenTransportationProcessRemarks(this.currentData, undefined, 'nextDeptOrder_ss');
  1898. } else if (type == 2) {
  1899. this.nextDeptOrder_s(this.currentData);
  1900. }
  1901. }
  1902. } else if (result.state == '0000') {
  1903. uni.hideLoading();
  1904. // this.showSelectAccount(); //yeye
  1905. } else {
  1906. uni.hideLoading();
  1907. uni.showToast({
  1908. icon: "none",
  1909. title: result.info || "接口获取数据失败!",
  1910. });
  1911. }
  1912. });
  1913. }
  1914. },
  1915. // 其他临床服务-运输过程-终点科室是否开通备注填写
  1916. isOpenTransportationProcessRemarks(data, accountObj, funName){
  1917. const tasktype = data.taskType;
  1918. console.log(tasktype, data);
  1919. if(tasktype.associationType.value === 'other' && tasktype.carryingCourses[1].logSwitch && data.gdState.value == 5){
  1920. uni.navigateTo({
  1921. url: `../../pages/transportationProcessRemarks/transportationProcessRemarks?data=${data ? encodeURIComponent(JSON.stringify(data)) : ''}&accountObj=${accountObj ? encodeURIComponent(JSON.stringify(accountObj)) : ''}&currentCode=${this.currentCode}&funName=${funName}&actions=${this.actions ? encodeURIComponent(JSON.stringify(this.actions)) : ''}&imageValue=${this.imageValue ? encodeURIComponent(JSON.stringify(this.imageValue)) : ''}`
  1922. })
  1923. }else{
  1924. this[funName](data, accountObj);
  1925. }
  1926. },
  1927. // 如果不是患者陪检或患者转运或其他
  1928. // 科室签到
  1929. nextDeptOrder_s(data, accountObj) {
  1930. console.log(this.currentCode);
  1931. let ids = [];
  1932. let id = data.id;
  1933. ids.push(id);
  1934. let code = "";
  1935. let postData = {
  1936. ids
  1937. };
  1938. if (accountObj) {
  1939. postData.handover = [accountObj.accountId];
  1940. }
  1941. if (this.currentCode) {
  1942. code = this.currentCode;
  1943. // 科室签到
  1944. post("/workerOrder/orderSign/" + code, postData).then((res) => {
  1945. uni.hideLoading();
  1946. if (res.status == 200) {
  1947. // 跳转到扫描科室
  1948. // type1: res.type, //type类型
  1949. // id: data.id, //工单ID
  1950. // deptCode: code, //二维码
  1951. // dept: res.dept //科室名称
  1952. console.log(data,'工单')
  1953. let endDepts = data.endDepts.map(v=>v.id).toString();
  1954. console.log(endDepts,'smallScreen');
  1955. uni.navigateTo({
  1956. url: `../../pages/scanning_code/scanning_code?type=${data.taskType.associationType.value}&type1=${res.type}&id=${data.id}&deptCode=${code}&dept=${res.dept}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}&deptId=${res.deptId}&endDepts=${endDepts}`,
  1957. });
  1958. } else {
  1959. uni.navigateTo({
  1960. url: `../../pages/scanning_Result/scanning_Result?type=${data.taskType.associationType.value}&type1=${res.type}&id=${data.id}&status=600&msg=${res.msg}&isKs=1&qrcode=${this.currentCode}`,
  1961. });
  1962. }
  1963. });
  1964. }
  1965. },
  1966. },
  1967. onShow(){
  1968. this.SMFlag = true;
  1969. let that = this
  1970. // #ifdef APP-PLUS
  1971. uni.$off('scan') // 每次进来先 移除全局自定义事件监听器
  1972. uni.$on('scan', function(data) {
  1973. that.getInspectAndPatientTransform(data)
  1974. })
  1975. // #endif
  1976. },
  1977. onLoad(options) {
  1978. console.log(options, 'options');
  1979. options.associationTypeValue === 'drugsBag' && this.isShowDrugsBatchInfo();
  1980. this.currentUserId = uni.getStorageSync('userData').user.id;
  1981. let id = options.id;
  1982. this.dataId = id;
  1983. if (
  1984. options.associationTypeValue == 'specimen' ||
  1985. options.associationTypeValue == 'specimenPlan'
  1986. ) {
  1987. // 到达 送达 执行中
  1988. this.getSpeTaskConfig();
  1989. this.getInfoBySpecimen(id);
  1990. } else {
  1991. this.getInfo(id);
  1992. }
  1993. if (
  1994. options.associationTypeValue == 'inspect' ||
  1995. options.associationTypeValue == 'patientTransport'
  1996. ) {
  1997. this.getTaskConfig();
  1998. }else if(options.associationTypeValue == 'other'){
  1999. this.getTaskOtherConfig(options);
  2000. }
  2001. // 创建动画
  2002. this.animation = uni.createAnimation({
  2003. duration: 500,
  2004. timingFunction: "ease",
  2005. });
  2006. // #ifdef APP-PLUS
  2007. webHandle("no", "app");
  2008. // #endif
  2009. // #ifdef H5
  2010. webHandle("no", "wx");
  2011. // #endif
  2012. },
  2013. onUnload() {
  2014. // 页面关闭后清空数据
  2015. this.animationData = {};
  2016. },
  2017. };
  2018. </script>
  2019. <style lang="less">
  2020. .Receipt_infopage {
  2021. padding: 0 20rpx;
  2022. overflow: hidden;
  2023. .red {
  2024. color: red !important;
  2025. font-weight: bold !important;
  2026. }
  2027. .green {
  2028. color: #49b856 !important;
  2029. font-weight: bold !important;
  2030. }
  2031. .title {
  2032. font-size: 48rpx;
  2033. margin-top: 24rpx;
  2034. margin-bottom: 24rpx;
  2035. text-align: center;
  2036. }
  2037. .page_item {
  2038. margin-top: 16rpx;
  2039. margin-bottom: 124rpx;
  2040. background: #fff;
  2041. border-radius: 8rpx;
  2042. padding: 0 16rpx;
  2043. border: 2rpx solid #e5e9ed;
  2044. .L {
  2045. width: 40rpx;
  2046. height: 40rpx;
  2047. border-radius: 50%;
  2048. background: #f9fafb;
  2049. position: relative;
  2050. left: -50rpx;
  2051. top: 66rpx;
  2052. }
  2053. .R {
  2054. width: 40rpx;
  2055. height: 40rpx;
  2056. border-radius: 50%;
  2057. background: #f9fafb;
  2058. position: relative;
  2059. float: right;
  2060. right: -50rpx;
  2061. top: 26rpx;
  2062. }
  2063. .starting {
  2064. width: 50rpx;
  2065. height: 50rpx;
  2066. color: #fff;
  2067. background: #49b856;
  2068. display: inline-block;
  2069. border-radius: 50%;
  2070. text-align: center;
  2071. line-height: 46rpx;
  2072. font-size: 32rpx;
  2073. margin-right: 6rpx;
  2074. }
  2075. .End {
  2076. width: 50rpx;
  2077. height: 50rpx;
  2078. color: #fff;
  2079. background: #39b199;
  2080. display: inline-block;
  2081. border-radius: 50%;
  2082. text-align: center;
  2083. line-height: 46rpx;
  2084. font-size: 32rpx;
  2085. margin-right: 6rpx;
  2086. }
  2087. .page_item_top {
  2088. height: 86rpx;
  2089. border-bottom: 2rpx dashed #666;
  2090. padding: 0 16rpx;
  2091. .page_item_top_L {
  2092. height: 100%;
  2093. float: left;
  2094. line-height: 88rpx;
  2095. .emergencys {
  2096. background: #ff3b53 !important;
  2097. width: 124rpx !important;
  2098. }
  2099. .emergency {
  2100. background: #ff3b53 !important;
  2101. }
  2102. .emergency1 {
  2103. background: #49b856 !important;
  2104. }
  2105. .page_item_cont_start {
  2106. text-align: center;
  2107. height: 44rpx;
  2108. width: 104rpx;
  2109. line-height: 44rpx;
  2110. border-radius: 8rpx;
  2111. background: #49b856;
  2112. color: #fff;
  2113. display: inline-block;
  2114. font-size: 28rpx;
  2115. .cubeic-star {
  2116. margin-right: 8rpx;
  2117. }
  2118. }
  2119. .L_time {
  2120. color: #6cc076;
  2121. font-size: 32rpx;
  2122. }
  2123. .L_text {
  2124. font-size: 32rpx;
  2125. display: inline-block;
  2126. font-weight: 700;
  2127. margin-right: 16rpx;
  2128. }
  2129. }
  2130. .page_item_top_R {
  2131. height: 60rpx;
  2132. float: right;
  2133. padding-top: 20rpx;
  2134. font-size: 32rpx;
  2135. position: absolute;
  2136. right: 50rpx;
  2137. .L_iocn {
  2138. display: inline-block;
  2139. height: 52rpx;
  2140. line-height: 48rpx;
  2141. color: rgb(7, 134, 60);
  2142. font-size: 36rpx;
  2143. font-weight: 700;
  2144. }
  2145. }
  2146. }
  2147. .page_item_cont {
  2148. min-height: 180rpx;
  2149. // max-height: 424rpx;
  2150. padding: 0 16rpx;
  2151. text-align: left;
  2152. position: relative;
  2153. .text_big {
  2154. font-size: 32rpx;
  2155. position: absolute;
  2156. right: 16rpx;
  2157. font-weight: 700;
  2158. margin-top: 10rpx;
  2159. }
  2160. .text_big2 {
  2161. font-size: 32rpx;
  2162. position: absolute;
  2163. right: 16rpx;
  2164. font-weight: 700;
  2165. }
  2166. .line {
  2167. height: 20rpx;
  2168. width: 2rpx;
  2169. border-left: 2rpx solid #666;
  2170. position: absolute;
  2171. top: 82rpx;
  2172. left: 40rpx;
  2173. }
  2174. .lines {
  2175. height: 40%;
  2176. width: 2rpx;
  2177. border-left: 2rpx solid #666;
  2178. position: absolute;
  2179. top: 23%;
  2180. left: 36rpx;
  2181. }
  2182. .page_item_cont_T {
  2183. padding-top: 28rpx;
  2184. font-size: 28rpx;
  2185. .page_item_cont_title {
  2186. height: 100%;
  2187. font-size: 32rpx;
  2188. }
  2189. }
  2190. .page_item_cont_B {
  2191. padding-top: 28rpx;
  2192. margin-bottom: 28rpx;
  2193. .page_item_cont_title {
  2194. height: 60rpx;
  2195. font-size: 32rpx;
  2196. }
  2197. .page_item_cont_title1 {
  2198. height: 60rpx;
  2199. line-height: 60rpx;
  2200. font-size: 32rpx;
  2201. padding-left: 64rpx;
  2202. }
  2203. }
  2204. }
  2205. .page_item_foot {
  2206. border-top: 2rpx dashed #666;
  2207. border-bottom: 2rpx dashed #666;
  2208. padding: 28rpx 16rpx;
  2209. text-align: left;
  2210. .page_item_foot_text {
  2211. font-size: 32rpx;
  2212. margin-bottom: 20rpx;
  2213. .text1 {
  2214. color: rgb(102, 102, 102);
  2215. }
  2216. .text2 {
  2217. float: right;
  2218. font-weight: 700;
  2219. }
  2220. }
  2221. }
  2222. .page_item_info {
  2223. padding: 20rpx 16rpx;
  2224. text-align: left;
  2225. line-height: 60rpx;
  2226. font-size: 32rpx;
  2227. .spe_list {
  2228. padding: 32rpx 0;
  2229. border-top: 2rpx solid #666;
  2230. .page_item_info_title {
  2231. color: #666;
  2232. }
  2233. }
  2234. .page_item_info_title {
  2235. font-weight: 700;
  2236. }
  2237. .text {
  2238. float: right;
  2239. font-weight: 700;
  2240. .page_item_info_txt {
  2241. color: #49b856;
  2242. margin-left: 8rpx;
  2243. margin-right: 8rpx;
  2244. }
  2245. }
  2246. }
  2247. #infos {
  2248. height: 0;
  2249. overflow: hidden;
  2250. }
  2251. .page_item_infos {
  2252. padding-top: 20rpx;
  2253. padding-bottom: 20rpx;
  2254. border-bottom: 2rpx dashed #666;
  2255. .page_item_info2 {
  2256. text-align: left;
  2257. line-height: 60rpx;
  2258. font-size: 32rpx;
  2259. padding-left: 16rpx;
  2260. .page_item_foot_text {
  2261. font-size: 32rpx;
  2262. margin-bottom: 20rpx;
  2263. &:last-of-type {
  2264. margin-bottom: 0;
  2265. }
  2266. .text1 {
  2267. color: rgb(102, 102, 102);
  2268. }
  2269. .text2 {
  2270. float: right;
  2271. font-weight: 700;
  2272. }
  2273. .btn {
  2274. height: 66rpx;
  2275. width: 132rpx;
  2276. margin: 0 auto;
  2277. background-color: #49b856;
  2278. color: #fff;
  2279. border-radius: 8rpx;
  2280. font-size: 32rpx;
  2281. margin-top: 20rpx;
  2282. text-align: center;
  2283. }
  2284. }
  2285. }
  2286. }
  2287. #pulldown {
  2288. color: #49b856;
  2289. font-size: 36rpx;
  2290. height: 60rpx;
  2291. text-align: center;
  2292. .cubeic-pulldown {
  2293. font-size: 48rpx;
  2294. position: relative;
  2295. bottom: 6rpx;
  2296. }
  2297. }
  2298. #pullup {
  2299. color: #49b856;
  2300. font-size: 36rpx;
  2301. height: 60rpx;
  2302. text-align: center;
  2303. .cubeic-pullup {
  2304. font-size: 48rpx;
  2305. position: relative;
  2306. top: 12rpx;
  2307. }
  2308. }
  2309. }
  2310. .foot_btn2 {
  2311. position: fixed;
  2312. bottom: 0;
  2313. right: 20rpx;
  2314. left: 20rpx;
  2315. line-height: 66rpx;
  2316. height: 100rpx;
  2317. border-top: 2rpx solid #e5e9ed;
  2318. background: #f9fafb;
  2319. display: flex;
  2320. justify-content: space-between;
  2321. .btn2,
  2322. .btn3 {
  2323. height: 66rpx;
  2324. flex: 1;
  2325. margin: 0 1%;
  2326. background-image: linear-gradient(to right, #72c172, #3bb197);
  2327. color: #fff;
  2328. border-radius: 8rpx;
  2329. font-size: 28rpx;
  2330. margin-top: 8rpx;
  2331. margin-bottom: 8rpx;
  2332. text-align: center;
  2333. }
  2334. }
  2335. }
  2336. </style>