receipt_infopage.vue 63 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801
  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 icon_transport transport-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 icon_transport transport-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 icon_transport transport-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">
  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.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">床号</text>
  140. <text class="text2">{{
  141. infoDATA.patient ? infoDATA.patient.bedNum : "-"
  142. }}</text>
  143. </view>
  144. <view class="page_item_foot_text" v-if="
  145. infoDATA.taskType.associationType.value == 'inspect' ||
  146. infoDATA.taskType.associationType.value == 'patientTransport'
  147. ">
  148. <text class="text1">携带设备</text>
  149. <text class="text2">{{ infoDATA.goods || "暂无" }}</text>
  150. </view>
  151. <view class="page_item_info" style="padding: 0;" v-if="infoDATA.workOrderRemark !== undefined">
  152. <view class="page_item_foot_text">
  153. <view class="text1" v-if="infoDATA.taskType.associationType.value == 'inspect' || infoDATA.taskType.associationType.value == 'patientTransport'">备注信息</view>
  154. <view class="text1" v-else>工单备注</view>
  155. <view class="text2" style="float: none;word-break: break-all;">{{ infoDATA.workOrderRemark }}</view>
  156. </view>
  157. </view>
  158. <view class="page_item_foot_text" v-if="
  159. infoDATA.taskType.associationType.value == 'inspect' ||
  160. infoDATA.taskType.associationType.value == 'patientTransport'
  161. ">
  162. <text class="text1">患者姓名</text>
  163. <text class="text2">{{ infoDATA.patient.patientName }}({{
  164. infoDATA.patient.residenceNo
  165. }})</text>
  166. </view>
  167. <view class="page_item_foot_text" v-if="
  168. (infoDATA.taskType.associationType.value == 'inspect' ||
  169. infoDATA.taskType.associationType.value == 'patientTransport')&&infoDATA.patient.careLevel
  170. ">
  171. <text class="text1">{{infoDATA.patient.careLevel.desc}}</text>
  172. <text class="text2"
  173. :class="[(infoDATA.patient.careLevel.value==0||infoDATA.patient.careLevel.value==1)?'red':'green']">{{infoDATA.patient.careLevel.name}}</text>
  174. </view>
  175. <view class="page_item_foot_text" v-if="
  176. (infoDATA.taskType.associationType.value == 'inspect' ||
  177. infoDATA.taskType.associationType.value == 'patientTransport')&&infoDATA.patient.illnessState
  178. ">
  179. <text class="text1">{{infoDATA.patient.illnessState.desc}}</text>
  180. <text class="text2"
  181. :class="{red:infoDATA.patient.illnessState.value==2||infoDATA.patient.illnessState.value==3}">{{infoDATA.patient.illnessState.name}}</text>
  182. </view>
  183. <view class="page_item_foot_text"
  184. v-if="
  185. (infoDATA.taskType.associationType.value == 'inspect' ||
  186. infoDATA.taskType.associationType.value == 'patientTransport')&&(infoDATA.isAccompany===1||infoDATA.isAccompany===0)">
  187. <text class="text1">陪同情况</text>
  188. <text class="text2"
  189. :class="{red:infoDATA.isAccompany===1}">{{ infoDATA.isAccompany===1?'需要医护陪同':'无需医护陪同'}}</text>
  190. </view>
  191. <view class="page_item_foot_text"
  192. v-if="(infoDATA.taskType.associationType.value == 'inspect' || infoDATA.taskType.associationType.value == 'patientTransport') && infoDATA.inspectScore">
  193. <text class="text1">陪检方式</text>
  194. <text class="text2">{{ infoDATA.inspectScore.inspectMode }}</text>
  195. </view>
  196. <view class="page_item_foot_text"
  197. v-if="(infoDATA.taskType.associationType.value == 'inspect' || infoDATA.taskType.associationType.value == 'patientTransport') && infoDATA.inspectUsers">
  198. <text class="text1">陪检人员</text>
  199. <text class="text2">{{ infoDATA.inspectUsers }}</text>
  200. </view>
  201. <view class="page_item_foot_text"
  202. v-if="(infoDATA.taskType.associationType.value == 'inspect' || infoDATA.taskType.associationType.value == 'patientTransport') && infoDATA.inspectUsersNum">
  203. <text class="text1">陪检人数</text>
  204. <text class="text2">{{ infoDATA.inspectUsersNum }}</text>
  205. </view>
  206. <view class="page_item_foot_text"
  207. v-if="infoDATA.taskType.associationType.value == 'other' && infoDATA.inspectUsers">
  208. <text class="text1">执行人员</text>
  209. <text class="text2">{{ infoDATA.inspectUsers }}</text>
  210. </view>
  211. <view class="page_item_foot_text"
  212. v-if="infoDATA.taskType.associationType.value == 'other' && infoDATA.inspectUsersNum">
  213. <text class="text1">执行人数</text>
  214. <text class="text2">{{ infoDATA.inspectUsersNum }}</text>
  215. </view>
  216. </view>
  217. <!-- 药包 -->
  218. <view class="page_item_info" v-if="infoDATA.taskType.associationType.value == 'drugsBag'">
  219. <text class="page_item_info_title">药包编码</text>
  220. <text class="text">{{ infoDATA.drugs?infoDATA.drugs.packid:'无' }}</text>
  221. </view>
  222. <!-- 血制品 -->
  223. <view class="page_item_info" v-if="
  224. infoDATA.taskType.associationType.value == 'ordinary' &&
  225. infoDATA.taskType.ordinaryField.value == 'blood'
  226. ">
  227. <view>
  228. <text class="page_item_info_title">·</text>
  229. <text class="text">
  230. 送达数量
  231. <text class="page_item_info_txt">{{infoDATA.deliveryNum || '无'}}</text>
  232. </text>
  233. <text class="text">
  234. 实收数量
  235. <text class="page_item_info_txt">{{infoDATA.actualReceiveNum || '无'}}</text>
  236. </text>
  237. <text class="text">
  238. 应收数量
  239. <text class="page_item_info_txt">{{infoDATA.expectReceiveNum || '无'}}</text>
  240. </text>
  241. </view>
  242. </view>
  243. <!-- 标本 -->
  244. <view class="page_item_info" v-if="
  245. infoDATA.taskType.associationType.value == 'specimen' ||
  246. infoDATA.taskType.associationType.value == 'specimenPlan'
  247. ">
  248. <view>
  249. <text class="page_item_info_title">标本信息</text>
  250. <text class="text">
  251. 预计接收
  252. <text class="page_item_info_txt">{{
  253. infoDATA.expectReceiveNum || '无'
  254. }}</text>
  255. </text>
  256. <text class="text"
  257. v-if="infoDATA.gdState.value == 5 || infoDATA.gdState.value == 6 || infoDATA.gdState.value == 7">
  258. 扫描接收
  259. <text class="page_item_info_txt">{{infoDATA.actualReceiveNum || '无'}}</text>
  260. </text>
  261. <text class="text" v-if="infoDATA.gdState.value == 6 || infoDATA.gdState.value == 7">
  262. 实际送达
  263. <text class="page_item_info_txt">{{actualDelivery || '无'}}</text>
  264. </text>
  265. </view>
  266. <view v-for="spe in infoDATA.specimenSet" :key="spe.id" class="spe_list">
  267. <view>
  268. <text class="page_item_info_title">标本类型</text>
  269. <text class="text">{{ spe.stype ? spe.stype.name : "-" }}({{
  270. spe.urgent == 1 ? "急" : "普"
  271. }})</text>
  272. </view>
  273. <view>
  274. <text class="page_item_info_title">标本编码</text>
  275. <text class="text">{{ spe.scode }}</text>
  276. </view>
  277. <view>
  278. <text class="page_item_info_title">患者姓名</text>
  279. <text class="text">{{ spe.patientName }}<text v-if="spe.bedNum">({{spe.bedNum}})</text></text>
  280. </view>
  281. <view>
  282. <text class="page_item_info_title">目标科室</text>
  283. <text class="text">{{
  284. spe.checkDept ? spe.checkDept.dept : "-"
  285. }}</text>
  286. </view>
  287. </view>
  288. </view>
  289. <!-- 静配 -->
  290. <view class="page_item_info" v-if="infoDATA.taskType.associationType.value == 'jPBag'">
  291. <text class="page_item_info_title">药包编码</text>
  292. <text class="text">{{ infoDATA.staticDistri?infoDATA.staticDistri.packid:'无' }}</text>
  293. </view>
  294. <!-- 陪检 -->
  295. <view v-if="infoDATA.taskType.associationType.value == 'inspect'">
  296. <view class="page_item_info">
  297. <text class="page_item_info_title">检查信息</text>
  298. </view>
  299. <view id="infos" :animation="animationData">
  300. <view class="page_item_infos" v-for="(item, index) of infoDATA.checkList" :key="index">
  301. <view class="page_item_info2">
  302. <view class="page_item_foot_text">
  303. <text class="text1">检查科室</text>
  304. <text class="text2">{{ item.execDept?item.execDept.dept:'-' }}</text>
  305. </view>
  306. <view class="page_item_foot_text">
  307. <text class="text1">检查项</text>
  308. <text class="text2">{{ item.inspectName||'-' }}</text>
  309. </view>
  310. <view class="page_item_foot_text">
  311. <text class="text1">叫号信息</text>
  312. <text class="text2">{{ item.reservationNumber||'-' }}</text>
  313. </view>
  314. <view class="page_item_foot_text">
  315. <text class="text1">预约时间</text>
  316. <text class="text2">{{ item.yyTime || "-" }}</text>
  317. </view>
  318. <!-- <view class="page_item_foot_text"
  319. v-show="item.inspectState.value==1||item.inspectState.value==2||item.inspectState.value==4">
  320. <view class="btn" @click.stop="remove(item)">移除</view>
  321. </view> -->
  322. <view class="page_item_foot_text">
  323. <view class="btn" @click.stop="remove(item)">移除</view>
  324. </view>
  325. </view>
  326. </view>
  327. </view>
  328. <view id="pulldown" @click="show('show')" v-if="showType == 'hiddle'">
  329. 点击可查看检查详情
  330. <text class="cubeic-pulldown icon_transport transport-paixujiantouxia"></text>
  331. </view>
  332. <view id="pullup" @click="show('hiddle')" v-if="showType == 'show'">
  333. 点击可收起检查详情
  334. <text class="cubeic-pullup icon_transport transport-paixujiantoushang"></text>
  335. </view>
  336. </view>
  337. </view>
  338. <view class="foot_btn2 footerPadding">
  339. <view class="btn2" @click="showAlert" v-if="infoDATA.gdState.value == 2">接单</view>
  340. <!-- 如果不是静配,药配,标本配送,标本轮巡,万能交接 -->
  341. <template
  342. v-if="((!infoDATA.worker)||(infoDATA.worker&&infoDATA.worker.id == currentUserId))&&infoDATA.gdState.value != 6&&infoDATA.gdState.value != 7&&infoDATA.gdState.value != 11">
  343. <view :class="[infoDATA.taskType.specialCloseButton == 1 ? 'btn3' : 'btn2']" v-if="
  344. infoDATA.gdState.value != 2 &&
  345. infoDATA.taskType.associationType.value != 'jPBag' &&
  346. infoDATA.taskType.associationType.value != 'drugsBag' &&
  347. infoDATA.taskType.associationType.value != 'specimen' &&
  348. infoDATA.taskType.associationType.value != 'specimenPlan' &&
  349. infoDATA.taskType.associationType.value != 'ordinary' &&
  350. !(infoDATA.taskType.associationType.value == 'other' && (infoDATA.gdState.value == 4 && infoDATA.taskType.carryingCourses[0].actionsSwitch || infoDATA.gdState.value == 5 && infoDATA.taskType.carryingCourses[1].actionsSwitch))
  351. " hover-class="seimin-btn-hover">
  352. <smallScreen :sData="infoDATA" :sType="1">扫码</smallScreen>
  353. </view>
  354. <!-- 其他临床服务-完成工单-待到达 -->
  355. <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>
  356. <!-- 其他临床服务-完成工单-待送达 -->
  357. <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>
  358. <!-- 其他临床服务-拍照 -->
  359. <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>
  360. <view :class="[infoDATA.taskType.specialCloseButton == 1 ? 'btn3' : 'btn2']" @click="photograph(infoDATA)" v-if="
  361. infoDATA.taskType.associationType.value != 'jPBag' &&
  362. infoDATA.taskType.associationType.value != 'drugsBag' &&
  363. infoDATA.taskType.associationType.value != 'specimen' &&
  364. infoDATA.taskType.associationType.value != 'specimenPlan' &&
  365. infoDATA.taskType.associationType.value != 'other' &&
  366. infoDATA.taskType.associationType.value != 'ordinary' &&
  367. infoDATA.gdState.value == 4
  368. " hover-class="seimin-btn-hover">拍照</view>
  369. <view class="btn3" @click="specialCloseClick()" v-if="
  370. infoDATA.gdState.value != 2 &&
  371. infoDATA.taskType.associationType.value != 'jPBag' &&
  372. infoDATA.taskType.associationType.value != 'drugsBag' &&
  373. infoDATA.taskType.associationType.value != 'specimen' &&
  374. infoDATA.taskType.associationType.value != 'specimenPlan' &&
  375. infoDATA.taskType.associationType.value != 'ordinary' &&
  376. infoDATA.taskType.specialCloseButton == 1
  377. " hover-class="seimin-btn-hover">特殊情况关闭</view>
  378. </template>
  379. <!-- 如果不是患者陪检或患者转运或其他,万能交接 -->
  380. <view :class="[infoDATA.taskType.specialCloseButton == 1 ? 'btn3' : 'btn2']" v-if="
  381. infoDATA.gdState.value != 2 &&
  382. infoDATA.taskType.associationType.value != 'patientTransport' &&
  383. infoDATA.taskType.associationType.value != 'inspect' &&
  384. infoDATA.taskType.associationType.value != 'other' &&
  385. infoDATA.taskType.associationType.value != 'ordinary'
  386. " hover-class="seimin-btn-hover">
  387. <smallScreen :sData="infoDATA" :sType="2">扫码</smallScreen>
  388. </view>
  389. <!-- 如果是万能交接 -->
  390. <view :class="[infoDATA.taskType.specialCloseButton == 1 ? 'btn3' : 'btn2']"
  391. v-if="infoDATA.taskType.associationType.value == 'ordinary'"
  392. hover-class="seimin-btn-hover" @click="goBack()">
  393. 知道了
  394. </view>
  395. <view class="btn3" @click="specialCloseClick()" v-if="
  396. infoDATA.gdState.value != 2 &&
  397. infoDATA.taskType.associationType.value != 'patientTransport' &&
  398. infoDATA.taskType.associationType.value != 'inspect' &&
  399. infoDATA.taskType.associationType.value != 'other' &&
  400. infoDATA.taskType.specialCloseButton == 1
  401. " hover-class="seimin-btn-hover">特殊情况关闭</view>
  402. <view class="btn3" @click="viewSpecimen(infoDATA)" v-if="
  403. infoDATA.taskType.associationType.value == 'specimen' ||
  404. infoDATA.taskType.associationType.value == 'specimenPlan'
  405. " hover-class="seimin-btn-hover">查看标本</view>
  406. <view class="btn3" @click="viewDrugsBag(infoDATA)" v-if="infoDATA.taskType.associationType.value == 'drugsBag'" hover-class="seimin-btn-hover">查看业务流程</view>
  407. <view class="btn3" @click="toDrugBatches(infoDATA.drugs.batchNo)" v-if="infoDATA.taskType.associationType.value == 'drugsBag' && taskTypeConfig.drugsBatchInfo == 1" hover-class="seimin-btn-hover">药品批次</view>
  408. <view class="btn3" @click="viewBlood(infoDATA)" v-if="infoDATA.taskType.associationType.value == 'ordinary' && infoDATA.taskType.ordinaryField.value == 'blood'" hover-class="seimin-btn-hover">查看血制品</view>
  409. <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>
  410. <view class="btn3" @click="additionalUser(infoDATA)" v-if="infoDATA.taskType.associationType.value == 'other' && infoDATA.worker && infoDATA.worker.id && clinicalMultiplayerMode === 1 && clinicalTaskIdsFlag" hover-class="seimin-btn-hover">追加执行人员</view>
  411. </view>
  412. <!-- 弹窗 -->
  413. <showModel :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content"
  414. @know="know" :operate="models.operate" @ok="ok" @cancel="cancel" :textareaFlag="textareaFlag"
  415. @textareaInput="textareaInput"></showModel>
  416. <!-- 弹窗 -->
  417. <inspectRemoveModel :title="models1.title" :icon="models1.icon" :disjunctor="models1.disjunctor"
  418. :content="models1.content" @know="know1" :operate="models1.operate" @ok="ok1" @cancel="cancel1" :remove="true">
  419. </inspectRemoveModel>
  420. <!-- 填写交接人账号弹窗 -->
  421. <selectAccount v-if="hosModels.disjunctor" :title="hosModels.title" :disjunctor="hosModels.disjunctor" @ok="hosOk"
  422. @cancel="hosCancel">
  423. </selectAccount>
  424. </view>
  425. </template>
  426. <script>
  427. import selectAccount from "../../components/selectAccount/selectAccount.vue";
  428. import smallScreen from "../../components/smallScreen/smallScreen.vue";
  429. import {
  430. get,
  431. post,
  432. SM,
  433. webHandle
  434. } from "../../http/http.js";
  435. import {
  436. pathUrl,
  437. photographTool
  438. } from "../../tools/photograph.js";
  439. export default {
  440. components: {
  441. selectAccount,
  442. },
  443. data() {
  444. return {
  445. taskTypeConfig: {},
  446. // 填写交接人账号弹窗model
  447. hosModels: {
  448. disjunctor: false,
  449. },
  450. currentCode: '', //当前拍照使用的科室二维码
  451. currentData: {}, //当前小扫描的工单对象
  452. multiplayerMode: 0,
  453. clinicalMultiplayerMode: 0,
  454. clinicalTaskIdsFlag: false,
  455. hosId: uni.getStorageSync('userData').user.currentHospital.id,
  456. SMFlag:true,
  457. actualDelivery: 0,
  458. currentUserId: 0,
  459. // 弹窗model
  460. models: {
  461. disjunctor: false,
  462. },
  463. // 弹窗model1
  464. models1: {
  465. disjunctor: false,
  466. },
  467. currentInspect: null,
  468. showType: "show",
  469. infoDATA: {},
  470. dataId: "",
  471. animationData: {},
  472. // 特殊情况关闭原因开关
  473. textareaFlag: false,
  474. textareaText: "",
  475. };
  476. },
  477. filters: {
  478. // 自定义管道 yyTime
  479. yyTimeFilter: function(data) {
  480. if (data) {
  481. let nDate = null;
  482. if (typeof data == 'string') {
  483. let arr = data.split(/[-:\s]/);
  484. nDate = new Date(
  485. arr[0] - 0,
  486. arr[1] - 1,
  487. arr[2] - 0,
  488. arr[3] - 0,
  489. arr[4] - 0,
  490. 0
  491. );
  492. } else if (typeof data == 'number') {
  493. nDate = new Date(data);
  494. }
  495. const month = (nDate.getMonth() + 1).toString().padStart(2, 0);
  496. const date = nDate.getDate().toString().padStart(2, 0);
  497. const hour = nDate.getHours().toString().padStart(2, 0);
  498. const minute = nDate.getMinutes().toString().padStart(2, 0);
  499. return `${month}-${date} ${hour}:${minute}`;
  500. } else {
  501. return "-";
  502. }
  503. },
  504. },
  505. methods: {
  506. // 判断药品页面控制-是否显示关联批次药品
  507. isShowDrugsBatchInfo(){
  508. post("/simple/data/fetchDataList/taskType", {
  509. "idx": 0,
  510. "sum": 10,
  511. "taskType": {
  512. "simpleQuery": true,
  513. "hosId": {
  514. "id": this.hosId
  515. },
  516. "associationType": {
  517. "key": "association_types",
  518. "value": "drugsBag"
  519. }
  520. }
  521. }).then((res) => {
  522. if (res.status == 200) {
  523. res.list = res.list || [];
  524. let taskType = res.list[0] || {};
  525. if(taskType.id){
  526. post("/simple/data/fetchDataList/taskTypeConfig", {
  527. "idx": 0,
  528. "sum": 10,
  529. "taskTypeConfig": {
  530. "taskTypeDTO": {
  531. "hosId": {
  532. "id": this.hosId
  533. },
  534. "associationType": taskType.associationType
  535. }
  536. }
  537. }).then((res) => {
  538. if (res.status == 200) {
  539. res.list = res.list || [];
  540. this.taskTypeConfig = res.list[0] || {};
  541. } else {
  542. uni.showToast({
  543. icon: "none",
  544. title: "请求失败!",
  545. });
  546. }
  547. });
  548. }else{
  549. uni.showToast({
  550. icon: "none",
  551. title: "请配置药品任务类型!",
  552. });
  553. }
  554. } else {
  555. uni.showToast({
  556. icon: "none",
  557. title: "请求失败!",
  558. });
  559. }
  560. });
  561. },
  562. // 跳转到药品批次页面
  563. toDrugBatches(batchNo){
  564. uni.navigateTo({
  565. url: `../drugBatches/drugBatches?batchNo=${batchNo}`,
  566. });
  567. },
  568. // 前往其他临床服务完成工单确认页面
  569. otherCompleteOrder(data){
  570. console.log(data);
  571. uni.navigateTo({
  572. url: `../otherCompleteOrder/otherCompleteOrder?orderId=${data.id}&taskType=${data.taskType ? encodeURIComponent(JSON.stringify(data.taskType)) : ''}&order=${data ? encodeURIComponent(JSON.stringify(data)) : ''}`,
  573. });
  574. },
  575. // 如果不是静配,药配,标本配送,标本轮巡
  576. // 科室签到(小扫描)-拍照
  577. nextDeptOrder_ss(data, accountObj) {
  578. console.log(this.currentCode);
  579. let isKs = 0;
  580. let ids = [];
  581. let id = data.id;
  582. ids.push(id);
  583. let list = {
  584. code: "",
  585. ids: ids,
  586. };
  587. let code = "";
  588. let type = "";
  589. if (this.currentCode) {
  590. let gdStateValue = data.gdState.value; //工单状态value
  591. let associationTypeValue = data.taskType.associationType.value; //关联类型value
  592. // 其他临床服务,并且工单状态是待到达||工单状态待送达
  593. if (
  594. (associationTypeValue == "other" &&
  595. gdStateValue == "4") ||
  596. gdStateValue == "5"
  597. ) {
  598. code = this.currentCode;
  599. type = "orderSign/" + code;
  600. list = {
  601. ids
  602. };
  603. if (accountObj) {
  604. list.handover = [accountObj.accountId];
  605. }
  606. isKs = 1;
  607. }
  608. uni.showLoading({
  609. title: "加载中",
  610. mask: true,
  611. });
  612. post("/workerOrder/" + type, list).then((res) => {
  613. uni.hideLoading();
  614. if (res) {
  615. if (res.status == 200) {
  616. if (
  617. gdStateValue == "4" &&
  618. associationTypeValue == "other"
  619. ) {
  620. uni.navigateTo({
  621. url: `../../pages/scanning_code/scanning_code?type=${associationTypeValue}&type1=${res.type}&id=${data.id}&deptCode=${code}&dept=${res.dept}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}`,
  622. });
  623. }
  624. if (gdStateValue == "5") {
  625. uni.navigateTo({
  626. url: `../../pages/scanning_code/scanning_code?type=${associationTypeValue}&type1=${res.type}&id=${data.id}&deptCode=${code}&dept=${res.dept}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}`,
  627. });
  628. }
  629. } else {
  630. uni.navigateTo({
  631. url: `../../pages/scanning_Result/scanning_Result?type=${
  632. associationTypeValue
  633. }&type1=${res.type}&id=${data.id}&status=600&msg=${
  634. res.msg
  635. }&isKs=${isKs}&model=${encodeURIComponent(
  636. JSON.stringify(res)
  637. )}&qrcode=${this.currentCode}`,
  638. });
  639. }
  640. } else {
  641. uni.navigateTo({
  642. url: `../../pages/scanning_Result/scanning_Result?id=${data.id}&status=600&msg=扫码失败!请扫描正确的二维码!&isKs=${isKs}&qrcode=${this.currentCode}`,
  643. });
  644. }
  645. });
  646. }
  647. },
  648. // 填写交接人账号-确认
  649. hosOk(data) {
  650. console.log(data);
  651. const {
  652. accountName,
  653. account,
  654. accountId
  655. } = data;
  656. if (!accountName && !account) {
  657. //没有填写交接人
  658. uni.showModal({
  659. title: '提示',
  660. content: "请填写交接人账号!",
  661. showCancel: false,
  662. success: function(res) {
  663. if (res.confirm) {
  664. console.log('用户点击确定');
  665. } else if (res.cancel) {
  666. console.log('用户点击取消');
  667. }
  668. }
  669. });
  670. return;
  671. } else if (!accountName && account || accountName && !account) {
  672. //没有填写交接人
  673. uni.showModal({
  674. title: '提示',
  675. content: "请填写正确的交接人账号!",
  676. showCancel: false,
  677. success: function(res) {
  678. if (res.confirm) {
  679. console.log('用户点击确定');
  680. } else if (res.cancel) {
  681. console.log('用户点击取消');
  682. }
  683. }
  684. });
  685. return;
  686. }
  687. this.hosModels.disjunctor = false;
  688. let associationTypeValue = this.currentData.taskType.associationType.value;
  689. console.log(associationTypeValue)
  690. this.uploadToOther(this.currentData, data, 'start');
  691. },
  692. // 填写交接人账号-取消
  693. hosCancel() {
  694. this.hosModels.disjunctor = false;
  695. },
  696. // 填写交接人账号弹窗
  697. showSelectAccount() {
  698. this.hosModels = {
  699. title: '填写交接人账号',
  700. disjunctor: true,
  701. }
  702. },
  703. // 拍照-上传
  704. uploadToOther(data, accountObj, type){
  705. // 其他临床服务拍照签到
  706. console.log(data, 1111);
  707. let id_seimin;
  708. let asTypeValue_seimin;
  709. let gdStateValue_seimin;
  710. if (data.status != 200 && data.status !== undefined) {
  711. id_seimin = data.id;
  712. asTypeValue_seimin = data.type;
  713. gdStateValue_seimin = JSON.parse(data.model).gdstate2; //type改成gdstate
  714. } else {
  715. id_seimin = data.id;
  716. asTypeValue_seimin = data.taskType.associationType.value;
  717. gdStateValue_seimin = data.gdState.value;
  718. }
  719. //#ifdef H5
  720. uni.chooseImage({
  721. count: 1,
  722. sourceType: ['camera'],
  723. success: (chooseImageRes) => {
  724. console.log(chooseImageRes, pathUrl)
  725. const tempFilePaths = chooseImageRes.tempFilePaths;
  726. const tempFiles = chooseImageRes.tempFiles;
  727. let tp = tempFilePaths[0];
  728. uni.showLoading({
  729. mask: true,
  730. title: '加载中'
  731. });
  732. post('/workerOrder/findRecordInfoByOrderId', {
  733. orderId: id_seimin,
  734. gdOperate: 21,
  735. }).then(result => {
  736. console.log(result)
  737. if (result.state == 200) {
  738. uni.getImageInfo({
  739. src: tp,
  740. success: (res) => {
  741. console.log('压缩前', res)
  742. let canvasWidth = res.width //图片原始长宽
  743. let canvasHeight = res.height
  744. let img = new Image()
  745. img.src = res.path
  746. let canvas = document.createElement('canvas');
  747. let ctx = canvas.getContext('2d')
  748. canvas.width = canvasWidth
  749. canvas.height = canvasHeight
  750. ctx.drawImage(img, 0, 0, canvasWidth, canvasHeight)
  751. canvas.toBlob((fileSrc) => {
  752. tp = window.URL.createObjectURL(fileSrc)
  753. console.log('压缩后', tp);
  754. uni.uploadFile({
  755. url: pathUrl + '/common/common/uploadAttachment/'+(type == 'start' ? 'orderStartPhoto' : 'orderEndPhoto')+'/' + id_seimin + '/' + result.recordId,
  756. filePath: tp,
  757. name: 'file',
  758. formData: {
  759. 'filename': tempFiles[0].name ? tempFiles[0].name.split('.')[0] + '.jpg' : tempFiles[
  760. 0].path.split(
  761. /[\\/]/).reverse()[0].split('.')[0] + '.jpg'
  762. },
  763. success: (uploadFileRes) => {
  764. console.log(uploadFileRes, 10086, asTypeValue_seimin);
  765. this.nextDeptOrder_ss(data, accountObj, type);
  766. },
  767. fail: err => {
  768. console.error(err);
  769. uni.hideLoading();
  770. uni.showToast({
  771. icon: 'none',
  772. title: '上传失败',
  773. duration: 2000
  774. });
  775. }
  776. });
  777. }, 'image/jpeg', 0.3)
  778. },
  779. fail: function () {
  780. uni.hideLoading();
  781. uni.showToast({
  782. icon: 'none',
  783. title: '上传失败',
  784. duration: 2000
  785. });
  786. }
  787. })
  788. } else {
  789. uni.hideLoading();
  790. uni.showToast({
  791. icon: "none",
  792. title: "请求失败!",
  793. });
  794. }
  795. })
  796. }
  797. });
  798. //#endif
  799. //#ifdef APP-PLUS
  800. uni.chooseImage({
  801. count: 1,
  802. sourceType: ['camera'],
  803. sizeType: ['compressed'],
  804. success: (chooseImageRes) => {
  805. console.log(chooseImageRes, pathUrl)
  806. const tempFilePaths = chooseImageRes.tempFilePaths;
  807. const tempFiles = chooseImageRes.tempFiles;
  808. let tp = tempFilePaths[0];
  809. uni.showLoading({
  810. mask: true,
  811. title: '加载中'
  812. });
  813. post('/workerOrder/findRecordInfoByOrderId', {
  814. orderId: id_seimin,
  815. gdOperate: 21,
  816. }).then(result => {
  817. console.log(result)
  818. if (result.state == 200) {
  819. uni.compressImage({
  820. src: tp,
  821. quality: 30,
  822. success: (res) => {
  823. console.log('压缩前', res)
  824. tp = res.tempFilePath;
  825. console.log('压缩后', tp);
  826. uni.uploadFile({
  827. url: pathUrl + '/common/common/uploadAttachment/'+(type == 'start' ? 'orderStartPhoto' : 'orderEndPhoto')+'/' + id_seimin + '/' + result.recordId,
  828. filePath: tp,
  829. name: 'file',
  830. formData: {
  831. 'filename': tempFiles[0].name ? tempFiles[0].name.split('.')[0] + '.jpg' : tempFiles[
  832. 0].path.split(
  833. /[\\/]/).reverse()[0].split('.')[0] + '.jpg'
  834. },
  835. success: (uploadFileRes) => {
  836. console.log(uploadFileRes, 10086, asTypeValue_seimin);
  837. this.nextDeptOrder_ss(data, accountObj, type);
  838. },
  839. fail: err => {
  840. console.error(err);
  841. uni.hideLoading();
  842. uni.showToast({
  843. icon: 'none',
  844. title: '上传失败',
  845. duration: 2000
  846. });
  847. }
  848. });
  849. },
  850. fail: function () {
  851. uni.hideLoading();
  852. uni.showToast({
  853. icon: 'none',
  854. title: '上传失败',
  855. duration: 2000
  856. });
  857. }
  858. })
  859. } else {
  860. uni.hideLoading();
  861. uni.showToast({
  862. icon: "none",
  863. title: "请求失败!",
  864. });
  865. }
  866. })
  867. }
  868. });
  869. //#endif
  870. },
  871. // 拍照-其他
  872. async photographToOther(data, type) {
  873. this.currentData = data;
  874. uni.showLoading({
  875. title: "加载中",
  876. mask: true,
  877. });
  878. // 其他临床服务
  879. let result = await post("/dept/scanning", {
  880. content: type === 'start' ? data.startDept.qrcode : data.endDepts[0].qrcode,
  881. taskTypeId: data.taskType.id,
  882. gdState: data.gdState.id,
  883. });
  884. uni.hideLoading();
  885. this.currentCode = result.code;
  886. if (result.state == 200 || result.state == 201) {
  887. uni.showModal({
  888. title: '提示',
  889. content: '请尽量拍摄角度覆盖清洁区域?',
  890. success: (res) => {
  891. if (res.confirm) {
  892. if (result.account) {
  893. this.uploadToOther(data, {
  894. account: result.account,
  895. accountName: result.name,
  896. accountId: result.id,
  897. }, type);
  898. } else {
  899. this.uploadToOther(data, undefined, type);
  900. }
  901. } else if (res.cancel) {
  902. console.log('用户点击取消');
  903. }
  904. }
  905. });
  906. } else if (result.state == '0000') {
  907. this.showSelectAccount();
  908. } else {
  909. uni.showToast({
  910. icon: "none",
  911. title: "请求失败!",
  912. });
  913. }
  914. },
  915. goBack() {
  916. uni.navigateTo({
  917. url: "../receiptpage/receiptpage",
  918. });
  919. },
  920. // 查看标本
  921. viewSpecimen(workOrder) {
  922. uni.navigateTo({
  923. url: `../specimenDetail/specimenDetail?workOrderId=${workOrder.id}&associationTypeValue=${workOrder.taskType.associationType.value}`,
  924. });
  925. },
  926. // 查看药品业务数据
  927. viewDrugsBag(workOrder) {
  928. uni.navigateTo({
  929. url: `../drugsBagHistory/drugsBagHistory?id=${workOrder.drugs.id}&packid=${workOrder.drugs.packid}`,
  930. });
  931. },
  932. // 查看血制品
  933. viewBlood(workOrder) {
  934. uni.showLoading({
  935. title: "加载中",
  936. mask: true,
  937. });
  938. post('/transflow/checkData', {
  939. "type": "blood",
  940. "orderId": workOrder.id
  941. }).then(res => {
  942. uni.hideLoading();
  943. if(res.state == 200){
  944. uni.navigateTo({
  945. url: `../blood_list/blood_list?bloods=${encodeURIComponent(JSON.stringify(res.data.all))}`,
  946. });
  947. }else{
  948. uni.showToast({
  949. icon: "none",
  950. title: "请求失败!",
  951. });
  952. }
  953. })
  954. },
  955. // 移除检查->知道了
  956. know1() {
  957. this.models1.disjunctor = false;
  958. // this.getInfo(this.dataId);
  959. uni.navigateTo({
  960. url: '../receiptpage/receiptpage',
  961. });
  962. },
  963. // 移除检查->确定
  964. ok1(data) {
  965. console.log(data);
  966. const {
  967. value,
  968. yyTime
  969. } = data;
  970. if (!value) {
  971. //没有选择移除原因
  972. uni.showModal({
  973. title: "提示",
  974. content: "请选择移除原因!",
  975. showCancel: false,
  976. success: function(res) {
  977. if (res.confirm) {
  978. console.log("用户点击确定");
  979. } else if (res.cancel) {
  980. console.log("用户点击取消");
  981. }
  982. },
  983. });
  984. return;
  985. } else if (value == 2 && !yyTime) {
  986. //没有填写预约时间
  987. uni.showModal({
  988. title: "提示",
  989. content: "请填写预约时间!",
  990. showCancel: false,
  991. success: function(res) {
  992. if (res.confirm) {
  993. console.log("用户点击确定");
  994. } else if (res.cancel) {
  995. console.log("用户点击取消");
  996. }
  997. },
  998. });
  999. return;
  1000. }
  1001. this.models1.disjunctor = false;
  1002. let postData = {
  1003. gdId: this.infoDATA.id,
  1004. inspectId: this.currentInspect.id,
  1005. reason: value == 1 ? 'checkDone' : 'modificationTime',
  1006. yyTime: value == 1 ? undefined : yyTime,
  1007. };
  1008. uni.showLoading({
  1009. title: '移除中',
  1010. mask: true,
  1011. })
  1012. post('/workerOrder/removeInspectByOderId', postData).then(res => {
  1013. uni.hideLoading();
  1014. if (res.state == 200) {
  1015. uni.showToast({
  1016. icon: 'none',
  1017. title: '移除成功!',
  1018. success() {
  1019. setTimeout(() => {
  1020. uni.navigateTo({
  1021. url: '../receiptpage/receiptpage',
  1022. });
  1023. }, 1500)
  1024. }
  1025. })
  1026. } else {
  1027. uni.showToast({
  1028. icon: 'none',
  1029. title: '移除失败!',
  1030. })
  1031. }
  1032. })
  1033. },
  1034. // 移除检查->取消
  1035. cancel1() {
  1036. this.models1.disjunctor = false;
  1037. },
  1038. // 移除
  1039. remove(item) {
  1040. this.currentInspect = item;
  1041. this.models1 = {
  1042. disjunctor: true,
  1043. content: "请选择您移除检查的原因?检查移除后将会自动完成或删除工单!",
  1044. icon: "warn",
  1045. operate: {
  1046. ok: "确定",
  1047. cancel: "取消",
  1048. },
  1049. };
  1050. },
  1051. // 拍照
  1052. photograph(data) {
  1053. photographTool(data);
  1054. },
  1055. // 特殊情况输入文字
  1056. textareaInput(value) {
  1057. this.textareaText = value;
  1058. if (value.trim().length >= 10) {
  1059. this.models.operate = {
  1060. ok: "确定",
  1061. cancel: "取消",
  1062. };
  1063. } else {
  1064. this.models.operate = {
  1065. cancel: "取消",
  1066. };
  1067. }
  1068. },
  1069. // 追加陪检人员按钮
  1070. additionalUser(data) {
  1071. if (!this.SMFlag) {
  1072. return;
  1073. }
  1074. this.SMFlag = false;
  1075. console.log(data, 'data');
  1076. SM().then((ress1) => {
  1077. uni.showLoading({
  1078. title: "加载中",
  1079. mask: true,
  1080. });
  1081. //检验二维码的有效性
  1082. post("/dept/scanning", {
  1083. content: ress1,
  1084. taskTypeId: data.taskType.id,
  1085. gdState: data.gdState.id,
  1086. }).then((result) => {
  1087. this.SMFlag = true;
  1088. // this.currentCode = result.code;
  1089. if (result.state == 200 || result.state == 201) {
  1090. uni.hideLoading();
  1091. console.log(result);
  1092. let user = {};
  1093. try{
  1094. user = JSON.parse(result.code);
  1095. console.log(user);
  1096. }catch(e){
  1097. uni.showToast({
  1098. icon: "none",
  1099. title: "请扫描正确的二维码!",
  1100. });
  1101. }
  1102. if(user.type == 'myQrCode' && user.id && user.name){
  1103. uni.showModal({
  1104. title: "提示",
  1105. content: `您要最追加的人员为${user.name},您确认要追加吗?`,
  1106. success: (res) => {
  1107. if (res.confirm) {
  1108. console.log("用户点击确定");
  1109. this.additionalUserCommon(user.id, data.id, data.worker.id);
  1110. } else if (res.cancel) {
  1111. console.log("用户点击取消");
  1112. }
  1113. },
  1114. });
  1115. }else{
  1116. uni.showToast({
  1117. icon: "none",
  1118. title: "请扫描正确的二维码!",
  1119. });
  1120. }
  1121. } else {
  1122. uni.hideLoading();
  1123. uni.showToast({
  1124. icon: "none",
  1125. title: "请求失败!",
  1126. });
  1127. }
  1128. });
  1129. }).catch(err=>{
  1130. this.SMFlag = true;
  1131. });
  1132. },
  1133. // 追加陪检人
  1134. additionalUserCommon(userId, gdId, workerId) {
  1135. console.log(userId, gdId, workerId);
  1136. uni.showLoading({
  1137. title: "加载中",
  1138. mask: true,
  1139. });
  1140. post("/workerOrder/additionalAccompanyingPersonnel", {
  1141. userId,
  1142. gdId,
  1143. workerId,
  1144. }).then((result) => {
  1145. uni.hideLoading();
  1146. if (result.state == 200) {
  1147. this.getInfo(this.dataId);
  1148. uni.showToast({
  1149. icon: 'none',
  1150. duration: 4000,
  1151. title: '操作成功!'
  1152. })
  1153. } else {
  1154. uni.showToast({
  1155. icon: 'none',
  1156. duration: 4000,
  1157. title: result.msg || '操作失败!'
  1158. })
  1159. }
  1160. });
  1161. },
  1162. // 特殊情况关闭按钮
  1163. specialCloseClick() {
  1164. this.textareaFlag = true;
  1165. this.models = {
  1166. title: "特殊情况关闭",
  1167. disjunctor: true,
  1168. content: "",
  1169. icon: "",
  1170. operate: {
  1171. cancel: "取消",
  1172. },
  1173. };
  1174. },
  1175. ok() {
  1176. uni.showLoading({
  1177. title: "加载中",
  1178. mask: true,
  1179. });
  1180. post("/workerOrder/specialCaseClose", {
  1181. workOrderId: this.dataId,
  1182. reason: this.textareaText.trim(),
  1183. }).then((result) => {
  1184. this.models.disjunctor = false;
  1185. this.textareaFlag = false;
  1186. this.textareaText = "";
  1187. if (result.state == 200) {
  1188. uni.hideLoading();
  1189. this.models = {
  1190. disjunctor: true,
  1191. content: "工单关闭成功",
  1192. icon: "success",
  1193. operate: {
  1194. know: "知道了",
  1195. },
  1196. };
  1197. } else {
  1198. uni.hideLoading();
  1199. this.models = {
  1200. disjunctor: true,
  1201. content: "工单关闭失败",
  1202. icon: "error",
  1203. operate: {
  1204. know: "知道了",
  1205. },
  1206. };
  1207. }
  1208. });
  1209. },
  1210. cancel() {
  1211. this.models.disjunctor = false;
  1212. this.textareaFlag = false;
  1213. this.textareaText = "";
  1214. },
  1215. // 点击可查看检查详情
  1216. show(type) {
  1217. this.showType = type;
  1218. if (type === "show") {
  1219. //展开
  1220. // 计算高度
  1221. const query = uni.createSelectorQuery().in(this);
  1222. query
  1223. .selectAll(".page_item_infos")
  1224. .boundingClientRect((data) => {
  1225. let len = data.reduce((prev, current) => {
  1226. return prev + current.height;
  1227. }, 0);
  1228. this.animation.height(len).step();
  1229. this.animationData = this.animation.export();
  1230. })
  1231. .exec();
  1232. } else if (type === "hiddle") {
  1233. this.animation.height(0).step();
  1234. this.animationData = this.animation.export();
  1235. }
  1236. },
  1237. // 抢单->知道了
  1238. know() {
  1239. this.models.disjunctor = false;
  1240. uni.navigateTo({
  1241. url: "../receiptpage/receiptpage",
  1242. });
  1243. },
  1244. // 抢单
  1245. showAlert() {
  1246. get("/workerOrder/takeOrder/" + this.infoDATA.id).then((res) => {
  1247. if (res.status == 200) {
  1248. this.models = {
  1249. disjunctor: true,
  1250. content: "接单成功",
  1251. icon: "success",
  1252. operate: {
  1253. know: "知道了",
  1254. },
  1255. };
  1256. } else {
  1257. uni.showToast({
  1258. icon: "none",
  1259. title: "请求失败!",
  1260. });
  1261. }
  1262. });
  1263. },
  1264. // 请求详细页面的数据(除标本轮巡和标本配送)
  1265. getInfo(id) {
  1266. uni.showLoading({
  1267. title: "加载中",
  1268. mask: true,
  1269. });
  1270. get("/api/fetchData/workOrder/" + id).then((res) => {
  1271. uni.hideLoading();
  1272. if (res.status == 200) {
  1273. this.infoDATA = res.data;
  1274. // 计算高度
  1275. setTimeout(() => {
  1276. const query = uni.createSelectorQuery().in(this);
  1277. query
  1278. .selectAll(".page_item_infos")
  1279. .boundingClientRect((data) => {
  1280. let len = data.reduce((prev, current) => {
  1281. return prev + current.height;
  1282. }, 0);
  1283. this.animation.height(len).step();
  1284. this.animationData = this.animation.export();
  1285. })
  1286. .exec();
  1287. }, 500)
  1288. } else {
  1289. uni.showToast({
  1290. icon: "none",
  1291. title: "请求失败!",
  1292. });
  1293. }
  1294. });
  1295. },
  1296. // 请求详细页面的数据
  1297. getInfoBySpecimen(id) {
  1298. uni.showLoading({
  1299. title: "加载中",
  1300. mask: true,
  1301. });
  1302. post("/api/getWechatItem", {
  1303. id
  1304. }).then((res) => {
  1305. uni.hideLoading();
  1306. if (res.state == 200) {
  1307. this.actualDelivery = res.actualDelivery;
  1308. this.infoDATA = res.data;
  1309. // 计算高度
  1310. setTimeout(() => {
  1311. const query = uni.createSelectorQuery().in(this);
  1312. query
  1313. .selectAll(".page_item_infos")
  1314. .boundingClientRect((data) => {
  1315. let len = data.reduce((prev, current) => {
  1316. return prev + current.height;
  1317. }, 0);
  1318. this.animation.height(len).step();
  1319. this.animationData = this.animation.export();
  1320. })
  1321. .exec();
  1322. }, 500)
  1323. } else {
  1324. uni.showToast({
  1325. icon: "none",
  1326. title: "请求失败!",
  1327. });
  1328. }
  1329. });
  1330. },
  1331. // 获取检查页面控制开关
  1332. getTaskConfig(){
  1333. post("/simple/data/fetchDataList/taskTypeConfig", {
  1334. "idx": 0,
  1335. "sum": 10,
  1336. "taskTypeConfig": {
  1337. "taskTypeDTO": {
  1338. "hosId": {
  1339. "id": this.hosId
  1340. },
  1341. "associationType": {
  1342. "key": "association_types",
  1343. "value": "inspect"
  1344. }
  1345. }
  1346. }
  1347. }).then((result) => {
  1348. if (result.status == 200) {
  1349. if(result.list && result.list[0]){
  1350. this.multiplayerMode = result.list[0].multiplayerMode;
  1351. }else{
  1352. this.multiplayerMode = 0;
  1353. }
  1354. } else {
  1355. this.multiplayerMode = 0;
  1356. }
  1357. });
  1358. },
  1359. // 获取临床服务页面控制开关
  1360. getTaskOtherConfig(options){
  1361. post("/simple/data/fetchDataList/taskTypeConfig", {
  1362. "idx": 0,
  1363. "sum": 10,
  1364. "taskTypeConfig": {
  1365. "hosId": this.hosId,
  1366. "associationType": options.associationTypeId,
  1367. }
  1368. }).then((result) => {
  1369. if (result.status == 200) {
  1370. if(result.list && result.list[0]){
  1371. this.clinicalMultiplayerMode = result.list[0].clinicalMultiplayerMode;
  1372. let clinicalTaskIds = result.list[0].clinicalTaskIds ? result.list[0].clinicalTaskIds.split(',') : [] ;
  1373. this.clinicalTaskIdsFlag = clinicalTaskIds.includes(options.taskTypeId);
  1374. console.log(clinicalTaskIds, options.taskTypeId)
  1375. }else{
  1376. this.clinicalMultiplayerMode = 0;
  1377. this.clinicalTaskIdsFlag = false;
  1378. }
  1379. } else {
  1380. this.clinicalMultiplayerMode = 0;
  1381. this.clinicalTaskIdsFlag = false;
  1382. }
  1383. });
  1384. }
  1385. },
  1386. onLoad(options) {
  1387. console.log(options, 'options');
  1388. options.associationTypeValue === 'drugsBag' && this.isShowDrugsBatchInfo();
  1389. this.currentUserId = uni.getStorageSync('userData').user.id;
  1390. let id = options.id;
  1391. this.dataId = id;
  1392. if (
  1393. options.associationTypeValue == 'specimen' ||
  1394. options.associationTypeValue == 'specimenPlan'
  1395. ) {
  1396. this.getInfoBySpecimen(id);
  1397. } else {
  1398. this.getInfo(id);
  1399. }
  1400. if (
  1401. options.associationTypeValue == 'inspect' ||
  1402. options.associationTypeValue == 'patientTransport'
  1403. ) {
  1404. this.getTaskConfig();
  1405. }else if(options.associationTypeValue == 'other'){
  1406. this.getTaskOtherConfig(options);
  1407. }
  1408. // 创建动画
  1409. this.animation = uni.createAnimation({
  1410. duration: 500,
  1411. timingFunction: "ease",
  1412. });
  1413. // #ifdef APP-PLUS
  1414. webHandle("no", "app");
  1415. // #endif
  1416. // #ifdef H5
  1417. webHandle("no", "wx");
  1418. // #endif
  1419. },
  1420. onUnload() {
  1421. // 页面关闭后清空数据
  1422. this.animationData = {};
  1423. },
  1424. };
  1425. </script>
  1426. <style lang="less">
  1427. .Receipt_infopage {
  1428. padding: 0 20rpx;
  1429. overflow: hidden;
  1430. .red {
  1431. color: red !important;
  1432. font-weight: bold !important;
  1433. }
  1434. .green {
  1435. color: #49b856 !important;
  1436. font-weight: bold !important;
  1437. }
  1438. .title {
  1439. font-size: 48rpx;
  1440. margin-top: 24rpx;
  1441. margin-bottom: 24rpx;
  1442. text-align: center;
  1443. }
  1444. .page_item {
  1445. margin-top: 16rpx;
  1446. margin-bottom: 124rpx;
  1447. background: #fff;
  1448. border-radius: 8rpx;
  1449. padding: 0 16rpx;
  1450. border: 2rpx solid #e5e9ed;
  1451. .L {
  1452. width: 40rpx;
  1453. height: 40rpx;
  1454. border-radius: 50%;
  1455. background: #f9fafb;
  1456. position: relative;
  1457. left: -50rpx;
  1458. top: 66rpx;
  1459. }
  1460. .R {
  1461. width: 40rpx;
  1462. height: 40rpx;
  1463. border-radius: 50%;
  1464. background: #f9fafb;
  1465. position: relative;
  1466. float: right;
  1467. right: -50rpx;
  1468. top: 26rpx;
  1469. }
  1470. .starting {
  1471. width: 50rpx;
  1472. height: 50rpx;
  1473. color: #fff;
  1474. background: #49b856;
  1475. display: inline-block;
  1476. border-radius: 50%;
  1477. text-align: center;
  1478. line-height: 46rpx;
  1479. font-size: 32rpx;
  1480. margin-right: 6rpx;
  1481. }
  1482. .End {
  1483. width: 50rpx;
  1484. height: 50rpx;
  1485. color: #fff;
  1486. background: #39b199;
  1487. display: inline-block;
  1488. border-radius: 50%;
  1489. text-align: center;
  1490. line-height: 46rpx;
  1491. font-size: 32rpx;
  1492. margin-right: 6rpx;
  1493. }
  1494. .page_item_top {
  1495. height: 86rpx;
  1496. border-bottom: 2rpx dashed #666;
  1497. padding: 0 16rpx;
  1498. .page_item_top_L {
  1499. height: 100%;
  1500. float: left;
  1501. line-height: 88rpx;
  1502. .emergencys {
  1503. background: #ff3b53 !important;
  1504. width: 124rpx !important;
  1505. }
  1506. .emergency {
  1507. background: #ff3b53 !important;
  1508. }
  1509. .emergency1 {
  1510. background: #49b856 !important;
  1511. }
  1512. .page_item_cont_start {
  1513. text-align: center;
  1514. height: 44rpx;
  1515. width: 104rpx;
  1516. line-height: 44rpx;
  1517. border-radius: 8rpx;
  1518. background: #49b856;
  1519. color: #fff;
  1520. display: inline-block;
  1521. font-size: 28rpx;
  1522. .cubeic-star {
  1523. margin-right: 8rpx;
  1524. }
  1525. }
  1526. .L_time {
  1527. color: #6cc076;
  1528. font-size: 32rpx;
  1529. }
  1530. .L_text {
  1531. font-size: 32rpx;
  1532. display: inline-block;
  1533. font-weight: 700;
  1534. margin-right: 16rpx;
  1535. }
  1536. }
  1537. .page_item_top_R {
  1538. height: 60rpx;
  1539. float: right;
  1540. padding-top: 20rpx;
  1541. font-size: 32rpx;
  1542. position: absolute;
  1543. right: 50rpx;
  1544. .L_iocn {
  1545. display: inline-block;
  1546. height: 52rpx;
  1547. line-height: 48rpx;
  1548. color: rgb(7, 134, 60);
  1549. font-size: 36rpx;
  1550. font-weight: 700;
  1551. }
  1552. }
  1553. }
  1554. .page_item_cont {
  1555. min-height: 180rpx;
  1556. // max-height: 424rpx;
  1557. padding: 0 16rpx;
  1558. text-align: left;
  1559. position: relative;
  1560. .text_big {
  1561. font-size: 32rpx;
  1562. position: absolute;
  1563. right: 16rpx;
  1564. font-weight: 700;
  1565. margin-top: 10rpx;
  1566. }
  1567. .text_big2 {
  1568. font-size: 32rpx;
  1569. position: absolute;
  1570. right: 16rpx;
  1571. font-weight: 700;
  1572. }
  1573. .line {
  1574. height: 20rpx;
  1575. width: 2rpx;
  1576. border-left: 2rpx solid #666;
  1577. position: absolute;
  1578. top: 82rpx;
  1579. left: 40rpx;
  1580. }
  1581. .lines {
  1582. height: 40%;
  1583. width: 2rpx;
  1584. border-left: 2rpx solid #666;
  1585. position: absolute;
  1586. top: 23%;
  1587. left: 36rpx;
  1588. }
  1589. .page_item_cont_T {
  1590. padding-top: 28rpx;
  1591. font-size: 28rpx;
  1592. .page_item_cont_title {
  1593. height: 100%;
  1594. font-size: 32rpx;
  1595. }
  1596. }
  1597. .page_item_cont_B {
  1598. padding-top: 28rpx;
  1599. margin-bottom: 28rpx;
  1600. .page_item_cont_title {
  1601. height: 60rpx;
  1602. font-size: 32rpx;
  1603. }
  1604. .page_item_cont_title1 {
  1605. height: 60rpx;
  1606. line-height: 60rpx;
  1607. font-size: 32rpx;
  1608. padding-left: 64rpx;
  1609. }
  1610. }
  1611. }
  1612. .page_item_foot {
  1613. border-top: 2rpx dashed #666;
  1614. border-bottom: 2rpx dashed #666;
  1615. padding: 28rpx 16rpx;
  1616. text-align: left;
  1617. .page_item_foot_text {
  1618. font-size: 32rpx;
  1619. margin-bottom: 20rpx;
  1620. .text1 {
  1621. color: rgb(102, 102, 102);
  1622. }
  1623. .text2 {
  1624. float: right;
  1625. font-weight: 700;
  1626. }
  1627. }
  1628. }
  1629. .page_item_info {
  1630. padding: 20rpx 16rpx;
  1631. text-align: left;
  1632. line-height: 60rpx;
  1633. font-size: 32rpx;
  1634. .spe_list {
  1635. padding: 32rpx 0;
  1636. border-top: 2rpx solid #666;
  1637. .page_item_info_title {
  1638. color: #666;
  1639. }
  1640. }
  1641. .page_item_info_title {
  1642. font-weight: 700;
  1643. }
  1644. .text {
  1645. float: right;
  1646. font-weight: 700;
  1647. .page_item_info_txt {
  1648. color: #49b856;
  1649. margin-left: 8rpx;
  1650. margin-right: 8rpx;
  1651. }
  1652. }
  1653. }
  1654. #infos {
  1655. height: 0;
  1656. overflow: hidden;
  1657. }
  1658. .page_item_infos {
  1659. padding-top: 20rpx;
  1660. padding-bottom: 20rpx;
  1661. border-bottom: 2rpx dashed #666;
  1662. .page_item_info2 {
  1663. text-align: left;
  1664. line-height: 60rpx;
  1665. font-size: 32rpx;
  1666. padding-left: 16rpx;
  1667. .page_item_foot_text {
  1668. font-size: 32rpx;
  1669. margin-bottom: 20rpx;
  1670. &:last-of-type {
  1671. margin-bottom: 0;
  1672. }
  1673. .text1 {
  1674. color: rgb(102, 102, 102);
  1675. }
  1676. .text2 {
  1677. float: right;
  1678. font-weight: 700;
  1679. }
  1680. .btn {
  1681. height: 66rpx;
  1682. width: 132rpx;
  1683. margin: 0 auto;
  1684. background-color: #49b856;
  1685. color: #fff;
  1686. border-radius: 8rpx;
  1687. font-size: 32rpx;
  1688. margin-top: 20rpx;
  1689. text-align: center;
  1690. }
  1691. }
  1692. }
  1693. }
  1694. #pulldown {
  1695. color: #49b856;
  1696. font-size: 36rpx;
  1697. height: 60rpx;
  1698. text-align: center;
  1699. .cubeic-pulldown {
  1700. font-size: 48rpx;
  1701. position: relative;
  1702. bottom: 6rpx;
  1703. }
  1704. }
  1705. #pullup {
  1706. color: #49b856;
  1707. font-size: 36rpx;
  1708. height: 60rpx;
  1709. text-align: center;
  1710. .cubeic-pullup {
  1711. font-size: 48rpx;
  1712. position: relative;
  1713. top: 12rpx;
  1714. }
  1715. }
  1716. }
  1717. .foot_btn2 {
  1718. position: fixed;
  1719. bottom: 0;
  1720. right: 20rpx;
  1721. left: 20rpx;
  1722. line-height: 66rpx;
  1723. height: 100rpx;
  1724. border-top: 2rpx solid #e5e9ed;
  1725. background: #f9fafb;
  1726. display: flex;
  1727. justify-content: space-between;
  1728. .btn2,
  1729. .btn3 {
  1730. height: 66rpx;
  1731. flex: 1;
  1732. margin: 0 1%;
  1733. background-image: linear-gradient(to right, #72c172, #3bb197);
  1734. color: #fff;
  1735. border-radius: 8rpx;
  1736. font-size: 28rpx;
  1737. margin-top: 16rpx;
  1738. text-align: center;
  1739. }
  1740. }
  1741. }
  1742. </style>