From a5c81c27e7a1f7a4eddbb6ff6ea71149c16788f6 Mon Sep 17 00:00:00 2001 From: xpz2018 <107107461@qq.com> Date: Thu, 29 Jul 2021 14:15:48 +0800 Subject: [PATCH] no message --- pages/process/check-list/index.js | 20 ++++++++-------- pages/process/index/index.js | 21 +++++++++-------- pages/process/order-list/index.js | 38 ++++++++++++++++++------------- 3 files changed, 42 insertions(+), 37 deletions(-) diff --git a/pages/process/check-list/index.js b/pages/process/check-list/index.js index 60e2418..141b321 100644 --- a/pages/process/check-list/index.js +++ b/pages/process/check-list/index.js @@ -16,28 +16,26 @@ Scene({ top: 0, orderList: [], form: { - funcType: 0, + status: '', pageNum: 1, pageSize: 15 }, title: '全部', lastTime: null }, - // * 生命周期函数--监听页面加载 + // * 生命周期函数--1-定价 2-待过皮重 3-待过榜审核 4-待付款 41-代付中 42-待结算 5-已完成 6-已关闭 onLoad: function (options) { if(options.status){ - this.data.form.funcType = Number(options.status) - if(this.data.form.funcType == 1){ + this.data.form.status = Number(options.status) + if(this.data.form.status == 1){ this.data.title = '待定价订单' - } else if(this.data.form.funcType == 2){ - this.data.title = '过磅审核订单' - } else if(this.data.form.funcType == 3){ + } else if(this.data.form.status == 2){ + this.data.title = '待过皮重' + } else if(this.data.form.status == 3){ this.data.title = '待付款订单' - } else if(this.data.form.funcType == 4){ + } else if(this.data.form.status == 4){ this.data.title = '已完成订单' - this.data.form.funcType = 6 - this.data.form.status = 5 - } else if(this.data.form.funcType == 5){ + } else if(this.data.form.status == 5){ this.data.title = '已关闭订单' } } diff --git a/pages/process/index/index.js b/pages/process/index/index.js index 934711e..25abfb5 100644 --- a/pages/process/index/index.js +++ b/pages/process/index/index.js @@ -14,9 +14,9 @@ Component({ height: app.globalData.safeFragmentHeight, tabList: [ { status: 1, badge: '', name: '定价', icon: '/assets/image/icon_pricing.png' }, - { status: 2, badge: '', name: '过磅审核', icon: '/assets/image/icon_checking.png' }, - { status: 3, badge: '', name: '待付款', icon: '/assets/image/icon_payment.png' }, - { status: 4, badge: '', name: '已完成', icon: '/assets/image/icon_finish.png' } + { status: 3, badge: '', name: '过磅审核', icon: '/assets/image/icon_checking.png' }, + { status: 4, badge: '', name: '待付款', icon: '/assets/image/icon_payment.png' }, + { status: 5, badge: '', name: '已完成', icon: '/assets/image/icon_finish.png' } ], tabList1: [ { status: 0, badge: '', name: '待收货', icon: '/assets/image/icon-dsh.png' }, @@ -89,13 +89,14 @@ Component({ wx.navigateTo({ url: '/pages/process/agent-list/index' }) }, checkList: function (e) { - if(e.currentTarget.dataset.status == 3){ - wx.navigateTo({ url: '/pages/process/payment-list/index?status=' + e.currentTarget.dataset.status }) - } else if(e.currentTarget.dataset.status == 4){ - wx.navigateTo({ url: '/pages/process/order-list/index?status=' + e.currentTarget.dataset.status }) - } else { - wx.navigateTo({ url: '/pages/process/check-list/index?status=' + e.currentTarget.dataset.status }) - } + // if(e.currentTarget.dataset.status == 3){ + // wx.navigateTo({ url: '/pages/process/payment-list/index?status=' + e.currentTarget.dataset.status }) + // } else if(e.currentTarget.dataset.status == 4){ + // wx.navigateTo({ url: '/pages/process/order-list/index?status=' + e.currentTarget.dataset.status }) + // } else { + // wx.navigateTo({ url: '/pages/process/check-list/index?status=' + e.currentTarget.dataset.status }) + // } + wx.navigateTo({ url: '/pages/process/order-list/index?status=' + e.currentTarget.dataset.status }) }, outsideList: function(e){ if(!util.isEmpty(e.currentTarget.dataset.status) || Number(e.currentTarget.dataset.status) == 0){ diff --git a/pages/process/order-list/index.js b/pages/process/order-list/index.js index 76be0ae..2ef35ef 100644 --- a/pages/process/order-list/index.js +++ b/pages/process/order-list/index.js @@ -29,34 +29,40 @@ Scene({ top: 0, orderList: [], form: { - funcType: 0, + status: '', pageNum: 1, pageSize: 15 }, - title: '全部', + title: '厂内收货订单', lastTime: null }, // * 生命周期函数--监听页面加载 onLoad: function (options) { if(options.status){ - this.data.form.funcType = Number(options.status) - if(this.data.form.funcType == 1){ - this.data.title = '待定价订单' - } else if(this.data.form.funcType == 2){ - this.data.title = '过磅审核订单' - } else if(this.data.form.funcType == 3){ - this.data.title = '待付款订单' - } else if(this.data.form.funcType == 4){ - this.data.title = '已完成订单' - this.data.form.funcType = 6 - this.data.form.status = 5 + this.data.form.status = Number(options.status) + if(this.data.form.status == 1){ + // this.data.title = '待定价订单' + this.data.tabIndex = 1 + } else if(this.data.form.status == 3){ + // this.data.title = '过磅审核订单' + this.data.tabIndex = 3 + } else if(this.data.form.status == 4){ + // this.data.title = '待付款订单' + this.data.tabIndex = 4 + } else if(this.data.form.status == 5){ + // this.data.title = '已完成订单' this.data.tabIndex = 7 - } else if(this.data.form.funcType == 5){ - this.data.title = '已关闭订单' + } else if(this.data.form.status == 6){ + // this.data.title = '已关闭订单' + this.data.tabIndex = 8 } } event.on('OrderMessage', this, this.onEvent) - this.setData({ height: app.globalData.fragmentHeight - 90, title: this.data.title, tabIndex: this.data.tabIndex, admin: app.userInfo.type && app.userInfo.type.indexOf('ADMIN') >= 0 }) + this.setData({ + height: app.globalData.fragmentHeight - 90, + tabIndex: this.data.tabIndex, + admin: app.userInfo.type && app.userInfo.type.indexOf('ADMIN') >= 0 + }) this.fetchOrderList() }, onEvent: function(message){