linwenxin il y a 9 mois
Parent
commit
d807ba31dc

+ 18 - 1
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/hs_productColumns.js

@@ -212,6 +212,13 @@ export default {
                       .map((item, index_) => (
                         <el-option
                           key={index_}
+                          disabled={
+                            this.panduanduoxuandanxuan(
+                              this.serviceCategoryListMinusData?.filter(item => item.mainId === row.mainId),
+                              item,
+                              row.pgOrderProductRecycles
+                            ) && !~row.pgOrderProductRecycles?.indexOf(item.serviceCategoryItemId)
+                          }
                           label={`${item.categoryName}-${item.dictName}`}
                           value={item.serviceCategoryItemId}
                         ></el-option>
@@ -222,7 +229,7 @@ export default {
             ) : (
               <div style="padding-left:10px">
                 {this.serviceCategoryListMinusData
-                  .filter(item => row.pgOrderProductRecycles.includes(item.serviceCategoryItemId))
+                  .filter(item => row.pgOrderProductRecycles?.includes(item.serviceCategoryItemId))
                   .map(item => {
                     return `${item.categoryName}-${item.dictName}`
                   })
@@ -403,9 +410,19 @@ export default {
       ]
     }).then(res => {
       this.serviceCategoryListMinusData = res.data.records
+      console.log(this.serviceCategoryListMinusData)
     })
   },
   methods: {
+    panduanduoxuandanxuan(list, data, vals) {
+      if (data.typeOption === 'SIGIN') {
+        return !!list.filter(
+          item => !!~vals.indexOf(item.serviceCategoryItemId) && item.serviceCategoryId === data.serviceCategoryId
+        ).length
+      } else {
+        return false
+      }
+    },
     jisuanjiage(row, index) {
       var estimatePrice = 0
       var serviceAmount = 0

+ 2 - 3
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/workOrderLogic.js

@@ -76,8 +76,7 @@ export default {
   },
   data() {
     return {
-      orderInfo: null,
-      shezhi: false
+      orderInfo: null
     }
   },
   watch: {
@@ -104,7 +103,7 @@ export default {
       immediate: true
     },
     orderType(n, o) {
-      if (n !== o && o && this.orderInfo.orderProducts && this.shezhi) {
+      if (n !== o && o && this.orderInfo.orderProducts) {
         this.orderInfo.orderProducts = []
       }
     }