CD配唱片
2025-05-08 960ed35de06e571da5656050fa39106b2a3d2dba
提交钣金异常页面,前端项目自动导入element组件,i18n文件修改
已修改31个文件
已添加1个文件
已删除1个文件
817 ■■■■ 文件已修改
package.json 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/App.vue 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/components/Navbar.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/components/Settings/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/permission.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/plugins/download.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/plugins/modal.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/i18n/index.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/i18n/locales/common/index.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/i18n/locales/plan/index.js 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/request.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basicData/bom/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basicData/gasMaterialUsage/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basicData/processRoute/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basicData/processRouteDataPreparate/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basicData/resourceGroup/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basicData/sheetMetalParamConfig/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basicData/standardProcess/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mainPlan/abnormalPartNumberReport/index.vue 326 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mainPlan/abnormalProcessAnalysis/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mainPlan/gasPiping/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mainPlan/gasPlanning/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mainPlan/gasProduceStatics/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mainPlan/pipeProduceStatics/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mainPlan/platePlan/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mainPlan/platePlanList/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mainPlan/plateProcessStat/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mainPlan/sheetMetalOrderManage/index.vue 341 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/partPlan/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/register.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
vite/plugins/auto-import.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vite/plugins/index.js 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package.json
@@ -45,7 +45,8 @@
  "devDependencies": {
    "@vitejs/plugin-vue": "5.0.5",
    "sass": "1.77.5",
    "unplugin-auto-import": "0.17.6",
    "unplugin-auto-import": "^0.17.6",
    "unplugin-vue-components": "^28.5.0",
    "unplugin-vue-setup-extend-plus": "1.0.1",
    "vite": "5.3.2",
    "vite-plugin-compression": "0.5.1",
src/App.vue
@@ -1,15 +1,21 @@
<template>
  <router-view />
  <el-config-provider :locale="locale==='zh'?zhCnEl:enUsEl">
    <router-view />
  </el-config-provider>
</template>
<script setup>
import useSettingsStore from '@/store/modules/settings'
import { handleThemeStyle } from '@/utils/theme'
import { ElConfigProvider } from "element-plus";
import zhCnEl from "element-plus/es/locale/lang/zh-cn";
import enUsEl from "element-plus/es/locale/lang/en";
import { useI18n } from "vue-i18n"; //要在js中使用国际化
const { locale } = useI18n();
import useSettingsStore from "@/store/modules/settings";
import { handleThemeStyle } from "@/utils/theme";
onMounted(() => {
  nextTick(() => {
    // åˆå§‹åŒ–主题样式
    handleThemeStyle(useSettingsStore().theme)
  })
})
    handleThemeStyle(useSettingsStore().theme);
  });
});
</script>
src/layout/components/Navbar.vue
@@ -63,7 +63,7 @@
</template>
<script setup>
import { ElMessageBox } from "element-plus";
// import { ElMessageBox } from "element-plus";
import Breadcrumb from "@/components/Breadcrumb";
import TopNav from "@/components/TopNav";
import Hamburger from "@/components/Hamburger";
src/layout/components/Settings/index.vue
@@ -81,7 +81,7 @@
<script setup>
import variables from '@/assets/styles/variables.module.scss'
import axios from 'axios'
import { ElLoading, ElMessage } from 'element-plus'
// import { ElLoading, ElMessage } from 'element-plus'
import { useDynamicTitle } from '@/utils/dynamicTitle'
import useAppStore from '@/store/modules/app'
import useSettingsStore from '@/store/modules/settings'
src/main.js
@@ -54,7 +54,6 @@
VxeUITable.setI18n('zh-CN', zhCN)
VxeUITable.setI18n('en-US', enUS)
const app = createApp(App)
// å…¨å±€æ–¹æ³•挂载
app.config.globalProperties.useDict = useDict
app.config.globalProperties.download = download
@@ -84,7 +83,6 @@
// ä½¿ç”¨element-plus å¹¶ä¸”设置全局的大小
app.use(ElementPlus, {
  locale: locale,
  // æ”¯æŒ large、default、small
  size: Cookies.get('size') || 'default'
})
src/permission.js
@@ -1,5 +1,5 @@
import router from './router'
import { ElMessage } from 'element-plus'
// import { ElMessage } from 'element-plus'
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
import { getToken } from '@/utils/auth'
src/plugins/download.js
@@ -1,5 +1,5 @@
import axios from 'axios'
import { ElLoading, ElMessage } from 'element-plus'
// import { ElLoading, ElMessage } from 'element-plus'
import { saveAs } from 'file-saver'
import { getToken } from '@/utils/auth'
import errorCode from '@/utils/errorCode'
src/plugins/modal.js
@@ -1,4 +1,4 @@
import { ElMessage, ElMessageBox, ElNotification, ElLoading } from 'element-plus'
// import { ElMessage, ElMessageBox, ElNotification, ElLoading } from 'element-plus'
let loadingInstance;
src/utils/i18n/index.js
@@ -7,12 +7,12 @@
let EN = {
  plan: planEn,
  common: commonEn,
  basic: basicEn
  basic: basicEn,
}
let ZH = {
  plan: planZh,
  common: commonZh,
  basic: basicZh
  basic: basicZh,
}
const i18n = createI18n({
  locale: 'zh', // è®¾ç½®é»˜è®¤è¯­è¨€ä¸ºä¸­æ–‡
src/utils/i18n/locales/common/index.js
@@ -20,7 +20,8 @@
    cancel: "取消",
    placeholder:"请输入",
    view:"查看",
    viewDetails:"查看详情"
    viewDetails:"查看详情",
    operate:"操作"
  },
};
export const en = {
@@ -45,6 +46,7 @@
    cancel: "Cancel",
    placeholder:"Please enter the ",
    view:"View",
    viewDetails:"View details"
    viewDetails:"View details",
    operate:"Operate"
  },
};
src/utils/i18n/locales/plan/index.js
@@ -2,6 +2,10 @@
  title: {
    pipePlanCapacity: "管路产能规划",
    gasPlanCapacity: "气柜规划产能",
    viewAssociatedRequirements:"查看关联需求",
    setMode:"设置模式",
    CustomizePlannedCompletionDate:"自定义计划完工日",
    tipsBugSheetMetal:"将生成的钣金需求的计划开工日和计划完工日赋值给工单"
  },
  options: {
    monthlyStatic: "按月统计",
@@ -31,8 +35,11 @@
  btns: {
    batchPlanStartDay: "批量修改计划开工日",
    batchPlanEndDay: "批量修改计划完工日",
    batchUpdateOrderDate:"批量更新工单计划日期",
    generatePlanOrder:"生成钣金计划工单",
    confirm: "确定",
    cancel: "取消",
    viewRequirement:"查看需求"
  },
  query: {
    daterangePlanStartDay: "计划开工日",
@@ -157,13 +164,18 @@
    processRouteWorkingHours:"工艺路线工时",
    demandQuantity:"需求数量",
    netRequirement:"净需求量",
    bomItemID: "项 ID"
    bomItemID: "项 ID",
    customizePlannedCompletionDate:"自定义计划完工日"
  },
};
export const en = {
  title: {
    pipePlanCapacity: "Pipeline planning capacity",
    gasPlanCapacity: "Gas holder planning production capacity",
    viewAssociatedRequirements:"View associated requirements",
    setMode:"Set Mode",
    CustomizePlannedCompletionDate:"Customize the planned completion date",
    tipsBugSheetMetal:"Assign the planned start date and planned completion date of the generated sheet metal requirements to the work order"
  },
  options: {
    monthlyStatic: "Monthly statistics",
@@ -194,8 +206,11 @@
  btns: {
    batchPlanStartDay: "Batch modification of planned start date",
    batchPlanEndDay: "Batch modification plan completion date",
    batchUpdateOrderDate:"Batch update work order plan date",
    generatePlanOrder:"Generate sheet metal plan work order",
    confirm: "Confirm",
    cancel: "Cancel",
    viewRequirement:"View requirements"
  },
  query: {
    daterangePlanStartDay: "Planned start date",
@@ -319,6 +334,7 @@
    processRouteWorkingHours:"Process route working hours",
    demandQuantity:"Demand Quantity",
    netRequirement:"Net Requirement",
    bomItemID:"Item ID"
    bomItemID:"Item ID",
    customizePlannedCompletionDate:"Customize the planned completion date"
  },
};
src/utils/request.js
@@ -1,5 +1,5 @@
import axios from 'axios'
import {ElLoading, ElMessage, ElMessageBox, ElNotification} from 'element-plus'
// import {ElLoading, ElMessage, ElMessageBox, ElNotification} from 'element-plus'
import {getToken} from '@/utils/auth'
import errorCode from '@/utils/errorCode'
import {blobValidate, tansParams} from '@/utils/ruoyi'
src/views/basicData/bom/index.vue
@@ -131,7 +131,7 @@
} from "@/api/basicData/bom/bom.js";
import { listAll_plant } from "@/api/basicData/plant";
import HxlhTable from "@/components/HxlhTable/index.vue";
import { ElMessage } from "element-plus";
// import { ElMessage } from "element-plus";
import { useI18n } from "vue-i18n"; //要在js中使用国际化
const { t, locale } = useI18n();
const { proxy } = getCurrentInstance();
src/views/basicData/gasMaterialUsage/index.vue
@@ -139,7 +139,7 @@
import HxlhTable from "@/components/HxlhTable/index.vue";
import {ref} from "vue";
import {getToken} from "@/utils/auth.js";
import {ElMessage} from "element-plus";
// import {ElMessage} from "element-plus";
const {proxy} = getCurrentInstance();
src/views/basicData/processRoute/index.vue
@@ -206,7 +206,7 @@
import HxlhTable from "@/components/HxlhTable";
import { getToken } from "@/utils/auth";
import { ref } from "vue";
import { ElMessage } from "element-plus";
// import { ElMessage } from "element-plus";
const { proxy } = getCurrentInstance();
const processRouteList = ref([]);
src/views/basicData/processRouteDataPreparate/index.vue
@@ -134,7 +134,7 @@
import HxlhTable from "@/components/HxlhTable/index.vue";
import { ref } from "vue";
import { getToken } from "@/utils/auth.js";
import { ElMessage } from "element-plus";
// import { ElMessage } from "element-plus";
import { useI18n } from "vue-i18n"; //要在js中使用国际化
const { t, locale } = useI18n();
const { proxy } = getCurrentInstance();
src/views/basicData/resourceGroup/index.vue
@@ -161,7 +161,7 @@
import HxlhTable from '@/components/HxlhTable/index.vue'
import { getToken } from "@/utils/auth.js";
import { ref } from "vue";
import { ElMessage } from 'element-plus'
// import { ElMessage } from 'element-plus'
const { proxy } = getCurrentInstance();
const ApsResourceGroupList = ref([]);
src/views/basicData/sheetMetalParamConfig/index.vue
@@ -25,7 +25,7 @@
  queryConfigParams,
  queryConfigParamsSave,
} from "@/api/basicData/sheetMetalConfig/sheetMetalConfig";
import { ElMessage } from "element-plus";
// import { ElMessage } from "element-plus";
const { proxy } = getCurrentInstance();
// const { plate_plan_param } = proxy.useDict('plate_plan_param');
const ruleForm = ref({
src/views/basicData/standardProcess/index.vue
@@ -324,7 +324,7 @@
import HxlhTable from "@/components/HxlhTable/index.vue";
import { getToken } from "@/utils/auth.js";
import { ref } from "vue";
import { ElMessage } from "element-plus";
// import { ElMessage } from "element-plus";
const { proxy } = getCurrentInstance();
// åˆ†é¡µå±žæ€§
src/views/mainPlan/abnormalPartNumberReport/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,326 @@
<template>
  <div class="app-container">
    <el-form
      class="responsive-form"
      :model="queryParams"
      ref="queryRef"
      :inline="true"
      v-show="showSearch"
      :label-width="locale === 'zh' ? '90px' : '200px'"
    >
      <el-row type="flex" justify="left">
        <el-col :span="locale === 'zh' ? 5 : 10">
          <el-form-item :label="$t('plan.query.itemNumber')" prop="itemNumber">
            <el-input
              :style="{ width: locale === 'zh' ? '140px' : '300px' }"
              v-model="queryParams.itemNumber"
              :placeholder="`${$t('plan.placeholder.requireTraceID')}`"
              clearable
              @keyup.enter="handleQuery"
            />
          </el-form-item>
        </el-col>
        <el-col :span="locale === 'zh' ? 8 : 9">
          <el-form-item
            :label="$t('plan.query.workOrderNo')"
            prop="documentNumber"
          >
            <el-input
              :style="{ width: locale === 'zh' ? '140px' : '210px' }"
              v-model="queryParams.documentNumber"
              :placeholder="`${$t('common.common.placeholder')}${$t(
                'plan.query.itemNumber'
              )}`"
              clearable
              @keyup.enter="handleQuery"
            />
          </el-form-item>
        </el-col>
        <el-col :span="locale === 'zh' ? 11 : 5" style="text-align: right">
          <el-form-item class="column-with-margin">
            <el-button type="primary" icon="Search" @click="handleQuery">{{
              $t("common.common.query")
            }}</el-button>
            <el-button icon="Refresh" @click="resetQuery">{{
              $t("common.common.reset")
            }}</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="['Aps:apsPlatePlan:redundantOrderListExport']"
          >{{ $t("common.common.export") }}</el-button
        >
      </el-col>
      <right-toolbar
        v-model:showSearch="showSearch"
        @queryTable="getList"
      ></right-toolbar>
    </el-row>
    <HxlhTable
      style="width: 100%"
      :columns="columns"
      :data="orderList"
      :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 { 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 { useI18n } from "vue-i18n"; //要在js中使用国际化
const { t, locale } = useI18n();
const { proxy } = getCurrentInstance();
const tableRef = ref();
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,
  },
});
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([]);
// åˆ†é¡µå±žæ€§
const page = ref({
  total: 0,
  current: 1,
  size: 10,
});
watch(
  locale,
  (newLocale) => {
    columns.value = [
      {
        title: t("plan.table.workOrderNo"),
        field: "documentNumber",
        width: 150,
        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,
        align: "center",
      },
      {
        title: t("plan.table.applicableFactories"),
        field: "plant",
        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: t("plan.table.productionBase"),
        field: "productionBase",
        width: 200,
        align: "center",
      },
      {
        title: t("plan.table.planStartDay"),
        field: "planStartDay",
        width: 200,
        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) => {
    orderList.value = response.rows;
    page.value.total = response.total;
    loading.value = false;
  }).catch(()=>{
     loading.value = false;
  });
}
// è¡¨å•重置
function reset() {
  proxy.resetForm("queryRef");
}
/** æœç´¢æŒ‰é’®æ“ä½œ */
function handleQuery() {
  queryParams.value.pageNum = 1;
  page.value.current = 1;
  getList();
}
/** é‡ç½®æŒ‰é’®æ“ä½œ */
function resetQuery() {
  proxy.resetForm("queryRef");
  handleQuery();
}
/** å¯¼å‡ºæŒ‰é’®æ“ä½œ */
function handleExport() {
  proxy.download(
    "aps/apsPlatePlan/redundantOrderListExport",
    {
      ...queryParams.value,
    },
    `redundantOrderList_${new Date().getTime()}.xlsx`
  );
}
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();
}
onMounted(() => {
  getList();
  /** æŸ¥è¯¢å·¥åŽ‚åˆ—è¡¨ */
  listAll_plant({})
    .then((response) => {
      plantList.value = response.data;
    })
    .catch((error) => {
      console.error("请求出错:", error);
    });
});
</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/abnormalProcessAnalysis/index.vue
@@ -27,7 +27,7 @@
import HxlhTable from '@/components/HxlhTable/index.vue'
import { ref } from "vue";
import { getToken } from "@/utils/auth.js";
import { ElMessage} from "element-plus";
// import { ElMessage} from "element-plus";
const { proxy } = getCurrentInstance();
src/views/mainPlan/gasPiping/index.vue
@@ -257,7 +257,7 @@
import HxlhTable from "@/components/HxlhTable/index.vue";
import { ref } from "vue";
import { getToken } from "@/utils/auth.js";
import { ElMessage } from "element-plus";
// import { ElMessage } from "element-plus";
import { useI18n } from "vue-i18n"; //要在js中使用国际化
const { t, locale } = useI18n();
const { proxy } = getCurrentInstance();
src/views/mainPlan/gasPlanning/index.vue
@@ -515,7 +515,7 @@
  </div>
</template>
<script setup name="gasPlanning">
import { ElMessage } from "element-plus";
// import { ElMessage } from "element-plus";
import { listGasPlan, getGasPlanSave } from "@/api/mainPlan/gasPlanning";
const height = ref(document.documentElement.clientHeight - 400 + "px;");
import { useI18n } from "vue-i18n"; //要在js中使用国际化
src/views/mainPlan/gasProduceStatics/index.vue
@@ -89,7 +89,7 @@
} from "@/api/mainPlan/gasProduceStatics.js";
import { ref } from "vue";
import * as XLSX from "xlsx";
import { ElMessage } from "element-plus";
// import { ElMessage } from "element-plus";
import { useI18n } from "vue-i18n"; //要在js中使用国际化
const { t, locale } = useI18n();
const { proxy } = getCurrentInstance();
src/views/mainPlan/pipeProduceStatics/index.vue
@@ -93,7 +93,7 @@
} from "@/api/mainPlan/gasProduceStatics.js";
import { ref } from "vue";
import * as XLSX from "xlsx";
import { ElMessage } from "element-plus";
// import { ElMessage } from "element-plus";
import { useI18n } from "vue-i18n"; //要在js中使用国际化
const { t, locale } = useI18n();
const { proxy } = getCurrentInstance();
src/views/mainPlan/platePlan/index.vue
@@ -260,7 +260,7 @@
import HxlhTable from "@/components/HxlhTable/index.vue";
import { ref } from "vue";
import { getToken } from "@/utils/auth.js";
import { ElMessage } from "element-plus";
// import { ElMessage } from "element-plus";
import { useI18n } from "vue-i18n"; //要在js中使用国际化
const { proxy } = getCurrentInstance();
const { t, locale } = useI18n();
src/views/mainPlan/platePlanList/index.vue
@@ -116,7 +116,7 @@
import HxlhTable from "@/components/HxlhTable/index.vue";
import { getToken } from "@/utils/auth";
import { nextTick, onMounted, ref } from "vue";
import { ElMessage } from "element-plus";
// import { ElMessage } from "element-plus";
import { useI18n } from "vue-i18n"; //要在js中使用国际化
// import i18n from "@/utils/i18n";
// const t = i18n.global.t
src/views/mainPlan/plateProcessStat/index.vue
@@ -118,7 +118,7 @@
import HxlhTable from "@/components/HxlhTable/index.vue";
import { getToken } from "@/utils/auth";
import { ref } from "vue";
import { ElMessage } from "element-plus";
// import { ElMessage } from "element-plus";
const { proxy } = getCurrentInstance();
import { useI18n } from "vue-i18n"; //要在js中使用国际化
const { t, locale } = useI18n();
src/views/mainPlan/sheetMetalOrderManage/index.vue
@@ -6,44 +6,44 @@
      ref="queryRef"
      :inline="true"
      v-show="showSearch"
      label-width="110px"
      :label-width="locale=='zh'?'110px':'200px'"
    >
      <el-form-item label="工单号" prop="description">
      <el-form-item :label="$t('plan.query.workOrderNo')" prop="description">
        <el-input
          style="width: 140px"
          :style="{width:locale=='zh'? '200px':'280px'}"
          v-model="queryParams.description"
          placeholder="请输入需求追溯ID"
          :placeholder="`${$t('common.common.placeholder')}${$t('plan.query.workOrderNo')}`"
          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-form-item :label="$t('plan.query.requireTraceID')" prop="description">
        <el-input
          style="width: 140px"
          :style="{width:locale=='zh'? '200px':'280px'}"
          v-model="queryParams.description"
          placeholder="请输入需求追溯ID"
          :placeholder="`${$t('common.common.placeholder')}${$t('plan.query.requireTraceID')}`"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
      <!-- </el-col>
        <el-col :span="5"> -->
      <el-form-item label="料号" prop="description">
      <el-form-item :label="$t('plan.query.itemNumber')" prop="description">
        <el-input
          style="width: 140px"
          :style="{width:locale=='zh'? '200px':'280px'}"
          v-model="queryParams.description"
          placeholder="请输入料号"
          :placeholder="`${$t('common.common.placeholder')}${$t('plan.query.itemNumber')}`"
          clearable
          @keyup.enter="handleQuery"
        />
      </el-form-item>
      <el-form-item label="延迟风险标识" prop="description">
      <el-form-item :label="$t('plan.table.delayRiskIdentification')" prop="description">
        <el-input
          style="width: 140px"
          :style="{width:locale=='zh'? '200px':'280px'}"
          v-model="queryParams.description"
          placeholder="请输入料号"
          :placeholder="`${$t('common.common.placeholder')}${$t('plan.table.delayRiskIdentification')}`"
          clearable
          @keyup.enter="handleQuery"
        />
@@ -52,9 +52,9 @@
        <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
          >{{$t('common.common.query')}}</el-button
        >
        <el-button icon="Refresh" @click="resetQuery">重置</el-button>
        <el-button icon="Refresh" @click="resetQuery">{{$t('common.common.reset')}}</el-button>
      </el-form-item>
      <!-- </el-col>
      </el-row> -->
@@ -69,7 +69,7 @@
          :disabled="multiple"
          @click="handleBatchUpdatePlanDate"
          v-hasPermi="['apsPlatePlan:edit']"
          >批量更新工单计划日期</el-button
          >{{$t('plan.btns.batchUpdateOrderDate')}}</el-button
        >
      </el-col>
      <el-col :span="1.5">
@@ -79,7 +79,7 @@
          icon="Edit"
          @click="handleUpdate"
          v-hasPermi="['apsPlatePlan:edit']"
          >生成钣金计划工单</el-button
          >{{$t('plan.btns.generatePlanOrder')}}</el-button
        >
      </el-col>
      <right-toolbar
@@ -98,7 +98,6 @@
      @changePageNo="changePageNo"
      @changePageSize="changePageSize"
      @on-checkbox="handleCheckboxChange"
      class="auto-height-grid"
    >
      <template #buttons="{ row }">
        <el-button
@@ -106,12 +105,12 @@
          link
          @click="handleCheckView(row)"
          v-hasPermi="['aps:calendar:update']"
          >查看需求</el-button
          >{{$t('plan.btns.viewRequirement')}}</el-button
        >
      </template>
    </HxlhTable>
    <el-dialog
      :title="'查看关联需求'"
      :title="$t('plan.title.viewAssociatedRequirements')"
      v-model="openDialog"
      width="900px"
      append-to-body
@@ -126,15 +125,41 @@
      </HxlhTable>
    </el-dialog>
    <el-dialog
      :title="'批量更新工单计划日期'"
      :title="$t('plan.btns.batchUpdateOrderDate')"
      v-model="openBatchDialog"
      width="900px"
      append-to-body
    >
      <div class="mode_box">
        <span>{{$t('plan.title.setMode')}}</span>
        <el-radio-group v-model="radio">
          <el-radio :label="1">{{$t('plan.btns.batchUpdateOrderDate')}}</el-radio>
          <el-radio :label="2">{{$t('plan.title.CustomizePlannedCompletionDate')}}</el-radio>
        </el-radio-group>
      </div>
      <div class="red_color">{{$t('plan.title.tipsBugSheetMetal')}}</div>
      <div class="mode_box" v-if="radio===2">
        <span>{{$t('plan.title.CustomizePlannedCompletionDate')}}</span>
        <el-date-picker
          v-model="value4"
          type="dates"
          :placeholder="$t('plan.title.CustomizePlannedCompletionDate')"
        />
      </div>
      <HxlhTable
        v-if="radio===1"
        style="width: 100%"
        :columns="subGridOptions"
        :data="subList"
        :columns="subUpdateGridOptions"
        :data="subUpdateList"
        :loading="loading"
        :height="heightSub"
      >
      </HxlhTable>
      <HxlhTable
        v-if="radio===2"
        style="width: 100%"
        :columns="subUpdateCustomGridOptions"
        :data="subUpdateList"
        :loading="loading"
        :height="heightSub"
      >
@@ -159,9 +184,14 @@
import { useI18n } from "vue-i18n"; //要在js中使用国际化
const { t, locale } = useI18n();
const { proxy } = getCurrentInstance();
const radio = ref(1);
const openDialog = ref(false);
const openBatchDialog = ref(false);
const subGridOptions = ref([]);
const subUpdateGridOptions = ref([]);
const subUpdateCustomGridOptions = ref([]);
const subList = ref([]);
const subUpdateList = ref([]);
// const tableRef = ref();
const calendarList = ref([]);
const loading = ref(true);
@@ -314,7 +344,7 @@
        align: "center",
      },
      {
        title: "操作",
        title: t("common.common.operate"),
        width: 100,
        fixed: "right",
        slots: { default: "buttons" },
@@ -377,12 +407,6 @@
        align: "center",
      },
      {
        title: t("plan.table.requirementPlanCompletionDate"),
        field: "updateTime",
        width: 100,
        align: "center",
      },
      {
        title: t("plan.table.planStartDay"),
        field: "updateTime",
        width: 100,
@@ -419,20 +443,135 @@
        align: "center",
      },
    ];
    subUpdateGridOptions.value = [
      {
        title: t("basic.table.requirementID"),
        field: "description",
        width: 150,
        align: "center",
      },
      {
        title: t("basic.table.requirementTraceabilityID"),
        field: "type",
        width: 200,
        align: "center",
      },
      {
        title: t("plan.table.workOrderNo"),
        field: "effectiveDate",
        width: 200,
        align: "center",
      },
      {
        title: t("basic.table.matchQuantity"),
        field: "expiringDate",
        width: 200,
        align: "center",
      },
      {
        title: t("basic.table.workOrderType"),
        field: "expiringDate",
        width: 200,
        align: "center",
      },
      {
        title: t("plan.table.itemNumber"),
        field: "createTime",
        width: 200,
        align: "center",
      },
      {
        title: t("plan.table.planStartDay"),
        field: "updateTime",
        width: 100,
        align: "center",
      },
      {
        title: t("plan.table.planEndDayDate"),
        field: "updateTime",
        width: 100,
        align: "center",
      },
      {
        title: t("plan.table.startDateOfDemandPlan"),
        field: "updateTime",
        width: 100,
        align: "center",
      },
      {
        title: t("plan.table.requirementPlanCompletionDate"),
        field: "updateTime",
        width: 100,
        align: "center",
      },
    ];
    subUpdateCustomGridOptions.value = [
      {
        title: t("basic.table.requirementID"),
        field: "description",
        width: 150,
        align: "center",
      },
      {
        title: t("basic.table.requirementTraceabilityID"),
        field: "type",
        width: 200,
        align: "center",
      },
      {
        title: t("plan.table.workOrderNo"),
        field: "effectiveDate",
        width: 200,
        align: "center",
      },
      {
        title: t("basic.table.matchQuantity"),
        field: "expiringDate",
        width: 200,
        align: "center",
      },
      {
        title: t("basic.table.workOrderType"),
        field: "expiringDate",
        width: 200,
        align: "center",
      },
      {
        title: t("plan.table.itemNumber"),
        field: "createTime",
        width: 200,
        align: "center",
      },
      {
        title: t("plan.table.planStartDay"),
        field: "updateTime",
        width: 100,
        align: "center",
      },
      {
        title: t("plan.table.planEndDayDate"),
        field: "updateTime",
        width: 100,
        align: "center",
      },
      {
        title: t("plan.table.customizePlannedCompletionDate"),
        field: "updateTime",
        width: 100,
        align: "center",
      },
    ]
  },
  {
    immediate: true,
    deep: true,
  }
);
function handleBatchUpdatePlanDate(){
  openBatchDialog.value = true
function handleBatchUpdatePlanDate() {
  openBatchDialog.value = true;
}
function handleCheckView(row) {
  openDialog.value = true;
  // listProcessRoute({ workOrderNo: row.documentNumber }).then((data) => {
  //   subList.value = data.rows;
  // });
}
/** æŸ¥è¯¢æ—¥åŽ†ç®¡ç†åˆ—è¡¨ */
function getList() {
@@ -442,48 +581,26 @@
    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);
    });
  // 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");
}
@@ -498,29 +615,6 @@
  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 changePageNo(currentPage) {
  queryParams.value.pageNum = currentPage;
  page.value.current = currentPage;
@@ -534,9 +628,11 @@
}
// å¤šé€‰æ¡†é€‰ä¸­æ•°æ®
const handleCheckboxChange = (data) => {
  console.log(data, "handleCheckboxChange");
  ids.value = data.records.map((item) => item.id);
  single.value = data.records.length !== 1;
  multiple.value = !data.records.length;
  subUpdateList.value = data.records;
};
onMounted(() => {
  getList();
@@ -546,55 +642,18 @@
.column-with-margin {
  margin-right: 0px;
}
.title_bar_line {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  color: #333;
.mode_box{
  margin-left: 30px;
  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;
  & span{
    padding-right: 20px;
  }
}
.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;
.red_color{
  color:#f56c6c;
  margin-bottom: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/partPlan/index.vue
@@ -299,7 +299,7 @@
import HxlhTable from "@/components/HxlhTable";
import { getToken } from "@/utils/auth";
import { ref } from "vue";
import { ElMessage } from "element-plus";
// import { ElMessage } from "element-plus";
const { proxy } = getCurrentInstance();
import { useI18n } from "vue-i18n"; //要在js中使用国际化
src/views/register.vue
@@ -76,7 +76,7 @@
</template>
<script setup>
import { ElMessageBox } from "element-plus";
// import { ElMessageBox } from "element-plus";
import { getCodeImg, register } from "@/api/login";
const title = import.meta.env.VITE_APP_TITLE;
vite/plugins/auto-import.js
ÎļþÒÑɾ³ý
vite/plugins/index.js
@@ -1,15 +1,26 @@
import vue from '@vitejs/plugin-vue'
import createAutoImport from './auto-import'
import createSvgIcon from './svg-icon'
import createCompression from './compression'
import createSetupExtend from './setup-extend'
import vue from "@vitejs/plugin-vue";
import createSvgIcon from "./svg-icon";
import createCompression from "./compression";
import createSetupExtend from "./setup-extend";
import Components from "unplugin-vue-components/vite";
import autoImport from "unplugin-auto-import/vite";
import { ElementPlusResolver } from "unplugin-vue-components/resolvers";
export default function createVitePlugins(viteEnv, isBuild = false) {
    const vitePlugins = [vue()]
    vitePlugins.push(createAutoImport())
    vitePlugins.push(createSetupExtend())
    vitePlugins.push(createSvgIcon(isBuild))
    isBuild && vitePlugins.push(...createCompression(viteEnv))
    return vitePlugins
  const vitePlugins = [vue()];
  vitePlugins.push(createSetupExtend());
  vitePlugins.push(createSvgIcon(isBuild));
  isBuild && vitePlugins.push(...createCompression(viteEnv));
  vitePlugins.push(
    autoImport({
      imports: ["vue", "vue-router", "pinia"],
      dts: false,
      // è‡ªåЍ坼入 Element Plus ç›¸å…³å‡½æ•°
      resolvers: [ElementPlusResolver()],
    }),
    Components({
      // è‡ªåЍ坼入 Element Plus ç»„ä»¶
      resolvers: [ElementPlusResolver()],
    })
  );
  return vitePlugins;
}