Explorar el Código

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

wangfei hace 6 años
padre
commit
cbdb918728

+ 2
- 2
config/index.js Ver fichero

@@ -12,9 +12,9 @@ module.exports = {
12 12
     proxyTable: {
13 13
       '/api': {
14 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 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 18
         // target: 'http://dev.ycjcjy.com/', //frp
19 19
         changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
20 20
         // pathRewrite: {

+ 1
- 0
package.json Ver fichero

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

+ 18
- 47
src/pages/system/luckyDrawManager/luckyDrawList/index.vue Ver fichero

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

+ 40
- 85
src/pages/system/luckyDrawManager/luckyDrawShareList/index.vue Ver fichero

@@ -2,30 +2,7 @@
2 2
   <div class="subPage">
3 3
     <div class="system-table-search">
4 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 6
       </div>
30 7
       <div class="moreFilter"></div>
31 8
     </div>
@@ -35,24 +12,46 @@
35 12
         stripe
36 13
         style="width: 100%">
37 14
         <el-table-column
38
-          prop="TypeName"
15
+          prop="CaseName"
39 16
           label="案场">
40 17
         </el-table-column>
41 18
         <el-table-column
42
-          prop="TypeName"
43
-          label="用户名">
19
+          prop="ActivitName"
20
+          label="活动名称">
44 21
         </el-table-column>
45 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 32
           label="手机号">
48 33
         </el-table-column>
49 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 49
         </el-table-column>
53 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 55
         </el-table-column>
57 56
       </el-table>
58 57
     </div>
@@ -67,7 +66,8 @@
67 66
 </template>
68 67
 
69 68
 <script>
70
-import { mapState } from 'vuex'
69
+import { createNamespacedHelpers } from 'vuex'
70
+const { mapState: mapLuckState, mapActions: mapLuckActions } = createNamespacedHelpers('luckDraw')
71 71
 
72 72
 export default {
73 73
   name: '',
@@ -75,7 +75,6 @@ export default {
75 75
     return {
76 76
       total: 0,
77 77
       postData: { // 表格搜索条件
78
-        caseid: '', // 案场id
79 78
         page: 1, // 当前页码
80 79
         pagesize: 10, // 请求数据量
81 80
       },
@@ -88,20 +87,12 @@ export default {
88 87
     })
89 88
   },
90 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 94
   methods: {
95
+    ...mapLuckActions(['getLuckDrawList']),
105 96
     search () { // 搜索
106 97
       this.postData.page = 1
107 98
       this.currentList = []
@@ -111,50 +102,14 @@ export default {
111 102
       return (this.cases.filter(x => x.CaseId === caseid)[0] || {}).CaseName
112 103
     },
113 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 111
     handleCurrentChange (val) { // 跳转到分页
127 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 Ver fichero

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

+ 10
- 0
src/util/api.js Ver fichero

@@ -757,6 +757,16 @@ const $api = {
757 757
       method: 'get',
758 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 772
 export default $api