maven
8 天以前 351e2c4fd56d116061beff3cc335101b9a512f50
yys  完善生产管控
已修改6个文件
85 ■■■■ 文件已修改
src/views/production/components/ProductionDetailsTable.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/production/index.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/production/operationScheduling/components/ProductionDetailsTable.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/production/operationScheduling/components/ProductionDialog.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/production/operationScheduling/index.vue 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/production/productionReporting/index.vue 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/production/components/ProductionDetailsTable.vue
@@ -159,7 +159,7 @@
        label="操作"
        width="120"
        fixed="right"
        v-if="dialogType !== 'viewRow'"
        v-if="dialogType === 'add'"
    >
      <template #default="{ $index }">
        <el-button
src/views/production/index.vue
@@ -22,14 +22,14 @@
        <el-button type="success" :icon="Plus" @click="openDialog('add')">
          新增加工
        </el-button>
        <el-button
          type="danger"
          :icon="Delete"
          :disabled="!selectedRows.length"
          @click="() => deleteSelected(delPM)"
        >
          删除
        </el-button>
<!--        <el-button-->
<!--          type="danger"-->
<!--          :icon="Delete"-->
<!--          :disabled="!selectedRows.length"-->
<!--          @click="() => deleteSelected(delPM)"-->
<!--        >-->
<!--          删除-->
<!--        </el-button>-->
      </div>
      <!-- 数据表格 -->
      <ETable
src/views/production/operationScheduling/components/ProductionDetailsTable.vue
@@ -317,7 +317,7 @@
    const defaultRow = {
      process: "工序1",
      unit: "项",
      schedulingNum: "",
      schedulingNum: 0,
      workHours: "",
      schedulingDate: "",
      schedulingUserId: "",
src/views/production/operationScheduling/components/ProductionDialog.vue
@@ -17,7 +17,7 @@
          </el-button>
        </el-col>
        <el-col :span="4">
          <div style="font-size: 16px;">待排产数量:{{productionQuantity}}</div>
          <div style="font-size: 16px;">待排产数量:{{pendingQuantity}}</div>
        </el-col>
        <!-- <el-col :span="2">
          <el-button type="danger" @click="clearAllRows">
@@ -152,7 +152,7 @@
const copyForm = ref(null);
const coalList = ref([])
const supplierList = ref([]);
const productionQuantity = ref(0);
const pendingQuantity = ref(0);
// 工具函数
const debugIdMatching = () => {
@@ -199,7 +199,7 @@
};
const editInitialization = async (type, data) => {
  productionQuantity.value = data.productionQuantity;
  pendingQuantity.value = data.productionQuantity - data.pendingQuantity;
  copyForm.value = deepClone(data);
  tableData.value = data.productionInventoryList || [];
  detailsTableData.value = data.productionList || [];
@@ -290,10 +290,12 @@
  }
  let num = 0;
  detailsTableData.value.forEach((row) => {
    num += row.schedulingNum
    num += Number(row.schedulingNum)
  })
  if(productionQuantity.value <  num){
  console.log(num)
  if(pendingQuantity.value <  num){
    ElMessage.warning("待排产数量不能小于生产明细数量")
    return;
  }
  console.log(copyForm.value)
  detailsTableData.value.forEach((row) => {
@@ -301,7 +303,7 @@
    row.productionId = copyForm.value.id
    row.coalId = copyForm.value.coalId
  })
  detailsTableData.value[0].productionQuantity = copyForm.value.productionQuantity
  detailsTableData.value[0].productionQuantity = pendingQuantity.value
  try{
    const res = await addProductionScheduling(detailsTableData.value)
    if (res.code === 200) {
src/views/production/operationScheduling/index.vue
@@ -2,12 +2,12 @@
  <div class="app-container">
    <!-- 搜索表单 -->
    <el-form :inline="true" :model="queryParams" class="search-form">
      <el-form-item label="搜索">
        <el-input
            v-model="queryParams.searchAll"
            placeholder="请输入关键词"
            clearable
        />
      <el-form-item label="状态">
        <el-select style="width: 200px;" clearable v-model="queryParams.searchAll" placeholder="请选择状态">
          <el-option label="待排产" value="1"></el-option>
          <el-option label="排产中" value="2"></el-option>
          <el-option label="已排产" value="3"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="handleSearch">查询</el-button>
@@ -107,7 +107,12 @@
    }
  },
  { prop: "producer", label: "生产人", minWidth: 150 },
  { prop: "productionQuantity", label: "生产数量", minWidth: 120 },
  { prop: "productionQuantity", label: "排产数量", minWidth: 120 },
  { prop: "pendingQuantity", label: "已排产数量", minWidth: 120,
    formatter: (row) => {
      return row.pendingQuantity || '0';
    }
  },
  { prop: "laborCost", label: "人工成本", minWidth: 150 },
  { prop: "energyConsumptionCost", label: "能耗成本", minWidth: 120 },
  { prop: "equipmentDepreciation", label: "设备折旧", minWidth: 143 },
src/views/production/productionReporting/index.vue
@@ -2,12 +2,12 @@
  <div class="app-container">
    <!-- 搜索表单 -->
    <el-form :inline="true" :model="queryParams" class="search-form">
      <el-form-item label="搜索">
        <el-input
            v-model="queryParams.searchAll"
            placeholder="请输入关键词"
            clearable
        />
      <el-form-item label="状态">
        <el-select style="width: 200px;" clearable v-model="queryParams.searchAll" placeholder="请选择状态">
          <el-option label="待生产" value="1"></el-option>
          <el-option label="生产中" value="2"></el-option>
          <el-option label="已入库" value="3"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="handleSearch">查询</el-button>
@@ -18,16 +18,16 @@
    <!-- 主要内容区域 -->
    <el-card>
      <!-- 操作按钮 -->
      <div class="toolbar">
        <el-button
            type="danger"
            :icon="Delete"
            :disabled="!selectedRows.length"
            @click="() => deleteSelected(delProductionScheduling)"
        >
          删除
        </el-button>
      </div>
<!--      <div class="toolbar">-->
<!--        <el-button-->
<!--            type="danger"-->
<!--            :icon="Delete"-->
<!--            :disabled="!selectedRows.length"-->
<!--            @click="() => deleteSelected(delProductionScheduling)"-->
<!--        >-->
<!--          删除-->
<!--        </el-button>-->
<!--      </div>-->
      <!-- 数据表格 -->
      <ETable
          :showOverflowTooltip="false"