From 35ee655485b646ebb62796677ccc16ab70b9f740 Mon Sep 17 00:00:00 2001
From: autumnal_wind@yeah.net <autumnal_wind@yeah.net>
Date: 星期三, 24 四月 2024 17:08:06 +0800
Subject: [PATCH] feat: 入库登记完善

---
 src/views/system/goodsIn/index.vue |   78 +++++++++++++++++++-------------------
 1 files changed, 39 insertions(+), 39 deletions(-)

diff --git a/src/views/system/goodsIn/index.vue b/src/views/system/goodsIn/index.vue
index 35a1dad..315482c 100644
--- a/src/views/system/goodsIn/index.vue
+++ b/src/views/system/goodsIn/index.vue
@@ -139,7 +139,7 @@
 </template>
 
 <script setup name="GoodsIn" lang="ts">
-import { listGoodsIn, getGoodsIn, delGoodsIn, addGoodsIn, updateGoodsIn } from '@/api/system/goodsIn';
+import { listGoodsIn, delGoodsIn, addGoodsIn, updateGoodsIn } from '@/api/system/goodsIn';
 import { GoodsInVO, GoodsInQuery, GoodsInForm } from '@/api/system/goodsIn/types';
 import DetailForm from "@/views/system/goodsIn/components/detailForm.vue";
 
@@ -157,10 +157,10 @@
 const queryFormRef = ref<ElFormInstance>();
 const detailFormRef = ref();
 
-const dialog = reactive<DialogOption>({
-  visible: false,
-  title: ''
-});
+// const dialog = reactive<DialogOption>({
+//   visible: false,
+//   title: ''
+// });
 
 const queryParams= ref({
   pageNum: 1,
@@ -187,11 +187,11 @@
   inTime: undefined,
   inOperator: undefined,
 }
-const data = reactive<PageData<GoodsInForm, GoodsInQuery>>({
-  form: {...initFormData}
-})
+// const data = reactive<PageData<GoodsInForm, GoodsInQuery>>({
+//   form: {...initFormData}
+// })
 
-const { form } = toRefs(data);
+// const { form } = toRefs(data);
 
 // const openForm = (type: string, id?: number) => {
 //   detailFormRef.value.openForm(type, id)
@@ -209,16 +209,16 @@
   detailFormRef.value.openForm(type, id)
 }
 /** 取消按钮 */
-const cancel = () => {
-  reset();
-  dialog.visible = false;
-}
+// const cancel = () => {
+//   reset();
+//   dialog.visible = false;
+// }
 
 /** 表单重置 */
-const reset = () => {
-  form.value = {...initFormData};
-  detailFormRef.value?.resetFields();
-}
+// const reset = () => {
+//   form.value = {...initFormData};
+//   detailFormRef.value?.resetFields();
+// }
 
 /** 搜索按钮操作 */
 const handleQuery = () => {
@@ -240,13 +240,13 @@
 }
 
 /** 新增按钮操作 */
-const handleAdd = () => {
-  // reset();
-  // dialog.visible = true;
-  // dialog.title = "添加入库登记";
-
-  detailFormRef.value.openForm('add',0)
-}
+// const handleAdd = () => {
+//   // reset();
+//   // dialog.visible = true;
+//   // dialog.title = "添加入库登记";
+//
+//   detailFormRef.value.openForm('add',0)
+// }
 
 /** 修改按钮操作 */
 const handleUpdate = async (row?: GoodsInVO) => {
@@ -260,21 +260,21 @@
 }
 
 /** 提交按钮 */
-const submitForm = () => {
-  detailFormRef.value?.validate(async (valid: boolean) => {
-    if (valid) {
-      buttonLoading.value = true;
-      if (form.value.inId) {
-        await updateGoodsIn(form.value).finally(() =>  buttonLoading.value = false);
-      } else {
-        await addGoodsIn(form.value).finally(() =>  buttonLoading.value = false);
-      }
-      proxy?.$modal.msgSuccess("修改成功");
-      dialog.visible = false;
-      await getList();
-    }
-  });
-}
+// const submitForm = () => {
+//   detailFormRef.value?.validate(async (valid: boolean) => {
+//     if (valid) {
+//       buttonLoading.value = true;
+//       if (form.value.inId) {
+//         await updateGoodsIn(form.value).finally(() =>  buttonLoading.value = false);
+//       } else {
+//         await addGoodsIn(form.value).finally(() =>  buttonLoading.value = false);
+//       }
+//       proxy?.$modal.msgSuccess("修改成功");
+//       dialog.visible = false;
+//       await getList();
+//     }
+//   });
+// }
 
 /** 删除按钮操作 */
 const handleDelete = async (row?: GoodsInVO) => {

--
Gitblit v1.8.0