#
whycq
2024-11-28 248ef3ba3de9994dc83d2b36690542893f9fb6e6
pages/phyz/stationManage/stationManage.vue
@@ -1,5 +1,5 @@
<template>
   <view>
   <view style="font-size: 14px;">
      <view class="code">
         <uni-search-bar :focus="searchValueFocus" v-model="searchValue"  @input="searchValueInput()"
            maxlength="500" ancel="cancel" @clear="clear" placeholder="输入 / 扫描 站点号">
@@ -130,7 +130,7 @@
               this.stations = []
               this.wrkMast = ''
               this.wrkDetls = []
            } else {
            } else if (this.searchValue.length == 7) {
               this.getBasDevp('one')
            }
         },
@@ -140,7 +140,6 @@
         },
         // 获取暂存位
         getBasDevp(type) {
            console.log(this.searchValue);
            let _this = this
            uni.request({
               url: `${_this.baseUrl}/agv/basDevp/list/auth`,
@@ -174,7 +173,11 @@
                        }
                        _this.getOrderDetl(res.data.records[0])
                     }
                  } else if (res.code == 403) {
                     uni.showToast({ title: res.msg, icon: "error", position: 'top' })
                     setTimeout(() => { uni.reLaunch({ url: '../../login/login' }); }, 1000);
                  } else {
                     uni.showToast({ title: res.msg, icon: "error", position: 'top' })
                  }
               }
            })
@@ -198,6 +201,11 @@
                        _this.waitPakins = res.data.records
                        // _this.getWrkDetl(item.wrkNo)
                     }
                  } else if (res.code == 403) {
                     uni.showToast({ title: res.msg, icon: "error", position: 'top' })
                     setTimeout(() => { uni.reLaunch({ url: '../../login/login' }); }, 1000);
                  } else {
                     uni.showToast({ title: res.msg, icon: "error", position: 'top' })
                  }
               }
            })
@@ -221,6 +229,11 @@
                        _this.wrkMast = item
                        _this.getWrkDetl(item.wrkNo)
                     }
                  } else if (res.code == 403) {
                     uni.showToast({ title: res.msg, icon: "error", position: 'top' })
                     setTimeout(() => { uni.reLaunch({ url: '../../login/login' }); }, 1000);
                  } else {
                     uni.showToast({ title: res.msg, icon: "error", position: 'top' })
                  }
               }
            })
@@ -241,6 +254,11 @@
                  res = res.data
                  if (res.code === 200) {
                     _this.wrkDetls = res.data.records
                  } else if (res.code == 403) {
                     uni.showToast({ title: res.msg, icon: "error", position: 'top' })
                     setTimeout(() => { uni.reLaunch({ url: '../../login/login' }); }, 1000);
                  } else {
                     uni.showToast({ title: res.msg, icon: "error", position: 'top' })
                  }
               }
            })
@@ -263,12 +281,11 @@
                        _this.wrkDetls = []
                        _this.waitPakins = []
                     },100)  
                  } else if (res.code == 403) {
                     uni.showToast({ title: res.msg, icon: "error", position: 'top' })
                     setTimeout(() => { uni.reLaunch({ url: '../../login/login' }); }, 1000);
                  } else {
                     uni.showToast({ title: res.msg, icon: "error", position: 'top' })
                     setTimeout(()=> {
                        _this.searchValue = ''
                        _this.getBasDevp()
                     },2000)
                     uni.showToast({ title: res.msg, icon: "error", position: 'top' })
                  }
               }
            })
@@ -293,12 +310,11 @@
                        _this.wrkDetls = []
                        _this.waitPakins = []
                     },100)
                  } else if (res.code == 403) {
                     uni.showToast({ title: res.msg, icon: "error", position: 'top' })
                     setTimeout(() => { uni.reLaunch({ url: '../../login/login' }); }, 1000);
                  } else {
                     uni.showToast({ title: res.msg, icon: "error", position: 'top' })
                     setTimeout(()=> {
                        _this.searchValue = ''
                        _this.getBasDevp()
                     },2000)
                     uni.showToast({ title: res.msg, icon: "error", position: 'top' })
                  }
               }
            })
@@ -341,16 +357,10 @@
                        position: 'top'
                     })
                  } else if (res.code == 403) {
                     that.messageText = res.msg
                     that.messageToggle('error')
                     setTimeout(() => {
                        uni.reLaunch({
                           url: '../login/login'
                        });
                     }, 1000);
                     uni.showToast({ title: res.msg, icon: "error", position: 'top' })
                     setTimeout(() => { uni.reLaunch({ url: '../../login/login' }); }, 1000);
                  } else {
                     that.messageText = res.msg
                     that.messageToggle('error')
                     uni.showToast({ title: res.msg, icon: "error", position: 'top' })
                  }
               }
            });
@@ -372,23 +382,21 @@
         },
         // 前往站点明细页面
         getOrderDetl(e) {
            console.log(e);
            let _this = this
            uni.navigateTo({
               url: "./stationDetl",
               success: function(res) {
                  // 通过eventChannel向被打开页面传送数据   向另外一个页面传递值的
                  console.log(e);
                  res.eventChannel.emit('item', {
                     item: e
                  }),
                  })
                  _this.searchValue = ''
               },
               events: {
                  // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据  另外一个页面传过来的
                  acceptDataFromOpenedPage: function(data) {
                     _this.searchValueFocus = true
                  },
                  }
               },
            });
         }