123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383 |
- <template>
- <view class="app-content">
- <view class="header">
- <view class="log" @tap="fall"></view>{{ navname }}
- </view>
- <view class="craids" v-if="!luggageData">
- <p>暂无行李信息</p>
- <p>请扫描需要操作的行李牌条码</p>
- </view>
- <view class="content" v-if="luggageData">
- <uni-section class="mb-10" title="当前行李" type="line"></uni-section>
- <view class="list">
- <p>行李编号</p>
- <input class="input" name="yonghuming" type="text" v-model.trim="luggageData.luggageNum" disabled="true"
- value="" placeholder-style="font-size:.8125rem;color:rgb(197, 197, 197);" placeholder="" />
- </view>
- <view class="list">
- <p>航班信息</p>
- <input class="input" name="yonghuming" type="text" v-model.trim="luggageData.carrierFlights"
- disabled="true" value="" placeholder-style="font-size:.8125rem;color:rgb(197, 197, 197);"
- placeholder="" />
- </view>
- <view class="list">
- <p>航班日期</p>
- <input class="input" name="yonghuming" type="text" v-model.trim="luggageData.carrierFlightsDate"
- disabled="true" value="" placeholder-style="font-size:.8125rem;color:rgb(197, 197, 197);"
- placeholder="" />
- </view>
- <view class="list">
- <p>旅客姓名</p>
- <input class="input" name="yonghuming" type="text" v-model.trim="luggageData.passengerName" disabled="true"
- value="" placeholder-style="font-size:.8125rem;color:rgb(197, 197, 197);" placeholder="" />
- </view>
- <view class="list">
- <p>降落机场</p>
- <input class="input" name="yonghuming" type="text" v-model.trim="luggageData.landAirport" disabled="true"
- value="" placeholder-style="font-size:.8125rem;color:rgb(197, 197, 197);" placeholder="" />
- </view>
- <uni-section class="mb-10" title="变更后信息" type="line"></uni-section>
- <view class="list">
- <p>变更类型</p>
- <picker @change="bindPickerChange" style="line-height: 2.375rem;background-color: antiquewhite;" :value="index" :range-key="'name'" :range="expressList">
- <view class="uni-input">{{expressList[index].type?expressList[index].name:"无"}}</view>
- </picker>
- </view>
- <view class="list">
- <p>行李编号</p>
- <uni-easyinput :inputBorder="false" style="line-height: 2.375rem;background-color: antiquewhite;" :placeholderStyle="placeholderStyle" :clearable="false"
- :styles="style" :disabled="false" v-model="luggageDataNew.luggageNum" type="text"
- placeholder="变更后行李编号" />
- </uni-forms>
- </view>
- <view class="list">
- <p>航班信息</p>
- <uni-easyinput :inputBorder="false" style="line-height: 2.375rem;background-color: antiquewhite;" :placeholderStyle="placeholderStyle" :clearable="false"
- :styles="style" :disabled="false" v-model="luggageDataNew.carrierFlights" type="text"
- placeholder="变更后航班号" />
- </view>
- <view class="list">
- <p>航班日期</p>
- <uni-datetime-picker style="line-height: 2.375rem;background-color: antiquewhite;" type="date" :clear-icon="false" v-model="luggageDataNew.carrierFlightsDate" @change="maskClick" />
- </view>
- <view class="list">
- <p>降落机场</p>
- <uni-easyinput :inputBorder="false" style="line-height: 2.375rem;background-color: antiquewhite;" :placeholderStyle="placeholderStyle" :clearable="false"
- :styles="style" :disabled="false" v-model="luggageDataNew.landAirport" type="text"
- placeholder="变更后降落机场" />
- </view>
- </view>
- <view class="up" v-if="luggageDataNew.luggageNum && luggageDataNew.carrierFlights && luggageDataNew.carrierFlightsDate && luggageDataNew.landAirport" @tap="sendData()">提交</view>
- </view>
- </template>
- <script>
- import Nav from '../../components/header/nav.vue'
- import mkUpload from "@/components/mk-upload/mk-upload.vue"
- import {
- translateapp
- } from "@/utils/compress.js"
- import {
- pathToBase64,
- base64ToPath
- } from 'image-tools'
- export default {
- data() {
- return {
- placeholderStyle: "color:000;",
- style: {
- disableColor: "#fff",
- color: "#000"
- },
- isShow: true,
- dataheight: '20.75rem',
- scrollTop: 0,
- old: {
- scrollTop: 0
- },
- input: '',
- main: null,
- poll: null,
- filter: null,
- pusher: null,
- intentServer: null,
- arr: [],
- navname: '速运/改签',
- luggageNum: null,
- luggageData: null,
- luggageDataNew: null,
- index: 0,
- index1: 0,
- expressList: [{
- "type": null,
- "name": "无"
- },
- {
- "type": "RUSH",
- "name": "速运"
- },
- {
- "type": "REBOOK",
- "name": "改签"
- }
- ],
- exceptionNameList: ["无", "速运", "改签"],
- nodeNameList: [],
- isGet:true
- }
- },
- created(option) {},
- onLoad(option) {
- this.luggageNum = option.luggageNum;
- if (this.luggageNum.length > 9) {
- this.getDetial(this.luggageNum)
- }
- },
- onUnload() {
- uni.$off("scancodemsg");
- },
- onShow() {
- uni.$off("scancodemsg");
- uni.$on("scancodemsg", (data) => {
- if (data.msg.length > 9) {
- this.luggageNum = data.msg.trim()
- if (this.luggageNum.length > 9) {
- if(this.isGet==true){
- this.getDetial(this.luggageNum);
- this.isGet = false;
- setTimeout(function(){
- this.isGet = true;
- },500)
- }
- }
- } else {
- uni.showToast({
- icon: 'none',
- title: "请扫描规范条码",
- duration: 5000
- });
- }
- })
- },
- onHide() {
- uni.$off("scancodemsg");
- },
- mounted() {},
- components: {
- Nav,
- mkUpload
- },
- methods: {
- async getDetial(num) {
- let data = {
- "serviceId": 3002,
- "page": 1,
- "pageSize": 1,
- "dataContent": {
- "luggageNum": num, //行李号
- },
- "event": "0"
- }
- await this.$http.httpPost('/openApi/query', data).then(res => {
- if (res.code == "0" && res.returnData.length > 0) {
- this.luggageData = res.returnData[0]
- this.luggageDataNew = _.cloneDeep(res.returnData[0])
- this.luggageDataNew.luggageNum = ""
- this.luggageDataNew.carrierFlights = ""
- this.luggageDataNew.carrierFlightsDate = ""
- this.luggageDataNew.landAirport = ""
- this.expressList.map((item, index) => {
- if (res.returnData[0].specialType == item.type) {
- this.index = index
- }
- })
- } else {
- this.$scanAudio.src = "../../static/hqxl.mp3"
- this.$scanAudio.play()
- uni.showToast({
- icon: 'none',
- title: "未查询到该行李信息",
- duration: 5000
- });
- }
- })
- },
- bindPickerChange(e) {
- this.index = e.detail.value
- this.luggageDataNew.specialType = this.expressList[this.index].type;
- },
- async sendData() {
- this.luggageDataNew.sourceAirport = this.$storage.get('airportName');
- this.luggageDataNew.ID = null;
- this.luggageDataNew.dataType = "BPM";
- this.luggageDataNew.agentNumber = this.$storage.getJson("users").user_name;
- // this.luggageDataNew.agentNumber = "syq";
- this.luggageDataNew.device_ID = uni.getDeviceInfo().deviceId;
- let data = {
- "serviceId": 3005,
- "dataContent": [
- this.luggageDataNew
- ],
- "event": "0"
- }
- await this.$http.httpPost('/openApi/query', data).then(res => {
- if (res.code == "0") {
- uni.showToast({
- icon: 'none',
- title: "操作成功",
- duration: 5000
- });
- } else {
- this.$scanAudio.src = "../../static/czsb.mp3"
- this.$scanAudio.play()
- uni.showToast({
- icon: 'none',
- title: "操作失败",
- duration: 5000
- });
- }
- })
- },
- fall() {
- uni.navigateBack({
- delta: 1
- })
- },
- maskClick(e){
- console.log(e)
- }
- },
- }
- </script>
- <style lang="scss" scoped>
- .app-content {
- >.up {
- position: fixed;
- bottom: 10px;
- left: calc((100% - 20.5625rem) / 2);
- width: 20.5625rem;
- height: 3rem;
- 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%);
- border-radius: .25rem;
- color: rgb(255, 255, 255);
- font-family: Noto Sans SC;
- font-size: 1rem;
- margin: 0 auto;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- >.header {
- width: 100%;
- height: 4.375rem;
- display: flex;
- justify-content: center;
- align-items: center;
- // background: rgba(49,85,99,1);
- color: rgb(16, 17, 22);
- font-family: Noto Sans SC;
- font-size: 1rem;
- position: relative;
- >.log {
- width: .375rem;
- height: .75rem;
- font-size: .75rem;
- position: absolute;
- left: 1.5rem;
- background: url('../../static/ico@1x.png') no-repeat;
- background-size: 100% 100%;
- }
- }
- >.craids {
- margin-top: 10rem;
- height: 5.625rem;
- padding: 0 2.5625rem 0 2.5625rem;
- display: flex;
- justify-content: center;
- align-items: center;
- >p {
- color: rgb(75, 84, 91);
- font-family: Noto Sans SC;
- font-size: 13px;
- font-weight: 500;
- }
- }
- >.content {
- margin-left: 1.5rem;
- height: calc(100vh - 8rem);
- overflow-x: hidden;
- overflow-y: auto;
- >.list {
- height: 3.375rem;
- display: flex;
- align-items: center;
- border-bottom: 1px solid rgb(238, 238, 238);
- .uni-input {
- width: 240px;
- padding-left: 10px;
- }
- >p {
- color: rgb(0, 0, 0);
- font-family: Noto Sans SC;
- font-size: .8125rem;
- font-weight: 500;
- margin-right: 2.1875rem;
- }
- >.listup {
- width: .25rem;
- height: .5rem;
- background: url('../../static/icos.png') no-repeat;
- background-size: 100% 100%;
- position: absolute;
- right: 1.5rem;
- }
- }
- >.picturearea {
- margin-top: 1.875rem;
- >.name {
- color: rgb(0, 0, 0);
- font-family: Noto Sans SC;
- font-size: .8125rem;
- font-weight: 500;
- margin-bottom: 1.25rem;
- }
- >.content_list {
- width: 100%;
- display: flex;
- margin-top: 1.25rem;
- >.mg {
- width: 5.5rem;
- height: 5.5rem;
- background: rgb(197, 207, 211);
- display: flex;
- align-items: center;
- justify-content: center;
- margin-right: .625rem;
- >.mg_lg {
- width: 1.75rem;
- height: 1.75rem;
- background: url('../../static/shi.png') no-repeat;
- background-size: 100% 100%;
- }
- }
- }
- }
- }
- }
- </style>
|