Procházet zdrojové kódy

Merge branch 'linwenxin_workOrder' of ssh://gogs.zfire.top:2222/zfire-front/zfire-newmall-admin

linwenxin před 1 rokem
rodič
revize
1c7d3fe865

+ 15 - 0
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/productColumns.js

@@ -200,6 +200,21 @@ export default {
                 <el-button size="mini" type="primary" onClick={() => {
                   this.appointVerify(this.getVfyKey(this.isEditIndex, false), (v) => {
                     if (v) {
+                      try {
+                        this.orderInfo.orderProducts.map((item, index_) => {
+                          var row = this.orderInfo.orderProducts[index_ + 1]
+                          if (row) {
+                            if (
+                              `${row.brandId}_${row.mainId}_${row.smallId}_${row.productName}` == `${item.brandId}_${item.mainId}_${item.smallId}_${item.productName}`
+                            ) {
+                              throw new Error('');
+                            }
+                          }
+                        })
+                      } catch (error) {
+                        this.$message.warning('产品机型重复')
+                        return
+                      }
                       this.isEditIndex = 0
                       this.orderInfo.orderProducts.unshift({
                         "brandId": "",