checkAfterBigScreen.vue 11 KB

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