#
whycq
2022-04-25 b3eccf66e62a7b6c5668ad128f3e764f79ec4bc9
#
5个文件已修改
81 ■■■■ 已修改文件
App.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/basics/checkout.vue 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/basics/offline.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/basics/order.vue 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/basics/pakin.vue 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
App.vue
@@ -84,7 +84,7 @@
        },
        onHide: function() {
            console.log('App Hide')
        }
        },
    }
</script>
pages/basics/checkout.vue
@@ -8,7 +8,8 @@
                </view>
                <view class="square-content">
                    <view class="content-input">
                        <input v-model="barcode" type="text" placeholder="扫码 / 输入" maxlength="8" @input="findBarcode()">
                        <input v-model="barcode" type="text" placeholder="扫码 / 输入" maxlength="8"
                        @input="findBarcode()" :focus="barcodeFocus" @focus="focuss">
                        <uni-icons type="closeempty" size="20" color="#dadada" @click="removeBarcode()"></uni-icons>
                    </view>
                </view>
@@ -36,7 +37,8 @@
                        <uni-combox  emptyTips="暂无数据" :candidates="staNoList" v-model="staNo" placeholder="站台号"></uni-combox>
                    </view>
                    <view class="content-input-combox">
                        <input type="text" v-model="matnr" placeholder="扫码 / 输入" @input="findMat()">
                        <input type="text" v-model="matnr" placeholder="扫码 / 输入" @input="findMat()"
                        :focus="focus" @focus="focuss">
                        <uni-icons type="closeempty" size="20" color="#dadada" @click="removeMatnr()"></uni-icons>
                    </view>
                </view>
@@ -97,6 +99,8 @@
        data() {
            return {
                barcode: '',
                barcodeFocus:true,
                focus:false,
                type: 'center',
                searchBox: 'hide',
                pick:'hide',
@@ -115,6 +119,9 @@
            this.getOutBound();
        },
        methods: {
            focuss() {
                uni.hideKeyboard()
            },
            resst() {
                this.matList = []
                this.barcode = ''
@@ -124,10 +131,18 @@
            removeBarcode() {
                this.barcode = ''
                uni.vibrateShort();
                this.barcodeFocus = false;
                this.$nextTick(function() {
                    this.barcodeFocus = true;
                });
            },
            removeMatnr() {
                this.matnr = ''
                uni.vibrateShort();
                this.focus = false;
                this.$nextTick(function() {
                    this.focus = true;
                });
            },
            remove(item,index) {
                this.matList.splice(index,1)
@@ -214,6 +229,20 @@
                    }
                });
            },
            addMatList(mat) {
                let barcode = this.mat.barcode
                let toUnshift = true
                for (var i = 0; i < this.matList.length; i++) {
                    if (barcode === this.matList[i].barcode) {
                        this.messageToggle('warn')
                        this.messageText = barcode + '已经扫描,请勿重复扫描'
                        toUnshift = false
                    }
                }
                if (toUnshift) {
                    this.matList.unshift(mat)
                }
            },
            findBarcode() {
                let that = this
                uni.request({
pages/basics/offline.vue
@@ -135,6 +135,7 @@
            return {
                barcode: '',
                barcodeFocus:true,
                focus:false,
                matList:[{barcode:'92992929292'}],
                matNo:'',
                mat:null,
@@ -150,7 +151,7 @@
                msgType: 'success',
                messageText: '这是一条成功提示',
                
                focus:false
            }
        },
        mounted(){
@@ -296,7 +297,10 @@
                                that.addMatList(that.mat)
                                that.initAnfme()
                                that.matNo = '',
                                console.log(that.focus)
                                that.focus = false;
                                that.$nextTick(function() {
                                    that.focus = true;
                                });
                            } else {
                                that.messageToggle('warn')
                                that.messageText = '请重新扫码 \ 输入'
pages/basics/order.vue
@@ -8,7 +8,8 @@
                </view>
                <view class="square-content">
                    <view class="content-input">
                        <input  v-model="barcode" type="text" placeholder="扫码 / 输入" maxlength="8">
                        <input  v-model="barcode" type="text" placeholder="扫码 / 输入" maxlength="8"
                        :focus="barcodeFocus" @focus="focuss">
                        <uni-icons type="closeempty" size="20" color="#dadada" @click="removeBarcode()"></uni-icons>
                    </view>
                </view>
@@ -34,7 +35,8 @@
                </view>
                <view class="square-content">
                    <view class="content-input">
                        <input v-model="order" type="text" placeholder="扫码 / 输入" @input="findOrder()">
                        <input v-model="order" type="text" placeholder="扫码 / 输入" @input="findOrder()"
                        :focus="focus" @focus="focuss">
                        <uni-icons type="closeempty" size="20" color="#dadada" @click="removeOrder()"></uni-icons>
                    </view>
                </view>
@@ -130,6 +132,8 @@
        data() {
            return {
                barcode: '',
                barcodeFocus:true,
                focus:false,
                type: 'center',
                searchBox: 'hide',
                pick:'hide',
@@ -152,6 +156,9 @@
            this.basePORT = UPORT
        },
        methods: {
            focuss() {
                uni.hideKeyboard()
            },
            resst() {
                this.orderList = []
                this.barcode = ''
@@ -161,10 +168,18 @@
            removeBarcode() {
                this.barcode = ''
                uni.vibrateShort();
                this.barcodeFocus = false;
                this.$nextTick(function() {
                    this.barcodeFocus = true;
                });
            },
            removeOrder() {
                this.order = ''
                uni.vibrateShort();
                this.focus = false;
                this.$nextTick(function() {
                    this.focus = true;
                });
            },
            eject(type) {
                this.type = type
pages/basics/pakin.vue
@@ -8,7 +8,8 @@
                </view>
                <view class="square-content">
                    <view class="content-input">
                        <input v-model="barcode" type="text" placeholder="扫码 / 输入" maxlength="8">
                        <input v-model="barcode" type="text" placeholder="扫码 / 输入" maxlength="8"
                        :focus="barcodeFocus" @focus="focuss">
                        <uni-icons type="closeempty" size="20" color="#dadada" @click="removeBarcode()"></uni-icons>
                    </view>
                </view>
@@ -34,7 +35,8 @@
                </view>
                <view class="square-content">
                    <view class="content-input-btn">
                        <input v-model="matnr" type="text" placeholder="扫码 / 输入" @input="findMat()">
                        <input v-model="matnr" type="text" placeholder="扫码 / 输入" @input="findMat()"
                        :focus="focus" @focus="focuss">
                        <uni-icons type="closeempty" size="20" color="#dadada" @click="removeMatnr()"></uni-icons>
                    </view>
                    <view class="content-btn">
@@ -104,6 +106,8 @@
        data() {
            return {
                barcode: '',
                barcodeFocus:true,
                focus:false,
                type: 'center',
                searchBox: 'hide',
                pick:'hide',
@@ -119,6 +123,9 @@
            this.basePORT = UPORT
        },
        methods: {
            focuss() {
                uni.hideKeyboard()
            },
            resst() {
                this.matList = []
                this.barcode = ''
@@ -128,10 +135,18 @@
            removeBarcode() {
                this.barcode = ''
                uni.vibrateShort();
                this.barcodeFocus = false;
                this.$nextTick(function() {
                    this.barcodeFocus = true;
                });
            },
            removeMatnr() {
                this.matnr = ''
                uni.vibrateShort();
                this.focus = false;
                this.$nextTick(function() {
                    this.focus = true;
                });
            },
            remove(item,index) {
                this.matList.splice(index,1)