添加页面

This commit is contained in:
zhengw
2026-01-29 17:46:14 +08:00
parent df67413bf8
commit 85483c7ca2
44 changed files with 1606 additions and 94 deletions

View File

@@ -1,12 +1,14 @@
import { loginStatus, post } from '@/utils/https';
import { getAuthInfo, getDataSet, toArray, toastSuccess, toNumber } from '@/utils/util';
import { cloneLite, getAuthInfo, getDataSet, toArray, toastSuccess, toNumber } from '@/utils/util';
const defaultParams = { curr_page: 1, page_count: 20, state: '1', process_id: '' };
Page({
/**
* 页面的初始数据
*/
data: {
params: { curr_page: 1, page_count: 20, state: '1', process_id: '' } as any,
params: cloneLite(defaultParams) as any,
list: [] as any[],
count: 0,
dialog: {
@@ -27,25 +29,31 @@ Page({
this.getList();
},
searchChange(e: any) {
this.data.params.order_no = e.detail.value;
const key = getDataSet(e).key;
this.data.params[key] = e.detail.value;
this.setData({ params: this.data.params });
},
searchChange2(e: any) {
const key = getDataSet(e).key;
const val = `${e.detail.value || ''}`.trim();
console.log(e);
if (val) {
this.data.params[key] = val;
} else {
delete this.data.params[key];
}
this.setData({ params: this.data.params });
},
searchOk() {
this.getList(1);
},
searchReset() {
this.data.params = cloneLite(defaultParams);
this.getList(1);
},
tabChange(e: any) {
const state = getDataSet(e).key;
this.data.params.state = state;
this.getList();
this.getList(1);
},
paginationChange(e: any) {
this.getList(e.detail.curr_page);