From 4d0a487dc5f6b8dc15a8177d519f76ebaeb0d2ee Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 13 三月 2025 17:19:39 +0800
Subject: [PATCH] 原材料下单样式修改
---
src/views/performance/manHour/workTimeManagement.vue | 106 ++++++++++++++++++++++++++++++----------------------
1 files changed, 61 insertions(+), 45 deletions(-)
diff --git a/src/views/performance/manHour/workTimeManagement.vue b/src/views/performance/manHour/workTimeManagement.vue
index 7fb4049..152e3a5 100644
--- a/src/views/performance/manHour/workTimeManagement.vue
+++ b/src/views/performance/manHour/workTimeManagement.vue
@@ -42,28 +42,28 @@
</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>
<div style="display: flex; align-items: center">
- <p style="font-size: 14px; margin-right: 30px">
- 鎬诲伐鏃舵眹鎬伙細<span v-if="totalInfo" style="font-size: 16px; color: #3a7bfa">{{
- totalInfo["浜ч噺宸ユ椂姹囨��"] + totalInfo["杈呭姪宸ユ椂姹囨��"]
- ? Number(
- totalInfo["浜ч噺宸ユ椂姹囨��"] + totalInfo["杈呭姪宸ユ椂姹囨��"]
- ).tofixed(4)
- : 0
- }}</span> 浜ч噺宸ユ椂姹囨�伙細<span v-if="totalInfo" style="font-size: 16px; color: #3a7bfa">{{
- totalInfo["浜ч噺宸ユ椂姹囨��"]
- ? Number(totalInfo["浜ч噺宸ユ椂姹囨��"]).tofixed(4)
- : 0
- }}</span> 杈呭姪宸ユ椂姹囨�伙細<span v-if="totalInfo" style="font-size: 16px; color: #3a7bfa">{{
- totalInfo["杈呭姪宸ユ椂姹囨��"]
- ? Number(totalInfo["杈呭姪宸ユ椂姹囨��"]).tofixed(4)
- : 0
- }}</span>
- </p>
+<!-- <p style="font-size: 14px; margin-right: 30px">-->
+<!-- 鎬诲伐鏃舵眹鎬伙細<span v-if="totalInfo" style="font-size: 16px; color: #3a7bfa">{{-->
+<!-- totalInfo["浜ч噺宸ユ椂姹囨��"] + totalInfo["杈呭姪宸ユ椂姹囨��"]-->
+<!-- ? Number(-->
+<!-- totalInfo["浜ч噺宸ユ椂姹囨��"] + totalInfo["杈呭姪宸ユ椂姹囨��"]-->
+<!-- ).tofixed(4)-->
+<!-- : 0-->
+<!-- }}</span> 浜ч噺宸ユ椂姹囨�伙細<span v-if="totalInfo" style="font-size: 16px; color: #3a7bfa">{{-->
+<!-- totalInfo["浜ч噺宸ユ椂姹囨��"]-->
+<!-- ? Number(totalInfo["浜ч噺宸ユ椂姹囨��"]).tofixed(4)-->
+<!-- : 0-->
+<!-- }}</span> 杈呭姪宸ユ椂姹囨�伙細<span v-if="totalInfo" style="font-size: 16px; color: #3a7bfa">{{-->
+<!-- totalInfo["杈呭姪宸ユ椂姹囨��"]-->
+<!-- ? Number(totalInfo["杈呭姪宸ユ椂姹囨��"]).tofixed(4)-->
+<!-- : 0-->
+<!-- }}</span>-->
+<!-- </p>-->
<el-button v-show="currentTable == 'ValueTable0' &&
checkPermi(['performance:manHour:workTimeManagement:add'])
" size="small" type="primary" @click="openAdd">褰曞叆鏁版嵁</el-button>
@@ -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"],
@@ -250,13 +250,13 @@
down: false,
addFileVisible: false,
weekList: [
- { label: "鍛ㄤ竴", value: "鍛ㄤ竴", type: "primary" },
- { label: "鍛ㄤ簩", value: "鍛ㄤ簩", type: "primary" },
- { label: "鍛ㄤ笁", value: "鍛ㄤ笁", type: "primary" },
- { label: "鍛ㄥ洓", value: "鍛ㄥ洓", type: "primary" },
- { label: "鍛ㄤ簲", value: "鍛ㄤ簲", type: "primary" },
- { label: "鍛ㄥ叚", value: "鍛ㄥ叚", type: "primary" },
- { label: "鍛ㄦ棩", value: "鍛ㄦ棩", type: "primary" },
+ { label: "鍛ㄤ竴", value: "1", type: "primary" },
+ { label: "鍛ㄤ簩", value: "2", type: "primary" },
+ { label: "鍛ㄤ笁", value: "3", type: "primary" },
+ { label: "鍛ㄥ洓", value: "4", type: "primary" },
+ { label: "鍛ㄤ簲", value: "5", type: "primary" },
+ { label: "鍛ㄥ叚", value: "6", type: "primary" },
+ { label: "鍛ㄦ棩", value: "0", type: "primary" },
],
currentTable: "ValueTable0",
addVisible: false,
@@ -354,10 +354,23 @@
label: "鐝",
prop: "shift",
dataType: "tag",
- formatData: this.shifList,
+ formatData: (params) => {
+ if (this.shifList.find(m => m.value == params)) {
+ return this.shifList.find(m => m.value == params).label
+ } else {
+ return null
+ }
+ },
},
{ label: "鍛ㄦ", prop: "week" },
- { label: "鏄熸湡", prop: "weekDay" },
+ {
+ label: "鏄熸湡",
+ prop: "weekDay",
+ dataType: "tag",
+ formatData: (params) => {
+ return this.weekList.find(m => m.value == params).label
+ },
+ },
{ label: "鍒涘缓鏃堕棿", prop: "createTime" },
{ label: "鏃ユ湡", prop: "dateTime" },
{
@@ -505,12 +518,19 @@
},
mounted() {
this.getCurrentWeekNumber();
- this.collectWorkingHours();
+ // 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 +541,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 +553,7 @@
this.tableLoading = false;
});
},
+ // 鏌ヨ浜ч噺宸ユ椂鍒楄〃
getList0(entity) {
this.tableLoading = true;
let param = {};
@@ -541,9 +561,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;
@@ -604,7 +625,7 @@
this.page0.current = 1;
this.getList0(entity);
}
- this.collectWorkingHours();
+ // this.collectWorkingHours();
},
refresh() {
this.entity = {};
@@ -660,7 +681,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 = "";
@@ -670,12 +690,11 @@
this.formData.auxiliaryProject = "";
this.addVisible = false;
this.refreshTable("page");
- this.collectWorkingHours();
+ // this.collectWorkingHours();
});
} else {
updateAuxiliaryWorkingHoursDay(this.formData).then((res) => {
this.addLoad = false;
- if (res.code == 201) return;
this.$message.success("鎿嶄綔鎴愬姛");
this.formData.number = "";
this.formData.amount = "";
@@ -684,7 +703,7 @@
this.formData.nonproductiveTime = "";
this.formData.auxiliaryProject = "";
this.refreshTable("page");
- this.collectWorkingHours();
+ // this.collectWorkingHours();
});
}
},
@@ -728,9 +747,6 @@
});
approve({ auxiliaryWorkingHoursDays: auxiliaryWorkingHoursDays }).then(
(res) => {
- if (res.code === 201) {
- return;
- }
this.submitBatchCheckDialog();
this.$message.success("鎿嶄綔鎴愬姛");
}
@@ -742,7 +758,7 @@
submitBatchCheckDialog() {
this.batchCheckDialog = false;
this.refreshTable("page");
- this.collectWorkingHours();
+ // this.collectWorkingHours();
},
submitCheck(e) {
if (!this.formData0.number) {
@@ -767,11 +783,10 @@
} else {
this.checkLoadY = false;
}
- if (res.code == 201) return;
this.$message.success("鎿嶄綔鎴愬姛");
this.checkVisible = false;
this.refreshTable("page");
- this.collectWorkingHours();
+ // this.collectWorkingHours();
});
},
getCurrentWeekNumber(now = new Date()) {
@@ -823,6 +838,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