chen.lin
昨天 f0080b1fb1219eb06f1265033afb659d86f69699
组托ASN
1个文件已修改
30 ■■■■■ 已修改文件
pages/listing/matnrPalletising.vue 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/listing/matnrPalletising.vue
@@ -21,7 +21,7 @@
<!--                </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">
@@ -145,6 +145,7 @@
                matnrCode: '',
                max: 99999999,
                searchTimer: null,
                asnCodeTimer: null,
            }
        },
        computed: {
@@ -170,6 +171,26 @@
                    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() {
@@ -219,7 +240,7 @@
                }
                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;
@@ -393,6 +414,9 @@
            clear() {
                this.list = []
                this.barcode = ''
                this.asnCode = ''
                this.matnrCode = ''
                this.container = ''
            },
            next() {
                if (this.list.length) {
@@ -461,6 +485,8 @@
                    this.list = []
                    this.barcode = ''
                    this.container = ''
                    this.asnCode = ''
                    this.matnrCode = ''
                    this.isconfirm = false
                } else {
                    uni.showToast({