gaoluyang
6 天以前 fcbd44528e4344ab954329ba1b3016d976689503
宝东
1.销售管理新增产品时添加一个总数字段
已修改1个文件
6 ■■■■■ 文件已修改
src/views/salesManagement/salesLedger/index.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/salesLedger/index.vue
@@ -1817,6 +1817,12 @@
    if (type === "edit") {
      productForm.value = { ...row };
      productIndex.value = index;
      // 如果没有 totalQuantity,自动计算:总数 = 每件数量 * 数量
      if (!productForm.value.totalQuantity && productForm.value.quantity) {
        const singleQuantity = parseInt(productForm.value.singleQuantity) || 1;
        const quantity = parseFloat(productForm.value.quantity);
        productForm.value.totalQuantity = (quantity * singleQuantity).toFixed(0);
      }
      // 编辑时根据产品大类名称反查 tree 节点 id,并加载规格型号列表
      try {
        const options =