huminmin
昨天 74f21d10c2f29e4631ff1c17d07e3bd6b73ca0b8
造粒报工
已修改3个文件
218 ■■■■■ 文件已修改
src/views/productionManagement/productionReporting/index.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/workOrder/components/GranulationForm.vue 194 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/workOrder/index.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/productionReporting/index.vue
@@ -148,6 +148,12 @@
        :isEdit="false"
        :row="currentReportRowData"
        @refreshData="getList"/>
    <GranulationForm
        v-if="granulationFormVisible"
        v-model:isShow="granulationFormVisible"
        :isEdit="false"
        :row="currentReportRowData"
        @refreshData="getList"/>
    <Detail
        v-if="showDetail"
        v-model:isShow="showDetail"
@@ -167,9 +173,10 @@
import {productionProductMainListPage} from "@/api/productionManagement/productionProductMain.js";
import {userListNoPageByTenantId} from "@/api/system/user.js";
import InputModal from "@/views/productionManagement/productionReporting/Input.vue";
import VoltageSortingForm from "@/views/productionManagement/workOrder/components/VoltageSortingForm.vue";
const VoltageSortingForm = defineAsyncComponent(() => import("@/views/productionManagement/workOrder/components/VoltageSortingForm.vue"));
const CopperPrintingForm = defineAsyncComponent(() => import("@/views/productionManagement/workOrder/components/CopperPrintingForm.vue"));
const GranulationForm = defineAsyncComponent(() => import("@/views/productionManagement/workOrder/components/GranulationForm.vue"));
const Detail = defineAsyncComponent(() => import("@/views/productionManagement/productionReporting/components/Detail.vue"));
@@ -430,6 +437,7 @@
const isShowInput = ref(false);
const copperPrintingFormVisible = ref(false);
const voltageSortingFormVisible = ref(false);
const granulationFormVisible = ref(false);
const showDetail = ref(false);
const isShowingId = ref(0);
const showInput = row => {
@@ -457,6 +465,8 @@
    copperPrintingFormVisible.value = true;
  } else if (row.process === '电压分选') {
    voltageSortingFormVisible.value = true;
  } else if (row.process === '造粒') {
    granulationFormVisible.value = true;
  } else {
    showDetail.value = true;
  }
src/views/productionManagement/workOrder/components/GranulationForm.vue
@@ -102,7 +102,7 @@
      startTime: undefined,
      endTime: undefined,
      weightRatio: undefined, // 重量比(水/料)
      pva: undefined, // PVAn粘合剂重量
      pva: undefined, // PVA粘合剂重量
      dispersantWeight: undefined, // 分散剂重量
      releaseAgentWeight: undefined, // 脱模剂重量
    },
@@ -160,6 +160,12 @@
      case 'stirredMillConfirmId':
        formData.otherData.stirredMill.confirmName = selectedUser.userName;
        break;
      case 'granulationBUserId':
        formData.otherData.granulationB.userName = selectedUser.userName;
        break;
      case 'granulationBConfirmId':
        formData.otherData.granulationB.confirmName = selectedUser.userName;
        break;
    }
  } else {
    switch (reportType) {
@@ -181,12 +187,18 @@
      case 'stirredMillConfirmId':
        formData.otherData.stirredMill.confirmName = "";
        break;
      case 'granulationBUserId':
        formData.otherData.granulationB.userName = "";
        break;
      case 'granulationBConfirmId':
        formData.otherData.granulationB.confirmName = "";
        break;
    }
  }
};
// todo 修改作业员,在所有作业员中获取填入的值,如果没有则提示不提交
const handleReport = () => {
  if (!formData.otherData.userId && !formData.otherData.surfaceCopperPasteUserId && !formData.otherData.underlyingCopperPasteUserId) {
  if (!formData.otherData.stirredMillIncludesMixing.userId && !formData.otherData.stirredMill.userId && !formData.otherData.burningMaterial.userId && !formData.otherData.granulationB.userId) {
    ElMessage.error('请选择作业员')
    return;
  }
@@ -194,7 +206,7 @@
    ElMessage.error('请输入生产数量')
    return;
  }
  formData.userId = formData.otherData.surfaceCopperPasteUserId || formData.otherData.underlyingCopperPasteUserId;
  formData.userId = formData.otherData.stirredMillIncludesMixing.userId || formData.otherData.stirredMill.userId || formData.otherData.burningMaterial.userId || formData.otherData.granulationB.userId;
  const otherData = JSON.stringify(formData.otherData);
  const submitData = {
@@ -535,7 +547,7 @@
            <span v-else class="view-value">{{ displayValue(formData.otherData.burningMaterial.calcinationWeight) }}</span>
            <span>KG</span>
          </td>
          <td class="label"  colspan="2" rowspan="3">
          <td class="label"  colspan="2" rowspan="2">
            <span>确认人:</span>
            <el-select v-model="formData.otherData.burningMaterial.confirmId"
                       v-if="props.isEdit"
@@ -707,7 +719,177 @@
            <span v-else class="view-value">{{ displayValue(formData.otherData.stirredMill.confirmName || formData.otherData.stirredMill.confirmId) }}</span>
          </td>
        </tr>
        <!-- todo搅拌行开始,确认人行留空,已在上面表格预留 -->
        <tr>
          <td class="label"  colspan="2" rowspan="2">搅拌</td>
          <td class="label"  colspan="4">
            <span>开始时间:</span>
            <el-date-picker
                v-if="props.isEdit"
                v-model="formData.otherData.stir.startTime"
                type="datetime"
                value-format="YYYY-MM-DD HH:mm:ss"
                format="YYYY-MM-DD HH:mm:ss"
                placeholder="请选择"
                style="width: 100%"
            />
            <span v-else class="view-value">{{ displayValue(formData.otherData.stir.startTime) }}</span>
          </td>
          <td class="label"  colspan="4">
            <span>结束时间:</span>
            <el-date-picker
                v-if="props.isEdit"
                v-model="formData.otherData.stir.endTime"
                type="datetime"
                value-format="YYYY-MM-DD HH:mm:ss"
                format="YYYY-MM-DD HH:mm:ss"
                placeholder="请选择"
                style="width: 100%"
            />
            <span v-else class="view-value">{{ displayValue(formData.otherData.stir.endTime) }}</span>
          </td>
          <td class="label" colspan="4">
            <span>重量比(水/料):</span>
            <el-input v-if="props.isEdit" v-model="formData.otherData.stir.weightRatio" placeholder="请输入"/>
            <span v-else class="view-value">{{ displayValue(formData.otherData.stir.weightRatio) }}</span>
          </td>
        </tr>
        <tr>
          <td class="label" colspan="4">
            <span>PVA粘合剂重量 :</span>
            <el-input v-if="props.isEdit" v-model="formData.otherData.stir.pva" placeholder="请输入"/>
            <span v-else class="view-value">{{ displayValue(formData.otherData.stir.pva) }}</span>
          </td>
          <td class="label" colspan="4">
            <span>分散剂重量 :</span>
            <el-input v-if="props.isEdit" v-model="formData.otherData.stir.dispersantWeight" placeholder="请输入"/>
            <span v-else class="view-value">{{ displayValue(formData.otherData.stir.dispersantWeight) }}</span>
          </td>
          <td class="label" colspan="4">
            <span>脱模剂重量 :</span>
            <el-input v-if="props.isEdit" v-model="formData.otherData.stir.releaseAgentWeight" placeholder="请输入"/>
            <span v-else class="view-value">{{ displayValue(formData.otherData.stir.releaseAgentWeight) }}</span>
          </td>
        </tr>
        <tr>
          <td class="label"  colspan="2" rowspan="4">造粒</td>
          <td class="label"  colspan="6">
            <span>开始时间:</span>
            <el-date-picker
                v-if="props.isEdit"
                v-model="formData.otherData.granulationB.startTime"
                type="datetime"
                value-format="YYYY-MM-DD HH:mm:ss"
                format="YYYY-MM-DD HH:mm:ss"
                placeholder="请选择"
                style="width: 100%"
            />
            <span v-else class="view-value">{{ displayValue(formData.otherData.granulationB.startTime) }}</span>
          </td>
          <td class="label"  colspan="6">
            <span>结束时间:</span>
            <el-date-picker
                v-if="props.isEdit"
                v-model="formData.otherData.granulationB.endTime"
                type="datetime"
                value-format="YYYY-MM-DD HH:mm:ss"
                format="YYYY-MM-DD HH:mm:ss"
                placeholder="请选择"
                style="width: 100%"
            />
            <span v-else class="view-value">{{ displayValue(formData.otherData.granulationB.endTime) }}</span>
          </td>
          <td class="label"  colspan="2" rowspan="2">
            <span>作业员:</span>
            <el-select v-model="formData.otherData.granulationB.userId"
                       v-if="props.isEdit"
                       style="width: 100%"
                       placeholder="请选择作业员"
                       clearable
                       filterable
                       @change="handleUserChange($event, 'granulationBUserId')">
              <el-option v-for="user in userOptions"
                         :key="user.userId"
                         :label="user.userName"
                         :value="user.userId"/>
            </el-select>
            <span v-else class="view-value">{{ displayValue(formData.otherData.granulationB.userName || formData.otherData.granulationB.userId) }}</span>
          </td>
        </tr>
        <tr>
          <td class="label" colspan="4">
            <span>雾化器转速 :</span>
            <el-input  v-if="props.isEdit" v-model="formData.otherData.granulationB.atomizerRotationalSpeed" placeholder="请输入">
              <template #append>r/min</template>
            </el-input>
            <span v-else class="view-value">{{ displayValue(formData.otherData.granulationB.atomizerRotationalSpeed) }}</span>
          </td>
          <td class="label" colspan="4">
            <span>进口速度 :</span>
            <el-input v-if="props.isEdit" v-model="formData.otherData.granulationB.importSpeed" placeholder="请输入"/>
            <span v-else class="view-value">{{ displayValue(formData.otherData.granulationB.importSpeed) }}</span>
          </td>
          <td class="label" colspan="4">
            <span>出口速度 :</span>
            <el-input v-if="props.isEdit" v-model="formData.otherData.granulationB.outSpeed" placeholder="请输入"/>
            <span v-else class="view-value">{{ displayValue(formData.otherData.granulationB.outSpeed) }}</span>
          </td>
        </tr>
        <tr>
          <td class="label" colspan="6">
            <span>产出总数 :</span>
            <el-input  v-if="props.isEdit" v-model="formData.quantity" placeholder="请输入">
              <template #append>KG</template>
            </el-input>
            <span v-else class="view-value">{{ displayValue(formData.quantity) }}</span>
          </td>
          <td class="label" colspan="6">
            <span>合格重量 :</span>
            <el-input  v-if="props.isEdit" v-model="formData.otherData.granulationB.qualifiedWeight" placeholder="请输入">
              <template #append>KG</template>
            </el-input>
            <span v-else class="view-value">{{ displayValue(formData.otherData.granulationB.qualifiedWeight) }}</span>
          </td>
          <td class="label"  colspan="2" rowspan="2">
            <span>确认人:</span>
            <el-select v-model="formData.otherData.granulationB.confirmId"
                       v-if="props.isEdit"
                       style="width: 100%"
                       placeholder="请选择确认人"
                       clearable
                       filterable
                       @change="handleUserChange($event, 'stirredMillConfirmId')">
              <el-option v-for="user in userOptions"
                         :key="user.userId"
                         :label="user.userName"
                         :value="user.userId"/>
            </el-select>
            <span v-else class="view-value">{{ displayValue(formData.otherData.granulationB.confirmName || formData.otherData.granulationB.confirmId) }}</span>
          </td>
        </tr>
        <tr>
          <td class="label" colspan="6">
            <span>尾料 :</span>
            <el-input  v-if="props.isEdit" v-model="formData.otherData.granulationB.wasteMaterials" placeholder="请输入">
              <template #append>KG</template>
            </el-input>
            <span v-else class="view-value">{{ displayValue(formData.otherData.granulationB.wasteMaterials) }}</span>
          </td>
          <td class="label" colspan="6">
            <span>壁料 :</span>
            <el-input  v-if="props.isEdit" v-model="formData.otherData.granulationB.wallMaterial" placeholder="请输入">
              <template #append>KG</template>
            </el-input>
            <span v-else class="view-value">{{ displayValue(formData.otherData.granulationB.wallMaterial) }}</span>
          </td>
        </tr>
        <tr>
          <td class="label" colspan="16">
            <span>备注 :</span>
            <el-input  v-if="props.isEdit" v-model="formData.otherData.remark" placeholder="请输入"/>
            <span v-else class="view-value">{{ displayValue(formData.otherData.remark) }}</span>
          </td>
        </tr>
        </tbody>
      </table>
    </el-form>
src/views/productionManagement/workOrder/index.vue
@@ -234,6 +234,12 @@
        :isEdit="true"
        :row="currentReportRowData"
        @refreshData="getList"/>
    <GranulationForm
        v-if="granulationFormVisible"
        v-model:isShow="granulationFormVisible"
        :isEdit="true"
        :row="currentReportRowData"
        @refreshData="getList"/>
  </div>
</template>
@@ -261,6 +267,7 @@
const CopperPrintingForm = defineAsyncComponent(() => import("./components/CopperPrintingForm.vue"));
const VoltageSortingForm = defineAsyncComponent(() => import("./components/VoltageSortingForm.vue"));
const ProductionRecordForm = defineAsyncComponent(() => import("./components/ProductionRecordForm.vue"));
const GranulationForm = defineAsyncComponent(() => import("./components/GranulationForm.vue"));
const tableColumn = ref([
  {
    label: "优先级",
@@ -388,6 +395,7 @@
const editDialogVisible = ref(false);
const copperPrintingFormVisible = ref(false);
const voltageSortingFormVisible = ref(false);
const granulationFormVisible = ref(false);
const transferCardVisible = ref(false);
const transferCardData = ref([]);
const transferCardQrUrl = ref("");
@@ -665,6 +673,10 @@
    voltageSortingFormVisible.value = true
    return;
  }
  if (row.processName === '造粒') {
    granulationFormVisible.value = true
    return;
  }
  processParamList.value = await getProcessParamList(row)
  reportForm.planQuantity = row.planQuantity;
  reportForm.quantity = row.quantity !== undefined && row.quantity !== null ? row.quantity : null;