Ver código fonte

Merge branch 'test' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-eom into dev

yusheng 8 meses atrás
pai
commit
c6fc38eadb
1 arquivos alterados com 5 adições e 2 exclusões
  1. 5 2
      src/BIZComponents/inventoryTable.vue

+ 5 - 2
src/BIZComponents/inventoryTable.vue

@@ -1823,7 +1823,7 @@
           row.key = this.form.datasource.length + 1;
           let parasm = idx == -1 ? row : this.form.datasource[i];
           console.log(this.defTaxRate, 'this.defTaxRate');
-          this.$set(parasm, 'taxRate', this.defTaxRate);
+
           this.$set(parasm, 'productId', item.id);
           this.$set(parasm, 'categoryName', item.name);
           this.$set(parasm, 'productCategoryId', item.categoryLevelId);
@@ -1846,6 +1846,9 @@
           if (item.colorKey) {
             this.$set(parasm, 'colorKey', item.colorKey.split(','));
           }
+          if (this.defTaxRate) {
+            this.$set(parasm, 'taxRate',parasm.taxRate ||this.defTaxRate);
+          }
           this.$set(
             parasm,
             'guaranteePeriodUnitCode',
@@ -1898,7 +1901,7 @@
             this.$set(parasm, 'discountSinglePrice', item.singlePrice);
             this.$set(parasm, 'totalCount', '');
           } else {
-            this.$set(parasm, 'singlePrice', 0); // 新增物品清单时,单价默认设为0
+            this.$set(parasm, 'singlePrice', parasm.singlePrice ||0); // 新增物品清单时,单价默认设为0
           }
 
           if (this.isSupplier) {