lilei 3 år sedan
förälder
incheckning
78917b954f
1 ändrade filer med 7 tillägg och 2 borttagningar
  1. 7 2
      src/views/common/productCodeList.vue

+ 7 - 2
src/views/common/productCodeList.vue

@@ -77,8 +77,13 @@ export default {
       } else if (this.mode == 'multiple') { //  多选
         // 新增
         if (this.lastData.length < value.length) {
-          const ret = this.getRow(value[value.length - 1])
-          value = [...this.lastData, ret]
+          if (value.length <= 5) {
+            const ret = this.getRow(value[value.length - 1])
+            value = [...this.lastData, ret]
+          } else {
+            this.$message.info('最多选择5个通用编码')
+            return false
+          }
         } else {
           // 删除
           value.map(item => {