| | |
| | | <text style="text-align: right;color: #409EFF;" @click="findMat()">提取+</text>
|
| | | <uni-icons type="right" color="#c1c1c1"></uni-icons>
|
| | | </view>
|
| | | </view>
|
| | | </view> |
| | | <uni-section title="商品列表" type="line" class="mat-list-title"></uni-section>
|
| | | </view>
|
| | | <view class="mat-list-title">
|
| | | <div>商品列表</div>
|
| | | <view class="list-view">
|
| | | <scroll-view>
|
| | | <view class="list" v-for="(item,i) in dataList" :key="i">
|
| | | <view class="list-left">
|
| | | <view class="list-left-item">
|
| | | <view class="desc">No:</view>
|
| | | <view class="left-item">{{i + 1}}</view>
|
| | | </view> |
| | | <view class="list-left-item"> |
| | | <view class="desc">订单号:</view> |
| | | <view class="left-item"> |
| | | <uni-tag :text="item.orderNo" type="normal"></uni-tag> |
| | | </view> |
| | | </view>
|
| | | <view class="list-left-item">
|
| | | <view class="desc">编码:</view>
|
| | | <view class="desc">物料码:</view>
|
| | | <view class="left-item">
|
| | | <uni-tag :text="item.matnr" type="primary"></uni-tag>
|
| | | </view>
|
| | |
| | | <uni-popup-dialog :type="msgType" cancelText="取消" confirmText="确认" :title="title" :content="content"
|
| | | @confirm="resetConfirm" @close="resetClose"></uni-popup-dialog>
|
| | | </uni-popup>
|
| | | </view> |
| | | <!-- 平库库位推荐 --> |
| | | <view> |
| | | <uni-popup ref="recommend" type="dialog"> |
| | | <uni-popup-dialog :type="msgType" mode="base" :cancelText="null" confirmText="确认" title="推荐库位" :content="recomLoc"></uni-popup-dialog> |
| | | </uni-popup> |
| | | </view>
|
| | | </view>
|
| | | </template>
|
| | |
| | | msgType1: 'success',
|
| | | msgType: 'success',
|
| | | messageText: '',
|
| | | title: '',
|
| | | title: '', |
| | | recomLoc: '',
|
| | | content: '',
|
| | | barcodeFocus: true,
|
| | | matFocus: false,
|
| | |
| | | // 不设置定时器 会出现扫入的字符串不全
|
| | | setTimeout(() => {
|
| | | var len = this.barcode.length
|
| | | if (len != 8) {
|
| | | uni.showToast({
|
| | | title: '托盘码有误请重试',
|
| | | icon: "none",
|
| | | position: 'top'
|
| | | });
|
| | | // this.barcodeFocuss()
|
| | | return;
|
| | | }
|
| | | // if (len != 8) {
|
| | | // uni.showToast({
|
| | | // title: '托盘码有误请重试',
|
| | | // icon: "none",
|
| | | // position: 'top'
|
| | | // });
|
| | | // // this.barcodeFocuss()
|
| | | // return;
|
| | | // }
|
| | | // this.focuss()
|
| | | }, 200)
|
| | | },
|
| | |
| | | }
|
| | | },
|
| | |
|
| | | checkMat(mat) {
|
| | | checkMat(mat) { |
| | | console.log(mat)
|
| | | var len = this.dataList.length
|
| | | var add = true ,sameItem = false
|
| | | for (var i = 0; i < len; i++) {
|
| | |
| | | if (mat.batch == this.dataList[j].batch) {
|
| | | sameItem = true
|
| | | }
|
| | | }
|
| | | } |
| | | |
| | | // 相同物料 不同批号 新加列表
|
| | | if (mat.batch != this.dataList[i].batch) {
|
| | | this.$forceUpdate() // 强制刷新
|
| | |
| | | add = true
|
| | | }
|
| | |
|
| | | } else {
|
| | | // 相同物料相同批号 数量累加
|
| | | this.dataList[i].mergeNum += mat.mergeNum
|
| | | this.$forceUpdate() // 强制刷新
|
| | | add = false
|
| | | } else { |
| | | // 相同物料,相同批号,不同订单号 |
| | | if (mat.orderNo != this.dataList[i].orderNo) { |
| | | this.$forceUpdate() |
| | | add = true |
| | | } else { |
| | | // 相同物料相同批号 数量累加 |
| | | this.dataList[i].mergeNum += mat.mergeNum |
| | | this.$forceUpdate() // 强制刷新 |
| | | add = false |
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | this.messageToggle('error')
|
| | | return;
|
| | | }
|
| | | }
|
| | | } |
| | | |
| | | uni.request({
|
| | | url: that.baseUrl + '/pda/comb/auth',
|
| | | data: JSON.stringify({
|
| | |
| | | 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()
|
| | | innerAudioContext.play() |
| | | if (that.barcode.indexOf('PK') >= 0) { |
| | | that.recommendLocs(that) |
| | | } |
| | | that.resst(); |
| | | } else if (res.code == 403) {
|
| | | that.messageText = res.msg
|
| | | that.messageToggle('error')
|
| | |
| | | }
|
| | | }
|
| | | });
|
| | | },
|
| | | }, |
| | | |
| | | recommendLocs(that) { |
| | | uni.request({ |
| | | url: that.baseUrl + '/pda/recommend/locs', |
| | | method: 'GET', |
| | | header: { |
| | | 'token': uni.getStorageSync('token') |
| | | }, |
| | | success(result) { |
| | | var res = result.data |
| | | if (res.code === 200) { |
| | | if (res.data != null && res.data != undefined ) { |
| | | that.recomLoc = '系统推荐将货物放至:' + res.data.locNo |
| | | that.$refs.recommend.open() |
| | | } |
| | | } 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') |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | reset(type) {
|
| | | this.msgType = type
|
| | | this.title = '警告'
|
| | |
| | | resst() {
|
| | | this.dataList = []
|
| | | this.barcode = ''
|
| | | this.matnr = ''
|
| | | this.barcodeFocuss()
|
| | | },
|
| | | }
|
| | |
| | | </script>
|
| | |
|
| | | <style>
|
| | | @import url('../../static/css/wms.css/wms.css');
|
| | | @import url('../../static/css/wms.css/wms.css'); |
| | | |
| | | .uni-section { |
| | | margin-top: 0rpx; |
| | | |
| | | .uni-section__content-title { |
| | | font-size: 16px !important; |
| | | } |
| | | }
|
| | |
|
| | | .list {
|
| | | border-radius: unset;
|
| | | margin: auto;
|
| | | margin-top: 20rpx;
|
| | | padding: 10rpx;
|
| | | } |
| | | |
| | | .list-view { |
| | | width: 100%; |
| | | position: relative; |
| | | }
|
| | |
|
| | | .list:first-child {
|
| | | margin-top: 20rpx;
|
| | | margin-top: 320rpx;
|
| | | }
|
| | | .code {
|
| | | width: 100%;
|
| | |
| | | line-height: 80rpx;
|
| | | width: 100%;
|
| | | background-color: white;
|
| | | position: fixed;
|
| | | margin-top: 200rpx;
|
| | | position: relative; |
| | | font-weight: 500;
|
| | | z-index: 9;
|
| | | /* border-top: 1px solid #DCDFE6; */
|
| | | text-align: center;
|
| | | /* box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2); */
|
| | | }
|
| | | </style>
|