| | |
| | | <!-- 底部操作按钮 --> |
| | | <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="comb()">组托</button> |
| | | </view> |
| | | <!-- 弹窗 --> |
| | | <!-- 修改数量 --> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {setCurrentDeviceAction} from '../../static/js/PresetsPda.js' |
| | | import {initScan,startScan,stopScan} from '../../static/js/scanModule.js' |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | // 托盘码有误重置 |
| | | barcodeFocuss() { |
| | | let that = this; |
| | | this.matFocus = false; |
| | | that.barcodeFocus = false; |
| | | setTimeout(() => { |
| | | that.barcode = ''; |
| | |
| | | }, |
| | | // 商品光标清空重置 |
| | | focuss() { |
| | | this.focus = false; |
| | | this.matFocus = false; |
| | | setTimeout(() => { |
| | | this.matnr = ''; |
| | | this.matFocus = true; |
| | |
| | | }, |
| | | // 搜索物料 |
| | | findMat() { |
| | | let that = this |
| | | let _this = this |
| | | initScan(); |
| | | startScan(); |
| | | let item = {} |
| | | item['threeCode'] = that.matnr |
| | | this.dataList.unshift(item) |
| | | this.focuss() |
| | | uni.$on("SCAN_CODE", ({code}) => { |
| | | console.log(code); |
| | | item['threeCode'] = code |
| | | if (_this.dataList.length > 0) { |
| | | let add = false |
| | | for (let k of _this.dataList) { |
| | | if (code == k.threeCode) { |
| | | add = false |
| | | } else { |
| | | add = true |
| | | } |
| | | } |
| | | if (add) { |
| | | _this.dataList.unshift(item) |
| | | } |
| | | } else { |
| | | _this.dataList.unshift(item) |
| | | } |
| | | _this.focuss() |
| | | // code就是扫码的结果 接下来写业务需求 |
| | | }); |
| | | |
| | | }, |
| | | selectMat() { |
| | | let that = this |
| | |
| | | // 确认重置 |
| | | resetConfirm() { |
| | | this.dataList = [] |
| | | this.barcode = '' |
| | | this.messageText = "重置完成" |
| | | this.messageToggle('success') |
| | | this.barcodeFocuss() |
| | | }, |
| | | // 取消重置 |
| | | resetClose() { |
| | |
| | | |
| | | .code-decs { |
| | | width: 20vw; |
| | | font-size: 18px; |
| | | font-size: 14px; |
| | | color: #303133; |
| | | } |
| | | |