gaoluyang
昨天 fc925561cfcd7416ae6a5fec9f32b45633146f2b
1.海川开心-自动派工修改
已修改1个文件
22 ■■■■■ 文件已修改
src/views/productionManagement/productionDispatching/components/autoDispatchDia.vue 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/productionDispatching/components/autoDispatchDia.vue
@@ -17,13 +17,13 @@
        >
          <el-table-column label="序号" type="index" width="60" align="center" />
          <el-table-column label="合同号" prop="salesContractNo" width="200" />
          <el-table-column label="客户名称" prop="customerName" width="200" />
          <el-table-column label="客户名称" prop="customerName"/>
          <!-- <el-table-column label="项目名称" prop="projectName" width="250" /> -->
          <el-table-column label="产品大类" prop="productCategory" width="150" />
          <el-table-column label="规格型号" prop="specificationModel" width="200" />
          <el-table-column label="绑定机器" prop="speculativeTradingName" width="120" />
          <el-table-column label="绑定机器" prop="speculativeTradingName"/>
          <el-table-column label="总数量" prop="quantity" width="100" align="right" />
          <el-table-column label="已排产" prop="schedulingNum" width="100" align="right" fixed="right" />
<!--          <el-table-column label="已排产" prop="schedulingNum" width="100" align="right" fixed="right" />-->
          <el-table-column label="待排产" prop="pendingQuantity" width="100" align="right" fixed="right" />
          <el-table-column label="本次排产" width="150" align="center" fixed="right">
            <template #default="{ row }">
@@ -92,11 +92,17 @@
  dialogFormVisible.value = true;
  
  // 处理传入的数据
  dispatchList.value = rows.map(row => ({
    ...row,
    schedulingNum: 0, // 初始化本次排产数量为0
    pendingQuantity: (Number(row.quantity) || 0) - (Number(row.schedulingNum) || 0) // 计算待排产数量
  }))
  dispatchList.value = rows.map(row => {
    const quantity = Number(row.quantity) || 0;
    const scheduledNum = Number(row.schedulingNum) || 0; // 已排产数量
    const pendingQuantity = quantity - scheduledNum; // 计算待排产数量
    return {
      ...row,
      schedulingNum: pendingQuantity, // 本次排产数量初始化为待排产数量(排满)
      pendingQuantity: pendingQuantity // 待排产数量
    }
  })
}
// 提交表单