| | |
| | | <template> |
| | | <view> |
| | | <scroll-view scroll-y class="scroll-Y"> |
| | | <view class="square-2"> |
| | | <!-- <view class="square-2"> |
| | | <view class="square-title"> |
| | | <view class="title-sign"><view class="sign"></view></view> |
| | | <view class="title-text"><text>拣货单条码</text></view> |
| | |
| | | <input readonly="value" v-model="doc_num" type="text" placeholder="扫码 / 输入" |
| | | :focus="barcodeFocus" @input="nextInput"> |
| | | <uni-icons type="closeempty" size="20" color="#dadada" @click="removeBarcode()"></uni-icons> |
| | | </view> |
| | | </view> |
| | | </view> --> |
| | | <view class="square-2"> |
| | | <view class="square-title"> |
| | | <view class="title-sign"><view class="sign"></view></view> |
| | | <view class="title-text"><text>拣货单条码</text></view> |
| | | </view> |
| | | <view class="square-content"> |
| | | <view class="content-input-btn"> |
| | | <input v-model="doc_num" type="text" placeholder="扫码 / 输入" |
| | | :focus="barcodeFocus" @input="nextInput" placeholder-style="line-height: 85rpx;"> |
| | | <uni-icons type="closeempty" size="20" color="#dadada" @click="removeBarcode()"></uni-icons> |
| | | </view> |
| | | <view class="content-btn"> |
| | | <button class="cu-btn bg-blue pda-btn" @click="selectPakin()">+提取</button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | getUrl() { |
| | | this.commonUrl = this.baseHttp + this.baseIP + ':' +this.basePORT + "/" +this.baseUrl |
| | | }, |
| | | // 选择订单 |
| | | selectPakin() { |
| | | let that = this |
| | | uni.vibrateShort(); |
| | | uni.navigateTo({ |
| | | url: "pickOffLinesList", |
| | | events: { |
| | | // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据 另外一个页面传过来的 |
| | | acceptDataFromOpenedPage: function(data) { |
| | | that.doc_num = data.data |
| | | that.nextInput(that.doc_num) |
| | | }, |
| | | }, |
| | | success: function(res) { |
| | | // 通过eventChannel向被打开页面传送数据 向另外一个页面传递值的 |
| | | res.eventChannel.emit('commonUrl', {commonUrl:that.commonUrl }) |
| | | }, |
| | | |
| | | }); |
| | | }, |
| | | nextInput() { |
| | | let that = this |
| | | uni.request({ |
| | |
| | | }, |
| | | confirm() { |
| | | let that = this |
| | | if(!that.matList[that.index].locNo == this) { |
| | | if(!that.matList[that.index].locNo == that.locNo) { |
| | | uni.showToast({title: '请确认库位号是否正确', icon: "none", position: 'top'}); |
| | | return |
| | | } |
| | | this.matList[this.index].status= 1 |
| | | console.log(this.matList[this.index]); |
| | | uni.request({ |
| | | url: that.commonUrl + '/manPakOut/finish', |
| | | data:JSON.stringify(that.matList[that.index]), |
| | | method:'POST', |
| | | success(result) { |
| | | console.log(result); |
| | | var res = result.data |
| | | if(res.code === 200) { |
| | | that.popShow = false |
| | | that.matList[that.index].btnText= '已出库' |
| | | that.matList[that.index].btnType = 'primary' |
| | | |
| | | } 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'}) |
| | | } |
| | | } |
| | | }) |