|
|
@@ -2,7 +2,7 @@
|
|
|
<div class="ele-body">
|
|
|
<el-card shadow="never">
|
|
|
<div class="filter-container">
|
|
|
- <search-table @search="reload"></search-table>
|
|
|
+ <search-table @search="reload" ref="search"></search-table>
|
|
|
</div>
|
|
|
</el-card>
|
|
|
|
|
|
@@ -16,6 +16,7 @@
|
|
|
height="calc(100% - 80px)"
|
|
|
@columns-change="handleColumnChange"
|
|
|
:cache-key="cacheKeyUrl"
|
|
|
+ :cell-class-name="setCellClass"
|
|
|
>
|
|
|
<template v-slot:firstProcessDeliveryTime="{ row, $index }">
|
|
|
<el-date-picker
|
|
|
@@ -97,6 +98,7 @@
|
|
|
import { mapGetters } from 'vuex';
|
|
|
import { getColumns } from './columns.js';
|
|
|
import { getByCode } from '@/api/system/dictionary-data';
|
|
|
+ import { re } from 'mathjs';
|
|
|
export default {
|
|
|
mixins: [tabMixins],
|
|
|
components: {
|
|
|
@@ -131,7 +133,9 @@
|
|
|
2: '全部发货'
|
|
|
},
|
|
|
firstTime: '',
|
|
|
- records: []
|
|
|
+ records: [],
|
|
|
+ pendingSearchParams: null,
|
|
|
+ today: []
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -147,11 +151,44 @@
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
+ getDateProductNum(row, columnKey) {
|
|
|
+ if (!row.deliveryTime) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ const res = row.deliveryTime.split(' ')[0].split('-');
|
|
|
+ const day = 'date' + res[2];
|
|
|
+ return columnKey === day;
|
|
|
+ },
|
|
|
+
|
|
|
reload(where) {
|
|
|
- this.$refs.table.reload({ page: 1, where: where });
|
|
|
+ this.$nextTick(() => {
|
|
|
+ if (this.$refs.table) {
|
|
|
+ // 确保 ref 存在后执行 reload
|
|
|
+ this.$refs.table.reload({ page: 1, where: where });
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
+ getDate() {
|
|
|
+ let year = new Date().getFullYear();
|
|
|
+ let month = new Date().getMonth() + 1;
|
|
|
+ month = String(month).padStart(2, '0');
|
|
|
+ let days = new Date(year, month, 0).getDate();
|
|
|
+
|
|
|
+ this.today = [`${year}-${month}-01`, `${year}-${month}-${days}`];
|
|
|
+
|
|
|
+ return {
|
|
|
+ startDate: `${year}-${month}-01`,
|
|
|
+ endDate: `${year}-${month}-${days}`
|
|
|
+ };
|
|
|
+ },
|
|
|
+
|
|
|
datasource({ page, where, limit, ...row }) {
|
|
|
+ console.log(where);
|
|
|
+
|
|
|
+ let params = this.getDate();
|
|
|
+
|
|
|
return getListPage({
|
|
|
+ ...params,
|
|
|
...where,
|
|
|
pageNum: page,
|
|
|
size: limit
|
|
|
@@ -172,6 +209,12 @@
|
|
|
this.$refs.table.reload({ where: this.params });
|
|
|
},
|
|
|
|
|
|
+ setCellClass({ row, column, rowIndex, columnIndex }) {
|
|
|
+ return this.getDateProductNum(row, column.property)
|
|
|
+ ? 'content-num'
|
|
|
+ : '';
|
|
|
+ },
|
|
|
+
|
|
|
//打开工艺路线详情
|
|
|
async produceRouting(row) {
|
|
|
const res = await getProduceRoutingDetail({
|
|
|
@@ -190,6 +233,11 @@
|
|
|
|
|
|
mounted() {
|
|
|
this.$store.dispatch('theme/setBodyFullscreen', true);
|
|
|
+ this.$set(
|
|
|
+ this.$refs.search.$refs.seekPage.defaultWhere,
|
|
|
+ 'createTime',
|
|
|
+ this.today
|
|
|
+ );
|
|
|
},
|
|
|
beforeDestroy() {
|
|
|
this.$store.dispatch('theme/setBodyFullscreen', false);
|
|
|
@@ -308,14 +356,19 @@
|
|
|
}
|
|
|
|
|
|
:deep(.ele-pro-table-header-ellipsis > .el-table th.el-table__cell) {
|
|
|
- background-color: #e3e3e3;
|
|
|
+ background-color: #75bd42;
|
|
|
}
|
|
|
|
|
|
:deep(.date-box1) {
|
|
|
- background-color: #f0f9eb;
|
|
|
+ // background-color: #f0f9eb;
|
|
|
}
|
|
|
|
|
|
:deep(.date-box0) {
|
|
|
- background-color: rgba(215, 234, 255);
|
|
|
+ // background-color: rgba(215, 234, 255);
|
|
|
+ }
|
|
|
+
|
|
|
+ :deep(.content-num) {
|
|
|
+ color: #000;
|
|
|
+ background-color: #53c77f !important;
|
|
|
}
|
|
|
</style>
|