军泰伟业
1.已发货数量等于总数量时,状态为已发货。已发货数量小于总数量时,状态建议新增发货中
2.产品清除工艺路线点击确定后,仍然回显绑定的工艺路线
3.新增退货单时,退一部分货后,继续对此退货单进行退货操作,展示数据有误
已修改1个文件
14 ■■■■ 文件已修改
src/views/productionManagement/productionOrder/New.vue 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/productionOrder/New.vue
@@ -426,7 +426,8 @@
    const items = res.data || [];
    processRouteItemsOptions.value = items;
    
    // 自动添加工序
    // 自动添加工序,计划数使用基本信息的需求数量
    const demandQty = formState.value.quantity || 1;
    processRouteItems.value = items.map(item => ({
      processId: item.processId,
      processName: item.processName,
@@ -434,7 +435,7 @@
      userPower: item.userPower ? item.userPower.split(',') : [],
      planStartTime: "",
      planEndTime: "",
      planNum: 1,
      planNum: demandQty,
      isQuality: item.isQuality || false,
    }));
  });
@@ -496,13 +497,20 @@
  }
}, { deep: true });
// 监听需求数量变化,重新计算物料需求数量
// 监听需求数量变化,重新计算物料需求数量和工序计划数
watch(() => formState.value.quantity, (newQty) => {
  // 更新物料清单的需求数量
  if (productStructureRecords.value.length > 0 && newQty) {
    productStructureRecords.value.forEach(item => {
      item.demandedQuantity = (item.unitQuantity || 1) * newQty;
    });
  }
  // 更新工序的计划数
  if (processRouteItems.value.length > 0 && newQty) {
    processRouteItems.value.forEach(item => {
      item.planNum = newQty;
    });
  }
});
// 单位产出需要数量变化处理