1.新增agv组托入库和组托并补空托盘
2.新增agv搬运任务
3.新增agv补空托盘功能
| | |
| | | <view> |
| | | <view class="code"> |
| | | <view class="item"> |
| | | <view class="code-decs">订单号:</view> |
| | | <input type="text" placeholder=" 扫码 / 输入" v-model="orderNo" :focus="orderNoFocus" |
| | | @input="orderNoInput()"> |
| | | <view class="code-decs">站点号:</view> |
| | | <input type="text" placeholder=" 扫码 / 输入" v-model="rsta" :focus="rstaFocus" |
| | | @input="rstaInput()"> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="code-decs">托盘码:</view> |
| | |
| | | <text style="text-align: right;color: #409EFF;" @click="selectMat()">提取+</text> |
| | | <uni-icons type="right" color="#c1c1c1"></uni-icons> |
| | | </view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="code-decs" style="width: 25vw;">大小托盘:</view> |
| | | <radio-group @change="isFullPlt"> |
| | | <label> |
| | | <radio :checked="ck1" style="transform: scale(0.7)"/><text>小托盘</text> |
| | | </label> |
| | | <label> |
| | | <radio :checked="ck2" style="margin-left: 50rpx;transform: scale(0.7);"/><text>大托盘</text> |
| | | </label> |
| | | </radio-group> |
| | | </view> |
| | | </view> |
| | | <view class="mat-list-title"> |
| | |
| | | </view> |
| | | </scroll-view> |
| | | <!-- 底部操作按钮 --> |
| | | <view class="buttom"> |
| | | <button size="mini" @click="reset('warn')">重置</button> |
| | | <view class="buttom">、 |
| | | <button size="mini" type="primary" @click="combConfirm('warn')">组托</button> |
| | | <button size="mini" @click="reset('warn')">重置</button> |
| | | <button size="mini" type="primary" @click="combConfirmAndFillEmptyPallets('warn')">组托并补空托盘</button> |
| | | </view> |
| | | <!-- 弹窗 --> |
| | | <!-- 修改数量 --> |
| | |
| | | @confirm="comb" @close="combClose"></uni-popup-dialog> |
| | | </uni-popup> |
| | | </view> |
| | | <view> |
| | | <uni-popup ref="combConfirmAndFillEmptyPallets" type="dialog"> |
| | | <uni-popup-dialog :type="msgType" cancelText="取消" confirmText="确认" :title="title" :content="content" |
| | | @confirm="combAndFillEmptyPallets" @close="combClose"></uni-popup-dialog> |
| | | </uni-popup> |
| | | </view> |
| | | |
| | | <!-- 确认重置 --> |
| | | <view> |
| | | <uni-popup ref="resetConfirm" type="dialog"> |
| | |
| | | baseUrl: '', |
| | | token: '', |
| | | barcode: '', |
| | | orderNo: '', |
| | | rsta: '', |
| | | dataList: [], |
| | | count: 0, |
| | | rowNum: '', |
| | |
| | | content: '', |
| | | barcodeFocus: true, |
| | | matFocus: false, |
| | | orderNoFocus: false, |
| | | rstaFocus: false, |
| | | matData: '', |
| | | removeNum: 0, |
| | | ck1: true, |
| | | ck2: false, |
| | | fullPlt: '1' |
| | | } |
| | | }, |
| | | onLoad() { |
| | |
| | | this.token = uni.getStorageSync('token'); |
| | | }, |
| | | methods: { |
| | | // 大小托盘 |
| | | isFullPlt() { |
| | | var temp = this.ck1 |
| | | this.ck1 = this.ck2 |
| | | this.ck2 = temp |
| | | if (this.ck1) { |
| | | this.fullPlt = '1' |
| | | } else { |
| | | this.fullPlt = '2' |
| | | } |
| | | }, |
| | | messageToggle(type) { |
| | | this.msgType1 = type |
| | | this.$refs.message.open() |
| | | }, |
| | | // barcode input 事件 |
| | | orderNoInput() { |
| | | rstaInput() { |
| | | // 不设置定时器 会出现扫入的字符串不全 |
| | | setTimeout(() => { |
| | | var len = this.orderNo.length |
| | | var len = this.rsta.length |
| | | this.barcodeFocuss() |
| | | }, 200) |
| | | }, |
| | |
| | | // 不设置定时器 会出现扫入的字符串不全 |
| | | setTimeout(() => { |
| | | var len = this.barcode.length |
| | | if (len != 10) { |
| | | if (len != 8) { |
| | | uni.showToast({ |
| | | title: '托盘码有误请重试', |
| | | icon: "none", |
| | |
| | | }, 100); |
| | | }, |
| | | // 搜索物料 |
| | | findMat() { |
| | | findMat() { |
| | | let that = this |
| | | // 判断物料长度是否为1 |
| | | if (that.dataList.length >= 1) { |
| | | this.messageText = "只能添加一种物料" |
| | | this.messageToggle('warn') |
| | | that.matnr = '' |
| | | return |
| | | } |
| | | uni.request({ |
| | | url: that.baseUrl + '/mat/auth', |
| | | data: { |
| | |
| | | // 通过eventChannel向被打开页面传送数据 |
| | | success: function(res) { |
| | | res.eventChannel.emit('mat', { |
| | | |
| | | data: result.data |
| | | }) |
| | | console.log(res); |
| | | }, |
| | | // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据 |
| | | events: { |
| | |
| | | add = true |
| | | } |
| | | |
| | | } else { |
| | | // 相同物料相同批号 数量累加 |
| | | this.dataList[i].anfme += mat.anfme |
| | | this.$forceUpdate() // 强制刷新 |
| | | add = false |
| | | } |
| | | } |
| | | // else { |
| | | // // 相同物料相同批号 数量累加 |
| | | // this.dataList[i].anfme += mat.anfme |
| | | // this.$forceUpdate() // 强制刷新 |
| | | // add = false |
| | | // } |
| | | } |
| | | } |
| | | if (add) { |
| | |
| | | this.content = '是否现在组托!' |
| | | this.$refs.combConfirm.open() |
| | | }, |
| | | combConfirmAndFillEmptyPallets(type) { |
| | | this.msgType = type |
| | | this.title = '警告' |
| | | this.content = '是否现在组托并补空板!' |
| | | this.$refs.combConfirmAndFillEmptyPallets.open() |
| | | }, |
| | | combClose() { |
| | | this.$refs.combConfirm.close() |
| | | }, |
| | | comb() { |
| | | console.log("普通组托") |
| | | uni.vibrateShort(); |
| | | let that = this; |
| | | if (that.barcode === '') { |
| | |
| | | } |
| | | } |
| | | uni.request({ |
| | | url: that.baseUrl + '/agvMobile/comb/auth', |
| | | url: that.baseUrl + '/mobile/comb/auth', |
| | | data: JSON.stringify({ |
| | | orderNo: that.orderNo, |
| | | beBatch : 1, |
| | | barcodeSize: '0', |
| | | rsta: that.rsta, |
| | | barcode: that.barcode, |
| | | combMats: that.dataList |
| | | }), |
| | | method: 'POST', |
| | | header: { |
| | | 'token': uni.getStorageSync('token') |
| | | }, |
| | | success(result) { |
| | | var res = result.data |
| | | if (res.code === 200) { |
| | | that.resst(); |
| | | that.messageText = "组托成功" |
| | | that.messageToggle('success') |
| | | const innerAudioContext = uni.createInnerAudioContext(); |
| | | innerAudioContext.src = '/static/music/pakinOk.mp3'; |
| | | innerAudioContext.play() |
| | | } else if (res.code == 403) { |
| | | that.messageText = res.msg |
| | | that.messageToggle('error') |
| | | setTimeout(() => { |
| | | uni.reLaunch({ |
| | | url: '../login/login' |
| | | }); |
| | | }, 1000); |
| | | } else { |
| | | that.messageText = res.msg |
| | | that.messageToggle('error') |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | //组托并补空托盘 |
| | | combAndFillEmptyPallets() { |
| | | uni.vibrateShort(); |
| | | let that = this; |
| | | if (that.barcode === '') { |
| | | this.messageText = "请扫描托盘条码" |
| | | this.messageToggle('error') |
| | | return; |
| | | } |
| | | if (that.dataList.length === 0) { |
| | | this.messageText = "请添加商品列表" |
| | | this.messageToggle('error') |
| | | return; |
| | | } |
| | | for (var i = 0; i < that.dataList.length; i++) { |
| | | 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', |
| | | data: JSON.stringify({ |
| | | beBatch : 1, |
| | | barcodeSize : this.fullPlt, |
| | | rsta: that.rsta, |
| | | barcode: that.barcode, |
| | | combMats: that.dataList |
| | | }), |
| | |
| | | cuIcon: 'pullup', |
| | | url: '/pakin/pakin' |
| | | }, |
| | | { |
| | | title: 'AGV组托入库', |
| | | name: 'AGVPakin', |
| | | color: 'cyan', |
| | | cuIcon: 'pullup', |
| | | url: '/AGV/AGVPakin' |
| | | }, |
| | | // { |
| | | // title: '再次拣料', |
| | | // name: 'changePallet', |
| | |
| | | // cuIcon: 'order', |
| | | // url: '/pakin/pickAgain' |
| | | // }, |
| | | { |
| | | title: '订单入库', |
| | | name: 'orderPakin', |
| | | color: 'red', |
| | | cuIcon: 'pullup', |
| | | url: '/order/orderPakin' |
| | | }, |
| | | // { |
| | | // title: '订单入库', |
| | | // name: 'orderPakin', |
| | | // color: 'red', |
| | | // cuIcon: 'pullup', |
| | | // url: '/order/orderPakin' |
| | | // }, |
| | | { |
| | | title: 'AGV移动任务', |
| | | name: 'AGVStart', |
| | |
| | | <view class="form-item-content"><text>{{mat.specs}}</text></view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="form-item-desc"><text>情况说明</text></view> |
| | | <view class="form-item-desc"><text>批号</text></view> |
| | | <view class="form-item-content"> |
| | | <view class="form-input"> |
| | | <input type="text" v-model="mat.batch"> |
| | |
| | | |
| | | // 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据 |
| | | eventChannel.on('mat', function(data) { |
| | | console.log(data.data); |
| | | |
| | | data.data['anfme'] = 1 |
| | | that.mat = data.data |
| | | log.console(data.data) |
| | | if (data.data.maxNum > 0) { |
| | | that.mat.anfme = data.data.maxNum |
| | | that.max = data.data.maxNum |
| | |
| | | this.mat.anfme = value |
| | | }, |
| | | back() { |
| | | console.log(this.mat); |
| | | if (this.mat.anfme === 0) { |
| | | uni.showToast({title: '请输入数量', icon: "none", position: 'top'}); |
| | | return; |
| | |
| | | <view> |
| | | <view class="code"> |
| | | <view class="item"> |
| | | <view class="code-decs">站点码:</view> |
| | | <view class="code-decs">托盘码:</view> |
| | | <input type="text" placeholder=" 扫码 / 输入" v-model="barcode" :focus="barcodeFocus" |
| | | @input="barcodeInput()"> |
| | | </view> |
| | |
| | | <view class="left-item">{{item.specs}}</view> |
| | | </view> |
| | | <view class="list-left-item"> |
| | | <view class="desc" style="width: 38%;">情况说明:</view> |
| | | <view class="desc" style="width: 38%;">批号:</view> |
| | | <view class="left-item"> |
| | | <uni-tag :text="item.batch" type="warning"></uni-tag> |
| | | </view> |
| | |
| | | // 不设置定时器 会出现扫入的字符串不全 |
| | | setTimeout(() => { |
| | | var len = this.barcode.length |
| | | if (len != 3) { |
| | | if (len != 8) { |
| | | uni.showToast({ |
| | | title: '托盘码有误请重试', |
| | | icon: "none", |