Browse Source

完成 赠送记录 对接

keyman1995 6 years ago
parent
commit
d3f95a21ee
3 changed files with 35 additions and 19 deletions
  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 View File

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://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
         // target: 'http://192.168.0.11', //ys
18
         // target: 'http://192.168.0.11', //ys
19
         // target: 'http://192.168.0.125:8080', //hyq
19
         // target: 'http://192.168.0.125:8080', //hyq
20
         // target: 'http://dev.ycjcjy.com/', //frp
20
         // target: 'http://dev.ycjcjy.com/', //frp

+ 27
- 17
src/pages/system/cardAndCouponManager/givingRecords.vue View File

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

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

783
       method: 'get',
783
       method: 'get',
784
       url: `${baseUrl}${common}/luckdrawlist/share`
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
 export default $api
794
 export default $api