lilei 4 months ago
parent
commit
d4f649ecd8

+ 1 - 3
src/views/salesManagement/waitDispatchNew/detailProductList.vue

@@ -237,7 +237,6 @@ export default {
       // 格式化数据
       let f = 0
       let hasLt = false
-      let stockType
       this.dataSource.map((item, i) => {
         if (item.id.indexOf('promo-') >= 0) { f = f - 1 }
         item.no = i + 1 + f
@@ -258,12 +257,11 @@ export default {
         const productType3 = (item.productEntity && item.productEntity.productTypeName3) || (item.dealerProductEntity && item.dealerProductEntity.productTypeName3)
         if (productBrand && productBrand.indexOf('箭冠') >= 0 && productBrand && productType3.indexOf('轮胎') >= 0) {
           hasLt = true
-          stockType = item.dispatchBill && item.dispatchBill.stockType
         }
       })
       this.showEmpty = this.dataSource.length <= 0
       this.tableHeight = (this.showEmpty ? 300 : this.maxHeight) + 'px'
-      this.$emit('upStockType', hasLt, stockType)
+      this.$emit('upStockType', hasLt)
       this.spinning = false
       this.disabled = false
     },

+ 5 - 6
src/views/salesManagement/waitDispatchNew/edit.vue

@@ -119,6 +119,11 @@ export default {
         this.spinning = false
       })
     },
+    // 禁用库存类型选项
+    upStockType (hasLt) {
+      this.$refs.partQuery.stockDisabled = hasLt
+      this.$refs.partQuery.stockType = this.totalData.stockType
+    },
     // 添加产品
     insterProduct (list) {
       // 防止多次添加产品
@@ -145,12 +150,6 @@ export default {
         this.isInster = false
       })
     },
-    // 禁用库存类型选项
-    upStockType (hasLt, stockType) {
-      console.log(hasLt, stockType)
-      this.$refs.partQuery.stockDisabled = hasLt
-      this.$refs.partQuery.stockType = this.totalData.stockType
-    },
     // 整单取消
     cancelAll () {
       salesDetailCancleOfAll({ salesBillSn: this.salesBillSn }).then(res => {