| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 |
- const _Http = getApp().globalData.http,
- currency = require("../../../utils/currency"),
- CNY = (value, symbol = "¥", precision = 2) => currency(value, {
- symbol,
- precision
- }).format();
- import * as echarts from '../../ec-canvas/echarts';
- Component({
- options: {
- addGlobalClass: true
- },
- lifetimes: {
- attached: function () {
- getApp().globalData.Language.getLanguagePackage(this)
- this.setData({
- "content.dataid": wx.getStorageSync('userMsg').userid,
- "content.username": wx.getStorageSync('userMsg').name,
- })
- }
- },
- data: {
- "content": {
- dateType: "15-30天",
- dataType: "",
- where: {
- dateType: "15-30天",
- type: "",
- tradingstatus: "",
- grade: "",
- },
- pageNumber: 1,
- pageSize: 20,
- pageTotal: 1
- },
- types: [],
- grades: [],
- tradingstatus: [{
- remarks: '全部',
- value: ''
- }, {
- remarks: '未成交',
- value: '未成交'
- }, {
- remarks: '已成交',
- value: '已成交'
- }, {
- remarks: '多次成交',
- value: '多次成交'
- }],
- },
- methods: {
- async getList() {
- if (this.data.grades.length == 0) {
- _Http.basic({
- "classname": "sysmanage.develop.optiontype.optiontype",
- "method": "optiontypeselect",
- "content": {
- "pageNumber": 1,
- "pageSize": 1000,
- "typename": "agentgrade",
- "parameter": {}
- },
- }).then(res => {
- console.log("客户分类", res)
- if (res.code == 1) {
- res.data.unshift({
- remarks: '全部',
- value: ''
- })
- this.setData({
- grades: res.data
- })
- }
- })
- }
- let content = this.data.content
- const {
- dataid,
- type,
- username,
- isleave
- } = getCurrentPages()[getCurrentPages().length - 1].data;
- content.dataid = dataid;
- content.type = type;
- content.username = username;
- content.where.isleave = isleave;
- console.log(12312312)
- _Http.basic({
- "id": 20231023092304,
- content
- }).then(res => {
- console.log("项目生命周期分析", res)
- if (res.code != '1') return wx.showToast({
- title: res.data,
- icon: "none"
- })
- this.setData({
- list: res.data.map(v => {
- v.bgColor = {
- "报备": "#3874F6",
- "报价": "#00B32B",
- "合同": "#FFAE02",
- "订单": "#F53F3F",
- } [v.end]
- return v
- })
- })
- try {
- this.selectAllComponents("#Filtrate").forEach(v => v.onCancel())
- } catch (error) {}
- })
- },
- changeType1({
- detail
- }) {
- console.log(detail)
- this.setData({
- "content.where.tradingstatus": detail,
- })
- this.getList(true)
- },
- changeType2({
- detail
- }) {
- this.setData({
- "content.where.type": detail,
- })
- this.getList(true)
- },
- changeType3({
- detail
- }) {
- this.setData({
- "content.where.grade": detail,
- })
- this.getList(true)
- },
- }
- })
|