From 17f743d0efbae8a606d3bfaf9d4912d6f9ac7f1d Mon Sep 17 00:00:00 2001
From: CD配唱片 <CD配唱片>
Date: 星期日, 27 四月 2025 15:10:33 +0800
Subject: [PATCH] 提交计划大表,详细计划更新loading
---
src/views/mainPlan/plateProcessStat/index.vue | 87 +++++++++++++++++++++++++++++++++----------
1 files changed, 66 insertions(+), 21 deletions(-)
diff --git a/src/views/mainPlan/plateProcessStat/index.vue b/src/views/mainPlan/plateProcessStat/index.vue
index f43828a..f8e8ce9 100644
--- a/src/views/mainPlan/plateProcessStat/index.vue
+++ b/src/views/mainPlan/plateProcessStat/index.vue
@@ -95,13 +95,13 @@
const aps_plate_process_statList = ref([]);
const open = ref(false);
-const loading = ref(true);
+const loading = ref(false);
const showSearch = ref(true);
const single = ref(true);
const multiple = ref(true);
const total = ref(0);
const title = ref("");
-const height = ref(document.documentElement.clientHeight - 270 + "px;")
+const height = ref(document.documentElement.clientHeight - 220 + "px;")
const data = reactive({
@@ -131,7 +131,7 @@
// 琛ㄦ牸閰嶇疆
const columns = ref([
- { type: 'seq', title: '搴忓彿', width: 60 },
+/* { type: 'seq', title: '搴忓彿', width: 60 },*/
{
title: '宸ュ崟鍙�',
field: 'workOrderNo',
@@ -140,47 +140,50 @@
{
title: '宸ュ簭鍚嶇О',
field: 'processName',
- width: 250,
},
{
title: '宸ュ簭鍙�',
- field: 'routeProcessNumber',
- width: 150,
+ field: 'routeProcessNumberTxt',
+ width: 100,
},
{
title: '褰撳墠宸ュ簭鍙�',
- field: 'currentProcessNumber',
- width: 150,
+ field: 'currentProcessNumberTxt',
+ width: 100,
},
{
title: '鐢熶骇鏁伴噺',
field: 'productionQuantity',
- width: 100,
+ width: 80,
},
{
title: '鏍囧噯宸ユ椂',
field: 'standardTime',
- width: 100,
+ width: 80,
},
{
title: '宸ュ簭鎬诲伐鏃�',
field: 'processTotalTime',
- width: 100,
+ width: 80,
+
},
{
title: '璁″垝寮�宸ユ棩',
- field: 'processPlanStartDay',
- width: 200,
+ field: 'processPlanStartDaytxt',
+ width: 140,
+ type:'html'
},
{
title: '璁″垝瀹屽伐鏃�',
- field: 'processPlanEndDay',
- width: 200,
+ field: 'processPlanEndDaytxt',
+ width: 140,
+ type:'html'
},
{
title: '璁㈠崟瀹屽伐鏃�',
field: 'orderPlanEndDay',
- width: 200,
+ width: 120,
+ format: 'YYYY-MM-DD'
}
]);
@@ -190,7 +193,16 @@
function getList() {
loading.value = true;
listPlateStat(queryParams.value).then(response => {
- aps_plate_process_statList.value = response.rows;
+ const listValue = response.rows;
+ listValue.forEach(listItem => {
+ listItem[`processPlanStartDaytxt`]= listItem.warning? `<font color="red">${listItem.processPlanStartDay}</font>` :listItem.processPlanStartDay;
+ listItem[`processPlanEndDaytxt`]= listItem.warning? `<font color="red">${listItem.processPlanEndDay}</font>` :listItem.processPlanEndDay;
+ listItem[`routeProcessNumberTxt`]= listItem.routeProcessNumber.toString().padStart(3, '0');
+ listItem[`currentProcessNumberTxt`]= listItem.currentProcessNumber.toString().padStart(3, '0');
+
+
+ });
+ aps_plate_process_statList.value =listValue
total.value = response.total;
loading.value = false;
});
@@ -232,6 +244,7 @@
/** 閲嶇疆鎸夐挳鎿嶄綔 */
function resetQuery() {
+ queryParams.value.workOrderNo ='';
proxy.resetForm("queryRef");
handleQuery();
}
@@ -253,11 +266,10 @@
/** 淇敼鎸夐挳鎿嶄綔 */
function handleUpdate(row) {
reset();
+ loading.value = true;
updateStat().then(response => {
form.value = response.data;
- open.value = true;
- title.value = "淇敼閽i噾缁熻";
-
+ loading.value = false;
ElMessage({
message: '鏁版嵁鏇存柊鎴愬姛',
type: 'success',
@@ -304,6 +316,39 @@
...queryParams.value
}, `aps_plate_process_stat_${new Date().getTime()}.xlsx`)
}
-
+const headerCellClassName = ({ column }) => {
+ if (column.field === 'name') {
+ return 'col-blue'
+ }
+ return null
+}
+const rowClassName = ({ rowIndex }) => {
+ if ([2, 3, 5].includes(rowIndex)) {
+ return 'row-green'
+ }
+ return null
+}
+const cellClassName = ({ row, column }) => {
+ if (column.field === 'processPlanStartDay'||column.field === 'processPlanEndDay') {
+ if (row.warning) {
+ return 'col-orange'
+ }
+ }
+ return null
+}
getList();
</script>
+<style lang="scss" scoped>
+::v-deep(.mytable-style.vxe-table .vxe-body--row.row-green) {
+ background-color: #187;
+ color: #fff;
+}
+::v-deep(.mytable-style.vxe-table .vxe-header--column.col-blue) {
+ background-color: #2db7f5;
+ color: #fff;
+}
+::v-deep(.mytable-style.vxe-table .vxe-body--column.col-red) {
+ background-color: red;
+ color: #fff;
+}
+</style>
\ No newline at end of file
--
Gitblit v1.9.3