张诺
3 小时以前 b41552e7d56a7068e9080a475baaef9c173f8b7e
feat(生产报工): 支持多班组成员选择和补产数量录入

- 将报工人员选择从单选改为多选,支持选择多个班组成员
- 在生产报表中显示班组名称标签而非单个人员昵称
- 新增补产数量输入字段,完善报工数据收集
- 重置报工表单时初始化补产数量和班组列表
已修改2个文件
51 ■■■■ 文件已修改
src/views/productionManagement/productionReporting/index.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/workOrder/index.vue 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/productionReporting/index.vue
@@ -226,8 +226,14 @@
    },
    {
      label: "报工人员",
      prop: "nickName",
      prop: "teamNames",
      width: 120,
      dataType: "tag",
      formatData: val => {
        if (!val) return [];
        return val.split(",");
      }
    },
     {
      label: "机台",
src/views/productionManagement/workOrder/index.vue
@@ -186,6 +186,15 @@
                    placeholder="请输入本次生产数量"
                    @input="handleQuantityInput" />
        </el-form-item>
        <el-form-item label="补产数量"
                      prop="replenishQty">
          <el-input v-model.number="reportForm.replenishQty"
                    type="number"
                    min="0"
                    step="1"
                    style="width: 300px"
                    placeholder="请输入补产数量" />
        </el-form-item>
        <el-form-item label="报废数量"
                      prop="scrapQty">
          <el-input v-model.number="reportForm.scrapQty"
@@ -197,16 +206,22 @@
                    @input="handleScrapQtyInput" />
        </el-form-item>
        <el-form-item label="班组信息">
          <el-select v-model="reportForm.userId"
                     style="width: 300px"
                     placeholder="请选择班组信息"
                     clearable
                     filterable
                     @change="handleUserChange">
            <el-option v-for="user in userOptions"
                       :key="user.userId"
                       :label="user.nickName"
                       :value="user.userId" />
          <el-select
              v-model="reportForm.teamList"
              multiple
              filterable
              clearable
              collapse-tags
              value-key="userId"
              placeholder="请选择班组成员"
              style="width: 300px"
          >
            <el-option
                v-for="user in userOptions"
                :key="user.userId"
                :label="user.nickName"
                :value="{ userId: user.userId, userName: user.nickName }"
            />
          </el-select>
        </el-form-item>
        <el-form-item label="开始时间"
@@ -452,6 +467,7 @@
    productProcessRouteItemId: "",
    userId: "",
    productMainId: null,
    teamList:[]
  });
  // 本次生产数量验证规则
@@ -740,7 +756,6 @@
  };
  const showReportDialog = row => {
    const nowTime = dayjs().format("YYYY-MM-DD HH:mm:ss");
    currentReportRowData.value = row;
    reportForm.planQuantity = row.planQuantity - row.completeQuantity;
    reportForm.quantity =
@@ -751,8 +766,10 @@
    reportForm.productMainId = row.productMainId;
    reportForm.startTime = "";
    reportForm.endTime = "";
    reportForm.scrapQty =
      row.scrapQty !== undefined && row.scrapQty !== null ? row.scrapQty : null;
    reportForm.replenishQty = 0;
    reportForm.teamList = [];
    reportForm.scrapQty = 0;
    nextTick(() => {
      reportFormRef.value?.clearValidate();
    });