XMSMZQFX.js 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. const _Http = getApp().globalData.http,
  2. currency = require("../../../utils/currency"),
  3. CNY = (value, symbol = "¥", precision = 2) => currency(value, {
  4. symbol,
  5. precision
  6. }).format();
  7. import * as echarts from '../../ec-canvas/echarts';
  8. Component({
  9. options: {
  10. addGlobalClass: true
  11. },
  12. lifetimes: {
  13. attached: function () {
  14. getApp().globalData.Language.getLanguagePackage(this)
  15. this.setData({
  16. "content.dataid": wx.getStorageSync('userMsg').userid,
  17. "content.username": wx.getStorageSync('userMsg').name,
  18. })
  19. }
  20. },
  21. data: {
  22. "content": {
  23. dateType: "15-30天",
  24. dataType: "",
  25. where: {
  26. dateType: "15-30天",
  27. type: "",
  28. tradingstatus: "",
  29. grade: "",
  30. },
  31. pageNumber: 1,
  32. pageSize: 20,
  33. pageTotal: 1
  34. },
  35. types: [],
  36. grades: [],
  37. tradingstatus: [{
  38. remarks: '全部',
  39. value: ''
  40. }, {
  41. remarks: '未成交',
  42. value: '未成交'
  43. }, {
  44. remarks: '已成交',
  45. value: '已成交'
  46. }, {
  47. remarks: '多次成交',
  48. value: '多次成交'
  49. }],
  50. },
  51. methods: {
  52. async getList() {
  53. if (this.data.grades.length == 0) {
  54. _Http.basic({
  55. "classname": "sysmanage.develop.optiontype.optiontype",
  56. "method": "optiontypeselect",
  57. "content": {
  58. "pageNumber": 1,
  59. "pageSize": 1000,
  60. "typename": "agentgrade",
  61. "parameter": {}
  62. },
  63. }).then(res => {
  64. console.log("客户分类", res)
  65. if (res.code == 1) {
  66. res.data.unshift({
  67. remarks: '全部',
  68. value: ''
  69. })
  70. this.setData({
  71. grades: res.data
  72. })
  73. }
  74. })
  75. }
  76. let content = this.data.content
  77. const {
  78. dataid,
  79. type,
  80. username,
  81. isleave
  82. } = getCurrentPages()[getCurrentPages().length - 1].data;
  83. content.dataid = dataid;
  84. content.type = type;
  85. content.username = username;
  86. content.where.isleave = isleave;
  87. console.log(12312312)
  88. _Http.basic({
  89. "id": 20231023092304,
  90. content
  91. }).then(res => {
  92. console.log("项目生命周期分析", res)
  93. if (res.code != '1') return wx.showToast({
  94. title: res.data,
  95. icon: "none"
  96. })
  97. this.setData({
  98. list: res.data.map(v => {
  99. v.bgColor = {
  100. "报备": "#3874F6",
  101. "报价": "#00B32B",
  102. "合同": "#FFAE02",
  103. "订单": "#F53F3F",
  104. } [v.end]
  105. return v
  106. })
  107. })
  108. try {
  109. this.selectAllComponents("#Filtrate").forEach(v => v.onCancel())
  110. } catch (error) {}
  111. })
  112. },
  113. changeType1({
  114. detail
  115. }) {
  116. console.log(detail)
  117. this.setData({
  118. "content.where.tradingstatus": detail,
  119. })
  120. this.getList(true)
  121. },
  122. changeType2({
  123. detail
  124. }) {
  125. this.setData({
  126. "content.where.type": detail,
  127. })
  128. this.getList(true)
  129. },
  130. changeType3({
  131. detail
  132. }) {
  133. this.setData({
  134. "content.where.grade": detail,
  135. })
  136. this.getList(true)
  137. },
  138. }
  139. })