From a5ddaf6b76f1266a180a45d0cbde9cd4eefe5912 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 19 十一月 2025 16:49:57 +0800
Subject: [PATCH] 1.金鹰黄金-人员入职的时候岗位改为下拉框
---
src/views/lavorissue/ledger/index.vue | 98 +++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 91 insertions(+), 7 deletions(-)
diff --git a/src/views/lavorissue/ledger/index.vue b/src/views/lavorissue/ledger/index.vue
index 27cd948..385dfe3 100644
--- a/src/views/lavorissue/ledger/index.vue
+++ b/src/views/lavorissue/ledger/index.vue
@@ -1,9 +1,20 @@
<template>
<div class="app-container">
<el-form :model="filters" :inline="true">
+ <el-form-item label="鍙戞斁瀛e害:" prop="season">
+ <el-select
+ style="width: 200px;"
+ @change="handleQuery"
+ v-model="filters.season"
+ placeholder="璇烽�夋嫨"
+ :clearable="false"
+ >
+ <el-option :label="item.label" :value="item.value" v-for="(item,index) in jidu" :key="item.value" />
+ </el-select>
+ </el-form-item>
<el-form-item label="鍛樺伐鍚嶇О:">
<el-input
- v-model="filters.supplierName"
+ v-model="filters.staffName"
style="width: 240px"
placeholder="璇疯緭鍏�"
@change="handleQuery"
@@ -46,8 +57,11 @@
@pagination="changePage"
>
<template #operation="{ row }">
- <el-button type="primary" text @click="edit(row)" icon="editPen">
+ <el-button type="primary" link @click="edit(row)">
缂栬緫
+ </el-button>
+ <el-button type="success" :disabled="row.adoptedDate ? true : false" link @click="adopted(row)">
+ 棰嗙敤
</el-button>
</template>
</PIMTable>
@@ -59,12 +73,13 @@
<script setup>
import { usePaginationApi } from "@/hooks/usePaginationApi";
-import { listPage,deleteLedger } from "@/api/lavorissce/ledger";
+import { listPage,deleteLedger,update } from "@/api/lavorissce/ledger";
import { onMounted, getCurrentInstance } from "vue";
import Modal from "./Modal.vue";
import { ElMessageBox, ElMessage } from "element-plus";
import dayjs from "dayjs";
import FilesDia from "./filesDia.vue";
+import { getCurrentMonth } from "@/utils/util"
// 琛ㄦ牸澶氶�夋閫変腑椤�
const multipleList = ref([]);
@@ -85,9 +100,15 @@
} = usePaginationApi(
listPage,
{
- incomeMethod: undefined,
+ staffName: '',
+ season: getCurrentMonth(),
},
[
+ {
+ label: "鍔充繚鍗曞彿",
+ align: "center",
+ prop: "orderNo",
+ },
{
label: "鍛樺伐鍚嶇О",
align: "center",
@@ -98,6 +119,13 @@
align: "center",
prop: "staffNo"
},
+
+ {
+ label: "鍔充繚绫诲瀷",
+ align: "center",
+ prop: "dictTypeName",
+
+ },
{
label: "鍔充繚闃插叿",
align: "center",
@@ -105,9 +133,21 @@
},
{
- label: "棰嗙敤鏁伴噺",
+ label: "鍙戞斁鏁伴噺",
align: "center",
prop: "num",
+
+ },
+ {
+ label: "杩涘巶鏃ユ湡",
+ align: "center",
+ prop: "factoryDate",
+
+ },
+ {
+ label: "鍙戞斁鏃ユ湡",
+ align: "center",
+ prop: "issueDate",
},
{
@@ -122,21 +162,66 @@
dataType: "slot",
slot: "operation",
align: "center",
- width: "200px",
+ width: "150px",
},
]
);
+
+const jidu = ref([
+ {
+ value: '1',
+ label: '绗竴瀛e害'
+ },
+ {
+ value: '2',
+ label: '绗簩瀛e害'
+ },
+ {
+ value: '3',
+ label: '绗笁瀛e害'
+ },
+ {
+ value: '4',
+ label: '绗洓瀛e害'
+ }
+])
// 澶氶�夊悗鍋氫粈涔�
const handleSelectionChange = (selectionList) => {
multipleList.value = selectionList;
};
+const adopted = (row) => {
+ ElMessageBox.confirm("鏄惁纭棰嗙敤?", "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ }).then(async () => {
+ const params = {
+ id: row.id,
+ adoptedDate: dayjs().format("YYYY-MM-DD")
+ }
+ const { code } = await update(params);
+ if (code == 200) {
+ ElMessage({
+ type: "success",
+ message: "棰嗙敤鎴愬姛",
+ });
+ getTableData();
+ }
+ })
+}
+
const add = () => {
modalRef.value.openModal();
};
const edit = (row) => {
modalRef.value.loadForm(row);
+};
+
+/** 鎼滅储鎸夐挳鎿嶄綔 */
+const handleQuery = () => {
+ getTableData();
};
const changePage = ({ page, limit }) => {
pagination.currentPage = page;
@@ -192,7 +277,6 @@
};
onMounted(() => {
- console.log(12331)
filters.entryDate = [
dayjs().format("YYYY-MM-DD"),
dayjs().add(1, "day").format("YYYY-MM-DD"),
--
Gitblit v1.9.3