Selaa lähdekoodia

fix: 优化受托收货单MBOM数据处理逻辑,初始化单价和折扣单价字段并移除单价必填校验

yusheng 9 kuukautta sitten
vanhempi
commit
cc1cf4d125

+ 3 - 0
src/views/saleManage/saleOrder/entrustedReceive/components/addOrEditDialog.vue

@@ -278,6 +278,9 @@
                   item.productId = item.categoryId;
                   item.productName = item.categoryName;
                   item.bomCode = item.bomCode;
+                  item.discountSinglePrice = 0;
+                  item.singlePrice = 0;
+
                   return item;
                 });
                 mbomCategoryList.push(...arr);

+ 2 - 3
src/views/saleManage/saleOrder/entrustedReceive/components/inventoryTable.vue

@@ -112,7 +112,7 @@
         <el-form-item
           style="margin-bottom: 20px"
           :prop="'datasource.' + scope.$index + '.singlePrice'"
-          :rules="[{ required: true, message: '请输入单价', trigger: 'blur' }]"
+         
         >
           <el-input
             v-model="scope.row.singlePrice"
@@ -450,7 +450,6 @@
             width: 150,
             prop: 'singlePrice',
             label: '单价',
-            headerSlot: 'headerTotalCount',
             slot: 'singlePrice',
             align: 'center'
           },
@@ -647,7 +646,7 @@
           'totalPrice',
           this.getTotalPrice(row).toFixed(2)
         );
-        this.$set(this.form.datasource[index], 'discountSinglePrice', val);
+        this.$set(this.form.datasource[index], 'discountSinglePrice', row.singlePrice);
         this.$set(
           this.form.datasource[index],
           'discountTotalPrice',