receipt_infopage.vue 81 KB

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