scanning.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555
  1. <template>
  2. <view class="Scanning">
  3. <view class="Scanning_top">
  4. <view class="Scanning_top_icon">
  5. <text class="cubeic-ok icon_transport transport-duigou"></text>
  6. </view>
  7. <view class="Scanning_top_text">
  8. <view class="text1"> 扫描完成 </view>
  9. <view class="text2">
  10. 您已在
  11. <text
  12. style="font-weight: 600; color: rgb(73, 184, 86)"
  13. v-if="
  14. infoType == 'plan-spe-ddd-1' ||
  15. infoType == 'plan-spe-ddd-2' ||
  16. infoType == 'spe-ddd-1' ||
  17. infoType == 'spe-ddd-2' ||
  18. infoType == 'drug-ddd-2' ||
  19. infoType == 'jp-ddd-2'
  20. "
  21. >{{ infoDATA.startDept.dept }}</text
  22. >
  23. <text
  24. style="font-weight: 600; color: rgb(73, 184, 86)"
  25. v-if="infoType == 'drug-dsd-2' || infoType == 'jp-dsd-2'"
  26. >{{ infoDATA.endDepts[0].dept }}</text
  27. >
  28. <text
  29. style="font-weight: 600; color: rgb(73, 184, 86)"
  30. v-if="
  31. infoType == 'plan-spe-dsd-2' ||
  32. infoType == 'plan-spe-dsd-3' ||
  33. infoType == 'plan-spe-dsd-1' ||
  34. infoType == 'spe-dsd-2' ||
  35. infoType == 'spe-dsd-3' ||
  36. infoType == 'spe-dsd-1' ||
  37. infoType == 'ins-zxz-1' ||
  38. infoType == 'ins-dsd-1' ||
  39. infoType == 'trans-dsd-1' ||
  40. (infoType == 'qt-ddd-1' && infoDATA.gdState.value == '5') ||
  41. infoDATA.gdState.value == '6' ||
  42. infoDATA.gdState.value == '8'
  43. "
  44. >{{ DEPT }}</text
  45. >
  46. <text
  47. >扫描<text style="color: #ff3b53">{{ speNum }}</text> 个标本,
  48. 确认是否继续配送或是完成工单。</text
  49. >
  50. </view>
  51. </view>
  52. </view>
  53. <view class="foot_btn1">
  54. <view class="btn1" @click="Scanning_again()"> 继续配送 </view>
  55. <view
  56. class="btn2"
  57. @click="Scanning_complete(dataId)"
  58. v-if="
  59. infoType == 'plan-spe-ddd-1' ||
  60. infoType == 'plan-spe-dsd-1' ||
  61. infoType == 'spe-ddd-1' ||
  62. infoType == 'spe-dsd-1'
  63. "
  64. >
  65. 完成工单
  66. </view>
  67. <view
  68. class="btn2"
  69. @click="Scanning_complete1(dataId)"
  70. v-if="
  71. infoType == 'plan-spe-ddd-2' ||
  72. infoType == 'plan-spe-dsd-2' ||
  73. infoType == 'plan-spe-dsd-3' ||
  74. infoType == 'spe-ddd-2' ||
  75. infoType == 'spe-dsd-2' ||
  76. infoType == 'spe-dsd-3'
  77. "
  78. >
  79. 完成工单
  80. </view>
  81. </view>
  82. <!-- 弹窗 -->
  83. <showModel
  84. :title="models.title"
  85. :icon="models.icon"
  86. :disjunctor="models.disjunctor"
  87. :content="models.content"
  88. @ok="ok"
  89. @cancel="cancel"
  90. :operate="models.operate"
  91. ></showModel>
  92. </view>
  93. </template>
  94. <script>
  95. import showModel from "../../components/showModel/showModel.vue";
  96. import { get, post, SM, webHandle } from "../../http/http.js";
  97. export default {
  98. data() {
  99. return {
  100. // 弹窗model
  101. models: {
  102. disjunctor: false,
  103. },
  104. wcId: [], //完成工单id
  105. modelFlag: "", //弹窗标识
  106. infoDATA: [],
  107. infoType: "",
  108. DEPTCode: "",
  109. DEPT: "",
  110. dataId: "",
  111. speNum: 0,
  112. queryObj: {}, //路由传递过来的参数
  113. };
  114. },
  115. methods: {
  116. // 继续配送
  117. Scanning_again(id) {
  118. uni.navigateTo({
  119. url: "../receiptpage/receiptpage",
  120. });
  121. },
  122. // 确定
  123. ok() {
  124. this.models.disjunctor = false;
  125. if (this.modelFlag == "complete1") {
  126. //一对多、多对多完成工单
  127. let data = {
  128. type: this.infoType,
  129. ids: this.wcId,
  130. };
  131. let id = this.wcId;
  132. if (this.queryObj.type === "specimenPlan") {
  133. //标本轮巡
  134. post("/workerOrder/finishPlanSpes", data).then((res) => {
  135. if (res.status == 200) {
  136. uni.navigateTo({
  137. url: `../scanning_orderSign/scanning_orderSign?type=${
  138. this.queryObj.type
  139. }&type1=${this.queryObj.type1}&deptCode=${
  140. this.queryObj.code
  141. }&id=${encodeURIComponent(JSON.stringify(id))}`,
  142. });
  143. } else {
  144. uni.showToast({
  145. icon: "none",
  146. title: "请求失败!",
  147. });
  148. }
  149. });
  150. } else {
  151. post("/workerOrder/finishSpes", data).then((res) => {
  152. if (res.status == 200) {
  153. uni.navigateTo({
  154. url: `../scanning_orderSign/scanning_orderSign?type=${
  155. this.queryObj.type
  156. }&type1=${this.queryObj.type1}&deptCode=${
  157. this.queryObj.code
  158. }&id=${encodeURIComponent(JSON.stringify(id))}`,
  159. });
  160. } else {
  161. uni.showToast({
  162. icon: "none",
  163. title: "请求失败!",
  164. });
  165. }
  166. });
  167. }
  168. } else if (this.modelFlag == "complete") {
  169. //一对一完成工单
  170. let id = this.wcId;
  171. post("/workerOrder/finishSpeOrder", id).then((res) => {
  172. if (res.status == 200) {
  173. uni.navigateTo({
  174. url: `../scanning_orderSign/scanning_orderSign?type=${
  175. this.queryObj.type
  176. }&type1=${this.queryObj.type1}&deptCode=${
  177. this.queryObj.code
  178. }&id=${encodeURIComponent(JSON.stringify(id))}`,
  179. });
  180. } else {
  181. uni.showToast({
  182. icon: "none",
  183. title: "请求失败!",
  184. });
  185. }
  186. });
  187. }
  188. },
  189. // 取消
  190. cancel() {
  191. this.models.disjunctor = false;
  192. },
  193. //一对多、多对多完成工单
  194. Scanning_complete1(id) {
  195. this.wcId = id;
  196. this.modelFlag = "complete1"; //弹窗标识
  197. this.models = {
  198. disjunctor: true,
  199. title: "提示",
  200. content: "是否确定标本配送完成?",
  201. icon: "warn",
  202. operate: {
  203. ok: "确定",
  204. cancel: "取消",
  205. },
  206. };
  207. },
  208. //一对一完成工单
  209. Scanning_complete(id) {
  210. this.wcId = id;
  211. this.modelFlag = "complete"; //弹窗标识
  212. this.models = {
  213. disjunctor: true,
  214. title: "提示",
  215. content: "是否确定标本配送完成?",
  216. icon: "warn",
  217. operate: {
  218. ok: "确定",
  219. cancel: "取消",
  220. },
  221. };
  222. },
  223. },
  224. onLoad(options) {
  225. this.queryObj = options;
  226. let id = JSON.parse(options.id);
  227. this.dataId = id;
  228. this.infoType = options.type1;
  229. this.DEPTCode = options.deptCode;
  230. this.DEPT = options.dept;
  231. this.speNum = uni.getStorageSync("speNum");
  232. this.speNum = Number(this.speNum);
  233. // #ifdef APP-PLUS
  234. webHandle("no", "app");
  235. // #endif
  236. // #ifdef H5
  237. webHandle("no", "wx");
  238. // #endif
  239. },
  240. };
  241. </script>
  242. <style lang="less">
  243. .Scanning {
  244. padding: 0 20rpx;
  245. .Scanning_top {
  246. height: 340rpx;
  247. .Scanning_top_icon {
  248. width: 140rpx;
  249. height: 140rpx;
  250. margin: 0 auto;
  251. margin-top: 36rpx;
  252. border-radius: 50%;
  253. line-height: 140rpx;
  254. .cubeic-ok {
  255. font-size: 140rpx;
  256. color: #35b34a;
  257. }
  258. }
  259. .Scanning_top_text {
  260. text-align: center;
  261. .text1 {
  262. margin-top: 40rpx;
  263. font-size: 48rpx;
  264. }
  265. .text2 {
  266. margin-top: 16rpx;
  267. font-size: 36rpx;
  268. }
  269. }
  270. }
  271. .page_item {
  272. margin-top: 16rpx;
  273. margin-bottom: 124rpx;
  274. min-height: 356rpx;
  275. background: #fff;
  276. border-radius: 8rpx;
  277. overflow: hidden;
  278. padding: 0 16rpx;
  279. border: 2rpx solid #e5e9ed;
  280. .L {
  281. width: 40rpx;
  282. height: 40rpx;
  283. border-radius: 50%;
  284. background: #f9fafb;
  285. position: relative;
  286. left: -50rpx;
  287. top: 66rpx;
  288. }
  289. .R {
  290. width: 40rpx;
  291. height: 40rpx;
  292. border-radius: 50%;
  293. background: #f9fafb;
  294. position: relative;
  295. float: right;
  296. right: -50rpx;
  297. top: 26rpx;
  298. }
  299. .starting {
  300. width: 50rpx;
  301. height: 50rpx;
  302. color: #fff;
  303. background: #49b856;
  304. display: inline-block;
  305. border-radius: 50%;
  306. text-align: center;
  307. line-height: 46rpx;
  308. font-size: 32rpx;
  309. margin-right: 6rpx;
  310. }
  311. .End {
  312. width: 50rpx;
  313. height: 50rpx;
  314. color: #fff;
  315. background: #39b199;
  316. display: inline-block;
  317. border-radius: 50%;
  318. text-align: center;
  319. line-height: 46rpx;
  320. font-size: 32rpx;
  321. margin-right: 6rpx;
  322. }
  323. .page_item_top {
  324. height: 86rpx;
  325. border-bottom: 2rpx dashed #e5e9ed;
  326. padding: 0 16rpx;
  327. .page_item_top_L {
  328. height: 100%;
  329. float: left;
  330. line-height: 88rpx;
  331. .emergencys {
  332. background: #ff3b53 !important;
  333. width: 124rpx !important;
  334. }
  335. .emergency {
  336. background: #ff3b53 !important;
  337. }
  338. .emergency1 {
  339. background: #49b856 !important;
  340. }
  341. .page_item_cont_start {
  342. text-align: center;
  343. height: 44rpx;
  344. width: 104rpx;
  345. line-height: 44rpx;
  346. border-radius: 8rpx;
  347. background: #49b856;
  348. color: #fff;
  349. display: inline-block;
  350. }
  351. .L_time {
  352. color: #6cc076;
  353. font-size: 32rpx;
  354. }
  355. .L_text {
  356. font-size: 32rpx;
  357. display: inline-block;
  358. font-weight: 700;
  359. }
  360. }
  361. .page_item_top_R {
  362. height: 60rpx;
  363. float: right;
  364. padding-top: 20rpx;
  365. font-size: 32rpx;
  366. position: absolute;
  367. right: 50rpx;
  368. .L_iocn {
  369. display: inline-block;
  370. height: 52rpx;
  371. line-height: 48rpx;
  372. color: rgb(7, 134, 60);
  373. font-size: 36rpx;
  374. font-weight: 700;
  375. }
  376. }
  377. }
  378. .page_item_cont {
  379. min-height: 180rpx;
  380. max-height: 424rpx;
  381. padding: 0 16rpx;
  382. text-align: left;
  383. position: relative;
  384. .text_big {
  385. font-size: 32rpx;
  386. position: absolute;
  387. right: 16rpx;
  388. font-weight: 700;
  389. margin-top: 10rpx;
  390. }
  391. .text_big2 {
  392. font-size: 32rpx;
  393. position: absolute;
  394. right: 16rpx;
  395. font-weight: 700;
  396. }
  397. .line {
  398. height: 20rpx;
  399. width: 2rpx;
  400. border-left: 2rpx solid #e5e9ed;
  401. position: absolute;
  402. top: 82rpx;
  403. left: 40rpx;
  404. }
  405. .lines {
  406. height: 40%;
  407. width: 2rpx;
  408. border-left: 2rpx solid #e5e9ed;
  409. position: absolute;
  410. top: 23%;
  411. left: 36rpx;
  412. }
  413. .page_item_cont_T {
  414. padding-top: 28rpx;
  415. font-size: 28rpx;
  416. .page_item_cont_title {
  417. height: 100%;
  418. font-size: 32rpx;
  419. }
  420. }
  421. .page_item_cont_B {
  422. padding-top: 28rpx;
  423. margin-bottom: 28rpx;
  424. .page_item_cont_title {
  425. height: 60rpx;
  426. font-size: 32rpx;
  427. }
  428. .page_item_cont_title1 {
  429. height: 60rpx;
  430. line-height: 60rpx;
  431. font-size: 32rpx;
  432. padding-left: 64rpx;
  433. }
  434. }
  435. }
  436. .page_item_foot {
  437. border-top: 2rpx dashed #e5e9ed;
  438. border-bottom: 2rpx dashed #e5e9ed;
  439. padding: 28rpx 16rpx;
  440. text-align: left;
  441. .page_item_foot_text {
  442. font-size: 32rpx;
  443. margin-bottom: 20rpx;
  444. .text1 {
  445. color: rgb(102, 102, 102);
  446. }
  447. .text2 {
  448. float: right;
  449. font-weight: 700;
  450. }
  451. }
  452. .text_padd {
  453. padding: 0 10% 0 10%;
  454. }
  455. }
  456. #infos {
  457. display: none;
  458. }
  459. .page_item_infos {
  460. padding-bottom: 20rpx;
  461. border-bottom: 2rpx dashed #e5e9ed;
  462. .page_item_info2 {
  463. text-align: left;
  464. line-height: 60rpx;
  465. font-size: 32rpx;
  466. padding-left: 16rpx;
  467. .page_item_foot_text {
  468. font-size: 32rpx;
  469. margin-bottom: 20rpx;
  470. .text1 {
  471. color: rgb(102, 102, 102);
  472. }
  473. .text2 {
  474. float: right;
  475. font-weight: 700;
  476. }
  477. }
  478. }
  479. }
  480. }
  481. .foot_btn1 {
  482. position: fixed;
  483. bottom: 0;
  484. right: 20rpx;
  485. left: 20rpx;
  486. line-height: 66rpx;
  487. height: 100rpx;
  488. border-top: 2rpx solid #e5e9ed;
  489. background: #f9fafb;
  490. text-align: center;
  491. view {
  492. height: 66rpx;
  493. width: 45%;
  494. background-image: linear-gradient(to right, #72c172, #3bb197);
  495. color: #fff;
  496. border-radius: 8rpx;
  497. font-size: 32rpx;
  498. margin-top: 16rpx;
  499. }
  500. .btn1 {
  501. float: left;
  502. }
  503. .btn2 {
  504. float: right;
  505. }
  506. }
  507. }
  508. </style>