From 1e3797178d05b111b901a005827189ee63d6f8f6 Mon Sep 17 00:00:00 2001
From: CD配唱片 <CD配唱片>
Date: 星期三, 07 五月 2025 16:25:33 +0800
Subject: [PATCH] 提交数据联调,i18n

---
 src/views/mainPlan/sheetMetalOrderManage/index.vue |  453 +++++++++++++++++++++++++++++---------------------------
 1 files changed, 237 insertions(+), 216 deletions(-)

diff --git a/src/views/mainPlan/sheetMetalOrderManage/index.vue b/src/views/mainPlan/sheetMetalOrderManage/index.vue
index e989511..232c9cd 100644
--- a/src/views/mainPlan/sheetMetalOrderManage/index.vue
+++ b/src/views/mainPlan/sheetMetalOrderManage/index.vue
@@ -66,8 +66,8 @@
           type="primary"
           plain
           icon="Plus"
-          :disabled="single"
-          @click="handleUpdate"
+          :disabled="multiple"
+          @click="handleBatchUpdatePlanDate"
           v-hasPermi="['apsPlatePlan:edit']"
           >鎵归噺鏇存柊宸ュ崟璁″垝鏃ユ湡</el-button
         >
@@ -77,7 +77,6 @@
           type="success"
           plain
           icon="Edit"
-          :disabled="single"
           @click="handleUpdate"
           v-hasPermi="['apsPlatePlan:edit']"
           >鐢熸垚閽i噾璁″垝宸ュ崟</el-button
@@ -111,17 +110,18 @@
         >
       </template>
     </HxlhTable>
-    <el-dialog :title="title" v-model="openDialog" width="900px" append-to-body>
+    <el-dialog
+      :title="'鏌ョ湅鍏宠仈闇�姹�'"
+      v-model="openDialog"
+      width="900px"
+      append-to-body
+    >
       <HxlhTable
         style="width: 100%"
         :columns="subGridOptions"
         :data="subList"
         :loading="loading"
         :height="heightSub"
-        @on-checkbox="handleCheckboxChange"
-        :page="page"
-        @changePageNo="changePageNo"
-        @changePageSize="changePageSize"
       >
       </HxlhTable>
     </el-dialog>
@@ -141,10 +141,12 @@
 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 openDialog = ref(false);
 const subGridOptions = ref([]);
-const tableRef = ref();
+// const tableRef = ref();
 const calendarList = ref([]);
 const loading = ref(true);
 const showSearch = ref(true);
@@ -178,103 +180,238 @@
 const processList = ref([]);
 const height = ref(document.documentElement.clientHeight - 220 + "px;");
 // 琛ㄦ牸閰嶇疆-鍒楄〃
-const columns = ref([
-  { type: "checkbox", width: 60, align: "center" },
-  {
-    title: "闇�姹侷D",
-    field: "description",
-    width: 150,
-    align: "center",
-  },
-  {
-    title: "闇�姹傝拷婧疘D",
-    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",
-  },
-  {
-    title: "鎿嶄綔",
-    width: 100,
-    fixed: "right",
-    slots: { default: "buttons" },
-    align: "center",
-  },
-]);
+const columns = ref([]);
 // 鍒嗛〉灞炴��
 const page = ref({
   total: 0,
   current: 1,
   size: 10,
 });
+watch(
+  locale,
+  (newLocale) => {
+    columns.value = [
+      { type: "checkbox", width: 60, align: "center" },
+      {
+        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.mainPartDrawingNumber"),
+        field: "createTime",
+        width: 200,
+        align: "center",
+      },
+      {
+        title: t("basic.table.mainCustomer"),
+        field: "createTime",
+        width: 200,
+        align: "center",
+      },
+      {
+        title: t("plan.table.productionQuantity"),
+        field: "updateTime",
+        width: 100,
+        align: "center",
+      },
+      {
+        title: t("basic.table.applicableFactories"),
+        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: t("plan.table.productionBase"),
+        field: "updateTime",
+        width: 100,
+        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.workorderCreationTime"),
+        field: "updateTime",
+        width: 100,
+        align: "center",
+      },
+      {
+        title: t("plan.table.mismatchedProductionQuantity"),
+        field: "updateTime",
+        width: 100,
+        align: "center",
+      },
+      {
+        title: t("plan.table.delayRiskIdentification"),
+        field: "updateTime",
+        width: 100,
+        align: "center",
+      },
+      {
+        title: "鎿嶄綔",
+        width: 100,
+        fixed: "right",
+        slots: { default: "buttons" },
+        align: "center",
+      },
+    ];
+    subGridOptions.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.itemNumber"),
+        field: "effectiveDate",
+        width: 200,
+        align: "center",
+      },
+      {
+        title: t("plan.table.bomLowCode"),
+        field: "expiringDate",
+        width: 200,
+        align: "center",
+      },
+      {
+        title: t("plan.table.bomUsage"),
+        field: "expiringDate",
+        width: 200,
+        align: "center",
+      },
+      {
+        title: t("basic.table.processRouteID"),
+        field: "createTime",
+        width: 200,
+        align: "center",
+      },
+      {
+        title: t("plan.table.processRouteWorkingHours"),
+        field: "updateTime",
+        width: 100,
+        align: "center",
+      },
+      {
+        title: t("plan.table.demandQuantity"),
+        field: "updateTime",
+        width: 100,
+        align: "center",
+      },
+      {
+        title: t("plan.table.netRequirement"),
+        field: "updateTime",
+        width: 100,
+        align: "center",
+      },
+      {
+        title: t("plan.table.requirementPlanCompletionDate"),
+        field: "updateTime",
+        width: 100,
+        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.requirementDate"),
+        field: "updateTime",
+        width: 100,
+        align: "center",
+      },
+      {
+        title: t("basic.table.applicableFactories"),
+        field: "updateTime",
+        width: 100,
+        align: "center",
+      },
+      {
+        title: t("plan.table.productionBase"),
+        field: "updateTime",
+        width: 100,
+        align: "center",
+      },
+      {
+        title: t("plan.table.matchState"),
+        field: "updateTime",
+        width: 100,
+        align: "center",
+      },
+    ];
+  },
+  {
+    immediate: true,
+    deep: true,
+  }
+);
+function handleBatchUpdatePlanDate(){
+
+}
 function handleCheckView(row) {
   openDialog.value = true;
   // listProcessRoute({ workOrderNo: row.documentNumber }).then((data) => {
@@ -367,122 +504,6 @@
   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;

--
Gitblit v1.9.3