Browse Source

Merge branch 'dev' of http://git.ycjcjy.com/SpaceOfCheng/wechat into dev

yuantianjiao 6 years ago
parent
commit
b372ad084b

+ 75
- 0
src/components/salesRecordItem/index.vue View File

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 View File

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 View File

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 View File

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
+}

+ 44
- 14
src/pages/sales/coffeeIndex/index.vue View File

27
               <div class="flex-item">
27
               <div class="flex-item">
28
                 <div>
28
                 <div>
29
                   <ul class="areaList">
29
                   <ul class="areaList">
30
-                    <li v-for="(item,index) in list" :key="index">
30
+                    <li v-for="(item,index) in CaseTableList" :key="index">
31
                       <div class="title">
31
                       <div class="title">
32
                         <i class="iconfont icon-yinchenglogo"></i>
32
                         <i class="iconfont icon-yinchenglogo"></i>
33
-                        <span>{{item.name}}</span>
33
+                        <span>{{item.AreaName}}</span>
34
                       </div>
34
                       </div>
35
                       <ul class="subAreaList flex-h">
35
                       <ul class="subAreaList flex-h">
36
-                        <li class="flex-item flex-h" v-for="(subItem,subIndex) in item.list" :key="subIndex">
36
+                        <router-link tag="li" class="flex-item flex-h" v-for="(subItem,subIndex) in item.Tables" :key="subIndex" :to="{name: 'placeOrder', query: { tableid: encodeURI(subItem.TableId), tableno: encodeURI(subItem.TableNo), caseid: encodeURI(subItem.CaseId), casename: encodeURI(topCaseInfoData.CaseName), areaid: encodeURI(subItem.AreaId), areaname: encodeURI(item.AreaName)}}">
37
                           <caseTableItem :item="subItem" :index="subIndex"></caseTableItem>
37
                           <caseTableItem :item="subItem" :index="subIndex"></caseTableItem>
38
-                        </li>
39
-                        <li class="flex-item noData" v-if="item.list.length % 2 != 0"></li>
38
+                        </router-link>
39
+                        <li class="flex-item noData" v-if="item.Tables.length % 2 != 0"></li>
40
                       </ul>
40
                       </ul>
41
                     </li>
41
                     </li>
42
                   </ul>
42
                   </ul>
46
           </li>
46
           </li>
47
           <li :hidden="navActive !== 1" class="my-card">
47
           <li :hidden="navActive !== 1" class="my-card">
48
             <div class="list-box">
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
               <myCard v-for="(item,index) in cardList" :key="index" :data='item' @share='share'></myCard>
59
               <myCard v-for="(item,index) in cardList" :key="index" :data='item' @share='share'></myCard>
50
             </div>
60
             </div>
51
           </li>
61
           </li>
74
 import topCaseInfo from '../../../components/topCaseInfo/index'
84
 import topCaseInfo from '../../../components/topCaseInfo/index'
75
 import myCard from '../../../components/myCard/myCard'
85
 import myCard from '../../../components/myCard/myCard'
76
 import customerCard from '../../../components/customerCard/customerCard'
86
 import customerCard from '../../../components/customerCard/customerCard'
87
+const { mapActions: actions } = createNamespacedHelpers('app')
88
+const { mapActions: caseTableActions } = createNamespacedHelpers('placeOrderForCoffee')
77
 
89
 
78
 export default {
90
 export default {
79
   name: '',
91
   name: '',
80
   data () {
92
   data () {
81
     return {
93
     return {
82
-      navActive: 2,
94
+      navActive: 1,
83
       cutNavList: [{
95
       cutNavList: [{
84
         value: '城咖啡',
96
         value: '城咖啡',
85
         id: '1',
97
         id: '1',
135
     }
147
     }
136
   },
148
   },
137
   computed: {
149
   computed: {
138
-
150
+    ...mapState({
151
+      userInfo: x => x.userCenter.userInfo,
152
+      CaseList: x => x.app.CaseList,
153
+      CaseTableList: x => x.placeOrderForCoffee.CaseTableList,
154
+    })
139
   },
155
   },
140
   components: {
156
   components: {
141
     topCaseInfo,
157
     topCaseInfo,
144
     customerCard
160
     customerCard
145
   },
161
   },
146
   created () {
162
   created () {
147
-
163
+    this.getCaseList().then((res) => {
164
+      this.topCaseInfoData.CaseName = res.cases[0].CaseName
165
+      this.topCaseInfoData.CaseId = res.cases[0].CaseId
166
+      this.getCaseTableList({
167
+        caseid: this.topCaseInfoData.CaseId
168
+      })
169
+    })
148
   },
170
   },
149
   methods: {
171
   methods: {
172
+    ...actions([
173
+      'getCaseList',
174
+    ]),
175
+    ...caseTableActions([
176
+      'getCaseTableList',
177
+    ]),
178
+    selectCase (val) { // 选择案场
179
+      this.topCaseInfoData.CaseName = val.CaseName
180
+      this.topCaseInfoData.CaseId = val.CaseId
181
+      this.getCaseTableList({
182
+        caseid: this.topCaseInfoData.CaseId
183
+      })
184
+      this.ShowSelect = false
185
+    },
150
     cutNav (index) { // 切换nav
186
     cutNav (index) { // 切换nav
151
       this.navActive = index
187
       this.navActive = index
152
     },
188
     },
153
-    selectCase (val) { // 选择案场
154
-      this.caseInfo = val
155
-      this.topCaseInfoData.caseName = val.value
156
-      this.topCaseInfoData.caseId = val.id
157
-      this.showSelect = false
158
-    },
159
     share (item) {
189
     share (item) {
160
       console.log(item)
190
       console.log(item)
161
     }
191
     }

+ 28
- 1
src/pages/sales/coffeeIndex/page.scss View File

138
             }
138
             }
139
           }
139
           }
140
           &.my-card, &.customer-card{
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
             .list-box{
168
             .list-box{
142
-              padding: .26rem .2rem;
169
+              padding: .1rem .2rem .2rem;
143
             }
170
             }
144
           }
171
           }
145
         }
172
         }

+ 180
- 106
src/pages/sales/placeOrder/index.vue View File

6
         <div class="bannerInfo flex-h">
6
         <div class="bannerInfo flex-h">
7
           <div class="flex-item">
7
           <div class="flex-item">
8
             <div>
8
             <div>
9
-              <span>项目名称:xxxx</span>
9
+              <span>项目名称:{{caseName}}</span>
10
             </div>
10
             </div>
11
           </div>
11
           </div>
12
-          <span>xxx您好!</span>
12
+          <span>{{userInfo.customer != undefined ? userInfo.customer.CustomerName : ''}}您好!</span>
13
         </div>
13
         </div>
14
       </div>
14
       </div>
15
       <div class="tableInfo flex-h">
15
       <div class="tableInfo flex-h">
16
         <div class="flex-item">
16
         <div class="flex-item">
17
           <div>
17
           <div>
18
-            <span>桌号:案场11号桌</span>
19
-            <span>本月已用:150杯</span>
18
+            <span>桌号:{{tableNo}}</span>
19
+            <!-- <span>本月已用:150杯</span> -->
20
           </div>
20
           </div>
21
         </div>
21
         </div>
22
         <router-link :to="{name: 'coffeeIndex', query: {}}">返回选择桌号</router-link>
22
         <router-link :to="{name: 'coffeeIndex', query: {}}">返回选择桌号</router-link>
66
           <i class="iconfont" :class="{'icon-jiantou-up': !showCalcMenu,'icon-jiantou-down': showCalcMenu}" @click="showCalcMenu = true"></i>
66
           <i class="iconfont" :class="{'icon-jiantou-up': !showCalcMenu,'icon-jiantou-down': showCalcMenu}" @click="showCalcMenu = true"></i>
67
         </div>
67
         </div>
68
       </div>
68
       </div>
69
-      <!-- <router-link :to="{name: 'placeOrderDetail', query: {info: JSON.stringify(settlementList)}}">下单</router-link> -->
70
-      <a @click="showCalcMenu = true">下单</a>
69
+      <router-link :to="{name: 'placeOrderDetail', query: {info: JSON.stringify(settlementList), caseid: encodeURI(caseId), areaid: encodeURI(areaId), areaname: encodeURI(areaName), areaid: encodeURI(areaId), tableid: encodeURI(tableId), tableno: encodeURI(tableNo)}}">下单</router-link>
70
+      <!-- <a @click="showCalcMenu = true">下单</a> -->
71
     </div>
71
     </div>
72
     <orderPopup :show="showPopup" :data="currentSpec" @closePopup="closePopup" @returnData="calcMenus"></orderPopup>
72
     <orderPopup :show="showPopup" :data="currentSpec" @closePopup="closePopup" @returnData="calcMenus"></orderPopup>
73
     <calcMenu :show="showCalcMenu" :totalNum="totalCupNum" :data="settlementList" @returnData="calcMenus" @emptyMenus="emptyMenus" @closeCalcMenu="closeCalcMenu" @placeOrder="placeOrder"></calcMenu>
73
     <calcMenu :show="showCalcMenu" :totalNum="totalCupNum" :data="settlementList" @returnData="calcMenus" @emptyMenus="emptyMenus" @closeCalcMenu="closeCalcMenu" @placeOrder="placeOrder"></calcMenu>
75
 </template>
75
 </template>
76
 
76
 
77
 <script>
77
 <script>
78
+import { mapState, createNamespacedHelpers } from 'vuex'
79
+const { mapActions: caseTableActions } = createNamespacedHelpers('placeOrderForCoffee')
78
 import orderItem from '../../../components/orderItem/index'
80
 import orderItem from '../../../components/orderItem/index'
79
 import orderPopup from '../../../components/orderPopup/index'
81
 import orderPopup from '../../../components/orderPopup/index'
80
 import calcMenu from '../../../components/calcMenu/index'
82
 import calcMenu from '../../../components/calcMenu/index'
86
   data () {
88
   data () {
87
     const _self = this
89
     const _self = this
88
     return {
90
     return {
91
+      tableNo: decodeURI(this.$route.query.tableno),
92
+      tableId: decodeURI(this.$route.query.tableid),
93
+      areaId: decodeURI(this.$route.query.areaid),
94
+      areaName: decodeURI(this.$route.query.areaname),
95
+      caseName: decodeURI(this.$route.query.casename),
96
+      caseId: decodeURI(this.$route.query.caseid),
89
       totalCupNum: 0, // 共计使用杯数
97
       totalCupNum: 0, // 共计使用杯数
90
       showCalcMenu: false, // 显隐已点菜单弹窗
98
       showCalcMenu: false, // 显隐已点菜单弹窗
91
       currentSpec: null, // 当前选择规格
99
       currentSpec: null, // 当前选择规格
94
       totalPrice: 0, // 总价格
102
       totalPrice: 0, // 总价格
95
       settlementList: [], // 商品选择清单
103
       settlementList: [], // 商品选择清单
96
       slideMenusActive: 0, // 左侧菜单选中索引值
104
       slideMenusActive: 0, // 左侧菜单选中索引值
97
-      menuList: [{ // 商品数据
98
-        value: '咖啡',
99
-        eValue: 'Coffee',
100
-        id: '1',
101
-        status: 1,
102
-        list: [{
103
-          img: '',
104
-          name: '商品名称',
105
-          id: '1-1',
106
-          status: 1,
107
-          spec: [{
108
-            value: '去冰',
109
-            id: '1-1-1',
110
-            num: 0,
111
-            status: 0,
112
-            price: '10',
113
-          }, {
114
-            value: '少冰',
115
-            id: '1-1-2',
116
-            num: 0,
117
-            status: 1,
118
-            price: '15',
119
-          }, {
120
-            value: '正常',
121
-            id: '1-1-3',
122
-            num: 0,
123
-            status: 1,
124
-            price: '20',
125
-          }, {
126
-            value: '多冰',
127
-            id: '1-1-4',
128
-            num: 0,
129
-            status: 1,
130
-            price: '25',
131
-          }],
132
-          price: '100',
133
-        }, {
134
-          img: '',
135
-          name: '商品名称',
136
-          id: '1-2',
137
-          spec: [],
138
-          status: 0,
139
-          price: '100',
140
-        }, {
141
-          img: '',
142
-          name: '商品名称',
143
-          id: '1-3',
144
-          spec: [],
145
-          status: 1,
146
-          price: '100',
147
-        }, {
148
-          img: '',
149
-          name: '商品名称',
150
-          id: '1-4',
151
-          spec: [],
152
-          status: 1,
153
-          price: '100',
154
-        }, {
155
-          img: '',
156
-          name: '商品名称',
157
-          id: '1-5',
158
-          spec: [],
159
-          status: 1,
160
-          price: '100',
161
-        }, {
162
-          img: '',
163
-          name: '商品名称',
164
-          id: '1-6',
165
-          spec: [],
166
-          status: 1,
167
-          price: '100',
168
-        }],
169
-      }, {
170
-        value: '咖啡一',
171
-        eValue: 'Coffee',
172
-        id: '2',
173
-        status: 1,
174
-        list: [],
175
-      }, {
176
-        value: '咖啡二',
177
-        eValue: 'Coffee',
178
-        id: '3',
179
-        status: 1,
180
-        list: [],
181
-      }, {
182
-        value: '咖啡三',
183
-        eValue: 'Coffee',
184
-        id: '4',
185
-        status: 1,
186
-        list: [],
187
-      }, {
188
-        value: '咖啡四',
189
-        eValue: 'Coffee',
190
-        id: '5',
191
-        status: 1,
192
-        list: [],
193
-      }],
105
+      menuList: [ // 商品数据
106
+      //   {
107
+      //   value: '咖啡',
108
+      //   eValue: 'Coffee',
109
+      //   id: '1',
110
+      //   status: 1,
111
+      //   list: [{
112
+      //     img: '',
113
+      //     name: '商品名称',
114
+      //     id: '1-1',
115
+      //     status: 1,
116
+      //     spec: [{
117
+      //       value: '去冰',
118
+      //       id: '1-1-1',
119
+      //       num: 0,
120
+      //       status: 0,
121
+      //       price: '10',
122
+      //     }, {
123
+      //       value: '少冰',
124
+      //       id: '1-1-2',
125
+      //       num: 0,
126
+      //       status: 1,
127
+      //       price: '15',
128
+      //     }, {
129
+      //       value: '正常',
130
+      //       id: '1-1-3',
131
+      //       num: 0,
132
+      //       status: 1,
133
+      //       price: '20',
134
+      //     }, {
135
+      //       value: '多冰',
136
+      //       id: '1-1-4',
137
+      //       num: 0,
138
+      //       status: 1,
139
+      //       price: '25',
140
+      //     }],
141
+      //     price: '100',
142
+      //   }, {
143
+      //     img: '',
144
+      //     name: '商品名称',
145
+      //     id: '1-2',
146
+      //     spec: [],
147
+      //     status: 0,
148
+      //     price: '100',
149
+      //   }, {
150
+      //     img: '',
151
+      //     name: '商品名称',
152
+      //     id: '1-3',
153
+      //     spec: [],
154
+      //     status: 1,
155
+      //     price: '100',
156
+      //   }, {
157
+      //     img: '',
158
+      //     name: '商品名称',
159
+      //     id: '1-4',
160
+      //     spec: [],
161
+      //     status: 1,
162
+      //     price: '100',
163
+      //   }, {
164
+      //     img: '',
165
+      //     name: '商品名称',
166
+      //     id: '1-5',
167
+      //     spec: [],
168
+      //     status: 1,
169
+      //     price: '100',
170
+      //   }, {
171
+      //     img: '',
172
+      //     name: '商品名称',
173
+      //     id: '1-6',
174
+      //     spec: [],
175
+      //     status: 1,
176
+      //     price: '100',
177
+      //   }],
178
+      // }, {
179
+      //   value: '咖啡一',
180
+      //   eValue: 'Coffee',
181
+      //   id: '2',
182
+      //   status: 1,
183
+      //   list: [],
184
+      // }, {
185
+      //   value: '咖啡二',
186
+      //   eValue: 'Coffee',
187
+      //   id: '3',
188
+      //   status: 1,
189
+      //   list: [],
190
+      // }, {
191
+      //   value: '咖啡三',
192
+      //   eValue: 'Coffee',
193
+      //   id: '4',
194
+      //   status: 1,
195
+      //   list: [],
196
+      // }, {
197
+      //   value: '咖啡四',
198
+      //   eValue: 'Coffee',
199
+      //   id: '5',
200
+      //   status: 1,
201
+      //   list: [],
202
+      // }
203
+      ],
194
       swiperOption: {
204
       swiperOption: {
195
         observer: true,
205
         observer: true,
196
         direction: 'vertical',
206
         direction: 'vertical',
211
     }
221
     }
212
   },
222
   },
213
   computed: {
223
   computed: {
224
+    ...mapState({
225
+      userInfo: x => x.userCenter.userInfo,
226
+      goodsTypeList: x => x.placeOrderForCoffee.goodsTypeList,
227
+      goodsList: x => x.placeOrderForCoffee.goodsList
228
+    }),
214
     MySwiper () {
229
     MySwiper () {
215
       return this.$refs.mySwiper.swiper
230
       return this.$refs.mySwiper.swiper
216
     },
231
     },
225
     orderPopup,
240
     orderPopup,
226
     calcMenu,
241
     calcMenu,
227
   },
242
   },
228
-  created () { },
243
+  created () {
244
+    this.getGoodsTypeList({
245
+      caseid: this.caseId,
246
+    }).then((res) => {
247
+      // console.log(JSON.stringify(res))
248
+      this.getGoodsList({
249
+        caseid: this.caseId,
250
+      }).then((res) => {
251
+        // console.log(JSON.stringify(res))
252
+        this.mapArr()
253
+      })
254
+    })
255
+  },
229
   methods: {
256
   methods: {
257
+    ...caseTableActions([
258
+      'getGoodsTypeList',
259
+      'getGoodsList',
260
+    ]),
261
+    mapArr () { // 匹配商品规格
262
+      var aArr = this.goodsTypeList, bArr = this.goodsList
263
+      for (var n = 0; n < aArr.length; n++) {
264
+        aArr[n].list = []
265
+        for (var a = 0; a < bArr.length; a++) {
266
+          if (aArr[n].TypeId === bArr[a].TypeId) {
267
+            aArr[n].list.push(bArr[a])
268
+          }
269
+        }
270
+      }
271
+      this.menuList = []
272
+      for (var x = 0; x < aArr.length; x++) {
273
+        this.menuList.push({
274
+          value: aArr[x].TypeName,
275
+          eValue: aArr[x].EnglishName,
276
+          id: aArr[x].TypeId,
277
+          status: aArr[x].Status,
278
+          list: []
279
+        })
280
+        for (var y = 0; y < aArr[x].list.length; y++) {
281
+          this.menuList[x].list.push({
282
+            img: aArr[x].list[y].Images,
283
+            name: aArr[x].list[y].GoodsName,
284
+            id: aArr[x].list[y].GoodsId,
285
+            spec: [],
286
+            status: aArr[x].list[y].Status,
287
+            price: aArr[x].list[y].Price,
288
+          })
289
+          if(aArr[x].list[y].Specs !== null){
290
+            for (var z = 0; z < aArr[x].list[y].Specs.length; z++) {
291
+              this.menuList[x].list[y].spec.push({
292
+                value: aArr[x].list[y].Specs[z].SpecName,
293
+                id: aArr[x].list[y].Specs[z].SpecId,
294
+                num: 0,
295
+                status: aArr[x].list[y].Specs[z].Status,
296
+                price: aArr[x].list[y].Specs[z].GoodsPrice,
297
+              })
298
+            }
299
+          }
300
+        }
301
+      }
302
+      // console.log(JSON.stringify(this.menuList))
303
+    },
230
     placeOrder () { // 下单
304
     placeOrder () { // 下单
231
-      this.$router.push({name: 'orderList', query: {}})
305
+      this.$router.push({ name: 'orderList', query: {} })
232
     },
306
     },
233
     closeCalcMenu () { // 关闭已选菜单
307
     closeCalcMenu () { // 关闭已选菜单
234
       this.showCalcMenu = false
308
       this.showCalcMenu = false
304
 
378
 
305
 <!-- Add "scoped" attribute to limit CSS to this component only -->
379
 <!-- Add "scoped" attribute to limit CSS to this component only -->
306
 <style lang="scss" scoped>
380
 <style lang="scss" scoped>
307
-@import "page.scss";
381
+@import 'page.scss';
308
 </style>
382
 </style>

+ 22
- 4
src/pages/sales/router.js View File

4
 import login from './login/index' // 登录
4
 import login from './login/index' // 登录
5
 import coffeeIndex from './coffeeIndex/index' // 点单首页
5
 import coffeeIndex from './coffeeIndex/index' // 点单首页
6
 import placeOrder from './placeOrder/index' // 城咖啡-点单
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
 Vue.use(Router)
11
 Vue.use(Router)
9
 
12
 
10
 const router = new Router({
13
 const router = new Router({
11
-  routes: [{
14
+  routes: [{ // 登录
12
     path: '/login',
15
     path: '/login',
13
     name: 'login',
16
     name: 'login',
14
     component: login,
17
     component: login,
15
     children: []
18
     children: []
16
-  },{
19
+  }, { // 点单首页
17
     path: '/coffeeIndex',
20
     path: '/coffeeIndex',
18
     name: 'coffeeIndex',
21
     name: 'coffeeIndex',
19
     component: coffeeIndex,
22
     component: coffeeIndex,
20
     children: []
23
     children: []
21
-  },{
24
+  }, { // 城咖啡-点单
22
     path: '/placeOrder',
25
     path: '/placeOrder',
23
     name: 'placeOrder',
26
     name: 'placeOrder',
24
     component: placeOrder,
27
     component: placeOrder,
25
     children: []
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
 router.beforeEach((to, from, next) => {
47
 router.beforeEach((to, from, next) => {
30
-  
48
+
31
   next()
49
   next()
32
 })
50
 })
33
 
51
 

+ 95
- 0
src/pages/sales/salesGiveOutDetail/index.vue View File

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 View File

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 View File

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 View File

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
- 15
src/pages/user/placeOrderDetail/index.vue View File

41
       </div>
41
       </div>
42
       <span>下单人:{{userInfo.CustomerName}} {{userInfo.Phone}}</span>
42
       <span>下单人:{{userInfo.CustomerName}} {{userInfo.Phone}}</span>
43
       <div class="bottom">
43
       <div class="bottom">
44
-        <a>取消</a>
44
+        <a @click="cancel">取消</a>
45
         <a @click="toPayer">确定</a>
45
         <a @click="toPayer">确定</a>
46
       </div>
46
       </div>
47
     </div>
47
     </div>
77
           TableId: decodeURI(_self.$route.query.tableid),
77
           TableId: decodeURI(_self.$route.query.tableid),
78
           TableNo: decodeURI(_self.$route.query.tableno),
78
           TableNo: decodeURI(_self.$route.query.tableno),
79
           Amount: String(_self.returnAmount()[0]), // 订单金额
79
           Amount: String(_self.returnAmount()[0]), // 订单金额
80
-          UserType: 'customer',
81
           OrdersNum: Number(_self.returnAmount()[1]),
80
           OrdersNum: Number(_self.returnAmount()[1]),
82
           Remark: '',
81
           Remark: '',
83
         },
82
         },
84
         detail: [],
83
         detail: [],
85
         coupon: [
84
         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
-        // }
85
+          //   {
86
+          //   OrdersCouponId: '',
87
+          //   OrdersId: '',
88
+          //   OrdersNo: '',
89
+          //   CouponId: '',
90
+          //   CouponName: '',
91
+          //   OrgId: '',
92
+          //   GoodsId: '',
93
+          //   GoodsName: '',
94
+          //   UsedAmount: '',
95
+          //   Status: '',
96
+          //   CreateDate: '',
97
+          // }
99
         ],
98
         ],
100
       },
99
       },
101
       ticketList: [{
100
       ticketList: [{
150
       this.postData.info.UserName = this.userInfo.CustomerName
149
       this.postData.info.UserName = this.userInfo.CustomerName
151
       this.postData.info.PayType = this.postData.coupon.length ? 'coupon' : 'vip'
150
       this.postData.info.PayType = this.postData.coupon.length ? 'coupon' : 'vip'
152
       var orderInfo = JSON.parse(this.$route.query.info)
151
       var orderInfo = JSON.parse(this.$route.query.info)
152
+      this.postData.detail = []
153
       for (var n = 0; n < orderInfo.length; n++) {
153
       for (var n = 0; n < orderInfo.length; n++) {
154
         this.postData.detail.push({
154
         this.postData.detail.push({
155
           GoodsId: orderInfo[n].id,
155
           GoodsId: orderInfo[n].id,
173
         })
173
         })
174
       })
174
       })
175
     },
175
     },
176
+    cancel () {
177
+      window.history.go(-1)
178
+    },
176
   }
179
   }
177
 }
180
 }
178
 </script>
181
 </script>

+ 2
- 2
vue.config.js View File

25
       '/api-v2': {
25
       '/api-v2': {
26
         // target: 'https://dp.huiju360.com.cn/hj_operations',
26
         // target: 'https://dp.huiju360.com.cn/hj_operations',
27
         // target: 'http://192.168.0.62:8080', //wf
27
         // target: 'http://192.168.0.62:8080', //wf
28
-        // target: 'http://192.168.0.11:8080', //ys
29
-        target: 'http://dev.ycjcjy.com', //frp
28
+        target: 'http://192.168.0.11:8080', //ys
29
+        // target: 'http://dev.ycjcjy.com', //frp
30
         changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
30
         changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
31
         // pathRewrite: {
31
         // pathRewrite: {
32
         //   '^/api': '/api-v2/api'
32
         //   '^/api': '/api-v2/api'