orderDetail.vue 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936
  1. <template>
  2. <view class="orderDetail">
  3. <!-- 头部 -->
  4. <view class="orderDetail_header">
  5. <view class="orderDetail_header_item" v-for="tab in tabs" :key="tab.id" :class="{active:tab.id === selectedTab}"
  6. @click="debouncedChangeTab(tab.id)">
  7. {{tab.name}}
  8. </view>
  9. </view>
  10. <!-- tab -->
  11. <!-- 工单信息 -->
  12. <view class="orderDetail_info" v-if="selectedTab === 1">
  13. <scroll-view scroll-y class="orderDetail_infoItem" v-if="orderInfo.id">
  14. <view class="orderDetail_infoItem_header">
  15. <view class="orderDetail_infoItem_header_title">
  16. <view class="icon"></view>
  17. <view class="taskNameAndWorkerName">
  18. <text class="taskName"
  19. v-if="orderInfo.taskType">{{orderInfo.isHalfInspect === 1? "半程陪检": orderInfo.taskType.taskName}}</text>
  20. </view>
  21. </view>
  22. <text class="orderDetail_infoItem_header_more">{{orderInfo.gdcode}}</text>
  23. </view>
  24. <view class="orderDetail_infoItem_item">
  25. <view class="orderDetail_infoItem_item_content">
  26. <text class="orderDetail_infoItem_item_name">状态</text>
  27. <text class="orderDetail_infoItem_item_value" v-if="orderInfo.gdState">{{orderInfo.gdState.name}}</text>
  28. </view>
  29. <view class="orderDetail_infoItem_item_content">
  30. <text class="orderDetail_infoItem_item_name">工单日期</text>
  31. <text class="orderDetail_infoItem_item_value">{{orderInfo.startTime || '暂无'}}</text>
  32. </view>
  33. <view class="orderDetail_infoItem_item_content">
  34. <text class="orderDetail_infoItem_item_name">总耗时</text>
  35. <text class="orderDetail_infoItem_item_value">{{orderInfo.showTimeNum || '暂无'}}</text>
  36. </view>
  37. <view class="orderDetail_infoItem_item_content">
  38. <text class="orderDetail_infoItem_item_name">申请科室</text>
  39. <text class="orderDetail_infoItem_item_value"
  40. v-if="orderInfo.createDeptDTO">{{deptDisplay==2?orderInfo.createDeptDTO.deptalias:orderInfo.createDeptDTO.dept}}</text>
  41. <text v-else>暂无</text>
  42. </view>
  43. <view class="orderDetail_infoItem_item_content">
  44. <text class="orderDetail_infoItem_item_name">起点科室</text>
  45. <text class="orderDetail_infoItem_item_value"
  46. v-if="orderInfo.startDept">{{deptDisplay==2?orderInfo.startDept.deptalias:orderInfo.startDept.dept}}</text>
  47. <text v-else>暂无</text>
  48. </view>
  49. <view class="orderDetail_infoItem_item_content"
  50. v-if="orderInfo.taskType.associationType.value === ASSOCIATION_TYPES['患者陪检业务']||orderInfo.taskType.associationType.value === ASSOCIATION_TYPES['患者其他服务业务']">
  51. <text class="orderDetail_infoItem_item_name">中间科室</text>
  52. <text class="orderDetail_infoItem_item_value">{{orderInfo.middleDept || '暂无'}}</text>
  53. </view>
  54. <view class="orderDetail_infoItem_item_content">
  55. <text class="orderDetail_infoItem_item_name">目标科室</text>
  56. <text class="orderDetail_infoItem_item_value">{{orderInfo.endDepts}}</text>
  57. </view>
  58. <view class="orderDetail_infoItem_item_content">
  59. <text class="orderDetail_infoItem_item_name">支助人员</text>
  60. <text class="orderDetail_infoItem_item_value">{{orderInfo.worker?orderInfo.worker.name:'暂无'}}</text>
  61. </view>
  62. <view class="orderDetail_infoItem_item_content">
  63. <text class="orderDetail_infoItem_item_name">联系电话</text>
  64. <text class="orderDetail_infoItem_item_value">{{orderInfo.worker?orderInfo.worker.phone:'暂无'}}</text>
  65. </view>
  66. <view class="orderDetail_infoItem_item_content"
  67. v-if="orderInfo.taskType.associationType.value === ASSOCIATION_TYPES['患者陪检业务']||orderInfo.taskType.associationType.value === ASSOCIATION_TYPES['患者其他服务业务']">
  68. <text class="orderDetail_infoItem_item_name">陪同情况</text>
  69. <text class="orderDetail_infoItem_item_value">{{orderInfo.isAccompany==1?'需要医护陪同':'无需医护陪同'}}</text>
  70. </view>
  71. <view class="orderDetail_infoItem_item_content"
  72. v-if="orderInfo.taskType.associationType.value === ASSOCIATION_TYPES['患者陪检业务']||orderInfo.taskType.associationType.value === ASSOCIATION_TYPES['患者其他服务业务']">
  73. <text class="orderDetail_infoItem_item_name">预约时间</text>
  74. <text class="orderDetail_infoItem_item_value"
  75. v-if="orderInfo.yyjdTime">{{orderInfo.yyjdTime|formatDate('MM-dd HH:mm')}}</text>
  76. <text class="orderDetail_infoItem_item_value" v-else>暂无</text>
  77. </view>
  78. <view class="orderDetail_infoItem_item_content"
  79. v-if="orderInfo.taskType.associationType.value === ASSOCIATION_TYPES['患者陪检业务']">
  80. <text class="orderDetail_infoItem_item_name">是否半程陪检</text>
  81. <text class="orderDetail_infoItem_item_value">{{orderInfo.isHalfInspect===1?'是':'否'}}</text>
  82. </view>
  83. <view class="orderDetail_infoItem_item_content"
  84. v-if="orderInfo.drugs && orderInfo.taskType.associationType.value === ASSOCIATION_TYPES['药品配送业务']">
  85. <text class="orderDetail_infoItem_item_name">药包编码</text>
  86. <text class="orderDetail_infoItem_item_value">{{orderInfo.drugs.packid || '暂无'}}</text>
  87. </view>
  88. <view class="orderDetail_infoItem_item_content"
  89. v-if="orderInfo.staticDistri && orderInfo.taskType.associationType.value === ASSOCIATION_TYPES['静配配送']">
  90. <text class="orderDetail_infoItem_item_name">药包编码</text>
  91. <text class="orderDetail_infoItem_item_value">{{orderInfo.staticDistri.packid || '暂无'}}</text>
  92. </view>
  93. <view class="orderDetail_infoItem_item_content"
  94. v-if="orderInfo.taskType.associationType.value === ASSOCIATION_TYPES['临时标本业务'] || orderInfo.taskType.associationType.value === ASSOCIATION_TYPES['标本轮巡业务']">
  95. <text class="orderDetail_infoItem_item_name">预计接收</text>
  96. <text class="orderDetail_infoItem_item_value">{{orderInfo.expectReceiveNum||'暂无'}}</text>
  97. </view>
  98. <view class="orderDetail_infoItem_item_content"
  99. v-if="orderInfo.taskType.associationType.value === ASSOCIATION_TYPES['临时标本业务'] || orderInfo.taskType.associationType.value === ASSOCIATION_TYPES['标本轮巡业务']">
  100. <text class="orderDetail_infoItem_item_name">实际接收</text>
  101. <text class="orderDetail_infoItem_item_value">{{orderInfo.actualReceiveNum||'暂无'}}</text>
  102. </view>
  103. <view class="orderDetail_infoItem_item_content">
  104. <text class="orderDetail_infoItem_item_name">是否加急</text>
  105. <text class="orderDetail_infoItem_item_value" v-if="orderInfo.emergencyType">
  106. {{(orderInfo.emergencyType.value == 2 || orderInfo.emergencyType.value == 3)?'是':'否'}}
  107. </text>
  108. </view>
  109. <view class="orderDetail_infoItem_item_content"
  110. v-if="orderInfo.workOrderRemark && (orderInfo.taskType.associationType.value === ASSOCIATION_TYPES['临时标本业务']||orderInfo.taskType.associationType.value === ASSOCIATION_TYPES['标本轮巡业务']||orderInfo.taskType.associationType.value === ASSOCIATION_TYPES['其他临床服务'])">
  111. <text class="orderDetail_infoItem_item_name">备注信息</text>
  112. <text class="orderDetail_infoItem_item_value">{{orderInfo.workOrderRemark||'暂无'}}</text>
  113. </view>
  114. <view class="orderDetail_infoItem_item_content" v-if="orderInfo.specialCloseReason">
  115. <text class="orderDetail_infoItem_item_name">特殊情况关闭原因</text>
  116. <text class="orderDetail_infoItem_item_value">{{orderInfo.specialCloseReason||'暂无'}}</text>
  117. </view>
  118. </view>
  119. </scroll-view>
  120. </view>
  121. <!-- 流程信息 -->
  122. <view class="orderDetail_info" v-if="selectedTab === 2">
  123. <scroll-view scroll-y class="orderDetail_infoItem" v-if="logList.length">
  124. <view class="orderDetail_infoItem_header">
  125. <view class="orderDetail_infoItem_header_title">
  126. <view class="icon"></view>
  127. <view class="taskNameAndWorkerName">
  128. <text class="taskName">流程信息</text>
  129. </view>
  130. </view>
  131. </view>
  132. <view class="orderDetail_infoItem_item process">
  133. <view class="orderDetail_process_item" v-for="(step,i) in logList" :key="i">
  134. <view class="step_infoStart">
  135. <view class="step_name">{{step.operationName}}</view>
  136. <view class="step_time" v-if="step.record && step.record[0]">
  137. {{step.record[0].operationTime|formatDate('MM-dd HH:mm')}}
  138. </view>
  139. </view>
  140. <view class="step_icon pda pda-icon_liucheng"
  141. :class="{'active':(step.record&&step.record[0]&&step.record[0].operationTime)}"></view>
  142. <view class="step_infoEnd">
  143. <view class="step_overtime" v-if="i!=0&&step.record&&step.record.length">
  144. 耗时{{filterTime(step.record)}}
  145. </view>
  146. <view class="step_dept" v-if="step.record&&step.record.length&&step.record[0]&&step.record[0].dept">
  147. <text v-for="(dept,index) in step.record"
  148. :key="index">{{dept?(deptDisplay == 2?dept.deptalias:dept.dept)+',':''}}</text>
  149. </view>
  150. </view>
  151. </view>
  152. </view>
  153. </scroll-view>
  154. </view>
  155. <!-- 业务信息 -->
  156. <view class="orderDetail_info" v-if="selectedTab === 3">
  157. <scroll-view scroll-y class="orderDetail_infoItem" v-if="orderInfo.id">
  158. <view class="orderDetail_infoItem_header">
  159. <view class="orderDetail_infoItem_header_title">
  160. <view class="icon"></view>
  161. <view class="taskNameAndWorkerName">
  162. <text class="taskName">业务信息</text>
  163. </view>
  164. </view>
  165. </view>
  166. <!-- 检查信息 -->
  167. <view class="orderDetail_infoItem_item business business_inspect"
  168. v-if="orderInfo.taskType&&(orderInfo.taskType.associationType.value==ASSOCIATION_TYPES['患者陪检业务'] || orderInfo.taskType.associationType.value==ASSOCIATION_TYPES['患者其他服务业务'])">
  169. <!-- 患者信息 -->
  170. <view class="inspect_info" v-if="orderInfo.patient">
  171. <view class="inspect_info_block">
  172. <view class="inspect_info_left">
  173. <block v-if="orderInfo.patient.illnessState">
  174. <view class="inspect_info_icon red" v-if="orderInfo.patient.illnessState.value === '2'">危</view>
  175. <view class="inspect_info_icon red" v-else-if="orderInfo.patient.illnessState.value === '3'">重</view>
  176. </block>
  177. <block v-if="orderInfo.patient.careLevel">
  178. <view class="inspect_info_icon red" v-if="orderInfo.patient.careLevel.value === '0'">特</view>
  179. <view class="inspect_info_icon red" v-else-if="orderInfo.patient.careLevel.value === '1'">1</view>
  180. <view class="inspect_info_icon green" v-else-if="orderInfo.patient.careLevel.value === '2'">2</view>
  181. <view class="inspect_info_icon green" v-else-if="orderInfo.patient.careLevel.value === '3'">3</view>
  182. </block>
  183. <view class="inspect_info_name">{{orderInfo.patient.patientName}}</view>
  184. </view>
  185. <view class="inspect_info_right">
  186. {{orderInfo.patient.bedNum}}床
  187. </view>
  188. </view>
  189. <view class="inspect_info_block">
  190. <view class="inspect_info_left">
  191. {{orderInfo.patient.patientCode}}
  192. </view>
  193. <view class="inspect_info_right"
  194. v-if="orderInfo.taskType.associationType.value==ASSOCIATION_TYPES['患者陪检业务']">
  195. 待检{{orderInfo.checkList.length}}
  196. </view>
  197. </view>
  198. </view>
  199. <!-- 检查信息 -->
  200. <block
  201. v-if="orderInfo.taskType.associationType.value==ASSOCIATION_TYPES['患者陪检业务']&&orderInfo.checkList.length">
  202. <view class="inspect_item" v-for="item in orderInfo.checkList" :key="item.id"
  203. @click="toDetail(item.id,'inspect')">
  204. <view class="inspect_item_name">
  205. {{item.inspectName||'暂无'}}
  206. </view>
  207. <view class="inspect_item_info">
  208. <view class="inspect_item_dept">
  209. {{item.execDept?(deptDisplay==2?item.execDept.deptalias:item.execDept.dept):'暂无'}}
  210. </view>
  211. <view class="inspect_item_number">
  212. 叫号信息 {{item.reservationNumber || '暂无'}}
  213. </view>
  214. </view>
  215. <view class="inspect_item_yytime">
  216. 预约时间{{item.yyTime || '暂无'}}
  217. </view>
  218. </view>
  219. </block>
  220. </view>
  221. <!-- 标本信息 -->
  222. <view class="orderDetail_infoItem_item business business_specimen"
  223. v-show="orderInfo.taskType&&(orderInfo.taskType.associationType.value==ASSOCIATION_TYPES['临时标本业务'] || orderInfo.taskType.associationType.value==ASSOCIATION_TYPES['标本轮巡业务'])">
  224. <view class="inspect_specimen">
  225. <uni-table stripe emptyText="暂无更多数据">
  226. <!-- 表头行 -->
  227. <uni-tr class="th">
  228. <uni-th align="center" width="68">标本类型</uni-th>
  229. <uni-th align="center" width="71">标本编码</uni-th>
  230. <uni-th align="center" width="66">状态</uni-th>
  231. <uni-th align="center" width="71">科室</uni-th>
  232. </uni-tr>
  233. <!-- 表格数据行 -->
  234. <uni-tr v-for="data in orderInfo.specimenSet" :key="data.id"
  235. @click.native="toDetail(data.id,'specimen',data.scode)">
  236. <uni-td align="center">{{data.stype?data.stype.name:'暂无'}}</uni-td>
  237. <uni-td align="center">{{data.scode || '暂无'}}</uni-td>
  238. <uni-td align="center">{{data.speState?data.speState.name:'暂无'}}</uni-td>
  239. <uni-td align="center" class="td" v-if="data.checkDept">
  240. {{deptDisplay==2?data.checkDept.deptalias:data.checkDept.dept}}
  241. <image class="urgent" v-if="data.urgent == 1" src="../../static/imgs/icon_ji.png" mode="widthFix">
  242. </image>
  243. </uni-td>
  244. <uni-td align="center" class="td" v-else>
  245. 暂无
  246. <image class="urgent" v-if="data.urgent == 1" src="../../static/imgs/icon_ji.png" mode="widthFix">
  247. </image>
  248. </uni-td>
  249. </uni-tr>
  250. </uni-table>
  251. </view>
  252. </view>
  253. <!-- 药品信息 -->
  254. <view class="orderDetail_infoItem_item business business_drugsBag"
  255. v-show="orderInfo.taskType&&(orderInfo.taskType.associationType.value==ASSOCIATION_TYPES['药品配送业务'] || orderInfo.taskType.associationType.value==ASSOCIATION_TYPES['静配配送'])">
  256. <!-- 检查信息 -->
  257. <block v-if="orderInfo.drugs&&orderInfo.taskType.associationType.value==ASSOCIATION_TYPES['药品配送业务']">
  258. <view class="drugsBag_item">
  259. <view class="drugsBag_item_name">
  260. 发药单号
  261. </view>
  262. <view class="drugsBag_item_value">
  263. {{orderInfo.drugs.packid || '暂无'}}
  264. </view>
  265. </view>
  266. <view class="drugsBag_item">
  267. <view class="drugsBag_item_name">
  268. 发药科室
  269. </view>
  270. <view class="drugsBag_item_value">
  271. {{orderInfo.drugs.launch?(deptDisplay == 2?orderInfo.drugs.launch.deptalias:orderInfo.drugs.launch.dept):'暂无'}}
  272. </view>
  273. </view>
  274. <view class="drugsBag_item">
  275. <view class="drugsBag_item_name">
  276. 状态
  277. </view>
  278. <view class="drugsBag_item_value">
  279. {{orderInfo.drugs.drugsState?orderInfo.drugs.drugsState.name:'暂无'}}
  280. </view>
  281. </view>
  282. </block>
  283. <block v-if="orderInfo.staticDistri&&orderInfo.taskType.associationType.value==ASSOCIATION_TYPES['静配配送']">
  284. <view class="drugsBag_item">
  285. <view class="drugsBag_item_name">
  286. 发药单号
  287. </view>
  288. <view class="drugsBag_item_value">
  289. {{orderInfo.staticDistri.packid || '暂无'}}
  290. </view>
  291. </view>
  292. <view class="drugsBag_item">
  293. <view class="drugsBag_item_name">
  294. 发药科室
  295. </view>
  296. <view class="drugsBag_item_value">
  297. {{orderInfo.staticDistri.launch?(deptDisplay == 2?orderInfo.staticDistri.launch.deptalias:orderInfo.staticDistri.launch.dept):'暂无'}}
  298. </view>
  299. </view>
  300. <view class="drugsBag_item">
  301. <view class="drugsBag_item_name">
  302. 状态
  303. </view>
  304. <view class="drugsBag_item_value">
  305. {{orderInfo.staticDistri.drugsState?orderInfo.staticDistri.drugsState.name:'暂无'}}
  306. </view>
  307. </view>
  308. </block>
  309. </view>
  310. </scroll-view>
  311. </view>
  312. <!-- 底部 -->
  313. <seiminFooterBtn :btns="btns"></seiminFooterBtn>
  314. <seiminModel ref="seiminModel"></seiminModel>
  315. </view>
  316. </template>
  317. <script>
  318. import {
  319. debounce
  320. } from 'lodash/function';
  321. import {
  322. reqFetchData,
  323. reqFetchWorkOrderLog,
  324. } from "../../request/api.js";
  325. import {
  326. mapState
  327. } from "vuex";
  328. import {
  329. GDSTATE
  330. } from "../../utils/enum.gdstate.js";
  331. import {
  332. ASSOCIATION_TYPES
  333. } from "../../utils/enum.association_types.js";
  334. import {
  335. showAppraise,
  336. openRecallModal,
  337. openExecModal,
  338. showJiaji,
  339. } from "../../utils/index.js";
  340. export default {
  341. data() {
  342. return {
  343. debouncedChangeTab: null,
  344. // 路由传参
  345. queryParams: {},
  346. // 关联类型
  347. ASSOCIATION_TYPES,
  348. // 选项卡
  349. tabs: [{
  350. id: 1,
  351. name: '工单信息'
  352. },
  353. {
  354. id: 2,
  355. name: '流程信息'
  356. },
  357. {
  358. id: 3,
  359. name: '业务信息'
  360. },
  361. ],
  362. // 当前选中的tab
  363. selectedTab: 1,
  364. // 工单信息
  365. orderInfo: {},
  366. // 流程信息
  367. logList: [],
  368. //底部按钮
  369. btns: [],
  370. };
  371. },
  372. computed: {
  373. ...mapState('other', ["deptDisplay"]),
  374. },
  375. methods: {
  376. init(queryParams) {
  377. this.queryParams = queryParams;
  378. this.changeTab(1);
  379. },
  380. // 跳转详情
  381. toDetail(id, associationType, scode) {
  382. if (scode) {
  383. uni.navigateTo({
  384. url: `/pages/detail/detail?id=${id}&associationType=${associationType}&scode=${scode}`
  385. })
  386. } else {
  387. uni.navigateTo({
  388. url: `/pages/detail/detail?id=${id}&associationType=${associationType}`
  389. })
  390. }
  391. },
  392. // 格式化时分秒
  393. // (时间小于一分钟则显示秒,时间大于一分钟则显示分钟数,如超出一小时则显示小时和分钟。)time单位:秒
  394. formatTime(time) {
  395. let timeStr = "";
  396. if (time >= 0 && time < 60) {
  397. // 秒
  398. timeStr = time + "秒";
  399. } else if (time >= 60 && time < 3600) {
  400. // 分钟
  401. timeStr = Math.floor(time / 60) + "分钟";
  402. } else if (time >= 3600) {
  403. // 时 + 分
  404. let h = "";
  405. let m = "";
  406. h = Math.floor(time / 3600) + "小时";
  407. m = time % 3600 >= 60 ? Math.floor((time % 3600) / 60) + "分钟" : "";
  408. timeStr = h + m;
  409. }
  410. return timeStr;
  411. },
  412. // 计算流程信息耗时
  413. filterTime(step) {
  414. let num = 0;
  415. step.forEach((e) => {
  416. num += e.difTime;
  417. });
  418. return this.formatTime(num / 1000);
  419. },
  420. // 切换tab
  421. changeTab(id) {
  422. this.selectedTab = id;
  423. switch (id) {
  424. case 1:
  425. this.getInfo(this.queryParams);
  426. break;
  427. case 2:
  428. this.getProcess(this.queryParams);
  429. break;
  430. case 3:
  431. break;
  432. }
  433. },
  434. //获取工单信息数据
  435. getInfo(queryParams) {
  436. uni.showLoading({
  437. mask: true,
  438. title: '加载中',
  439. })
  440. reqFetchData('api', 'workOrder', queryParams.id).then(res => {
  441. uni.hideLoading();
  442. if (res.status == 200) {
  443. // 检查科室处理
  444. if (res.data.middleDept) {
  445. //有检查科室的话
  446. res.data.middleDept = res.data.middleDept.map(v => {
  447. return this.deptDisplay == 2 ? v.deptalias : v.dept;
  448. }).toString();
  449. }
  450. // 终点科室处理
  451. res.data.endDepts = res.data.endDepts.map(v => {
  452. return this.deptDisplay == 2 ? v.deptalias : v.dept;
  453. }).toString();
  454. // 工单信息
  455. res.data.checkList = res.data.checkList || [];
  456. res.data.specimenSet = res.data.specimenSet || [];
  457. this.orderInfo = res.data || {};
  458. //底部按钮处理
  459. let btns = [{
  460. name: "回到列表",
  461. type: "default",
  462. click: () => {
  463. uni.navigateTo({
  464. url: "/pages/orderList/orderList",
  465. });
  466. },
  467. }];
  468. let newOrder = this.orderInfo;
  469. if (newOrder.gdState.value == GDSTATE['待抢单'] ||
  470. newOrder.gdState.value == GDSTATE['待接单'] ||
  471. newOrder.gdState.value == GDSTATE['待到达'] ||
  472. newOrder.gdState.value == GDSTATE['定时预约'] ||
  473. newOrder.gdState.value == GDSTATE['待评价']) {
  474. if (newOrder.gdState.value == GDSTATE['待评价']) {
  475. //评价按钮
  476. btns.push({
  477. name: "评价",
  478. type: "primary",
  479. click: () => {
  480. showAppraise.call(this, newOrder.id, () => {
  481. this.$refs.seiminModel.close();
  482. uni.navigateTo({
  483. url: "/pages/orderList/orderList",
  484. });
  485. });
  486. },
  487. })
  488. }
  489. if (newOrder.gdState.value == GDSTATE['待抢单'] ||
  490. newOrder.gdState.value == GDSTATE['待接单'] ||
  491. newOrder.gdState.value == GDSTATE['待到达'] ||
  492. newOrder.gdState.value == GDSTATE['定时预约']) {
  493. //撤销按钮
  494. btns.push({
  495. name: "撤销",
  496. type: "primary",
  497. click: () => {
  498. openRecallModal.call(this, newOrder.id, () => {
  499. this.$refs.seiminModel.close();
  500. uni.navigateTo({
  501. url: "/pages/orderList/orderList",
  502. });
  503. });
  504. },
  505. })
  506. }
  507. if (newOrder.gdState.value == GDSTATE['定时预约']) {
  508. //立即执行按钮
  509. btns.push({
  510. name: "立即执行",
  511. type: "primary",
  512. click: () => {
  513. openExecModal.call(this, newOrder.id, () => {
  514. this.$refs.seiminModel.close();
  515. uni.navigateTo({
  516. url: "/pages/orderList/orderList",
  517. });
  518. });
  519. },
  520. })
  521. }
  522. if ((newOrder.gdState.value == GDSTATE['待抢单'] ||
  523. newOrder.gdState.value == GDSTATE['待到达']) &&
  524. newOrder.taskType.allowUrgent == 1 &&
  525. !newOrder.urgentDetails) {
  526. //加急按钮
  527. btns.push({
  528. name: "加急",
  529. type: "primary",
  530. click: () => {
  531. console.log(newOrder)
  532. showJiaji.call(this, newOrder.id, () => {
  533. this.$refs.seiminModel.close();
  534. uni.navigateTo({
  535. url: "/pages/orderList/orderList",
  536. });
  537. });
  538. },
  539. })
  540. }
  541. }
  542. // 按钮赋值
  543. this.btns = btns;
  544. } else {
  545. this.btns = [{
  546. name: "回到列表",
  547. type: "default",
  548. click: () => {
  549. uni.navigateTo({
  550. url: "/pages/orderList/orderList",
  551. });
  552. },
  553. }, ];
  554. this.$refs.seiminModel.show({
  555. skin: 'toast',
  556. icon: 'error',
  557. content: '请求失败',
  558. })
  559. }
  560. })
  561. },
  562. //获取流程信息数据
  563. getProcess(queryParams) {
  564. uni.showLoading({
  565. mask: true,
  566. title: '加载中',
  567. })
  568. reqFetchWorkOrderLog(queryParams.id).then(res => {
  569. uni.hideLoading();
  570. if (res.status == 200) {
  571. // 流程信息
  572. this.logList = res.data || [];
  573. } else {
  574. this.$refs.seiminModel.show({
  575. skin: 'toast',
  576. icon: 'error',
  577. content: '请求失败',
  578. })
  579. }
  580. })
  581. },
  582. },
  583. onLoad(queryParams) {
  584. console.log(queryParams);
  585. this.init(queryParams);
  586. },
  587. created() {
  588. this.debouncedChangeTab = debounce(this.changeTab, 166);
  589. },
  590. beforeDestroy() {
  591. this.debouncedChangeTab.cancel()
  592. }
  593. }
  594. </script>
  595. <style lang="scss" scoped>
  596. .orderDetail {
  597. // padding-bottom: 108rpx;
  598. // 头部
  599. .orderDetail_header {
  600. position: fixed;
  601. z-index: 98;
  602. width: 100%;
  603. height: 88rpx;
  604. background-color: #fff;
  605. color: #333;
  606. @include flex;
  607. .orderDetail_header_item {
  608. flex: 1;
  609. font-size: 32rpx;
  610. @include border(right);
  611. @include border(bottom);
  612. @include flex(center, center);
  613. &:last-of-type {
  614. border-right: none;
  615. }
  616. &.active {
  617. color: $defaultColor;
  618. border-bottom: 4rpx solid $defaultColor;
  619. }
  620. }
  621. }
  622. // tab
  623. // 工单详情
  624. .orderDetail_info {
  625. padding: 108rpx 24rpx;
  626. .orderDetail_infoItem {
  627. width: 702rpx;
  628. height: 80vh;
  629. background-color: #fff;
  630. margin-top: 8rpx;
  631. border-radius: 8rpx;
  632. position: relative;
  633. padding: 0 24rpx 24rpx;
  634. font-size: 32rpx;
  635. @include border;
  636. @include semicircle(#f9fafb, 82rpx);
  637. @include flex(flex-start, stretch, column);
  638. .ji,
  639. .jiaji {
  640. width: 60rpx;
  641. position: absolute;
  642. right: 0;
  643. top: 0;
  644. }
  645. .orderDetail_infoItem_header {
  646. height: 86rpx;
  647. @include border($directive:bottom, $style:dashed);
  648. @include flex(space-between, center);
  649. .orderDetail_infoItem_header_title {
  650. color: #333;
  651. flex: 1;
  652. @include flex(flex-start, center);
  653. .icon {
  654. width: 10rpx;
  655. height: 46rpx;
  656. border-radius: 2rpx;
  657. background-color: #F0F6ED;
  658. @include btn_background;
  659. }
  660. .taskNameAndWorkerName {
  661. flex: 1;
  662. @include flex;
  663. .taskName {
  664. max-width: 10em;
  665. margin-left: 8rpx;
  666. font-size: 38rpx;
  667. font-weight: bold;
  668. @include clamp;
  669. }
  670. }
  671. }
  672. .orderDetail_infoItem_header_more {
  673. color: #333;
  674. font-weight: bold;
  675. font-size: 38rpx;
  676. @include clamp;
  677. }
  678. }
  679. .orderDetail_infoItem_item {
  680. padding-top: 12rpx;
  681. padding-bottom: 12rpx;
  682. color: #333;
  683. font-size: 30rpx;
  684. flex: 1;
  685. @include border(bottom);
  686. @include flex(flex-start, stretch, column);
  687. &.process {
  688. padding-top: 90rpx;
  689. padding-bottom: 90rpx;
  690. }
  691. &:last-of-type {
  692. border-bottom: none;
  693. }
  694. // 工单信息
  695. .orderDetail_infoItem_item_content {
  696. margin-top: 20rpx;
  697. @include flex(space-between, stretch);
  698. .orderDetail_infoItem_item_name {
  699. font-size: 34rpx;
  700. color: #666;
  701. max-width: 4em;
  702. }
  703. .orderDetail_infoItem_item_value {
  704. font-size: 38rpx;
  705. color: #333;
  706. font-weight: bold;
  707. max-width: 420rpx;
  708. text-align: justify;
  709. word-break: break-all;
  710. }
  711. }
  712. // 流程信息
  713. .orderDetail_process_item {
  714. min-height: 120rpx;
  715. line-height: 50rpx;
  716. color: #333;
  717. @include flex(center);
  718. &:last-of-type {
  719. .step_icon {
  720. &::after {
  721. display: none;
  722. }
  723. }
  724. }
  725. .step_infoStart {
  726. font-size: 28rpx;
  727. flex: 1;
  728. @include flex(flex-end);
  729. .step_time {
  730. margin-left: 16rpx;
  731. }
  732. }
  733. .step_icon {
  734. font-size: 38rpx;
  735. margin-left: 30rpx;
  736. margin-right: 30rpx;
  737. position: relative;
  738. color: #E5E9ED;
  739. &.active {
  740. color: #07863C;
  741. }
  742. &::after {
  743. content: '';
  744. position: absolute;
  745. top: 60rpx;
  746. left: 18rpx;
  747. width: 1px;
  748. height: calc(100% - 70rpx);
  749. background-color: #DDE1E5;
  750. }
  751. }
  752. .step_infoEnd {
  753. font-size: 34rpx;
  754. flex: 1;
  755. padding-bottom: 16rpx;
  756. }
  757. }
  758. // 业务信息-检查
  759. &.business_inspect {
  760. .inspect_info {
  761. font-size: 34rpx;
  762. color: #333;
  763. padding-top: 20rpx;
  764. padding-bottom: 20rpx;
  765. @include border($directive:bottom, $style:dashed);
  766. .inspect_info_block {
  767. height: 60rpx;
  768. @include flex(space-between, center);
  769. .inspect_info_left {
  770. @include flex;
  771. .inspect_info_icon {
  772. width: 50rpx;
  773. height: 50rpx;
  774. line-height: 50rpx;
  775. border-radius: 50%;
  776. font-size: 28rpx;
  777. margin-right: 8rpx;
  778. @include flex(center, center);
  779. &.green {
  780. color: $defaultColor;
  781. border: 1px solid $defaultColor;
  782. background-color: rgba(73, 184, 86, 0.1);
  783. }
  784. &.red {
  785. color: #FF3B53;
  786. border: 1px solid #FF3B53;
  787. background-color: #FFE8EB;
  788. }
  789. }
  790. .inspect_info_name {
  791. font-weight: bold;
  792. }
  793. }
  794. .inspect_info_right {
  795. font-weight: bold;
  796. }
  797. }
  798. }
  799. .inspect_item {
  800. color: #333;
  801. font-size: 34rpx;
  802. line-height: 48rpx;
  803. padding-top: 26rpx;
  804. padding-bottom: 26rpx;
  805. @include border($directive:bottom, $style:dashed);
  806. .inspect_item_name {
  807. font-weight: bold;
  808. }
  809. .inspect_item_yytime {
  810. font-weight: bold;
  811. }
  812. .inspect_item_info {
  813. margin-top: 16rpx;
  814. margin-bottom: 16rpx;
  815. @include flex(space-between, center);
  816. .inspect_item_dept {
  817. flex: 1;
  818. word-break: break-all;
  819. @include clamp;
  820. }
  821. .inspect_item_number {
  822. flex: 1;
  823. text-align: right;
  824. word-break: break-all;
  825. @include clamp;
  826. }
  827. }
  828. }
  829. }
  830. // 业务信息-标本
  831. &.business_specimen {
  832. font-size: 34rpx;
  833. .th {
  834. background-color: red;
  835. @include btn_background;
  836. th {
  837. color: #fff;
  838. }
  839. }
  840. .td {
  841. position: relative;
  842. .urgent {
  843. width: 60rpx;
  844. position: absolute !important;
  845. right: 0;
  846. top: 0;
  847. }
  848. }
  849. .table--border {
  850. border: none;
  851. }
  852. ::v-deep .uni-table {
  853. min-width: 0;
  854. }
  855. ::v-deep .uni-table-td {
  856. word-break: break-all;
  857. }
  858. }
  859. // 业务信息-药品
  860. &.business_drugsBag {
  861. .drugsBag_item {
  862. color: #333;
  863. font-size: 34rpx;
  864. margin-top: 20rpx;
  865. @include flex(space-between, center);
  866. .drugsBag_item_name {}
  867. .drugsBag_item_value {
  868. font-weight: bold;
  869. }
  870. }
  871. }
  872. }
  873. }
  874. }
  875. }
  876. </style>