Browse Source

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

wangfei 6 years ago
parent
commit
cbdb918728

+ 2
- 2
config/index.js View File

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

+ 1
- 0
package.json View File

87
     "style-loader": "^0.22.0",
87
     "style-loader": "^0.22.0",
88
     "uglifyjs-webpack-plugin": "^1.1.1",
88
     "uglifyjs-webpack-plugin": "^1.1.1",
89
     "url-loader": "^0.5.8",
89
     "url-loader": "^0.5.8",
90
+    "vue-clipboard2": "^0.2.1",
90
     "vue-fullcalendar": "^1.0.9",
91
     "vue-fullcalendar": "^1.0.9",
91
     "vue-jest": "^1.0.2",
92
     "vue-jest": "^1.0.2",
92
     "vue-loader": "^13.3.0",
93
     "vue-loader": "^13.3.0",

+ 18
- 47
src/pages/system/luckyDrawManager/luckyDrawList/index.vue View File

2
   <div class="subPage">
2
   <div class="subPage">
3
     <div class="system-table-search">
3
     <div class="system-table-search">
4
       <div class="flex-h">
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> -->
5
+        <div class="flex-item flex-h"></div>
28
       </div>
6
       </div>
29
       <div class="moreFilter"></div>
7
       <div class="moreFilter"></div>
30
     </div>
8
     </div>
34
         stripe
12
         stripe
35
         style="width: 100%">
13
         style="width: 100%">
36
         <el-table-column
14
         <el-table-column
37
-          prop="TypeName"
15
+          prop="CaseName"
38
           label="案场">
16
           label="案场">
39
         </el-table-column>
17
         </el-table-column>
40
         <el-table-column
18
         <el-table-column
41
-          prop="TypeName"
19
+          prop="ActivitName"
42
           label="活动名称">
20
           label="活动名称">
43
         </el-table-column>
21
         </el-table-column>
44
         <el-table-column
22
         <el-table-column
45
-          prop="TypeName"
23
+          prop="Name"
46
           label="姓名">
24
           label="姓名">
47
         </el-table-column>
25
         </el-table-column>
48
         <el-table-column
26
         <el-table-column
49
-          prop="TypeName"
27
+          prop="CustomerName"
50
           label="微信昵称">
28
           label="微信昵称">
51
         </el-table-column>
29
         </el-table-column>
52
         <el-table-column
30
         <el-table-column
53
-          prop="TypeName"
31
+          prop="Phone"
54
           label="手机号">
32
           label="手机号">
55
         </el-table-column>
33
         </el-table-column>
56
         <el-table-column
34
         <el-table-column
57
-          prop="TypeName"
35
+          prop="PrizeName"
58
           label="获取奖品">
36
           label="获取奖品">
59
         </el-table-column>
37
         </el-table-column>
60
         <el-table-column
38
         <el-table-column
61
-          prop="TypeName"
62
           label="获取时间">
39
           label="获取时间">
40
+          <template slot-scope="scope">
41
+            <label>{{toolClass.dateFormat(scope.row.CreateDate)}}</label>
42
+          </template>
63
         </el-table-column>
43
         </el-table-column>
64
         <el-table-column
44
         <el-table-column
65
-          prop="TypeName"
66
           label="核销时间">
45
           label="核销时间">
46
+          <template slot-scope="scope">
47
+            <label>{{toolClass.dateFormat(scope.row.WriteoffDate)}}</label>
48
+          </template>
67
         </el-table-column>
49
         </el-table-column>
68
         <el-table-column
50
         <el-table-column
69
-          prop="TypeName"
70
           label="状态">
51
           label="状态">
52
+          <template slot-scope="scope">
53
+            <label>{{scope.row.Status === 0 ? '未核销' : '已核销'}}</label>
54
+          </template>
71
         </el-table-column>
55
         </el-table-column>
72
       </el-table>
56
       </el-table>
73
     </div>
57
     </div>
82
 </template>
66
 </template>
83
 
67
 
84
 <script>
68
 <script>
85
-import { mapState, createNamespacedHelpers } from 'vuex'
69
+import { createNamespacedHelpers } from 'vuex'
86
 const { mapState: mapLuckState, mapActions: mapLuckActions } = createNamespacedHelpers('luckDraw')
70
 const { mapState: mapLuckState, mapActions: mapLuckActions } = createNamespacedHelpers('luckDraw')
87
 
71
 
88
 export default {
72
 export default {
91
     return {
75
     return {
92
       total: 0,
76
       total: 0,
93
       postData: { // 表格搜索条件
77
       postData: { // 表格搜索条件
94
-        caseid: '',
95
         page: 1, // 当前页码
78
         page: 1, // 当前页码
96
         pagesize: 10, // 请求数据量
79
         pagesize: 10, // 请求数据量
97
       },
80
       },
104
     })
87
     })
105
   },
88
   },
106
   computed: {
89
   computed: {
107
-    ...mapState({
108
-      cases: x => x.app.cases.list,
109
-      defaultCaseId: x => x.app.cases.default
110
-    }),
111
     ...mapLuckState({
90
     ...mapLuckState({
112
       list: x => x.luckDrawList
91
       list: x => x.luckDrawList
113
     }),
92
     }),
114
-    CaseId: {
115
-      get () {
116
-        return this.postData.caseid || this.defaultCaseId
117
-      },
118
-      set (val) {
119
-        this.postData.caseid = val
120
-      }
121
-    }
122
   },
93
   },
123
   methods: {
94
   methods: {
124
     ...mapLuckActions(['getLuckDrawList']),
95
     ...mapLuckActions(['getLuckDrawList']),
131
       return (this.cases.filter(x => x.CaseId === caseid)[0] || {}).CaseName
102
       return (this.cases.filter(x => x.CaseId === caseid)[0] || {}).CaseName
132
     },
103
     },
133
     getList () { // 获取列表
104
     getList () { // 获取列表
134
-      this.getLuckDrawList({ ...this.postData, caseid: this.CaseId }).then((res) => {
105
+      this.getLuckDrawList({ ...this.postData }).then((res) => {
135
         this.currentList = this.list.list
106
         this.currentList = this.list.list
136
         this.postData.page = this.list.page
107
         this.postData.page = this.list.page
137
         this.total = this.list.pagenum
108
         this.total = this.list.pagenum

+ 40
- 85
src/pages/system/luckyDrawManager/luckyDrawShareList/index.vue View File

2
   <div class="subPage">
2
   <div class="subPage">
3
     <div class="system-table-search">
3
     <div class="system-table-search">
4
       <div class="flex-h">
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>
5
+        <div class="flex-item flex-h"></div>
29
       </div>
6
       </div>
30
       <div class="moreFilter"></div>
7
       <div class="moreFilter"></div>
31
     </div>
8
     </div>
35
         stripe
12
         stripe
36
         style="width: 100%">
13
         style="width: 100%">
37
         <el-table-column
14
         <el-table-column
38
-          prop="TypeName"
15
+          prop="CaseName"
39
           label="案场">
16
           label="案场">
40
         </el-table-column>
17
         </el-table-column>
41
         <el-table-column
18
         <el-table-column
42
-          prop="TypeName"
43
-          label="用户名">
19
+          prop="ActivitName"
20
+          label="活动名称">
44
         </el-table-column>
21
         </el-table-column>
45
         <el-table-column
22
         <el-table-column
46
-          prop="TypeName"
23
+          prop="Name"
24
+          label="姓名">
25
+        </el-table-column>
26
+        <el-table-column
27
+          prop="CustomerName"
28
+          label="微信昵称">
29
+        </el-table-column>
30
+        <el-table-column
31
+          prop="Phone"
47
           label="手机号">
32
           label="手机号">
48
         </el-table-column>
33
         </el-table-column>
49
         <el-table-column
34
         <el-table-column
50
-          prop="TypeName"
51
-          label="性别">
35
+          prop="PrizeName"
36
+          label="获取奖品">
37
+        </el-table-column>
38
+        <el-table-column
39
+          label="获取时间">
40
+          <template slot-scope="scope">
41
+            <label>{{toolClass.dateFormat(scope.row.CreateDate)}}</label>
42
+          </template>
43
+        </el-table-column>
44
+        <el-table-column
45
+          label="核销时间">
46
+          <template slot-scope="scope">
47
+            <label>{{toolClass.dateFormat(scope.row.WriteoffDate)}}</label>
48
+          </template>
52
         </el-table-column>
49
         </el-table-column>
53
         <el-table-column
50
         <el-table-column
54
-          prop="TypeName"
55
-          label="检测时间">
51
+          label="状态">
52
+          <template slot-scope="scope">
53
+            <label>{{scope.row.Status === 0 ? '未核销' : '已核销'}}</label>
54
+          </template>
56
         </el-table-column>
55
         </el-table-column>
57
       </el-table>
56
       </el-table>
58
     </div>
57
     </div>
67
 </template>
66
 </template>
68
 
67
 
69
 <script>
68
 <script>
70
-import { mapState } from 'vuex'
69
+import { createNamespacedHelpers } from 'vuex'
70
+const { mapState: mapLuckState, mapActions: mapLuckActions } = createNamespacedHelpers('luckDraw')
71
 
71
 
72
 export default {
72
 export default {
73
   name: '',
73
   name: '',
75
     return {
75
     return {
76
       total: 0,
76
       total: 0,
77
       postData: { // 表格搜索条件
77
       postData: { // 表格搜索条件
78
-        caseid: '', // 案场id
79
         page: 1, // 当前页码
78
         page: 1, // 当前页码
80
         pagesize: 10, // 请求数据量
79
         pagesize: 10, // 请求数据量
81
       },
80
       },
88
     })
87
     })
89
   },
88
   },
90
   computed: {
89
   computed: {
91
-    ...mapState({
92
-      cases: x => x.app.cases.list,
93
-      defaultCaseId: x => x.app.cases.default
90
+    ...mapLuckState({
91
+      list: x => x.luckDrawList
94
     }),
92
     }),
95
-    CaseId: {
96
-      get () {
97
-        return this.postData.caseid || this.defaultCaseId
98
-      },
99
-      set (val) {
100
-        this.postData.caseid = val
101
-      }
102
-    }
103
   },
93
   },
104
   methods: {
94
   methods: {
95
+    ...mapLuckActions(['getLuckDrawList']),
105
     search () { // 搜索
96
     search () { // 搜索
106
       this.postData.page = 1
97
       this.postData.page = 1
107
       this.currentList = []
98
       this.currentList = []
111
       return (this.cases.filter(x => x.CaseId === caseid)[0] || {}).CaseName
102
       return (this.cases.filter(x => x.CaseId === caseid)[0] || {}).CaseName
112
     },
103
     },
113
     getList () { // 获取列表
104
     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
105
+      this.getLuckDrawList({ ...this.postData }).then((res) => {
106
+        this.currentList = this.list.list
107
+        this.postData.page = this.list.page
108
+        this.total = this.list.pagenum
124
       })
109
       })
125
     },
110
     },
126
     handleCurrentChange (val) { // 跳转到分页
111
     handleCurrentChange (val) { // 跳转到分页
127
       this.getList()
112
       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
     }
113
     }
159
   }
114
   }
160
 }
115
 }

+ 2
- 2
src/store/luckDraw/luckDraw.js View File

19
     getLuckDrawList ({ commit }, payload) { // 获取抽奖列表
19
     getLuckDrawList ({ commit }, payload) { // 获取抽奖列表
20
       return new Promise((resolve, reject) => {
20
       return new Promise((resolve, reject) => {
21
         ajax({
21
         ajax({
22
-          ...api.health.healthList,
22
+          ...api.luckDraw.luckDrawList,
23
           queryData: {
23
           queryData: {
24
             ...payload,
24
             ...payload,
25
           }
25
           }
32
     getLuckDrawShareList ({ commit }, payload) { // 获取抽奖分享列表
32
     getLuckDrawShareList ({ commit }, payload) { // 获取抽奖分享列表
33
       return new Promise((resolve, reject) => {
33
       return new Promise((resolve, reject) => {
34
         ajax({
34
         ajax({
35
-          ...api.health.healthList,
35
+          ...api.luckDraw.luckDrawShareList,
36
           queryData: {
36
           queryData: {
37
             ...payload,
37
             ...payload,
38
           }
38
           }

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

757
       method: 'get',
757
       method: 'get',
758
       url: `${baseUrl}${common}/bodychecklist`
758
       url: `${baseUrl}${common}/bodychecklist`
759
     }
759
     }
760
+  },
761
+  luckDraw: {
762
+    luckDrawList: {
763
+      method: 'get',
764
+      url: `${baseUrl}${common}/luckdrawlist`
765
+    },
766
+    luckDrawShareList: {
767
+      method: 'get',
768
+      url: `${baseUrl}${common}/luckdrawlist/:toPhone/:fromPhone`
769
+    }
760
   }
770
   }
761
 }
771
 }
762
 export default $api
772
 export default $api