12
zhang
2 天以前 1880fd1498b69377b0f228913022c7bda2a1d629
pages/basics/order.vue
@@ -350,13 +350,16 @@
         checkMat(mat) {
            var len = this.matList.length
            var add = true
            for (var i = 0; i < len; i++) {
               if (mat.matnr == this.matList[i].matnr&&mat.batch == this.matList[i].batch&&mat.orderNo == this.matList[i].orderNo) {
                  this.matList[i].anfme += mat.anfme
                  this.$forceUpdate() // 强制刷新
                  add = false
               }
            }
            // for (var i = 0; i < len; i++) {
            //    if (mat.matnr == this.matList[i].tiaoma){
            //       uni.showToast({title: "条码重复扫了", icon: "none", position: 'top'})
            //    }
            //    // if (mat.matnr == this.matList[i].matnr&&mat.batch == this.matList[i].batch&&mat.orderNo == this.matList[i].orderNo) {
            //    //    this.matList[i].anfme += mat.anfme
            //    //    this.$forceUpdate() // 强制刷新
            //    //    add = false
            //    // }
            // }
            if (add) {
               this.matList.unshift(mat)
            }