index.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572
  1. <template>
  2. <view class="app-content">
  3. <!-- <img src="../../static/beijing.png" alt="" class="tuku"> -->
  4. <Navs :navname="navname" @fall="fall"></Navs>
  5. <view class="content">
  6. <view class="content_top">
  7. <view class="craid" v-if="cap">
  8. <view class="craid_data">
  9. <p>{{cap.flightNo}}</p>
  10. <span>{{cap.flightDate}}</span>
  11. </view>
  12. <view class="craid_data">
  13. <p>{{cap.outAirport}}</p>
  14. <!-- <span>{{cap.time2}}</span> -->
  15. </view>
  16. <view class="aircraft"></view>
  17. <view class="craid_data">
  18. <p>{{cap.landAirport}}</p>
  19. <!-- <span>{{cap.time3}}</span> -->
  20. </view>
  21. </view>
  22. <view class="craids" v-if="!cap">
  23. <p>暂无航班信息</p>
  24. </view>
  25. <view class="scanning">
  26. <view class="scanning_cd">
  27. <input class="input" v-model.trim="capluggageNum" disabled type="text" value="" placeholder-style="font-size:.8125rem;color:rgb(189, 214, 231);display:flex;justify-content: start;" placeholder="请扫描机票信息"/>
  28. <view class="log_l"></view>
  29. <view class="log" @tap="scan('1')"></view>
  30. </view>
  31. </view>
  32. </view>
  33. <view class="content_top">
  34. <view class="craid" v-if="caps">
  35. <view class="craid_data">
  36. <p>{{caps.flightNo}}</p>
  37. <span>{{caps.flightDate}}</span>
  38. </view>
  39. <view class="craid_data">
  40. <p>{{caps.outAirport}}</p>
  41. <!-- <span>{{caps.time2}}</span> -->
  42. </view>
  43. <view class="aircraft"></view>
  44. <view class="craid_data">
  45. <p>{{caps.landAirport}}</p>
  46. <!-- <span>{{caps.time3}}</span> -->
  47. </view>
  48. </view>
  49. <view class="craids" v-if="!caps">
  50. <p>暂无航班信息</p>
  51. </view>
  52. <view class="scanning">
  53. <view class="scanning_cd">
  54. <input class="input" v-model.trim="capsluggageNum" disabled type="text" value="" placeholder-style="font-size:.8125rem;color:rgb(189, 214, 231);display:flex;justify-content: start;" placeholder="请扫描行李牌号"/>
  55. <view class="log_l"></view>
  56. <view class="log" @tap="scan('2')"></view>
  57. </view>
  58. <view class="gao" v-if="!isMatch">*行李信息不一致,请上报处理</view>
  59. </view>
  60. </view>
  61. <view class="footer">
  62. <button form-type="submit" class="switchBtndel" @tap="abnormal()">异常处理</button>
  63. <button form-type="submit" class="btnyes" v-if="isSend" @tap="sendData()">确认提取</button>
  64. </view>
  65. </view>
  66. </view>
  67. </template>
  68. <script>
  69. import Navs from '../../components/header/navs.vue'
  70. import maskModel from '../../components/mask-model/mask-model.vue'
  71. import {
  72. Format
  73. } from '@/components/utils/validate'
  74. export default {
  75. data() {
  76. return {
  77. isShow: true,
  78. input: '',
  79. navname: '提取',
  80. cap:null,
  81. caps:null,
  82. luggageNum:null,
  83. capluggageNum:null,
  84. capsluggageNum:null,
  85. isMatch:true,
  86. isSend:false,
  87. }
  88. },
  89. created(option) {
  90. },
  91. onLoad(option){
  92. // this.navname = JSON.parse(decodeURIComponent(option.item))
  93. // if (this.navname == '分拣') {
  94. // this.tabname = '航班'
  95. // }
  96. },
  97. onUnload() {
  98. uni.$off("scancodemsg");
  99. },
  100. onShow() {
  101. uni.$on("scancodemsg", (data) => {
  102. if (data.msg.length > 9) {
  103. this.luggageNum = data.msg.trim()
  104. // this.luggageNum = 3784730658
  105. this.getDetial(this.luggageNum)
  106. }
  107. });
  108. },
  109. onHide() {
  110. },
  111. mounted() {
  112. // this.$refs.showMask.show();
  113. // console.log(this.stratvalue.length)
  114. },
  115. computed: {
  116. // getFooterClass () {
  117. // return this.cap.luggageNum ? 'scanning_cds' : 'scanning_cd'
  118. // },
  119. // getlooterClasser () {
  120. // return this.caps.luggageNum ? 'scanning_cds' : 'scanning_cd'
  121. // }
  122. },
  123. components: {
  124. Navs,
  125. maskModel:maskModel,
  126. },
  127. methods: {
  128. scan(type){
  129. let that = this
  130. uni.scanCode({
  131. onlyFromCamera: true,
  132. success: function (res) {
  133. that.luggageNum = Number(res.result)
  134. // this.luggageNum = 3784730658
  135. that.getDetial(Number(res.result))
  136. }
  137. });
  138. },
  139. datatime() {
  140. let dataTime = Format("yyyy-MM-dd hh:mm:ss", new Date());
  141. return dataTime
  142. },
  143. async getDetial(num) {
  144. let data = {
  145. "serviceId": 3002,
  146. "page": 1,
  147. "pageSize": 1,
  148. "dataContent": {
  149. "luggageNum": num, //行李号
  150. },
  151. "event": "0"
  152. }
  153. await this.$http.httpPost('/openApi/query', data).then(res => {
  154. if (res.code == "0" && res.returnData.length>0) {
  155. if(!this.cap){
  156. this.cap = res.returnData[0]
  157. this.capluggageNum = this.luggageNum
  158. }
  159. else if(this.cap&&!this.caps){
  160. this.caps = res.returnData[0]
  161. this.capsluggageNum = this.luggageNum
  162. }
  163. else if(this.cap&&this.caps){
  164. this.cap = null
  165. this.caps = null
  166. this.capluggageNum = null
  167. this.capsluggageNum = null
  168. this.cap = res.returnData[0]
  169. this.capluggageNum = this.luggageNum
  170. }
  171. if(this.caps.luggageNum == this.cap.luggageNum){
  172. this.isSend = true
  173. this.isMatch = true
  174. }
  175. if(!this.caps){
  176. this.isSend = false
  177. this.isMatch = true
  178. }
  179. if(this.caps&&this.caps.luggageNum != this.cap.luggageNum){
  180. this.isSend = false
  181. this.isMatch = true
  182. }
  183. }
  184. else{
  185. uni.showToast({
  186. icon:'none',
  187. title: "未查询到该行李信息",
  188. duration: 5000
  189. });
  190. }
  191. })
  192. },
  193. async sendData(){
  194. this.caps.nodeCode = "extract"
  195. this.caps.processing_time = this.datatime();
  196. this.caps.sourceAirport = this.$storage.get('airportName');
  197. this.caps.ID = null;
  198. this.caps.dataType = "BPM";
  199. this.caps.agentNumber = this.$storage.getJson("users").user_name;
  200. this.caps.device_ID = uni.getDeviceInfo().deviceId;
  201. let data = {
  202. "serviceId": 3005,
  203. "dataContent": [
  204. this.caps
  205. ],
  206. "event": "0"
  207. }
  208. await this.$http.httpPost('/openApi/query', data).then(res => {
  209. if (res.code == "0") {
  210. uni.showToast({
  211. icon:'none',
  212. title: "操作提取成功",
  213. duration: 5000
  214. });
  215. }
  216. else{
  217. uni.showToast({
  218. icon:'none',
  219. title: "操作失败",
  220. duration: 5000
  221. });
  222. }
  223. })
  224. },
  225. abnormal(){
  226. if(this.luggageNum){
  227. uni.navigateTo({
  228. url: "/pages/baggagecheck/index?luggageNum="+this.luggageNum
  229. })
  230. }
  231. else{
  232. uni.navigateTo({
  233. url: "/pages/baggagecheck/index?luggageNum="
  234. })
  235. }
  236. },
  237. fall () {
  238. uni.switchTab({
  239. url: "/pages/index/index"
  240. })
  241. }
  242. },
  243. }
  244. </script>
  245. <style lang="scss" scoped>
  246. .app-content{
  247. position: relative;
  248. background: rgb(49, 85, 99);
  249. >.content{
  250. width: 100%;
  251. height: calc(100vh - 4.625rem);
  252. position: relative;
  253. // overflow: hidden;
  254. // background: rgb(49, 85, 99);
  255. >.content_top{
  256. width: 100%;
  257. // background: rgb(49, 85, 99);
  258. padding-bottom: 1.3125rem;
  259. >.craid{
  260. // width: 100%;
  261. height: 5.625rem;
  262. padding: 0 2.5625rem 0 2.5625rem;
  263. display: flex;
  264. justify-content: space-between;
  265. flex-wrap: wrap;
  266. align-items: center;
  267. >.craid_data{
  268. display: flex;
  269. flex-direction: column;
  270. justify-content: center;
  271. align-items: start;
  272. >p{
  273. color: rgb(255, 255, 255);
  274. font-family: Noto Sans SC;
  275. font-size: 18px;
  276. font-weight: 700;
  277. }
  278. >span{
  279. color: rgb(255, 255, 255);
  280. font-family: Noto Sans SC;
  281. font-size: 13px;
  282. font-weight: 500;
  283. }
  284. }
  285. >.aircraft{
  286. width: 1.75rem;
  287. height: 1.75rem;
  288. background: url('../../static/hang.png') no-repeat;
  289. background-size: 100% 100%;
  290. }
  291. }
  292. >.craids{
  293. height: 5.625rem;
  294. padding: 0 2.5625rem 0 2.5625rem;
  295. display: flex;
  296. justify-content: center;
  297. align-items: center;
  298. >p{
  299. color: rgb(189, 214, 231);
  300. font-family: Noto Sans SC;
  301. font-size: 13px;
  302. font-weight: 500;
  303. }
  304. }
  305. >.scanning{
  306. // height: 12rem;
  307. padding: 0 1.5rem 0 1.5rem;
  308. opacity: 1;
  309. transition: all 3s;
  310. >.gao{
  311. color: yellow;
  312. }
  313. .scanning_cd{
  314. width: 100%;
  315. height: 3rem;
  316. opacity: 1;
  317. transition: all 3s;
  318. background: rgb(59, 103, 123);
  319. margin-top: 1rem;
  320. margin-bottom: .5rem;
  321. border-radius: 4px;
  322. display: flex;
  323. justify-content: center;
  324. align-items: center;
  325. color: rgb(255, 255, 255);
  326. font-family: Noto Sans SC;
  327. font-size: 16px;
  328. >.log{
  329. width: .875rem;
  330. height: .875rem;
  331. background: url('../../static/saoma.png') no-repeat;
  332. background-size: 100% 100%;
  333. margin-left: 1rem;
  334. }
  335. >.log_l{
  336. width: .125rem;
  337. height: 1.3125rem;
  338. margin-left: 4rem;
  339. background: rgb(255, 255, 255);
  340. }
  341. }
  342. .scanning_cds{
  343. width: 100%;
  344. height: 3rem;
  345. opacity: 1;
  346. transition: all 3s;
  347. background: rgb(51, 161, 165);
  348. margin-top: 1rem;
  349. margin-bottom: .5rem;
  350. border-radius: 4px;
  351. display: flex;
  352. justify-content: center;
  353. align-items: center;
  354. color: rgb(255, 255, 255);
  355. font-family: Noto Sans SC;
  356. font-size: 16px;
  357. >.log{
  358. width: .875rem;
  359. height: .875rem;
  360. background: url('../../static/saoma.png') no-repeat;
  361. background-size: 100% 100%;
  362. margin-left: 1rem;
  363. }
  364. >.log_l{
  365. width: .125rem;
  366. height: 1.3125rem;
  367. margin-left: 4rem;
  368. background: rgb(255, 255, 255);
  369. }
  370. }
  371. }
  372. }
  373. >.content_bootom{
  374. width: 100%;
  375. // height: calc(100vh - 20.9375rem - 4.375rem);
  376. padding-bottom: 0;
  377. position: absolute;
  378. bottom: 0;
  379. top: 20.75rem;
  380. border-radius: 6px 6px 0px 0px;
  381. overflow: hidden;
  382. background: rgb(255, 255, 255);
  383. >.choice{
  384. width: 100%;
  385. height: 2.5rem;
  386. display: flex;
  387. background: rgb(240, 241, 243);
  388. >.handle{
  389. width: 50%;
  390. display: flex;
  391. align-items: center;
  392. justify-content: center;
  393. color: rgb(0, 0, 0);
  394. font-family: Noto Sans SC;
  395. font-size: 15px;
  396. font-weight: 700;
  397. border-radius: 6px 6px 0px 0px;
  398. background: rgb(255, 255, 255);
  399. }
  400. >.handles{
  401. width: 50%;
  402. display: flex;
  403. align-items: center;
  404. justify-content: center;
  405. color: rgb(0, 0, 0);
  406. font-family: Noto Sans SC;
  407. font-size: 15px;
  408. font-weight: 700;
  409. }
  410. }
  411. .up{
  412. width: 100%;
  413. display: flex;
  414. align-items: center;
  415. margin-left: 1rem;
  416. border-bottom: 1px solid rgb(238, 238, 238);
  417. // transform: all 3s;
  418. >.down_up{
  419. width: .875rem;
  420. height: .875rem;
  421. background: url('../../static/xia.png') no-repeat;
  422. background-size: 100% 100%;
  423. }
  424. >.list{
  425. width: 97%;
  426. position: relative;
  427. height: 3.75rem;
  428. display: flex;
  429. align-items: center;
  430. transform: all 3s;
  431. right: 0;
  432. color: rgb(0, 0, 0);
  433. font-family: Noto Sans SC;
  434. font-size: 13px;
  435. font-weight: 500;
  436. }
  437. >.delete{
  438. width: 3.75rem;
  439. height: 3.75rem;
  440. background: rgb(237, 101, 101);
  441. display: flex;
  442. align-items: center;
  443. justify-content: center;
  444. position: relative;
  445. right: -3.75rem;
  446. transform: all 3s;
  447. >.log{
  448. width: .875rem;
  449. height: .875rem;
  450. background: url('../../static/vector@1x.png') no-repeat;
  451. background-size: 100% 100%;
  452. }
  453. }
  454. }
  455. .ups{
  456. width: 100%;
  457. display: flex;
  458. align-items: center;
  459. margin-left: 1rem;
  460. border-bottom: 1px solid rgb(238, 238, 238);
  461. // transform: all 3s;
  462. >.down_up{
  463. width: .875rem;
  464. height: .875rem;
  465. position: relative;
  466. right: 1.875rem;
  467. background: url('../../static/xia.png') no-repeat;
  468. background-size: 100% 100%;
  469. }
  470. >.list{
  471. width: 97%;
  472. position: relative;
  473. height: 3.75rem;
  474. display: flex;
  475. align-items: center;
  476. right: 3.75rem;
  477. // right: 0;
  478. color: rgb(0, 0, 0);
  479. font-family: Noto Sans SC;
  480. font-size: 13px;
  481. font-weight: 500;
  482. transform: all 3s;
  483. }
  484. >.delete{
  485. width: 3.75rem;
  486. height: 3.75rem;
  487. background: rgb(237, 101, 101);
  488. display: flex;
  489. align-items: center;
  490. justify-content: center;
  491. position: relative;
  492. right: 1rem;
  493. transform: all 3s;
  494. // right: -3.75rem;
  495. >.log{
  496. width: .875rem;
  497. height: .875rem;
  498. background: url('../../static/vector@1x.png') no-repeat;
  499. background-size: 100% 100%;
  500. }
  501. }
  502. }
  503. .scroll-Y {
  504. height: calc(100% - 2.5rem - 2.75rem - 2.25rem - 2.25rem);
  505. }
  506. .but{
  507. width: 20.5625rem;
  508. height: 2.75rem;
  509. background: linear-gradient(179.10deg, rgba(51,161,165,1.00) 11.326%,rgba(59,111,142,1.00) 119.032%,rgba(59,111,142,1.00) 119.032%,rgba(59,111,142,1.00) 119.032%);
  510. border-radius: .25rem;
  511. color: rgb(255, 255, 255);
  512. font-family: Noto Sans SC;
  513. font-size: 1rem;
  514. margin: 0 auto;
  515. display: flex;
  516. align-items: center;
  517. justify-content: center;
  518. margin-top: 2.25rem;
  519. margin-bottom: 2.25rem;
  520. }
  521. }
  522. >.footer{
  523. width: 100%;
  524. height: 7.4375rem;
  525. position: absolute;
  526. bottom: 0;
  527. display: flex;
  528. align-items: center;
  529. justify-content: center;
  530. >.switchBtndel{
  531. width: 9.4375rem;
  532. height: 2.75rem;
  533. box-sizing: border-box;
  534. background: rgb(243, 253, 255);
  535. border: 1px solid rgb(172, 218, 230);
  536. border-radius:
  537. 4px;
  538. color: rgb(59, 150, 159);
  539. font-family: Noto Sans SC;
  540. font-size: 16px;
  541. font-weight: 700;
  542. }
  543. >.btnyes{
  544. width: 9.4375rem;
  545. height: 2.75rem;
  546. background: linear-gradient(179.10deg, rgba(51,161,165,1.00) 11.326%,rgba(59,111,142,1.00) 119.032%,rgba(59,111,142,1.00) 119.032%,rgba(59,111,142,1.00) 119.032%);
  547. border-radius:
  548. 4px;
  549. color: rgb(255, 255, 255);
  550. font-family: Noto Sans SC;
  551. font-size: 16px;
  552. font-weight: 700;
  553. }
  554. >.unbtnyes{
  555. width: 9.4375rem;
  556. height: 2.75rem;
  557. background: rgb(126, 138, 143);
  558. border-radius:
  559. 4px;
  560. color: rgb(255, 255, 255);
  561. font-family: Noto Sans SC;
  562. font-size: 16px;
  563. font-weight: 700;
  564. }
  565. }
  566. }
  567. }
  568. </style>