| | |
| | | <template> |
| | | <view> |
| | | <scroll-view scroll-y> |
| | | <view class="pak-seach-box"> |
| | | <!-- <view class="pak-seach-box"> |
| | | <view class="box-top"> |
| | | <view class="color-block-blue"></view> |
| | | <text class="title">选择站台</text> |
| | |
| | | <uni-combox @input="getCheckDetl" emptyTips="暂无数据" :candidates="staNoList" v-model="staNo" placeholder="请选择"></uni-combox> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> --> |
| | | |
| | | <view class="square-2"> |
| | | <view class="square-title"> |
| | |
| | | const PROJ = uni.getStorageSync('UPROJ'); |
| | | this.baseUrl = PROJ |
| | | this.getUrl() |
| | | this.getOutBound(); |
| | | }, |
| | | methods: { |
| | | // 获取url |
| | | getUrl() { |
| | | this.commonUrl = this.baseHttp + this.baseIP + ':' +this.basePORT + "/" +this.baseUrl |
| | | }, |
| | | getOutBound() { // 获取出库口 |
| | | let that = this |
| | | uni.request({ |
| | | url: that.commonUrl + '/available/take/check/site', |
| | | method: 'POST', |
| | | header: { |
| | | 'token':uni.getStorageSync('token') |
| | | }, |
| | | success(result) { |
| | | var res = result.data |
| | | if (res.code === 200) { |
| | | that.staNoList = res.data |
| | | } else if (res.code == 403) { |
| | | uni.showToast({title: res.msg, icon: "none", position: 'top'}) |
| | | setTimeout(() => { |
| | | uni.reLaunch({ |
| | | url: '../login/login' |
| | | }); |
| | | }, 1000); |
| | | } else { |
| | | uni.showToast({title: res.msg, icon: "none",position: 'top'}) |
| | | } |
| | | }, |
| | | }); |
| | | }, // getOutBound |
| | | getCheckDetl() { // 获取出库口货物信息 |
| | | let that = this |
| | | uni.request({ |
| | | url: that.commonUrl + '/mobile/checkDetl/auth', |
| | | method: 'POST', |
| | | data: { |
| | | staNo:that.staNo |
| | | }, |
| | | header: { |
| | | 'token':uni.getStorageSync('token') |
| | | }, |
| | | success(result) { |
| | | var res = result.data |
| | | console.log(result) |
| | | if (res.code === 200) { |
| | | console.log(res.data) |
| | | } else if (res.code == 403) { |
| | | uni.showToast({title: res.msg, icon: "none", position: 'top'}) |
| | | setTimeout(() => { |
| | | uni.reLaunch({ |
| | | url: '../login/login' |
| | | }); |
| | | }, 1000); |
| | | } else { |
| | | uni.showToast({title: res.msg, icon: "none",position: 'top'}) |
| | | } |
| | | }, |
| | | }); |
| | | }, // getCheckDetl |
| | | |
| | | selectMat() { // 选择商品 |
| | | let that = this |
| | | uni.vibrateShort(); |
| | | uni.navigateTo({ |
| | | url: "matSelect", |
| | | events: { |
| | | // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据 |
| | | // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据 另外一个页面传过来的 |
| | | acceptDataFromOpenedPage: function(data) { |
| | | that.matnr = data.data |
| | | that.findMat(that.matnr) |
| | | }, |
| | | }, |
| | | success: function(res) { |
| | | // 通过eventChannel向被打开页面传送数据 |
| | | res.eventChannel.emit('acceptDataFromOpenerPage', {baseIP:that.baseIP, basePORT:that.basePORT }) |
| | | } |
| | | }, |
| | | success: function(res) { |
| | | // 通过eventChannel向被打开页面传送数据 向另外一个页面传递值的 |
| | | res.eventChannel.emit('commonUrl', {commonUrl:that.commonUrl }) |
| | | }, |
| | | |
| | | }); |
| | | that.matnr = '' |
| | | }, // selectMat |
| | |
| | | } |
| | | }); |
| | | }, // findMat |
| | | removeMatnr() { |
| | | this.matnr = '' |
| | | uni.vibrateShort(); |
| | | this.focus = false; |
| | | this.$nextTick(function() { |
| | | this.focus = true; |
| | | }); |
| | | }, |
| | | revise(item,index) { |
| | | var maxCount = this.matList[index].maxCount |
| | | if (maxCount == undefined ) { |
| | |
| | | // this.show = true |
| | | }, |
| | | remove(item,index) { |
| | | this.matList.splice(index,1) |
| | | this.matList[index].anfme = 0 |
| | | uni.vibrateShort(); |
| | | this.$forceUpdate() // 强制刷新 |
| | | }, |
| | | eject(type) { |
| | | this.type = type |
| | |
| | | confirm() { |
| | | this.matList[this.rowNum].anfme = this.count |
| | | this.$refs.revise.close() |
| | | this.$forceUpdate() // 强制刷新 |
| | | }, |
| | | resst() { |
| | | this.matList = [] |