From 6a973bf9be9b0ba2dd5f81b37a74b07b18781016 Mon Sep 17 00:00:00 2001 From: gaoluyang <2820782392@qq.com> Date: 星期四, 13 三月 2025 16:42:15 +0800 Subject: [PATCH] 工时管理-查询参数修改 --- src/views/performance/manHour/workTimeManagement.vue | 29 ++++++++++++++++------------- 1 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/views/performance/manHour/workTimeManagement.vue b/src/views/performance/manHour/workTimeManagement.vue index 7fb4049..c32c29e 100644 --- a/src/views/performance/manHour/workTimeManagement.vue +++ b/src/views/performance/manHour/workTimeManagement.vue @@ -42,7 +42,7 @@ </div> </div> <div style="display: flex; align-items: center; justify-content: space-between"> - <el-radio-group :key="'111'" v-model="currentTable" size="small"> + <el-radio-group :key="'111'" v-model="currentTable" size="small" @change="searchList"> <el-radio-button label="ValueTable0"> 杈呭姪宸ユ椂 </el-radio-button> <el-radio-button label="ValueTable1"> 浜ч噺宸ユ椂 </el-radio-button> </el-radio-group> @@ -78,9 +78,11 @@ </div> <div class="table"> <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading" + key="tableData" :height="'calc(100vh - 350px)'" :isSelection="true" v-if="currentTable == 'ValueTable0'" @pagination="pagination" :handleSelectionChange="handleSelectionChange"></lims-table> <lims-table :tableData="tableData0" :column="column0" :page="page0" :tableLoading="tableLoading" + key="tableData0" :height="'calc(100vh - 350px)'" v-if="currentTable == 'ValueTable1'" @pagination="pagination0"></lims-table> </div> <el-dialog :before-close="handleClose" :title="formData.id ? '缂栬緫' : '褰曞叆鏁版嵁'" :visible.sync="addVisible" @@ -220,7 +222,6 @@ </template> <script> -import ValueTable from "@/components/Table/value-table.vue"; import { getYearAndMonthAndDays } from "@/utils/date"; import { selectAuxiliaryWorkingHoursDay, @@ -238,7 +239,6 @@ import limsTable from "@/components/Table/lims-table.vue"; export default { components: { - ValueTable, limsTable, }, dicts: ["sys_class_type"], @@ -507,10 +507,17 @@ this.getCurrentWeekNumber(); this.collectWorkingHours(); this.selectshiftByUser(); - this.getList(); - this.getList0(); + this.searchList() }, methods: { + searchList() { + if (this.currentTable == 'ValueTable0') { + this.getList(); + } else { + this.getList0(); + } + }, + // 鏌ヨ杈呭姪宸ユ椂鍒楄〃 getList(entity) { this.tableLoading = true; let param = {}; @@ -521,7 +528,6 @@ param.dateTime = param.dateTime?.length > 0 ? JSON.stringify(param.dateTime) : null; } delete param.total; - console.log('11111111111111111') selectAuxiliaryWorkingHoursDay({ ...param }) .then((res) => { this.tableLoading = false; @@ -534,6 +540,7 @@ this.tableLoading = false; }); }, + // 鏌ヨ浜ч噺宸ユ椂鍒楄〃 getList0(entity) { this.tableLoading = true; let param = {}; @@ -541,9 +548,10 @@ param = { ...entity, ...this.page0 }; } else { param = { ...this.entity, ...this.page0 }; - param.dateTime = JSON.stringify(param.dateTime); + param.dateTime = param.dateTime?.length > 0 ? JSON.stringify(param.dateTime) : null } delete param.total; + delete param.state; selectAuxiliaryOutputWorkingHours({ ...param }) .then((res) => { this.tableLoading = false; @@ -660,7 +668,6 @@ if (!this.formData.id) { insertAuxiliaryWorkingHoursDay(this.formData).then((res) => { this.addLoad = false; - if (res.code == 201) return; this.$message.success("宸叉彁浜�"); this.formData.number = ""; this.formData.amount = ""; @@ -675,7 +682,6 @@ } else { updateAuxiliaryWorkingHoursDay(this.formData).then((res) => { this.addLoad = false; - if (res.code == 201) return; this.$message.success("鎿嶄綔鎴愬姛"); this.formData.number = ""; this.formData.amount = ""; @@ -728,9 +734,6 @@ }); approve({ auxiliaryWorkingHoursDays: auxiliaryWorkingHoursDays }).then( (res) => { - if (res.code === 201) { - return; - } this.submitBatchCheckDialog(); this.$message.success("鎿嶄綔鎴愬姛"); } @@ -767,7 +770,6 @@ } else { this.checkLoadY = false; } - if (res.code == 201) return; this.$message.success("鎿嶄綔鎴愬姛"); this.checkVisible = false; this.refreshTable("page"); @@ -823,6 +825,7 @@ } entity.weekDay = this.entity.weekDay; entity.name = this.entity.name; + entity.state = this.entity.state; collectWorkingHours(entity).then((res) => { this.totalInfo = res.data; }); -- Gitblit v1.9.3