| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- const _Http = getApp().globalData.http;
- Page({
- data: {
- type: "default",
- "id": 2026020515100102,
- "content": {
- "nocache": true,
- "pageNumber": 1,
- "pageSize": 20,
- "isManage": false, //服务申请管理,申请单管理 是传 true
- "where": {
- "condition": "",
- }
- },
- tabColorS: {
- 售前: {
- bgColor: "#E1EAFE",
- color: "#3874F6"
- },
- 售中: {
- bgColor: "#FEF0E1",
- color: "#F69E38"
- },
- 售后: {
- bgColor: "#FCE4E4",
- color: "#ED4949"
- },
- 紧急: {
- bgColor: "#FCE4E4",
- color: "#ED4949"
- },
- 历史售后: {
- bgColor: "#eeeeee",
- color: "#888888"
- }
- },
- filtratelist: []
- },
- async onLoad(options) {
- getApp().globalData.Language.getLanguagePackage(this, '进度');
- this.getList()
- },
- getList(init = false) {
- _Http.init(this.data.content, init).then(content => {
- _Http.basic({
- id: this.data.id,
- content
- }).then(res => {
- console.log("服务申请单列表", res)
- this.selectComponent('#ListBox').RefreshToComplete();
- if (res.code != '1') return wx.showToast({
- title: res.msg,
- icon: "none"
- })
- this.setData({
- content: _Http.paging(content, res),
- list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data)
- })
- })
- })
- },
- /* 开始搜索 */
- startSearch({
- detail
- }) {
- let condition = this.data.content ? this.data.content.where.condition : this.data.params.content.where.condition;
- if (detail == condition) return;
- this.setData({
- 'content.where.condition': detail,
- 'params.content.where.condition': detail
- });
- this.getList(true);
- },
- /* 取消搜索 */
- onClear() {
- this.setData({
- 'content.where.condition': "",
- 'params.content.where.condition': ""
- });
- this.getList(true);
- },
- onChangeTab({
- detail
- }) {
- this.setData({
- 'content.where.status': [detail.title]
- })
- this.getList(true)
- },
- })
|