浏览代码

完成 赠送记录 对接

keyman1995 6 年前
父节点
当前提交
d3f95a21ee
共有 3 个文件被更改,包括 35 次插入19 次删除
  1. 2
    2
      config/index.js
  2. 27
    17
      src/pages/system/cardAndCouponManager/givingRecords.vue
  3. 6
    0
      src/util/api.js

+ 2
- 2
config/index.js 查看文件

@@ -13,8 +13,8 @@ module.exports = {
13 13
       '/api': {
14 14
         // target: 'https://dp.huiju360.com.cn/hj_operations',
15 15
         // target: 'http://192.168.0.62:8080', //wf
16
-        //target: 'http://127.0.0.1:8080', 
17
-        target: 'http://192.168.0.62:8080', //wf
16
+        target: 'http://127.0.0.1:8080', 
17
+        //target: 'http://192.168.0.62:8080', //wf
18 18
         // target: 'http://192.168.0.11', //ys
19 19
         // target: 'http://192.168.0.125:8080', //hyq
20 20
         // target: 'http://dev.ycjcjy.com/', //frp

+ 27
- 17
src/pages/system/cardAndCouponManager/givingRecords.vue 查看文件

@@ -15,12 +15,14 @@
15 15
             <el-date-picker
16 16
               v-model="postData.startDate"
17 17
               type="date"
18
+              value-format="yyyy-MM-dd"
18 19
               placeholder="选择起始日期">
19 20
             </el-date-picker>
20 21
             <span>至</span>
21 22
             <el-date-picker
22 23
               v-model="postData.endDate"
23 24
               type="date"
25
+              value-format="yyyy-MM-dd"
24 26
               placeholder="选择截止日期">
25 27
             </el-date-picker>
26 28
           </li>
@@ -37,31 +39,34 @@
37 39
         stripe
38 40
         style="width: 100%">
39 41
         <el-table-column
40
-          prop="xxx"
42
+          prop="GiftName"
41 43
           label="卡券名称">
42 44
         </el-table-column>
43 45
         <el-table-column
44
-          prop="xxx"
46
+          prop="ToName"
45 47
           label="姓名">
46 48
         </el-table-column>
47 49
         <el-table-column
48
-          prop="xxx"
50
+          prop="CustomerName"
49 51
           label="微信昵称">
50 52
         </el-table-column>
51 53
         <el-table-column
52
-          prop="xxx"
54
+          prop="Phone"
53 55
           label="手机号">
54 56
         </el-table-column>
55 57
         <el-table-column
56
-          prop="xxx"
58
+          prop="RecommendName"
57 59
           label="推荐人">
58 60
         </el-table-column>
59 61
         <el-table-column
60
-          prop="xxx"
62
+          prop="CreateDate"
61 63
           label="赠送时间">
64
+          <template slot-scope="scope">
65
+            <span>{{FormatDate(scope.row.CreateDate)}}</span>
66
+          </template>
62 67
         </el-table-column>
63 68
         <el-table-column
64
-          prop="xxx"
69
+          prop="FromName"
65 70
           label="操作人">
66 71
         </el-table-column>
67 72
       </el-table>
@@ -87,9 +92,11 @@ export default {
87 92
       centerDialogVisible: false,
88 93
       total: 0,
89 94
       postData: { // 表格搜索条件
90
-        caseid: '', // 案场id
91 95
         page: 1, // 当前页码
92 96
         pagesize: 10, // 请求数据量
97
+        startDate: '',
98
+        endDate: '',
99
+        referrer: '', // 搜索框
93 100
       },
94 101
       currentList: [{
95 102
         xxx: 'xxx'
@@ -98,7 +105,7 @@ export default {
98 105
   },
99 106
   mounted () {
100 107
     this.$nextTick(function () {
101
-      // this.getList()
108
+      this.getList()
102 109
     })
103 110
   },
104 111
   computed: {
@@ -122,18 +129,21 @@ export default {
122 129
       this.getList()
123 130
     },
124 131
     getList () { // 获取列表
125
-      // this.$ajax(this.$api.channelManager.getChannelList.url, {
126
-      //   method: this.$api.channelManager.getChannelList.method,
127
-      //   queryData: { ...this.postData, caseid: this.CaseId }
128
-      // }).then(res => {
129
-      //   this.currentList = res.list
130
-      //   this.postData.page = res.page
131
-      //   this.total = res.pagenum
132
-      // })
132
+      this.$ajax(this.$api.record.getRecordList.url, {
133
+        method: this.$api.record.getRecordList.method,
134
+        queryData: { ...this.postData }
135
+      }).then(res => {
136
+        this.currentList = res.list
137
+        this.postData.page = res.page
138
+        this.total = res.pagenum
139
+      })
133 140
     },
134 141
     handleCurrentChange (val) { // 跳转到分页
135 142
       this.getList()
136 143
     },
144
+    FormatDate (date) {
145
+      return this.toolClass.dateFormat(date, 'yyyy-MM-dd hh:mm:ss')
146
+    },
137 147
   }
138 148
 }
139 149
 </script>

+ 6
- 0
src/util/api.js 查看文件

@@ -783,6 +783,12 @@ const $api = {
783 783
       method: 'get',
784 784
       url: `${baseUrl}${common}/luckdrawlist/share`
785 785
     }
786
+  },
787
+  record: {
788
+    getRecordList: {
789
+      method: 'get',
790
+      url: `${baseUrl}${common}/card/record`
791
+    }
786 792
   }
787 793
 }
788 794
 export default $api