CD配唱片
2025-04-29 d67ba690e49ce6674f048ceb8831df770f5b9e21
提交钣金计划大表i18n配置中英文
已修改8个文件
已添加1个文件
758 ■■■■■ 文件已修改
.env.development 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/RightToolbar/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/components/Navbar.vue 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/modules/language.js 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/i18n/locales/en.json 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/i18n/locales/zh.json 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mainPlan/platePlan/index.vue 412 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mainPlan/platePlanList/index.vue 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.env.development
@@ -10,4 +10,4 @@
# é…åˆåŽç«¯æœåŠ¡
# VITE_APP_LOCAL = 'int'
# VITE_APP_LOCAL = 'zhl'
VITE_APP_LOCAL = 'hjy'
VITE_APP_LOCAL = 'int'
src/components/RightToolbar/index.vue
@@ -1,10 +1,10 @@
<template>
  <div class="top-right-btn" :style="style">
    <el-row>
      <el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top" v-if="search">
      <el-tooltip class="item" effect="dark" :content="showSearch ? $t('page.common.hideSearch') : $t('page.common.showSearch')" placement="top" v-if="search">
        <el-button circle icon="Search" @click="toggleSearch()" />
      </el-tooltip>
      <el-tooltip class="item" effect="dark" content="刷新" placement="top">
      <el-tooltip class="item" effect="dark" :content="$t('page.common.refresh')" placement="top">
        <el-button circle icon="Refresh" @click="refresh()" />
      </el-tooltip>
      <el-tooltip class="item" effect="dark" content="显隐列" placement="top" v-if="columns">
src/layout/components/Navbar.vue
@@ -1,15 +1,34 @@
<template>
  <div class="navbar">
    <hamburger id="hamburger-container" :is-active="appStore.sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
    <breadcrumb v-if="!settingsStore.topNav" id="breadcrumb-container" class="breadcrumb-container" />
    <top-nav v-if="settingsStore.topNav" id="topmenu-container" class="topmenu-container" />
    <hamburger
      id="hamburger-container"
      :is-active="appStore.sidebar.opened"
      class="hamburger-container"
      @toggleClick="toggleSideBar"
    />
    <breadcrumb
      v-if="!settingsStore.topNav"
      id="breadcrumb-container"
      class="breadcrumb-container"
    />
    <top-nav
      v-if="settingsStore.topNav"
      id="topmenu-container"
      class="topmenu-container"
    />
    <div class="right-menu">
      <template v-if="appStore.device !== 'mobile'">
      </template>
      <template v-if="appStore.device !== 'mobile'"> </template>
      <div class="mt5">
          <el-button @click="changeLanguage('zh')">中文</el-button>
          <el-button @click="changeLanguage('en')">English</el-button>
      </div>
      <div class="avatar-container">
        <el-dropdown @command="handleCommand" class="right-menu-item hover-effect" trigger="click">
        <el-dropdown
          @command="handleCommand"
          class="right-menu-item hover-effect"
          trigger="click"
        >
          <div class="avatar-wrapper">
            <img :src="userStore.avatar" class="user-avatar" />
            <el-icon><caret-bottom /></el-icon>
@@ -34,25 +53,32 @@
</template>
<script setup>
import { ElMessageBox } from 'element-plus'
import Breadcrumb from '@/components/Breadcrumb'
import TopNav from '@/components/TopNav'
import Hamburger from '@/components/Hamburger'
import Screenfull from '@/components/Screenfull'
import SizeSelect from '@/components/SizeSelect'
import HeaderSearch from '@/components/HeaderSearch'
import RuoYiGit from '@/components/RuoYi/Git'
import RuoYiDoc from '@/components/RuoYi/Doc'
import useAppStore from '@/store/modules/app'
import useUserStore from '@/store/modules/user'
import useSettingsStore from '@/store/modules/settings'
const appStore = useAppStore()
const userStore = useUserStore()
const settingsStore = useSettingsStore()
import { ElMessageBox } from "element-plus";
import Breadcrumb from "@/components/Breadcrumb";
import TopNav from "@/components/TopNav";
import Hamburger from "@/components/Hamburger";
import Screenfull from "@/components/Screenfull";
import SizeSelect from "@/components/SizeSelect";
import HeaderSearch from "@/components/HeaderSearch";
import RuoYiGit from "@/components/RuoYi/Git";
import RuoYiDoc from "@/components/RuoYi/Doc";
import useAppStore from "@/store/modules/app";
import useUserStore from "@/store/modules/user";
import useSettingsStore from "@/store/modules/settings";
import useLanguageStore from "@/store/modules/language"
import { useI18n } from 'vue-i18n'//要在js中使用国际化
const appStore = useAppStore();
const userStore = useUserStore();
const settingsStore = useSettingsStore();
const languageStore = useLanguageStore();
const { proxy } = getCurrentInstance();
function changeLanguage(type) {
  proxy.$i18n.locale = type;
  languageStore.setLocale(type)
}
function toggleSideBar() {
  appStore.toggleSideBar()
  appStore.toggleSideBar();
}
function handleCommand(command) {
@@ -69,28 +95,30 @@
}
function logout() {
  ElMessageBox.confirm('确定注销并退出系统吗?', '提示', {
    confirmButtonText: '确定',
    cancelButtonText: '取消',
    type: 'warning'
  }).then(() => {
    userStore.logOut().then(() => {
      location.href = '/index';
  ElMessageBox.confirm("确定注销并退出系统吗?", "提示", {
    confirmButtonText: "确定",
    cancelButtonText: "取消",
    type: "warning",
    })
  }).catch(() => { });
    .then(() => {
      userStore.logOut().then(() => {
        location.href = "/index";
      });
    })
    .catch(() => {});
}
const emits = defineEmits(['setLayout'])
const emits = defineEmits(["setLayout"]);
function setLayout() {
  emits('setLayout');
  emits("setLayout");
}
function toggleTheme() {
  settingsStore.toggleTheme()
  settingsStore.toggleTheme();
}
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.navbar {
  height: 50px;
  overflow: hidden;
@@ -130,7 +158,9 @@
    height: 100%;
    line-height: 50px;
    display: flex;
    .mt5{
      margin-top:5px;
    }
    &:focus {
      outline: none;
    }
src/main.js
@@ -48,7 +48,6 @@
import VxeUITable from 'vxe-table'
import 'vxe-table/lib/style.css'
import i18n from '@/utils/i18n' // å¼•å…¥ i18n é…ç½®æ–‡ä»¶
const app = createApp(App)
// å…¨å±€æ–¹æ³•挂载
src/store/modules/language.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
const useLanguageStore = defineStore("language", {
  state: () => ({
    locale: "zh",
  }),
  actions: {
    setLocale(locale) {
        this.locale = locale; // è®¾ç½®è¯­è¨€å¹¶æ›´æ–°çŠ¶æ€
        console.log(this.locale,"this.localethis.locale")
    }
  },
});
export default useLanguageStore;
src/utils/i18n/locales/en.json
@@ -1,5 +1,81 @@
{
  "topNav":{
    "center":""
    "center": "Personal Center",
    "logout": "Logout"
  },
  "page": {
    "common": {
      "import":"Import",
      "export": "Export",
      "update": "Update",
      "query":  "Query",
      "reset":  "Reset",
      "hideSearch":"Hide Search",
      "showSearch":"Display search",
      "refresh":"Refresh",
      "column": "Explicit implicit column"
    },
    "placeholder":{
      "startDate":"Start date",
      "endDate":"End date",
      "documentNumber":"Please enter the document number",
      "customer":"Please enter the customer name"
    },
    "btns":{
      "batchPlanStartDay":"Batch modification of planned start date",
      "batchPlanEndDay":"Batch modification plan completion date"
    },
    "query":{
      "daterangePlanStartDay":"Planned start date",
      "daterangePlanEndDay":"Planned completion date",
      "documentNumber":"Document number",
      "customer":"Customer Name"
    },
    "table": {
      "mainPartNumber": "Main part number",
      "businessType": "Business type",
      "documentNumber": "Document number",
      "requirementType": "Requirements classification",
      "documentStatus": "Document Status",
      "updateBy": "Audit time",
      "workCenter": "Current process",
      "department": "Current process leader",
      "opStatus": "Current process status",
      "nextOpName": "Next process",
      "nextProcessDeparment": "Next Process Manager",
      "itemNumber": "Item number",
      "drawingNo": "Drawing No",
      "versionNumber": "version number",
      "cheaperCode": "Low order code",
      "productionQuantity": "production quantity",
      "planworkOrderTime": "Work order plan issuance time",
      "planEndDay": "System completion time",
      "seq":"Serial Number",
      "masterPlanner":"master scheduler",
      "weekDay":"Sunday",
      "weekCycle":"week cycle",
      "mainPartDrawingNumber":"Main component drawing number",
      "customer":"Customer Name",
      "goodProductsQuantity":"Quantity of good products",
      "processNumber":"Process number",
      "factoryCenter":"work center",
      "dependencyDepartment":"Department",
      "planStartDay":"Planned commencement date",
      "planEndDayDate":"Planned completion date",
      "standbyNumber":"Material preparation part number",
      "standbyName":"Material name",
      "standbyStock":"备料库存",
      "departmentToNextProcessBelongs":"Material preparation inventory",
      "isSuspended":"Is it suspended",
      "isOutsourcing":"Outsourcing identification",
      "account":"Account set",
      "workOrderNo":"Work order number",
      "processName":"Process name",
      "startDateOfProcessPlan":"Start date of process plan",
      "endDateOfProcessPlan":"End date of process plan",
      "standardTime":"Standard working hours",
      "processOrder":"Process sorting",
      "integrationDay":"Integration date"
    }
  }  
}
src/utils/i18n/locales/zh.json
@@ -2,5 +2,80 @@
  "topNav":{
    "center":"个人中心",
    "logout":"退出登录"
  },
  "page":{
    "common":{
      "import":"导入",
      "export":"导出",
      "update":"更新",
      "query":"查询",
      "reset":"重置",
      "hideSearch":"隐藏搜索",
      "showSearch":"显示搜索",
      "refresh":"刷新",
      "column": "显隐列"
    },
    "placeholder":{
      "startDate":"开始日期",
      "endDate":"结束日期",
      "documentNumber":"请输入单据号",
      "customer":"请输入客户名称"
    },
    "btns":{
      "batchPlanStartDay":"批量修改计划开工日",
      "batchPlanEndDay":"批量修改计划完工日"
    },
    "query":{
      "daterangePlanStartDay":"计划开工日",
      "daterangePlanEndDay":"计划完工日",
      "documentNumber":"单据号",
      "customer":"客户名称"
    },
    "table":{
      "mainPartNumber":"主件料号",
      "businessType":"业务类型",
      "documentNumber":"单据号",
      "requirementType":"需求分类",
      "documentStatus":"单据状态",
      "updateBy":"审核时间",
      "workCenter":"当前工序",
      "department":"当前工序负责人",
      "opStatus":"当前工序状态",
      "nextOpName":"下一工序",
      "nextProcessDeparment":"下一工序负责人",
      "itemNumber":"料号",
      "drawingNo":"图号",
      "versionNumber":"版本号",
      "cheaperCode":"低阶码",
      "productionQuantity":"生产数量",
      "planworkOrderTime":"工单计划下发时间",
      "planEndDay":"系统完工时间",
      "seq":"序号",
      "masterPlanner":"主计划员",
      "weekDay":"周日",
      "weekCycle":"周度",
      "mainPartDrawingNumber":"主件图号",
      "customer":"客户名称",
      "goodProductsQuantity":"良品数量",
      "processNumber":"工序号",
      "factoryCenter":"工作中心",
      "dependencyDepartment":"所属部门",
      "planStartDay":"计划开工日",
      "planEndDayDate":"计划完工日",
      "standbyNumber":"备料料号",
      "standbyName":"备料名称",
      "standbyStock":"备料库存",
      "departmentToNextProcessBelongs":"下道工序所属部门",
      "isSuspended":"是否挂起",
      "isOutsourcing":"外协标识",
      "account":"账套",
      "workOrderNo":"工单号",
      "processName":"工序名称",
      "startDateOfProcessPlan":"工序计划开始日期",
      "endDateOfProcessPlan":"工序计划结束日期",
      "standardTime":"标准工时",
      "processOrder":"工序排序",
      "integrationDay":"集成日期"
    }
  }  
}
src/views/mainPlan/platePlan/index.vue
@@ -1,61 +1,65 @@
<template>
  <div class="app-container">
    <el-row :gutter="20"> <el-col>
    <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="90px">
      <el-row :gutter="20">
        <el-col :span="6">
          <el-form-item label="计划开工日" style="width: 100%;">
    <el-row :gutter="10" class="mb8">
    <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" :label-width="locale==='zh'?'90px':'180px'" label-position="left">
      <!-- <el-row :gutter="20">
        <el-col :span="6"> -->
          <el-form-item :label="$t('page.query.daterangePlanStartDay')">
          <el-date-picker
              style="width: 240px;"
              v-model="daterangePlanStartDay"
              value-format="YYYY-MM-DD"
              type="daterange"
              range-separator="-"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              :start-placeholder="$t('page.placeholder.startDate')"
              :end-placeholder="$t('page.placeholder.endDate')"
          ></el-date-picker>
        </el-form-item>
        </el-col>
        <el-col :span="6">
        <el-form-item label="计划完工日" style="width: 100%;">
        <!-- </el-col>
        <el-col :span="6"> -->
        <el-form-item :label="$t('page.query.daterangePlanEndDay')">
          <el-date-picker
              style="width: 240px;"
              v-model="daterangePlanEndDay"
              value-format="YYYY-MM-DD"
              type="daterange"
              range-separator="-"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              :start-placeholder="$t('page.placeholder.startDate')"
              :end-placeholder="$t('page.placeholder.endDate')"
          ></el-date-picker>
        </el-form-item>
        </el-col>
        <el-col :span="6">
        <el-form-item label="单据号" prop="documentNumber" style="width: 100%;">
        <!-- </el-col>
        <el-col :span="6"> -->
        <el-form-item :label="$t('page.query.documentNumber')" prop="documentNumber" >
          <el-input
              style="width: 240px;"
              v-model="queryParams.documentNumber"
              placeholder="请输入单据号"
              :placeholder="$t('page.placeholder.documentNumber')"
              clearable
              @keyup.enter="handleQuery"
          />
        </el-form-item>
        </el-col>
        <el-col :span="6">
        <el-form-item label="客户名称" prop="customer" style="width: 100%;">
        <!-- </el-col>
        <el-col :span="6"> -->
        <el-form-item :label="$t('page.query.customer')" prop="customer">
          <el-input
              style="width: 240px;"
              v-model="queryParams.customer"
              placeholder="请输入客户名称"
              :placeholder="$t('page.placeholder.customer')"
              clearable
              @keyup.enter="handleQuery"
          />
        </el-form-item>
        </el-col>
        <el-col  :span="24"  style="text-align: right;">
        <!-- </el-col>
        <el-col  :span="24"  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-button type="primary" icon="Search" @click="handleQuery">{{$t("page.common.query")}}</el-button>
          <el-button icon="Refresh" @click="resetQuery">{{$t("page.common.reset")}}</el-button>
        </el-form-item>
        </el-col>
      </el-row>
        <!-- </el-col> -->
      <!-- </el-row> -->
      </el-form>
    </el-col> </el-row>
    </el-row>
    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
@@ -65,7 +69,7 @@
            :disabled="single"
            @click="handleUpdate"
            v-hasPermi="['apsPlatePlan:edit']"
        >批量修改计划开工日</el-button>
        >{{$t("page.btns.batchPlanStartDay")}}</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
@@ -75,7 +79,7 @@
            :disabled="single"
            @click="handleUpdate"
            v-hasPermi="['apsPlatePlan:edit']"
        >批量修改计划完工日</el-button>
        >{{$t("page.btns.batchPlanEndDay")}}</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
@@ -84,7 +88,7 @@
            icon="Upload"
            @click="handleImport"
            v-hasPermi="['apsPlatePlan:import']"
        >导入</el-button>
        >{{$t("page.common.import")}}</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
@@ -93,7 +97,7 @@
          icon="Download"
          @click="handleExport"
          v-hasPermi="['apsPlatePlan:export']"
        >导出</el-button>
        >{{$t("page.common.export")}}</el-button>
      </el-col>
      <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>
@@ -204,11 +208,10 @@
import { ref } from "vue";
import { getToken } from "@/utils/auth.js";
import {ElMessage} from "element-plus";
import { useI18n } from "vue-i18n"; //要在js中使用国际化
const { proxy } = getCurrentInstance();
const { t, locale } = useI18n();
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);
@@ -242,17 +245,42 @@
  // ä¸Šä¼ çš„地址
  url: import.meta.env.VITE_APP_BASE_API + "/aps/apsPlatePlan/importData"
});
const data = reactive({
  form: {},
  queryParams: {
    pageNum: 1,
    pageSize: 10,
    customer: null,
    documentNumber: null
  },
  rules: {
    id: [
      { required: true, message: "主键id不能为空", trigger: "blur" }
    ],
  }
});
const { queryParams } = toRefs(data);
const exampleColumns = ref([]);
const columns = ref([]);
const subGridOptions = ref({
  border: true,
  showOverflow: true,
  columns: []
})
watch(locale, (newLocale) => {
  // é‡æ–°èŽ·å–ç¿»è¯‘æ–‡æœ¬
// è¡¨æ ¼é…ç½®
const exampleColumns = ref([
  { type: 'seq', title: '序号', width: 60 },
  exampleColumns.value = [
    { type: 'seq', title: t('page.table.seq'), width: 60 },
  {
    title: '主计划员',
      title: t('page.table.masterPlanner'),
    field: 'masterPlanner',
    width: 100,
  },
  {
    title: '周日',
      title: t('page.table.weekDay'),
    field: 'weekDay',
    width: 100,
    formatter: (({ cellValue, row, column }) => {
@@ -267,127 +295,127 @@
    })
  },
  {
    title: '周度',
      title: t('page.table.weekCycle'),
    field: 'weekCycle',
    width: 80,
  },
  {
    title: '主件料号',
      title: t('page.table.mainPartNumber'),
    field: 'mainPartNumber',
    width: 150,
  },
  {
    title: '主件图号',
      title: t('page.table.mainPartDrawingNumber'),
    field: 'mainPartDrawingNumber',
    width: 150,
  },
  {
    title: '客户名称',
      title: t('page.table.customer'),
    field: 'customer',
    width: 200,
  },
  {
    title: '业务类型',
      title: t('page.table.businessType'),
    field: 'businessType',
    width: 150,
  },
  {
    title: '单据号',
      title: t('page.table.documentNumber'),
    field: 'documentNumber',
    width: 150,
  },
  {
    title: '需求分类',
      title: t('page.table.requirementType'),
    field: 'requirementType',
    width: 150,
  },
  {
    title: '单据状态',
      title: t('page.table.documentStatus'),
    field: 'documentStatus',
    width: 100,
  },
  {
    title: '料号',
      title: t('page.table.itemNumber'),
    field: 'itemNumber',
    width: 150,
  },
  {
    title: '图号',
      title: t('page.table.drawingNo'),
    field: 'drawingNo',
    width: 150,
  },
  {
    title: '版本号',
      title: t('page.table.versionNumber'),
    field: 'versionNumber',
    width: 100,
  },
  {
    title: '生产数量',
      title: t('page.table.productionQuantity'),
    field: 'productionQuantity',
    width: 100,
  },
  {
    title: '良品数量',
      title: t('page.table.goodProductsQuantity'),
    field: 'goodProductsQuantity',
    width: 100,
  },
  {
    title: '工序号',
      title: t('page.table.processNumber'),
    field: 'processNumber',
    width: 150,
  },
  {
    title: '工作中心',
      title: t('page.table.factoryCenter'),
    field: 'workCenter',
    width: 150,
  },
  {
    title: '所属部门',
      title: t('page.table.dependencyDepartment'),
    field: 'department',
    width: 100,
  },
  {
    title: '计划开工日',
      title: t('page.table.planStartDay'),
    field: 'planStartDay',
    width: 100,
  },
  {
    title: '计划完工日',
      title: t('page.table.planEndDayDate'),
    field: 'planEndDay',
    width: 100,
  },
  {
    title: '备料料号',
      title:  t('page.table.standbyNumber'),
    field: 'standbyNumber',
    width: 100,
  },
  {
    title: '备料名称',
      title: t('page.table.standbyName'),
    field: 'standbyName',
    width: 200,
  },
  {
    title: '备料库存',
      title: t('page.table.standbyStock'),
    field: 'standbyStock',
    width: 100,
  },
  {
    title: '下道工序所属部门',
      title: t('page.table.departmentToNextProcessBelongs'),
    field: 'nextProcessDeparment',
    width: 180,
  },
  {
    title: '是否挂起',
      title: t('page.table.isSuspended'),
    field: 'isSuspended',
    width: 100,
  },
  {
    title: '外协标识',
      title: t('page.table.isOutsourcing'),
    field: 'isOutsourcing',
    width: 100,
  },
  {
    title: '账套',
      title: t('page.table.account'),
    field: 'account',
    width: 100,
  },
@@ -426,13 +454,12 @@
  //   field: 'hasRisk',
  //   width: 100,
  // },
]);
  ];
// è¡¨æ ¼é…ç½®
const columns = ref([
  columns.value = [
  { field: 'expand', type: 'expand', width: 60, align: 'center', slots: { content: 'expandContent' } },
  { type: 'checkbox', width: 60, align:"center"},
  { type: 'seq', title: '序号', width: 60 },
    { type: 'seq', title: t('page.table.seq'), width: 60 },
  // {
  //   title: '主计划员',
  //   field: 'masterPlanner',
@@ -459,7 +486,7 @@
  //   width: 80,
  // },
  {
    title: '主件料号',
      title: t('page.table.mainPartNumber'),
    field: 'mainPartNumber',
    width: 150,
  },
@@ -474,32 +501,32 @@
  //   width: 200,
  // },
  {
    title: '业务类型',
      title: t('page.table.businessType'),
    field: 'businessType',
    width: 100,
  },
  {
    title: '单据号',
      title: t('page.table.documentNumber'),
    field: 'documentNumber',
    width: 140,
  },
  {
    title: '需求分类',
      title: t('page.table.requirementType'),
    field: 'requirementType',
    width: 100,
  },
  {
    title: '单据状态',
      title: t('page.table.documentStatus'),
    field: 'documentStatus',
    width: 100,
  },
  {
    title: '料号',
      title: t('page.table.itemNumber'),
    field: 'itemNumber',
    width: 100,
  },
  {
    title: '图号',
      title: t('page.table.drawingNo'),
    field: 'drawingNo',
    width: 100,
  },
@@ -509,7 +536,7 @@
  //   width: 100,
  // },
  {
    title: '生产数量',
      title: t('page.table.productionQuantity'),
    field: 'productionQuantity',
    width: 100,
  },
@@ -519,12 +546,12 @@
  //   width: 100,
  // },
  {
    title: '工序号',
      title: t('page.table.processNumber'),
    field: 'processNumber',
    width: 100,
  },
  {
    title: '工作中心',
      title: t('page.table.factoryCenter'),
    field: 'workCenter',
    width: 180,
  },
@@ -539,7 +566,7 @@
  //   width: 100,
  // },
  {
    title: '计划完工日',
      title: t('page.table.planEndDayDate'),
    field: 'planEndDay',
    width: 100,
  },
@@ -613,25 +640,83 @@
  //   field: 'hasRisk',
  //   width: 100,
  // },
]);
const data = reactive({
  form: {},
  queryParams: {
    pageNum: 1,
    pageSize: 10,
    customer: null,
    documentNumber: null
  ];
  subGridOptions.value.columns = [
    {
      title: t('page.table.itemNumber'),
      field: 'itemNo',
      width: 150,
      align:"center",
  },
  rules: {
    id: [
      { required: true, message: "主键id不能为空", trigger: "blur" }
    ],
    {
      title: t('page.table.workOrderNo'),
      field: 'workOrderNo',
      width: 150,
      align:"center",
    },
    {
      title: t('page.table.processNumber'),
      field: 'processNumber',
      width: 150,
      align:"center",
    },
    {
      title: t('page.table.processName'),
      field: 'processName',
      width: 150,
      align:"center",
    },
    {
      title: t('page.table.startDateOfProcessPlan'),
      field: 'processPlanStartDay',
      width: 200,
      align:"center",
    },
    {
      title: t('page.table.endDateOfProcessPlan'),
      field: 'processPlanEndDay',
      width: 200,
      align:"center",
    },
    // {
    //   title: '未开工数量',
    //   field: 'notStartWorkCount',
    //   width: 90,
    //   align:"center",
    // },
    // {
    //   title: '已完成数量',
    //   field: 'completedCount',
    //   width: 90,
    //   align:"center",
    // },
    // {
    //   title: '废弃数量',
    //   field: 'discardCount',
    //   width: 90,
    //   align:"center",
    // },
    {
      title: t('page.table.standardTime'),
      field: 'standardTime',
      width: 90,
      align:"center",
    },
    {
      title: t('page.table.processOrder'),
      field: 'processOrder',
      width: 90,
      align:"center",
    },
    {
      title: t('page.table.integrationDay'),
      field: 'integrationDay',
      width: 160,
      align:"center",
  }
});
const { queryParams } = toRefs(data);
  ]
  getList();
},{immediate:true, deep:true})
/** æŸ¥è¯¢é’£é‡‘计划临时管理列表 */
function getExampleList() {
  loading.value = true;
@@ -768,84 +853,85 @@
}
/*定义下拉二级表*/
const subGridOptions = reactive({
  border: true,
  showOverflow: true,
  columns: [
    {
      title: '料号',
      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",
    },
// const subGridOptions = ref({
//   border: true,
//   showOverflow: true,
//   columns: [
    // {
    //   title: '未开工数量',
    //   field: 'notStartWorkCount',
//       title: t('page.table.itemNumber'),
//       field: 'itemNo',
//       width: 150,
//       align:"center",
//     },
//     {
//       title: t('page.table.workOrderNo'),
//       field: 'workOrderNo',
//       width: 150,
//       align:"center",
//     },
//     {
//       title: t('page.table.processNumber'),
//       field: 'processNumber',
//       width: 100,
//       align:"center",
//     },
//     {
//       title: t('page.table.processName'),
//       field: 'processName',
//       width: 150,
//       align:"center",
//     },
//     {
//       title: t('page.table.startDateOfProcessPlan'),
//       field: 'processPlanStartDay',
//       width: 200,
//       align:"center",
//     },
//     {
//       title: '工序计划结束日期',
//       field: 'processPlanEndDay',
//       width: 200,
//       align:"center",
//     },
//     // {
//     //   title: '未开工数量',
//     //   field: 'notStartWorkCount',
//     //   width: 90,
//     //   align:"center",
//     // },
//     // {
//     //   title: '已完成数量',
//     //   field: 'completedCount',
//     //   width: 90,
//     //   align:"center",
//     // },
//     // {
//     //   title: '废弃数量',
//     //   field: 'discardCount',
//     //   width: 90,
//     //   align:"center",
//     // },
//     {
//       title: '标准工时',
//       field: 'standardTime',
    //   width: 90,
    //   align:"center",
    // },
    // {
    //   title: '已完成数量',
    //   field: 'completedCount',
//       title: '工序排序',
//       field: 'processOrder',
    //   width: 90,
    //   align:"center",
    // },
    // {
    //   title: '废弃数量',
    //   field: 'discardCount',
    //   width: 90,
//       title: '集成日期',
//       field: 'integrationDay',
//       width: 160,
    //   align:"center",
    // },
    {
      title: '标准工时',
      field: 'standardTime',
      width: 90,
      align:"center",
    },
    {
      title: '工序排序',
      field: 'processOrder',
      width: 90,
      align:"center",
    },
    {
      title: '集成日期',
      field: 'integrationDay',
      width: 160,
      align:"center",
    }
  ]
})
//     }
//   ]
// })
const expandConfig = ref({
  lazy: true,
  loadMethod ({ row }) {
src/views/mainPlan/platePlanList/index.vue
@@ -40,7 +40,7 @@
          icon="Download"
          @click="handleExport"
          v-hasPermi="['plateProcessShopStat:export']"
          >导出</el-button
          >{{ $t(`page.common.export`) }}</el-button
        >
      </el-col>
      <el-col :span="1.5">
@@ -50,7 +50,7 @@
          icon="Edit"
          @click="handleUpdate"
          v-hasPermi="['plateProcessShopStat:update']"
          >更新</el-button
          >{{ $t(`page.common.update`) }}</el-button
        >
      </el-col>
@@ -68,7 +68,7 @@
    >
    </HxlhTable>
    <!-- æ·»åŠ æˆ–ä¿®æ”¹é’£é‡‘ç»Ÿè®¡å¯¹è¯æ¡† -->
    <el-dialog :title="title" v-model="open" width="500px" append-to-body>
    <!-- <el-dialog :title="title" v-model="open" width="500px" append-to-body>
      <el-form
        ref="aps_plate_process_statRef"
        :model="form"
@@ -103,7 +103,7 @@
          <el-button @click="cancel">取 æ¶ˆ</el-button>
        </div>
      </template>
    </el-dialog>
    </el-dialog> -->
  </div>
</template>
@@ -116,8 +116,12 @@
import { getToken } from "@/utils/auth";
import { nextTick, onMounted, ref } from "vue";
import { ElMessage } from "element-plus";
import { useI18n } from "vue-i18n"; //要在js中使用国际化
// import i18n from "@/utils/i18n";
// const t = i18n.global.t
const { t, locale } = useI18n();
const { proxy } = getCurrentInstance();
// console.log(proxy.$i18n.locale, "indexPlanList");
const aps_plate_process_statList = ref([]);
const dynamicList = ref([]);
const generateColumnList = ref([]);
@@ -150,114 +154,117 @@
  // },
  // rules: {},
});
const columns = ref([]);
const xGrid = ref();
const { queryParams, form, rules } = toRefs(data);
watch(locale, (newLocale) => {
  // é‡æ–°èŽ·å–ç¿»è¯‘æ–‡æœ¬
// è¡¨æ ¼é…ç½®
const columns = ref([
  columns.value = [
  /*  { type: 'seq', title: '序号', width: 60 },*/
  {
    title: "主件料号",
      title: t("page.table.mainPartNumber"),
    field: "mainPartNumber",
    width: 150,
    fixed: "left",
  },
  {
    title: "业务类型",
      title: t("page.table.businessType"),
    field: "businessType",
    width: 120,
    fixed: "left",
  },
  {
    title: "单据号",
      title: t("page.table.documentNumber"),
    field: "documentNumber",
    width: 160,
    fixed: "left",
  },
  {
    title: "需求分类",
      title: t("page.table.requirementType"),
    field: "requirementType",
    width: 100,
    fixed: "left",
  },
  {
    title: "单据状态",
      title: t("page.table.documentStatus"),
    field: "documentStatus",
    width: 100,
    fixed: "left",
  },
  {
    title: "审核时间",
      title: t("page.table.updateBy"),
    field: "updateBy",
    width: 100,
  },
  {
    title: "当前工序",
      title: t("page.table.workCenter"),
    field: "workCenter",
    width: 200,
  },
  {
    title: "当前工序负责人",
      title: t("page.table.department"),
    field: "department",
    width: 200,
  },
  {
    title: "当前工序状态",
      title: t("page.table.opStatus"),
    field: "opStatus",
    width: 200,
  },
  {
    title: "下一工序",
      title: t("page.table.nextOpName"),
    field: "nextOpName",
    width: 100,
  },
  {
    title: "下一工序负责人",
      title: t("page.table.nextProcessDeparment"),
    field: "nextProcessDeparment",
    width: 200,
  },
  {
    title: "料号",
      title: t("page.table.itemNumber"),
    field: "itemNumber",
    width: 150,
    type: "html",
  },
  {
    title: "图号",
      title: t("page.table.drawingNo"),
    field: "drawingNo",
    width: 150,
    // format: 'YYYY-MM-DD'
  },
  {
    title: "版本号",
      title: t("page.table.versionNumber"),
    field: "versionNumber",
    width: 100,
    type: "html",
  },
  {
    title: "低阶码",
    field: "updateBy",
      title: t("page.table.cheaperCode"),
      field: "cheaperCode",
    width: 100,
  },
  {
    title: "生产数量",
      title: t("page.table.productionQuantity"),
    field: "productionQuantity",
    width: 100,
    type: "html",
  },
  {
    title: "工单计划下发时间",
    field: "updateBy",
      title: t("page.table.planworkOrderTime"),
      field: "planworkOrderTime",
    width: 200,
  },
  {
    title: "系统完工时间",
      title: t("page.table.planEndDay"),
    field: "planEndDay",
    width: 150,
    format: "YYYY-MM-DD hh:mm:ss",
  },
]);
  ]
  getList();
},{immediate:true, deep:true});
/** æŸ¥è¯¢é’£é‡‘统计列表 */
async function getList() {
  loading.value = true;
@@ -279,7 +286,6 @@
      };
    }
  );
  console.log(aps_plate_process_statList.value, "resDataresDataresData");
  let newArray = [];
  newArray = dynamicList.value.flatMap((item, index) => [
    {
@@ -421,7 +427,8 @@
}
getList();
// onMounted(async () => {
//
//   await nextTick();
// });
</script>
<style lang="scss" scoped>