yuantianjiao 6 년 전
부모
커밋
b32d23a9cd

+ 1
- 1
config/index.js 파일 보기

@@ -14,7 +14,7 @@ module.exports = {
14 14
         // target: 'https://dp.huiju360.com.cn/hj_operations',
15 15
         target: 'http://192.168.0.62:8080', //wf
16 16
         // target: 'http://192.168.0.11', //ys
17
-        // target: 'http://192.168.0.11', //ys
17
+        // target: 'http://192.168.0.125:8080', //hyq
18 18
         // target: 'http://dev.ycjcjy.com/', //frp
19 19
         changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
20 20
         // pathRewrite: {

+ 152
- 0
src/pages/system/healthManager/healthRecord/index.vue 파일 보기

@@ -0,0 +1,152 @@
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="addGoodsType">新增商品类型</el-button> -->
7
+        </div>
8
+        <ul>
9
+          <li>
10
+            <!-- <span>选择案场:</span> -->
11
+            <el-select v-model="CaseId" placeholder="请选择">
12
+              <el-option
13
+                key=""
14
+                label="所有案场"
15
+                value="">
16
+              </el-option>
17
+              <el-option
18
+                v-for="item in cases"
19
+                :key="item.CaseId"
20
+                :label="item.CaseName"
21
+                :value="item.CaseId">
22
+              </el-option>
23
+            </el-select>
24
+          </li>
25
+          <li>
26
+            <el-input
27
+              placeholder="请输入用户名"
28
+              v-model="userName"
29
+            >
30
+            </el-input>
31
+          </li>
32
+          <li>
33
+            <el-input
34
+              placeholder="请输入手机号"
35
+              v-model="mobile"
36
+            >
37
+            </el-input>
38
+          </li>
39
+        </ul>
40
+        <el-button
41
+          size="mini"
42
+          type="primary" @click="search">搜索</el-button>
43
+      </div>
44
+      <div class="moreFilter"></div>
45
+    </div>
46
+    <div class="system-table-box">
47
+      <el-table
48
+        :data="currentList"
49
+        stripe
50
+        style="width: 100%">
51
+        <el-table-column
52
+          prop="CaseName"
53
+          label="案场">
54
+        </el-table-column>
55
+        <el-table-column
56
+          prop="CustomerName"
57
+          label="用户名">
58
+        </el-table-column>
59
+        <el-table-column
60
+          prop="Phone"
61
+          label="手机号">
62
+        </el-table-column>
63
+        <el-table-column
64
+          prop="Sex"
65
+          label="性别">
66
+        </el-table-column>
67
+        <el-table-column
68
+          label="检测时间">
69
+          <template slot-scope="scope">
70
+            <label>{{toolClass.dateFormat(scope.row.CreateDate)}}</label>
71
+          </template>
72
+        </el-table-column>
73
+      </el-table>
74
+    </div>
75
+    <el-pagination
76
+      @current-change="handleCurrentChange"
77
+      :current-page.sync="postData.page"
78
+      :page-size="postData.pagesize"
79
+      layout="prev, pager, next, jumper"
80
+      :total="total">
81
+    </el-pagination>
82
+  </div>
83
+</template>
84
+
85
+<script>
86
+import { mapState, createNamespacedHelpers } from 'vuex'
87
+const { mapState: mapHealthState, mapActions: mapHealthActions } = createNamespacedHelpers('health')
88
+
89
+export default {
90
+  name: '',
91
+  data () {
92
+    return {
93
+      total: 0,
94
+      userName: '',
95
+      mobile: '',
96
+      postData: { // 表格搜索条件
97
+        caseid: '',
98
+        page: 1, // 当前页码
99
+        pagesize: 10, // 请求数据量
100
+      },
101
+      currentList: []
102
+    }
103
+  },
104
+  mounted () {
105
+    this.$nextTick(function () {
106
+      this.getList()
107
+    })
108
+  },
109
+  computed: {
110
+    ...mapState({
111
+      cases: x => x.app.cases.list,
112
+      defaultCaseId: x => x.app.cases.default
113
+    }),
114
+    ...mapHealthState({
115
+      list: x => x.healthList
116
+    }),
117
+    CaseId: {
118
+      get () {
119
+        return this.postData.caseid || this.defaultCaseId
120
+      },
121
+      set (val) {
122
+        this.postData.caseid = val
123
+      }
124
+    }
125
+  },
126
+  methods: {
127
+    ...mapHealthActions(['getHealthList']),
128
+    search () { // 搜索
129
+      this.postData.page = 1
130
+      this.currentList = []
131
+      this.getList()
132
+    },
133
+    getCaseName (caseid) {
134
+      return (this.cases.filter(x => x.CaseId === caseid)[0] || {}).CaseName
135
+    },
136
+    getList () { // 获取列表
137
+      this.getHealthList({ ...this.postData, caseid: this.CaseId, phone: this.mobile, customerName: this.userName }).then((res) => {
138
+        this.currentList = this.list.list
139
+        this.postData.page = this.list.page
140
+        this.total = this.list.pagenum
141
+      })
142
+    },
143
+    handleCurrentChange (val) { // 跳转到分页
144
+      this.getList()
145
+    }
146
+  }
147
+}
148
+</script>
149
+
150
+<!-- Add "scoped" attribute to limit CSS to this component only -->
151
+<style lang="scss" scoped>
152
+</style>

+ 19
- 0
src/pages/system/healthManager/index.vue 파일 보기

@@ -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>

+ 19
- 0
src/pages/system/luckyDrawManager/index.vue 파일 보기

@@ -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>

+ 149
- 0
src/pages/system/luckyDrawManager/luckyDrawList/index.vue 파일 보기

@@ -0,0 +1,149 @@
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="addGoodsType">新增商品类型</el-button> -->
7
+        </div>
8
+        <!-- <ul>
9
+          <li>
10
+            <el-select v-model="CaseId" placeholder="请选择">
11
+              <el-option
12
+                key=""
13
+                label="所有案场"
14
+                value="">
15
+              </el-option>
16
+              <el-option
17
+                v-for="item in cases"
18
+                :key="item.CaseId"
19
+                :label="item.CaseName"
20
+                :value="item.CaseId">
21
+              </el-option>
22
+            </el-select>
23
+          </li>
24
+        </ul>
25
+        <el-button
26
+          size="mini"
27
+          type="primary" @click="search">搜索</el-button> -->
28
+      </div>
29
+      <div class="moreFilter"></div>
30
+    </div>
31
+    <div class="system-table-box">
32
+      <el-table
33
+        :data="currentList"
34
+        stripe
35
+        style="width: 100%">
36
+        <el-table-column
37
+          prop="TypeName"
38
+          label="案场">
39
+        </el-table-column>
40
+        <el-table-column
41
+          prop="TypeName"
42
+          label="活动名称">
43
+        </el-table-column>
44
+        <el-table-column
45
+          prop="TypeName"
46
+          label="姓名">
47
+        </el-table-column>
48
+        <el-table-column
49
+          prop="TypeName"
50
+          label="微信昵称">
51
+        </el-table-column>
52
+        <el-table-column
53
+          prop="TypeName"
54
+          label="手机号">
55
+        </el-table-column>
56
+        <el-table-column
57
+          prop="TypeName"
58
+          label="获取奖品">
59
+        </el-table-column>
60
+        <el-table-column
61
+          prop="TypeName"
62
+          label="获取时间">
63
+        </el-table-column>
64
+        <el-table-column
65
+          prop="TypeName"
66
+          label="核销时间">
67
+        </el-table-column>
68
+        <el-table-column
69
+          prop="TypeName"
70
+          label="状态">
71
+        </el-table-column>
72
+      </el-table>
73
+    </div>
74
+    <el-pagination
75
+      @current-change="handleCurrentChange"
76
+      :current-page.sync="postData.page"
77
+      :page-size="postData.pagesize"
78
+      layout="prev, pager, next, jumper"
79
+      :total="total">
80
+    </el-pagination>
81
+  </div>
82
+</template>
83
+
84
+<script>
85
+import { mapState, createNamespacedHelpers } from 'vuex'
86
+const { mapState: mapLuckState, mapActions: mapLuckActions } = createNamespacedHelpers('luckDraw')
87
+
88
+export default {
89
+  name: '',
90
+  data () {
91
+    return {
92
+      total: 0,
93
+      postData: { // 表格搜索条件
94
+        caseid: '',
95
+        page: 1, // 当前页码
96
+        pagesize: 10, // 请求数据量
97
+      },
98
+      currentList: []
99
+    }
100
+  },
101
+  mounted () {
102
+    this.$nextTick(function () {
103
+      this.getList()
104
+    })
105
+  },
106
+  computed: {
107
+    ...mapState({
108
+      cases: x => x.app.cases.list,
109
+      defaultCaseId: x => x.app.cases.default
110
+    }),
111
+    ...mapLuckState({
112
+      list: x => x.luckDrawList
113
+    }),
114
+    CaseId: {
115
+      get () {
116
+        return this.postData.caseid || this.defaultCaseId
117
+      },
118
+      set (val) {
119
+        this.postData.caseid = val
120
+      }
121
+    }
122
+  },
123
+  methods: {
124
+    ...mapLuckActions(['getLuckDrawList']),
125
+    search () { // 搜索
126
+      this.postData.page = 1
127
+      this.currentList = []
128
+      this.getList()
129
+    },
130
+    getCaseName (caseid) {
131
+      return (this.cases.filter(x => x.CaseId === caseid)[0] || {}).CaseName
132
+    },
133
+    getList () { // 获取列表
134
+      this.getLuckDrawList({ ...this.postData, caseid: this.CaseId }).then((res) => {
135
+        this.currentList = this.list.list
136
+        this.postData.page = this.list.page
137
+        this.total = this.list.pagenum
138
+      })
139
+    },
140
+    handleCurrentChange (val) { // 跳转到分页
141
+      this.getList()
142
+    }
143
+  }
144
+}
145
+</script>
146
+
147
+<!-- Add "scoped" attribute to limit CSS to this component only -->
148
+<style lang="scss" scoped>
149
+</style>

+ 165
- 0
src/pages/system/luckyDrawManager/luckyDrawShareList/index.vue 파일 보기

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

+ 32
- 0
src/pages/system/page.js 파일 보기

@@ -108,6 +108,13 @@ import marketingActivities from './marketingActivities/index' // 营销活动
108 108
 import activitiesList from './marketingActivities/activitiesList/index' // 活动列表
109 109
 import addActivities from './marketingActivities/addActivities/index' // 添加活动
110 110
 
111
+import healthManager from './healthManager/index' // 健康管理
112
+import healthRecord from './healthManager/healthRecord/index' // 体检记录列表
113
+
114
+import luckyDrawManager from './luckyDrawManager/index' // 抽奖管理
115
+import luckyDrawList from './luckyDrawManager/luckyDrawList/index' // 抽奖记录列表
116
+import luckyDrawShareList from './luckyDrawManager/luckyDrawShareList/index' // 抽奖分享记录列表
117
+
111 118
 export default {
112 119
   router: [
113 120
     {
@@ -584,6 +591,31 @@ export default {
584 591
             }]
585 592
           }]
586 593
         }]
594
+      }, { // 健康管理
595
+        path: 'healthManager',
596
+        name: 'healthManager',
597
+        component: healthManager,
598
+        children: [{ // 体检记录列表
599
+          path: 'healthRecord',
600
+          name: 'healthRecord',
601
+          component: healthRecord,
602
+          children: []
603
+        }],
604
+      }, { // 抽奖管理
605
+        path: 'luckyDrawManager',
606
+        name: 'luckyDrawManager',
607
+        component: luckyDrawManager,
608
+        children: [{ // 抽奖记录列表
609
+          path: 'luckyDrawList',
610
+          name: 'luckyDrawList',
611
+          component: luckyDrawList,
612
+          children: []
613
+        }, { // 抽奖分享记录列表
614
+          path: 'luckyDrawShareList',
615
+          name: 'luckyDrawShareList',
616
+          component: luckyDrawShareList,
617
+          children: []
618
+        }],
587 619
       }]
588 620
     },
589 621
   ],

+ 1
- 1
src/pages/system/systemSet/userManager/index.vue 파일 보기

@@ -91,7 +91,7 @@
91 91
         <el-table-column
92 92
           prop="CreateDate"
93 93
           label="创建时间"
94
-          width="200">
94
+          width="">
95 95
         </el-table-column>
96 96
         <el-table-column label="操作" fixed='right' width="350">
97 97
           <template slot-scope="scope">

+ 29
- 0
src/store/health/health.js 파일 보기

@@ -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
+    healthList: {},
8
+  },
9
+  mutations: {
10
+    updateList (state, payload) {
11
+      state.healthList = payload || {}
12
+    },
13
+  },
14
+  actions: {
15
+    getHealthList ({ commit }, payload) { // 获取体检记录列表
16
+      return new Promise((resolve, reject) => {
17
+        ajax({
18
+          ...api.health.healthList,
19
+          queryData: {
20
+            ...payload,
21
+          }
22
+        }).then(res => {
23
+          commit('updateList', res)
24
+          resolve(res)
25
+        }).catch(reject)
26
+      })
27
+    }
28
+  }
29
+}

+ 2
- 0
src/store/index.js 파일 보기

@@ -33,6 +33,8 @@ export const modules = {
33 33
   customer: () => require('./customer/customer').default,
34 34
   user: () => require('./system/user').default,
35 35
   sta: () => require('./sta/sta').default,
36
+  health: () => require('./health/health').default,
37
+  luckDraw: () => require('./luckDraw/luckDraw').default,
36 38
 }
37 39
 
38 40
 Object.keys(modules).forEach((modKey) => {

+ 46
- 0
src/store/luckDraw/luckDraw.js 파일 보기

@@ -0,0 +1,46 @@
1
+import ajax from '../../util/ajax'
2
+import api from '../../util/api'
3
+
4
+export default {
5
+  namespaced: true,
6
+  state: {
7
+    luckDrawList: {},
8
+    luckDrawShareList: {}
9
+  },
10
+  mutations: {
11
+    updateLuckDrawList (state, payload) {
12
+      state.luckDrawList = payload || {}
13
+    },
14
+    updateLuckShareDrawList (state, payload) {
15
+      state.luckDrawShareList = payload || {}
16
+    },
17
+  },
18
+  actions: {
19
+    getLuckDrawList ({ commit }, payload) { // 获取抽奖列表
20
+      return new Promise((resolve, reject) => {
21
+        ajax({
22
+          ...api.health.healthList,
23
+          queryData: {
24
+            ...payload,
25
+          }
26
+        }).then(res => {
27
+          commit('updateLuckDrawList', res)
28
+          resolve(res)
29
+        }).catch(reject)
30
+      })
31
+    },
32
+    getLuckDrawShareList ({ commit }, payload) { // 获取抽奖分享列表
33
+      return new Promise((resolve, reject) => {
34
+        ajax({
35
+          ...api.health.healthList,
36
+          queryData: {
37
+            ...payload,
38
+          }
39
+        }).then(res => {
40
+          commit('updateLuckDrawShareList', res)
41
+          resolve(res)
42
+        }).catch(reject)
43
+      })
44
+    }
45
+  }
46
+}

+ 6
- 0
src/util/api.js 파일 보기

@@ -747,6 +747,12 @@ const $api = {
747 747
       method: 'get',
748 748
       url: `${baseUrl}${common}/statistics/cardcouponverify/excel`
749 749
     },
750
+  },
751
+  health: {
752
+    healthList: {
753
+      method: 'get',
754
+      url: `${baseUrl}${common}/bodychecklist`
755
+    }
750 756
   }
751 757
 }
752 758
 export default $api