receipt_infopage.vue 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161
  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==3||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. },
  365. // 移除检查->确定
  366. ok1() {
  367. this.models1.disjunctor = false;
  368. let postData = {
  369. gdId: this.infoDATA.id,
  370. inspectId: this.currentInspect.id,
  371. };
  372. uni.showLoading({
  373. title: '移除中',
  374. mask: true,
  375. })
  376. post('/workerOrder/removeInspectByOderId', postData).then(res => {
  377. uni.hideLoading();
  378. if (res.state == 200) {
  379. this.models1 = {
  380. disjunctor: true,
  381. content: "移除成功",
  382. };
  383. } else {
  384. uni.showToast({
  385. icon: "none",
  386. title: "移除失败",
  387. });
  388. }
  389. })
  390. },
  391. // 移除检查->取消
  392. cancel1() {
  393. this.models1.disjunctor = false;
  394. },
  395. // 移除
  396. remove(item) {
  397. this.currentInspect = item;
  398. this.models1 = {
  399. disjunctor: true,
  400. content: "是否移除该检查信息",
  401. icon: "warn",
  402. operate: {
  403. ok: "确定",
  404. cancel: "取消",
  405. },
  406. };
  407. },
  408. // 拍照
  409. photograph(data) {
  410. photographTool(data);
  411. },
  412. // 特殊情况输入文字
  413. textareaInput(value) {
  414. this.textareaText = value;
  415. if (value.trim().length >= 10) {
  416. this.models.operate = {
  417. ok: "确定",
  418. cancel: "取消",
  419. };
  420. } else {
  421. this.models.operate = {
  422. cancel: "取消",
  423. };
  424. }
  425. },
  426. // 特殊情况关闭按钮
  427. specialCloseClick() {
  428. this.textareaFlag = true;
  429. this.models = {
  430. title: "特殊情况关闭",
  431. disjunctor: true,
  432. content: "",
  433. icon: "",
  434. operate: {
  435. cancel: "取消",
  436. },
  437. };
  438. },
  439. ok() {
  440. uni.showLoading({
  441. title: "加载中",
  442. mask: true,
  443. });
  444. post("/workerOrder/specialCaseClose", {
  445. workOrderId: this.dataId,
  446. reason: this.textareaText.trim(),
  447. }).then((result) => {
  448. this.models.disjunctor = false;
  449. this.textareaFlag = false;
  450. this.textareaText = "";
  451. if (result.state == 200) {
  452. setTimeout(() => {
  453. uni.hideLoading();
  454. this.models = {
  455. disjunctor: true,
  456. content: "工单关闭成功",
  457. icon: "success",
  458. operate: {
  459. know: "知道了",
  460. },
  461. };
  462. }, 100);
  463. } else {
  464. setTimeout(() => {
  465. uni.hideLoading();
  466. this.models = {
  467. disjunctor: true,
  468. content: "工单关闭失败",
  469. icon: "error",
  470. operate: {
  471. know: "知道了",
  472. },
  473. };
  474. }, 100);
  475. }
  476. });
  477. },
  478. cancel() {
  479. this.models.disjunctor = false;
  480. this.textareaFlag = false;
  481. this.textareaText = "";
  482. },
  483. // 点击可查看检查详情
  484. show(type) {
  485. this.showType = type;
  486. if (type === "show") {
  487. //展开
  488. // 计算高度
  489. const query = uni.createSelectorQuery().in(this);
  490. query
  491. .selectAll(".page_item_infos")
  492. .boundingClientRect((data) => {
  493. let len = data.reduce((prev, current) => {
  494. return prev + current.height;
  495. }, 0);
  496. this.animation.height(len).step();
  497. this.animationData = this.animation.export();
  498. })
  499. .exec();
  500. } else if (type === "hiddle") {
  501. this.animation.height(0).step();
  502. this.animationData = this.animation.export();
  503. }
  504. },
  505. // 如果不是静配,药配,标本配送,标本轮巡
  506. // 扫码
  507. Scan_ss(data) {
  508. let isKs = 0;
  509. let ids = [];
  510. let id = data.id;
  511. ids.push(id);
  512. let list = {
  513. code: "",
  514. ids: ids,
  515. };
  516. let code = "";
  517. let type = "";
  518. SM().then((ress1) => {
  519. uni.showLoading({
  520. title: "加载中",
  521. mask: true,
  522. });
  523. //检验二维码的有效性
  524. post("/dept/scanning", {
  525. content: ress1,
  526. }).then((result) => {
  527. if (result.state == 200 || result.state == 201) {
  528. let ress = result.code;
  529. if (ress) {
  530. if (
  531. data.gdState.value == "4" &&
  532. data.taskType.associationType.value == "inspect"
  533. ) {
  534. list.code = ress; //其他
  535. type = "handleIns";
  536. }
  537. if (
  538. (data.taskType.associationType.value == "other" &&
  539. data.gdState.value == "4") ||
  540. data.gdState.value == "5"
  541. ) {
  542. code = ress; //其他=终点
  543. type = "orderSign/" + code;
  544. list = ids;
  545. isKs = 1;
  546. }
  547. if (
  548. (data.gdState.value == "5" &&
  549. data.taskType.associationType.value == "inspect") ||
  550. data.taskType.associationType.value == "patientTransport"
  551. ) {
  552. code = ress; //患者转运--起点
  553. type = "orderSign/" + code;
  554. list = ids;
  555. isKs = 1;
  556. }
  557. if (data.gdState.value == "8") {
  558. code = ress; //患者陪检--检查
  559. type = "orderSign/" + code;
  560. list = ids;
  561. isKs = 1;
  562. }
  563. if (
  564. data.gdState.value == "4" &&
  565. data.taskType.associationType.value == "patientTransport"
  566. ) {
  567. list = {
  568. code: ress, //患者转运--检查
  569. ids: ids,
  570. };
  571. type = "handleTrans";
  572. }
  573. post("/workerOrder/" + type, list).then((res) => {
  574. uni.hideLoading();
  575. if (res) {
  576. if (res.status == 200) {
  577. if (
  578. data.gdState.value == "4" &&
  579. data.taskType.associationType.value == "other"
  580. ) {
  581. uni.navigateTo({
  582. url: `../scanning_code/scanning_code?type=${data.taskType.associationType.value}&type1=${res.type}&id=${data.id}&deptCode=${code}&dept=${res.dept}`,
  583. });
  584. }
  585. if (
  586. data.gdState.value == "4" &&
  587. data.taskType.associationType.value != "other"
  588. ) {
  589. uni.navigateTo({
  590. url: `../scanning_Result/scanning_Result?type=${
  591. data.taskType.associationType.value
  592. }&type1=${res.type}&id=${data.id}&deptCode=${
  593. list.code
  594. }&patient=${res.patient}&patientCode=${
  595. res.patientCode
  596. }&deptName=${res.deptName}&bedNum=${
  597. res.bedNum
  598. }&status=${res.status}&msg=${
  599. res.msg
  600. }&model=${encodeURIComponent(JSON.stringify(res))}`,
  601. });
  602. }
  603. if (data.gdState.value == "8") {
  604. uni.navigateTo({
  605. url: `../scanning_code/scanning_code?type=${data.taskType.associationType.value}&type1=${res.type}&id=${data.id}&deptCode=${code}&dept=${res.dept}`,
  606. });
  607. }
  608. if (data.gdState.value == "5") {
  609. uni.navigateTo({
  610. url: `../scanning_code/scanning_code?type=${data.taskType.associationType.value}&type1=${res.type}&id=${data.id}&deptCode=${code}&dept=${res.dept}`,
  611. });
  612. }
  613. } else {
  614. if (res.type == "trans-ddd-1") {
  615. //起点科室扫描腕带码失败
  616. uni.navigateTo({
  617. url: `../scanning_Result/scanning_Result?type=${data.taskType.associationType.value}&type1=${res.type}&id=${data.id}&status=600&msg=${res.msg}`,
  618. });
  619. } else {
  620. uni.navigateTo({
  621. url: `../scanning_Result/scanning_Result?type=${
  622. data.taskType.associationType.value
  623. }&type1=${res.type}&id=${data.id}&status=600&msg=${
  624. res.msg
  625. }&isKs=${isKs}&model=${encodeURIComponent(
  626. JSON.stringify(res)
  627. )}`,
  628. });
  629. }
  630. }
  631. } else {
  632. uni.navigateTo({
  633. url: `../scanning_Result/scanning_Result?id=${data.id}&status=600&msg=扫码失败!请扫描正确的二维码!&isKs=${isKs}`,
  634. });
  635. }
  636. });
  637. }
  638. } else {
  639. uni.hideLoading();
  640. uni.showToast({
  641. icon: "none",
  642. title: "请求失败!",
  643. });
  644. }
  645. });
  646. });
  647. },
  648. // 如果不是患者陪检或患者转运或其他
  649. // 扫码
  650. Scan_s(data) {
  651. let ids = [];
  652. let id = data.id;
  653. ids.push(id);
  654. let code = "";
  655. SM().then((ress1) => {
  656. uni.showLoading({
  657. title: "加载中",
  658. mask: true,
  659. });
  660. //检验二维码的有效性
  661. post("/dept/scanning", {
  662. content: ress1,
  663. }).then((result) => {
  664. if (result.state == 200 || result.state == 201) {
  665. let ress = result.code;
  666. if (ress) {
  667. code = ress;
  668. // 科室签到
  669. post("/workerOrder/orderSign/" + code, ids).then((res) => {
  670. uni.hideLoading();
  671. if (res.status == 200) {
  672. // 跳转到扫描科室
  673. // type1: res.type, //type类型
  674. // id: data.id, //工单ID
  675. // deptCode: code, //二维码
  676. // dept: res.dept //科室名称
  677. uni.navigateTo({
  678. url: `../scanning_code/scanning_code?type=${data.taskType.associationType.value}&type1=${res.type}&id=${data.id}&deptCode=${code}&dept=${res.dept}`,
  679. });
  680. } else {
  681. uni.navigateTo({
  682. url: `../scanning_Result/scanning_Result?type=${data.taskType.associationType.value}&type1=${res.type}&id=${data.id}&status=600&msg=${res.msg}&isKs=1`,
  683. });
  684. }
  685. });
  686. }
  687. } else {
  688. uni.hideLoading();
  689. uni.showToast({
  690. icon: "none",
  691. title: "请求失败!",
  692. });
  693. }
  694. });
  695. });
  696. },
  697. // 抢单->知道了
  698. know() {
  699. this.models.disjunctor = false;
  700. uni.navigateTo({
  701. url: "../receiptpage/receiptpage",
  702. });
  703. },
  704. // 抢单
  705. showAlert() {
  706. get("/workerOrder/takeOrder/" + this.infoDATA.id).then((res) => {
  707. if (res.status == 200) {
  708. this.models = {
  709. disjunctor: true,
  710. content: "接单成功",
  711. icon: "success",
  712. operate: {
  713. know: "知道了",
  714. },
  715. };
  716. } else {
  717. uni.showToast({
  718. icon: "none",
  719. title: "请求失败!",
  720. });
  721. }
  722. });
  723. },
  724. // 请求详细页面的数据
  725. getInfo(id) {
  726. uni.showLoading({
  727. title: "加载中",
  728. mask: true,
  729. });
  730. get("/api/fetchData/workOrder/" + id).then((res) => {
  731. uni.hideLoading();
  732. if (res.status == 200) {
  733. this.infoDATA = res.data;
  734. // 计算高度
  735. setTimeout(() => {
  736. const query = uni.createSelectorQuery().in(this);
  737. query
  738. .selectAll(".page_item_infos")
  739. .boundingClientRect((data) => {
  740. let len = data.reduce((prev, current) => {
  741. return prev + current.height;
  742. }, 0);
  743. this.animation.height(len).step();
  744. this.animationData = this.animation.export();
  745. })
  746. .exec();
  747. }, 500)
  748. } else {
  749. uni.showToast({
  750. icon: "none",
  751. title: "请求失败!",
  752. });
  753. }
  754. });
  755. },
  756. },
  757. onLoad(options) {
  758. this.currentUserId = uni.getStorageSync('userData').user.id;
  759. let id = options.id;
  760. this.dataId = id;
  761. this.getInfo(id);
  762. // 创建动画
  763. this.animation = uni.createAnimation({
  764. duration: 500,
  765. timingFunction: "ease",
  766. });
  767. // #ifdef APP-PLUS
  768. webHandle("no", "app");
  769. // #endif
  770. // #ifdef H5
  771. webHandle("no", "wx");
  772. // #endif
  773. },
  774. onUnload() {
  775. // 页面关闭后清空数据
  776. this.animationData = {};
  777. },
  778. };
  779. </script>
  780. <style lang="less">
  781. .Receipt_infopage {
  782. padding: 0 20rpx;
  783. overflow: hidden;
  784. .red {
  785. color: red !important;
  786. font-weight: bold !important;
  787. }
  788. .green {
  789. color: #49b856 !important;
  790. font-weight: bold !important;
  791. }
  792. .title {
  793. font-size: 48rpx;
  794. margin-top: 24rpx;
  795. margin-bottom: 24rpx;
  796. text-align: center;
  797. }
  798. .page_item {
  799. margin-top: 16rpx;
  800. margin-bottom: 124rpx;
  801. background: #fff;
  802. border-radius: 8rpx;
  803. padding: 0 16rpx;
  804. border: 2rpx solid #e5e9ed;
  805. .L {
  806. width: 40rpx;
  807. height: 40rpx;
  808. border-radius: 50%;
  809. background: #f9fafb;
  810. position: relative;
  811. left: -50rpx;
  812. top: 66rpx;
  813. }
  814. .R {
  815. width: 40rpx;
  816. height: 40rpx;
  817. border-radius: 50%;
  818. background: #f9fafb;
  819. position: relative;
  820. float: right;
  821. right: -50rpx;
  822. top: 26rpx;
  823. }
  824. .starting {
  825. width: 50rpx;
  826. height: 50rpx;
  827. color: #fff;
  828. background: #49b856;
  829. display: inline-block;
  830. border-radius: 50%;
  831. text-align: center;
  832. line-height: 46rpx;
  833. font-size: 32rpx;
  834. margin-right: 6rpx;
  835. }
  836. .End {
  837. width: 50rpx;
  838. height: 50rpx;
  839. color: #fff;
  840. background: #39b199;
  841. display: inline-block;
  842. border-radius: 50%;
  843. text-align: center;
  844. line-height: 46rpx;
  845. font-size: 32rpx;
  846. margin-right: 6rpx;
  847. }
  848. .page_item_top {
  849. height: 86rpx;
  850. border-bottom: 2rpx dashed #666;
  851. padding: 0 16rpx;
  852. .page_item_top_L {
  853. height: 100%;
  854. float: left;
  855. line-height: 88rpx;
  856. .emergencys {
  857. background: #ff3b53 !important;
  858. width: 124rpx !important;
  859. }
  860. .emergency {
  861. background: #ff3b53 !important;
  862. }
  863. .emergency1 {
  864. background: #49b856 !important;
  865. }
  866. .page_item_cont_start {
  867. text-align: center;
  868. height: 44rpx;
  869. width: 104rpx;
  870. line-height: 44rpx;
  871. border-radius: 8rpx;
  872. background: #49b856;
  873. color: #fff;
  874. display: inline-block;
  875. font-size: 28rpx;
  876. .cubeic-star {
  877. margin-right: 8rpx;
  878. }
  879. }
  880. .L_time {
  881. color: #6cc076;
  882. font-size: 32rpx;
  883. }
  884. .L_text {
  885. font-size: 32rpx;
  886. display: inline-block;
  887. font-weight: 700;
  888. margin-right: 16rpx;
  889. }
  890. }
  891. .page_item_top_R {
  892. height: 60rpx;
  893. float: right;
  894. padding-top: 20rpx;
  895. font-size: 32rpx;
  896. position: absolute;
  897. right: 50rpx;
  898. .L_iocn {
  899. display: inline-block;
  900. height: 52rpx;
  901. line-height: 48rpx;
  902. color: rgb(7, 134, 60);
  903. font-size: 36rpx;
  904. font-weight: 700;
  905. }
  906. }
  907. }
  908. .page_item_cont {
  909. min-height: 180rpx;
  910. // max-height: 424rpx;
  911. padding: 0 16rpx;
  912. text-align: left;
  913. position: relative;
  914. .text_big {
  915. font-size: 32rpx;
  916. position: absolute;
  917. right: 16rpx;
  918. font-weight: 700;
  919. margin-top: 10rpx;
  920. }
  921. .text_big2 {
  922. font-size: 32rpx;
  923. position: absolute;
  924. right: 16rpx;
  925. font-weight: 700;
  926. }
  927. .line {
  928. height: 20rpx;
  929. width: 2rpx;
  930. border-left: 2rpx solid #666;
  931. position: absolute;
  932. top: 82rpx;
  933. left: 40rpx;
  934. }
  935. .lines {
  936. height: 40%;
  937. width: 2rpx;
  938. border-left: 2rpx solid #666;
  939. position: absolute;
  940. top: 23%;
  941. left: 36rpx;
  942. }
  943. .page_item_cont_T {
  944. padding-top: 28rpx;
  945. font-size: 28rpx;
  946. .page_item_cont_title {
  947. height: 100%;
  948. font-size: 32rpx;
  949. }
  950. }
  951. .page_item_cont_B {
  952. padding-top: 28rpx;
  953. margin-bottom: 28rpx;
  954. .page_item_cont_title {
  955. height: 60rpx;
  956. font-size: 32rpx;
  957. }
  958. .page_item_cont_title1 {
  959. height: 60rpx;
  960. line-height: 60rpx;
  961. font-size: 32rpx;
  962. padding-left: 64rpx;
  963. }
  964. }
  965. }
  966. .page_item_foot {
  967. border-top: 2rpx dashed #666;
  968. border-bottom: 2rpx dashed #666;
  969. padding: 28rpx 16rpx;
  970. text-align: left;
  971. .page_item_foot_text {
  972. font-size: 32rpx;
  973. margin-bottom: 20rpx;
  974. .text1 {
  975. color: rgb(102, 102, 102);
  976. }
  977. .text2 {
  978. float: right;
  979. font-weight: 700;
  980. }
  981. }
  982. }
  983. .page_item_info {
  984. padding: 20rpx 16rpx;
  985. text-align: left;
  986. line-height: 60rpx;
  987. font-size: 32rpx;
  988. .spe_list {
  989. padding: 32rpx 0;
  990. border-top: 2rpx solid #666;
  991. .page_item_info_title {
  992. color: #666;
  993. }
  994. }
  995. .page_item_info_title {
  996. font-weight: 700;
  997. }
  998. .text {
  999. float: right;
  1000. font-weight: 700;
  1001. .page_item_info_txt {
  1002. color: #49b856;
  1003. margin-left: 8rpx;
  1004. }
  1005. }
  1006. }
  1007. #infos {
  1008. height: 0;
  1009. overflow: hidden;
  1010. }
  1011. .page_item_infos {
  1012. padding-top: 20rpx;
  1013. padding-bottom: 20rpx;
  1014. border-bottom: 2rpx dashed #666;
  1015. .page_item_info2 {
  1016. text-align: left;
  1017. line-height: 60rpx;
  1018. font-size: 32rpx;
  1019. padding-left: 16rpx;
  1020. .page_item_foot_text {
  1021. font-size: 32rpx;
  1022. margin-bottom: 20rpx;
  1023. &:last-of-type {
  1024. margin-bottom: 0;
  1025. }
  1026. .text1 {
  1027. color: rgb(102, 102, 102);
  1028. }
  1029. .text2 {
  1030. float: right;
  1031. font-weight: 700;
  1032. }
  1033. .btn {
  1034. height: 66rpx;
  1035. width: 132rpx;
  1036. margin: 0 auto;
  1037. background-color: #49b856;
  1038. color: #fff;
  1039. border-radius: 8rpx;
  1040. font-size: 32rpx;
  1041. margin-top: 20rpx;
  1042. text-align: center;
  1043. }
  1044. }
  1045. }
  1046. }
  1047. #pulldown {
  1048. color: #49b856;
  1049. font-size: 36rpx;
  1050. height: 60rpx;
  1051. text-align: center;
  1052. .cubeic-pulldown {
  1053. font-size: 48rpx;
  1054. position: relative;
  1055. bottom: 6rpx;
  1056. }
  1057. }
  1058. #pullup {
  1059. color: #49b856;
  1060. font-size: 36rpx;
  1061. height: 60rpx;
  1062. text-align: center;
  1063. .cubeic-pullup {
  1064. font-size: 48rpx;
  1065. position: relative;
  1066. top: 12rpx;
  1067. }
  1068. }
  1069. }
  1070. .foot_btn2 {
  1071. position: fixed;
  1072. bottom: 0;
  1073. right: 20rpx;
  1074. left: 20rpx;
  1075. line-height: 66rpx;
  1076. height: 100rpx;
  1077. border-top: 2rpx solid #e5e9ed;
  1078. background: #f9fafb;
  1079. display: flex;
  1080. justify-content: space-between;
  1081. .btn2 {
  1082. height: 66rpx;
  1083. width: 100%;
  1084. margin: 0 1%;
  1085. background-image: linear-gradient(to right, #72c172, #3bb197);
  1086. color: #fff;
  1087. border-radius: 8rpx;
  1088. font-size: 32rpx;
  1089. margin-top: 16rpx;
  1090. text-align: center;
  1091. }
  1092. .btn3 {
  1093. height: 66rpx;
  1094. width: 48%;
  1095. margin: 0 1%;
  1096. background-image: linear-gradient(to right, #72c172, #3bb197);
  1097. color: #fff;
  1098. border-radius: 8rpx;
  1099. font-size: 32rpx;
  1100. margin-top: 16rpx;
  1101. text-align: center;
  1102. }
  1103. }
  1104. }
  1105. </style>