From 2e340d09cf3e7c060216cb980c466586c27ecc2d Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 20 十一月 2025 17:21:53 +0800
Subject: [PATCH] 1.金鹰黄金-劳保统计页面展示数据修改
---
src/views/lavorissue/ledger/index.vue | 107 +++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 99 insertions(+), 8 deletions(-)
diff --git a/src/views/lavorissue/ledger/index.vue b/src/views/lavorissue/ledger/index.vue
index 27cd948..b6408c1 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,30 +57,37 @@
@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>
</div>
<Modal ref="modalRef" @success="getTableData"></Modal>
+ <EditModal ref="editModalRef" @success="getTableData"></EditModal>
<files-dia ref="filesDia"></files-dia>
</div>
</template>
<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 EditModal from "./EditModal.vue";
import { ElMessageBox, ElMessage } from "element-plus";
import dayjs from "dayjs";
import FilesDia from "./filesDia.vue";
+import { getCurrentMonth } from "@/utils/util"
// 琛ㄦ牸澶氶�夋閫変腑椤�
const multipleList = ref([]);
const { proxy } = getCurrentInstance();
const modalRef = ref();
+const editModalRef = ref();
const { payment_methods } = proxy.useDict("payment_methods");
const { income_types } = proxy.useDict("income_types");
const filesDia = ref()
@@ -85,9 +103,20 @@
} = usePaginationApi(
listPage,
{
- incomeMethod: undefined,
+ staffName: '',
+ season: getCurrentMonth(),
},
[
+ {
+ label: "閮ㄩ棬/宀椾綅",
+ align: "center",
+ prop: "deptName"
+ },
+ {
+ label: "鍔充繚鍗曞彿",
+ align: "center",
+ prop: "orderNo",
+ },
{
label: "鍛樺伐鍚嶇О",
align: "center",
@@ -99,15 +128,33 @@
prop: "staffNo"
},
{
+ label: "鍔充繚绫诲瀷",
+ align: "center",
+ prop: "dictTypeName",
+
+ },
+ {
label: "鍔充繚闃插叿",
align: "center",
prop: "dictName",
},
{
- label: "棰嗙敤鏁伴噺",
+ label: "鍙戞斁鏁伴噺",
align: "center",
prop: "num",
+
+ },
+ {
+ label: "杩涘巶鏃ユ湡",
+ align: "center",
+ prop: "factoryDate",
+
+ },
+ {
+ label: "鍙戞斁鏃ユ湡",
+ align: "center",
+ prop: "issueDate",
},
{
@@ -122,21 +169,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);
+ editModalRef.value.loadForm(row);
+};
+
+/** 鎼滅储鎸夐挳鎿嶄綔 */
+const handleQuery = () => {
+ getTableData();
};
const changePage = ({ page, limit }) => {
pagination.currentPage = page;
@@ -192,7 +284,6 @@
};
onMounted(() => {
- console.log(12331)
filters.entryDate = [
dayjs().format("YYYY-MM-DD"),
dayjs().add(1, "day").format("YYYY-MM-DD"),
--
Gitblit v1.9.3