| | |
| | | </view> |
| | | <view class="item"> |
| | | <view class="code-decs">目标库位:</view> |
| | | <uni-combox :candidates="staList" placeholder="请选择站点" v-model="tarSite"></uni-combox> |
| | | <input type="text" placeholder=" 扫码 / 输入" v-model="tarSite" > |
| | | <!-- <uni-combox :candidates="staList" placeholder="请选择站点" v-model="tarSite"></uni-combox> --> |
| | | </view> |
| | | </view> |
| | | <view class="mat-list-title"> |
| | |
| | | success(result) { |
| | | result = result.data |
| | | if (result.code === 200 && result.data) { |
| | | staResults.push(...result.data); |
| | | staResults.push(...result.data); |
| | | staResults.forEach(item => { |
| | | that.staList.push(item?.locNo) |
| | | }) |
| | |
| | | <input type="text" placeholder=" 扫码 / 输入" v-model="matnr" :focus="matFocus" @input="findMat()"> |
| | | <view class="item-right"> |
| | | <button></button> |
| | | <text style="text-align: right;color: #409EFF;" @click="selectMat()">提取+</text> |
| | | <!-- <text style="text-align: right;color: #409EFF;" @click="findMat()">提取+</text> --> |
| | | <uni-icons type="right" color="#c1c1c1"></uni-icons> |
| | | </view> |
| | | </view> |
| | |
| | | <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="primary"></uni-tag> |
| | | </view> |
| | | </view> |
| | | <view class="list-left-item"> |
| | | <view class="desc">料号:</view> |
| | |
| | | baseUrl: '', |
| | | token: '', |
| | | barcode: '', |
| | | orderNo: '', |
| | | orderNo: null, |
| | | dataList: [], |
| | | count: 0, |
| | | rowNum: '', |
| | |
| | | // 不设置定时器 会出现扫入的字符串不全 |
| | | setTimeout(() => { |
| | | var len = this.orderNo.length |
| | | this.barcodeFocuss() |
| | | // this.barcodeFocuss() |
| | | }, 200) |
| | | }, |
| | | barcodeInput() { |
| | |
| | | // 搜索物料 |
| | | 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', |
| | | url: that.baseUrl + '/mobile/scan/order/mats', |
| | | method: 'POST', |
| | | data: { |
| | | orderNo: that.orderNo, |
| | | matnr: that.matnr |
| | | }, |
| | | header: { |
| | |
| | | }, |
| | | }, |
| | | }); |
| | | } else if (res.code == 403) { |
| | | } else if (result.code == 403) { |
| | | uni.showToast({ |
| | | title: res.msg, |
| | | title: result.msg, |
| | | icon: "none", |
| | | position: 'top' |
| | | }) |
| | |
| | | }, 1000); |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.msg, |
| | | title: result.msg, |
| | | icon: "none", |
| | | position: 'top' |
| | | }) |
| | | } |
| | | |
| | | } |
| | | }); |
| | | |
| | | }, |
| | | selectMat() { |
| | | let that = this |
| | | if (that.orderNo == null || that.orderNo == undefined ) { |
| | | that.messageText = '请填写订单编号!!' |
| | | that.messageToggle('error') |
| | | return; |
| | | } |
| | | |
| | | uni.navigateTo({ |
| | | url: "../mat/matQuery", |
| | | success: function(res) { |
| | | // 通过eventChannel向被打开页面传送数据 向另外一个页面传递值的 |
| | | res.eventChannel.emit('commonUrl', { |
| | | commonUrl: '' |
| | | res.eventChannel.emit('orderNo', { |
| | | orderNo: that.orderNo |
| | | }) |
| | | }, |
| | | events: { |
| | |
| | | url: '/AGV/AGVPakin' |
| | | }, |
| | | { |
| | | title: '呼叫Agv', |
| | | title: 'Agv入库', |
| | | name: 'AGVMoveCall', |
| | | color: 'green', |
| | | cuIcon: 'pullup', |
| | |
| | | <template> |
| | | <view> |
| | | <!-- 搜索框 --> |
| | | <view class="search-bar"> |
| | | <uni-search-bar v-model="condition" placeholder=" 扫码 / 输入" bgColor="#EEEEEE" @confirm="search" /> |
| | | <view class="form"> |
| | | <view class="form-item"> |
| | | <view class="form-item-desc"><text>商品编码</text></view> |
| | | <view class="form-item-content"><text>{{mat.matnr}}</text></view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="form-item-desc"><text>商品名称</text></view> |
| | | <view class="form-item-content" style="word-break: break-all;line-height: 1.5;"><text>{{mat.maktx}}</text></view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="form-item-desc"><text>规格</text></view> |
| | | <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-content"> |
| | | <view class="form-input"> |
| | | <input type="text" v-model="mat.batch"> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="form-item-desc"><text>数量</text></view> |
| | | <view class="form-item-content"> |
| | | <uni-number-box :value="mat.anfme" :max="99999999" :step='1' color="#747474" @change="changeValue" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <scroll-view> |
| | | <view class="tag-list" v-for="(item,i) in tagList" :key="i" @click="showTag(item.id)"> |
| | | <view class="tag"> |
| | | <view style="display: flex;"> |
| | | <view class="wms-tag" :style="baColor" >分类</view> |
| | | </view> |
| | | </view> |
| | | <view class="tag-item">{{item.name}}</view> |
| | | </view> |
| | | </scroll-view> |
| | | <view> |
| | | <view class="tag-list" v-for="(item,i) in matList" :key="i" @click="findBySelect(item.matnr)"> |
| | | <view class="tag"> |
| | | <view style="display: flex;"> |
| | | <view class="wms-tag" :style="baColor" >商品</view> |
| | | </view> |
| | | </view> |
| | | <view class="tag-item">商品编号: {{item.matnr}}</view> |
| | | <view class="tag-item" style="word-break: break-all;width: 90%;">商品名称: {{item.maktx ? item.maktx : '--'}}</view> |
| | | <view class="tag-item">商品规格: {{item.specs ? item.specs : '--'}}</view> |
| | | </view> |
| | | <!-- 底部操作按钮 --> |
| | | <view class="buttom"> |
| | | <button size="mini" type="primary" @click="back()">提取</button> |
| | | </view> |
| | | <uni-load-more v-show="matList.length != 0" :status="status" :icon-size="16" :content-text="contentText" /> |
| | | </view> |
| | |
| | | baColor: "background-color: #0081ff;", |
| | | desc: '商品编号:', |
| | | baseUrl: '', |
| | | orderNo: '', |
| | | token: '', |
| | | status: 'more', |
| | | contentText: { |
| | |
| | | this.showMat(this.tagIdNow); |
| | | } |
| | | }, |
| | | onLoad() { |
| | | onLoad(option) { |
| | | // 没啥用了 |
| | | let that = this |
| | | // const eventChannel = this.$scope.eventChannel; // 兼容APP-NVUE |
| | | // #ifdef APP-NVUE |
| | | const eventChannel = this.$scope.eventChannel; // 兼容APP-NVUE |
| | | // #endif |
| | | // #ifndef APP-NVUE |
| | | const eventChannel = this.getOpenerEventChannel(); |
| | | |
| | | // #endif |
| | | // 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据 |
| | | eventChannel.on('commonUrl', function(data) { |
| | | that.commonUrl = data.commonUrl |
| | | eventChannel.on('orderNo', function(data) { |
| | | that.orderNo = data.orderNo |
| | | that.showTag(data.orderNo) |
| | | }) |
| | | }, |
| | | onShow() { |
| | | this.baseUrl = uni.getStorageSync('baseUrl'); |
| | | this.token = uni.getStorageSync('token'); |
| | | this.showTag(10009) |
| | | }, |
| | | methods: { |
| | | search() { |
| | |
| | | <template> |
| | | <view> |
| | | <view class="form"> |
| | | <view class="form" v-for="mat in mats"> |
| | | <view class="form-item"> |
| | | <view class="form-item-desc"><text>订单号</text></view> |
| | | <view class="form-item-content"><text>{{mat.orderNo}}</text></view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="form-item-desc"><text>商品编码</text></view> |
| | | <view class="form-item-content"><text>{{mat.matnr}}</text></view> |
| | |
| | | <view class="form-item"> |
| | | <view class="form-item-desc"><text>数量</text></view> |
| | | <view class="form-item-content"> |
| | | <uni-number-box :value="mat.anfme" :max="99999999" :step='1' color="#747474" @change="changeValue" /> |
| | | <uni-number-box :value="mat.enableQty" :max="99999999" :step='1' color="#747474" @change="changeValue" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | batch: null, |
| | | anfme: 0, |
| | | }, |
| | | selectNum: null, |
| | | mats: null, |
| | | baseIP:'', |
| | | basePORT:'', |
| | | } |
| | |
| | | |
| | | // 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据 |
| | | eventChannel.on('mat', function(data) { |
| | | that.mat = data.data |
| | | that.mat.anfme = 0 |
| | | that.mats = data.data |
| | | }) |
| | | |
| | | |
| | |
| | | |
| | | }, |
| | | changeValue(value) { |
| | | this.mat.anfme = value |
| | | this.mats[0].anfme = value |
| | | this.selectNum = value |
| | | }, |
| | | back() { |
| | | if (this.mat.anfme === 0) { |
| | | if (this.mats[0].anfme === 0) { |
| | | uni.showToast({title: '请输入数量', icon: "none", position: 'top'}); |
| | | return; |
| | | } |
| | | this.getOpenerEventChannel().emit('matList', {data: this.mat}); |
| | | console.log("=======>"); |
| | | console.log(this.mats[0]); |
| | | if (this.selectNum != null) { |
| | | this.mats[0].anfme = this.selectNum |
| | | } else { |
| | | this.mats[0].anfme = this.mats[0].enableQty |
| | | } |
| | | this.getOpenerEventChannel().emit('matList', {data: this.mats[0]}); |
| | | uni.navigateBack({ |
| | | |
| | | }) |