许成详 6 лет назад
Родитель
Сommit
ac1f669a7a

+ 75
- 0
src/components/salesRecordItem/index.vue Просмотреть файл

@@ -0,0 +1,75 @@
1
+<template>
2
+  <div class="salesRecordItem">
3
+    <div class="top flex-h">
4
+      <span>销售名称:</span>
5
+      <span>{{data.name}}</span>
6
+      <div class="flex-item">
7
+        <i class="iconfont icon-jiantou-right"></i>
8
+      </div>
9
+    </div>
10
+    <div class="itemBody flex-h">
11
+      <div class="flex-item">
12
+        <div>
13
+          <span>已发出<em>{{data.cardAndCoupon.usedNum}}</em>张卡券</span>
14
+          <div class="progress">
15
+            <div :style="{width: (data.cardAndCoupon.usedNum/data.cardAndCoupon.totalNum).toFixed(2) * 100 + '%', background: returnProgressColor((data.cardAndCoupon.usedNum/data.cardAndCoupon.totalNum).toFixed(2) * 100)}"></div>
16
+          </div>
17
+          <a :class="{'grey': data.cardAndCoupon.status === 1}" @click="triggerCardAndCoupon(data)">{{data.cardAndCoupon.status === 1 ? '关闭卡券' : '开启卡券'}}</a>
18
+        </div>
19
+      </div>
20
+      <div class="flex-item">
21
+        <div>
22
+          <span>已送出<em>12</em>杯饮品</span>
23
+          <div class="progress">
24
+            <div :style="{width: (data.drink.usedNum/data.drink.totalNum).toFixed(2) * 100 + '%', background: returnProgressColor((data.drink.usedNum/data.drink.totalNum).toFixed(2) * 100)}"></div>
25
+          </div>
26
+          <a :class="{'grey': data.drink.status === 1}" @click="triggerDrink(data)">{{data.drink.status === 1 ? '关闭饮品' : '开启饮品'}}</a>
27
+        </div>
28
+      </div>
29
+    </div>
30
+  </div>
31
+</template>
32
+
33
+<script>
34
+
35
+export default {
36
+  name: '',
37
+  props: ['data'],
38
+  data () {
39
+    return {
40
+
41
+    }
42
+  },
43
+  computed: {
44
+
45
+  },
46
+  components: {
47
+
48
+  },
49
+  created () {
50
+
51
+  },
52
+  methods: {
53
+    triggerCardAndCoupon (item) { // 切换卡券状态
54
+      this.$emit('triggerCardAndCoupon', {type: this.data.cardAndCoupon.status === 1 ? 'close' : 'open', data: item})
55
+    },
56
+    triggerDrink (item) { // 切换饮品状态
57
+      this.$emit('triggerDrink', {type: this.data.drink.status === 1 ? 'close' : 'open', data: item})
58
+    },
59
+    returnProgressColor (val) { // 返回进度条颜色
60
+      if (val <= 33) {
61
+        return '#45bfa1'
62
+      } else if (val <= 66) {
63
+        return '#ff9800'
64
+      } else {
65
+        return '#ff2b00'
66
+      }
67
+    },
68
+  }
69
+}
70
+</script>
71
+
72
+<!-- Add "scoped" attribute to limit CSS to this component only -->
73
+<style lang="scss" scoped>
74
+@import 'page.scss';
75
+</style>

+ 100
- 0
src/components/salesRecordItem/page.scss Просмотреть файл

@@ -0,0 +1,100 @@
1
+.salesRecordItem{
2
+  width: 100%;
3
+  position: relative;
4
+  overflow: hidden;
5
+  border-radius: .1rem;
6
+  background: #fff;
7
+  box-shadow: 0 0 .1rem .02rem rgba(0, 0, 0, .05);
8
+  padding: .12rem 0;
9
+  .top{
10
+    width: 100%;
11
+    align-items: center;
12
+    span{
13
+      line-height: .28rem;
14
+      font-size: .12rem;
15
+      margin-right: .05rem;
16
+      margin-left: .2rem;
17
+      &:nth-child(2){
18
+        margin-left: 0;
19
+        font-size: .16rem;
20
+      }
21
+    }
22
+    div{
23
+      text-align: right;
24
+      margin-right: .2rem;
25
+      i{
26
+        font-size: .12rem;
27
+        color: #666;
28
+      }
29
+    }
30
+  }
31
+  .itemBody{
32
+    padding: 0 .2rem;
33
+    margin: .14rem auto 0;
34
+    margin-bottom: .12rem;
35
+    >div{
36
+      position: relative;
37
+      overflow: hidden;
38
+      &:nth-child(1)::after{
39
+        content: '';
40
+        width: .01rem;
41
+        height: 100%;
42
+        position: absolute;
43
+        right: 0;
44
+        top: 0;
45
+        background: #eee;
46
+      }
47
+      >div{
48
+        width: 100%;
49
+        position: relative;
50
+        overflow: hidden;
51
+        span{
52
+          width: 100%;
53
+          display: block;
54
+          text-align: center;
55
+          line-height: .26rem;
56
+          font-size: .12rem;
57
+          color: #666;
58
+          em{
59
+            color: #fb3f19;
60
+            font-size: .12rem;
61
+          }
62
+        }
63
+        .progress{
64
+          width: 1.1rem;
65
+          height: .04rem;
66
+          position: relative;
67
+          overflow: hidden;
68
+          border-radius: .04rem;
69
+          background: #ccc;
70
+          margin: .04rem auto 0;
71
+          >div{
72
+            position: absolute;
73
+            height: .04rem;
74
+            left: 0;
75
+            top: 0;
76
+            border-radius: 0 .04rem .04rem 0;
77
+            background: #ff9800;
78
+          }
79
+        }
80
+        a{
81
+          width: 1.1rem;
82
+          display: block;
83
+          text-align: center;
84
+          line-height: .34rem;
85
+          font-size: .15rem;
86
+          color: #fff;
87
+          border: .01rem solid #fb3f19;
88
+          background: #fb3f19;
89
+          border-radius: .03rem;
90
+          margin: .16rem auto 0;
91
+          &.grey{
92
+            color: #666;
93
+            border: .01rem solid #666;
94
+            background: none;
95
+          }
96
+        }
97
+      }
98
+    }
99
+  }
100
+}

+ 86
- 0
src/pages/sales/cardAndCouponNum/index.vue Просмотреть файл

@@ -0,0 +1,86 @@
1
+<template>
2
+  <div class="mainPage flex-v">
3
+    <div class="top flex-h">
4
+      <span>¥<em>199</em>元</span>
5
+      <div class="flex-item">
6
+        <div>
7
+          <span>健身团课一次体验卡</span>
8
+          <span>卡券描述卡券描述卡券描述卡券描述卡券描述</span>
9
+          <span>2018年02月02日 - 2018年02月03日</span>
10
+        </div>
11
+      </div>
12
+    </div>
13
+    <ul class="numList flex-h">
14
+      <li class="flex-item">
15
+        <div>
16
+          <span>总数量</span>
17
+          <span>10</span>
18
+        </div>
19
+      </li>
20
+      <li class="flex-item">
21
+        <div>
22
+          <span>剩余</span>
23
+          <span>5</span>
24
+        </div>
25
+      </li>
26
+      <li class="flex-item">
27
+        <div>
28
+          <span>用户领取</span>
29
+          <span>5</span>
30
+        </div>
31
+      </li>
32
+      <li class="flex-item">
33
+        <div>
34
+          <span>实际使用</span>
35
+          <span>2</span>
36
+        </div>
37
+      </li>
38
+    </ul>
39
+    <div class="flex-item">
40
+      <div>
41
+        <div>
42
+          <ul>
43
+            <li class="flex-h">
44
+              <span>销售名称</span>
45
+              <div class="flex-item">
46
+                <div>
47
+                  <span>实际使用</span>
48
+                </div>
49
+              </div>
50
+              <span>用户领取</span>
51
+            </li>
52
+            <li class="flex-h" v-for="(item,index) in 10" :key="index">
53
+              <span>xxx</span>
54
+              <div class="flex-item">
55
+                <div>
56
+                  <span>2</span>
57
+                </div>
58
+              </div>
59
+              <span>5</span>
60
+            </li>
61
+          </ul>
62
+        </div>
63
+      </div>
64
+    </div>
65
+  </div>
66
+</template>
67
+
68
+<script>
69
+
70
+export default {
71
+  name: '',
72
+  data () {
73
+    return {
74
+    }
75
+  },
76
+  created () {
77
+  },
78
+  methods: {
79
+  }
80
+}
81
+</script>
82
+
83
+<!-- Add "scoped" attribute to limit CSS to this component only -->
84
+<style lang="scss" scoped>
85
+@import 'page.scss';
86
+</style>

+ 127
- 0
src/pages/sales/cardAndCouponNum/page.scss Просмотреть файл

@@ -0,0 +1,127 @@
1
+.mainPage{
2
+  .top{
3
+    align-items: center;
4
+    margin-top: .18rem;
5
+    position: relative;
6
+    background: #fff;
7
+    z-index: 3;
8
+    >span{
9
+      font-size: .12rem;
10
+      color: #fc6243;
11
+      margin-right: .2rem;
12
+      margin-left: .2rem;
13
+      em{
14
+        font-size: .32rem;
15
+        font-weight: bolder;
16
+        color: #fc6243;
17
+      }
18
+    }
19
+    >div{
20
+      margin-right: .2rem;
21
+      >div{
22
+        width: 100%;
23
+        position: relative;
24
+        overflow: hidden;
25
+        >span{
26
+          width: 100%;
27
+          display: block;
28
+          overflow: hidden;
29
+          text-overflow: ellipsis;
30
+          white-space: nowrap;
31
+          line-height: .22rem;
32
+          font-size: .12rem;
33
+          color: #666;
34
+          &:first-child{
35
+            line-height: .28rem;
36
+            font-size: .15rem;
37
+            color: #333;
38
+          }
39
+        }
40
+      }
41
+    }
42
+  }
43
+  .numList{
44
+    padding: .25rem .2rem .05rem;
45
+    position: relative;
46
+    z-index: 2;
47
+    background: #fff;
48
+    box-shadow: 0 0 .1rem .02rem rgba(0, 0, 0, .05);
49
+    >li{
50
+      >div{
51
+        width: 100%;
52
+        position: relative;
53
+        overflow: hidden;
54
+        >span{
55
+          width: 100%;
56
+          display: block;
57
+          text-align: center;
58
+          line-height: .22rem;
59
+          font-size: .12rem;
60
+          color: #fc6243;
61
+          &:first-child{
62
+            line-height: .2rem;
63
+            color: #666;
64
+          }
65
+        }
66
+      }
67
+    }
68
+  }
69
+  >.flex-item{
70
+    >div{
71
+      width: 100%;
72
+      position: absolute;
73
+      left: 0;
74
+      top: 0;
75
+      bottom: 0;
76
+      overflow: hidden;
77
+      >div{
78
+        padding: 0 .2rem;
79
+        position: relative;
80
+        height: 100%;
81
+        overflow-y: scroll;
82
+        -webkit-overflow-scrolling: touch;
83
+        transform: translateZ(0);
84
+        -webkit-transform: translateZ(0);
85
+        ul{
86
+          margin: .2rem auto 0;
87
+          li{
88
+            border-top: .01rem solid #eee;
89
+            &:first-child{
90
+              border: none;
91
+            }
92
+            span{
93
+              line-height: .34rem;
94
+              font-size: .12rem;
95
+              text-align: center;
96
+              white-space: nowrap;
97
+              overflow: hidden;
98
+              text-overflow: ellipsis;
99
+            }
100
+            >span{
101
+              min-width: 1rem;
102
+              &:last-child{
103
+                color: #fc6243;
104
+              }
105
+            }
106
+            &:first-child{
107
+              >span:last-child{
108
+                color: #333;
109
+              }
110
+            }
111
+            >div{
112
+              >div{
113
+                width: 100%;
114
+                position: relative;
115
+                overflow: hidden;
116
+                span{
117
+                  width: 100%;
118
+                  display: block;
119
+                }
120
+              }
121
+            }
122
+          }
123
+        }
124
+      }
125
+    }
126
+  }
127
+}

+ 11
- 1
src/pages/sales/coffeeIndex/index.vue Просмотреть файл

@@ -46,6 +46,16 @@
46 46
           </li>
47 47
           <li :hidden="navActive !== 1" class="my-card">
48 48
             <div class="list-box">
49
+              <div class="cardAndCouponInfo flex-h">
50
+                <div class="flex-item">
51
+                  <div>
52
+                    <span>卡券货值总额:</span>
53
+                    <span>¥1000</span>
54
+                    <span>万</span>
55
+                  </div>
56
+                </div>
57
+                <router-link :to="{name: 'salesRecord',query: {}}">销售记录</router-link>
58
+              </div>
49 59
               <myCard v-for="(item,index) in cardList" :key="index" :data='item' @share='share'></myCard>
50 60
             </div>
51 61
           </li>
@@ -79,7 +89,7 @@ export default {
79 89
   name: '',
80 90
   data () {
81 91
     return {
82
-      navActive: 2,
92
+      navActive: 1,
83 93
       cutNavList: [{
84 94
         value: '城咖啡',
85 95
         id: '1',

+ 28
- 1
src/pages/sales/coffeeIndex/page.scss Просмотреть файл

@@ -138,8 +138,35 @@
138 138
             }
139 139
           }
140 140
           &.my-card, &.customer-card{
141
+            .cardAndCouponInfo{
142
+              align-items: center;
143
+              margin: .1rem 0 .15rem;
144
+              div{
145
+                font-size: 0;
146
+                white-space: nowrap;
147
+                span{
148
+                  line-height: .3rem;
149
+                  font-size: .13rem;
150
+                  display: inline-block;
151
+                  margin-right: .05rem;
152
+                  &:nth-child(2){
153
+                    font-size: .16rem;
154
+                    color: #fc6243;
155
+                  }
156
+                }
157
+              }
158
+              a{
159
+                line-height: .24rem;
160
+                padding: 0 .1rem;
161
+                box-sizing: border-box;
162
+                border: .01rem solid #333;
163
+                color: #333;
164
+                border-radius: .04rem;
165
+                font-size: .12rem;
166
+              }
167
+            }
141 168
             .list-box{
142
-              padding: .26rem .2rem;
169
+              padding: .1rem .2rem .2rem;
143 170
             }
144 171
           }
145 172
         }

+ 22
- 4
src/pages/sales/router.js Просмотреть файл

@@ -4,30 +4,48 @@ import Router from 'vue-router'
4 4
 import login from './login/index' // 登录
5 5
 import coffeeIndex from './coffeeIndex/index' // 点单首页
6 6
 import placeOrder from './placeOrder/index' // 城咖啡-点单
7
+import salesRecord from './salesRecord/index' // 销售记录
8
+import salesGiveOutDetail from './salesGiveOutDetail/index' // 销售发放详情
9
+import cardAndCouponNum from './cardAndCouponNum/index' // 卡券数量信息
7 10
 
8 11
 Vue.use(Router)
9 12
 
10 13
 const router = new Router({
11
-  routes: [{
14
+  routes: [{ // 登录
12 15
     path: '/login',
13 16
     name: 'login',
14 17
     component: login,
15 18
     children: []
16
-  },{
19
+  }, { // 点单首页
17 20
     path: '/coffeeIndex',
18 21
     name: 'coffeeIndex',
19 22
     component: coffeeIndex,
20 23
     children: []
21
-  },{
24
+  }, { // 城咖啡-点单
22 25
     path: '/placeOrder',
23 26
     name: 'placeOrder',
24 27
     component: placeOrder,
25 28
     children: []
29
+  }, { // 销售记录
30
+    path: '/salesRecord',
31
+    name: 'salesRecord',
32
+    component: salesRecord,
33
+    children: []
34
+  }, { // 销售发放详情
35
+    path: '/salesGiveOutDetail',
36
+    name: 'salesGiveOutDetail',
37
+    component: salesGiveOutDetail,
38
+    children: []
39
+  }, { // 卡券数量信息
40
+    path: '/cardAndCouponNum',
41
+    name: 'cardAndCouponNum',
42
+    component: cardAndCouponNum,
43
+    children: []
26 44
   }],
27 45
 })
28 46
 
29 47
 router.beforeEach((to, from, next) => {
30
-  
48
+
31 49
   next()
32 50
 })
33 51
 

+ 95
- 0
src/pages/sales/salesGiveOutDetail/index.vue Просмотреть файл

@@ -0,0 +1,95 @@
1
+<template>
2
+  <div class="mainPage flex-v">
3
+    <div class="top">
4
+      <topCaseInfo :data="topCaseInfoData" @selectCase="showSelect = true"></topCaseInfo>
5
+    </div>
6
+    <div class="flex-item flex-v body">
7
+      <span>销售姓名:<em>柳依依</em></span>
8
+      <ul class="flex-h">
9
+        <li class="flex-item" :class="{'active': activeIndex === 0}" @click="cutNav(0)">
10
+          <span>饮品</span>
11
+          <span>(已赠送12杯)</span>  
12
+        </li> 
13
+        <li class="flex-item" :class="{'active': activeIndex === 1}" @click="cutNav(1)">
14
+          <span>卡券</span>
15
+          <span>(已发出12张)</span>  
16
+        </li> 
17
+      </ul>
18
+      <div class="flex-item">
19
+        <div>
20
+          <ul>
21
+            <li :hidden="activeIndex === 1">
22
+              <ul class="list">
23
+                <li class="flex-h" v-for="(item,index) in 40" :key="index">
24
+                  <div class="flex-item">
25
+                    <div>
26
+                      <span>水吧特级调试咖啡水吧特级调试咖啡水吧特级调试咖啡水吧特级调试咖啡</span>
27
+                    </div>
28
+                  </div>
29
+                  <div class="flex-item">
30
+                    <div>
31
+                      <span>¥50 * 1</span>
32
+                    </div>
33
+                  </div>
34
+                  <span>2018/03/03 15:02:02</span>
35
+                </li>
36
+              </ul>
37
+            </li>
38
+            <li :hidden="activeIndex === 0">
39
+              <ul class="list">
40
+                <router-link tag="li" class="flex-h" v-for="(item,index) in 40" :key="index" :to="{name: 'cardAndCouponNum', query: {}}">
41
+                  <div class="flex-item">
42
+                    <div>
43
+                      <span>健身团课体验卡</span>
44
+                    </div>
45
+                  </div>
46
+                  <div class="flex-item">
47
+                    <div>
48
+                      <span>¥50 * 1</span>
49
+                    </div>
50
+                  </div>
51
+                  <span>2018/03/03 15:02:02</span>
52
+                </router-link>
53
+              </ul>
54
+            </li>
55
+          </ul>
56
+        </div>
57
+      </div>
58
+    </div>
59
+  </div>
60
+</template>
61
+
62
+<script>
63
+import topCaseInfo from '../../../components/topCaseInfo/index'
64
+
65
+export default {
66
+  name: '',
67
+  data () {
68
+    return {
69
+      activeIndex: 0,
70
+      topCaseInfoData: {
71
+        caseName: '',
72
+        caseId: '',
73
+        showSelect: false,
74
+        userName: 'xxx'
75
+      },
76
+    }
77
+  },
78
+  components: {
79
+    topCaseInfo,
80
+  },
81
+  created () {
82
+
83
+  },
84
+  methods: {
85
+    cutNav (index) {
86
+      this.activeIndex = index
87
+    },
88
+  }
89
+}
90
+</script>
91
+
92
+<!-- Add "scoped" attribute to limit CSS to this component only -->
93
+<style lang="scss" scoped>
94
+@import 'page.scss';
95
+</style>

+ 115
- 0
src/pages/sales/salesGiveOutDetail/page.scss Просмотреть файл

@@ -0,0 +1,115 @@
1
+.mainPage{
2
+  .body{
3
+    >span{
4
+      width: 100%;
5
+      display: block;
6
+      line-height: .28rem;
7
+      font-size: .12rem;
8
+      color: #666;
9
+      text-indent: .2rem;
10
+      margin: .2rem auto 0;
11
+      position: relative;
12
+      z-index: 3;
13
+      background: #fff;
14
+      em{
15
+        font-size: .16rem;
16
+        font-weight: bolder;
17
+        color: #333;
18
+      }
19
+    }
20
+    >ul{
21
+      padding: .05rem .2rem 0;
22
+      position: relative;
23
+      z-index: 2;
24
+      box-shadow: 0 0 .1rem .02rem rgba(0, 0, 0, .05);
25
+      >li{
26
+        font-size: 0;
27
+        white-space: nowrap;
28
+        text-align: center;
29
+        position: relative;
30
+        &.active::after{
31
+          content: '';
32
+          width: 1.1rem;
33
+          height: .02rem;
34
+          background: #fa2a00;
35
+          position: absolute;
36
+          left: 50%;
37
+          bottom: 0;
38
+          transform: translateX(-50%);
39
+          -webkit-transform: translateX(-50%);
40
+        }
41
+        >span{
42
+          display: inline-block;
43
+          line-height: .42rem;
44
+          font-size: .15rem;
45
+          color: #666;
46
+          &:nth-child(2){
47
+            font-size: .12rem;
48
+          }
49
+        }
50
+      }
51
+    }
52
+    >div{
53
+      >div{
54
+        width: 100%;
55
+        position: absolute;
56
+        left: 0;
57
+        top: 0;
58
+        bottom: 0;
59
+        overflow: hidden;
60
+        >ul{
61
+          width: 100%;
62
+          height: 100%;
63
+          position: relative;
64
+          overflow: hidden;
65
+          >li{
66
+            padding: 0 .2rem;
67
+            position: relative;
68
+            height: 100%;
69
+            overflow-y: scroll;
70
+            -webkit-overflow-scrolling: touch;
71
+            transform: translateZ(0);
72
+            -webkit-transform: translateZ(0);
73
+            .list{
74
+              width: 100%;
75
+              padding: .1rem 0;
76
+              >li{
77
+                width: 100%;
78
+                position: relative;
79
+                overflow: hidden;
80
+                border-bottom: .01rem solid #eee;
81
+                &:last-child{
82
+                  border: none;
83
+                }
84
+                align-items: center;
85
+                span{
86
+                  line-height: .38rem;
87
+                  font-size: .12rem;
88
+                  color: #666;
89
+                  white-space: nowrap;
90
+                  text-overflow: ellipsis;
91
+                  overflow: hidden;
92
+                }
93
+                >div{
94
+                  span{
95
+                    width: 100%;
96
+                    display: block;
97
+                  }
98
+                  margin-left: .1rem;
99
+                  &:first-child{
100
+                    margin-left: 0;
101
+                  }
102
+                  &:nth-child(2){
103
+                    span{
104
+                      text-align: center;
105
+                    }
106
+                  }
107
+                }
108
+              }
109
+            }
110
+          }
111
+        }
112
+      }
113
+    }
114
+  }
115
+}

+ 147
- 0
src/pages/sales/salesRecord/index.vue Просмотреть файл

@@ -0,0 +1,147 @@
1
+<template>
2
+  <div class="mainPage flex-v">
3
+    <div class="top">
4
+      <topCaseInfo :data="topCaseInfoData" @selectCase="showSelect = true"></topCaseInfo>
5
+    </div>
6
+    <div class="flex-item body">
7
+      <div>
8
+        <ul>
9
+          <router-link tag="li" v-for="(item,index) in list" :key="index" :to="{name: 'salesGiveOutDetail', query: {}}">
10
+            <salesRecordItem :data="item" @triggerCardAndCoupon="triggerCardAndCoupon" @triggerDrink="triggerDrink"></salesRecordItem>
11
+          </router-link>
12
+        </ul>
13
+      </div>
14
+    </div>
15
+  </div>
16
+</template>
17
+
18
+<script>
19
+import topCaseInfo from '../../../components/topCaseInfo/index'
20
+import salesRecordItem from '../../../components/salesRecordItem/index'
21
+
22
+export default {
23
+  name: '',
24
+  data () {
25
+    return {
26
+      topCaseInfoData: {
27
+        caseName: '',
28
+        caseId: '',
29
+        showSelect: false,
30
+        userName: 'xxx'
31
+      },
32
+      list: [{
33
+        name: '柳依依',
34
+        id: '1',
35
+        cardAndCoupon: {
36
+          totalNum: '100',
37
+          usedNum: '35',
38
+          status: 1,
39
+        },
40
+        drink: {
41
+          totalNum: '100',
42
+          usedNum: '68',
43
+          status: 0,
44
+        },
45
+      }, {
46
+        name: '柳依依',
47
+        id: '1',
48
+        cardAndCoupon: {
49
+          totalNum: '100',
50
+          usedNum: '10',
51
+          status: 1,
52
+        },
53
+        drink: {
54
+          totalNum: '100',
55
+          usedNum: '45',
56
+          status: 1,
57
+        },
58
+      }, {
59
+        name: '柳依依',
60
+        id: '1',
61
+        cardAndCoupon: {
62
+          totalNum: '100',
63
+          usedNum: '35',
64
+          status: 1,
65
+        },
66
+        drink: {
67
+          totalNum: '100',
68
+          usedNum: '68',
69
+          status: 1,
70
+        },
71
+      }, {
72
+        name: '柳依依',
73
+        id: '1',
74
+        cardAndCoupon: {
75
+          totalNum: '100',
76
+          usedNum: '35',
77
+          status: 1,
78
+        },
79
+        drink: {
80
+          totalNum: '100',
81
+          usedNum: '68',
82
+          status: 1,
83
+        },
84
+      }, {
85
+        name: '柳依依',
86
+        id: '1',
87
+        cardAndCoupon: {
88
+          totalNum: '100',
89
+          usedNum: '35',
90
+          status: 1,
91
+        },
92
+        drink: {
93
+          totalNum: '100',
94
+          usedNum: '68',
95
+          status: 1,
96
+        },
97
+      }, {
98
+        name: '柳依依',
99
+        id: '1',
100
+        cardAndCoupon: {
101
+          totalNum: '100',
102
+          usedNum: '35',
103
+          status: 1,
104
+        },
105
+        drink: {
106
+          totalNum: '100',
107
+          usedNum: '68',
108
+          status: 1,
109
+        },
110
+      }, {
111
+        name: '柳依依',
112
+        id: '1',
113
+        cardAndCoupon: {
114
+          totalNum: '100',
115
+          usedNum: '35',
116
+          status: 1,
117
+        },
118
+        drink: {
119
+          totalNum: '100',
120
+          usedNum: '68',
121
+          status: 1,
122
+        },
123
+      }],
124
+    }
125
+  },
126
+  components: {
127
+    topCaseInfo,
128
+    salesRecordItem,
129
+  },
130
+  created () {
131
+
132
+  },
133
+  methods: {
134
+    triggerCardAndCoupon (val) { // 切换卡券状态 type='close':关闭;type='open':开启;
135
+      console.log(val)
136
+    },
137
+    triggerDrink (val) { // 切换饮品状态 type='close':关闭;type='open':开启;
138
+      console.log(val)
139
+    },
140
+  }
141
+}
142
+</script>
143
+
144
+<!-- Add "scoped" attribute to limit CSS to this component only -->
145
+<style lang="scss" scoped>
146
+@import 'page.scss';
147
+</style>

+ 27
- 0
src/pages/sales/salesRecord/page.scss Просмотреть файл

@@ -0,0 +1,27 @@
1
+.mainPage{
2
+  .body{
3
+    >div{
4
+      width: 100%;
5
+      position: absolute;
6
+      left: 0;
7
+      top: 0;
8
+      bottom: 0;
9
+      overflow-y: scroll;
10
+      -webkit-overflow-scrolling: touch;
11
+      transform: translateZ(0);
12
+      -webkit-transform: translateZ(0);
13
+      >ul{
14
+        padding: 0 .2rem;
15
+        position: relative;
16
+        overflow: visible;
17
+        margin-bottom: .2rem;
18
+        >li{
19
+          width: 100%;
20
+          position: relative;
21
+          overflow: visible;
22
+          margin: .2rem auto 0;
23
+        }
24
+      }
25
+    }
26
+  }
27
+}

+ 18
- 14
src/pages/user/placeOrderDetail/index.vue Просмотреть файл

@@ -41,7 +41,7 @@
41 41
       </div>
42 42
       <span>下单人:{{userInfo.CustomerName}} {{userInfo.Phone}}</span>
43 43
       <div class="bottom">
44
-        <a>取消</a>
44
+        <a @click="cancel">取消</a>
45 45
         <a @click="toPayer">确定</a>
46 46
       </div>
47 47
     </div>
@@ -83,19 +83,19 @@ export default {
83 83
         },
84 84
         detail: [],
85 85
         coupon: [
86
-        //   {
87
-        //   OrdersCouponId: '',
88
-        //   OrdersId: '',
89
-        //   OrdersNo: '',
90
-        //   CouponId: '',
91
-        //   CouponName: '',
92
-        //   OrgId: '',
93
-        //   GoodsId: '',
94
-        //   GoodsName: '',
95
-        //   UsedAmount: '',
96
-        //   Status: '',
97
-        //   CreateDate: '',
98
-        // }
86
+          //   {
87
+          //   OrdersCouponId: '',
88
+          //   OrdersId: '',
89
+          //   OrdersNo: '',
90
+          //   CouponId: '',
91
+          //   CouponName: '',
92
+          //   OrgId: '',
93
+          //   GoodsId: '',
94
+          //   GoodsName: '',
95
+          //   UsedAmount: '',
96
+          //   Status: '',
97
+          //   CreateDate: '',
98
+          // }
99 99
         ],
100 100
       },
101 101
       ticketList: [{
@@ -150,6 +150,7 @@ export default {
150 150
       this.postData.info.UserName = this.userInfo.CustomerName
151 151
       this.postData.info.PayType = this.postData.coupon.length ? 'coupon' : 'vip'
152 152
       var orderInfo = JSON.parse(this.$route.query.info)
153
+      this.postData.detail = []
153 154
       for (var n = 0; n < orderInfo.length; n++) {
154 155
         this.postData.detail.push({
155 156
           GoodsId: orderInfo[n].id,
@@ -173,6 +174,9 @@ export default {
173 174
         })
174 175
       })
175 176
     },
177
+    cancel () {
178
+      window.history.go(-1)
179
+    },
176 180
   }
177 181
 }
178 182
 </script>