|
|
@ -21,7 +21,7 @@ Page({ |
|
|
pageSize: 10, |
|
|
pageSize: 10, |
|
|
pageNum: 1 |
|
|
pageNum: 1 |
|
|
}, |
|
|
}, |
|
|
loading: true, |
|
|
|
|
|
|
|
|
loading: false, |
|
|
requesting: false, |
|
|
requesting: false, |
|
|
finished: false, |
|
|
finished: false, |
|
|
taskList: [] |
|
|
taskList: [] |
|
|
@ -30,10 +30,6 @@ Page({ |
|
|
* 生命周期函数--监听页面加载 |
|
|
* 生命周期函数--监听页面加载 |
|
|
*/ |
|
|
*/ |
|
|
onLoad: function (options) { |
|
|
onLoad: function (options) { |
|
|
var searchString = storage.get('mall-search') |
|
|
|
|
|
if(!util.isEmpty(searchString)){ |
|
|
|
|
|
this.setData({rearchStringList: searchString.split(',').slice(0, 24)}) |
|
|
|
|
|
} |
|
|
|
|
|
if(options.tab) { |
|
|
if(options.tab) { |
|
|
this.data.tabIndex = Number(options.tab) |
|
|
this.data.tabIndex = Number(options.tab) |
|
|
} |
|
|
} |
|
|
@ -41,6 +37,10 @@ Page({ |
|
|
min.setHours(0, 0, 0) |
|
|
min.setHours(0, 0, 0) |
|
|
this.data.form.date = util.formatDate(min, 'Y-M-D') |
|
|
this.data.form.date = util.formatDate(min, 'Y-M-D') |
|
|
this.setData({height: app.globalData.fragmentHeight - 100, tabIndex: this.data.tabIndex}) |
|
|
this.setData({height: app.globalData.fragmentHeight - 100, tabIndex: this.data.tabIndex}) |
|
|
|
|
|
var searchString = storage.get('mall-search') |
|
|
|
|
|
if(!util.isEmpty(searchString)){ |
|
|
|
|
|
this.setData({rearchStringList: searchString.split(',').slice(0, 24)}) |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
clearHistory: function(){ |
|
|
clearHistory: function(){ |
|
|
var that = this |
|
|
var that = this |
|
|
@ -93,13 +93,13 @@ Page({ |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
if (this.data.loading) { |
|
|
if (this.data.loading) { |
|
|
this.data.requesting = true |
|
|
|
|
|
|
|
|
this.setData({ loading: true }) |
|
|
} else { |
|
|
} else { |
|
|
this.setData({ requesting: true }) |
|
|
this.setData({ requesting: true }) |
|
|
} |
|
|
} |
|
|
if(this.data.tabIndex == 0){ |
|
|
if(this.data.tabIndex == 0){ |
|
|
getFactoryPrice(this.data.form).then(result => { |
|
|
getFactoryPrice(this.data.form).then(result => { |
|
|
if (result.data.records.length) { |
|
|
|
|
|
|
|
|
if (result.data && result.data.records.length) { |
|
|
this.handRespList(result.data) |
|
|
this.handRespList(result.data) |
|
|
} else { |
|
|
} else { |
|
|
this.setData({ finished: true, requesting: false, loading: false, tabIndex: this.data.tabIndex }) |
|
|
this.setData({ finished: true, requesting: false, loading: false, tabIndex: this.data.tabIndex }) |
|
|
@ -110,7 +110,7 @@ Page({ |
|
|
}) |
|
|
}) |
|
|
} else if(this.data.tabIndex == 1){ |
|
|
} else if(this.data.tabIndex == 1){ |
|
|
getInformationList(this.data.form).then(result => { |
|
|
getInformationList(this.data.form).then(result => { |
|
|
if (result.data.records.length) { |
|
|
|
|
|
|
|
|
if (result.data && result.data.records.length) { |
|
|
this.handRespList(result.data) |
|
|
this.handRespList(result.data) |
|
|
} else { |
|
|
} else { |
|
|
this.setData({ finished: true, requesting: false, loading: false, tabIndex: this.data.tabIndex }) |
|
|
this.setData({ finished: true, requesting: false, loading: false, tabIndex: this.data.tabIndex }) |
|
|
@ -121,7 +121,7 @@ Page({ |
|
|
}) |
|
|
}) |
|
|
} else if(this.data.tabIndex == 2){ |
|
|
} else if(this.data.tabIndex == 2){ |
|
|
getProxyOrderList(this.data.form).then(result => { |
|
|
getProxyOrderList(this.data.form).then(result => { |
|
|
if (result.data.records.length) { |
|
|
|
|
|
|
|
|
if (result.data && result.data.records.length) { |
|
|
this.handRespList(result.data) |
|
|
this.handRespList(result.data) |
|
|
} else { |
|
|
} else { |
|
|
this.setData({ finished: true, requesting: false, loading: false, tabIndex: this.data.tabIndex }) |
|
|
this.setData({ finished: true, requesting: false, loading: false, tabIndex: this.data.tabIndex }) |
|
|
@ -132,7 +132,7 @@ Page({ |
|
|
}) |
|
|
}) |
|
|
} else if(this.data.tabIndex == 3){ |
|
|
} else if(this.data.tabIndex == 3){ |
|
|
getPreferList(this.data.form).then(result => { |
|
|
getPreferList(this.data.form).then(result => { |
|
|
if (result.data.records.length) { |
|
|
|
|
|
|
|
|
if (result.data && result.data.records.length) { |
|
|
this.handRespList(result.data) |
|
|
this.handRespList(result.data) |
|
|
} else { |
|
|
} else { |
|
|
this.setData({ finished: true, requesting: false, loading: false, tabIndex: this.data.tabIndex }) |
|
|
this.setData({ finished: true, requesting: false, loading: false, tabIndex: this.data.tabIndex }) |
|
|
|