zxl
2025-05-16 72454c3e8f686c1325fb265d59b8b63251bd17e2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<template>
  <div class="message-con">
    <Dropdown trigger="click">
 
      <a href="javascript:void(0)">
        {{ value > 0 ? "有" + value + "条待办事项" : "无待办事项" }}
        <Icon v-if="value!=0" type="ios-arrow-down"></Icon>
      </a>
      <DropdownMenu v-if="value!=0" slot="list">
        <DropdownItem v-if="res.balanceCash" @click.native="navigateTo('deposit')">
          <Badge :count="res.balanceCash">待处理预存款提现申请 </Badge>
        </DropdownItem>
        <DropdownItem v-if="res.complain" @click.native="navigateTo('orderComplaint')">
          <Badge :count="res.complain">待处理投诉审核 </Badge>
        </DropdownItem>
        <DropdownItem v-if="res.distributionCash" @click.native="navigateTo('distributionCash')">
          <Badge :count="res.distributionCash">待处理分销商提现申请 </Badge>
        </DropdownItem>
        <DropdownItem v-if="res.goods" @click.native="navigateTo('applyGoods')">
          <Badge :count="res.goods">待处理商品审核 </Badge>
        </DropdownItem>
        <DropdownItem v-if="res.refund" @click.native="navigateTo('afterSaleOrder')">
          <Badge :count="res.refund">待处理售后申请 </Badge>
        </DropdownItem>
        <DropdownItem v-if="res.store" @click.native="navigateTo('shopAuth')">
          <Badge :count="res.store">待处理店铺入驻审核 </Badge>
        </DropdownItem>
        <DropdownItem v-if="res.waitPayBill" @click.native="navigateTo('accountStatementBill')">
          <Badge :count="res.waitPayBill">待与商家对账</Badge>
        </DropdownItem>
        <div></div>
      </DropdownMenu>
    </Dropdown>
  </div>
</template>
 
<script>
export default {
  name: "messageTip",
  data() {
    return {
      value: 0, // 消息数量
      empty: false, // 是否为空
    };
  },
  props: {
    res: {
      type: null,
    },
  },
  mounted() {
    this.init();
  },
  methods: {
    navigateTo(name) {
      this.$router.push({
        name,
      });
    },
    init() {
      Object.keys(this.res).forEach((item) => {
        this.value = parseInt(this.value) + parseInt(this.res[item]);
      });
    },
  },
};
</script>
<style scoped lang="scss">
/deep/ .ivu-select-dropdown {
  text-align: left;
}
.message-con {
  margin-right: 10px;
}
/deep/ .ivu-dropdown-item{
  padding: 7px 20px  !important;
}
/deep/ .ivu-badge-count{
  right: -10px !important;
}
</style>