salesTotalDetail.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. const utils = require('../../utils/util')
  2. Page({
  3. data: {
  4. isPickerRender: false,
  5. isPickerShow: false,
  6. pickerConfig: {
  7. endDate: true,
  8. dateLimit: true,
  9. initStartTime: "2020-01-01",
  10. initEndTime: "2020-12-01",
  11. limitStartTime: "2015-01-01",
  12. limitEndTime: "2095-01-01"
  13. },
  14. searchParams: {
  15. startTime: "2019-01-01 ",
  16. endTime: "2019-12-01"
  17. },
  18. dataStr: '',
  19. isModel:false
  20. },
  21. onLoad: function (options) {
  22. },
  23. onReady: function (options) {
  24. },
  25. timePickerShow: function () {
  26. this.setData({
  27. isPickerShow: true,
  28. isPickerRender: true,
  29. chartHide: true
  30. });
  31. },
  32. pickerHide: function () {
  33. this.setData({
  34. isPickerShow: false,
  35. chartHide: false
  36. });
  37. },
  38. setPickerTime: function (val) {
  39. console.log(val);
  40. let data = val.detail;
  41. let startTime = utils.formatDate(data.startTime,'yyyy-MM-dd')
  42. let endTime = utils.formatDate(data.endTime,'yyyy-MM-dd')
  43. this.setData({
  44. ["searchParams.startTime"]: data.startTime,
  45. ["searchParams.endTime"]: data.endTime,
  46. dataStr: startTime +" ~ "+ endTime
  47. });
  48. },
  49. showDetail(){
  50. this.setData({
  51. isModel:true
  52. })
  53. },
  54. hideDetail(){
  55. this.setData({
  56. isModel:false
  57. })
  58. }
  59. })