From 41490d6a55c4d9d33cbbedaad5d3c0ee07eb0c0a Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 26 二月 2025 11:03:22 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev
---
src/views/performance/manHour/workTimeManagement.vue | 82 ++++++++++++++++++++++++++--------------
1 files changed, 53 insertions(+), 29 deletions(-)
diff --git a/src/views/performance/manHour/workTimeManagement.vue b/src/views/performance/manHour/workTimeManagement.vue
index 4bbe90d..b93f8fe 100644
--- a/src/views/performance/manHour/workTimeManagement.vue
+++ b/src/views/performance/manHour/workTimeManagement.vue
@@ -75,6 +75,7 @@
placeholder="鍏ㄩ儴"
size="small"
@change="refreshTable()"
+ clearable
>
<el-option
v-for="item in stateList"
@@ -173,16 +174,18 @@
:column="column"
:page="page"
:tableLoading="tableLoading"
- :height="'calc(100vh - 320px)'"
+ :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"
- :height="'calc(100vh - 320px)'"
+ :height="'calc(100vh - 350px)'"
v-if="currentTable == 'ValueTable1'"
@pagination="pagination0"
></lims-table>
@@ -466,7 +469,6 @@
exportOutputHours,
} from "@/api/performance/manHour";
import limsTable from "@/components/Table/lims-table.vue";
-import { checkPermi } from "@/utils/permission"; // 鏉冮檺鍒ゆ柇鍑芥暟
export default {
components: {
ValueTable,
@@ -595,7 +597,6 @@
dataType: "action",
fixed: "right",
label: "鎿嶄綔",
- width: "160px",
operation: [
{
name: "缂栬緫",
@@ -648,7 +649,7 @@
page: {
total: 0,
size: 10,
- current: 0,
+ current: 1,
},
tableLoading: false,
tableData0: [],
@@ -670,7 +671,7 @@
page0: {
total: 0,
size: 10,
- current: 0,
+ current: 1,
},
shifList: [],
};
@@ -743,7 +744,6 @@
this.getList0();
},
methods: {
- checkPermi,
getList(entity) {
this.tableLoading = true;
let param = {};
@@ -751,6 +751,7 @@
param = { ...entity, ...this.page };
} else {
param = { ...this.entity, ...this.page };
+ param.dateTime = JSON.stringify(param.dateTime);
}
delete param.total;
selectAuxiliaryWorkingHoursDay({ ...param })
@@ -772,6 +773,7 @@
param = { ...entity, ...this.page0 };
} else {
param = { ...this.entity, ...this.page0 };
+ param.dateTime = JSON.stringify(param.dateTime);
}
delete param.total;
selectAuxiliaryOutputWorkingHours({ ...param })
@@ -786,13 +788,15 @@
this.tableLoading = false;
});
},
- pagination(current, size) {
- this.page.current = current;
+ pagination({ page, limit }) {
+ this.page.current = page;
+ this.page.size = limit;
this.getList();
},
- pagination0(current, size) {
- this.page0.current = current;
- this.getList();
+ pagination0({ page, limit }) {
+ this.page0.current = page;
+ this.page0.size = limit;
+ this.getList0();
},
/** 灏嗘椂闂撮�夋嫨鍣ㄩ粯璁ら�変负褰撳ぉ鐨勬棩鏈� */
setDate() {
@@ -947,7 +951,23 @@
}
},
batchCheck(e) {
- this.$refs.ValueTable0.batchCheck(e);
+ const list = JSON.parse(JSON.stringify(this.ValueTable0Selected));
+ const state = e === 0 ? "涓嶆壒鍑�" : "宸叉壒鍑�";
+ let auxiliaryWorkingHoursDays = [];
+ list.forEach((item) => {
+ delete item.orderBy;
+ item.state = state;
+ auxiliaryWorkingHoursDays.push(item);
+ });
+ approve({ auxiliaryWorkingHoursDays: auxiliaryWorkingHoursDays }).then(
+ (res) => {
+ if (res.code === 201) {
+ return;
+ }
+ this.submitBatchCheckDialog();
+ this.$message.success("鎿嶄綔鎴愬姛");
+ }
+ );
},
closeBatchCheckDialog() {
this.batchCheckDialog = false;
@@ -1036,7 +1056,7 @@
}
entity.weekDay = this.entity.weekDay;
entity.name = this.entity.name;
- collectWorkingHours({ entity: entity }).then((res) => {
+ collectWorkingHours(entity).then((res) => {
this.totalInfo = res.data;
});
},
@@ -1047,22 +1067,22 @@
},
getInfoByCode() {
if (this.formData.number) {
- selectAuxiliaryWorkingHoursByNumber(this.formData.number).then(
- (res) => {
- this.auxiliaryWorking = res.data;
- if (this.addVisible) {
- this.formData.approvedWorkingHour =
- this.auxiliaryWorking.approvedWorkingHour;
- this.formData.auxiliaryProject =
- this.auxiliaryWorking.auxiliaryProject;
- } else if (this.title == "瀹℃牳" && this.checkVisible) {
- this.formData0.approvedWorkingHour =
- this.auxiliaryWorking.approvedWorkingHour;
- this.formData0.auxiliaryProject =
- this.auxiliaryWorking.auxiliaryProject;
- }
+ selectAuxiliaryWorkingHoursByNumber({
+ number: this.formData.number,
+ }).then((res) => {
+ this.auxiliaryWorking = res.data;
+ if (this.addVisible) {
+ this.formData.approvedWorkingHour =
+ this.auxiliaryWorking.approvedWorkingHour;
+ this.formData.auxiliaryProject =
+ this.auxiliaryWorking.auxiliaryProject;
+ } else if (this.title == "瀹℃牳" && this.checkVisible) {
+ this.formData0.approvedWorkingHour =
+ this.auxiliaryWorking.approvedWorkingHour;
+ this.formData0.auxiliaryProject =
+ this.auxiliaryWorking.auxiliaryProject;
}
- );
+ });
}
},
handleOut() {
@@ -1103,6 +1123,10 @@
this.outLoading = false;
});
},
+ handleSelectionChange(val) {
+ // console.log(111, val);
+ this.ValueTable0Selected = val;
+ },
},
};
</script>
--
Gitblit v1.9.3