yuantianjiao 6 年之前
父節點
當前提交
40e7dec5b7

+ 24
- 1
src/pages/sales/customerSearch/index.vue 查看文件

@@ -116,7 +116,30 @@ export default {
116 116
     ...mapRemarkActions(['setRemark']),
117 117
     record (item) {
118 118
       // console.log(item)
119
-      this.$router.push({ name: 'getRecord', query: { name: item.Name, phone: item.Phone, id: item.CustomerId } })
119
+      this.$router.push({ name: 'getRecord', query: { name: item.Name, phone: item.Phone, id: item.CustomerId } }).then(() => {
120
+        this.getCustomerList({
121
+          page: 1,
122
+          pagesize: 10000,
123
+          isrecommend: false,
124
+          key: this.key,
125
+        }).then((res) => {
126
+          this.cardList = []
127
+          if (res) {
128
+            for (var n = 0; n < res.length; n++) {
129
+              if (res[n].RecommendId === this.userInfo.customer.MapUser) {
130
+                res[n].showTag = true
131
+              } else {
132
+                res[n].showTag = false
133
+              }
134
+              this.cardList.push(res[n])
135
+            }
136
+          } else {
137
+            this.hasPic = true
138
+          }
139
+          this.mask = false
140
+          this.ajaxOff = true
141
+        })
142
+      })
120 143
     },
121 144
     remark (item) {
122 145
       // console.log(item)

+ 10
- 10
src/pages/sales/history/index.vue 查看文件

@@ -4,16 +4,16 @@
4 4
       <topCaseInfo :data="topCaseInfoData" :userName="userInfo.customer.RealName ? userInfo.customer.RealName : userInfo.customer.CustomerName"></topCaseInfo>
5 5
     </div>
6 6
     <div class="info">
7
-      <span><em>姓名</em>:顶顶顶</span>
8
-      <span><em>手机号</em>:13888888888</span>
7
+      <span><em>姓名</em>:{{list[0].CustomerName}}</span>
8
+      <span><em>手机号</em>:{{list[0].Phone}}</span>
9 9
     </div>
10 10
     <div class="list-content">
11
-      <div class="list-year">2018年备注记录</div>
11
+      <div class="list-year">备注记录</div>
12 12
       <div class="list-card" v-for="(item,index) in list" :key="index">
13 13
         <div class="point-top"></div>
14 14
         <div class="point-bottom"></div>
15
-        <div class="card-time">7.29</div>
16
-        <div class="card-content">更多备注信息更多备注信息,更多备注信息更多备注信息更多备注信息更多备注信息。更多备注信息更多备注信息。</div>
15
+        <div class="card-time">{{toolClass.dateFormat(item.CreateDate,'MM-dd')}}</div>
16
+        <div class="card-content">{{item.Remark}}</div>
17 17
       </div>
18 18
     </div>
19 19
   </div>
@@ -23,12 +23,11 @@
23 23
 import topCaseInfo from '../../../components/topCaseInfo/index'
24 24
 import { mapState, createNamespacedHelpers } from 'vuex'
25 25
 const { mapActions: actions } = createNamespacedHelpers('app')
26
-const { mapState: mpRemarkState, mapActions: mapRemarkActions } = createNamespacedHelpers('remark')
26
+const { mapState: mapRemarkState, mapActions: mapRemarkActions } = createNamespacedHelpers('remark')
27 27
 export default {
28 28
   name: '',
29 29
   data () {
30 30
     return {
31
-      // list: [1,1,1,1,1],
32 31
       topCaseInfoData: {
33 32
         caseName: '',
34 33
         caseId: '',
@@ -44,7 +43,7 @@ export default {
44 43
       userInfo: x => x.userCenter.userInfo,
45 44
       CaseList: x => x.app.CaseList,
46 45
     }),
47
-    ...mapRemarkActions({
46
+    ...mapRemarkState({
48 47
       list: x => x.remarkList
49 48
     }),
50 49
   },
@@ -56,8 +55,9 @@ export default {
56 55
           this.topCaseInfoData.caseName = this.CaseList[i].CaseName
57 56
         }
58 57
       }
59
-      console.log(this.userInfo)
60
-      this.getRemark({ salesId: this.userInfo.MappingId, customerId: this.$route.query.customerId })
58
+      this.getRemark({ salesId: this.userInfo.customer.MapUser, customerId: this.$route.query.customerId }).then(() => {
59
+        console.log(this.list)
60
+      })
61 61
     })
62 62
   },
63 63
   methods: {

+ 18
- 0
src/pages/user/mainPage/coffeeIndex/index.vue 查看文件

@@ -562,6 +562,24 @@ export default {
562 562
     beforeClose (action, done) {
563 563
       if (action === 'confirm') {
564 564
         this.setRemark({ salesId: this.userInfo.customer.MapUser, customerId: this.remarkCustomerId, remark: this.message }).then(() => {
565
+          this.getCustomerList({
566
+            ...this.postCustomerData
567
+          }).then((res) => {
568
+            this.data[3].list = []
569
+            if (res) {
570
+              for (var n = 0; n < res.length; n++) {
571
+                if (res[n].RecommendId === this.userInfo.customer.MapUser) {
572
+                  this.myRecommendUserList.push(res[n])
573
+                  res[n].showTag = true
574
+                } else {
575
+                  res[n].showTag = false
576
+                }
577
+                this.data[3].list.push(res[n])
578
+              }
579
+            } else {
580
+              this.data[3].hasPic = true
581
+            }
582
+          })
565 583
           done()
566 584
         })
567 585
       } else {

+ 4
- 1
src/pages/user/rush/index.vue 查看文件

@@ -54,6 +54,9 @@ export default {
54 54
     }
55 55
   },
56 56
   created () {
57
+    this.getRush({ flashBuyId: this.$route.query.flashBuyId }).then(() => {
58
+
59
+    })
57 60
     let start = 1540275765202
58 61
     let end = 1540481765202
59 62
     console.log(this)
@@ -65,7 +68,7 @@ export default {
65 68
     })
66 69
   },
67 70
   methods: {
68
-    ...mapRushActions(['setRush']),
71
+    ...mapRushActions(['setRush', 'getRush']),
69 72
     timing (startTime, endTime) {
70 73
       this.Interval = setInterval(() => {
71 74
         let nowTime = new Date().getTime()

+ 7
- 3
src/store/remark/index.js 查看文件

@@ -5,11 +5,11 @@ import api from '../../util/api'
5 5
 export default {
6 6
   namespaced: true,
7 7
   state: {
8
-    remakrList: []
8
+    remarkList: []
9 9
   },
10 10
   mutations: {
11 11
     setRemark (state, data) {
12
-      state.remakrList = data || []
12
+      state.remarkList = data.list || []
13 13
     }
14 14
   },
15 15
   actions: {
@@ -17,7 +17,11 @@ export default {
17 17
       return new Promise((resolve, reject) => {
18 18
         Ajax({
19 19
           ...api.remark.getRemark,
20
-          urlData: { ...data }
20
+          urlData: { ...data },
21
+          queryData: {
22
+            page: 1,
23
+            pagesize: 10000
24
+          }
21 25
         }).then(res => {
22 26
           context.commit('setRemark', res)
23 27
           resolve(res)

+ 4
- 3
src/store/rush/index.js 查看文件

@@ -13,10 +13,11 @@ export default {
13 13
     }
14 14
   },
15 15
   actions: {
16
-    getRush (context) {
16
+    getRush (context, data) {
17 17
       return new Promise((resolve, reject) => {
18 18
         Ajax({
19
-          ...api.user.getRush
19
+          ...api.rush.getRush,
20
+          urlData: { ...data }
20 21
         }).then(res => {
21 22
           context.commit('setDetail', res)
22 23
           resolve(res)
@@ -28,7 +29,7 @@ export default {
28 29
     setRush (context, data) {
29 30
       return new Promise((resolve, reject) => {
30 31
         Ajax({
31
-          ...api.user.setRush
32
+          ...api.rush.setRush
32 33
         }).then(res => {
33 34
           resolve(res)
34 35
         }).catch((err) => {

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

@@ -277,7 +277,7 @@ const $api = {
277 277
     },
278 278
     getRush: {
279 279
       method: 'get',
280
-      url: `${baseUrl}${wechat}/customerremark`
280
+      url: `${baseUrl}${wechat}/flashbuy/flash/:flashBuyId`
281 281
     }
282 282
   }
283 283
 }