| | |
| | | <view class="list-view"> |
| | | <scroll-view style="overflow: hidden;overflow-y: scroll;height: auto;"> |
| | | <checkbox-group @change="checkboxChange"> |
| | | <label class="order__list" v-for="(item, index) in range" :key="index"> |
| | | <label :class="item.workQty == item.anfme ? 'order__list' : 'order-list-cell'" v-for="(item, index) in range" :key="index"> |
| | | <view class="order__list__right"> |
| | | <checkbox :value="item.id" :checked="item.checked" style="transform:scale(0.7)" /> |
| | | </view> |
| | |
| | | <view> |
| | | <uni-popup ref="combConfirm" type="dialog"> |
| | | <uni-popup-dialog :type="msgType" cancelText="取消" confirmText="确认" :title="title" :content="content" |
| | | @confirm="comb" @close="combClose"></uni-popup-dialog> |
| | | @confirm="shippingConfirm" @close="combClose"></uni-popup-dialog> |
| | | </uni-popup> |
| | | </view> |
| | | <view> |
| | |
| | | messageText: '', |
| | | title: '', |
| | | content: '', |
| | | dataList: [{}], |
| | | shipping: [], |
| | | barcode: '', |
| | | matFocus: '', |
| | | value: '0', |
| | |
| | | let that = this |
| | | setTimeout(() => { |
| | | that.getOrderDetl() |
| | | }, 600) |
| | | }, 700) |
| | | }, |
| | | /** |
| | | * 获取发货订单明细信息 |
| | |
| | | } |
| | | }, |
| | | complete() { |
| | | that.resst() |
| | | that.$toast.hideLoading() |
| | | } |
| | | }); |
| | |
| | | */ |
| | | resst() { |
| | | this.orderNo = '' |
| | | this.shipping = [] |
| | | }, |
| | | /** |
| | | * checkbox选中事件 |
| | |
| | | this.range.map(item => { |
| | | return item.checked = true |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | //确认发货 |
| | | shippinged() { |
| | | if (this.orderNo == undefined || this.orderNo == null || this.orderNo.trim() == '') { |
| | | this.messageToggle('error', '订单编码不能为空!!') |
| | | return |
| | | } |
| | | |
| | | let that = this |
| | | this.$toast.loading('加载中...') |
| | | uni.request({ |
| | | url: that.baseUrl + '/pda/shipping/confirm', |
| | | data: JSON.stringify(that.shipping), |
| | | method: 'POST', |
| | | header: { |
| | | 'token': uni.getStorageSync('token') |
| | | }, |
| | | success(result) { |
| | | var res = result.data |
| | | if (res.code === 200) { |
| | | that.messageToggle('success', '发货成功!!') |
| | | that.range = res.data.map(item => { |
| | | return {...item, checked: true} |
| | | }) |
| | | } else { |
| | | that.messageText = res.msg |
| | | that.messageToggle('error') |
| | | } |
| | | }, |
| | | complete() { |
| | | that.resst() |
| | | that.$toast.hideLoading() |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | combConfirm() { |
| | | this.dialogToggle('dialog', '确认', '是否确认发货?') |
| | | }, |
| | | |
| | | shippingConfirm(type) { |
| | | if (this.range == null) { |
| | | this.messageToggle('error', '发货单数据为空!!'); |
| | | return |
| | | } |
| | | /**过滤未选中订单明细*/ |
| | | this.shipping = this.range.filter(item => { |
| | | return item.checked == true |
| | | }) |
| | | |
| | | if (this.shipping != null && this.shipping.length > 0) { |
| | | this.shippinged() |
| | | } |
| | | }, |
| | | |
| | |
| | | background-color: #3eb689; |
| | | color: #FFF; |
| | | } |
| | | |
| | | .order-list-cell { |
| | | margin: 20rpx; |
| | | font-size: 14px; |
| | | border-radius: 20rpx; |
| | | border: 1px solid #eeeeee; |
| | | display: flex; |
| | | position: relative; |
| | | background-color: #FD4D11; |
| | | color: #FFF; |
| | | } |
| | | |
| | | |
| | | .order__list__left { |
| | | flex: 1; |
| | | padding: 20rpx; |
| | |
| | | range: [], |
| | | orderNo: '', |
| | | barcode: '', |
| | | siteNo: '', |
| | | msgType1: '', |
| | | messageText: '', |
| | | msgType: '', |
| | |
| | | }, |
| | |
|
| | | methods: { |
| | | /** |
| | | * 获取当前播种墙所有库位 |
| | | */ |
| | | getSeedLocs() { |
| | | let that = this |
| | | toast.loading('加载中') |
| | | this.$toast.loading('加载中') |
| | | uni.request({ |
| | | url: this.baseUrl + '/pda/pick/seed/locs', |
| | | header: { |
| | |
| | | } |
| | | }, |
| | | complete() { |
| | | toast.hideLoading() |
| | | that.$toast.hideLoading() |
| | | } |
| | | |
| | | }) |
| | |
| | | if (type == undefined || type == null || type == null) { |
| | | type = 'bind' |
| | | } |
| | | toast.loading('绑定中..') |
| | | this.$toast.loading('绑定中..') |
| | | uni.request({ |
| | | url: that.baseUrl + "/pda/pick/seed/bind", |
| | | data: {barcode: that.barcode, orderNo: that.orderNo, siteNo: that.siteNo, type: type}, |
| | |
| | | success(res) { |
| | | let result = res.data; |
| | | if (result.code === 200) { |
| | | toast.hideLoading() |
| | | this.messageToggle('success', '绑定成功!') |
| | | that.messageToggle('success', '绑定成功!') |
| | | } else { |
| | | toast.hideLoading() |
| | | this.messageToggle('error', result.msg) |
| | | that.messageToggle('error', result.msg) |
| | | } |
| | | }, |
| | | fail(res) { |
| | | toast.hideLoading() |
| | | this.messageToggle('error', '服务器错误') |
| | | |
| | | that.messageToggle('error', '服务器错误') |
| | | |
| | | }, |
| | | complete() { |
| | | that.barcode = '' |
| | | that.orderNo = '' |
| | | that.siteNo = '' |
| | | that.$toast.hideLoading() |
| | | } |
| | | }) |
| | | }, |