| | |
| | | <!-- </view>--> |
| | | <view class="cu-form-group"> |
| | | <view class="title">ASN单号</view> |
| | | <input placeholder="请输入ASN单号" v-model="asnCode"></input> |
| | | <input placeholder="请输入ASN单号" v-model="asnCode" @input="onAsnCodeInput" @confirm="onAsnCodeConfirm"></input> |
| | | </view> |
| | | </form> |
| | | <view class="flex solid-bottom padding-sm justify-between"> |
| | |
| | | matnrCode: '', |
| | | max: 99999999, |
| | | searchTimer: null, |
| | | asnCodeTimer: null, |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | this.searchTimer = setTimeout(() => { |
| | | this.getDet(); |
| | | }, 500); |
| | | } |
| | | }, |
| | | onAsnCodeInput(e) { |
| | | // 扫描ASN单号时自动触发查询 |
| | | if (e.detail && e.detail.value && e.detail.value.trim() !== '') { |
| | | this.asnCode = e.detail.value; |
| | | // 延迟一下再查询,避免频繁请求 |
| | | if (this.asnCodeTimer) { |
| | | clearTimeout(this.asnCodeTimer); |
| | | } |
| | | this.asnCodeTimer = setTimeout(() => { |
| | | // 扫描ASN单号时,自动加载该订单的物料信息 |
| | | this.getDet(); |
| | | }, 500); |
| | | } |
| | | }, |
| | | onAsnCodeConfirm() { |
| | | // 确认输入ASN单号时,立即触发查询 |
| | | if (this.asnCode && this.asnCode.trim() !== '') { |
| | | this.getDet(); |
| | | } |
| | | }, |
| | | async search() { |
| | |
| | | } |
| | | if (that.asnCode && that.asnCode.trim() !== '') { |
| | | requestParams.asnCode = that.asnCode.trim(); |
| | | requestParams.code = that.asnCode.trim(); |
| | | // requestParams.code = that.asnCode.trim(); |
| | | } |
| | | if (req && req.batch) { |
| | | requestParams.batch = req.batch; |
| | |
| | | clear() { |
| | | this.list = [] |
| | | this.barcode = '' |
| | | this.asnCode = '' |
| | | this.matnrCode = '' |
| | | this.container = '' |
| | | }, |
| | | next() { |
| | | if (this.list.length) { |
| | |
| | | this.list = [] |
| | | this.barcode = '' |
| | | this.container = '' |
| | | this.asnCode = '' |
| | | this.matnrCode = '' |
| | | this.isconfirm = false |
| | | } else { |
| | | uni.showToast({ |