| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="filters" :inline="true"> |
| | | <el-form-item label="发放季度:" 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" |
| | |
| | | <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> |
| | |
| | | |
| | | <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([]); |
| | |
| | | } = usePaginationApi( |
| | | listPage, |
| | | { |
| | | incomeMethod: undefined, |
| | | staffName: '', |
| | | season: getCurrentMonth(), |
| | | }, |
| | | [ |
| | | { |
| | | label: "劳保单号", |
| | | align: "center", |
| | | prop: "orderNo", |
| | | }, |
| | | { |
| | | label: "员工名称", |
| | | align: "center", |
| | |
| | | align: "center", |
| | | prop: "staffNo" |
| | | }, |
| | | |
| | | { |
| | | label: "劳保类型", |
| | | align: "center", |
| | | prop: "dictTypeName", |
| | | |
| | | }, |
| | | { |
| | | label: "劳保防具", |
| | | align: "center", |
| | |
| | | |
| | | }, |
| | | { |
| | | label: "领用数量", |
| | | label: "发放数量", |
| | | align: "center", |
| | | prop: "num", |
| | | |
| | | }, |
| | | { |
| | | label: "进厂日期", |
| | | align: "center", |
| | | prop: "factoryDate", |
| | | |
| | | }, |
| | | { |
| | | label: "发放日期", |
| | | align: "center", |
| | | prop: "issueDate", |
| | | |
| | | }, |
| | | { |
| | |
| | | ] |
| | | ); |
| | | |
| | | const jidu = ref([ |
| | | { |
| | | value: '1', |
| | | label: '第一季度' |
| | | }, |
| | | { |
| | | value: '2', |
| | | label: '第二季度' |
| | | }, |
| | | { |
| | | value: '3', |
| | | label: '第三季度' |
| | | }, |
| | | { |
| | | value: '4', |
| | | label: '第四季度' |
| | | } |
| | | ]) |
| | | |
| | | // 多选后做什么 |
| | | 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; |
| | |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | proxy.download(`/lavorIssue/export`, {}, "劳保台账.xlsx"); |
| | | proxy.download(`/lavorIssue/exportCopy`, {season: filters.season}, "劳保台账.xlsx"); |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已取消"); |
| | |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | console.log(12331) |
| | | filters.entryDate = [ |
| | | dayjs().format("YYYY-MM-DD"), |
| | | dayjs().add(1, "day").format("YYYY-MM-DD"), |