From 4d97a259f3069f9b18d87ac3fab710618f2c6087 Mon Sep 17 00:00:00 2001
From: lishenao <3065849776@qq.com>
Date: 星期四, 03 七月 2025 15:19:31 +0800
Subject: [PATCH] 库存管理数据修改

---
 src/views/qualityManagement/rawMaterialInspection/components/formDia.vue |  107 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 107 insertions(+), 0 deletions(-)

diff --git a/src/views/qualityManagement/rawMaterialInspection/components/formDia.vue b/src/views/qualityManagement/rawMaterialInspection/components/formDia.vue
new file mode 100644
index 0000000..5d2bcbc
--- /dev/null
+++ b/src/views/qualityManagement/rawMaterialInspection/components/formDia.vue
@@ -0,0 +1,107 @@
+<template>
+  <div>
+    <el-dialog
+        v-model="dialogFormVisible"
+        :title="operationType === 'add' ? '鏂板鍏ヨ亴' : '缂栬緫浜哄憳'"
+        width="70%"
+        @close="closeDia"
+    >
+      <PIMTable
+          rowKey="id"
+          :column="tableColumn"
+          :tableData="tableData"
+          :tableLoading="tableLoading"
+          height="600"
+      >
+        <template #slot="{ row }">
+          <el-input v-model="row.staffName" clearable/>
+        </template>
+      </PIMTable>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button type="primary" @click="submitForm">纭</el-button>
+          <el-button @click="closeDia">鍙栨秷</el-button>
+        </div>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import {ref} from "vue";
+import {getStaffJoinInfo, staffJoinAdd, staffJoinUpdate} from "@/api/personnelManagement/onboarding.js";
+import {Search} from "@element-plus/icons-vue";
+const { proxy } = getCurrentInstance()
+const emit = defineEmits(['close'])
+
+const dialogFormVisible = ref(false);
+const operationType = ref('')
+const tableColumn = ref([
+  {
+    label: "鎸囨爣",
+    prop: "contractTerm",
+  },
+  {
+    label: "鍗曚綅",
+    prop: "contractStartTime",
+  },
+  {
+    label: "鏍囧噯鍊�",
+    prop: "contractEndTime",
+  },
+  {
+    label: "鍐呮帶鍊�",
+    prop: "contractEndTime",
+  },
+  {
+    label: "妫�楠屽��",
+    prop: "contractEndTime",
+    dataType: 'slot',
+    slot: 'slot',
+  },
+]);
+const tableData = ref([]);
+const tableLoading = ref(false);
+
+// 鎵撳紑寮规
+const openDialog = (type, row) => {
+  operationType.value = type;
+  dialogFormVisible.value = true;
+  if (operationType.value === 'edit') {
+    getStaffJoinInfo(row.id).then(res => {
+      // tableData.value = res.data
+    })
+  }
+}
+// 鎻愪氦浜у搧琛ㄥ崟
+const submitForm = () => {
+  proxy.$refs.formRef.validate(valid => {
+    if (valid) {
+      form.value.staffState = 0
+      if (operationType.value === "add") {
+        staffJoinAdd(form.value).then(res => {
+          proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
+          closeDia();
+        })
+      } else {
+        staffJoinUpdate(form.value).then(res => {
+          proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
+          closeDia();
+        })
+      }
+    }
+  })
+}
+// 鍏抽棴寮规
+const closeDia = () => {
+  dialogFormVisible.value = false;
+  emit('close')
+};
+defineExpose({
+  openDialog,
+});
+</script>
+
+<style scoped>
+
+</style>
\ No newline at end of file

--
Gitblit v1.9.3