chengxiangling
2025-05-15 65f86f41dedbbbb7030e2f37ce3e001bbca4923a
src/views/mainPlan/abnormalPartNumberReport/index.vue
@@ -6,37 +6,36 @@
      ref="queryRef"
      :inline="true"
      v-show="showSearch"
      :label-width="locale === 'zh' ? '90px' : '200px'"
      label-position="left"
    >
      <el-row type="flex" justify="left">
        <el-col :span="locale === 'zh' ? 5 : 10">
          <el-form-item :label="$t('plan.query.itemNumber')" prop="itemNumber">
      <el-row :gutter="20">
        <el-col :span="8">
          <el-form-item :style="{ width: '100%'  }" :label="$t('plan.query.itemNumber')" prop="itemNum">
            <el-input
              :style="{ width: locale === 'zh' ? '140px' : '300px' }"
              v-model="queryParams.itemNumber"
              :placeholder="`${$t('plan.placeholder.requireTraceID')}`"
              v-model="queryParams.itemNum"
              :placeholder="`${$t('common.common.placeholder')}${$t('plan.query.itemNumber')}`"
              clearable
              @keyup.enter="handleQuery"
            />
          </el-form-item>
        </el-col>
        <el-col :span="locale === 'zh' ? 8 : 9">
        <el-col :span="8">
          <el-form-item
            :style="{ width: '100%'  }"
            :label="$t('plan.query.workOrderNo')"
            prop="documentNumber"
            prop="docNum"
          >
            <el-input
              :style="{ width: locale === 'zh' ? '140px' : '210px' }"
              v-model="queryParams.documentNumber"
              v-model="queryParams.docNum"
              :placeholder="`${$t('common.common.placeholder')}${$t(
                'plan.query.itemNumber'
                'plan.query.workOrderNo'
              )}`"
              clearable
              @keyup.enter="handleQuery"
            />
          </el-form-item>
        </el-col>
        <el-col :span="locale === 'zh' ? 11 : 5" style="text-align: right">
        <el-col :span="8" style="text-align: right">
          <el-form-item class="column-with-margin">
            <el-button type="primary" icon="Search" @click="handleQuery">{{
              $t("common.common.query")
@@ -56,7 +55,7 @@
          plain
          icon="Download"
          @click="handleExport"
          v-hasPermi="['Aps:apsPlatePlan:redundantOrderListExport']"
          v-hasPermi="['Aps:ApsPlateStandardRequireError:export']"
          >{{ $t("common.common.export") }}</el-button
        >
      </el-col>
@@ -82,20 +81,11 @@
  </div>
</template>
<script setup name="Calendar">
<script setup name="AbnormalPartNumberReport">
import HxlhTable from "@/components/HxlhTable";
import {
  listCalendar,
  getCalendar,
  delCalendar,
  addCalendar,
  updateCalendar,
} from "@/api/basicData/calendar";
import { redundantOrderList } from "@/api/basicData/sheetMetalConfig/sheetMetalConfig";
import axios from "axios";
import { listAll_plant } from "@/api/basicData/plant";
import { listAll_shop, listAps_shop } from "@/api/basicData/shop";
import { selectProcessNameList } from "@/api/basicData/processRoute.js";
import { plateStandardRequireErrorList } from "@/api/basicData/sheetMetalConfig/sheetMetalConfig.js";
import { useI18n } from "vue-i18n"; //要在js中使用国际化
const { t, locale } = useI18n();
const { proxy } = getCurrentInstance();
@@ -103,28 +93,16 @@
const orderList = ref([]);
const loading = ref(true);
const showSearch = ref(true);
const ids = ref([]);
const single = ref(true);
const multiple = ref(true);
const total = ref(0);
const title = ref("");
const data = reactive({
  form: {
    type: "1",
  },
  queryParams: {
    pageNum: 1,
    pageSize: 10,
    documentNumber: null,
    itemNumber: null,
    docNum: null,
    itemNum: null,
  },
});
const { queryParams, form, rules } = toRefs(data);
const typeRadioNumber = ref(1);
const plantList = ref([]);
const shopList = ref([]);
const allShopList = ref([]);
const processList = ref([]);
const height = ref(document.documentElement.clientHeight - 220 + "px;");
// 表格配置-列表
const columns = ref([]);
@@ -140,32 +118,17 @@
    columns.value = [
      {
        title: t("plan.table.workOrderNo"),
        field: "documentNumber",
        width: 150,
        field: "docNum",
        align: "center",
      },
      {
        title: t("plan.table.subItemPartNumber"),
        field: "itemNumber",
        width: 200,
        align: "center",
      },
      {
        title: t("plan.table.productionQuantity"),
        field: "productionQuantity",
        width: 200,
        align: "center",
      },
      {
        title: t("plan.table.mismatchedProductionQuantity"),
        field: "unmatchedQuantity",
        width: 200,
        title: t("plan.table.itemNumber"),
        field: "itemNum",
        align: "center",
      },
      {
        title: t("plan.table.applicableFactories"),
        field: "plant",
        width: 200,
        field: "orgCode",
        align: "center",
        formatter: ({ cellValue, row, column }) => {
          if (cellValue) {
@@ -178,37 +141,23 @@
        },
      },
      {
        title: t("plan.table.productionBase"),
        field: "productionBase",
        width: 200,
        title: t("plan.table.abnormalCause"),
        field: "message",
        align: "center",
      },
      {
        title: t("plan.table.planStartDay"),
        field: "planStartDay",
        width: 200,
        title: t("plan.table.creationTime"),
        field: "createTime",
        align: "center",
      },
      {
        title: t("plan.table.planEndDayDate"),
        field: "planEndDay",
        width: 100,
        align: "center",
      },
      {
        title: t("plan.table.workorderCreationTime"),
        field: "orderCreateTime",
        width: 100,
        align: "center",
      },
      }
    ];
  },
  { immediate: true, deep: true }
);
/** 查询日历管理列表 */
/** 查询料号异常工单列表 */
function getList() {
  loading.value = true;
  redundantOrderList(queryParams.value).then((response) => {
  plateStandardRequireErrorList(queryParams.value).then((response) => {
    orderList.value = response.rows;
    page.value.total = response.total;
    loading.value = false;
@@ -238,11 +187,11 @@
/** 导出按钮操作 */
function handleExport() {
  proxy.download(
    "aps/apsPlatePlan/redundantOrderListExport",
    "aps/ApsPlateStandardRequireError/export",
    {
      ...queryParams.value,
    },
    `redundantOrderList_${new Date().getTime()}.xlsx`
    `abnormalPartNumberReport_${new Date().getTime()}.xlsx`
  );
}
function changePageNo(currentPage) {