| | |
| | | <view style="flex: 1;"> |
| | | <input type="text" placeholder=" 扫码 / 输入" v-model="orderNo" :focus="orderNoFocus"> |
| | | </view> |
| | | <view style="height:100%;line-height:2;width:40rpx;margin-right: 20rpx;"> |
| | | <uni-icons type="clear" color="#c1c1c1" @click="clearOrderNo()"></uni-icons> |
| | | </view> |
| | | |
| | | </view> |
| | | <view class="item"> |
| | | <view class="code-decs">托盘码:</view> |
| | | <input type="text" placeholder=" 扫码 / 输入" v-model="barcode" :focus="barcodeFocus" |
| | | @input="barcodeInput()"> |
| | | </view> |
| | | <view class="item"> |
| | | <!-- <view class="item"> |
| | | <view class="code-decs">物料码:</view> |
| | | <input type="text" placeholder=" 扫码 / 输入" v-model="matnr" :focus="matFocus" @input="findMat()"> |
| | | <view class="item-right"> |
| | | <!-- <view class="item-right"> |
| | | <button></button> |
| | | <text style="text-align: right;color: #409EFF;" @click="selectMat()">提取+</text> |
| | | <uni-icons type="right" color="#c1c1c1"></uni-icons> |
| | | </view> |
| | | </view> |
| | | </view> --> |
| | | <!-- </view> --> --> |
| | | </view> |
| | | <view class="mat-list-title"> |
| | | 商品列表 |
| | |
| | | <view class="desc">数量:</view> |
| | | <view class="left-item">{{item.anfme}}</view> |
| | | </view> |
| | | <view class="list-left-item"> |
| | | <view class="desc">状态:</view> |
| | | <view class="left-item">{{item.review}}</view> |
| | | </view> |
| | | </view> |
| | | <view class="list-right"> |
| | | <uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons> |
| | |
| | | <view class="popup-item"> |
| | | <view class="popup-item-left">数量:</view> |
| | | <view class="popup-item-right" style="border: none;justify-content: center;"> |
| | | <uni-number-box :value="count" :step='0.01' :max="9999999" color="#747474" @change="changeValue" /> |
| | | <uni-number-box :value="count" :step='0.001' :max="9999999" color="#747474" @change="changeValue" /> |
| | | </view> |
| | | </view> |
| | | <view class="btn"> |
| | |
| | | messageText: '', |
| | | title: '', |
| | | content: '', |
| | | orderNoFocus: true, |
| | | barcodeFocus: false, |
| | | orderNoFocus: false, |
| | | barcodeFocus: true, |
| | | matFocus: false, |
| | | matData: '', |
| | | removeNum: 0, |
| | | } |
| | | }, |
| | | onLoad() { |
| | | |
| | | let that = this |
| | | const eventChannel = this.getOpenerEventChannel(); |
| | | |
| | | eventChannel.on('orderItem', function(data) { |
| | | console.log(data.item) |
| | | that.orderNo = data.item.orderNo |
| | | that.checkMat(data.item) |
| | | }); |
| | | }, |
| | | onShow() { |
| | | this.baseUrl = uni.getStorageSync('baseUrl'); |
| | |
| | | barcodeInput() { |
| | | // 不设置定时器 会出现扫入的字符串不全 |
| | | setTimeout(() => { |
| | | var len = this.barcode.length |
| | | if (len != 8) { |
| | | uni.showToast({ |
| | | title: '托盘码有误请重试', |
| | | icon: "none", |
| | | position: 'top' |
| | | }); |
| | | this.barcodeFocuss() |
| | | return; |
| | | } |
| | | var len = this.barcode.length |
| | | this.focuss() |
| | | }, 200) |
| | | }, |
| | |
| | | // 搜索物料 |
| | | findMat() { |
| | | let that = this |
| | | uni.request({ |
| | | url: that.baseUrl + '/mat/auth', |
| | | data: { |
| | | matnr: that.matnr |
| | | }, |
| | | header: { |
| | | 'token': uni.getStorageSync('token') |
| | | }, |
| | | success(result) { |
| | | result = result.data |
| | | if (result.code === 200 && result.data) { |
| | | that.matData = result.data |
| | | that.matnr = '' |
| | | that.matData['batch'] = '' |
| | | uni.navigateTo({ |
| | | url: "../mat/matSelected", |
| | | // 通过eventChannel向被打开页面传送数据 |
| | | success: function(res) { |
| | | res.eventChannel.emit('mat', { |
| | | data: result.data |
| | | }) |
| | | }, |
| | | // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据 |
| | | events: { |
| | | matList: function(data) { |
| | | that.checkMat(data.data) |
| | | that.focuss() |
| | | }, |
| | | }, |
| | | }); |
| | | } else if (result.code == 403) { |
| | | uni.showToast({ |
| | | title: result.msg, |
| | | icon: "none", |
| | | position: 'top' |
| | | }) |
| | | setTimeout(() => { |
| | | uni.reLaunch({ |
| | | url: '../login/login' |
| | | }); |
| | | }, 1000); |
| | | } else { |
| | | uni.showToast({ |
| | | title: result.msg, |
| | | icon: "none", |
| | | position: 'top' |
| | | }) |
| | | } |
| | | |
| | | let m = that.matnr.split(";") |
| | | let matnr1 = m[0].slice(3) |
| | | for(var i = 0;i<that.dataList.length;i++){ |
| | | if(that.dataList[i].matnr === matnr1){ |
| | | that.dataList[i].review = "已复核" |
| | | } |
| | | }); |
| | | |
| | | } |
| | | setTimeout(() => { |
| | | this.matnr = ''; |
| | | }, 100); |
| | | // uni.request({ |
| | | // url: that.baseUrl + '/mat/auth', |
| | | // data: { |
| | | // matnr: matnr1 |
| | | // }, |
| | | // header: { |
| | | // 'token': uni.getStorageSync('token') |
| | | // }, |
| | | // success(result) { |
| | | // result = result.data |
| | | // if (result.code === 200 && result.data) { |
| | | // that.matData = result.data |
| | | // that.matnr = '' |
| | | // that.matData['batch'] = '' |
| | | // uni.navigateTo({ |
| | | // url: "../mat/matSelected", |
| | | // // 通过eventChannel向被打开页面传送数据 |
| | | // success: function(res) { |
| | | // res.eventChannel.emit('mat', { |
| | | // data: result.data |
| | | // }) |
| | | // }, |
| | | // // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据 |
| | | // events: { |
| | | // matList: function(data) { |
| | | // that.checkMat(data.data) |
| | | // that.focuss() |
| | | // }, |
| | | // }, |
| | | // }); |
| | | // } else if (result.code == 403) { |
| | | // uni.showToast({ |
| | | // title: result.msg, |
| | | // icon: "none", |
| | | // position: 'top' |
| | | // }) |
| | | // setTimeout(() => { |
| | | // uni.reLaunch({ |
| | | // url: '../login/login' |
| | | // }); |
| | | // }, 1000); |
| | | // } else { |
| | | // uni.showToast({ |
| | | // title: result.msg, |
| | | // icon: "none", |
| | | // position: 'top' |
| | | // }) |
| | | // } |
| | | |
| | | // } |
| | | // }); |
| | | |
| | | }, |
| | | selectMat() { |
| | |
| | | that.matnr = '' |
| | | }, |
| | | checkMat(mat) { |
| | | mat.review = "未复核" |
| | | var len = this.dataList.length |
| | | var add = true ,sameItem = false |
| | | for (var i = 0; i < len; i++) { |
| | |
| | | return; |
| | | } |
| | | for (var i = 0; i < that.dataList.length; i++) { |
| | | // if (that.dataList[i].review !== "已复核" ) { |
| | | // this.messageText = that.dataList[i].matnr + '未复核' |
| | | // this.messageToggle('error') |
| | | // return; |
| | | // } |
| | | if (that.dataList[i].anfme == 0 || that.dataList[i].anfme == '') { |
| | | this.messageText = that.dataList[i].matnr + '组托数量不能为0' |
| | | this.messageToggle('error') |
| | | return; |
| | | } |
| | | } |
| | | |
| | | } |
| | | uni.request({ |
| | | url: that.baseUrl + '/mobile/comb/auth', |
| | |
| | | .code { |
| | | width: 100%; |
| | | position: fixed; |
| | | min-height: 210rpx; |
| | | min-height: 200rpx; |
| | | background-color: #FFF; |
| | | z-index: 10; |
| | | } |
| | |
| | | .item { |
| | | display: flex; |
| | | align-items: center; |
| | | height: 70rpx; |
| | | height: 100rpx; |
| | | margin-left: 20rpx; |
| | | border-bottom: 1px solid #DCDFE6; |
| | | } |
| | |
| | | width: 100%; |
| | | background-color: white; |
| | | position: fixed; |
| | | margin-top: 200rpx; |
| | | margin-top: 300rpx; |
| | | z-index: 9; |
| | | /* border-top: 1px solid #DCDFE6; */ |
| | | text-align: center; |