| | |
| | | <view> |
| | | <view class="code"> |
| | | <view class="item"> |
| | | <view class="item" style="width: 50%;"> |
| | | <view class="code-decs" style="width: 100%;">库位号:{{item.locNo}}</view> |
| | | <view class="item" style="width: 100%;"> |
| | | <view class="code-decs" style="width: 50%;">库位号: {{item.locNo}}</view> |
| | | <view class="code-decs" style="width: 50%;">库存可出数量: {{item.anfme}}</view> |
| | | </view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="item" style="width: 90%;"> |
| | | <view class="code-decs" style="width: 100%;">物料:{{item.matnr}}</view> |
| | | <view class="code-decs" style="width: 70%;">物料: {{item.matnr}}</view> |
| | | <button size="mini" type="primary" @click="getOrder">出库订单</button> |
| | | </view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="code-decs">订单号:</view> |
| | | <input type="text" placeholder=" 扫码 / 输入" v-model="orderNo" :focus="barcodeFocus" |
| | | @input="barcodeInput()"> |
| | | </view> |
| | | </view> |
| | | <view class="mat-list-title"> |
| | | <view style="width: 200rpx;"></view> |
| | | <view style="-webkit-flex: 1;flex: 1;">商品列表</view> |
| | | <view style="-webkit-flex: 1;flex: 1;">出库订单</view> |
| | | <view style="width: 200rpx;"></view> |
| | | </view> |
| | | <scroll-view> |
| | | <checkbox-group class="list" v-for="(item,i) in dataList" :key="i" @change="checkboxChange"> |
| | | <!-- <view class="aside"> |
| | | <checkbox :value="item.matnr" :checked="item.checked" @click="set(i)"/> |
| | | </view> --> |
| | | <view class="list-left" style="margin: 0;"> |
| | | <view class="list-left-item"> |
| | | <view class="desc">No:</view> |
| | | <view class="left-item">{{i + 1}}</view> |
| | | <view class="desc">No:{{i + 1}}</view> |
| | | </view> |
| | | <view class="list-left-item"> |
| | | <view class="desc">订单号:</view> |
| | | <view class="left-item"> |
| | | <uni-tag :text="item.orderNo" type="primary"></uni-tag> |
| | | </view> |
| | | <view class="desc">订单号:{{item.orderNo}}</view> |
| | | </view> |
| | | <view class="list-left-item"> |
| | | <view class="desc">料号:</view> |
| | | <view class="left-item"> |
| | | <uni-tag :text="item.matnr" type="primary"></uni-tag> |
| | | </view> |
| | | <view class="desc">料号:{{item.matnr}}</view> |
| | | </view> |
| | | <view class="list-left-item"> |
| | | <view class="desc">名称:</view> |
| | | <view class="left-item">{{item.maktx}}</view> |
| | | <view class="desc">批号:{{item.batch}}</view> |
| | | </view> |
| | | <view class="list-left-item"> |
| | | <view class="desc">规格:</view> |
| | | <view class="left-item">{{item.specs}}</view> |
| | | <view class="desc">可用数量:{{item.count}}</view> |
| | | </view> |
| | | <view class="list-left-item"> |
| | | <view class="desc">批号:</view> |
| | | <view class="left-item"> |
| | | <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 class="list-left-item" > |
| | | <view class="desc">数量:{{item.anfme}}</view> |
| | | </view> |
| | | </view> |
| | | <view class="list-right"> |
| | |
| | | <view class="popup-item"> |
| | | <view class="popup-item-left">数量:</view> |
| | | <view class="popup-item-right" style="border: none;justify-content: center;"> |
| | | <uni-number-box :value="count" :step='0.01' :max="9999999" color="#747474" |
| | | <uni-number-box :value="count" :step='1' :max="mastCount" color="#747474" |
| | | @change="changeValue" /> |
| | | </view> |
| | | </view> |
| | |
| | | orderNoList: [], |
| | | orderNo: '', |
| | | item:'', |
| | | locNo:'' |
| | | locNo:'', |
| | | mastCount: '', |
| | | mastAnfme: 0 |
| | | } |
| | | }, |
| | | onLoad() { |
| | |
| | | // const eventChannel = this.$scope.eventChannel; // 兼容APP-NVUE |
| | | const eventChannel = this.getOpenerEventChannel(); |
| | | eventChannel.on('item', function(data) { |
| | | // console.log(data.item); |
| | | that.mastAnfme = data.item.anfme |
| | | that.item = data.item |
| | | |
| | | }) |
| | |
| | | this.getOrderNoList() |
| | | }, |
| | | methods: { |
| | | getOrder() { |
| | | let _this = this |
| | | uni.navigateTo({ |
| | | url: '../order/pickOrderList2', |
| | | success(res) { |
| | | res.eventChannel.emit('item', { |
| | | item: _this.item |
| | | }) |
| | | }, |
| | | events: { |
| | | sMat: function(data) { |
| | | data.data['anfme'] = data.data.useCount |
| | | _this.dataList.push(data.data) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | set(e) { |
| | | var ck = this.dataList[e].checked |
| | | this.dataList[e].checked = ck ? false:true |
| | |
| | | this.matFocus = true; |
| | | }, 100); |
| | | }, |
| | | // 搜索物料 |
| | | findMat() { |
| | | let that = this |
| | | var matnr = that.matnr.split(";") |
| | | that.order = matnr[0] |
| | | that.matnr = matnr[1] |
| | | uni.request({ |
| | | url: that.baseUrl + '/mat/auth', |
| | | data: { |
| | | matnr: that.matnr |
| | | }, |
| | | header: { |
| | | 'token': uni.getStorageSync('token') |
| | | }, |
| | | success(result) { |
| | | result = result.data |
| | | if (result.code === 200 && result.data) { |
| | | that.matData = result.data |
| | | that.matnr = '' |
| | | that.matData['batch'] = '' |
| | | result.data.batch = matnr[2] |
| | | 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() |
| | | }, |
| | | }, |
| | | }); |
| | | } else if (result.code == 403) { |
| | | uni.showToast({ |
| | | title: result.msg, |
| | | icon: "none", |
| | | position: 'top' |
| | | }) |
| | | setTimeout(() => { |
| | | uni.reLaunch({ |
| | | url: '../login/login' |
| | | }); |
| | | }, 1000); |
| | | } else { |
| | | uni.showToast({ |
| | | title: result.msg, |
| | | icon: "none", |
| | | position: 'top' |
| | | }) |
| | | } |
| | | |
| | | } |
| | | }); |
| | | |
| | | }, |
| | | checkMat(mat) { |
| | | mat['orderNo'] = this.order |
| | | var len = this.dataList.length |
| | |
| | | comb() { |
| | | uni.vibrateShort(); |
| | | let that = this; |
| | | if (that.orderNo === '') { |
| | | 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; |
| | | } |
| | | var useAnfme = 0 |
| | | for (let order of that.dataList) { |
| | | useAnfme = useAnfme + order.anfme |
| | | } |
| | | |
| | | if (useAnfme > that.mastAnfme) { |
| | | this.messageText = "出库数量已超最大库存数量" |
| | | this.messageToggle('error') |
| | | return; |
| | | } |
| | | uni.request({ |
| | | url: that.baseUrl + '/mobile/pda/WarehouseOut/v1', |
| | | data: JSON.stringify({ |
| | | locno: that.item.locNo, |
| | | orderNo: that.dataList[0].orderNo, |
| | | combMats: that.dataList |
| | | }), |
| | | method: 'POST', |
| | |
| | | this.batch = this.dataList[i].batch |
| | | this.weight = this.dataList[i].weight |
| | | this.rowNum = i |
| | | this.mastCount = this.dataList[i].anfme |
| | | this.eject() |
| | | }, |
| | | eject(type) { |
| | |
| | | } |
| | | |
| | | .list:first-child { |
| | | margin-top: 360rpx; |
| | | margin-top: 260rpx; |
| | | } |
| | | |
| | | .list:last-child { |
| | |
| | | .code { |
| | | width: 100%; |
| | | position: fixed; |
| | | min-height: 200rpx; |
| | | min-height: 140rpx; |
| | | background-color: #FFF; |
| | | z-index: 10; |
| | | } |
| | |
| | | width: 100%; |
| | | background-color: white; |
| | | position: fixed; |
| | | margin-top: 200rpx; |
| | | margin-top: 140rpx; |
| | | z-index: 9; |
| | | /* border-top: 1px solid #DCDFE6; */ |
| | | text-align: center; |