#
whycq
2024-02-21 b73a87680e8ba1594b02f7b2d5431d7d703299ed
#
2个文件已修改
88 ■■■■ 已修改文件
manifest.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/tzsk/pakin/pakin3.vue 86 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manifest.json
@@ -2,7 +2,7 @@
    "name" : "中扬WMS",
    "appid" : "__UNI__DA5854D",
    "description" : "",
    "versionName" : "20240103",
    "versionName" : "20240220A",
    "versionCode" : "100",
    "transformPx" : false,
    /* 5+App特有相关 */
pages/tzsk/pakin/pakin3.vue
@@ -343,8 +343,8 @@
                                // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据
                                events: {
                                    matList: function(data) {
                                        that.dataList.push(data.data)
                                        // that.checkMat(data.data)
                                        // that.dataList.push(data.data)
                                        that.checkMat(data.data)
                                        that.focuss()
                                    },
                                },
@@ -395,36 +395,74 @@
                that.matnr = ''
            },
            checkMat(mat) {
                var len = this.dataList.length
                var add = true ,sameItem = false
                for (var i = 0; i < len; i++) {
                let num = 0;
                let index = 0;
                mat.containerCode = ''
                mat.csocode = ''
                mat.isoseq = ''
                for (let i = 0; i < this.dataList.length; i++) {
                    if (mat.matnr == this.dataList[i].matnr) {
                        for (var j = 0; j < len; j++) {
                            if (mat.batch == this.dataList[j].batch) {
                                sameItem = true
                            }
                        }
                        // 相同物料 不同批号  新加列表
                        if (mat.batch != this.dataList[i].batch) {
                            this.$forceUpdate() // 强制刷新
                            if (sameItem) {
                                add = false
                        if (mat.batch == this.dataList[i].batch) {
                            index = i;
                            num++;
                            if (mat.containerCode != this.dataList[i].containerCode
                                || mat.csocode != this.dataList[i].csocode
                                || mat.isoseq != this.dataList[i].isoseq) {
                                num = 0;
                            } else {
                                add = true
                                num++;
                                break;
                            }
                        } else {
                            // 相同物料相同批号 数量累加
                            this.dataList[i].anfme += mat.anfme
                            this.$forceUpdate() // 强制刷新
                            add = false
                        }
                    }
                    }
                }
                if (add) {
                if (num == 0) {
                    this.dataList.unshift(mat)
                } else {
                    this.dataList[index].anfme += mat.anfme
                    this.$forceUpdate() // 强制刷新
                }
            },
            // var len = this.dataList.length
            // var add = true ,sameItem = false
            // for (var i = 0; i < len; i++) {
            //     if (mat.matnr == this.dataList[i].matnr) {
            //         // for (var j = 0; j < len; j++) {
            //         //     if (mat.batch == this.dataList[j].batch) {
            //         //         sameItem = true
            //         //     }
            //         // }
            //         // 相同物料 不同批号  新加列表
            //         if (mat.batch != this.dataList[i].batch) {
            //             this.$forceUpdate() // 强制刷新
            //             if (sameItem) {
            //                 add = false
            //             } else {
            //                 add = true
            //             }
            //         } else {
            //             // 相同物料相同批号 数量累加
            //             console.log(mat.containerCode);
            //             console.log(this.dataList[i].containerCode);
            //             if (this.dataList[i].containerCode != mat.containerCode
            //                 || this.dataList[i].csocode != mat.csocode
            //                 || this.dataList[i].isoseq != mat.isoseq) {
            //                 add = true
            //             } else {
            //                 this.dataList[i].anfme += mat.anfme
            //                 this.$forceUpdate() // 强制刷新
            //                 add = false
            //             }
            //         }
            //     }
            // }
            // if (add) {
            //     this.dataList.unshift(mat)
            // }
            // 修改批号
            revise(item, i) {
                this.matnr = this.dataList[i].matnr