ezhizao_zx 4 hónapja
szülő
commit
06dc757bca
2 módosított fájl, 27 hozzáadás és 2 törlés
  1. 9 0
      src/api/business/lot.js
  2. 18 2
      src/views/business/lot/index.vue

+ 9 - 0
src/api/business/lot.js

@@ -1,4 +1,5 @@
 import request from '@/utils/request'
+import { method } from 'lodash-es'
 const baseUrl = import.meta.env.VITE_APP_PRODUCTION_API
 
 // 查询计划查询列表
@@ -149,3 +150,11 @@ export function saveInBatches(data) {
     data: data
   })
 }
+
+export function checkRecover(data) {
+  return request({
+    url: baseUrl + '/business/lot/checkRecover',
+    method: 'post',
+    data: data
+  })
+}

+ 18 - 2
src/views/business/lot/index.vue

@@ -152,7 +152,7 @@
 <script setup name="ProductionPlan">
 import { listDept } from "@/api/system/dept";
 import { getDeptList } from "@/api/system/dept.js";
-import { getLotList, getProcessList } from "@/api/business/lot.js";
+import { getLotList, getProcessList, checkRecover } from "@/api/business/lot.js";
 import wasteRecyclingDialog from "./DialogWasteRecycling.vue";
 import router from "@/router";
 import multiChange from "@/views/business/reviseBath/multiSingleChangeDialog.vue";
@@ -500,7 +500,23 @@ const checkRecycle = () => {
 const recoverBatch = () => {
   // 当前行
   // 判断当前行是否可以复原
-
+  const recoverItem = selections.value[0]
+  checkRecover(recoverItem).then(res => {
+    if (res.code === 200) {
+      // 确认是否还原
+      proxy.$modal.confirm(``).then(function () {
+        // 确认还原
+        return;
+      }).then(() => {
+        handleQuerydaywork();
+        proxy.$modal.msgSuccess("还原成功!");
+      }).catch(err => {
+        // 还原失败输出失败结果
+      });
+    } else {
+      proxy.$modal.msgError(res.msg)
+    }
+  })
 }
 
 onMounted(() => {