CD配唱片
2025-05-06 e43b1580dfb5367478d30bfe3f9de985c6872986
提交标准工艺路线,钣金冗余工单,钣金供应缺口
已添加4个文件
2112 ■■■■■ 文件已修改
src/views/basicData/processRouteDataPreparate/index.vue 618 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mainPlan/sheetMetalOrderManage/index.vue 521 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mainPlan/sheetMetalRedundantReport/index.vue 478 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mainPlan/sheetMetalSupplyGap/index.vue 495 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basicData/processRouteDataPreparate/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,618 @@
<template>
  <div class="app-container">
    <el-row :gutter="20">
      <el-form
        :model="queryParams"
        ref="queryRef"
        :rules="rules"
        :inline="true"
        v-show="showSearch"
        label-width="68px"
      >
        <el-row :gutter="20">
          <el-col :span="6">
            <el-form-item label="料号" prop="itemCode">
              <el-input
                style="width: 240px"
                v-model="queryParams.itemCode"
                placeholder="请输入料号"
                clearable
                @keyup.enter="handleQuery"
              />
            </el-form-item>
          </el-col>
          <el-col :span="18" style="text-align: right">
            <el-form-item>
              <el-button type="primary" icon="Search" @click="handleQuery"
                >查询</el-button
              >
              <el-button icon="Refresh" @click="resetQuery">重置</el-button>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </el-row>
    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="success"
          plain
          icon="Refresh"
          @click="handleRefresh"
          v-hasPermi="['apsPartRouteStat:edit']"
          >更新</el-button
        >
      </el-col>
      <right-toolbar
        v-model:showSearch="showSearch"
        @queryTable="getList"
      ></right-toolbar>
    </el-row>
    <HxlhTable
      style="width: 100%"
      :columns="columns"
      :data="planList"
      :loading="loading"
      :height="height"
      @on-checkbox="handleCheckboxChange"
      :page="page"
      @changePageNo="changePageNo"
      @changePageSize="changePageSize"
      :expand-config="expandConfig"
      :subGridOptions="subGridOptions"
    >
    </HxlhTable>
  </div>
</template>
<script setup name="ApsPlatePlan">
import {
  listPlan,
  examplePlan,
  confirmPart,
} from "@/api/mainPlan/apsPlatePlan.js";
import { listProcessRoute } from "@/api/basicData/processRoute.js";
import HxlhTable from "@/components/HxlhTable/index.vue";
import { ref } from "vue";
import { getToken } from "@/utils/auth.js";
import { ElMessage } from "element-plus";
const { proxy } = getCurrentInstance();
// åˆ†é¡µå±žæ€§
const page = ref({
  total: 0,
  current: 1,
  size: 10
});
const {
  aps_is_suspended,
  aps_document_status,
  aps_account,
  aps_business_type,
} = proxy.useDict(
  "aps_is_suspended",
  "aps_document_status",
  "aps_account",
  "aps_business_type"
);
const exampleList = ref([]);
const planList = ref([]);
const loading = ref(true);
const showSearch = ref(true);
const single = ref(true);
const total = ref(0);
const daterangePlanStartDay = ref([]);
const daterangePlanEndDay = ref([]);
const height = ref(document.documentElement.clientHeight - 270 + "px;");
const isVisible = ref(false);
const isError = ref(false);
const planned = ref(true);
const batchNumber = ref(null);
const exampleHeight = ref("500px");
const uploadRef = ref();
/*** ç”¨æˆ·å¯¼å…¥å‚æ•° */
const upload = reactive({
  // æ˜¯å¦æ˜¾ç¤ºå¼¹å‡ºå±‚(用户导入)
  open: false,
  // å¼¹å‡ºå±‚标题(用户导入)
  title: "",
  // æ˜¯å¦ç¦ç”¨ä¸Šä¼ 
  isUploading: false,
  // æ˜¯å¦æ›´æ–°å·²ç»å­˜åœ¨çš„用户数据
  updateSupport: 0,
  // è®¾ç½®ä¸Šä¼ çš„请求头部
  headers: { Authorization: "Bearer " + getToken(), local: "zhl" },
  // ä¸Šä¼ çš„地址
  url: import.meta.env.VITE_APP_BASE_API + "/aps/apsPlatePlan/importData",
});
// è¡¨æ ¼é…ç½®
const exampleColumns = ref([
  { type: "seq", title: "序号", width: 60 },
  {
    title: "主计划员",
    field: "masterPlanner",
    width: 100,
  },
  {
    title: "周日",
    field: "weekDay",
    width: 100,
    formatter: ({ cellValue, row, column }) => {
      if (cellValue) {
        const weekDay = new Date(cellValue);
        const year = weekDay.getFullYear();
        const month = String(weekDay.getMonth() + 1).padStart(2, "0");
        const day = String(weekDay.getDate()).padStart(2, "0");
        return `${month}-${day}`;
      }
      return "";
    },
  },
  {
    title: "周度",
    field: "weekCycle",
    width: 80,
  },
  {
    title: "主件料号",
    field: "mainPartNumber",
    width: 150,
  },
  {
    title: "主件图号",
    field: "mainPartDrawingNumber",
    width: 150,
  },
  {
    title: "客户名称",
    field: "customer",
    width: 200,
  },
  {
    title: "业务类型",
    field: "businessType",
    width: 150,
  },
  {
    title: "单据号",
    field: "documentNumber",
    width: 150,
  },
  {
    title: "需求分类",
    field: "requirementType",
    width: 150,
  },
  {
    title: "单据状态",
    field: "documentStatus",
    width: 100,
  },
  {
    title: "料号",
    field: "itemNumber",
    width: 150,
  },
  {
    title: "图号",
    field: "drawingNo",
    width: 150,
  },
  {
    title: "版本号",
    field: "versionNumber",
    width: 100,
  },
  {
    title: "生产数量",
    field: "productionQuantity",
    width: 100,
  },
  {
    title: "良品数量",
    field: "goodProductsQuantity",
    width: 100,
  },
  {
    title: "工序号",
    field: "processNumber",
    width: 150,
  },
  {
    title: "工作中心",
    field: "workCenter",
    width: 150,
  },
  {
    title: "所属部门",
    field: "department",
    width: 100,
  },
  {
    title: "计划开工日",
    field: "planStartDay",
    width: 100,
  },
  {
    title: "计划完工日",
    field: "planEndDay",
    width: 100,
  },
  {
    title: "备料料号",
    field: "standbyNumber",
    width: 100,
  },
  {
    title: "备料名称",
    field: "standbyName",
    width: 200,
  },
  {
    title: "备料库存",
    field: "standbyStock",
    width: 100,
  },
  {
    title: "下道工序所属部门",
    field: "nextProcessDeparment",
    width: 180,
  },
  {
    title: "是否挂起",
    field: "isSuspended",
    width: 100,
  },
  {
    title: "外协标识",
    field: "isOutsourcing",
    width: 100,
  },
  {
    title: "账套",
    field: "account",
    width: 100,
  },
  // {
  //   title: '上阶物料',
  //   field: 'advancedMaterials',
  //   width: 100,
  // },
  // {
  //   title: '上阶单据号',
  //   field: 'advancedDocumentNumber',
  //   width: 100,
  // },
  // {
  //   title: '上阶需求日期',
  //   field: 'advancedRequirementDay',
  //   width: 150,
  // },
  // {
  //   title: '计划齐套',
  //   field: 'isPlanComplete',
  //   width: 100,
  // },
  // {
  //   title: '库存齐套',
  //   field: 'isStockComplete',
  //   width: 100,
  // },
  // {
  //   title: '是否有折返工序',
  //   field: 'hasTurnback',
  //   width: 150,
  // },
  // {
  //   title: '风险标识',
  //   field: 'hasRisk',
  //   width: 100,
  // },
]);
// è¡¨æ ¼é…ç½®
const columns = ref([
  {
    field: "expand",
    type: "expand",
    width: 60,
    align: "center",
    slots: { content: "expandContent" },
  },
  { type: "checkbox", width: 60, align: "center" },
  {
    title: "工艺路线ID",
    field: "mainPartNumber",
  },
  {
    title: "工艺路线版本",
    field: "businessType",
  },
  {
    title: "料号",
    field: "documentNumber",
  },
  {
    title: "生效日期",
    field: "requirementType",
  },
  {
    title: "失效日期",
    field: "documentStatus",
  },
  {
    title: "集成日期",
    field: "itemNumber",
  },
  {
    title: "适用工厂",
    field: "drawingNo",
  },
]);
const data = reactive({
  form: {},
  queryParams: {
    pageNum: 1,
    pageSize: 10,
    customer: null,
    documentNumber: null,
    itemCode: null,
  },
  rules: {
    itemCode: [{ required: true, message: "请输入料号", trigger: "blur" }],
  },
});
const { queryParams, form, rules } = toRefs(data);
function changePageNo(currentPage) {
  queryParams.value.pageNum = currentPage;
  page.value.current = currentPage;
  getList();
}
function changePageSize(pageSize) {
  page.value.current = 1;
  queryParams.value.pageNum = 1;
  queryParams.value.pageSize = pageSize;
  getList();
}
/** æŸ¥è¯¢é’£é‡‘计划临时管理列表 */
function getExampleList() {
  loading.value = true;
  queryParams.value = {};
  queryParams.value.batchNumber = batchNumber.value;
  examplePlan(queryParams.value).then((response) => {
    exampleList.value = response.rows;
    total.value = response.total;
    loading.value = false;
  });
}
/** æŸ¥è¯¢é›¶ä»¶è®¡åˆ’管理列表 */
function getList() {
  loading.value = true;
  queryParams.value.params = {};
  if (null != daterangePlanStartDay && "" !== daterangePlanStartDay) {
    queryParams.value.params["beginPlanStartDay"] =
      daterangePlanStartDay.value[0];
    queryParams.value.params["endPlanStartDay"] =
      daterangePlanStartDay.value[1];
  }
  if (null != daterangePlanEndDay && "" !== daterangePlanEndDay) {
    queryParams.value.params["beginPlanEndDay"] = daterangePlanEndDay.value[0];
    queryParams.value.params["endPlanEndDay"] = daterangePlanEndDay.value[1];
  }
  listPlan(queryParams.value).then((response) => {
    planList.value = response.rows;
    loading.value = false;
  });
}
/** æœç´¢æŒ‰é’®æ“ä½œ */
function handleQuery() {
  proxy.$refs["queryRef"].validate((valid) => {
    if (valid) {
      getList();
    }
  });
}
/** é‡ç½®æŒ‰é’®æ“ä½œ */
function resetQuery() {
  daterangePlanStartDay.value = [];
  daterangePlanEndDay.value = [];
  proxy.resetForm("queryRef");
  handleQuery();
}
// å¤šé€‰æ¡†é€‰ä¸­æ•°æ®
const handleCheckboxChange = (data) => {
  console.log(data);
};
/** æ‰¹é‡ä¿®æ”¹è®¡åˆ’开工日按钮操作 */
function plannedStart() {}
/** æ‰¹é‡ä¿®æ”¹è®¡åˆ’完工日按钮操作 */
function plannedEnd() {}
/** å¯¼å…¥æŒ‰é’®æ“ä½œ */
function handleImport() {
  upload.title = "钣金计划数据上传";
  upload.open = true;
}
/** å¯¼å‡ºæŒ‰é’®æ“ä½œ */
function handleExport() {
  proxy.download(
    "aps/apsPlatePlan/export",
    {
      ...queryParams.value,
    },
    `plan_${new Date().getTime()}.xlsx`
  );
}
/** ä¸‹è½½æ¨¡æ¿æ“ä½œ */
function importTemplate() {
  proxy.download(
    "system/user/importTemplate",
    {},
    `user_template_${new Date().getTime()}.xlsx`
  );
}
/** buildEexample */
function buildEexample() {
  proxy.$refs["uploadRef"].submit();
}
/**文件上传中处理 */
const handleFileUploadProgress = (event, file, fileList) => {
  upload.isUploading = true;
};
/** æ–‡ä»¶ä¸Šä¼ æˆåŠŸå¤„ç† */
const handleFileSuccess = (response, file, fileList) => {
  if (response.code == "200") {
    batchNumber.value = response.data;
    isVisible.value = true;
    planned.value = false;
    isError.value = false;
    getExampleList();
  } else {
    isError.value = true;
    proxy.$alert(
      "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
        response.msg +
        "</div>",
      "导入结果",
      { dangerouslyUseHTMLString: true }
    );
  }
  proxy.$refs["uploadRef"].handleRemove(file);
  upload.isUploading = false;
};
/** ä¸Šä¼ å¹¶è§£æžæŒ‰é’®æ“ä½œ */
function uploadParse() {
  queryParams.value.params = {};
  queryParams.value.params["batchNumber"] = batchNumber.value;
  confirmPart(queryParams.value).then((response) => {
    exampleList.value = response.rows;
    loading.value = false;
    isVisible.value = false;
    isError.value = false;
    planned.value = true;
    upload.open = false;
    ElMessage({
      message: "气体管路计划数据已成功上传和解析",
      type: "success",
    });
    getList();
  });
}
/** dialog取消 */
function dialogCancel() {
  if (uploadRef.value) {
    uploadRef.value.clearFiles();
  }
  isVisible.value = false;
  isError.value = false;
  planned.value = true;
  upload.open = false;
  upload.isUploading = false;
}
/*定义下拉二级表*/
const subGridOptions = reactive({
  border: true,
  showOverflow: true,
  columns: [
    {
      title: "工艺路线ID",
      field: "itemNo",
      width: 150,
      align: "center",
    },
    {
      title: "工序序号",
      field: "workOrderNo",
      width: 150,
      align: "center",
    },
    {
      title: "工序名称",
      field: "processNumber",
      width: 100,
      align: "center",
    },
    {
      title: "生效日期",
      field: "processName",
      width: 150,
      align: "center",
    },
    {
      title: "失效日期",
      field: "processPlanStartDay",
      width: 200,
      align: "center",
    },
    {
      title: "集成日期",
      field: "processPlanEndDay",
      width: 200,
      align: "center",
    },
    {
      title: "适用工厂",
      field: "standardTime",
      width: 90,
      align: "center",
    },
    {
      title: "适用车间",
      field: "processOrder",
      width: 90,
      align: "center",
    },
    {
      title: "产能模型",
      field: "integrationDay",
      width: 160,
      align: "center",
    },
    {
      title: "设计产能",
      field: "integrationDay",
      width: 160,
      align: "center",
    },
  ],
});
const expandConfig = ref({
  lazy: true,
  loadMethod({ row }) {
    // è°ƒç”¨æŽ¥å£
    return listProcessRoute({ workOrderNo: row.documentNumber }).then(
      (data) => {
        row.subList = data.rows;
      }
    );
  },
});
getList();
</script>
<style lang="css" scoped>
h4 {
  font-weight: bold;
}
</style>
src/views/mainPlan/sheetMetalOrderManage/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,521 @@
<template>
  <div class="app-container">
    <el-form
      class="responsive-form"
      :model="queryParams"
      ref="queryRef"
      :inline="true"
      v-show="showSearch"
      label-width="110px"
    >
        <el-form-item label="工单号" prop="description">
            <el-input
              style="width: 140px"
              v-model="queryParams.description"
              placeholder="请输入需求追溯ID"
              clearable
              @keyup.enter="handleQuery"
            />
          </el-form-item>
      <!-- <el-row type="flex" justify="left">
        <el-col :span="5"> -->
          <el-form-item label="需求追溯ID" prop="description">
            <el-input
              style="width: 140px"
              v-model="queryParams.description"
              placeholder="请输入需求追溯ID"
              clearable
              @keyup.enter="handleQuery"
            />
          </el-form-item>
        <!-- </el-col>
        <el-col :span="5"> -->
          <el-form-item label="料号" prop="description">
            <el-input
              style="width: 140px"
              v-model="queryParams.description"
              placeholder="请输入料号"
              clearable
              @keyup.enter="handleQuery"
            />
          </el-form-item>
          <el-form-item label="延迟风险标识" prop="description">
            <el-input
              style="width: 140px"
              v-model="queryParams.description"
              placeholder="请输入料号"
              clearable
              @keyup.enter="handleQuery"
            />
          </el-form-item>
        <!-- </el-col>
        <el-col :span="14" style="text-align: right"> -->
          <el-form-item class="column-with-margin">
            <el-button type="primary" icon="Search" @click="handleQuery"
              >查询</el-button
            >
            <el-button icon="Refresh" @click="resetQuery">重置</el-button>
          </el-form-item>
        <!-- </el-col>
      </el-row> -->
    </el-form>
    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
            type="primary"
            plain
            icon="Plus"
            :disabled="single"
            @click="handleUpdate"
            v-hasPermi="['apsPlatePlan:edit']"
        >批量更新工单计划日期</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
            type="success"
            plain
            icon="Edit"
            :disabled="single"
            @click="handleUpdate"
            v-hasPermi="['apsPlatePlan:edit']"
        >生成钣金计划工单</el-button>
      </el-col>
      <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>
    <HxlhTable
      style="width: 100%"
      :columns="columns"
      :data="calendarList"
      :loading="loading"
      :height="height"
      ref="tableRef"
      :page="page"
      @changePageNo="changePageNo"
      @changePageSize="changePageSize"
      @on-checkbox="handleCheckboxChange"
      class="auto-height-grid"
    >
    </HxlhTable>
  </div>
</template>
<script setup name="Calendar">
import HxlhTable from "@/components/HxlhTable";
import {
  listCalendar,
  getCalendar,
  delCalendar,
  addCalendar,
  updateCalendar,
} from "@/api/basicData/calendar";
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";
const { proxy } = getCurrentInstance();
const tableRef = ref();
const calendarList = 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,
    description: null,
    type: null,
    effectiveDate: null,
    expiringDate: null,
    content: null,
    applicableFactory: null,
    applicableWorkshop: null,
    applicableProcess: 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([
  { type: "checkbox", width: 60, align: "center" },
  {
    title: "需求ID",
    field: "description",
    width: 150,
    align: "center",
  },
  {
    title: "需求追溯ID",
    field: "type",
    width: 200,
    align: "center",
  },
  {
    title: "工单号",
    field: "effectiveDate",
    width: 200,
    align: "center",
  },
  {
    title: "匹配数量",
    field: "expiringDate",
    width: 200,
    align: "center",
  },
  {
    title: "工单类型",
    field: "expiringDate",
    width: 200,
    align: "center",
  },
  {
    title: "料号",
    field: "createTime",
    width: 200,
    align: "center",
  },
  {
    title: "主件图号",
    field: "createTime",
    width: 200,
    align: "center",
  },
  {
    title: "主件客户",
    field: "createTime",
    width: 200,
    align: "center",
  },
  {
    title: "生产数量",
    field: "updateTime",
    width: 100,
    align: "center",
  },
  {
    title: "需求日期",
    field: "updateTime",
    width: 100,
    align: "center",
  },
  {
    title: "适用工厂",
    field: "applicableFactory",
    width: 200,
    align: "center",
    formatter: ({ cellValue, row, column }) => {
      if (cellValue) {
        for (let i = 0; i < plantList.value.length; i++) {
          if (cellValue === plantList.value[i].plantCode) {
            return plantList.value[i].plantName;
          }
        }
      }
    },
  },
  {
    title: "生产基地",
    field: "updateTime",
    width: 100,
    align: "center",
  },
]);
// åˆ†é¡µå±žæ€§
const page = ref({
  total: 0,
  current: 1,
  size: 10,
});
/** æŸ¥è¯¢æ—¥åŽ†ç®¡ç†åˆ—è¡¨ */
function getList() {
  loading.value = true;
  listCalendar(queryParams.value).then((response) => {
    calendarList.value = response.rows;
    page.value.total = response.total;
    loading.value = false;
  });
  axios
    .all([
      /** æŸ¥è¯¢å·¥åŽ‚åˆ—è¡¨ */
      listAll_plant({}),
      /** æŸ¥è¯¢è½¦é—´åˆ—表 */
      listAll_shop({}),
    ])
    .then(
      axios.spread((response1, response2) => {
        plantList.value = response1.data;
        shopList.value = response2.data;
        loading.value = false;
      })
    )
    .catch((error) => {
      console.error("请求出错:", error);
    });
}
// å–消按钮
function cancel() {
  open.value = false;
  reset();
}
// è¡¨å•重置
function reset() {
  form.value = {
    id: null,
    description: null,
    type: "1",
    effectiveDate: null,
    expiringDate: null,
    content: null,
    applicableFactory: null,
    applicableWorkshop: null,
    applicableProcess: null,
    createBy: null,
    createTime: null,
    updateBy: null,
    updateTime: null,
  };
  proxy.resetForm("calendarRef");
}
/** æœç´¢æŒ‰é’®æ“ä½œ */
function handleQuery() {
  queryParams.value.pageNum = 1;
  getList();
}
/** é‡ç½®æŒ‰é’®æ“ä½œ */
function resetQuery() {
  proxy.resetForm("queryRef");
  handleQuery();
}
// å¤šé€‰æ¡†é€‰ä¸­æ•°æ®
function handleSelectionChange(selection) {
  ids.value = selection.map((item) => item.id);
  single.value = selection.length != 1;
  multiple.value = !selection.length;
}
/** æ–°å¢žæŒ‰é’®æ“ä½œ */
async function handleAdd() {
  reset();
  open.value = true;
  title.value = "添加日历管理";
}
/** é€‰æ‹©å·¥åŽ‚åŽäº‹ä»¶ åŠ è½½è½¦é—´ å’Œ å·¥åº **/
function changePlant(plant) {
  listAps_shop({ plantCode: plant }).then((response) => {
    shopList.value = response.rows;
  });
  selectProcessNameList({ orgCode: plant }).then((response) => {
    processList.value = response.rows;
  });
}
/** ä¿®æ”¹æŒ‰é’®æ“ä½œ */
function handleUpdate(row) {
  reset();
  const _id = row.id || ids.value;
  getCalendar(_id).then((response) => {
    form.value = response.data;
    // form.value.content = JSON.parse(response.data.content.value);
    if (form.value.type === "1") {
      weekDaysSettingList.value = JSON.parse(
        response.data.content.value
      ).weekdays;
    } else if (form.value.type === "2") {
      holidays.value = JSON.parse(response.data.content.value).holidays;
    }
    open.value = true;
    title.value = "修改日历管理";
  });
}
/** æäº¤æŒ‰é’® */
function submitForm() {
  proxy.$refs["calendarRef"].validate((valid) => {
    if (valid) {
      if (form.value.id != null) {
        if (form.value.type === "1") {
          updateCalendar({
            ...form.value,
            content: {
              weekdays: weekDaysSettingList.value,
            },
            applicableWorkshop: form.value.applicableWorkshop,
            applicableProcess: form.value.applicableProcess,
          }).then((response) => {
            proxy.$modal.msgSuccess("修改成功");
            open.value = false;
            getList();
          });
        } else if (form.value.type === "2") {
          updateCalendar({
            ...form.value,
            content: {
              holidays: holidays.value,
            },
            applicableWorkshop: form.value.applicableWorkshop,
            applicableProcess: form.value.applicableProcess,
          }).then((response) => {
            proxy.$modal.msgSuccess("修改成功");
            open.value = false;
            getList();
          });
        }
      } else {
        if (form.value.type === "1") {
          addCalendar({
            ...form.value,
            content: {
              weekdays: weekDaysSettingList.value,
            },
          }).then((response) => {
            proxy.$modal.msgSuccess("新增成功");
            open.value = false;
            getList();
          });
        } else if (form.value.type === "2") {
          addCalendar({
            ...form.value,
            content: {
              holidays: holidays.value,
            },
          }).then((response) => {
            proxy.$modal.msgSuccess("新增成功");
            open.value = false;
            getList();
          });
        }
      }
    }
  });
}
/** åˆ é™¤æŒ‰é’®æ“ä½œ */
function handleDelete(row) {
  const _ids = row.id || ids.value;
  proxy.$modal
    .confirm('是否确认删除日历管理编号为"' + _ids + '"的数据项?')
    .then(function () {
      return delCalendar(_ids);
    })
    .then(() => {
      getList();
      proxy.$modal.msgSuccess("删除成功");
    })
    .catch(() => {});
}
/** å¯¼å‡ºæŒ‰é’®æ“ä½œ */
function handleExport() {
  proxy.download(
    "core/calendar/export",
    {
      ...queryParams.value,
    },
    `calendar_${new Date().getTime()}.xlsx`
  );
}
function handleSwitchType(e) {
  typeRadioNumber.value = e;
  form.value.type = e;
  form.value.effectiveDate = null;
  form.value.expiringDate = null;
  form.value.content = null;
  form.value.applicableFactory = null;
  form.value.applicableWorkshop = null;
  form.value.applicableProcess = null;
}
function changePageNo(currentPage) {
  queryParams.value.pageNum = currentPage;
  page.value.current = currentPage;
  getList();
}
function changePageSize(pageSize) {
  page.value.current = 1;
  queryParams.value.pageNum = 1;
  queryParams.value.pageSize = pageSize;
  getList();
}
// å¤šé€‰æ¡†é€‰ä¸­æ•°æ®
const handleCheckboxChange = (data) => {
  ids.value = data.records.map((item) => item.id);
  single.value = data.records.length !== 1;
  multiple.value = !data.records.length;
};
onMounted(() => {
  getList();
});
</script>
<style lang="scss" scoped>
.column-with-margin {
  margin-right: 0px;
}
.title_bar_line {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  color: #333;
  margin-bottom: 10px;
  .line_short {
    width: 5%;
    height: 1px;
    margin-right: 20px;
    border-top: 1px solid #ddd;
  }
  .line_long {
    width: 60%;
    height: 1px;
    margin-left: 20px;
    border-top: 1px solid #ddd;
  }
}
.week_flex {
  display: flex;
  justify-content: flex-start;
  align-content: center;
  color: #606266;
  font-weight: 700;
  margin-left: 20px;
  &.mt20 {
    margin-top: 20px;
    margin-left: 0 !important;
  }
  .week_flex_item {
    &:nth-child(1) {
      margin-top: 5px;
    }
    &:nth-child(2) {
      margin-left: 20px;
    }
  }
}
.factory_use_item {
  margin-top: 10px;
}
.mart5 {
  margin-top: 5px;
}
.custom-height {
  height: 200px; /* æˆ–者使用 min-height */
}
.auto-height-grid .xe-body .xe-body--row {
  height: auto; /* æˆ–者使用 min-height */
}
</style>
src/views/mainPlan/sheetMetalRedundantReport/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,478 @@
<template>
  <div class="app-container">
    <el-form
      class="responsive-form"
      :model="queryParams"
      ref="queryRef"
      :inline="true"
      v-show="showSearch"
      label-width="90px"
    >
      <el-row type="flex" justify="left">
        <el-col :span="5">
          <el-form-item label="需求追溯ID" prop="description">
            <el-input
              style="width: 140px"
              v-model="queryParams.description"
              placeholder="请输入需求追溯ID"
              clearable
              @keyup.enter="handleQuery"
            />
          </el-form-item>
        </el-col>
        <el-col :span="5">
          <el-form-item label="料号" prop="description">
            <el-input
              style="width: 140px"
              v-model="queryParams.description"
              placeholder="请输入料号"
              clearable
              @keyup.enter="handleQuery"
            />
          </el-form-item>
        </el-col>
        <el-col :span="14" style="text-align: right">
          <el-form-item class="column-with-margin">
            <el-button type="primary" icon="Search" @click="handleQuery"
              >查询</el-button
            >
            <el-button icon="Refresh" @click="resetQuery">重置</el-button>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="Download"
          @click="handleExport"
          v-hasPermi="['core:calendar:export']"
          >导出</el-button
        >
      </el-col>
      <right-toolbar
        v-model:showSearch="showSearch"
        @queryTable="getList"
      ></right-toolbar>
    </el-row>
    <HxlhTable
      style="width: 100%"
      :columns="columns"
      :data="calendarList"
      :loading="loading"
      :height="height"
      ref="tableRef"
      :page="page"
      @changePageNo="changePageNo"
      @changePageSize="changePageSize"
      @on-checkbox="handleCheckboxChange"
      class="auto-height-grid"
    >
    </HxlhTable>
  </div>
</template>
<script setup name="Calendar">
import HxlhTable from "@/components/HxlhTable";
import {
  listCalendar,
  getCalendar,
  delCalendar,
  addCalendar,
  updateCalendar,
} from "@/api/basicData/calendar";
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";
const { proxy } = getCurrentInstance();
const tableRef = ref();
const calendarList = 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,
    description: null,
    type: null,
    effectiveDate: null,
    expiringDate: null,
    content: null,
    applicableFactory: null,
    applicableWorkshop: null,
    applicableProcess: 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([
  {
    title: "工单号",
    field: "description",
    width: 150,
    align: "center"
  },
  {
    title: "子件料号",
    field: "type",
    width: 200,
    align: "center"
  },
  {
    title: "生产数量",
    field: "effectiveDate",
    width: 200,
    align: "center",
  },
  {
    title: "未匹配生产数量",
    field: "expiringDate",
    width: 200,
    align: "center"
  },
  {
    title: "适用工厂",
    field: "applicableFactory",
    width: 200,
    align: "center",
    formatter: ({ cellValue, row, column }) => {
      if (cellValue) {
        for (let i = 0; i < plantList.value.length; i++) {
          if (cellValue === plantList.value[i].plantCode) {
            return plantList.value[i].plantName;
          }
        }
      }
    },
  },
  {
    title: "生产基地",
    field: "expiringDate",
    width: 200,
    align: "center"
  },
  {
    title: "计划开工日",
    field: "createTime",
    width: 200,
    align: "center",
  },
  {
    title: "计划完工日",
    field: "updateTime",
    width: 100,
    align: "center",
  },
  {
    title: "工单创建时间",
    field: "updateTime",
    width: 100,
    align: "center",
  },
]);
// åˆ†é¡µå±žæ€§
const page = ref({
  total: 0,
  current: 1,
  size: 10,
});
/** æŸ¥è¯¢æ—¥åŽ†ç®¡ç†åˆ—è¡¨ */
function getList() {
  loading.value = true;
  listCalendar(queryParams.value).then((response) => {
    calendarList.value = response.rows;
    page.value.total = response.total;
    loading.value = false;
  });
  axios
    .all([
      /** æŸ¥è¯¢å·¥åŽ‚åˆ—è¡¨ */
      listAll_plant({}),
      /** æŸ¥è¯¢è½¦é—´åˆ—表 */
      listAll_shop({}),
    ])
    .then(
      axios.spread((response1, response2) => {
        plantList.value = response1.data;
        shopList.value = response2.data;
        loading.value = false;
      })
    )
    .catch((error) => {
      console.error("请求出错:", error);
    });
}
// å–消按钮
function cancel() {
  open.value = false;
  reset();
}
// è¡¨å•重置
function reset() {
  form.value = {
    id: null,
    description: null,
    type: "1",
    effectiveDate: null,
    expiringDate: null,
    content: null,
    applicableFactory: null,
    applicableWorkshop: null,
    applicableProcess: null,
    createBy: null,
    createTime: null,
    updateBy: null,
    updateTime: null,
  };
  proxy.resetForm("calendarRef");
}
/** æœç´¢æŒ‰é’®æ“ä½œ */
function handleQuery() {
  queryParams.value.pageNum = 1;
  getList();
}
/** é‡ç½®æŒ‰é’®æ“ä½œ */
function resetQuery() {
  proxy.resetForm("queryRef");
  handleQuery();
}
// å¤šé€‰æ¡†é€‰ä¸­æ•°æ®
function handleSelectionChange(selection) {
  ids.value = selection.map((item) => item.id);
  single.value = selection.length != 1;
  multiple.value = !selection.length;
}
/** æ–°å¢žæŒ‰é’®æ“ä½œ */
async function handleAdd() {
  reset();
  open.value = true;
  title.value = "添加日历管理";
}
/** é€‰æ‹©å·¥åŽ‚åŽäº‹ä»¶ åŠ è½½è½¦é—´ å’Œ å·¥åº **/
function changePlant(plant) {
  listAps_shop({ plantCode: plant }).then((response) => {
    shopList.value = response.rows;
  });
  selectProcessNameList({ orgCode: plant }).then((response) => {
    processList.value = response.rows;
  });
}
/** ä¿®æ”¹æŒ‰é’®æ“ä½œ */
function handleUpdate(row) {
  reset();
  const _id = row.id || ids.value;
  getCalendar(_id).then((response) => {
    form.value = response.data;
    // form.value.content = JSON.parse(response.data.content.value);
    if (form.value.type === "1") {
      weekDaysSettingList.value = JSON.parse(
        response.data.content.value
      ).weekdays;
    } else if (form.value.type === "2") {
      holidays.value = JSON.parse(response.data.content.value).holidays;
    }
    open.value = true;
    title.value = "修改日历管理";
  });
}
/** æäº¤æŒ‰é’® */
function submitForm() {
  proxy.$refs["calendarRef"].validate((valid) => {
    if (valid) {
      if (form.value.id != null) {
        if (form.value.type === "1") {
          updateCalendar({
            ...form.value,
            content: {
              weekdays: weekDaysSettingList.value,
            },
            applicableWorkshop: form.value.applicableWorkshop,
            applicableProcess: form.value.applicableProcess,
          }).then((response) => {
            proxy.$modal.msgSuccess("修改成功");
            open.value = false;
            getList();
          });
        } else if (form.value.type === "2") {
          updateCalendar({
            ...form.value,
            content: {
              holidays: holidays.value,
            },
            applicableWorkshop: form.value.applicableWorkshop,
            applicableProcess: form.value.applicableProcess,
          }).then((response) => {
            proxy.$modal.msgSuccess("修改成功");
            open.value = false;
            getList();
          });
        }
      } else {
        if (form.value.type === "1") {
          addCalendar({
            ...form.value,
            content: {
              weekdays: weekDaysSettingList.value,
            },
          }).then((response) => {
            proxy.$modal.msgSuccess("新增成功");
            open.value = false;
            getList();
          });
        } else if (form.value.type === "2") {
          addCalendar({
            ...form.value,
            content: {
              holidays: holidays.value,
            },
          }).then((response) => {
            proxy.$modal.msgSuccess("新增成功");
            open.value = false;
            getList();
          });
        }
      }
    }
  });
}
/** åˆ é™¤æŒ‰é’®æ“ä½œ */
function handleDelete(row) {
  const _ids = row.id || ids.value;
  proxy.$modal
    .confirm('是否确认删除日历管理编号为"' + _ids + '"的数据项?')
    .then(function () {
      return delCalendar(_ids);
    })
    .then(() => {
      getList();
      proxy.$modal.msgSuccess("删除成功");
    })
    .catch(() => {});
}
/** å¯¼å‡ºæŒ‰é’®æ“ä½œ */
function handleExport() {
  proxy.download(
    "core/calendar/export",
    {
      ...queryParams.value,
    },
    `calendar_${new Date().getTime()}.xlsx`
  );
}
function handleSwitchType(e) {
  typeRadioNumber.value = e;
  form.value.type = e;
  form.value.effectiveDate = null;
  form.value.expiringDate = null;
  form.value.content = null;
  form.value.applicableFactory = null;
  form.value.applicableWorkshop = null;
  form.value.applicableProcess = null;
}
function changePageNo(currentPage) {
  queryParams.value.pageNum = currentPage;
  page.value.current = currentPage;
  getList();
}
function changePageSize(pageSize) {
  page.value.current = 1;
  queryParams.value.pageNum = 1;
  queryParams.value.pageSize = pageSize;
  getList();
}
// å¤šé€‰æ¡†é€‰ä¸­æ•°æ®
const handleCheckboxChange = (data) => {
  ids.value = data.records.map((item) => item.id);
  single.value = data.records.length !== 1;
  multiple.value = !data.records.length;
};
onMounted(() => {
  getList();
});
</script>
<style lang="scss" scoped>
.column-with-margin {
  margin-right: 0px;
}
.title_bar_line {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  color: #333;
  margin-bottom: 10px;
  .line_short {
    width: 5%;
    height: 1px;
    margin-right: 20px;
    border-top: 1px solid #ddd;
  }
  .line_long {
    width: 60%;
    height: 1px;
    margin-left: 20px;
    border-top: 1px solid #ddd;
  }
}
.week_flex {
  display: flex;
  justify-content: flex-start;
  align-content: center;
  color: #606266;
  font-weight: 700;
  margin-left: 20px;
  &.mt20 {
    margin-top: 20px;
    margin-left: 0 !important;
  }
  .week_flex_item {
    &:nth-child(1) {
      margin-top: 5px;
    }
    &:nth-child(2) {
      margin-left: 20px;
    }
  }
}
.factory_use_item {
  margin-top: 10px;
}
.mart5 {
  margin-top: 5px;
}
.custom-height {
  height: 200px; /* æˆ–者使用 min-height */
}
.auto-height-grid .xe-body .xe-body--row {
  height: auto; /* æˆ–者使用 min-height */
}
</style>
src/views/mainPlan/sheetMetalSupplyGap/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,495 @@
<template>
  <div class="app-container">
    <el-form
      class="responsive-form"
      :model="queryParams"
      ref="queryRef"
      :inline="true"
      v-show="showSearch"
      label-width="90px"
    >
      <el-row type="flex" justify="left">
        <el-col :span="5">
          <el-form-item label="需求追溯ID" prop="description">
            <el-input
              style="width: 140px"
              v-model="queryParams.description"
              placeholder="请输入需求追溯ID"
              clearable
              @keyup.enter="handleQuery"
            />
          </el-form-item>
        </el-col>
        <el-col :span="5">
          <el-form-item label="料号" prop="description">
            <el-input
              style="width: 140px"
              v-model="queryParams.description"
              placeholder="请输入料号"
              clearable
              @keyup.enter="handleQuery"
            />
          </el-form-item>
        </el-col>
        <el-col :span="14" style="text-align: right">
          <el-form-item class="column-with-margin">
            <el-button type="primary" icon="Search" @click="handleQuery"
              >查询</el-button
            >
            <el-button icon="Refresh" @click="resetQuery">重置</el-button>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="Download"
          @click="handleExport"
          v-hasPermi="['core:calendar:export']"
          >导出</el-button
        >
      </el-col>
      <right-toolbar
        v-model:showSearch="showSearch"
        @queryTable="getList"
      ></right-toolbar>
    </el-row>
    <HxlhTable
      style="width: 100%"
      :columns="columns"
      :data="calendarList"
      :loading="loading"
      :height="height"
      ref="tableRef"
      :page="page"
      @changePageNo="changePageNo"
      @changePageSize="changePageSize"
      @on-checkbox="handleCheckboxChange"
      class="auto-height-grid"
    >
    </HxlhTable>
  </div>
</template>
<script setup name="Calendar">
import HxlhTable from "@/components/HxlhTable";
import {
  listCalendar,
  getCalendar,
  delCalendar,
  addCalendar,
  updateCalendar,
} from "@/api/basicData/calendar";
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";
const { proxy } = getCurrentInstance();
const tableRef = ref();
const calendarList = 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,
    description: null,
    type: null,
    effectiveDate: null,
    expiringDate: null,
    content: null,
    applicableFactory: null,
    applicableWorkshop: null,
    applicableProcess: 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([
  {
    title: "需求ID",
    field: "description",
    width: 150,
    align: "center",
  },
  {
    title: "需求追溯ID",
    field: "type",
    width: 200,
    align: "center",
  },
  {
    title: "料号",
    field: "effectiveDate",
    width: 200,
    align: "center",
  },
  {
    title: "BOM低阶码",
    field: "expiringDate",
    width: 200,
    align: "center",
  },
  {
    title: "匹配状态",
    field: "expiringDate",
    width: 200,
    align: "center",
  },
  {
    title: "匹配模式",
    field: "createTime",
    width: 200,
    align: "center",
  },
  {
    title: "未匹配需求数量",
    field: "createTime",
    width: 200,
    align: "center",
  },
  {
    title: "计划开工日",
    field: "createTime",
    width: 200,
    align: "center",
  },
  {
    title: "计划完工日",
    field: "updateTime",
    width: 100,
    align: "center",
  },
  {
    title: "需求日期",
    field: "updateTime",
    width: 100,
    align: "center",
  },
  {
    title: "适用工厂",
    field: "applicableFactory",
    width: 200,
    align: "center",
    formatter: ({ cellValue, row, column }) => {
      if (cellValue) {
        for (let i = 0; i < plantList.value.length; i++) {
          if (cellValue === plantList.value[i].plantCode) {
            return plantList.value[i].plantName;
          }
        }
      }
    },
  },
  {
    title: "生产基地",
    field: "updateTime",
    width: 100,
    align: "center",
  },
]);
// åˆ†é¡µå±žæ€§
const page = ref({
  total: 0,
  current: 1,
  size: 10,
});
/** æŸ¥è¯¢æ—¥åŽ†ç®¡ç†åˆ—è¡¨ */
function getList() {
  loading.value = true;
  listCalendar(queryParams.value).then((response) => {
    calendarList.value = response.rows;
    page.value.total = response.total;
    loading.value = false;
  });
  axios
    .all([
      /** æŸ¥è¯¢å·¥åŽ‚åˆ—è¡¨ */
      listAll_plant({}),
      /** æŸ¥è¯¢è½¦é—´åˆ—表 */
      listAll_shop({}),
    ])
    .then(
      axios.spread((response1, response2) => {
        plantList.value = response1.data;
        shopList.value = response2.data;
        loading.value = false;
      })
    )
    .catch((error) => {
      console.error("请求出错:", error);
    });
}
// å–消按钮
function cancel() {
  open.value = false;
  reset();
}
// è¡¨å•重置
function reset() {
  form.value = {
    id: null,
    description: null,
    type: "1",
    effectiveDate: null,
    expiringDate: null,
    content: null,
    applicableFactory: null,
    applicableWorkshop: null,
    applicableProcess: null,
    createBy: null,
    createTime: null,
    updateBy: null,
    updateTime: null,
  };
  proxy.resetForm("calendarRef");
}
/** æœç´¢æŒ‰é’®æ“ä½œ */
function handleQuery() {
  queryParams.value.pageNum = 1;
  getList();
}
/** é‡ç½®æŒ‰é’®æ“ä½œ */
function resetQuery() {
  proxy.resetForm("queryRef");
  handleQuery();
}
// å¤šé€‰æ¡†é€‰ä¸­æ•°æ®
function handleSelectionChange(selection) {
  ids.value = selection.map((item) => item.id);
  single.value = selection.length != 1;
  multiple.value = !selection.length;
}
/** æ–°å¢žæŒ‰é’®æ“ä½œ */
async function handleAdd() {
  reset();
  open.value = true;
  title.value = "添加日历管理";
}
/** é€‰æ‹©å·¥åŽ‚åŽäº‹ä»¶ åŠ è½½è½¦é—´ å’Œ å·¥åº **/
function changePlant(plant) {
  listAps_shop({ plantCode: plant }).then((response) => {
    shopList.value = response.rows;
  });
  selectProcessNameList({ orgCode: plant }).then((response) => {
    processList.value = response.rows;
  });
}
/** ä¿®æ”¹æŒ‰é’®æ“ä½œ */
function handleUpdate(row) {
  reset();
  const _id = row.id || ids.value;
  getCalendar(_id).then((response) => {
    form.value = response.data;
    // form.value.content = JSON.parse(response.data.content.value);
    if (form.value.type === "1") {
      weekDaysSettingList.value = JSON.parse(
        response.data.content.value
      ).weekdays;
    } else if (form.value.type === "2") {
      holidays.value = JSON.parse(response.data.content.value).holidays;
    }
    open.value = true;
    title.value = "修改日历管理";
  });
}
/** æäº¤æŒ‰é’® */
function submitForm() {
  proxy.$refs["calendarRef"].validate((valid) => {
    if (valid) {
      if (form.value.id != null) {
        if (form.value.type === "1") {
          updateCalendar({
            ...form.value,
            content: {
              weekdays: weekDaysSettingList.value,
            },
            applicableWorkshop: form.value.applicableWorkshop,
            applicableProcess: form.value.applicableProcess,
          }).then((response) => {
            proxy.$modal.msgSuccess("修改成功");
            open.value = false;
            getList();
          });
        } else if (form.value.type === "2") {
          updateCalendar({
            ...form.value,
            content: {
              holidays: holidays.value,
            },
            applicableWorkshop: form.value.applicableWorkshop,
            applicableProcess: form.value.applicableProcess,
          }).then((response) => {
            proxy.$modal.msgSuccess("修改成功");
            open.value = false;
            getList();
          });
        }
      } else {
        if (form.value.type === "1") {
          addCalendar({
            ...form.value,
            content: {
              weekdays: weekDaysSettingList.value,
            },
          }).then((response) => {
            proxy.$modal.msgSuccess("新增成功");
            open.value = false;
            getList();
          });
        } else if (form.value.type === "2") {
          addCalendar({
            ...form.value,
            content: {
              holidays: holidays.value,
            },
          }).then((response) => {
            proxy.$modal.msgSuccess("新增成功");
            open.value = false;
            getList();
          });
        }
      }
    }
  });
}
/** åˆ é™¤æŒ‰é’®æ“ä½œ */
function handleDelete(row) {
  const _ids = row.id || ids.value;
  proxy.$modal
    .confirm('是否确认删除日历管理编号为"' + _ids + '"的数据项?')
    .then(function () {
      return delCalendar(_ids);
    })
    .then(() => {
      getList();
      proxy.$modal.msgSuccess("删除成功");
    })
    .catch(() => {});
}
/** å¯¼å‡ºæŒ‰é’®æ“ä½œ */
function handleExport() {
  proxy.download(
    "core/calendar/export",
    {
      ...queryParams.value,
    },
    `calendar_${new Date().getTime()}.xlsx`
  );
}
function handleSwitchType(e) {
  typeRadioNumber.value = e;
  form.value.type = e;
  form.value.effectiveDate = null;
  form.value.expiringDate = null;
  form.value.content = null;
  form.value.applicableFactory = null;
  form.value.applicableWorkshop = null;
  form.value.applicableProcess = null;
}
function changePageNo(currentPage) {
  queryParams.value.pageNum = currentPage;
  page.value.current = currentPage;
  getList();
}
function changePageSize(pageSize) {
  page.value.current = 1;
  queryParams.value.pageNum = 1;
  queryParams.value.pageSize = pageSize;
  getList();
}
// å¤šé€‰æ¡†é€‰ä¸­æ•°æ®
const handleCheckboxChange = (data) => {
  ids.value = data.records.map((item) => item.id);
  single.value = data.records.length !== 1;
  multiple.value = !data.records.length;
};
onMounted(() => {
  getList();
});
</script>
<style lang="scss" scoped>
.column-with-margin {
  margin-right: 0px;
}
.title_bar_line {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  color: #333;
  margin-bottom: 10px;
  .line_short {
    width: 5%;
    height: 1px;
    margin-right: 20px;
    border-top: 1px solid #ddd;
  }
  .line_long {
    width: 60%;
    height: 1px;
    margin-left: 20px;
    border-top: 1px solid #ddd;
  }
}
.week_flex {
  display: flex;
  justify-content: flex-start;
  align-content: center;
  color: #606266;
  font-weight: 700;
  margin-left: 20px;
  &.mt20 {
    margin-top: 20px;
    margin-left: 0 !important;
  }
  .week_flex_item {
    &:nth-child(1) {
      margin-top: 5px;
    }
    &:nth-child(2) {
      margin-left: 20px;
    }
  }
}
.factory_use_item {
  margin-top: 10px;
}
.mart5 {
  margin-top: 5px;
}
.custom-height {
  height: 200px; /* æˆ–者使用 min-height */
}
.auto-height-grid .xe-body .xe-body--row {
  height: auto; /* æˆ–者使用 min-height */
}
</style>