checkAfterBigScreen.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452
  1. <template>
  2. <view class="checkAfterScanning">
  3. <view class="checkAfterScanning_title">标本核对</view>
  4. <view class="page_item_cont">
  5. <view class="page_item_cont_T">
  6. <view class="page_item_cont_title">
  7. <view> 工单数量 </view>
  8. <view class="text_big">{{info.gdNum}}</view>
  9. </view>
  10. <view class="page_item_cont_title">
  11. <view> 标本总数 </view>
  12. <view class="text_big" @click="goToSpeDetail()"><text class="underline">{{info.total}}</text>只</view>
  13. </view>
  14. <view class="page_item_cont_title">
  15. <view class="text_title"> 临床科室 </view>
  16. <view class="text_big">{{info.LCDept}}</view>
  17. </view>
  18. <view class="page_item_cont_title2">
  19. 检验科室标本数量:
  20. </view>
  21. <view class="page_item_cont_title" v-for="(item, i) in info.data" :key="i">
  22. <template v-if="taskTypeConfig.speExpandTube == 1">
  23. <uni-collapse :border="false">
  24. <uni-collapse-item titleBorder="none" :open="taskTypeConfig.speDefaultExpandTube == 1">
  25. <template v-slot:title>
  26. <view class="page_item_cont_title_coll">
  27. <view>{{item.deptName}}</view>
  28. <view class="text_big" style="padding-right: 20rpx;" @click.stop="goToSpeDetail(item.deptName,item.deptQrCode)"><text class="underline">{{item.speCount}}</text>只</view>
  29. </view>
  30. </template>
  31. <view class="content">
  32. <view class="list" v-for="x in item.tubeTypeData" :key="x.id" @click="viewSpe(item.deptName,item.deptQrCode,x.tubeTypeId)">
  33. {{x.tubeTypeName}}:<text class="underline-item">{{x.speCount}}</text>
  34. </view>
  35. </view>
  36. </uni-collapse-item>
  37. </uni-collapse>
  38. </template>
  39. <template v-else>
  40. <view class="page_item_cont_title_coll" style="width: 100%;">
  41. <view>{{item.deptName}}</view>
  42. <view class="text_big" @click.stop="goToSpeDetail(item.deptName,item.deptQrCode)"><text class="underline">{{item.speCount}}</text>只</view>
  43. </view>
  44. </template>
  45. </view>
  46. </view>
  47. </view>
  48. <view class="foot_btn_spe">
  49. <view class="btn1" @click="allStart()">核对完成</view>
  50. <view class="btn3" @click="goBack">取消</view>
  51. </view>
  52. <!-- 填写交接人工号弹窗 -->
  53. <selectAccount v-if="hosModels.disjunctor" :disjunctor="hosModels.disjunctor" @ok="hosOk"
  54. @cancel="hosCancel">
  55. </selectAccount>
  56. <!-- 弹窗 -->
  57. <showModel :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content"
  58. @ok="ok" @cancel="cancel" :operate="models.operate"></showModel>
  59. </view>
  60. </template>
  61. <script>
  62. import {
  63. get,
  64. post,
  65. SM,
  66. webHandle
  67. } from "../../http/http.js";
  68. export default {
  69. data() {
  70. return {
  71. hosId: uni.getStorageSync('userData').user.currentHospital.id,
  72. taskTypeConfig: {},
  73. // 弹窗model
  74. models: {
  75. disjunctor: false,
  76. },
  77. // 填写交接人工号弹窗model
  78. hosModels: {
  79. disjunctor: false,
  80. },
  81. info: {},
  82. queryObj: {}, //路由传递过来的数据
  83. };
  84. },
  85. methods: {
  86. // 获取配置
  87. getSpecimenTaskTypeConfig(){
  88. uni.showLoading({
  89. title: "加载中",
  90. mask: true,
  91. });
  92. post("/simple/data/fetchDataList/taskTypeConfig", {
  93. "idx": 0,
  94. "sum": 1,
  95. "taskTypeConfig": {
  96. "taskTypeDTO": {
  97. "hosId": {
  98. "id": this.hosId
  99. },
  100. "associationType": {
  101. "key": "association_types",
  102. "value": "specimen"
  103. }
  104. }
  105. }
  106. }).then((result) => {
  107. uni.hideLoading();
  108. if (result.status == 200) {
  109. if(result.list.length){
  110. this.taskTypeConfig = result.list[0] || {};
  111. }else{
  112. uni.showToast({
  113. icon: "none",
  114. title: "请配置标本配送任务类型!",
  115. });
  116. }
  117. } else {
  118. uni.showToast({
  119. icon: "none",
  120. title: result.msg || "接口获取数据失败!",
  121. });
  122. }
  123. });
  124. },
  125. viewSpe(deptName, qrCode, id){
  126. uni.navigateTo({
  127. url: `../viewSpe/viewSpe?deptName=${deptName}&workOrderId=${this.queryObj.ids}&deptCode=${qrCode}&tubeTypeId=${id}&isScan=1&specimensCheck=1&noScan=1`,
  128. });
  129. },
  130. // 填写交接人工号-确认
  131. hosOk(data) {
  132. console.log(data);
  133. const {
  134. accountName,
  135. account,
  136. accountId
  137. } = data;
  138. if (!accountName && !account) {
  139. //没有填写交接人
  140. uni.showModal({
  141. title: "提示",
  142. content: "请填写交接人工号!",
  143. showCancel: false,
  144. success: function(res) {
  145. if (res.confirm) {
  146. console.log("用户点击确定");
  147. } else if (res.cancel) {
  148. console.log("用户点击取消");
  149. }
  150. },
  151. });
  152. return;
  153. } else if ((!accountName && account) || (accountName && !account)) {
  154. //没有填写交接人
  155. uni.showModal({
  156. title: "提示",
  157. content: "请填写正确的交接人工号!",
  158. showCancel: false,
  159. success: function(res) {
  160. if (res.confirm) {
  161. console.log("用户点击确定");
  162. } else if (res.cancel) {
  163. console.log("用户点击取消");
  164. }
  165. },
  166. });
  167. return;
  168. }
  169. this.hosModels.disjunctor = false;
  170. this.orderDeptHandler(false, data);
  171. },
  172. // 填写交接人工号-取消
  173. hosCancel() {
  174. this.hosModels.disjunctor = false;
  175. },
  176. // 填写交接人工号弹窗
  177. showSelectAccount() {
  178. this.hosModels = {
  179. disjunctor: true,
  180. };
  181. },
  182. // 获取核对信息
  183. getInfo(gdIds) {
  184. gdIds = JSON.parse(gdIds).toString();
  185. uni.showLoading({
  186. title: '加载中',
  187. mask: true
  188. });
  189. let postData = {
  190. gdIds,
  191. };
  192. post("/api/specimensCheck", postData).then((res) => {
  193. uni.hideLoading();
  194. if (res.status == 200) {
  195. console.log(res)
  196. res.LCDept = res.LCDept.join(',');
  197. this.info = res;
  198. } else {
  199. uni.showToast({
  200. icon: "none",
  201. title: res.msg || "接口获取数据失败!",
  202. });
  203. }
  204. })
  205. },
  206. // 取消
  207. goBack() {
  208. uni.navigateTo({
  209. url: "../receiptpage/receiptpage",
  210. });
  211. },
  212. // 跳转到已扫描标本详情页
  213. goToSpeDetail(deptName='', qrCode='') {
  214. uni.navigateTo({
  215. url: `../noScanSpecimen/noScanSpecimen?deptName=${deptName}&workOrderId=${this.queryObj.ids}&deptCode=${qrCode}&isScan=1&specimensCheck=1&noScan=1`,
  216. });
  217. },
  218. ok(){
  219. this.models.disjunctor = false;
  220. this.orderDeptHandler(true);
  221. },
  222. // 取消
  223. cancel() {
  224. this.models.disjunctor = false;
  225. },
  226. //核对完成
  227. allStart() {
  228. this.models = {
  229. disjunctor: true,
  230. title: "提示",
  231. content: "是否确定标本已核对完成?",
  232. icon: "warn",
  233. operate: {
  234. ok: "确定",
  235. cancel: "取消",
  236. },
  237. };
  238. },
  239. //科室签到
  240. //bigScanner----判断是否需要交接人
  241. //accountObj----弹窗填写的交接人信息
  242. orderDeptHandler(bigScanner, accountObj) {
  243. let type = "orderSign/" + this.queryObj.code;
  244. let list = {
  245. ids: JSON.parse(this.queryObj.ids),
  246. };
  247. bigScanner && (list.bigScanner = ['666']);
  248. if (accountObj) {
  249. list.handover = [accountObj.accountId];
  250. }
  251. uni.showLoading({
  252. title: "加载中",
  253. mask: true,
  254. });
  255. post("/workerOrder/" + type, list).then((res) => {
  256. uni.hideLoading();
  257. if (res.status == 200) {
  258. uni.navigateTo({
  259. url: "../receiptpage/receiptpage",
  260. });
  261. uni.showToast({
  262. title: '工单完成!',
  263. icon: 'success',
  264. duration: 3000,
  265. });
  266. } else if (res.status == "0000") {
  267. this.showSelectAccount();
  268. } else {
  269. this.flag = true;
  270. uni.navigateTo({
  271. url: `../scanning_djEnd/scanning_djEnd?type=specimen&type1=${
  272. res.type
  273. }&code=${this.queryObj.code}&dept=${res.dept}&ids=${this.queryObj.ids}&model=${encodeURIComponent(JSON.stringify(res))}&deptId=${res.deptId}`,
  274. });
  275. }
  276. });
  277. },
  278. },
  279. onLoad(options) {
  280. console.log(options);
  281. this.queryObj = options;
  282. this.getInfo(this.queryObj.ids);
  283. this.getSpecimenTaskTypeConfig();
  284. // #ifdef APP-PLUS
  285. webHandle("no", "app");
  286. // #endif
  287. // #ifdef H5
  288. webHandle("no", "wx");
  289. // #endif
  290. },
  291. };
  292. </script>
  293. <style lang="less" scoped>
  294. /deep/ .uni-collapse-item--border{
  295. border-bottom-color: #fff !important;
  296. }
  297. /deep/ .uni-collapse-item__title-arrow{
  298. margin-right: 0 !important;
  299. }
  300. .checkAfterScanning {
  301. .checkAfterScanning_title {
  302. padding: 50rpx 0;
  303. font-size: 46rpx;
  304. font-weight: 550;
  305. text-align: center;
  306. // border-bottom: 1px solid #ccc;
  307. }
  308. .page_item_cont {
  309. height: 73vh;
  310. overflow-y: auto;
  311. padding: 0 20rpx;
  312. text-align: left;
  313. position: relative;
  314. .text_title{
  315. flex-shrink: 0;
  316. margin-right: 16rpx;
  317. }
  318. .text_big {
  319. font-size: 32rpx;
  320. font-weight: 700;
  321. // margin-top: 10rpx;
  322. .underline {
  323. text-decoration: underline;
  324. }
  325. }
  326. .underline-item{
  327. // text-decoration: underline;
  328. // margin-right: 40rpx;
  329. }
  330. .page_item_cont_T {
  331. padding-top: 28rpx;
  332. padding-bottom: 28rpx;
  333. font-size: 28rpx;
  334. background: #fff;
  335. border: 1px solid #CBCBCB;
  336. border-radius: 10rpx;
  337. padding: 20rpx;
  338. .page_item_cont_title {
  339. height: 100%;
  340. font-size: 32rpx;
  341. display: flex;
  342. justify-content: space-between;
  343. align-items: center;
  344. margin-top: 10rpx;
  345. .content{
  346. display: flex;
  347. flex-wrap: wrap;
  348. .list{
  349. font-size: 28rpx;
  350. height: 60rpx;
  351. line-height: 60rpx;
  352. width: 50%;
  353. border-bottom: 1rpx solid #E6E6E6;
  354. }
  355. }
  356. }
  357. .page_item_cont_title2 {
  358. margin-top: 36rpx;
  359. margin-bottom: 18rpx;
  360. height: 100%;
  361. font-size: 32rpx;
  362. font-weight: bold;
  363. display: flex;
  364. align-items: center;
  365. }
  366. }
  367. .page_item_cont_title_coll{
  368. display: flex;
  369. justify-content: space-between;
  370. align-items: center;
  371. margin-right: 8rpx;
  372. }
  373. .page_item_cont_B {
  374. padding-top: 28rpx;
  375. margin-bottom: 28rpx;
  376. .page_item_cont_title {
  377. font-size: 32rpx;
  378. display: flex;
  379. justify-content: space-between;
  380. }
  381. .page_item_cont_title1 {
  382. height: 60rpx;
  383. line-height: 60rpx;
  384. font-size: 32rpx;
  385. padding-left: 64rpx;
  386. }
  387. }
  388. }
  389. .foot_btn {
  390. line-height: 88rpx;
  391. height: 100rpx;
  392. margin-top: 40rpx;
  393. display: flex;
  394. justify-content: center;
  395. .btn1,
  396. .btn2,
  397. .btn3 {
  398. height: 88rpx;
  399. flex: 1;
  400. margin: 0 1%;
  401. background-image: linear-gradient(to right, #72c172, #3bb197);
  402. color: #fff;
  403. border-radius: 8rpx;
  404. font-size: 32rpx;
  405. margin-top: 16rpx;
  406. text-align: center;
  407. }
  408. }
  409. .foot_btn_spe {
  410. line-height: 88rpx;
  411. height: 100rpx;
  412. margin-top: 40rpx;
  413. text-align: center;
  414. display: flex;
  415. justify-content: space-between;
  416. flex-wrap: wrap;
  417. &::after {
  418. content: '';
  419. flex: 1;
  420. }
  421. view {
  422. height: 88rpx;
  423. width: 48%;
  424. margin: 0 1%;
  425. background-image: linear-gradient(to right, #72c172, #3bb197);
  426. color: #fff;
  427. border-radius: 8rpx;
  428. font-size: 32rpx;
  429. margin-top: 16rpx;
  430. }
  431. }
  432. }
  433. </style>