yuantianjiao 6 年之前
父節點
當前提交
7eb353ebdc

+ 99
- 0
src/components/customerCard/customerCard.vue 查看文件

@@ -0,0 +1,99 @@
1
+<template>
2
+  <div class="card-content">
3
+    <div class="card-top flex-h">
4
+      <div class="flex-h">
5
+        <img :src="inv" alt="">
6
+        <div>
7
+          <span>姓名:王丽丽</span>
8
+          <span>手机号:17372957078</span>
9
+        </div>
10
+      </div>
11
+      <div>
12
+        <div>领取记录</div>
13
+        <div>历史备注</div>
14
+      </div>
15
+    </div>
16
+    <div class="card-bottom">
17
+      <span>备注:老客户,人非常好。</span>
18
+      <span>+ 添加备注</span>
19
+    </div>
20
+  </div>
21
+</template>
22
+
23
+<script>
24
+import inv from '../../common/icon/inv.png'
25
+export default {
26
+  name: 'myCard',
27
+  data () {
28
+    return {
29
+      inv
30
+    }
31
+  },
32
+  props: {
33
+    data: {
34
+      type: Object,
35
+      default: () => { }
36
+    }
37
+  },
38
+  methods: {
39
+    share () {
40
+      this.$emit('share', this.data)
41
+    }
42
+  }
43
+}
44
+</script>
45
+
46
+<style lang="scss" scoped>
47
+.card-content {
48
+  box-shadow: 0px 2px 0.1rem 0px rgba(193, 204, 217, 0.5);
49
+  border-radius: 0.08rem;
50
+  overflow: hidden;
51
+  margin-bottom: 0.2rem;
52
+  .card-top {
53
+    padding: 0.3rem 0.1rem;
54
+    > div:nth-of-type(1) {
55
+      align-items: center;
56
+      img {
57
+        width: 0.5rem;
58
+        height: 0.5rem;
59
+        border-radius: 50%;
60
+        padding-right: 0.2rem;
61
+      }
62
+      div {
63
+        span {
64
+          display: block;
65
+          padding: .02rem 0;
66
+        }
67
+      }
68
+    }
69
+    > div:nth-of-type(2) {
70
+      display: flex;
71
+      flex-flow: column nowrap;
72
+      align-items: center;
73
+      justify-content: center;
74
+      flex: 1;
75
+      padding-left: .15rem;
76
+      div{
77
+        color: #FC6243;
78
+        font-size: .12rem;
79
+        padding: 0.02rem .15rem;
80
+        border: 1px solid #FC6243;
81
+        border-radius: 20px;
82
+        margin: 0.05rem 0;
83
+      }
84
+    }
85
+  }
86
+  .card-bottom{
87
+    background: #F2F2F2;
88
+    display: flex;
89
+    padding: .15rem;
90
+    justify-content: space-between;
91
+    span:nth-of-type(1){
92
+      color: #323645;
93
+    }
94
+    span:nth-of-type(2){
95
+      color: #909090;
96
+    }
97
+  }
98
+}
99
+</style>

+ 10
- 0
src/components/myCard/myCard.vue 查看文件

@@ -38,8 +38,18 @@
38 38
 </template>
39 39
 
40 40
 <script>
41
+import logo from '../../common/icon/logo-t.png'
42
+import line from '../../common/icon/cicyle.png'
43
+import line3 from '../../common/icon/Line3.png'
41 44
 export default {
42 45
   name: 'myCard',
46
+  data () {
47
+    return {
48
+      logo,
49
+      line,
50
+      line3
51
+    }
52
+  },
43 53
   props: {
44 54
     data: {
45 55
       type: Object,

+ 8
- 10
src/module/sales/coffeeIndex/index.vue 查看文件

@@ -49,8 +49,10 @@
49 49
               <myCard v-for="(item,index) in cardList" :key="index" :data='item' @share='share'></myCard>
50 50
             </div>
51 51
           </li>
52
-          <li :hidden="navActive !== 2">
53
-            3
52
+          <li :hidden="navActive !== 2" class="customer-card">
53
+            <div class="list-box">
54
+              <customerCard v-for="(item,index) in cardList" :key="index" :data='item' @share='share'></customerCard>
55
+            </div>
54 56
           </li>
55 57
         </ul>
56 58
       </div>
@@ -71,18 +73,13 @@
71 73
 import caseTableItem from '../../../components/caseTableItem/index'
72 74
 import topCaseInfo from '../../../components/topCaseInfo/index'
73 75
 import myCard from '../../../components/myCard/myCard'
74
-import logo from '../../../common/icon/logo-t.png'
75
-import line from '../../../common/icon/cicyle.png'
76
-import line3 from '../../../common/icon/Line3.png'
76
+import customerCard from '../../../components/customerCard/customerCard'
77 77
 
78 78
 export default {
79 79
   name: '',
80 80
   data () {
81 81
     return {
82
-      logo,
83
-      line,
84
-      line3,
85
-      navActive: 1,
82
+      navActive: 2,
86 83
       cutNavList: [{
87 84
         value: '城咖啡',
88 85
         id: '1',
@@ -143,7 +140,8 @@ export default {
143 140
   components: {
144 141
     topCaseInfo,
145 142
     caseTableItem,
146
-    myCard
143
+    myCard,
144
+    customerCard
147 145
   },
148 146
   created () {
149 147
 

+ 1
- 1
src/module/sales/coffeeIndex/page.scss 查看文件

@@ -137,7 +137,7 @@
137 137
               }
138 138
             }
139 139
           }
140
-          &.my-card{
140
+          &.my-card, &.customer-card{
141 141
             .list-box{
142 142
               padding: .26rem .2rem;
143 143
             }