This commit is contained in:
2025-10-30 13:37:52 +08:00
parent d859ba62c8
commit c9c8f82910
31 changed files with 1485 additions and 397 deletions

View File

@@ -54,7 +54,7 @@
:page.sync="listQuery.pageNo"
:limit.sync="listQuery.pageSize"
:total="listQuery.total"
@pagination="getDataList" />
@pagination="getNavDataList" />
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@@ -87,9 +87,12 @@ import ButtonNav from '@/components/ButtonNav';
const tableProps = [
{
prop: 'recTime',
prop: 'time',
label: '日期',
filter: (val) => parseTime(val, '{y}年{m}月{d}日'),
},
{
prop: 'remark',
label: '备注',
},
{
prop: 'otherCostName',
@@ -102,6 +105,10 @@ const tableProps = [
},
];
const tableProps2 = [
// {
// prop: 'remark',
// label: '备注',
// },
{
prop: 'otherCostName',
label: '成本名称',
@@ -182,13 +189,16 @@ export default {
{
type: 'datePicker',
label: '时间范围',
dateType: 'daterange',
format: 'yyyy-MM-dd',
dateType: 'datetimerange',
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
defaultTime: ['08:30:00', '08:30:00'],
param: 'searchTime',
width: 350,
clearable: false,
},
{
type: 'button',
@@ -237,24 +247,20 @@ export default {
},
methods: {
buttonClick(val) {
if (val.statisticType === 2) {
this.tableProps[0].filter = (val) =>
parseTime(val, '{y}年第{w}周');
}else{
this.tableProps[0].filter = (val) =>
parseTime(val, '{y}年{m}月{d}日');
}
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.pageSize = 20;
this.listQuery.name = val.name || null;
this.listQuery.statisticType = val.statisticType || 1;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
? val.searchTime[1]
: null;
if (this.activeName === 'his') {
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
: null;
this.getDataList();
} else {
this.getDataList2();
@@ -265,13 +271,18 @@ export default {
break;
case 'export':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.pageSize = 20;
this.listQuery.name = val.name || null;
this.listQuery.statisticType = val.statisticType || 1;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
? val.searchTime[1]
: null;
if (this.activeName === 'his') {
this.listQuery.endTime = val.searchTime
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
: null;
}
this.handleExport();
break;
default:
@@ -297,6 +308,13 @@ export default {
this.getDataList2();
}
},
getNavDataList(){
if (this.activeName === 'his') {
this.getDataList();
} else {
this.getDataList2();
}
},
// 获取数据2列表
getDataList2() {
getRawOthercostSunPage(this.listQuery).then((response) => {