1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- const _Http = getApp().globalData.http;
- Page({
- data: {
- list: [],
- loading: true,
- "content": {
- nocache: true,
- "isExport": 0,
- "pageNumber": 1,
- "pageTotal": 1,
- "pageSize": 20,
- "where": {
- "condition": "",
- "tablefilter": {},
- "status": ""
- },
- "type": "退货单"
- },
- },
- onLoad(options) {
- this.setData({
- userrole: wx.getStorageSync('userrole')
- })
- this.getList(true)
- getApp().globalData.Language.getLanguagePackage(this, 'E-订单');
- },
- /* 获取产品 */
- 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": 20230105161503,
- 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,
- })
- })
- },
- tabsChange(e) {
- this.data.content.where.status = e.detail.name == '全部' ? '' : e.detail.name;
- this.getList(true);
- },
- onReady() {
- this.selectComponent("#ListBox").setHeight(".tab", this);
- },
- toAdd(e) {
- wx.navigateTo({
- url: '/packageA/returnOne/update'
- })
- }
- })
|