12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- const _Http = getApp().globalData.http;
- Page({
- data: {
- loading: true,
- active: 0,
- content: {
- nocache: true,
- isExport: 0,
- pageNumber: 1,
- pageTotal: 1,
- pageSize: 20,
- total: 0,
- where: {
- condition: "",
- tablefilter: {}
- },
- sort: []
- },
- filter: []
- },
- onLoad(options) {
- this.getList()
- },
-
- handleFilter({
- detail
- }) {
- console.log(detail)
- },
- getList(init = false) {
- if (init.detail != undefined) init = init.detail;
- let content = this.data.content;
- if (init) content.pageNumber = 1;
- if (content.pageNumber > content.pageTotal) return;
- _Http.basic({
- "id": 20230320160203,
- content
- }).then(res => {
- console.log("发货单列表", res)
- this.selectComponent('#ListBox').RefreshToComplete();
- this.setData({
- list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data),
- "content.pageNumber": res.pageNumber + 1,
- "content.pageTotal": res.pageTotal,
- "content.sort": res.sort,
- "content.total": res.total,
- loading: false
- })
- })
- },
-
- onSearch({
- detail
- }) {
- this.setData({
- "content.where.condition": detail
- });
- this.getList(true)
- },
-
- tabsChange(e) {
- this.setData({
- active: e.detail.index,
- "content.where.status": e.detail.title == '全部' ? "" : e.detail.title
- });
- this.getList(true);
- },
- onReady() {
- this.setListHeight()
- },
-
- setListHeight() {
- this.selectComponent("#ListBox").setHeight(".head", this);
- },
- })
|