From 092f67b26c5ab06a479341f5af80ea8e1642d43e Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 03 十一月 2025 16:08:24 +0800
Subject: [PATCH] 劳保、售后管理-添加导出功能
---
src/views/lavorissue/ledger/index.vue | 94 ++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 89 insertions(+), 5 deletions(-)
diff --git a/src/views/lavorissue/ledger/index.vue b/src/views/lavorissue/ledger/index.vue
index 27cd948..19d0e59 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="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"
@@ -49,6 +60,9 @@
<el-button type="primary" text @click="edit(row)" icon="editPen">
缂栬緫
</el-button>
+ <el-button type="primary" :disabled="row.adoptedDate ? true : false" text @click="adopted(row)">
+ 棰嗙敤
+ </el-button>
</template>
</PIMTable>
</div>
@@ -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",
},
{
@@ -127,16 +167,61 @@
]
);
+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