yuantianjiao 6 years ago
parent
commit
d99f4cb241
27 changed files with 1657 additions and 361 deletions
  1. 39
    0
      src/pages/system/cardAndCouponManager/cardManager/edit.vue
  2. 155
    0
      src/pages/system/cardAndCouponManager/cardManager/index.vue
  3. 27
    0
      src/pages/system/cardAndCouponManager/cardManager/page.scss
  4. 39
    0
      src/pages/system/cardAndCouponManager/couponManager/edit.vue
  5. 156
    0
      src/pages/system/cardAndCouponManager/couponManager/index.vue
  6. 27
    0
      src/pages/system/cardAndCouponManager/couponManager/page.scss
  7. 19
    0
      src/pages/system/cardAndCouponManager/index.vue
  8. 165
    0
      src/pages/system/cardAndCouponManager/vipManager/activateVip.vue
  9. 106
    0
      src/pages/system/cardAndCouponManager/vipManager/edit.vue
  10. 174
    0
      src/pages/system/cardAndCouponManager/vipManager/index.vue
  11. 27
    0
      src/pages/system/cardAndCouponManager/vipManager/page.scss
  12. 30
    2
      src/pages/system/cmsManager/bannerManager/add.vue
  13. 29
    3
      src/pages/system/cmsManager/bannerManager/edit.vue
  14. 0
    212
      src/pages/system/cmsManager/majorProjects/add.vue
  15. 234
    108
      src/pages/system/cmsManager/majorProjects/edit.vue
  16. 17
    21
      src/pages/system/cmsManager/majorProjects/index.vue
  17. 16
    1
      src/pages/system/goodsManager/goodsTypeManager/add.vue
  18. 17
    2
      src/pages/system/goodsManager/goodsTypeManager/edit.vue
  19. 177
    0
      src/pages/system/newOrder/caseRecord/index.vue
  20. 16
    1
      src/pages/system/newOrder/newOrderList/index.vue
  21. 56
    11
      src/pages/system/page.js
  22. 29
    0
      src/store/case/record.js
  23. 56
    0
      src/store/cms/case.js
  24. 3
    0
      src/store/course/course.js
  25. 26
    0
      src/store/goods/order.js
  26. 3
    0
      src/store/index.js
  27. 14
    0
      src/util/api.js

+ 39
- 0
src/pages/system/cardAndCouponManager/cardManager/edit.vue View File

@@ -0,0 +1,39 @@
1
+<template>
2
+  <div class="subPage">
3
+    1
4
+  </div>
5
+</template>
6
+
7
+<script>
8
+import { mapState } from 'vuex'
9
+
10
+export default {
11
+  name: '',
12
+  data () {
13
+    return {}
14
+  },
15
+  mounted () {
16
+    this.$nextTick(function () {})
17
+  },
18
+  computed: {
19
+    ...mapState({
20
+      cases: x => x.app.cases.list,
21
+      defaultCaseId: x => x.app.cases.default
22
+    }),
23
+    CaseId: {
24
+      get () {
25
+        return this.postData.caseid || this.defaultCaseId
26
+      },
27
+      set (val) {
28
+        this.postData.caseid = val
29
+      }
30
+    }
31
+  },
32
+  methods: {
33
+  }
34
+}
35
+</script>
36
+
37
+<!-- Add "scoped" attribute to limit CSS to this component only -->
38
+<style lang="scss" scoped>
39
+</style>

+ 155
- 0
src/pages/system/cardAndCouponManager/cardManager/index.vue View File

@@ -0,0 +1,155 @@
1
+<template>
2
+  <div class="subPage">
3
+    <div class="system-table-search">
4
+      <div class="flex-h">
5
+        <div class="flex-item flex-h">
6
+          <el-button size="mini" type="success" @click='addChannel'>新增渠道</el-button>
7
+        </div>
8
+        <ul>
9
+          <li>
10
+            <!-- <span>选择案场:</span> -->
11
+            <el-select v-model="CaseId" placeholder="请选择">
12
+              <el-option
13
+                v-for="item in cases"
14
+                :key="item.CaseId"
15
+                :label="item.CaseName"
16
+                :value="item.CaseId">
17
+              </el-option>
18
+            </el-select>
19
+          </li>
20
+        </ul>
21
+        <el-button
22
+          size="mini"
23
+          type="primary" @click="search">搜索</el-button>
24
+      </div>
25
+      <div class="moreFilter"></div>
26
+    </div>
27
+    <div class="system-table-box">
28
+      <el-table
29
+        :data="currentList"
30
+        stripe
31
+        style="width: 100%">
32
+        <el-table-column
33
+          prop="CaseName"
34
+          label="案场">
35
+        </el-table-column>
36
+        <el-table-column
37
+          prop="ChannelName"
38
+          label="渠道名称">
39
+        </el-table-column>
40
+        <el-table-column label="操作">
41
+          <template slot-scope="scope">
42
+            <el-button
43
+              size="mini"
44
+              type="warning"
45
+              @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
46
+            <el-button
47
+              size="mini"
48
+              type="danger"
49
+              @click="handleDelete(scope.$index, scope.row)">删除</el-button>
50
+          </template>
51
+        </el-table-column>
52
+      </el-table>
53
+    </div>
54
+    <el-pagination
55
+      @current-change="handleCurrentChange"
56
+      :current-page.sync="postData.page"
57
+      :page-size="postData.pagesize"
58
+      layout="prev, pager, next, jumper"
59
+      :total="total">
60
+    </el-pagination>
61
+  </div>
62
+</template>
63
+
64
+<script>
65
+import { mapState } from 'vuex'
66
+
67
+export default {
68
+  name: '',
69
+  data () {
70
+    return {
71
+      total: 0,
72
+      postData: { // 表格搜索条件
73
+        caseid: '', // 案场id
74
+        page: 1, // 当前页码
75
+        pagesize: 10, // 请求数据量
76
+      },
77
+      currentList: []
78
+    }
79
+  },
80
+  mounted () {
81
+    this.$nextTick(function () {
82
+      this.getList()
83
+    })
84
+  },
85
+  computed: {
86
+    ...mapState({
87
+      cases: x => x.app.cases.list,
88
+      defaultCaseId: x => x.app.cases.default
89
+    }),
90
+    CaseId: {
91
+      get () {
92
+        return this.postData.caseid || this.defaultCaseId
93
+      },
94
+      set (val) {
95
+        this.postData.caseid = val
96
+      }
97
+    }
98
+  },
99
+  methods: {
100
+    search () { // 搜索
101
+      this.postData.page = 1
102
+      this.currentList = []
103
+      this.getList()
104
+    },
105
+    getList () { // 获取列表
106
+      this.$ajax(this.$api.channelManager.getChannelList.url, {
107
+        method: this.$api.channelManager.getChannelList.method,
108
+        queryData: { ...this.postData, caseid: this.CaseId }
109
+      }).then(res => {
110
+        this.currentList = res.list
111
+        this.postData.page = res.page
112
+        this.total = res.pagenum
113
+      })
114
+    },
115
+    handleCurrentChange (val) { // 跳转到分页
116
+      this.getList()
117
+    },
118
+    handleEdit (index, row) { // 编辑
119
+      this.$router.push({ name: 'editChannel', query: { id: row.ChannelId } })
120
+    },
121
+    handleDelete (index, row) { // 删除
122
+      let name = '确认删除渠道“' + row.ChannelName + '”?'
123
+      this.$confirm(name, '提示', {
124
+        confirmButtonText: '确定',
125
+        cancelButtonText: '取消',
126
+        type: 'warning'
127
+      }).then(() => {
128
+        this.$ajax(this.$api.channelManager.deleteChannel.url, {
129
+          method: this.$api.channelManager.deleteChannel.method,
130
+          urlData: { channelId: row.ChannelId }
131
+        }).then(res => {
132
+          this.$message({
133
+            type: 'success',
134
+            message: '删除成功!'
135
+          })
136
+          this.search()
137
+        })
138
+      }).catch(() => {
139
+        this.$message({
140
+          type: 'info',
141
+          message: '已取消删除'
142
+        })
143
+      })
144
+    },
145
+    addChannel () {
146
+      this.$router.push({ name: 'addChannel' })
147
+    }
148
+  }
149
+}
150
+</script>
151
+
152
+<!-- Add "scoped" attribute to limit CSS to this component only -->
153
+<style lang="scss" scoped>
154
+@import "page.scss";
155
+</style>

+ 27
- 0
src/pages/system/cardAndCouponManager/cardManager/page.scss View File

@@ -0,0 +1,27 @@
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
+

+ 39
- 0
src/pages/system/cardAndCouponManager/couponManager/edit.vue View File

@@ -0,0 +1,39 @@
1
+<template>
2
+  <div class="subPage">
3
+    1
4
+  </div>
5
+</template>
6
+
7
+<script>
8
+import { mapState } from 'vuex'
9
+
10
+export default {
11
+  name: '',
12
+  data () {
13
+    return {}
14
+  },
15
+  mounted () {
16
+    this.$nextTick(function () {})
17
+  },
18
+  computed: {
19
+    ...mapState({
20
+      cases: x => x.app.cases.list,
21
+      defaultCaseId: x => x.app.cases.default
22
+    }),
23
+    CaseId: {
24
+      get () {
25
+        return this.postData.caseid || this.defaultCaseId
26
+      },
27
+      set (val) {
28
+        this.postData.caseid = val
29
+      }
30
+    }
31
+  },
32
+  methods: {
33
+  }
34
+}
35
+</script>
36
+
37
+<!-- Add "scoped" attribute to limit CSS to this component only -->
38
+<style lang="scss" scoped>
39
+</style>

+ 156
- 0
src/pages/system/cardAndCouponManager/couponManager/index.vue View File

@@ -0,0 +1,156 @@
1
+<template>
2
+  <div class="subPage">
3
+    <div class="system-table-search">
4
+      <div class="flex-h">
5
+        <div class="flex-item flex-h">
6
+          <el-button size="mini" type="success" @click='addChannel'>新增饮品优惠券</el-button>
7
+          <el-button size="mini" type="success" @click='addChannel'>新增课程优惠券</el-button>
8
+        </div>
9
+        <ul>
10
+          <li>
11
+            <!-- <span>选择案场:</span> -->
12
+            <el-select v-model="CaseId" placeholder="请选择">
13
+              <el-option
14
+                v-for="item in cases"
15
+                :key="item.CaseId"
16
+                :label="item.CaseName"
17
+                :value="item.CaseId">
18
+              </el-option>
19
+            </el-select>
20
+          </li>
21
+        </ul>
22
+        <el-button
23
+          size="mini"
24
+          type="primary" @click="search">搜索</el-button>
25
+      </div>
26
+      <div class="moreFilter"></div>
27
+    </div>
28
+    <div class="system-table-box">
29
+      <el-table
30
+        :data="currentList"
31
+        stripe
32
+        style="width: 100%">
33
+        <el-table-column
34
+          prop="CaseName"
35
+          label="案场">
36
+        </el-table-column>
37
+        <el-table-column
38
+          prop="ChannelName"
39
+          label="渠道名称">
40
+        </el-table-column>
41
+        <el-table-column label="操作">
42
+          <template slot-scope="scope">
43
+            <el-button
44
+              size="mini"
45
+              type="warning"
46
+              @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
47
+            <el-button
48
+              size="mini"
49
+              type="danger"
50
+              @click="handleDelete(scope.$index, scope.row)">删除</el-button>
51
+          </template>
52
+        </el-table-column>
53
+      </el-table>
54
+    </div>
55
+    <el-pagination
56
+      @current-change="handleCurrentChange"
57
+      :current-page.sync="postData.page"
58
+      :page-size="postData.pagesize"
59
+      layout="prev, pager, next, jumper"
60
+      :total="total">
61
+    </el-pagination>
62
+  </div>
63
+</template>
64
+
65
+<script>
66
+import { mapState } from 'vuex'
67
+
68
+export default {
69
+  name: '',
70
+  data () {
71
+    return {
72
+      total: 0,
73
+      postData: { // 表格搜索条件
74
+        caseid: '', // 案场id
75
+        page: 1, // 当前页码
76
+        pagesize: 10, // 请求数据量
77
+      },
78
+      currentList: []
79
+    }
80
+  },
81
+  mounted () {
82
+    this.$nextTick(function () {
83
+      this.getList()
84
+    })
85
+  },
86
+  computed: {
87
+    ...mapState({
88
+      cases: x => x.app.cases.list,
89
+      defaultCaseId: x => x.app.cases.default
90
+    }),
91
+    CaseId: {
92
+      get () {
93
+        return this.postData.caseid || this.defaultCaseId
94
+      },
95
+      set (val) {
96
+        this.postData.caseid = val
97
+      }
98
+    }
99
+  },
100
+  methods: {
101
+    search () { // 搜索
102
+      this.postData.page = 1
103
+      this.currentList = []
104
+      this.getList()
105
+    },
106
+    getList () { // 获取列表
107
+      this.$ajax(this.$api.channelManager.getChannelList.url, {
108
+        method: this.$api.channelManager.getChannelList.method,
109
+        queryData: { ...this.postData, caseid: this.CaseId }
110
+      }).then(res => {
111
+        this.currentList = res.list
112
+        this.postData.page = res.page
113
+        this.total = res.pagenum
114
+      })
115
+    },
116
+    handleCurrentChange (val) { // 跳转到分页
117
+      this.getList()
118
+    },
119
+    handleEdit (index, row) { // 编辑
120
+      this.$router.push({ name: 'editChannel', query: { id: row.ChannelId } })
121
+    },
122
+    handleDelete (index, row) { // 删除
123
+      let name = '确认删除渠道“' + row.ChannelName + '”?'
124
+      this.$confirm(name, '提示', {
125
+        confirmButtonText: '确定',
126
+        cancelButtonText: '取消',
127
+        type: 'warning'
128
+      }).then(() => {
129
+        this.$ajax(this.$api.channelManager.deleteChannel.url, {
130
+          method: this.$api.channelManager.deleteChannel.method,
131
+          urlData: { channelId: row.ChannelId }
132
+        }).then(res => {
133
+          this.$message({
134
+            type: 'success',
135
+            message: '删除成功!'
136
+          })
137
+          this.search()
138
+        })
139
+      }).catch(() => {
140
+        this.$message({
141
+          type: 'info',
142
+          message: '已取消删除'
143
+        })
144
+      })
145
+    },
146
+    addChannel () {
147
+      this.$router.push({ name: 'addChannel' })
148
+    }
149
+  }
150
+}
151
+</script>
152
+
153
+<!-- Add "scoped" attribute to limit CSS to this component only -->
154
+<style lang="scss" scoped>
155
+@import "page.scss";
156
+</style>

+ 27
- 0
src/pages/system/cardAndCouponManager/couponManager/page.scss View File

@@ -0,0 +1,27 @@
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
+

+ 19
- 0
src/pages/system/cardAndCouponManager/index.vue View File

@@ -0,0 +1,19 @@
1
+<template>
2
+  <div class="mainPage">
3
+    <router-view></router-view>
4
+  </div>
5
+</template>
6
+
7
+<script>
8
+export default {
9
+  name: '',
10
+  data () {
11
+    return {}
12
+  },
13
+  components: {}
14
+}
15
+</script>
16
+
17
+<!-- Add "scoped" attribute to limit CSS to this component only -->
18
+<style lang="scss" scoped>
19
+</style>

+ 165
- 0
src/pages/system/cardAndCouponManager/vipManager/activateVip.vue View File

@@ -0,0 +1,165 @@
1
+<template>
2
+  <div class="subPage">
3
+    <div class="inputCardNo flex-h">
4
+      <div class="flex-item">
5
+        <div>
6
+          <el-input
7
+            placeholder="请输入VIP卡号"
8
+            v-model="postData.CardNo"
9
+            clearable>
10
+          </el-input>
11
+        </div>
12
+      </div>
13
+      <el-button type="success" @click='activateVip'>激活</el-button>
14
+    </div>
15
+    <el-dialog
16
+      title="VIP卡激活"
17
+      :visible.sync="centerDialogVisible"
18
+      width="30%"
19
+      center>
20
+      <div>
21
+        <ul class="activateList">
22
+          <li class="flex-h">
23
+            <span>卡号:</span>
24
+            <div class="flex-item">
25
+              <div>
26
+                <span>{{activateData.CardNo}}</span>
27
+              </div>
28
+            </div>
29
+          </li>
30
+          <li class="flex-h">
31
+            <span>金额:</span>
32
+            <div class="flex-item">
33
+              <div>
34
+                <span>{{activateData.Price}}</span>
35
+              </div>
36
+            </div>
37
+          </li>
38
+          <li class="flex-h">
39
+            <span>销售:</span>
40
+            <div class="flex-item" style="margin-right:10px;">
41
+              <div>
42
+                <el-input
43
+                  placeholder="请输入销售手机号"
44
+                  v-model="sellerPhone"
45
+                  clearable>
46
+                </el-input>
47
+              </div>
48
+            </div>
49
+            <el-button type="success" @click='searchSeller'>查询</el-button>
50
+          </li>
51
+          <li class="flex-h">
52
+            <span>销售姓名:</span>
53
+            <div class="flex-item">
54
+              <div>
55
+                <span>{{activateData.SellerName}}</span>
56
+              </div>
57
+            </div>
58
+          </li>
59
+          <li class="flex-h">
60
+            <span>绑定用户:</span>
61
+            <div class="flex-item">
62
+              <div>
63
+                <el-input
64
+                  placeholder="请输入手机号"
65
+                  v-model="activateData.UserPhone"
66
+                  clearable>
67
+                </el-input>
68
+              </div>
69
+            </div>
70
+          </li>
71
+          <li class="flex-h">
72
+            <span>用户姓名:</span>
73
+            <div class="flex-item">
74
+              <div>
75
+                <el-input
76
+                  placeholder="请输入真实姓名"
77
+                  v-model="activateData.UserName"
78
+                  clearable>
79
+                </el-input>
80
+              </div>
81
+            </div>
82
+          </li>
83
+        </ul>
84
+      </div>
85
+      <span slot="footer" class="dialog-footer">
86
+        <el-button @click="centerDialogVisible = false">取 消</el-button>
87
+        <el-button type="primary" @click="centerDialogVisible = false">激 活</el-button>
88
+      </span>
89
+    </el-dialog>
90
+  </div>
91
+</template>
92
+
93
+<script>
94
+import { mapState } from 'vuex'
95
+export default {
96
+  name: '',
97
+  data () {
98
+    return {
99
+      centerDialogVisible: true,
100
+      postData: {
101
+        CardNo: '', // 卡号
102
+      },
103
+      activateData: {
104
+        CardNo: '111111111', // 卡号
105
+        Price: '1000', // 金额
106
+        SellerName: '', // 销售姓名
107
+        CaseName: 'xxx', // 案场名称
108
+        UserPhone: '', // 用户手机号
109
+        UserName: '', // 用户姓名
110
+      },
111
+      sellerPhone: '', // 销售手机号
112
+    }
113
+  },
114
+  computed: {
115
+    ...mapState({
116
+      cases: x => x.app.cases.list,
117
+      defaultCaseId: x => x.app.cases.default,
118
+      OrgId: x => x.app.user.OrgId,
119
+    }),
120
+    CaseId: {
121
+      get () {
122
+        return this.postData.CaseId === '' ? this.defaultCaseId || '' : this.postData.CaseId
123
+      },
124
+      set (val) {
125
+        this.postData.CaseId = val
126
+      }
127
+    }
128
+  },
129
+  created () { },
130
+  components: {},
131
+  methods: {
132
+    searchSeller () { // 查询销售
133
+    },
134
+    activateVip () { // 激活vip
135
+      this.centerDialogVisible = true
136
+    },
137
+  },
138
+  mounted () { }
139
+}
140
+</script>
141
+
142
+<!-- Add "scoped" attribute to limit CSS to this component only -->
143
+<style lang="scss" scoped>
144
+.subPage {
145
+  .inputCardNo {
146
+    width: 400px;
147
+    margin: 40px auto 0;
148
+    white-space: nowrap;
149
+    > div {
150
+      margin-right: 20px;
151
+    }
152
+  }
153
+  .activateList {
154
+    > li {
155
+      padding: 10px 0;
156
+      span {
157
+        line-height: 40px;
158
+      }
159
+      > span {
160
+        min-width: 80px;
161
+      }
162
+    }
163
+  }
164
+}
165
+</style>

+ 106
- 0
src/pages/system/cardAndCouponManager/vipManager/edit.vue View File

@@ -0,0 +1,106 @@
1
+<template>
2
+  <div class="subPage">
3
+    <form class="mainForm">
4
+      <ul>
5
+        <li class="flex-h">
6
+          <span>选择案场:</span>
7
+          <div class="flex-item">
8
+            <div style="width:50%">
9
+              <el-select v-model="CaseId" placeholder="请选择">
10
+                <el-option
11
+                  v-for="item in cases"
12
+                  :key="item.CaseId"
13
+                  :label="item.CaseName"
14
+                  :value="item.CaseId">
15
+                </el-option>
16
+              </el-select>
17
+            </div>
18
+          </div>
19
+        </li>
20
+        <li class="flex-h">
21
+          <span>VIP卡数量:</span>
22
+          <div class="flex-item">
23
+            <div style="width:50%">
24
+              <el-input
25
+                placeholder="请输入VIP卡数量"
26
+                v-model="postData.CardNum"
27
+                clearable>
28
+              </el-input>
29
+            </div>
30
+          </div>
31
+        </li>
32
+        <li class="flex-h">
33
+          <span>价格:</span>
34
+          <div class="flex-item">
35
+            <div style="width:50%">
36
+              <el-input
37
+                placeholder="请输入价格"
38
+                v-model="postData.Price"
39
+                clearable>
40
+              </el-input>
41
+            </div>
42
+          </div>
43
+        </li>
44
+        <li style="text-align:center">
45
+          <el-button type="primary" size="mini" @click="submit">保存</el-button>
46
+          <el-button type="danger" size="mini" @click="cancel">取消</el-button>
47
+        </li>
48
+      </ul>
49
+    </form>
50
+  </div>
51
+</template>
52
+
53
+<script>
54
+import { mapState } from 'vuex'
55
+export default {
56
+  name: '',
57
+  data () {
58
+    return {
59
+      postData: {
60
+        CardNum: '', // 卡数量
61
+        Price: '', // 价格
62
+        CaseId: '', // 案场id
63
+      }
64
+    }
65
+  },
66
+  computed: {
67
+    ...mapState({
68
+      cases: x => x.app.cases.list,
69
+      defaultCaseId: x => x.app.cases.default,
70
+      OrgId: x => x.app.user.OrgId,
71
+    }),
72
+    CaseId: {
73
+      get () {
74
+        return this.postData.CaseId === '' ? this.defaultCaseId || '' : this.postData.CaseId
75
+      },
76
+      set (val) {
77
+        this.postData.CaseId = val
78
+      }
79
+    }
80
+  },
81
+  created () {
82
+    this.initData()
83
+  },
84
+  components: {},
85
+  methods: {
86
+    initData () { // 数据初始化
87
+      // this.$ajax(this.$api.channelManager.getChannelInfo.url, {
88
+      //   method: this.$api.channelManager.getChannelInfo.method,
89
+      //   urlData: { channelId: this.$route.query.id }
90
+      // }).then(res => {
91
+      //   this.postData = res
92
+      // })
93
+    },
94
+    submit () { // 提交数据
95
+    },
96
+    cancel () {
97
+      this.$router.push({ name: 'vipList' })
98
+    }
99
+  },
100
+  mounted () { }
101
+}
102
+</script>
103
+
104
+<!-- Add "scoped" attribute to limit CSS to this component only -->
105
+<style lang="scss" scoped>
106
+</style>

+ 174
- 0
src/pages/system/cardAndCouponManager/vipManager/index.vue View File

@@ -0,0 +1,174 @@
1
+<template>
2
+  <div class="subPage">
3
+    <div class="system-table-search">
4
+      <div class="flex-h">
5
+        <div class="flex-item"></div>
6
+        <ul>
7
+          <li>
8
+            <el-select v-model="CaseId" placeholder="请选择">
9
+              <el-option
10
+                v-for="item in cases"
11
+                :key="item.CaseId"
12
+                :label="item.CaseName"
13
+                :value="item.CaseId">
14
+              </el-option>
15
+            </el-select>
16
+          </li>
17
+          <li>
18
+            <!-- <span>VIP卡号:</span> -->
19
+            <el-input
20
+              placeholder="请输入VIP卡号"
21
+              v-model="postData.cardNo"
22
+              clearable>
23
+            </el-input>
24
+          </li>
25
+          <li>
26
+            <!-- <span>销售:</span> -->
27
+            <el-input
28
+              placeholder="请输入销售姓名"
29
+              v-model="postData.sellerName"
30
+              clearable>
31
+            </el-input>
32
+          </li>
33
+          <li>
34
+            <!-- <span>用户:</span> -->
35
+            <el-input
36
+              placeholder="请输入用户姓名"
37
+              v-model="postData.userName"
38
+              clearable>
39
+            </el-input>
40
+          </li>
41
+        </ul>
42
+        <el-button
43
+          size="mini"
44
+          type="primary" @click="search">搜索</el-button>
45
+      </div>
46
+      <div class="moreFilter"></div>
47
+      <div class="flex-h">
48
+        <div class="flex-item flex-h" style="margin-top: 20px;">
49
+          <el-button size="mini" type="success" @click='addVIP'>新增VIP</el-button>
50
+          <el-button size="mini" type="success" @click='activateVip'>激活VIP</el-button>
51
+        </div>
52
+      </div>
53
+    </div>
54
+    <div class="system-table-box">
55
+      <el-table
56
+        :data="currentList"
57
+        stripe
58
+        style="width: 100%">
59
+        <el-table-column
60
+          prop="CardNo"
61
+          label="卡号">
62
+        </el-table-column>
63
+        <el-table-column
64
+          prop="Price"
65
+          label="价格">
66
+        </el-table-column>
67
+        <el-table-column
68
+          prop="Status"
69
+          label="状态">
70
+        </el-table-column>
71
+        <el-table-column
72
+          prop="SellerName"
73
+          label="销售">
74
+        </el-table-column>
75
+        <el-table-column
76
+          prop="CaseName"
77
+          label="案场">
78
+        </el-table-column>
79
+        <el-table-column
80
+          prop="UserName"
81
+          label="用户">
82
+        </el-table-column>
83
+        <el-table-column
84
+          prop="ActivationTime"
85
+          label="激活时间">
86
+        </el-table-column>
87
+        <el-table-column
88
+          prop="CreatTime"
89
+          label="创建时间">
90
+        </el-table-column>
91
+      </el-table>
92
+    </div>
93
+    <el-pagination
94
+      @current-change="handleCurrentChange"
95
+      :current-page.sync="postData.page"
96
+      :page-size="postData.pagesize"
97
+      layout="prev, pager, next, jumper"
98
+      :total="total">
99
+    </el-pagination>
100
+  </div>
101
+</template>
102
+
103
+<script>
104
+import { mapState } from 'vuex'
105
+
106
+export default {
107
+  name: '',
108
+  data () {
109
+    return {
110
+      total: 0,
111
+      postData: { // 表格搜索条件
112
+        caseid: '', // 案场id
113
+        page: 1, // 当前页码
114
+        pagesize: 10, // 请求数据量
115
+        cardNo: '', // vip卡号
116
+        sellerName: '', // 销售姓名
117
+        userName: '', // 用户名
118
+      },
119
+      currentList: [{
120
+        CardNo: 'xxx',
121
+        Price: 'xxx',
122
+        Status: 'xxx',
123
+        SellerName: 'xxx',
124
+        CaseName: 'xxx',
125
+        UserName: 'xxx',
126
+        ActivationTime: 'xxx',
127
+        CreatTime: 'xxx',
128
+      }]
129
+    }
130
+  },
131
+  mounted () {
132
+    this.$nextTick(function () {
133
+      this.getList()
134
+    })
135
+  },
136
+  computed: {
137
+    ...mapState({
138
+      cases: x => x.app.cases.list,
139
+      defaultCaseId: x => x.app.cases.default
140
+    }),
141
+    CaseId: {
142
+      get () {
143
+        return this.postData.caseid || this.defaultCaseId
144
+      },
145
+      set (val) {
146
+        this.postData.caseid = val
147
+      }
148
+    }
149
+  },
150
+  methods: {
151
+    search () { // 搜索
152
+      this.postData.page = 1
153
+      this.currentList = []
154
+      this.getList()
155
+    },
156
+    getList () { // 获取列表
157
+    },
158
+    handleCurrentChange (val) { // 跳转到分页
159
+      this.getList()
160
+    },
161
+    addVIP () {
162
+      this.$router.push({ name: 'editVip' })
163
+    },
164
+    activateVip () {
165
+      this.$router.push({ name: 'activateVip' })
166
+    },
167
+  }
168
+}
169
+</script>
170
+
171
+<!-- Add "scoped" attribute to limit CSS to this component only -->
172
+<style lang="scss" scoped>
173
+@import "page.scss";
174
+</style>

+ 27
- 0
src/pages/system/cardAndCouponManager/vipManager/page.scss View File

@@ -0,0 +1,27 @@
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
+

+ 30
- 2
src/pages/system/cmsManager/bannerManager/add.vue View File

@@ -11,7 +11,7 @@
11 11
             </div>
12 12
           </div>
13 13
         </li>
14
-        <li class="flex-h">
14
+        <li class="flex-h" v-if="postData.ForwardType==='1'">
15 15
           <span>链接:</span>
16 16
           <div class="flex-item">
17 17
             <div style="width:50%">
@@ -23,6 +23,21 @@
23 23
             </div>
24 24
           </div>
25 25
         </li>
26
+        <li class="flex-h" v-else>
27
+          <span>课程:</span>
28
+          <div class="flex-item">
29
+            <div style="width:50%">
30
+              <el-select v-model="postData.ForwardResourceId" placeholder="请选择课程">
31
+                <el-option
32
+                  v-for="item in courses.list"
33
+                  :key="item.CourseId"
34
+                  :label="item.CourseName"
35
+                  :value="item.CourseId">
36
+                </el-option>
37
+              </el-select>
38
+            </div>
39
+          </div>
40
+        </li>
26 41
         <li class="flex-h">
27 42
           <span>是否发布:</span>
28 43
           <div class="flex-item">
@@ -103,7 +118,10 @@
103 118
 
104 119
 <script>
105 120
 import { mapState, createNamespacedHelpers, mapActions } from 'vuex'
121
+
106 122
 const { mapActions: mapCmsActions } = createNamespacedHelpers('cms')
123
+const { mapState: mapCourseState, mapActions: mapCourseActions } = createNamespacedHelpers('course')
124
+
107 125
 export default {
108 126
   name: '',
109 127
   data () {
@@ -117,7 +135,7 @@ export default {
117 135
         ImageUrl: '',
118 136
         Title: '',
119 137
         OrgId: '',
120
-        CaseId: ''
138
+        CaseId: '',
121 139
       },
122 140
       dialogVisible: false,
123 141
       imgs: '',
@@ -127,6 +145,7 @@ export default {
127 145
   },
128 146
   components: {},
129 147
   created () {
148
+    this.GetCourseList({page: 1, pagesize: 100})
130 149
     this.updateLocationInfo()
131 150
     this.updateSystemInfo().then(() => {
132 151
       this.postData.CaseId = this.defaultCaseId
@@ -138,13 +157,20 @@ export default {
138 157
       OrgId: x => x.app.user.OrgId,
139 158
       defaultCaseId: x => x.app.cases.default,
140 159
       caseList: x => x.app.cases.list
160
+    }),
161
+    ...mapCourseState({
162
+      courses: x => x.courseList,
141 163
     })
142 164
   },
143 165
   methods: {
166
+    ...mapCourseActions([
167
+      'GetCourseList',
168
+    ]),
144 169
     ...mapCmsActions(['updateLocationInfo']),
145 170
     ...mapActions(['updateSystemInfo']),
146 171
     submit () {
147 172
       if (this.postData.ForwardType === '1') {
173
+        this.postData.ForwardResourceId = ''
148 174
         if (this.postData.ForwardUrl === '') {
149 175
           this.$message({
150 176
             message: '链接地址不能为空',
@@ -161,6 +187,8 @@ export default {
161 187
             return false
162 188
           }
163 189
         }
190
+      } else {
191
+        this.postData.ForwardUrl = ''
164 192
       }
165 193
       this.postData.OrgId = this.OrgId
166 194
       this.postData.ForwardType === '1' ? this.postData.ForwardType = 'url' : this.postData.ForwardType = 'course'

+ 29
- 3
src/pages/system/cmsManager/bannerManager/edit.vue View File

@@ -11,7 +11,7 @@
11 11
             </div>
12 12
           </div>
13 13
         </li>
14
-        <li class="flex-h">
14
+        <li class="flex-h" v-if="postData.ForwardType==='1'">
15 15
           <span>链接:</span>
16 16
           <div class="flex-item">
17 17
             <div style="width:50%">
@@ -23,6 +23,21 @@
23 23
             </div>
24 24
           </div>
25 25
         </li>
26
+        <li class="flex-h" v-else>
27
+          <span>课程:</span>
28
+          <div class="flex-item">
29
+            <div style="width:50%">
30
+              <el-select v-model="postData.ForwardResourceId" placeholder="请选择课程">
31
+                <el-option
32
+                  v-for="item in courses.list"
33
+                  :key="item.CourseId"
34
+                  :label="item.CourseName"
35
+                  :value="item.CourseId">
36
+                </el-option>
37
+              </el-select>
38
+            </div>
39
+          </div>
40
+        </li>
26 41
         <li class="flex-h">
27 42
           <span>是否发布:</span>
28 43
           <div class="flex-item">
@@ -104,6 +119,8 @@
104 119
 <script>
105 120
 import { mapState, createNamespacedHelpers } from 'vuex'
106 121
 const { mapActions: mapCmsActions } = createNamespacedHelpers('cms')
122
+const { mapState: mapCourseState, mapActions: mapCourseActions } = createNamespacedHelpers('course')
123
+
107 124
 export default {
108 125
   name: '',
109 126
   data () {
@@ -117,7 +134,7 @@ export default {
117 134
         ImageUrl: '',
118 135
         Title: '',
119 136
         OrgId: '',
120
-        CaseId: ''
137
+        CaseId: '',
121 138
       },
122 139
       dialogVisible: false,
123 140
       imgs: '',
@@ -127,20 +144,27 @@ export default {
127 144
   },
128 145
   components: {},
129 146
   created () {
147
+    this.GetCourseList({page: 1, pagesize: 100, callback: this.getDetail})
130 148
     this.updateLocationInfo()
131
-    this.getDetail()
132 149
   },
133 150
   computed: {
134 151
     ...mapState({
135 152
       positionList: x => x.cms.location,
136 153
       OrgId: x => x.app.user.OrgId,
137 154
       caseList: x => x.app.cases.list
155
+    }),
156
+    ...mapCourseState({
157
+      courses: x => x.courseList,
138 158
     })
139 159
   },
140 160
   methods: {
161
+    ...mapCourseActions([
162
+      'GetCourseList',
163
+    ]),
141 164
     ...mapCmsActions(['updateLocationInfo']),
142 165
     submit () {
143 166
       if (this.postData.ForwardType === '1') {
167
+        this.postData.ForwardResourceId = ''
144 168
         if (this.postData.ForwardUrl === '') {
145 169
           this.$message({
146 170
             message: '链接地址不能为空',
@@ -157,6 +181,8 @@ export default {
157 181
             return false
158 182
           }
159 183
         }
184
+      } else {
185
+        this.postData.ForwardUrl = ''
160 186
       }
161 187
       this.postData.OrgId = this.OrgId
162 188
       this.postData.CaseId = this.CaseId

+ 0
- 212
src/pages/system/cmsManager/majorProjects/add.vue View File

@@ -1,212 +0,0 @@
1
-<template>
2
-  <div class="subPage">
3
-    <form class="mainForm">
4
-      <ul>
5
-        <li class="flex-h">
6
-          <span>对应案场:</span>
7
-          <div class="flex-item">
8
-            <div style="width:50%">
9
-              <el-select v-model="postData.CaseId" placeholder="请选择">
10
-                <el-option
11
-                  v-for="item in caseList"
12
-                  :key="item.CaseId"
13
-                  :label="item.CaseName"
14
-                  :value="item.CaseId">
15
-                </el-option>
16
-              </el-select>
17
-            </div>
18
-          </div>
19
-        </li>
20
-        <li class="flex-h">
21
-          <span>名称:</span>
22
-          <div class="flex-item">
23
-            <div style="width:50%">
24
-              <el-input
25
-                placeholder="请输入名称"
26
-                v-model="postData.Name"
27
-                clearable>
28
-              </el-input>
29
-            </div>
30
-          </div>
31
-        </li>
32
-        <li class="flex-h">
33
-          <span>标题:</span>
34
-          <div class="flex-item">
35
-            <div style="width:50%">
36
-              <el-input
37
-                placeholder="请输入标题"
38
-                v-model="postData.Title"
39
-                clearable>
40
-              </el-input>
41
-            </div>
42
-          </div>
43
-        </li>
44
-        <li class="flex-h">
45
-          <span>图片:</span>
46
-          <div class="flex-item">
47
-            <el-upload
48
-              :action="$api.file.image.url"
49
-              list-type="picture-card"
50
-              :limit='limit'
51
-              :on-success="handlePictureCardPreview"
52
-              :file-list='imgsArr'
53
-              :on-remove="handleRemove"
54
-              :on-exceed="exceed">
55
-              <i class="el-icon-plus"></i>
56
-            </el-upload>
57
-            <el-dialog :visible.sync="dialogVisible">
58
-              <img width="100%" :src="imgs" alt="">
59
-            </el-dialog>
60
-          </div>
61
-        </li>
62
-        <li class="flex-h">
63
-          <span>详细图片:</span>
64
-          <div class="flex-item">
65
-            <el-upload
66
-              :action='$api.file.image.url'
67
-              list-type="picture-card"
68
-              :limit='limit'
69
-              :file-list='detailimgsArr'
70
-              :on-success="handlePictureCardPreviewDetail"
71
-              :on-remove="handleRemoveDetail"
72
-              :on-exceed="exceed">
73
-              <i class="el-icon-plus"></i>
74
-            </el-upload>
75
-            <el-dialog :visible.sync="dialogVisibleDetail">
76
-              <img width="100%" :src="detailimgs" alt="">
77
-            </el-dialog>
78
-          </div>
79
-        </li>
80
-        <li class="flex-h">
81
-          <span>专题简介:</span>
82
-          <div class="flex-item">
83
-            <div style="width:50%">
84
-              <el-input
85
-                placeholder="请输入专题简介"
86
-                v-model="postData.DetailContent"
87
-                type='textarea'
88
-                :autosize="{ minRows: 3, maxRows: 5}"
89
-                clearable>
90
-              </el-input>
91
-            </div>
92
-          </div>
93
-        </li>
94
-        <li class="flex-h">
95
-          <span>是否前台展示:</span>
96
-          <div class="flex-item">
97
-            <div style="width:50%" class="radio">
98
-              <el-radio v-model="postData.Status" label='1' >是</el-radio>
99
-              <el-radio v-model="postData.Status" label='0' >否</el-radio>
100
-            </div>
101
-          </div>
102
-        </li>
103
-        <li style="text-align:center">
104
-          <el-button type="primary" size="mini" @click="submit">保存</el-button>
105
-          <el-button type="danger" size="mini" @click="cancel">取消</el-button>
106
-        </li>
107
-      </ul>
108
-    </form>
109
-  </div>
110
-</template>
111
-
112
-<script>
113
-import { mapState, mapActions } from 'vuex'
114
-export default {
115
-  name: '',
116
-  data () {
117
-    return {
118
-      postData: {
119
-        CaseId: '',
120
-        Name: '',
121
-        Title: '',
122
-        DetailContent: '',
123
-        Status: '1',
124
-        imgs: '',
125
-        detailimgs: '',
126
-        courseids: ''
127
-      },
128
-      limit: 1,
129
-      dialogVisible: false,
130
-      dialogVisibleDetail: false,
131
-      imgs: '',
132
-      detailimgs: '',
133
-      imgsArr: [],
134
-      detailimgsArr: []
135
-    }
136
-  },
137
-  components: {},
138
-  computed: {
139
-    ...mapState({
140
-      caseList: x => x.app.cases.list,
141
-      defaultCaseId: x => x.app.cases.default,
142
-      OrgId: x => x.app.user.OrgId
143
-    })
144
-  },
145
-  methods: {
146
-    ...mapActions(['updateSystemInfo']),
147
-    submit () {
148
-      this.postData.OrgId = this.OrgId
149
-      this.postData.imgs = ''
150
-      this.postData.detailimgs = ''
151
-      for (let i = 0; i < this.imgsArr.length; i++) {
152
-        this.postData.imgs += this.imgsArr[i].response.result.url + ','
153
-      }
154
-      this.postData.imgs = this.postData.imgs.substr(0, this.postData.imgs.length - 1)
155
-      for (let i = 0; i < this.detailimgsArr.length; i++) {
156
-        this.postData.detailimgs += this.detailimgsArr[i].response.result.url + ','
157
-      }
158
-      this.postData.detailimgs = this.postData.detailimgs.substr(0, this.postData.detailimgs.length - 1)
159
-      this.$ajax(this.$api.cms.addCase.url, {
160
-        method: this.$api.cms.addCase.method,
161
-        data: this.postData
162
-      }).then(res => {
163
-        this.$message({
164
-          message: '添加成功',
165
-          type: 'success',
166
-          duration: 1000
167
-        })
168
-        setTimeout(() => {
169
-          this.$router.push({ name: 'indexCase' })
170
-        }, 1000)
171
-      }).catch(msg => {
172
-
173
-      })
174
-    },
175
-    cancel () {
176
-      this.$router.go(-1)
177
-    },
178
-    handlePictureCardPreview (res, file, fileList) {
179
-      this.imgs = res.result.url
180
-      this.dialogVisible = false
181
-      this.imgsArr = fileList
182
-    },
183
-    handleRemove (file, fileList) {
184
-      this.imgsArr = fileList
185
-    },
186
-    handlePictureCardPreviewDetail (res, file, fileList) {
187
-      this.detailimgs = res.result.url
188
-      this.dialogVisibleDetail = false
189
-      this.detailimgsArr = fileList
190
-    },
191
-    handleRemoveDetail (file, fileList) {
192
-      this.detailimgsArr = fileList
193
-    },
194
-    exceed () {
195
-      this.$message({
196
-        message: '超过可传的图片上限',
197
-        type: 'info',
198
-        duration: 1000
199
-      })
200
-    }
201
-  },
202
-  created () {
203
-    this.updateSystemInfo().then(() => {
204
-      this.postData.CaseId = this.defaultCaseId
205
-    })
206
-  }
207
-}
208
-</script>
209
-
210
-<!-- Add "scoped" attribute to limit CSS to this component only -->
211
-<style lang="scss" scoped>
212
-</style>

+ 234
- 108
src/pages/system/cmsManager/majorProjects/edit.vue View File

@@ -6,7 +6,7 @@
6 6
           <span>对应案场:</span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%">
9
-              <el-select v-model="postData.CaseId" placeholder="请选择">
9
+              <el-select v-model="CaseId" placeholder="请选择">
10 10
                 <el-option
11 11
                   v-for="item in caseList"
12 12
                   :key="item.CaseId"
@@ -23,7 +23,7 @@
23 23
             <div style="width:50%">
24 24
               <el-input
25 25
                 placeholder="请输入名称"
26
-                v-model="postData.Name"
26
+                v-model="detail.Name"
27 27
                 clearable>
28 28
               </el-input>
29 29
             </div>
@@ -35,7 +35,7 @@
35 35
             <div style="width:50%">
36 36
               <el-input
37 37
                 placeholder="请输入标题"
38
-                v-model="postData.Title"
38
+                v-model="detail.Title"
39 39
                 clearable>
40 40
               </el-input>
41 41
             </div>
@@ -54,9 +54,6 @@
54 54
               :on-exceed="exceed">
55 55
               <i class="el-icon-plus"></i>
56 56
             </el-upload>
57
-            <el-dialog :visible.sync="dialogVisible">
58
-              <img width="100%" :src="imgs" alt="">
59
-            </el-dialog>
60 57
           </div>
61 58
         </li>
62 59
         <li class="flex-h">
@@ -72,9 +69,6 @@
72 69
               :on-exceed="exceed">
73 70
               <i class="el-icon-plus"></i>
74 71
             </el-upload>
75
-            <el-dialog :visible.sync="dialogVisibleDetail">
76
-              <img width="100%" :src="detailimgs" alt="">
77
-            </el-dialog>
78 72
           </div>
79 73
         </li>
80 74
         <li class="flex-h">
@@ -83,7 +77,7 @@
83 77
             <div style="width:50%">
84 78
               <el-input
85 79
                 placeholder="请输入专题简介"
86
-                v-model="postData.DetailContent"
80
+                v-model="detail.DetailContent"
87 81
                 type='textarea'
88 82
                 :autosize="{ minRows: 3, maxRows: 5}"
89 83
                 clearable>
@@ -91,12 +85,55 @@
91 85
             </div>
92 86
           </div>
93 87
         </li>
88
+        <li class="flex-h">
89
+          <span>展示课程:</span>
90
+          <div class="flex-item">
91
+            <div style="width:50%" class="radio">
92
+              <el-radio v-model="detail.IsAllCourse" :label='1' >全部课程</el-radio>
93
+              <el-radio v-model="detail.IsAllCourse" :label='0' >指定课程</el-radio>
94
+            </div>
95
+          </div>
96
+        </li>
97
+        <li class="flex-h" v-if="detail.IsAllCourse === 0">
98
+          <el-table
99
+            :data="detail.Courses"
100
+            stripe
101
+            style="width: 100%">
102
+            <el-table-column
103
+              prop="CourseName"
104
+              label="课程名称">
105
+            </el-table-column>
106
+            <el-table-column
107
+              prop="BeginDate"
108
+              label="课程开始时间">
109
+              <template slot-scope="scope">
110
+                <label>{{toolClass.dateFormat(scope.row.BeginDate,'yyyy-MM-dd')}}</label>
111
+              </template>
112
+            </el-table-column>
113
+            <el-table-column
114
+              prop="EndDate"
115
+              label="课程结束时间">
116
+              <template slot-scope="scope">
117
+                <label>{{toolClass.dateFormat(scope.row.EndDate,'yyyy-MM-dd')}}</label>
118
+              </template>
119
+            </el-table-column>
120
+            <el-table-column label="操作" width="450">
121
+              <template slot-scope="scope">
122
+                <el-button
123
+                  size="mini"
124
+                  type="danger"
125
+                  @click="deleteItem(scope.row)">删除</el-button>
126
+              </template>
127
+            </el-table-column>
128
+          </el-table>
129
+            <el-button type="primary" size="mini" @click="coursesShow">新增</el-button>
130
+        </li>
94 131
         <li class="flex-h">
95 132
           <span>是否前台展示:</span>
96 133
           <div class="flex-item">
97 134
             <div style="width:50%" class="radio">
98
-              <el-radio v-model="postData.Status" label='1' >是</el-radio>
99
-              <el-radio v-model="postData.Status" label='0' >否</el-radio>
135
+              <el-radio v-model="detail.Status" :label='1' >是</el-radio>
136
+              <el-radio v-model="detail.Status" :label='0' >否</el-radio>
100 137
             </div>
101 138
           </div>
102 139
         </li>
@@ -106,32 +143,67 @@
106 143
         </li>
107 144
       </ul>
108 145
     </form>
146
+    <el-dialog
147
+      title="选择课程"
148
+      :visible.sync="selCourseVisible"
149
+      width="500px"
150
+      center>
151
+      <div>
152
+        <el-table
153
+          ref="courseTable"
154
+          :data="coursesList"
155
+          tooltip-effect="dark"
156
+          stripe
157
+          @selection-change="handleSelectionChange"
158
+          style="width: 100%">
159
+          <el-table-column
160
+            type="selection"
161
+            width="55">
162
+          </el-table-column>
163
+          <el-table-column
164
+            prop="CourseName"
165
+            label="课程名称">
166
+          </el-table-column>
167
+          <el-table-column
168
+            prop="BeginDate"
169
+            label="课程开始时间">
170
+            <template slot-scope="scope">
171
+              <label>{{toolClass.dateFormat(scope.row.BeginDate,'yyyy-MM-dd')}}</label>
172
+            </template>
173
+          </el-table-column>
174
+          <el-table-column
175
+            prop="EndDate"
176
+            label="课程结束时间">
177
+            <template slot-scope="scope">
178
+              <label>{{toolClass.dateFormat(scope.row.EndDate,'yyyy-MM-dd')}}</label>
179
+            </template>
180
+          </el-table-column>
181
+        </el-table>
182
+      </div>
183
+      <span slot="footer" class="dialog-footer">
184
+        <el-button @click="selCourseVisible = false">取 消</el-button>
185
+        <el-button type="primary" @click="addCourseOk">确 定</el-button>
186
+      </span>
187
+    </el-dialog>
109 188
   </div>
110 189
 </template>
111 190
 
112 191
 <script>
113
-import { mapState } from 'vuex'
192
+import { createNamespacedHelpers, mapState } from 'vuex'
193
+
194
+const { mapState: mapCaseState, mapActions: mapCaseActions } = createNamespacedHelpers('cmscase')
195
+const { mapState: mapCourseState, mapActions: mapCourseActions } = createNamespacedHelpers('course')
196
+
114 197
 export default {
115 198
   name: '',
116 199
   data () {
117 200
     return {
118
-      postData: {
119
-        CaseId: '',
120
-        Name: '',
121
-        Title: '',
122
-        DetailContent: '',
123
-        Status: '1',
124
-        imgs: '',
125
-        detailimgs: '',
126
-        courseids: ''
127
-      },
201
+      id: '',
128 202
       limit: 1,
129
-      dialogVisible: false,
130
-      dialogVisibleDetail: false,
131
-      imgs: '',
132
-      detailimgs: '',
133
-      imgsArr: [],
134
-      detailimgsArr: []
203
+      imgs: null,
204
+      detailimgs: null,
205
+      selCourseVisible: false,
206
+      selCourseList: [],
135 207
     }
136 208
   },
137 209
   components: {},
@@ -140,105 +212,131 @@ export default {
140 212
       caseList: x => x.app.cases.list,
141 213
       defaultCaseId: x => x.app.cases.default,
142 214
       OrgId: x => x.app.user.OrgId
143
-    })
144
-  },
145
-  methods: {
146
-    submit () {
147
-      this.postData.OrgId = this.OrgId
148
-      this.postData.imgs = ''
149
-      this.postData.detailimgs = ''
150
-      for (let i = 0; i < this.imgsArr.length; i++) {
151
-        this.postData.imgs += this.imgsArr[i].response.result.url + ','
152
-      }
153
-      if (this.postData.imgs) {
154
-        this.postData.imgs = this.postData.imgs.substr(0, this.postData.imgs.length - 1)
215
+    }),
216
+    ...mapCaseState({
217
+      detail: x => x.caseInfo,
218
+    }),
219
+    ...mapCourseState({
220
+      courses: x => x.courseList,
221
+    }),
222
+    CaseId: {
223
+      get () {
224
+        return this.detail.CaseId || this.caseid
225
+      },
226
+      set (val) {
227
+        this.UpdateInfo({...this.detail, CaseId: val})
228
+        this.getCourse()
155 229
       }
156
-      for (let i = 0; i < this.detailimgsArr.length; i++) {
157
-        this.postData.detailimgs += this.detailimgsArr[i].response.result.url + ','
230
+    },
231
+    imgsArr: {
232
+      get () {
233
+        return this.imgs || (this.detail.CmsCaseImgs || []).filter(x => x.ImageType === 'cover').map(x => {
234
+          return {
235
+            url: x.CaseImageUrl,
236
+            response: {
237
+              result: {
238
+                url: x.CaseImageUrl
239
+              }
240
+            }
241
+          }
242
+        })
243
+      },
244
+      set (val) {
245
+        this.imgs = val
158 246
       }
159
-      if (this.postData.detailimgs) {
160
-        this.postData.detailimgs = this.postData.detailimgs.substr(0, this.postData.detailimgs.length - 1)
247
+    },
248
+    detailimgsArr: {
249
+      get () {
250
+        return this.detailimgs || (this.detail.CmsCaseImgs || []).filter(x => x.ImageType === 'detail').map(x => {
251
+          return {
252
+            url: x.CaseImageUrl,
253
+            response: {
254
+              result: {
255
+                url: x.CaseImageUrl
256
+              }
257
+            }
258
+          }
259
+        })
260
+      },
261
+      set (val) {
262
+        this.detailimgs = val
161 263
       }
162
-      console.log(this.postData)
163
-      this.$ajax(this.$api.cms.editCase.url, {
164
-        method: this.$api.cms.editCase.method,
165
-        urlData: {
166
-          id: this.$route.query.id
167
-        },
168
-        data: this.postData
169
-      }).then(res => {
170
-        this.$message({
171
-          message: '编辑成功',
172
-          type: 'success',
173
-          duration: 1000
264
+    },
265
+    coursesList () {
266
+      return (this.courses.list || []).map(x => {
267
+        return {
268
+          CourseId: x.CourseId,
269
+          CourseName: x.CourseName,
270
+          BeginDate: x.BeginDate,
271
+          EndDate: x.BeginDate
272
+        }
273
+      })
274
+    },
275
+  },
276
+  methods: {
277
+    ...mapCaseActions([
278
+      'GetCaseInfo',
279
+      'AddCaseInfo',
280
+      'SetNull',
281
+      'UpdateInfo',
282
+    ]),
283
+    ...mapCourseActions([
284
+      'GetCourseList',
285
+    ]),
286
+    submit () {
287
+      const imgs = this.imgsArr.map(x => x.response.result.url).join(',')
288
+      const detailimgs = this.detailimgsArr.map(x => x.response.result.url).join(',')
289
+      const courseids = this.detail.Courses.map(x => x.CourseId).join(',')
290
+      if (this.id === '') {
291
+        this.detail.OrgId = this.OrgId
292
+        this.AddCaseInfo({...this.detail, imgs, detailimgs, courseids}).then(res => {
293
+          this.afterSave()
174 294
         })
175
-        setTimeout(() => {
176
-          this.$router.push({ name: 'indexCase' })
177
-        }, 1000)
178
-      }).catch(msg => {
179
-
295
+      } else {
296
+        this.AddCaseInfo({...this.detail, imgs, detailimgs, courseids}).then(res => {
297
+          this.afterSave()
298
+        })
299
+      }
300
+    },
301
+    afterSave () {
302
+      this.$message({
303
+        message: '保存成功',
304
+        type: 'success',
305
+        duration: 1000
180 306
       })
307
+      setTimeout(() => {
308
+        this.$router.push({ name: 'indexCase' })
309
+      }, 1000)
181 310
     },
182 311
     cancel () {
183 312
       this.$router.go(-1)
184 313
     },
185 314
     handlePictureCardPreview (res, file, fileList) {
186
-      this.imgs = res.result.url
187
-      this.dialogVisible = false
188 315
       this.imgsArr = fileList
189
-      console.log(this.imgsArr)
190 316
     },
191 317
     handleRemove (file, fileList) {
192 318
       this.imgsArr = fileList
193 319
     },
194 320
     handlePictureCardPreviewDetail (res, file, fileList) {
195
-      this.detailimgs = res.result.url
196
-      this.dialogVisibleDetail = false
197 321
       this.detailimgsArr = fileList
198 322
     },
199 323
     handleRemoveDetail (file, fileList) {
200 324
       this.detailimgsArr = fileList
201 325
     },
202 326
     getDetail () {
203
-      this.$ajax(this.$api.cms.caseDetail.url, {
204
-        method: this.$api.cms.caseDetail.method,
205
-        urlData: {
206
-          id: this.$route.query.id
207
-        }
208
-      }).then(res => {
209
-        console.log(res)
210
-        res.Status += ''
211
-        let imgsArr = []
212
-        let detailimgsArr = []
213
-        for (let i = 0; i < res.CmsCaseImgs.length; i++) {
214
-          if (res.CmsCaseImgs[i].ImageType === 'cover') {
215
-            let item = {
216
-              url: res.CmsCaseImgs[i].CaseImageUrl,
217
-              response: {
218
-                result: {
219
-                  url: res.CmsCaseImgs[i].CaseImageUrl
220
-                }
221
-              }
222
-            }
223
-            imgsArr.push(item)
224
-          } else if (res.CmsCaseImgs[i].ImageType === 'detail') {
225
-            let item = {
226
-              url: res.CmsCaseImgs[i].CaseImageUrl,
227
-              response: {
228
-                result: {
229
-                  url: res.CmsCaseImgs[i].CaseImageUrl
230
-                }
231
-              }
232
-            }
233
-            detailimgsArr.push(item)
234
-          }
235
-        }
236
-        this.imgsArr = imgsArr
237
-        this.detailimgsArr = detailimgsArr
238
-        this.postData = res
239
-      }).catch(msg => {
240
-
241
-      })
327
+      this.GetCaseInfo({id: this.id})
328
+    },
329
+    getCourse () {
330
+      this.GetCourseList({caseid: this.CaseId, page: 1, pagesize: 100})
331
+    },
332
+    toggleSelection (rows) {
333
+      if (rows) {
334
+        rows.forEach(row => {
335
+          this.$refs.courseTable.toggleRowSelection(row)
336
+        })
337
+      } else {
338
+        this.$refs.courseTable.clearSelection()
339
+      }
242 340
     },
243 341
     exceed () {
244 342
       this.$message({
@@ -246,10 +344,38 @@ export default {
246 344
         type: 'info',
247 345
         duration: 1000
248 346
       })
347
+    },
348
+    addCourse () {
349
+      this.GetCourseList({caseid: this.CaseId, page: 1, pagesize: 100, callback: this.coursesShow})
350
+    },
351
+    coursesShow () {
352
+      this.selCourseList = this.detail.Courses || []
353
+      this.selCourseVisible = true
354
+      setTimeout(() => {
355
+        this.toggleSelection(this.coursesList.filter(x => (this.selCourseList || []).filter(y => y.CourseId === x.CourseId).length > 0))
356
+      }, 30)
357
+    },
358
+    handleSelectionChange (val) {
359
+      this.selCourseList = val
360
+      // this.UpdateInfo({...this.detail, Courses: val})
361
+    },
362
+    addCourseOk () {
363
+      this.UpdateInfo({...this.detail, Courses: this.selCourseList})
364
+      this.selCourseVisible = false
365
+    },
366
+    deleteItem (row) {
367
+      this.UpdateInfo({...this.detail, Courses: this.detail.Courses.filter(x => x.CourseId !== row.CourseId)})
249 368
     }
250 369
   },
251
-  created () {
252
-    this.getDetail()
370
+  mounted () {
371
+    this.getCourse()
372
+    const { id } = this.$route.query
373
+    this.id = id
374
+    if (id && id !== '') {
375
+      this.getDetail()
376
+    } else {
377
+      this.SetNull()
378
+    }
253 379
   }
254 380
 }
255 381
 </script>

+ 17
- 21
src/pages/system/cmsManager/majorProjects/index.vue View File

@@ -122,8 +122,23 @@ export default {
122 122
       this.postData.currentPage = val
123 123
       this.getList()
124 124
     },
125
-    showItem (index, row) { // 前台显示
126
-      this.editIsAllCourse(row)
125
+    showItem (index, data) { // 前台显示
126
+      let api = data.Status === 1 ? this.$api.cms.caseHide : this.$api.cms.caseShow
127
+      this.$ajax(api.url, {
128
+        method: api.method,
129
+        urlData: {
130
+          id: data.CmsCaseId
131
+        }
132
+      }).then(res => {
133
+        this.$message({
134
+          message: '编辑成功',
135
+          type: 'success',
136
+          duration: 1000
137
+        })
138
+        this.getList()
139
+      }).catch(msg => {
140
+
141
+      })
127 142
     },
128 143
     editItem (index, row) { // 编辑
129 144
       console.log(index, row)
@@ -190,25 +205,6 @@ export default {
190 205
         this.getList()
191 206
       }).catch(msg => {
192 207
 
193
-      })
194
-    },
195
-    editIsAllCourse (data) {
196
-      console.log(data)
197
-      let api = data.Status === 1 ? this.$api.cms.caseHide : this.$api.cms.caseShow
198
-      this.$ajax(api.url, {
199
-        method: api.method,
200
-        urlData: {
201
-          id: data.CmsCaseId
202
-        }
203
-      }).then(res => {
204
-        this.$message({
205
-          message: '编辑成功',
206
-          type: 'success',
207
-          duration: 1000
208
-        })
209
-        this.getList()
210
-      }).catch(msg => {
211
-
212 208
       })
213 209
     },
214 210
   }

+ 16
- 1
src/pages/system/goodsManager/goodsTypeManager/add.vue View File

@@ -9,13 +9,27 @@
9 9
               <el-input
10 10
                 placeholder="请输入商品种类"
11 11
                 v-model="postData.TypeName"
12
+                maxlength="10"
12 13
                 clearable>
13 14
               </el-input>
14 15
             </div>
15 16
           </div>
16 17
         </li>
17 18
         <li class="flex-h">
18
-          <!-- <span>选择案场:</span> -->
19
+          <span>种类英文:</span>
20
+          <div class="flex-item">
21
+            <div style="width:50%">
22
+              <el-input
23
+                placeholder="请输入种类英文"
24
+                v-model="postData.EnglishName"
25
+                maxlength="10"
26
+                clearable>
27
+              </el-input>
28
+            </div>
29
+          </div>
30
+        </li>
31
+        <li class="flex-h">
32
+          <span>选择案场:</span>
19 33
           <div class="flex-item">
20 34
             <div style="width:50%">
21 35
               <el-select v-model="CaseId" placeholder="请选择">
@@ -52,6 +66,7 @@ export default {
52 66
         CreatUser: '', // 创建者(传空值)
53 67
         CreatTime: '', // 创建时间(传空值)
54 68
         Status: '', // 状态(传空值)
69
+        EnglishName: '',
55 70
       },
56 71
       caseAreaList: [
57 72
         {

+ 17
- 2
src/pages/system/goodsManager/goodsTypeManager/edit.vue View File

@@ -9,13 +9,27 @@
9 9
               <el-input
10 10
                 placeholder="请输入商品种类"
11 11
                 v-model="postData.TypeName"
12
+                maxlength="10"
12 13
                 clearable>
13 14
               </el-input>
14 15
             </div>
15 16
           </div>
16 17
         </li>
17 18
         <li class="flex-h">
18
-          <!-- <span>选择案场:</span> -->
19
+          <span>种类英文:</span>
20
+          <div class="flex-item">
21
+            <div style="width:50%">
22
+              <el-input
23
+                placeholder="请输入种类英文"
24
+                v-model="postData.EnglishName"
25
+                maxlength="10"
26
+                clearable>
27
+              </el-input>
28
+            </div>
29
+          </div>
30
+        </li>
31
+        <li class="flex-h">
32
+          <span>选择案场:</span>
19 33
           <div class="flex-item">
20 34
             <div style="width:50%">
21 35
               <el-select v-model="CaseId" placeholder="请选择">
@@ -49,7 +63,8 @@ export default {
49 63
         TypeName: '',
50 64
         Status: '',
51 65
         OrgId: '',
52
-        CaseId: ''
66
+        CaseId: '',
67
+        EnglishName: '',
53 68
       },
54 69
     }
55 70
   },

+ 177
- 0
src/pages/system/newOrder/caseRecord/index.vue View File

@@ -0,0 +1,177 @@
1
+<template>
2
+  <div class="subPage">
3
+    <div class="system-table-search">
4
+      <div class="flex-h">
5
+        <div class="flex-item flex-h">
6
+          <el-button size="mini" type="success" @click='addRecord'>新增</el-button>
7
+        </div>
8
+        <ul>
9
+          <li>
10
+            <!-- <span>选择案场:</span> -->
11
+            <el-select v-model="CaseId" placeholder="请选择">
12
+              <el-option
13
+                v-for="item in cases"
14
+                :key="item.CaseId"
15
+                :label="item.CaseName"
16
+                :value="item.CaseId">
17
+              </el-option>
18
+            </el-select>
19
+          </li>
20
+        </ul>
21
+        <el-button
22
+          size="mini"
23
+          type="primary" @click="search">搜索</el-button>
24
+      </div>
25
+      <div class="moreFilter"></div>
26
+    </div>
27
+    <div class="system-table-box">
28
+      <el-table :data="records.list" stripe style="width: 100%">
29
+        <el-table-column prop="CaseId" label="案场">
30
+          <template slot-scope="scope">
31
+            {{getCaseName(scope.row.CaseId)}}
32
+          </template>
33
+        </el-table-column>
34
+        <el-table-column prop="Month" label="月份">
35
+        </el-table-column>
36
+        <el-table-column prop="Num" label="规定次数">
37
+        </el-table-column>
38
+        <el-table-column prop="ActrualNum" label="实际次数">
39
+        </el-table-column>
40
+        <el-table-column prop="OverNum" label="超出次数">
41
+        </el-table-column>
42
+        <el-table-column prop="LeftNum" label="剩余次数">
43
+        </el-table-column>
44
+        <el-table-column fixed='right' label="操作" width="300">
45
+          <template slot-scope="scope">
46
+            <el-button size="mini" type="warning" @click="handleReport(scope.$index, scope.row)">导出Excel</el-button>
47
+          </template>
48
+        </el-table-column>
49
+      </el-table>
50
+      <el-pagination
51
+        @current-change="handleCurrentChange"
52
+        :current-page.sync="postData.page"
53
+        :page-size="postData.pagesize"
54
+        layout="prev, pager, next, jumper"
55
+        :total="records.pagenum">
56
+      </el-pagination>
57
+    </div>
58
+    <el-dialog
59
+      title="新增月记录"
60
+      :visible.sync="addVisible"
61
+      width="500px"
62
+      center>
63
+      <div>
64
+        <form class="mainForm">
65
+          <ul>
66
+            <li class="flex-h">
67
+              <span>对应案场:</span>
68
+              <div class="flex-item">
69
+                <div style="width:50%">
70
+                  <el-select v-model="detail.CaseId" placeholder="请选择">
71
+                    <el-option
72
+                      v-for="item in cases"
73
+                      :key="item.CaseId"
74
+                      :label="item.CaseName"
75
+                      :value="item.CaseId">
76
+                    </el-option>
77
+                  </el-select>
78
+                </div>
79
+              </div>
80
+            </li>
81
+            <li class="flex-h">
82
+              <span>月份:</span>
83
+              <div class="flex-item">
84
+                <div style="width:50%">
85
+                  <el-date-picker
86
+                    v-model="detail.Month"
87
+                    type="month"
88
+                    placeholder="选择月">
89
+                  </el-date-picker>
90
+                </div>
91
+              </div>
92
+            </li>
93
+            <li class="flex-h">
94
+              <span>规定次数:</span>
95
+              <div class="flex-item">
96
+                <div style="width:50%">
97
+                  <el-input v-model="detail.Num" placeholder="请输入规定次数"></el-input>
98
+                </div>
99
+              </div>
100
+            </li>
101
+          </ul>
102
+        </form>
103
+      </div>
104
+      <span slot="footer" class="dialog-footer">
105
+        <el-button @click="addVisible = false">取 消</el-button>
106
+        <el-button type="primary" @click="submit">保 存</el-button>
107
+      </span>
108
+    </el-dialog>
109
+  </div>
110
+</template>
111
+
112
+<script>
113
+import { createNamespacedHelpers, mapState } from 'vuex'
114
+
115
+const { mapState: mapRecordState, mapActions: mapRecordActions } = createNamespacedHelpers('caserecord')
116
+
117
+export default {
118
+  name: '',
119
+  data () {
120
+    return {
121
+      addVisible: false,
122
+      detail: {
123
+        CaseId: '',
124
+      },
125
+      postData: {
126
+        caseid: '',
127
+        page: 1,
128
+        pagesize: 10,
129
+      }
130
+    }
131
+  },
132
+  computed: {
133
+    ...mapState({
134
+      cases: x => x.app.cases.list,
135
+      defaultCaseId: x => x.app.cases.default
136
+    }),
137
+    ...mapRecordState({
138
+      records: x => x.recordList,
139
+    }),
140
+    CaseId: {
141
+      get () {
142
+        return this.caseid || this.defaultCaseId
143
+      },
144
+      set (val) {
145
+        this.caseid = val
146
+      }
147
+    }
148
+  },
149
+  methods: {
150
+    ...mapRecordActions([
151
+      'GetRecordList',
152
+    ]),
153
+    getCaseName (caseid) {
154
+      return ((this.cases.filter(x => x.CaseId === caseid) || [])[0] || {}).CaseName
155
+    },
156
+    addRecord () {
157
+      this.addVisible = true
158
+    },
159
+    search () {
160
+      this.getList()
161
+    },
162
+    submit () {
163
+    },
164
+    getList () {
165
+      this.GetRecordList(this.postData)
166
+    },
167
+    handleCurrentChange (val) { // 跳转到分页
168
+      this.postData.page = val
169
+      this.getList()
170
+    },
171
+  }
172
+}
173
+</script>
174
+
175
+<!-- Add "scoped" attribute to limit CSS to this component only -->
176
+<style lang="scss" scoped>
177
+</style>

+ 16
- 1
src/pages/system/newOrder/newOrderList/index.vue View File

@@ -66,7 +66,12 @@
66 66
 </template>
67 67
 
68 68
 <script>
69
+import { createNamespacedHelpers, mapState } from 'vuex'
70
+
69 71
 import { getLodop } from '@/util/LodopFuncs'
72
+
73
+const { mapState: mapOrderState, mapActions: mapOrderActions } = createNamespacedHelpers('goodsorder')
74
+
70 75
 const baseUrl = process.env.NODE_ENV === 'development' ? 'ws://192.168.0.148:8078/admin' : 'ws://cdkj.ycjcjy.com/admin' // 'ws://cdkj.ycjcjy.com/admin'
71 76
 var LODOP
72 77
 export default {
@@ -84,11 +89,21 @@ export default {
84 89
     }
85 90
   },
86 91
   components: {
92
+    ...mapOrderState({
93
+      orders: x => x.ordersList
94
+    }),
95
+    ...mapState({
96
+      cases: x => x.app.cases.list,
97
+      defaultCaseId: x => x.app.cases.default
98
+    })
87 99
   },
88 100
   mounted () {
89
-
101
+    this.GetOrdersList()
90 102
   },
91 103
   methods: {
104
+    ...mapOrderActions([
105
+      'GetOrdersList',
106
+    ]),
92 107
     submit (cl) {
93 108
       this.$confirm('确定完成此饮品?', '提示', {
94 109
         confirmButtonText: '确定',

+ 56
- 11
src/pages/system/page.js View File

@@ -45,7 +45,6 @@ import bannerManager from './cmsManager/bannerManager/index' // 轮播图管理
45 45
 import addBanner from './cmsManager/bannerManager/add' // 添加轮播图
46 46
 import editBanner from './cmsManager/bannerManager/edit' // 编辑轮播图
47 47
 import indexCase from './cmsManager/majorProjects/index' // 售楼处项目专题
48
-import addIndexCase from './cmsManager/majorProjects/add' // 新增售楼处项目专题
49 48
 import editIndexCase from './cmsManager/majorProjects/edit' // 编辑售楼处项目专题
50 49
 import indexMsg from './cmsManager/indexMsg/index' // 首页消息
51 50
 import addIndexMsg from './cmsManager/indexMsg/add' // 新增首页消息
@@ -82,6 +81,17 @@ import newOrder from './newOrder/index' // 商品订单系统
82 81
 import newOrderList from './newOrder/newOrderList/index' // 新订单列表
83 82
 import monthOrder from './newOrder/monthOrder/index' // 月订单列表
84 83
 
84
+import cardAndCouponManager from './cardAndCouponManager/index' // 卡券管理
85
+import cardList from './cardAndCouponManager/cardManager/index' // 卡列表
86
+import editCard from './cardAndCouponManager/cardManager/edit' // 编辑卡
87
+import couponList from './cardAndCouponManager/couponManager/index' // 券列表
88
+import editCoupon from './cardAndCouponManager/couponManager/edit' // 编辑券
89
+import vipList from './cardAndCouponManager/vipManager/index' // vip列表
90
+import editVip from './cardAndCouponManager/vipManager/edit' // 编辑vip
91
+import activateVip from './cardAndCouponManager/vipManager/activateVip' // 激活vip
92
+
93
+import caseRecord from './newOrder/caseRecord/index' // 月记录
94
+
85 95
 export default {
86 96
   router: [
87 97
     {
@@ -286,12 +296,7 @@ export default {
286 296
           path: 'indexCase',
287 297
           name: 'indexCase',
288 298
           component: indexCase,
289
-          children: [{ // 新增售楼处项目专题
290
-            path: 'addIndexCase',
291
-            name: 'addIndexCase',
292
-            component: addIndexCase,
293
-            children: []
294
-          }, { // 编辑售楼处项目专题
299
+          children: [{ // 编辑售楼处项目专题
295 300
             path: 'editIndexCase',
296 301
             name: 'editIndexCase',
297 302
             component: editIndexCase,
@@ -427,10 +432,10 @@ export default {
427 432
           name: 'newOrderList',
428 433
           component: newOrderList,
429 434
           children: []
430
-        }, { // 月订单列表
431
-          path: 'monthOrder',
432
-          name: 'monthOrder',
433
-          component: monthOrder,
435
+        }, { // 月记录
436
+          path: 'caseRecord',
437
+          name: 'caseRecord',
438
+          component: caseRecord,
434 439
           children: []
435 440
         }]
436 441
       }, { // 数据统计
@@ -443,6 +448,46 @@ export default {
443 448
           component: frontEndUserList,
444 449
           children: []
445 450
         }]
451
+      }, { // 卡券管理
452
+        path: 'cardAndCouponManager',
453
+        name: 'cardAndCouponManager',
454
+        component: cardAndCouponManager,
455
+        children: [{ // 卡列表
456
+          path: 'cardList',
457
+          name: 'cardList',
458
+          component: cardList,
459
+          children: [{ // 编辑卡
460
+            path: 'editCard',
461
+            name: 'editCard',
462
+            component: editCard,
463
+            children: []
464
+          }]
465
+        }, { // 券列表
466
+          path: 'couponList',
467
+          name: 'couponList',
468
+          component: couponList,
469
+          children: [{ // 编辑券
470
+            path: 'editCoupon',
471
+            name: 'editCoupon',
472
+            component: editCoupon,
473
+            children: []
474
+          }]
475
+        }, { // vip列表
476
+          path: 'vipList',
477
+          name: 'vipList',
478
+          component: vipList,
479
+          children: [{ // 编辑vip
480
+            path: 'editVip',
481
+            name: 'editVip',
482
+            component: editVip,
483
+            children: []
484
+          }, { // 激活vip
485
+            path: 'activateVip',
486
+            name: 'activateVip',
487
+            component: activateVip,
488
+            children: []
489
+          }]
490
+        }]
446 491
       }]
447 492
     },
448 493
   ],

+ 29
- 0
src/store/case/record.js View File

@@ -0,0 +1,29 @@
1
+import ajax from '../../util/ajax'
2
+import api from '../../util/api'
3
+
4
+export default {
5
+  namespaced: true,
6
+  state: {
7
+    recordList: [],
8
+  },
9
+  mutations: {
10
+    updateList (state, payload) {
11
+      state.recordList = payload || []
12
+    },
13
+  },
14
+  actions: {
15
+    GetRecordList ({ commit }, payload) {
16
+      ajax(api.case.getRecordList.url, {
17
+        method: api.case.getRecordList.method,
18
+        queryData: {
19
+          ...payload,
20
+        }
21
+      }).then(res => {
22
+        commit('updateList', res)
23
+        if (payload.callback) {
24
+          payload.callback()
25
+        }
26
+      })
27
+    },
28
+  }
29
+}

+ 56
- 0
src/store/cms/case.js View File

@@ -0,0 +1,56 @@
1
+
2
+export default {
3
+  namespaced: true,
4
+  state: {
5
+    caseInfo: {},
6
+  },
7
+  mutations: {
8
+    init (state, data) {
9
+      state.caseInfo = data
10
+    }
11
+  },
12
+  actions: {
13
+    GetCaseInfo ({ commit }, payload) {
14
+      return new Promise((resolve) => {
15
+        this.$ajax(this.$api.cms.caseDetail.url, {
16
+          method: this.$api.cms.caseDetail.method,
17
+          urlData: {
18
+            id: payload.id
19
+          }
20
+        }).then(res => {
21
+          commit('init', res)
22
+          resolve()
23
+        })
24
+      })
25
+    },
26
+    AddCaseInfo ({ commit }, payload) {
27
+      return new Promise((resolve) => {
28
+        this.$ajax(this.$api.cms.addCase.url, {
29
+          method: this.$api.cms.addCase.method,
30
+          data: payload
31
+        }).then(res => {
32
+          resolve()
33
+        })
34
+      })
35
+    },
36
+    UpdateCaseInfo ({ commit }, payload) {
37
+      return new Promise((resolve) => {
38
+        this.$ajax(this.$api.cms.editCase.url, {
39
+          method: this.$api.cms.editCase.method,
40
+          urlData: {
41
+            id: payload.id
42
+          },
43
+          data: payload
44
+        }).then(res => {
45
+          resolve()
46
+        })
47
+      })
48
+    },
49
+    SetNull ({ commit }) {
50
+      commit('init', {})
51
+    },
52
+    UpdateInfo ({ commit }, payload) {
53
+      commit('init', payload)
54
+    }
55
+  }
56
+}

+ 3
- 0
src/store/course/course.js View File

@@ -28,6 +28,9 @@ export default {
28 28
         }
29 29
       }).then(res => {
30 30
         commit('updateList', res)
31
+        if (payload.callback) {
32
+          payload.callback()
33
+        }
31 34
       })
32 35
     },
33 36
     GetCourseByID ({ commit }, { id }) {

+ 26
- 0
src/store/goods/order.js View File

@@ -0,0 +1,26 @@
1
+import ajax from '../../util/ajax'
2
+import api from '../../util/api'
3
+
4
+export default {
5
+  namespaced: true,
6
+  state: {
7
+    ordersList: [],
8
+  },
9
+  mutations: {
10
+    updateList (state, payload) {
11
+      state.ordersList = payload || []
12
+    },
13
+  },
14
+  actions: {
15
+    GetOrdersList ({ commit }, payload) {
16
+      ajax(api.goodsOrder.getOnlineOrder.url, {
17
+        method: api.goodsOrder.getOnlineOrder.method,
18
+        queryData: {
19
+          ...payload,
20
+        }
21
+      }).then(res => {
22
+        commit('updateList', res)
23
+      })
24
+    },
25
+  }
26
+}

+ 3
- 0
src/store/index.js View File

@@ -22,6 +22,9 @@ export const modules = {
22 22
   coursetag: () => require('./course/tag').default,
23 23
   schedule: () => require('./course/schedule').default,
24 24
   verification: () => require('./verification/verification').default,
25
+  goodsorder: () => require('./goods/order').default,
26
+  cmscase: () => require('./cms/case').default,
27
+  caserecord: () => require('./case/record').default,
25 28
 }
26 29
 
27 30
 Object.keys(modules).forEach((modKey) => {

+ 14
- 0
src/util/api.js View File

@@ -196,6 +196,14 @@ const $api = {
196 196
       method: 'get',
197 197
       url: `${baseUrl}${common}/usertype`
198 198
     },
199
+    getRecordList: {
200
+      method: 'get',
201
+      url: `${baseUrl}${common}/case/record`
202
+    },
203
+    addRecord: {
204
+      method: 'post',
205
+      url: `${baseUrl}${common}/case/record`
206
+    },
199 207
   },
200 208
   goodsManager: {
201 209
     getGoodsSpecList: { // 商品规格列表
@@ -525,5 +533,11 @@ const $api = {
525 533
       url: `${baseUrl}${common}/verify/course/:id`
526 534
     },
527 535
   },
536
+  goodsOrder: {
537
+    getOnlineOrder: {
538
+      method: 'get',
539
+      url: `${baseUrl}${common}/order/online/goods`
540
+    },
541
+  },
528 542
 }
529 543
 export default $api