#
whycq
2024-06-24 cc415a70543843db7f9ba0796db09015ae743d44
#
2个文件已修改
57 ■■■■ 已修改文件
pages/mat/matQuery.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/pakin/pakin.vue 52 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/mat/matQuery.vue
@@ -82,7 +82,7 @@
                that.tagList = []
                that.matList = []
                uni.request({
                    url: that.baseUrl + '/mat/search/pda/auth',
                    url: that.baseUrl + '/matCode/list/auth',
                    data: {
                        condition: that.condition
                    },
@@ -91,10 +91,9 @@
                        'token':uni.getStorageSync('token'),
                    },
                    success(result) {
                        console.log(result);
                        var res = result.data
                        if (res.code === 200 ) {
                            that.matList = res.data
                            that.matList = res.data.records
                            // that.save()
                        } else if (res.code == 403) {
                            uni.showToast({title: res.msg, icon: "none", position: 'top'})
pages/pakin/pakin.vue
@@ -4,11 +4,11 @@
            <view class="item">
                <view class="code-decs">托盘码:</view>
                <input type="text" placeholder=" 扫码 / 输入" v-model="barcode" :focus="barcodeFocus"
                    @input="barcodeInput()">
                    @input="checkedBarcode()">
            </view>
            <view class="item">
                <view class="code-decs">物料码:</view>
                <input type="text" placeholder=" 扫码 / 输入" v-model="matnr" :focus="matFocus" @input="findMat()">
                <input type="text" placeholder=" 扫码 / 输入" v-model="matNo" :focus="matFocus" @input="findMat()">
                <view class="item-right">
                    <button></button>
                    <text style="text-align: right;color: #409EFF;" @click="selectMat()">提取+</text>
@@ -84,7 +84,7 @@
                    <view class="popup-item">
                        <view class="popup-item-left">编码:</view>
                        <view class="popup-item-right">
                            <input type="text" v-model="matnr" disabled="true"
                            <input type="text" v-model="matNo" disabled="true"
                                style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;">
                        </view>
                    </view>
@@ -152,7 +152,7 @@
                dataList: [],
                count: 0,
                rowNum: '',
                matnr: '',
                matNo: '',
                batch: '',
                weight: '',
                msgType1: 'success',
@@ -175,6 +175,28 @@
            this.token = uni.getStorageSync('token');
        },
        methods: {
            checkedBarcode() {
                let that = this
                uni.request({
                    url: that.baseUrl + '/barcode/auth',
                    data: {
                        barcode: that.barcode,
                    },
                    header: {
                        'token':uni.getStorageSync('token')
                    },
                    success(result) {
                        console.log(result);
                        var res = result.data
                        if (res.code === 500) {
                            that.barcodeFocuss()
                            uni.showToast({title: res.msg, icon: "none", position: 'top'});
                        } else if(res.code === 200) {
                            that.barcodeInput()
                        }
                    }
                })
            },
            messageToggle(type) {
                this.msgType1 = type
                this.$refs.message.open()
@@ -209,7 +231,7 @@
            focuss() {
                this.focus = false;
                setTimeout(() => {
                    this.matnr = '';
                    this.matNo = '';
                    this.matFocus = true;
                }, 100);
            },
@@ -228,7 +250,7 @@
                        result = result.data
                        if (result.code === 200 && result.data) {
                            that.matData = result.data
                            that.matnr = ''
                            that.matNo = ''
                            that.matData['batch'] = ''
                            uni.navigateTo({
                                url: "../mat/matSelected",
@@ -282,20 +304,23 @@
                    events: {
                        // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据  另外一个页面传过来的
                        acceptDataFromOpenedPage: function(data) {
                            that.matnr = data.data
                            that.findMat(that.matnr)
                            that.matNo = data.data
                            that.findMat(that.matNo)
                        },
                    },
                });
                that.matnr = ''
                that.matNo = ''
            },
            checkMat(mat) {
                var len = this.dataList.length
                var add = true ,sameItem = false
                for (var i = 0; i < len; i++) {
                    if (mat.matnr == this.dataList[i].matnr) {
                    console.log(i);
                    console.log(mat);
                    console.log(this.dataList[i].matNo);
                    if (mat.matNo == this.dataList[i].matNo) {
                        for (var j = 0; j < len; j++) {
                            if (mat.batch == this.dataList[j].batch) {
                                sameItem = true
@@ -324,7 +349,7 @@
            },
            // 修改批号
            revise(item, i) {
                this.matnr = this.dataList[i].matnr
                this.matNo = this.dataList[i].matNo
                this.count = this.dataList[i].anfme
                this.batch = this.dataList[i].batch
                this.weight = this.dataList[i].weight
@@ -359,7 +384,7 @@
                this.dataList[this.rowNum].batch = this.batch
                this.dataList[this.rowNum].weight = this.weight
                this.dataList[this.rowNum].appeTime$ = this.appeTime$
                this.matnr = ''
                this.matNo = ''
                this.messageText = "修改成功"
                this.messageToggle('success')
                this.$refs.revise.close()
@@ -394,10 +419,11 @@
                }
                for (var i = 0; i < that.dataList.length; i++) {
                    if (that.dataList[i].anfme == 0 || that.dataList[i].anfme == '') {
                        this.messageText = that.dataList[i].matnr + '组托数量不能为0'
                        this.messageText = that.dataList[i].matNo + '组托数量不能为0'
                        this.messageToggle('error')
                        return;
                    }
                    this.dataList[i].count = that.dataList[i].anfme
                }
                uni.request({
                    url: that.baseUrl + '/mobile/comb/auth',