receipt_infopage.vue 60 KB

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