| | |
| | | </view> |
| | | <view class="square-content"> |
| | | <view class="content-input"> |
| | | <input readonly="value" v-model="locNo" type="text" placeholder="扫码 / 输入" |
| | | > |
| | | <input readonly="value" v-model="locNo" type="text" placeholder="扫码 / 输入" > |
| | | <uni-icons type="closeempty" size="20" color="#dadada" @click="remove('locNo')"></uni-icons> |
| | | </view> |
| | | </view> |
| | |
| | | <view class="data-list-left"> |
| | | <view class="matnr"><text style="width: 400rpx;">编码:{{item.matnr}}</text></view> |
| | | <view><text style="width: 400rpx;">品名:{{item.maktx}}</text></view> |
| | | <view><text style="width: 400rpx;">批号:{{item.beBatch}}</text></view> |
| | | <view><text style="width: 400rpx;">批号:{{item.batch}}</text></view> |
| | | <view> |
| | | <text style="width: 400rpx;">数量:{{item.anfme}}</text> |
| | | </view> |
| | |
| | | <view class="revise-box"> |
| | | <view class="revise-box-top"> |
| | | <view class="color-block-blue"></view> |
| | | <text class="title">修改批号/数量</text> |
| | | </view> |
| | | <view class="" style="position: relative;left: 50px;margin-bottom: 20px;"> |
| | | <text style="display: inline-block;float: left;width: 50px;">批号:</text> |
| | | <input type="text" style="width: 100px;border-bottom: 1px solid #9e9e9e;" v-model="beBatch"> |
| | | <text class="title">修改</text> |
| | | </view> |
| | | <view class="changeBox"> |
| | | <view class="num-box"> |
| | |
| | | <button class="cu-btn bg-blue " @click="comb()">上架</button> |
| | | </label> |
| | | </view> |
| | | <view> |
| | | <!-- 提示信息弹窗 --> |
| | | <uni-popup ref="message" type="message"> |
| | | <uni-popup-message :type="msgType" :message="messageText" :duration="2000"></uni-popup-message> |
| | | </uni-popup> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | matData: '', |
| | | barcodeFocus:true, |
| | | count: 0, |
| | | beBatch: '', |
| | | |
| | | |
| | | |
| | | batch: '', |
| | | msgType: 'success', |
| | | messageText: '这是一条成功提示', |
| | | } |
| | | }, |
| | | mounted(){ |
| | |
| | | }, |
| | | analysis() { |
| | | let that = this |
| | | console.log(this.orderNo); |
| | | let str = that.orderNo.split(';') |
| | | |
| | | that.orderNo = str[0] |
| | | console.log(str[0]); |
| | | if(that.matList.length>0) { |
| | | if(str[1] != that.matList[0].orderno){ |
| | | uni.showToast({title: '请确认上架单号', icon: "none", position: 'top'}); |
| | | return; |
| | | } |
| | | } |
| | | uni.request({ |
| | | url: that.commonUrl + '/mat/auth', |
| | | data: { |
| | | matnr:str[1] |
| | | orderno:str[0], |
| | | matnr:str[1], |
| | | batch:str[2] |
| | | }, |
| | | header: { |
| | | 'token':uni.getStorageSync('token') |
| | |
| | | uni.vibrateShort(); |
| | | let res = result.data |
| | | if (res.code === 200 && res.data) { |
| | | res.data.beBatch = str[2] |
| | | res.data['orderno'] = str[1] |
| | | res.data.batch = str[2] |
| | | that.matData = res.data |
| | | that.matnr = '' |
| | | uni.navigateTo({ |
| | |
| | | events: { |
| | | // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据 |
| | | matList: function(data) { |
| | | console.log(data); |
| | | that.matList.push(data.data) |
| | | }, |
| | | }, |
| | | success: function(res) { |
| | | // 通过eventChannel向被打开页面传送数据 |
| | | console.log(that.matData); |
| | | res.eventChannel.emit('matData', { data: that.matData }) |
| | | }, |
| | | }); |
| | | } else if(res.code === 403) { |
| | | uni.showToast({title: res.msg, icon: "none", position: 'top'}) |
| | | setTimeout(() => { |
| | | uni.reLaunch({ |
| | | url: '../login/login' |
| | | }); |
| | | }, 1000); |
| | | } else { |
| | | uni.showToast({title: res.msg, icon: "none",position: 'top'}) |
| | | } |
| | | |
| | | } |
| | |
| | | }, |
| | | revise(item,index) { |
| | | this.count = this.matList[index].anfme |
| | | this.batch = this.matList[index].batch |
| | | this.rowNum = index |
| | | this.eject() |
| | | }, |
| | |
| | | }, |
| | | confirm() { |
| | | this.matList[this.rowNum].anfme = this.count |
| | | this.matList[this.rowNum].beBatch = this.beBatch |
| | | this.matList[this.rowNum].batch = this.batch |
| | | this.$refs.revise.close() |
| | | this.$forceUpdate() // 强制刷新 |
| | | }, |
| | |
| | | combParam['locNo'] = that.locNo |
| | | combParam['orderNo'] = that.orderNo |
| | | combParam['combMats'] = that.matList |
| | | console.log(JSON.stringify(combParam)); |
| | | uni.request({ |
| | | url: that.commonUrl + '/mobile/mat/onSale/auth', |
| | | url: that.commonUrl + '/order/in', |
| | | data: JSON.stringify(combParam), |
| | | header: { 'token':uni.getStorageSync('token'),}, |
| | | method:'POST', |
| | |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // 重置 |
| | | resst() { |
| | | this.locNo = '' |
| | | this.orderNo = '' |
| | | this.matList = [] |
| | | }, |
| | | // 移除物料 |
| | | removeItem(item,index) { |
| | | this.matList.splice(index,1) |
| | | // this.listLen = this.matList.length |
| | | this.messageToggle('success') |
| | | this.messageText = '移除成功' |
| | | }, |
| | | messageToggle(type) { |
| | | this.msgType = type |
| | | this.messageText = '' |
| | | this.$refs.message.open() |
| | | }, |
| | | } |
| | | } |
| | |
| | | line-height: 50rpx; |
| | | margin-top: 10rpx; |
| | | } |
| | | .changeBox { |
| | | width: 400rpx; |
| | | height: 100rpx; |
| | | } |
| | | .num-box { |
| | | margin-left: 100rpx; |
| | | } |
| | | .revise-box-buttom{ |
| | | margin-left: 130rpx; |
| | | } |
| | | </style> |