Ver Fonte

目标管理-去掉月销售目标合并科室下的小计;修复当单价不存在时修改数量时销售目标值受到影响。

DongZ há 1 ano atrás
pai
commit
977bfc8a82
1 ficheiros alterados com 8 adições e 4 exclusões
  1. 8 4
      src/views/business/spd/target/MonthSaleGoal.vue

+ 8 - 4
src/views/business/spd/target/MonthSaleGoal.vue

@@ -332,7 +332,7 @@
                     </el-tooltip>
                   </template>
                 </el-table-column>
-                <el-table-column label="科室" align="center" prop="department" min-width="200">
+                <el-table-column label="科室" align="center" min-width="200">
                   <template slot-scope="scope">
                     <el-select v-model.trim="monthSaleGoalDetailsList[scope.$index].department" placeholder="请选择科室" filterable>
                       <el-option v-for="dict in dict.type.mk_bo_section" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
@@ -846,7 +846,8 @@
           num: null,
           monthly: new Date().getFullYear().toString() + '-' + (new Date().getMonth() + 1).toString().padStart(2,
             '0'),
-          goalValue: 0
+          goalValue: 0,
+          profitTargetValue: 0
         }
         this.monthSaleGoalDetailsList.push(list)
         this.computeTotal()
@@ -1012,7 +1013,8 @@
           department: row.department,
           num: row.num,
           monthly: row.monthly,
-          goalValue: row.goalValue
+          goalValue: row.goalValue,
+          profitTargetValue: row.profitTargetValue
         }
         this.monthSaleGoalDetailsList.push(list)
         this.computeTotal()
@@ -1319,7 +1321,9 @@
         })
       },
       calculate(row) {
-        row.goalValue = row.num * row.price;
+        if (!(row.price == 0 || row.price == null || row.price == undefined)) {
+          row.goalValue = row.num * row.price;
+        }
       },
       judge() {
         this.isDept = false;