Browse Source

no message

feature/v2.2
xpz2018 4 years ago
parent
commit
a5c81c27e7
3 changed files with 42 additions and 37 deletions
  1. 20
      pages/process/check-list/index.js
  2. 21
      pages/process/index/index.js
  3. 38
      pages/process/order-list/index.js

20
pages/process/check-list/index.js

@ -16,28 +16,26 @@ Scene({
top: 0, top: 0,
orderList: [], orderList: [],
form: { form: {
funcType: 0,
status: '',
pageNum: 1, pageNum: 1,
pageSize: 15 pageSize: 15
}, },
title: '全部', title: '全部',
lastTime: null lastTime: null
}, },
// * 生命周期函数--监听页面加载
// * 生命周期函数--1-定价 2-待过皮重 3-待过榜审核 4-待付款 41-代付中 42-待结算 5-已完成 6-已关闭
onLoad: function (options) { onLoad: function (options) {
if(options.status){ 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 = '待定价订单' 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 = '待付款订单' this.data.title = '待付款订单'
} else if(this.data.form.funcType == 4){
} else if(this.data.form.status == 4){
this.data.title = '已完成订单' 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 = '已关闭订单' this.data.title = '已关闭订单'
} }
} }

21
pages/process/index/index.js

@ -14,9 +14,9 @@ Component({
height: app.globalData.safeFragmentHeight, height: app.globalData.safeFragmentHeight,
tabList: [ tabList: [
{ status: 1, badge: '', name: '定价', icon: '/assets/image/icon_pricing.png' }, { 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: [ tabList1: [
{ status: 0, badge: '', name: '待收货', icon: '/assets/image/icon-dsh.png' }, { status: 0, badge: '', name: '待收货', icon: '/assets/image/icon-dsh.png' },
@ -89,13 +89,14 @@ Component({
wx.navigateTo({ url: '/pages/process/agent-list/index' }) wx.navigateTo({ url: '/pages/process/agent-list/index' })
}, },
checkList: function (e) { 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){ outsideList: function(e){
if(!util.isEmpty(e.currentTarget.dataset.status) || Number(e.currentTarget.dataset.status) == 0){ if(!util.isEmpty(e.currentTarget.dataset.status) || Number(e.currentTarget.dataset.status) == 0){

38
pages/process/order-list/index.js

@ -29,34 +29,40 @@ Scene({
top: 0, top: 0,
orderList: [], orderList: [],
form: { form: {
funcType: 0,
status: '',
pageNum: 1, pageNum: 1,
pageSize: 15 pageSize: 15
}, },
title: '全部',
title: '厂内收货订单',
lastTime: null lastTime: null
}, },
// * 生命周期函数--监听页面加载 // * 生命周期函数--监听页面加载
onLoad: function (options) { onLoad: function (options) {
if(options.status){ 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 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) 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() this.fetchOrderList()
}, },
onEvent: function(message){ onEvent: function(message){

Loading…
Cancel
Save