| | |
| | | <input type="text" placeholder=" 扫码 / 输入" v-model="barcode" :focus="barcodeFocus" |
| | | @input="barcodeInput()"> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="code-decs">物料码:</view> |
| | | <input type="text" placeholder=" 扫码 / 输入" v-model="matnr" :focus="matFocus" @input="findMat()"> |
| | | <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 class="mat-list-title"> |
| | | 商品列表 |
| | | 商品列表--托盘码:{{abarcode}} |
| | | |
| | | </view> |
| | | <scroll-view> |
| | | <view class="list" v-for="(item,i) in dataList" :key="i"> |
| | |
| | | <uni-tag :text="item.batch" type="warning"></uni-tag> |
| | | </view> |
| | | </view> |
| | | <!-- <view class="list-left-item"> |
| | | <view class="desc">重量:</view> |
| | | <view class="left-item"> |
| | | <uni-tag :text="item.weight" type="warning"></uni-tag> |
| | | </view> |
| | | </view> --> |
| | | <view class="list-left-item"> |
| | | <view class="desc">数量:</view> |
| | | <view class="left-item">{{item.anfme}}</view> |
| | | </view> |
| | | </view> |
| | | <view class="list-right"> |
| | | <uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons> |
| | | <uni-icons type="trash" color="#f58a8a" size="24" @click="remove(item,i,'warn')"></uni-icons> |
| | | </view> |
| | | </view> |
| | | </scroll-view> |
| | | <!-- 底部操作按钮 --> |
| | | <view class="buttom"> |
| | | <button size="mini" @click="reset('warn')">重置</button> |
| | | <button size="mini" type="primary" @click="combConfirm('warn')">组托</button> |
| | | <!-- <button size="mini" type="primary" @click="combConfirm('warn')">组托</button> --> |
| | | </view> |
| | | <!-- 弹窗 --> |
| | | <!-- 修改数量 --> |
| | |
| | | matFocus: false, |
| | | matData: '', |
| | | removeNum: 0, |
| | | abarcode: '', |
| | | } |
| | | }, |
| | | onLoad() { |
| | |
| | | }, |
| | | // 商品光标清空重置 |
| | | focuss() { |
| | | this.barcodeFocus = false; |
| | | this.matFocus = false; |
| | | setTimeout(() => { |
| | | this.matnr = ''; |
| | | this.matFocus = true; |
| | | }, 100); |
| | | }, |
| | | // 搜索物料 |
| | | findMat() { |
| | | let that = this |
| | | var mat = that.matnr |
| | | let submitMat |
| | | let newMatnr |
| | | if (mat.includes(';')) { |
| | | newMatnr = mat.split(';') |
| | | submitMat = newMatnr[1] |
| | | } else { |
| | | submitMat = mat |
| | | } |
| | | uni.request({ |
| | | url: that.baseUrl + '/mat/auth', |
| | | data: { |
| | | matnr: submitMat |
| | | }, |
| | | url: that.baseUrl + '/mobile/barcode/auth?barcode='+this.barcode, |
| | | header: { |
| | | 'token': uni.getStorageSync('token') |
| | | }, |
| | | success(result) { |
| | | result = result.data |
| | | console.log(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() |
| | | }, |
| | | }, |
| | | }); |
| | | that.dataList=result.data; |
| | | that.barcode = ""; |
| | | that.abarcode = result.data[0].zpallet |
| | | that.barcodeFocus = true |
| | | } else if (result.code == 403) { |
| | | uni.showToast({ |
| | | title: result.msg, |
| | |
| | | position: 'top' |
| | | }) |
| | | } |
| | | |
| | | |
| | | } |
| | | }); |
| | | }, |
| | | // 搜索物料 |
| | | findMat() { |
| | | let that = this |
| | | var mat = that.matnr |
| | | let submitMat |
| | | let newMatnr |
| | | if (mat.includes(';')) { |
| | | newMatnr = mat.split(';') |
| | | submitMat = newMatnr[1] |
| | | } else { |
| | | submitMat = mat |
| | | } |
| | | |
| | | }, |
| | | selectMat() { |
| | |
| | | // 确认重置 |
| | | resetConfirm() { |
| | | this.dataList = [] |
| | | this.barcode = '' |
| | | this.messageText = "重置完成" |
| | | this.messageToggle('success') |
| | | }, |