修改成本bug

This commit is contained in:
2023-12-18 14:26:23 +08:00
parent e039a3992d
commit 20f5a0d4c7
4 changed files with 42 additions and 15 deletions

View File

@@ -30,6 +30,7 @@ import {
} from '@/api/cost/costMaterialAutoReport';
import { getHotMaterialList } from '@/api/base/coreHotMaterial';
import { publicFormatter } from '@/utils/dict';
import moment from 'moment';
const tableProps = [
{
@@ -87,7 +88,7 @@ export default {
label: '时间范围',
dateType: 'daterange',
format: 'yyyy-MM-dd',
valueFormat: 'timestamp',
valueFormat: 'yyyy-MM-dd',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
@@ -140,8 +141,12 @@ export default {
this.listQuery.pageSize = 10;
this.listQuery.materialId = val.materialId;
this.listQuery.searchTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : null;
this.listQuery.startTime = val.searchTime
? moment(val.searchTime[0]).startOf('day').format('x')
: null;
this.listQuery.endTime = val.searchTime
? moment(val.searchTime[1]).endOf('day').format('x')
: null;
this.getDataList();
break;
case 'export':