checkAfterBigScreen.vue 8.5 KB

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