receipt_infopage.vue 38 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165
  1. <template>
  2. <view class="Receipt_infopage" v-if="Object.keys(infoDATA).length > 0">
  3. <view class="title">工单信息</view>
  4. <view class="page_item">
  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 }}</text>
  102. </view>
  103. <view class="page_item_foot_text" v-if="infoDATA.taskType.associationType.value==='inspect'">
  104. <text class="text1">是否半程陪检</text>
  105. <text class="text2">{{ infoDATA.isHalfInspect===1?'是':'否' }}</text>
  106. </view>
  107. <view class="page_item_foot_text">
  108. <text class="text1">执行人员</text>
  109. <text class="text2">{{ infoDATA.worker?infoDATA.worker.name:'-' }}</text>
  110. </view>
  111. <view class="page_item_foot_text" v-if="infoDATA.gdState.value == '2'">
  112. <text class="text1">预计响应时间</text>
  113. <text class="text2">{{ infoDATA.estimeResponseTime || 0 }}</text>
  114. </view>
  115. <view class="page_item_foot_text" v-if="infoDATA.gdState.value == '5'">
  116. <text class="text1" v-if="!(infoDATA.taskType.associationType.value == 'inspect')">预计送达时间</text>
  117. <text class="text1" v-if="infoDATA.taskType.associationType.value == 'inspect'">预计送回时间</text>
  118. <text class="text2">{{ infoDATA.estimeCompleteTime || 0 }}</text>
  119. </view>
  120. <view class="page_item_foot_text" v-if="infoDATA.gdState.value == '4'">
  121. <text class="text1">预计到达时间</text>
  122. <text class="text2">{{ infoDATA.estimateArriveTime || 0 }}</text>
  123. </view>
  124. <view class="page_item_foot_text">
  125. <text class="text1">创建时间</text>
  126. <text class="text2">{{ infoDATA.startTime }}</text>
  127. </view>
  128. <view class="page_item_foot_text" v-if="
  129. infoDATA.taskType.associationType.value == 'inspect' ||
  130. infoDATA.taskType.associationType.value == 'patientTransport'
  131. ">
  132. <text class="text1">床号</text>
  133. <text class="text2">{{
  134. infoDATA.patient ? infoDATA.patient.bedNum : "-"
  135. }}</text>
  136. </view>
  137. <view class="page_item_info" style="padding: 0;" v-if="infoDATA.workOrderRemark !== undefined">
  138. <view class="page_item_foot_text">
  139. <view class="text1">工单备注</view>
  140. <view class="text2" style="float: none;word-break: break-all;">{{ infoDATA.workOrderRemark }}</view>
  141. </view>
  142. </view>
  143. <view class="page_item_foot_text" v-if="
  144. infoDATA.taskType.associationType.value == 'inspect' ||
  145. infoDATA.taskType.associationType.value == 'patientTransport'
  146. ">
  147. <text class="text1">携带设备</text>
  148. <text class="text2">{{ infoDATA.goods || "暂无" }}</text>
  149. </view>
  150. <view class="page_item_foot_text" v-if="
  151. infoDATA.taskType.associationType.value == 'inspect' ||
  152. infoDATA.taskType.associationType.value == 'patientTransport'
  153. ">
  154. <text class="text1">患者姓名</text>
  155. <text class="text2">{{ infoDATA.patient.patientName }}({{
  156. infoDATA.patient.patientCode
  157. }})</text>
  158. </view>
  159. <view class="page_item_foot_text" v-if="
  160. (infoDATA.taskType.associationType.value == 'inspect' ||
  161. infoDATA.taskType.associationType.value == 'patientTransport')&&infoDATA.patient.careLevel
  162. ">
  163. <text class="text1">{{infoDATA.patient.careLevel.desc}}</text>
  164. <text class="text2"
  165. :class="[(infoDATA.patient.careLevel.value==0||infoDATA.patient.careLevel.value==1)?'red':'green']">{{infoDATA.patient.careLevel.name}}</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.illnessState
  170. ">
  171. <text class="text1">{{infoDATA.patient.illnessState.desc}}</text>
  172. <text class="text2"
  173. :class="{red:infoDATA.patient.illnessState.value==2||infoDATA.patient.illnessState.value==3}">{{infoDATA.patient.illnessState.name}}</text>
  174. </view>
  175. <view class="page_item_foot_text"
  176. v-if="
  177. (infoDATA.taskType.associationType.value == 'inspect' ||
  178. infoDATA.taskType.associationType.value == 'patientTransport')&&(infoDATA.isAccompany===1||infoDATA.isAccompany===0)">
  179. <text class="text1">陪同情况</text>
  180. <text class="text2"
  181. :class="{red:infoDATA.isAccompany===1}">{{ infoDATA.isAccompany===1?'需要医护陪同':'无需医护陪同'}}</text>
  182. </view>
  183. </view>
  184. <!-- 药包 -->
  185. <view class="page_item_info" v-if="infoDATA.taskType.associationType.value == 'drugsBag'">
  186. <text class="page_item_info_title">药包编码</text>
  187. <text class="text">{{ infoDATA.drugs?infoDATA.drugs.packid:'无' }}</text>
  188. </view>
  189. <!-- 标本 -->
  190. <view class="page_item_info" v-if="
  191. infoDATA.taskType.associationType.value == 'specimen' ||
  192. infoDATA.taskType.associationType.value == 'specimenPlan'
  193. ">
  194. <view>
  195. <text class="page_item_info_title">标本信息</text>
  196. <text class="text">
  197. 预计标本总数
  198. <text class="page_item_info_txt">{{
  199. infoDATA.expectReceiveNum || 0
  200. }}</text>
  201. </text>
  202. </view>
  203. <view v-for="spe in infoDATA.specimenSet" :key="spe.id" class="spe_list">
  204. <view>
  205. <text class="page_item_info_title">标本类型</text>
  206. <text class="text">{{ spe.stype ? spe.stype.name : "-" }}({{
  207. spe.urgent == 1 ? "急" : "普"
  208. }})</text>
  209. </view>
  210. <view>
  211. <text class="page_item_info_title">标本编码</text>
  212. <text class="text">{{ spe.scode }}</text>
  213. </view>
  214. <view>
  215. <text class="page_item_info_title">患者姓名</text>
  216. <text class="text">{{ spe.patientName }}<text v-if="spe.bedNum">({{spe.bedNum}})</text></text>
  217. </view>
  218. <view>
  219. <text class="page_item_info_title">目标科室</text>
  220. <text class="text">{{
  221. spe.checkDept ? spe.checkDept.dept : "-"
  222. }}</text>
  223. </view>
  224. </view>
  225. </view>
  226. <!-- 静配 -->
  227. <view class="page_item_info" v-if="infoDATA.taskType.associationType.value == 'jPBag'">
  228. <text class="page_item_info_title">药包编码</text>
  229. <text class="text">{{ infoDATA.staticDistri?infoDATA.staticDistri.packid:'无' }}</text>
  230. </view>
  231. <!-- 陪检 -->
  232. <view v-if="infoDATA.taskType.associationType.value == 'inspect'">
  233. <view class="page_item_info">
  234. <text class="page_item_info_title">检查信息</text>
  235. </view>
  236. <view id="infos" :animation="animationData">
  237. <view class="page_item_infos" v-for="(item, index) of infoDATA.checkList" :key="index">
  238. <view class="page_item_info2">
  239. <view class="page_item_foot_text">
  240. <text class="text1">检查科室</text>
  241. <text class="text2">{{ item.execDept?item.execDept.dept:'-' }}</text>
  242. </view>
  243. <view class="page_item_foot_text">
  244. <text class="text1">检查项</text>
  245. <text class="text2">{{ item.inspectName||'-' }}</text>
  246. </view>
  247. <view class="page_item_foot_text">
  248. <text class="text1">叫号信息</text>
  249. <text class="text2">{{ item.reservationNumber||'-' }}</text>
  250. </view>
  251. <view class="page_item_foot_text">
  252. <text class="text1">预约时间</text>
  253. <text class="text2">{{ item.yyTime || "-" }}</text>
  254. </view>
  255. <view class="page_item_foot_text"
  256. v-show="item.inspectState.value==1||item.inspectState.value==2||item.inspectState.value==4">
  257. <view class="btn" @click.stop="remove(item)">移除</view>
  258. </view>
  259. </view>
  260. </view>
  261. </view>
  262. <view id="pulldown" @click="show('show')" v-if="showType == 'hiddle'">
  263. 点击可查看检查详情
  264. <text class="cubeic-pulldown icon_transport transport-paixujiantouxia"></text>
  265. </view>
  266. <view id="pullup" @click="show('hiddle')" v-if="showType == 'show'">
  267. 点击可收起检查详情
  268. <text class="cubeic-pullup icon_transport transport-paixujiantoushang"></text>
  269. </view>
  270. </view>
  271. </view>
  272. <view class="foot_btn2">
  273. <view class="btn2" @click="showAlert" v-if="infoDATA.gdState.value == 2">抢单</view>
  274. <!-- 如果不是静配,药配,标本配送,标本轮巡 -->
  275. <template
  276. v-if="((!infoDATA.worker)||(infoDATA.worker&&infoDATA.worker.id == currentUserId))&&infoDATA.gdState.value != 6&&infoDATA.gdState.value != 7&&infoDATA.gdState.value != 11">
  277. <view :class="[infoDATA.taskType.specialCloseButton == 1 ? 'btn3' : 'btn2']" @click="Scan_ss(infoDATA)" v-if="
  278. infoDATA.gdState.value != 2 &&
  279. infoDATA.taskType.associationType.value != 'jPBag' &&
  280. infoDATA.taskType.associationType.value != 'drugsBag' &&
  281. infoDATA.taskType.associationType.value != 'specimen' &&
  282. infoDATA.taskType.associationType.value != 'specimenPlan'
  283. " hover-class="seimin-btn-hover">扫一扫</view>
  284. <view :class="[infoDATA.taskType.specialCloseButton == 1 ? 'btn3' : 'btn2']" @click="photograph(infoDATA)" v-if="
  285. infoDATA.gdState.value != 2 &&
  286. infoDATA.taskType.associationType.value != 'jPBag' &&
  287. infoDATA.taskType.associationType.value != 'drugsBag' &&
  288. infoDATA.taskType.associationType.value != 'specimen' &&
  289. infoDATA.taskType.associationType.value != 'specimenPlan' &&
  290. infoDATA.taskType.associationType.value != 'other' &&
  291. infoDATA.gdState.value == 4
  292. " hover-class="seimin-btn-hover">拍照</view>
  293. <view class="btn3" @click="specialCloseClick()" v-if="
  294. infoDATA.gdState.value != 2 &&
  295. infoDATA.taskType.associationType.value != 'jPBag' &&
  296. infoDATA.taskType.associationType.value != 'drugsBag' &&
  297. infoDATA.taskType.associationType.value != 'specimen' &&
  298. infoDATA.taskType.associationType.value != 'specimenPlan' &&
  299. infoDATA.taskType.specialCloseButton == 1
  300. " hover-class="seimin-btn-hover">特殊情况关闭</view>
  301. </template>
  302. <!-- 如果不是患者陪检或患者转运或其他 -->
  303. <view :class="[infoDATA.taskType.specialCloseButton == 1 ? 'btn3' : 'btn2']" @click="Scan_s(infoDATA)" v-if="
  304. infoDATA.gdState.value != 2 &&
  305. infoDATA.taskType.associationType.value != 'patientTransport' &&
  306. infoDATA.taskType.associationType.value != 'inspect' &&
  307. infoDATA.taskType.associationType.value != 'other'
  308. " hover-class="seimin-btn-hover">扫一扫</view>
  309. <view class="btn3" @click="specialCloseClick()" v-if="
  310. infoDATA.gdState.value != 2 &&
  311. infoDATA.taskType.associationType.value != 'patientTransport' &&
  312. infoDATA.taskType.associationType.value != 'inspect' &&
  313. infoDATA.taskType.associationType.value != 'other' &&
  314. infoDATA.taskType.specialCloseButton == 1
  315. " hover-class="seimin-btn-hover">特殊情况关闭</view>
  316. </view>
  317. <!-- 弹窗 -->
  318. <showModel :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content"
  319. @know="know" :operate="models.operate" @ok="ok" @cancel="cancel" :textareaFlag="textareaFlag"
  320. @textareaInput="textareaInput"></showModel>
  321. <!-- 弹窗 -->
  322. <showModel :title="models1.title" :icon="models1.icon" :disjunctor="models1.disjunctor" :content="models1.content"
  323. @know="know1" :operate="models1.operate" @ok="ok1" @cancel="cancel1"></showModel>
  324. </view>
  325. </template>
  326. <script>
  327. import showModel from "../../components/showModel/showModel.vue";
  328. import {
  329. get,
  330. post,
  331. SM,
  332. webHandle
  333. } from "../../http/http.js";
  334. import {
  335. photographTool
  336. } from "../../tools/photograph.js";
  337. export default {
  338. data() {
  339. return {
  340. currentUserId: 0,
  341. // 弹窗model
  342. models: {
  343. disjunctor: false,
  344. },
  345. // 弹窗model1
  346. models1: {
  347. disjunctor: false,
  348. },
  349. currentInspect: null,
  350. showType: "show",
  351. infoDATA: {},
  352. dataId: "",
  353. animationData: {},
  354. // 特殊情况关闭原因开关
  355. textareaFlag: false,
  356. textareaText: "",
  357. };
  358. },
  359. methods: {
  360. // 移除检查->知道了
  361. know1() {
  362. this.models1.disjunctor = false;
  363. // this.getInfo(this.dataId);
  364. //baba
  365. uni.navigateTo({
  366. url: '../receiptpage/receiptpage',
  367. });
  368. },
  369. // 移除检查->确定
  370. ok1() {
  371. this.models1.disjunctor = false;
  372. let postData = {
  373. gdId: this.infoDATA.id,
  374. inspectId: this.currentInspect.id,
  375. };
  376. uni.showLoading({
  377. title: '移除中',
  378. mask: true,
  379. })
  380. post('/workerOrder/removeInspectByOderId', postData).then(res => {
  381. uni.hideLoading();
  382. if (res.state == 200) {
  383. this.models1 = {
  384. disjunctor: true,
  385. content: "移除成功",
  386. };
  387. } else {
  388. uni.showToast({
  389. icon: "none",
  390. title: "移除失败",
  391. });
  392. }
  393. })
  394. },
  395. // 移除检查->取消
  396. cancel1() {
  397. this.models1.disjunctor = false;
  398. },
  399. // 移除
  400. remove(item) {
  401. this.currentInspect = item;
  402. this.models1 = {
  403. disjunctor: true,
  404. content: "是否移除该检查信息",
  405. icon: "warn",
  406. operate: {
  407. ok: "确定",
  408. cancel: "取消",
  409. },
  410. };
  411. },
  412. // 拍照
  413. photograph(data) {
  414. photographTool(data);
  415. },
  416. // 特殊情况输入文字
  417. textareaInput(value) {
  418. this.textareaText = value;
  419. if (value.trim().length >= 10) {
  420. this.models.operate = {
  421. ok: "确定",
  422. cancel: "取消",
  423. };
  424. } else {
  425. this.models.operate = {
  426. cancel: "取消",
  427. };
  428. }
  429. },
  430. // 特殊情况关闭按钮
  431. specialCloseClick() {
  432. this.textareaFlag = true;
  433. this.models = {
  434. title: "特殊情况关闭",
  435. disjunctor: true,
  436. content: "",
  437. icon: "",
  438. operate: {
  439. cancel: "取消",
  440. },
  441. };
  442. },
  443. ok() {
  444. uni.showLoading({
  445. title: "加载中",
  446. mask: true,
  447. });
  448. post("/workerOrder/specialCaseClose", {
  449. workOrderId: this.dataId,
  450. reason: this.textareaText.trim(),
  451. }).then((result) => {
  452. this.models.disjunctor = false;
  453. this.textareaFlag = false;
  454. this.textareaText = "";
  455. if (result.state == 200) {
  456. setTimeout(() => {
  457. uni.hideLoading();
  458. this.models = {
  459. disjunctor: true,
  460. content: "工单关闭成功",
  461. icon: "success",
  462. operate: {
  463. know: "知道了",
  464. },
  465. };
  466. }, 100);
  467. } else {
  468. setTimeout(() => {
  469. uni.hideLoading();
  470. this.models = {
  471. disjunctor: true,
  472. content: "工单关闭失败",
  473. icon: "error",
  474. operate: {
  475. know: "知道了",
  476. },
  477. };
  478. }, 100);
  479. }
  480. });
  481. },
  482. cancel() {
  483. this.models.disjunctor = false;
  484. this.textareaFlag = false;
  485. this.textareaText = "";
  486. },
  487. // 点击可查看检查详情
  488. show(type) {
  489. this.showType = type;
  490. if (type === "show") {
  491. //展开
  492. // 计算高度
  493. const query = uni.createSelectorQuery().in(this);
  494. query
  495. .selectAll(".page_item_infos")
  496. .boundingClientRect((data) => {
  497. let len = data.reduce((prev, current) => {
  498. return prev + current.height;
  499. }, 0);
  500. this.animation.height(len).step();
  501. this.animationData = this.animation.export();
  502. })
  503. .exec();
  504. } else if (type === "hiddle") {
  505. this.animation.height(0).step();
  506. this.animationData = this.animation.export();
  507. }
  508. },
  509. // 如果不是静配,药配,标本配送,标本轮巡
  510. // 扫码
  511. Scan_ss(data) {
  512. let isKs = 0;
  513. let ids = [];
  514. let id = data.id;
  515. ids.push(id);
  516. let list = {
  517. code: "",
  518. ids: ids,
  519. };
  520. let code = "";
  521. let type = "";
  522. SM().then((ress1) => {
  523. uni.showLoading({
  524. title: "加载中",
  525. mask: true,
  526. });
  527. //检验二维码的有效性
  528. post("/dept/scanning", {
  529. content: ress1,
  530. }).then((result) => {
  531. if (result.state == 200 || result.state == 201) {
  532. let ress = result.code;
  533. if (ress) {
  534. if (
  535. data.gdState.value == "4" &&
  536. data.taskType.associationType.value == "inspect"
  537. ) {
  538. list.code = ress; //其他
  539. type = "handleIns";
  540. }
  541. if (
  542. (data.taskType.associationType.value == "other" &&
  543. data.gdState.value == "4") ||
  544. data.gdState.value == "5"
  545. ) {
  546. code = ress; //其他=终点
  547. type = "orderSign/" + code;
  548. list = ids;
  549. isKs = 1;
  550. }
  551. if (
  552. (data.gdState.value == "5" &&
  553. data.taskType.associationType.value == "inspect") ||
  554. data.taskType.associationType.value == "patientTransport"
  555. ) {
  556. code = ress; //患者转运--起点
  557. type = "orderSign/" + code;
  558. list = ids;
  559. isKs = 1;
  560. }
  561. if (data.gdState.value == "8") {
  562. code = ress; //患者陪检--检查
  563. type = "orderSign/" + code;
  564. list = ids;
  565. isKs = 1;
  566. }
  567. if (
  568. data.gdState.value == "4" &&
  569. data.taskType.associationType.value == "patientTransport"
  570. ) {
  571. list = {
  572. code: ress, //患者转运--检查
  573. ids: ids,
  574. };
  575. type = "handleTrans";
  576. }
  577. post("/workerOrder/" + type, list).then((res) => {
  578. uni.hideLoading();
  579. if (res) {
  580. if (res.status == 200) {
  581. if (
  582. data.gdState.value == "4" &&
  583. data.taskType.associationType.value == "other"
  584. ) {
  585. uni.navigateTo({
  586. url: `../scanning_code/scanning_code?type=${data.taskType.associationType.value}&type1=${res.type}&id=${data.id}&deptCode=${code}&dept=${res.dept}`,
  587. });
  588. }
  589. if (
  590. data.gdState.value == "4" &&
  591. data.taskType.associationType.value != "other"
  592. ) {
  593. uni.navigateTo({
  594. url: `../scanning_Result/scanning_Result?type=${
  595. data.taskType.associationType.value
  596. }&type1=${res.type}&id=${data.id}&deptCode=${
  597. list.code
  598. }&patient=${res.patient}&patientCode=${
  599. res.patientCode
  600. }&deptName=${res.deptName}&bedNum=${
  601. res.bedNum
  602. }&status=${res.status}&msg=${
  603. res.msg
  604. }&model=${encodeURIComponent(JSON.stringify(res))}`,
  605. });
  606. }
  607. if (data.gdState.value == "8") {
  608. uni.navigateTo({
  609. url: `../scanning_code/scanning_code?type=${data.taskType.associationType.value}&type1=${res.type}&id=${data.id}&deptCode=${code}&dept=${res.dept}`,
  610. });
  611. }
  612. if (data.gdState.value == "5") {
  613. uni.navigateTo({
  614. url: `../scanning_code/scanning_code?type=${data.taskType.associationType.value}&type1=${res.type}&id=${data.id}&deptCode=${code}&dept=${res.dept}`,
  615. });
  616. }
  617. } else {
  618. if (res.type == "trans-ddd-1") {
  619. //起点科室扫描腕带码失败
  620. uni.navigateTo({
  621. url: `../scanning_Result/scanning_Result?type=${data.taskType.associationType.value}&type1=${res.type}&id=${data.id}&status=600&msg=${res.msg}`,
  622. });
  623. } else {
  624. uni.navigateTo({
  625. url: `../scanning_Result/scanning_Result?type=${
  626. data.taskType.associationType.value
  627. }&type1=${res.type}&id=${data.id}&status=600&msg=${
  628. res.msg
  629. }&isKs=${isKs}&model=${encodeURIComponent(
  630. JSON.stringify(res)
  631. )}`,
  632. });
  633. }
  634. }
  635. } else {
  636. uni.navigateTo({
  637. url: `../scanning_Result/scanning_Result?id=${data.id}&status=600&msg=扫码失败!请扫描正确的二维码!&isKs=${isKs}`,
  638. });
  639. }
  640. });
  641. }
  642. } else {
  643. uni.hideLoading();
  644. uni.showToast({
  645. icon: "none",
  646. title: "请求失败!",
  647. });
  648. }
  649. });
  650. });
  651. },
  652. // 如果不是患者陪检或患者转运或其他
  653. // 扫码
  654. Scan_s(data) {
  655. let ids = [];
  656. let id = data.id;
  657. ids.push(id);
  658. let code = "";
  659. SM().then((ress1) => {
  660. uni.showLoading({
  661. title: "加载中",
  662. mask: true,
  663. });
  664. //检验二维码的有效性
  665. post("/dept/scanning", {
  666. content: ress1,
  667. }).then((result) => {
  668. if (result.state == 200 || result.state == 201) {
  669. let ress = result.code;
  670. if (ress) {
  671. code = ress;
  672. // 科室签到
  673. post("/workerOrder/orderSign/" + code, ids).then((res) => {
  674. uni.hideLoading();
  675. if (res.status == 200) {
  676. // 跳转到扫描科室
  677. // type1: res.type, //type类型
  678. // id: data.id, //工单ID
  679. // deptCode: code, //二维码
  680. // dept: res.dept //科室名称
  681. uni.navigateTo({
  682. url: `../scanning_code/scanning_code?type=${data.taskType.associationType.value}&type1=${res.type}&id=${data.id}&deptCode=${code}&dept=${res.dept}`,
  683. });
  684. } else {
  685. uni.navigateTo({
  686. url: `../scanning_Result/scanning_Result?type=${data.taskType.associationType.value}&type1=${res.type}&id=${data.id}&status=600&msg=${res.msg}&isKs=1`,
  687. });
  688. }
  689. });
  690. }
  691. } else {
  692. uni.hideLoading();
  693. uni.showToast({
  694. icon: "none",
  695. title: "请求失败!",
  696. });
  697. }
  698. });
  699. });
  700. },
  701. // 抢单->知道了
  702. know() {
  703. this.models.disjunctor = false;
  704. uni.navigateTo({
  705. url: "../receiptpage/receiptpage",
  706. });
  707. },
  708. // 抢单
  709. showAlert() {
  710. get("/workerOrder/takeOrder/" + this.infoDATA.id).then((res) => {
  711. if (res.status == 200) {
  712. this.models = {
  713. disjunctor: true,
  714. content: "接单成功",
  715. icon: "success",
  716. operate: {
  717. know: "知道了",
  718. },
  719. };
  720. } else {
  721. uni.showToast({
  722. icon: "none",
  723. title: "请求失败!",
  724. });
  725. }
  726. });
  727. },
  728. // 请求详细页面的数据
  729. getInfo(id) {
  730. uni.showLoading({
  731. title: "加载中",
  732. mask: true,
  733. });
  734. get("/api/fetchData/workOrder/" + id).then((res) => {
  735. uni.hideLoading();
  736. if (res.status == 200) {
  737. this.infoDATA = res.data;
  738. // 计算高度
  739. setTimeout(() => {
  740. const query = uni.createSelectorQuery().in(this);
  741. query
  742. .selectAll(".page_item_infos")
  743. .boundingClientRect((data) => {
  744. let len = data.reduce((prev, current) => {
  745. return prev + current.height;
  746. }, 0);
  747. this.animation.height(len).step();
  748. this.animationData = this.animation.export();
  749. })
  750. .exec();
  751. }, 500)
  752. } else {
  753. uni.showToast({
  754. icon: "none",
  755. title: "请求失败!",
  756. });
  757. }
  758. });
  759. },
  760. },
  761. onLoad(options) {
  762. this.currentUserId = uni.getStorageSync('userData').user.id;
  763. let id = options.id;
  764. this.dataId = id;
  765. this.getInfo(id);
  766. // 创建动画
  767. this.animation = uni.createAnimation({
  768. duration: 500,
  769. timingFunction: "ease",
  770. });
  771. // #ifdef APP-PLUS
  772. webHandle("no", "app");
  773. // #endif
  774. // #ifdef H5
  775. webHandle("no", "wx");
  776. // #endif
  777. },
  778. onUnload() {
  779. // 页面关闭后清空数据
  780. this.animationData = {};
  781. },
  782. };
  783. </script>
  784. <style lang="less">
  785. .Receipt_infopage {
  786. padding: 0 20rpx;
  787. overflow: hidden;
  788. .red {
  789. color: red !important;
  790. font-weight: bold !important;
  791. }
  792. .green {
  793. color: #49b856 !important;
  794. font-weight: bold !important;
  795. }
  796. .title {
  797. font-size: 48rpx;
  798. margin-top: 24rpx;
  799. margin-bottom: 24rpx;
  800. text-align: center;
  801. }
  802. .page_item {
  803. margin-top: 16rpx;
  804. margin-bottom: 124rpx;
  805. background: #fff;
  806. border-radius: 8rpx;
  807. padding: 0 16rpx;
  808. border: 2rpx solid #e5e9ed;
  809. .L {
  810. width: 40rpx;
  811. height: 40rpx;
  812. border-radius: 50%;
  813. background: #f9fafb;
  814. position: relative;
  815. left: -50rpx;
  816. top: 66rpx;
  817. }
  818. .R {
  819. width: 40rpx;
  820. height: 40rpx;
  821. border-radius: 50%;
  822. background: #f9fafb;
  823. position: relative;
  824. float: right;
  825. right: -50rpx;
  826. top: 26rpx;
  827. }
  828. .starting {
  829. width: 50rpx;
  830. height: 50rpx;
  831. color: #fff;
  832. background: #49b856;
  833. display: inline-block;
  834. border-radius: 50%;
  835. text-align: center;
  836. line-height: 46rpx;
  837. font-size: 32rpx;
  838. margin-right: 6rpx;
  839. }
  840. .End {
  841. width: 50rpx;
  842. height: 50rpx;
  843. color: #fff;
  844. background: #39b199;
  845. display: inline-block;
  846. border-radius: 50%;
  847. text-align: center;
  848. line-height: 46rpx;
  849. font-size: 32rpx;
  850. margin-right: 6rpx;
  851. }
  852. .page_item_top {
  853. height: 86rpx;
  854. border-bottom: 2rpx dashed #666;
  855. padding: 0 16rpx;
  856. .page_item_top_L {
  857. height: 100%;
  858. float: left;
  859. line-height: 88rpx;
  860. .emergencys {
  861. background: #ff3b53 !important;
  862. width: 124rpx !important;
  863. }
  864. .emergency {
  865. background: #ff3b53 !important;
  866. }
  867. .emergency1 {
  868. background: #49b856 !important;
  869. }
  870. .page_item_cont_start {
  871. text-align: center;
  872. height: 44rpx;
  873. width: 104rpx;
  874. line-height: 44rpx;
  875. border-radius: 8rpx;
  876. background: #49b856;
  877. color: #fff;
  878. display: inline-block;
  879. font-size: 28rpx;
  880. .cubeic-star {
  881. margin-right: 8rpx;
  882. }
  883. }
  884. .L_time {
  885. color: #6cc076;
  886. font-size: 32rpx;
  887. }
  888. .L_text {
  889. font-size: 32rpx;
  890. display: inline-block;
  891. font-weight: 700;
  892. margin-right: 16rpx;
  893. }
  894. }
  895. .page_item_top_R {
  896. height: 60rpx;
  897. float: right;
  898. padding-top: 20rpx;
  899. font-size: 32rpx;
  900. position: absolute;
  901. right: 50rpx;
  902. .L_iocn {
  903. display: inline-block;
  904. height: 52rpx;
  905. line-height: 48rpx;
  906. color: rgb(7, 134, 60);
  907. font-size: 36rpx;
  908. font-weight: 700;
  909. }
  910. }
  911. }
  912. .page_item_cont {
  913. min-height: 180rpx;
  914. // max-height: 424rpx;
  915. padding: 0 16rpx;
  916. text-align: left;
  917. position: relative;
  918. .text_big {
  919. font-size: 32rpx;
  920. position: absolute;
  921. right: 16rpx;
  922. font-weight: 700;
  923. margin-top: 10rpx;
  924. }
  925. .text_big2 {
  926. font-size: 32rpx;
  927. position: absolute;
  928. right: 16rpx;
  929. font-weight: 700;
  930. }
  931. .line {
  932. height: 20rpx;
  933. width: 2rpx;
  934. border-left: 2rpx solid #666;
  935. position: absolute;
  936. top: 82rpx;
  937. left: 40rpx;
  938. }
  939. .lines {
  940. height: 40%;
  941. width: 2rpx;
  942. border-left: 2rpx solid #666;
  943. position: absolute;
  944. top: 23%;
  945. left: 36rpx;
  946. }
  947. .page_item_cont_T {
  948. padding-top: 28rpx;
  949. font-size: 28rpx;
  950. .page_item_cont_title {
  951. height: 100%;
  952. font-size: 32rpx;
  953. }
  954. }
  955. .page_item_cont_B {
  956. padding-top: 28rpx;
  957. margin-bottom: 28rpx;
  958. .page_item_cont_title {
  959. height: 60rpx;
  960. font-size: 32rpx;
  961. }
  962. .page_item_cont_title1 {
  963. height: 60rpx;
  964. line-height: 60rpx;
  965. font-size: 32rpx;
  966. padding-left: 64rpx;
  967. }
  968. }
  969. }
  970. .page_item_foot {
  971. border-top: 2rpx dashed #666;
  972. border-bottom: 2rpx dashed #666;
  973. padding: 28rpx 16rpx;
  974. text-align: left;
  975. .page_item_foot_text {
  976. font-size: 32rpx;
  977. margin-bottom: 20rpx;
  978. .text1 {
  979. color: rgb(102, 102, 102);
  980. }
  981. .text2 {
  982. float: right;
  983. font-weight: 700;
  984. }
  985. }
  986. }
  987. .page_item_info {
  988. padding: 20rpx 16rpx;
  989. text-align: left;
  990. line-height: 60rpx;
  991. font-size: 32rpx;
  992. .spe_list {
  993. padding: 32rpx 0;
  994. border-top: 2rpx solid #666;
  995. .page_item_info_title {
  996. color: #666;
  997. }
  998. }
  999. .page_item_info_title {
  1000. font-weight: 700;
  1001. }
  1002. .text {
  1003. float: right;
  1004. font-weight: 700;
  1005. .page_item_info_txt {
  1006. color: #49b856;
  1007. margin-left: 8rpx;
  1008. }
  1009. }
  1010. }
  1011. #infos {
  1012. height: 0;
  1013. overflow: hidden;
  1014. }
  1015. .page_item_infos {
  1016. padding-top: 20rpx;
  1017. padding-bottom: 20rpx;
  1018. border-bottom: 2rpx dashed #666;
  1019. .page_item_info2 {
  1020. text-align: left;
  1021. line-height: 60rpx;
  1022. font-size: 32rpx;
  1023. padding-left: 16rpx;
  1024. .page_item_foot_text {
  1025. font-size: 32rpx;
  1026. margin-bottom: 20rpx;
  1027. &:last-of-type {
  1028. margin-bottom: 0;
  1029. }
  1030. .text1 {
  1031. color: rgb(102, 102, 102);
  1032. }
  1033. .text2 {
  1034. float: right;
  1035. font-weight: 700;
  1036. }
  1037. .btn {
  1038. height: 66rpx;
  1039. width: 132rpx;
  1040. margin: 0 auto;
  1041. background-color: #49b856;
  1042. color: #fff;
  1043. border-radius: 8rpx;
  1044. font-size: 32rpx;
  1045. margin-top: 20rpx;
  1046. text-align: center;
  1047. }
  1048. }
  1049. }
  1050. }
  1051. #pulldown {
  1052. color: #49b856;
  1053. font-size: 36rpx;
  1054. height: 60rpx;
  1055. text-align: center;
  1056. .cubeic-pulldown {
  1057. font-size: 48rpx;
  1058. position: relative;
  1059. bottom: 6rpx;
  1060. }
  1061. }
  1062. #pullup {
  1063. color: #49b856;
  1064. font-size: 36rpx;
  1065. height: 60rpx;
  1066. text-align: center;
  1067. .cubeic-pullup {
  1068. font-size: 48rpx;
  1069. position: relative;
  1070. top: 12rpx;
  1071. }
  1072. }
  1073. }
  1074. .foot_btn2 {
  1075. position: fixed;
  1076. bottom: 0;
  1077. right: 20rpx;
  1078. left: 20rpx;
  1079. line-height: 66rpx;
  1080. height: 100rpx;
  1081. border-top: 2rpx solid #e5e9ed;
  1082. background: #f9fafb;
  1083. display: flex;
  1084. justify-content: space-between;
  1085. .btn2 {
  1086. height: 66rpx;
  1087. width: 100%;
  1088. margin: 0 1%;
  1089. background-image: linear-gradient(to right, #72c172, #3bb197);
  1090. color: #fff;
  1091. border-radius: 8rpx;
  1092. font-size: 32rpx;
  1093. margin-top: 16rpx;
  1094. text-align: center;
  1095. }
  1096. .btn3 {
  1097. height: 66rpx;
  1098. width: 48%;
  1099. margin: 0 1%;
  1100. background-image: linear-gradient(to right, #72c172, #3bb197);
  1101. color: #fff;
  1102. border-radius: 8rpx;
  1103. font-size: 32rpx;
  1104. margin-top: 16rpx;
  1105. text-align: center;
  1106. }
  1107. }
  1108. }
  1109. </style>