dingxin 5 anos atrás
pai
commit
044a3c4091

+ 1
- 0
public/index.html Ver arquivo

@@ -6,6 +6,7 @@
6 6
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
7 7
     <link rel="icon" href="<%= BASE_URL %>favicon.ico">
8 8
     <link rel="stylesheet" href="//at.alicdn.com/t/font_1070150_8lyiyriedbr.css">
9
+    <link rel="stylesheet" href="//at.alicdn.com/t/font_1320815_gazogjls0pk.css">
9 10
     <title>后台管理系统</title>
10 11
   </head>
11 12
   <body>

+ 59
- 9
src/components/EditableTag.vue Ver arquivo

@@ -1,12 +1,12 @@
1 1
 <template>
2 2
   <div>
3 3
     <el-tag
4
-      :key="item[label]"
5
-      v-for="item in value"
4
+      v-for="item in values"
5
+      :key="item[labelName]"
6 6
       closable
7 7
       :disable-transitions="false"
8 8
       @close="() => handleClose(item)">
9
-      {{item[label]}}
9
+      {{item[labelName]}}
10 10
     </el-tag>
11 11
     <el-input
12 12
       class="input-new-tag"
@@ -28,24 +28,63 @@
28 28
     props: [
29 29
       'value',
30 30
       'label',
31
+      'soureType', // String, StringArray, ObjectArray, 默认 String
31 32
     ],
32 33
     data() {
33 34
       return {
34 35
         inputVisible: false,
35
-        inputValue: ''
36
+        inputValue: '',
37
+        values: [],
38
+        labelName: 'tag',
36 39
       };
37 40
     },
41
+    watch: {
42
+      'label': {
43
+        handler (newVal) {
44
+          if (newVal) {
45
+            this.labelName = newVal
46
+          }
47
+        },
48
+        immediate: true,
49
+      },
50
+      'value': {
51
+        handler (newVal) {
52
+          // 支持 string, [ string ], [ object ] 三种形式
53
+          // 如果是 string 或者 [string] 形式, 则会被转换成 [ { xTagInx, label } ] 格式的数组
54
+          if (this.soureType === 'ObjectArray') {
55
+            this.values = newVal || []
56
+          } else if (this.soureType === 'StringArray') {
57
+            this.values = (newVal || []).map((x, i) => ({ xTagInx: i, [`${this.labelName}`]: x }))
58
+          } else {
59
+            this.values = (newVal || '').split(',').filter(x => x).map((x, i) => ({ xTagInx: i, [`${this.labelName}`]: x }))
60
+          }
61
+        },
62
+        immediate: true,
63
+      },
64
+    },
65
+    created () {
66
+    },
38 67
     methods: {
39 68
       handleClose(item) {
40
-        this.$confirm(`确认删除 ${item[this.label]}?`, '提示', {
69
+        const target = item[this.labelName]
70
+
71
+        this.$confirm(`确认删除 ${target}?`, '提示', {
41 72
           confirmButtonText: '确定',
42 73
           cancelButtonText: '取消',
43 74
           type: 'warning'
44 75
         }).then(() => {
45
-          this.$emit('delete', item)
76
+          if (this.soureType === 'ObjectArray') {
77
+            this.$emit('delete', item)
78
+            this.$emit('input', this.values.filter(x => x[this.labelName] != target))
79
+          } else if (this.soureType === 'StringArray') {
80
+            this.$emit('delete', target)
81
+            this.$emit('input', this.values.filter(x => x[this.labelName] != target).map(x => x[this.labelName]))
82
+          } else {
83
+            this.$emit('delete', target)
84
+            this.$emit('input', this.values.filter(x => x[this.labelName] != target).map(x => x[this.labelName]).join(','))
85
+          }
46 86
         }).catch(() => {})
47 87
       },
48
-
49 88
       showInput() {
50 89
         this.inputVisible = true;
51 90
         this.$nextTick(() => {
@@ -54,9 +93,20 @@
54 93
       },
55 94
 
56 95
       handleInputConfirm() {
57
-        let inputValue = this.inputValue
96
+        const inputValue = this.inputValue
58 97
         if (inputValue) {
59
-          this.$emit('insert', inputValue)
98
+          // 输出结果与输入类型一致
99
+          if (this.soureType === 'ObjectArray') {
100
+            const newVal = { [`${this.labelName}`]: inputValue }
101
+            this.$emit('insert', newVal)
102
+            this.$emit('input', (this.value || []).concat(newVal))
103
+          } else if (this.soureType === 'StringArray') {
104
+            this.$emit('insert', inputValue)
105
+            this.$emit('input', (this.value || []).concat(inputValue))
106
+          } else {
107
+            this.$emit('insert', inputValue)
108
+            this.$emit('input', (this.value || '').split(',').filter(x => x).concat(inputValue).join(','))
109
+          }
60 110
         }
61 111
         this.inputVisible = false
62 112
         this.inputValue = ''

+ 22
- 8
src/components/RichEditor.vue Ver arquivo

@@ -19,14 +19,17 @@ export default {
19 19
     }
20 20
   },
21 21
   watch: {
22
-    value (newVal) {
23
-      const newTxt = this.getHtmlTxt(newVal)
24
-      const oriTxt = this.getHtmlTxt(this.html)
22
+    'value': {
23
+      handler (newVal) {
24
+        const newTxt = this.getHtmlTxt(newVal)
25
+        const oriTxt = this.getHtmlTxt(this.html)
25 26
 
26
-      if (newTxt != oriTxt) {
27
-        this.updateContent(newVal)
28
-        this.initedContent = true
29
-      }
27
+        if (newTxt != oriTxt) {
28
+          this.updateContent(newVal)
29
+          this.initedContent = true
30
+        }
31
+      },
32
+      immediate: true,
30 33
     }
31 34
   },
32 35
   mounted () {
@@ -43,6 +46,12 @@ export default {
43 46
         editor.customConfig = this.setting
44 47
       }
45 48
 
49
+      // 重定义 index
50
+      editor.customConfig.zIndex = 100
51
+
52
+      // 重定义 height
53
+      // 见 style
54
+
46 55
       // 重新定义图片上传
47 56
       editor.customConfig.customUploadImg = this.uploadImg
48 57
 
@@ -54,7 +63,7 @@ export default {
54 63
       editor.create()
55 64
 
56 65
       if (this.html) {
57
-        editor.txt.html(html)
66
+        editor.txt.html(this.html)
58 67
       }
59 68
     },
60 69
     uploadImg (files, insert) {
@@ -75,3 +84,8 @@ export default {
75 84
 }
76 85
 </script>
77 86
 
87
+<style>
88
+.w-e-text-container {
89
+  height: calc(100% - 52px) !important;
90
+}
91
+</style>

+ 14
- 0
src/config/api.js Ver arquivo

@@ -173,6 +173,10 @@ const apis = {
173 173
     recommendCustomerList: {
174 174
       method:'get',
175 175
       url: `${commPrefix}/customer/recommend/:id`
176
+    },
177
+    taPointsRecords: { // 积分列表
178
+      method: `get`,
179
+      url: `${commPrefix}/taPointsRecords/:id`
176 180
     }
177 181
   },
178 182
   goods:{
@@ -273,5 +277,15 @@ const apis = {
273 277
       url: `${commPrefix}/taPointsExchange/change`
274 278
     }
275 279
   },
280
+  carouselFigure:{ // 轮播图列表查询
281
+    list:{
282
+      method:'get',
283
+      url: `${commPrefix}/extendContent`
284
+    },
285
+    handle:{
286
+      method:'get',
287
+      url: `${commPrefix}/extendContent/:id `
288
+    },
289
+  },
276 290
 }
277 291
 export default apis

+ 1
- 0
src/store/index.js Ver arquivo

@@ -18,6 +18,7 @@ const store = new Vuex.Store({
18 18
     goods: require('./modules/goods').default,
19 19
     points: require('./modules/points').default,
20 20
     exchange: require('./modules/exchange').default,
21
+    carouselFigure: require('./modules/carouselFigure').default,
21 22
     news
22 23
 
23 24
   }

+ 73
- 0
src/store/modules/carouselFigure.js Ver arquivo

@@ -0,0 +1,73 @@
1
+import request from '../../utils/request'
2
+import apis from '../../config/api'
3
+
4
+export default {
5
+  namespaced: true,
6
+  state: {
7
+    carouselList: {},
8
+    // detail: {}
9
+  },
10
+  mutations: {
11
+    updateList (state, payload) {
12
+      state.carouselList = payload
13
+    },
14
+    // updateDetail (state, payload) {
15
+    //   state.detail = payload
16
+    // }
17
+  },
18
+  actions: {
19
+    // setDetailNull ({ commit }) {
20
+    //   commit('updateDetail', {})
21
+    // },
22
+    getExtendContent ({ commit }, payload) {
23
+      return new Promise((resolve, reject) => {
24
+        request({
25
+          ...apis.carouselFigure.list,
26
+          params: payload,
27
+        }).then((data) => {
28
+          commit('updateList', data)
29
+          resolve(data)
30
+        }).catch((err) => {
31
+          const message = err.message || err.msg
32
+          if (typeof message === 'string') {
33
+            reject(message)
34
+          }
35
+        })
36
+      })
37
+    },
38
+    handleExtendContent ({ commit }, payload) {
39
+      return new Promise((resolve, reject) => {
40
+        request({
41
+          ...apis.carouselFigure.handle,
42
+          urlData: { id: payload.contentId },
43
+          params: payload,
44
+        }).then((data) => {
45
+          commit('updateList', data)
46
+          resolve(data)
47
+        }).catch((err) => {
48
+          const message = err.message || err.msg
49
+          if (typeof message === 'string') {
50
+            reject(message)
51
+          }
52
+        })
53
+      })
54
+    },
55
+    // getGoodsDetail ({ commit }, payload) {
56
+    //   return new Promise((resolve, reject) => {
57
+    //     request({
58
+    //       ...apis.goods.detail,
59
+    //       urlData: payload,
60
+    //     }).then((data) => {
61
+    //       commit('updateDetail', data)
62
+    //       resolve(data)
63
+    //     }).catch((err) => {
64
+    //       const message = err.message || err.msg
65
+
66
+    //       if (typeof message === 'string') {
67
+    //         reject(message)
68
+    //       }
69
+    //     })
70
+    //   })
71
+    // },
72
+  }
73
+}

+ 13
- 0
src/store/modules/customer.js Ver arquivo

@@ -82,6 +82,19 @@ export default {
82 82
           reject(message)
83 83
         })
84 84
       })
85
+    },
86
+    taPointsRecords({ commit }, payload) { // 积分列表
87
+      return new Promise((resolve, reject) => {
88
+        request({
89
+          ...apis.recommendCustomer.taPointsRecords,
90
+          urlData: { id: payload.customerId},
91
+          params: payload
92
+        }).then((data) => {
93
+          resolve(data)
94
+        }).catch(({ message }) => {
95
+          reject(message)
96
+        })
97
+      })
85 98
     }
86 99
 
87 100
     

+ 81
- 3
src/views/building/edit.vue Ver arquivo

@@ -100,9 +100,6 @@
100 100
             <el-radio :label="0">否</el-radio>
101 101
           </el-radio-group>
102 102
         </el-form-item>
103
-        <el-form-item label="项目备注">
104
-          <rich-editor v-model="building.remark" style="height: 400px" />
105
-        </el-form-item>
106 103
         <el-form-item label="楼盘区域">
107 104
           <el-input v-model="building.buildingArea"></el-input>
108 105
         </el-form-item>
@@ -124,6 +121,73 @@
124 121
             </div>
125 122
           </div>  
126 123
         </el-form-item>
124
+        <el-form-item label="周边交通">
125
+          <editable-tag v-model="building.buildingTransport" />
126
+        </el-form-item>
127
+        <el-form-item label="周边商业">
128
+          <editable-tag v-model="building.buildingMall" />
129
+        </el-form-item>
130
+        <el-form-item label="周边学校">
131
+          <editable-tag v-model="building.buildingEdu" />
132
+        </el-form-item>
133
+        <el-form-item label="周边医院">
134
+          <editable-tag v-model="building.buildingHospital" />
135
+        </el-form-item>
136
+        <el-form-item label="周边银行">
137
+          <editable-tag v-model="building.buildingBank" />
138
+        </el-form-item>
139
+        <el-form-item label="周边餐饮">
140
+          <editable-tag v-model="building.buildingRestaurant" />
141
+        </el-form-item>
142
+        <el-form-item label="项目类型">
143
+        </el-form-item>
144
+        <el-form-item label="绿化率">
145
+          <el-input v-model="building.greeningRate"></el-input>
146
+        </el-form-item>
147
+        <el-form-item label="容积率">
148
+          <el-input v-model="building.volumeRate"></el-input>
149
+        </el-form-item>
150
+        <el-form-item label="车位比">
151
+          <el-input v-model="building.parkingRate"></el-input>
152
+        </el-form-item>
153
+        <el-form-item label="规划户数">
154
+          <el-input-number v-model="building.familyNum"></el-input-number>
155
+        </el-form-item>
156
+        <el-form-item label="物业公司">
157
+          <el-input v-model="building.serviceCompany"></el-input>
158
+        </el-form-item>
159
+        <el-form-item label="物业费">
160
+          <el-input v-model="building.serviceFee"></el-input>
161
+        </el-form-item>
162
+        <el-form-item label="装修标准">
163
+          <el-input v-model="building.decoration"></el-input>
164
+        </el-form-item>
165
+        <el-form-item label="交房时间">
166
+          <el-date-picker
167
+            v-model="building.receivedDate"
168
+            type="date"
169
+            placeholder="选择日期">
170
+          </el-date-picker>
171
+        </el-form-item>
172
+        <el-form-item label="产权年限">
173
+          <el-input-number v-model="building.rightsYear"></el-input-number>
174
+        </el-form-item>
175
+        <el-form-item label="预售许可证">
176
+          <el-upload
177
+            class="avatar-uploader"
178
+            :action="upFileUrl"
179
+            :headers="uploadHeaders"
180
+            name='file'
181
+            :show-file-list="false"
182
+            :before-upload="beforeImgUpload"
183
+            :on-success="handlePreSalePermitSuccess">
184
+            <img v-if="building.preSalePermit" :src="building.preSalePermit" class="avatar">
185
+            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
186
+          </el-upload>
187
+        </el-form-item>
188
+        <el-form-item label="项目备注">
189
+          <rich-editor v-model="building.remark" style="height: 400px" />
190
+        </el-form-item>
127 191
         <el-form-item>
128 192
           <el-button type="primary" @click="onSubmit">保存</el-button>
129 193
           <el-button @click="onCancel">取消</el-button>
@@ -221,6 +285,12 @@
221 285
           <el-form-item label="套内面积">
222 286
             <el-input v-model="aparmentInfo.insideArea"></el-input>
223 287
           </el-form-item>
288
+          <el-form-item label="户型总价">
289
+            <el-input v-model="aparmentInfo.apartmentPrice"></el-input>
290
+          </el-form-item>
291
+          <el-form-item label="户型简介">
292
+            <rich-editor v-model="aparmentInfo.apartmentDescription" style="height: 200px"></rich-editor>
293
+          </el-form-item>
224 294
           <el-form-item label="备注">
225 295
             <el-input type="textarea" v-model="aparmentInfo.remark"></el-input>
226 296
           </el-form-item>
@@ -243,6 +313,10 @@ const { mapState: mapBuildingState, mapActions: mapBuildingActions, mapMutations
243 313
 const { mapActions: mapApartmentActions } = createNamespacedHelpers('apartment')
244 314
 
245 315
 export default {
316
+  name: 'BuildingEdit',
317
+  components: {
318
+    EditableTag: () => import('@/components/EditableTag.vue'),
319
+  },
246 320
   data () {
247 321
     var _self = this
248 322
     return {
@@ -391,6 +465,10 @@ export default {
391 465
       this.building = {...this.building, poster: res.data }
392 466
       this.loading.close()
393 467
     },
468
+    handlePreSalePermitSuccess(res) {
469
+      this.building = {...this.building, preSalePermit: res.data }
470
+      this.loading.close()
471
+    },
394 472
     handleAparmentSuccess (res) {
395 473
       this.aparmentImg = [...this.aparmentImg, {
396 474
         url: res.data

+ 90
- 99
src/views/carouselFigure/list.vue Ver arquivo

@@ -8,9 +8,7 @@
8 8
       </div>
9 9
       <div class="moreFilter"></div>
10 10
     </div>
11
-    <el-table
12
-      :data="dynamics.list || []"
13
-      >
11
+    <el-table :data="carouselList.records || []">
14 12
       <el-table-column
15 13
         type="index">
16 14
         <template slot-scope="scope">
@@ -21,21 +19,24 @@
21 19
         label="主图">
22 20
         <template slot-scope="scope">
23 21
           <div class="header">
24
-            <img :src="scope.row.imgUrl" alt="" />
22
+            <img :src="scope.row.image" alt="" />
25 23
           </div>
26 24
         </template>
27 25
       </el-table-column>
28 26
       <el-table-column
29
-        prop="title"
27
+        prop="showType"
30 28
         label="类型">
31 29
       </el-table-column>
32 30
       <el-table-column
33
-        prop="desc"
31
+        prop="showPosition"
34 32
         label="发布位置">
35 33
       </el-table-column>
36 34
       <el-table-column
37
-        prop="createDate"
38
-        label="发布时间">
35
+        label="发布时间"
36
+        width="180">
37
+        <template slot-scope="scope">
38
+          <span>{{FormatDate(scope.row.createDate)}}</span>
39
+        </template>
39 40
       </el-table-column>
40 41
       <el-table-column
41 42
         label="状态"
@@ -51,8 +52,7 @@
51 52
         <template slot-scope="scope">
52 53
           <el-button type="text" @click="handleEdit(scope.row)" v-if="scope.row.status === 0" size="small">编辑</el-button>
53 54
           <el-button type="text" @click="handlePulic(scope.row)" size="small" v-if="scope.row.status === 0">启用</el-button>
54
-          <el-button type="text" @click="handleUnPulic(scope.row)" size="small" v-if="scope.row.status === 1">禁用</el-button>
55
-
55
+          <el-button type="text" @click="Prohibit(scope.row)" size="small" v-if="scope.row.status === 1">禁用</el-button>
56 56
         </template>
57 57
       </el-table-column>
58 58
     </el-table>
@@ -62,7 +62,7 @@
62 62
       layout="prev, pager, next"
63 63
       :current-page.sync="currentPage"
64 64
       :pageSize="pageSize"
65
-      :total="dynamics.total || 0"
65
+      :total="carouselList.total || 0"
66 66
       @current-change="getList"
67 67
     >
68 68
     </el-pagination>
@@ -70,151 +70,142 @@
70 70
 </template>
71 71
 
72 72
 <script>
73
-import { createNamespacedHelpers } from 'vuex';
73
+import { createNamespacedHelpers } from "vuex";
74
+import dayjs from 'dayjs'
74 75
 
75
-const {mapState: mapDynamicState, mapActions: mapDynamicActions} = createNamespacedHelpers('dynamic')
76
-const {mapState: mapBuildingState, mapActions: mapBuildingActions} = createNamespacedHelpers('building')
76
+const {
77
+  mapState: mapCarouselFigureState,
78
+  mapActions: mapCarouselFigureActions
79
+} = createNamespacedHelpers("carouselFigure");
80
+
81
+const {
82
+  mapState: mapBuildingState,
83
+  mapActions: mapBuildingActions
84
+} = createNamespacedHelpers("building");
77 85
 
78 86
 export default {
79 87
   data() {
80 88
     return {
81 89
       pageSize: 20,
82 90
       currentPage: 1,
83
-      name: '',
84
-      buildingId: '',
85
-    }
91
+      name: "",
92
+      buildingId: ""
93
+    };
86 94
   },
87 95
   computed: {
88
-    ...mapDynamicState({
89
-      dynamics: x => x.dynamics
96
+    ...mapCarouselFigureState({
97
+      carouselList: x => x.carouselList
90 98
     }),
91 99
     ...mapBuildingState({
92 100
       buildings: x => x.buildings
93 101
     })
94 102
   },
95 103
   methods: {
96
-    ...mapDynamicActions([
97
-      'getDynamics',
98
-      'setDetailNull',
99
-      'deleteDynamics',
100
-      'publicDynamic',
101
-      'cancelDynamic'
102
-    ]),
103
-    ...mapBuildingActions([
104
-      'getBuildings',
105
-    ]),
106
-    GetIndex (inx) {
107
-      return (this.currentPage - 1) * this.pageSize + inx + 1
104
+    ...mapCarouselFigureActions(["getExtendContent","handleExtendContent"]),
105
+    ...mapBuildingActions(["getBuildings"]),
106
+    GetIndex(inx) {
107
+      return (this.currentPage - 1) * this.pageSize + inx + 1;
108 108
     },
109
-    FormatDate (date) {
110
-      if (date) {
111
-        return dayjs(date).formate('yyyy-MM-DD HH:mm:ss')
112
-      } else {
113
-        return ''
114
-      }
109
+    FormatDate(date) {
110
+      if (!date || date.indexOf('0001-') > -1) return ''
111
+
112
+      return dayjs(date).format('YYYY-MM-DD HH:mm:ss')
115 113
     },
116
-    getList () {
117
-      this.getDynamics({
114
+
115
+    getList() {
116
+      this.getExtendContent({
118 117
         pageNum: this.currentPage,
119
-        pageSize: this.pageSize,
120
-        name: this.name,
121
-        buildingId: this.buildingId
122
-      })
118
+        pageSize: this.pageSize
119
+      });
123 120
     },
124
-    getBuildingName (id) {
125
-      return ((this.buildings.list || []).filter(x => x.buildingId === id)[0] || {}).buildingName || ''
121
+    getBuildingName(id) {
122
+      return (
123
+        ((this.buildings.list || []).filter(x => x.buildingId === id)[0] || {})
124
+          .buildingName || ""
125
+      );
126 126
     },
127
-    search () {
128
-      this.currentPage = 1
129
-      this.getList()
127
+    search() {
128
+      this.currentPage = 1;
129
+      this.getList();
130 130
     },
131
-    handleEdit (row) {
132
-      this.setDetailNull()
133
-      this.$router.push({name: 'editCarousel', query: {id: row.dynamicId}})
131
+    handleEdit(row) {
132
+      this.$router.push({ name: "editCarousel", query: { id: row.dynamicId } });
134 133
     },
135
-    handlePulic (row) {
136
-      this.$confirm('确认发布此数据?', '提示', {
137
-        confirmButtonText: '确定',
138
-        cancelButtonText: '取消',
139
-        type: 'warning'
140
-      }).then(() => {
141
-        this.publicDynamic({
142
-          id: row.dynamicId
143
-        }).then(() => {
144
-          this.getList()
145
-        })
146
-      })
134
+    handlePulic(row) {
135
+      this.$confirm("确认发布此数据?", "提示", {
136
+        confirmButtonText: "确定",
137
+        cancelButtonText: "取消",
138
+        type: "warning"
139
+      }).then(() => {});
147 140
     },
148
-    handleUnPulic (row) {
149
-      this.$confirm('确认取消发布此数据?', '提示', {
150
-        confirmButtonText: '确定',
151
-        cancelButtonText: '取消',
152
-        type: 'warning'
141
+    Prohibit(row) {
142
+      this.$confirm("确认停用此轮播图?", "提示", {
143
+        confirmButtonText: "确定",
144
+        cancelButtonText: "取消",
145
+        type: "warning"
153 146
       }).then(() => {
154
-        this.cancelDynamic({
155
-          id: row.dynamicId}).then(() => {
156
-          this.getList()
147
+        this.handleExtendContent(row.contentId)
148
+        .then(res => {
149
+          
150
+        
157 151
         })
158
-      })
152
+        .catch(err => {
153
+         
154
+        });
155
+      });
159 156
     },
160
-    handleDel (row) {
161
-      this.$confirm('确认删除此数据?', '提示', {
162
-        confirmButtonText: '确定',
163
-        cancelButtonText: '取消',
164
-        type: 'warning'
157
+    handleDel(row) {
158
+      this.$confirm("确认删除此数据?", "提示", {
159
+        confirmButtonText: "确定",
160
+        cancelButtonText: "取消",
161
+        type: "warning"
165 162
       }).then(() => {
166 163
         if (row.status === 1) {
167
-          this.$message.error('当前活动处于发布状态,不允许删除!')
168
-          return false
164
+          this.$message.error("当前活动处于发布状态,不允许删除!");
165
+          return false;
169 166
         }
170
-        this.deleteDynamics({
171
-          id: row.dynamicId
172
-        }).then(() => {
173
-          this.getList()
174
-        })
175
-      })
167
+      });
176 168
     },
177
-    addDynamic () {
178
-      this.setDetailNull()
179
-      this.$router.push({name: 'editCarousel'})
169
+    addDynamic() {
170
+      this.$router.push({ name: "editCarousel" });
180 171
     }
181 172
   },
182
-  created () {
173
+  created() {
183 174
     this.getBuildings({
184 175
       pageNum: 1,
185
-      pageSize: 100,
176
+      pageSize: 100
186 177
     }).then(() => {
187
-      this.getList()
188
-    })
178
+      this.getList();
179
+    });
189 180
   }
190
-}
181
+};
191 182
 </script>
192 183
 
193 184
 <style lang="scss" scoped>
194
-.header{
185
+.header {
195 186
   width: 50px;
196 187
   height: 50px;
197
-  img{
188
+  img {
198 189
     width: 100%;
199 190
     height: 100%;
200 191
   }
201 192
 }
202 193
 
203
-.system-table-search{
194
+.system-table-search {
204 195
   width: calc(100% - 40px);
205 196
   margin: 20px auto 0;
206 197
 }
207 198
 
208
-.system-table-search li{
199
+.system-table-search li {
209 200
   margin-right: 20px;
210 201
 }
211 202
 
212
-.system-table-search ul{
203
+.system-table-search ul {
213 204
   font-size: 0;
214 205
   white-space: nowrap;
215 206
 }
216 207
 
217
-.system-table-search ul>li{
208
+.system-table-search ul > li {
218 209
   display: inline-block;
219 210
 }
220 211
 

+ 1
- 1
src/views/consultant/list.vue Ver arquivo

@@ -108,7 +108,7 @@ export default {
108 108
         });
109 109
     },
110 110
     addDynamic() {
111
-      this.$router.push({ name: "consultant.list" });
111
+      this.$router.push({ name: "consultant.edit" });
112 112
     },
113 113
     toDetail(row) {
114 114
       this.$router.push({

+ 236
- 176
src/views/customer/editCustomer.vue Ver arquivo

@@ -3,63 +3,67 @@
3 3
     <div class="form-wrapper">
4 4
       <el-form label-width="200px" :model="detail">
5 5
         <el-form-item label="意向项目:">
6
-          <el-input v-model="detail.name"></el-input>
6
+          <el-input v-model="detail.intention"></el-input>
7 7
         </el-form-item>
8 8
         <el-form-item label="客户照片:">
9
-        <el-upload
10
-            :action="upFileUrl"
11
-            name='file'
12
-            list-type="picture-card"
13
-            :headers="uploadHeaders"
14
-            :file-list="imgList"
15
-            :show-file-list="true"
16
-            :before-upload="beforeImgUpload"
17
-            :on-success="handleAvatarSuccess"
18
-            :on-remove="handleRemove">
19
-            <i class="el-icon-plus"></i>
9
+          <el-upload
10
+                  :headers="uploadHeaders"
11
+                  :action="upFileUrl"
12
+                  :show-file-list="false"
13
+                  :on-success="handleAvatarSuccess">
14
+            <img v-if="imageUrl" :src="imageUrl" class="avatar">
15
+            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
20 16
           </el-upload>
21
-          <el-dialog :visible.sync="dialogVisible">
22
-            <img width="100%" :src="dialogImageUrl" alt="">
23
-          </el-dialog>
24
-      </el-form-item>
17
+        </el-form-item>
25 18
         <el-form-item label="客户姓名:">
26
-          <el-input v-model="detail.company"></el-input>
19
+          <el-input v-model="detail.name"></el-input>
27 20
         </el-form-item>
28 21
         <el-form-item label="客户电话:">
29
-          <el-input v-model="detail.department"></el-input>
22
+          <el-input v-model="detail.phone"></el-input>
30 23
         </el-form-item>
31 24
         <el-form-item label="客户性别:">
32
-          <el-radio-group v-model="detail.isMain">
25
+          <el-radio-group v-model="detail.sex">
33 26
             <el-radio :label="1">男</el-radio>
34 27
             <el-radio :label="0">女</el-radio>
35 28
           </el-radio-group>
36 29
         </el-form-item>
37 30
         <el-form-item label="预约到访时间:">
38
-          <el-input v-model="detail.department"></el-input>
31
+          <el-date-picker
32
+                  v-model="detail.appointmentTime"
33
+                  type="datetime"
34
+                  placeholder="选择日期时间">
35
+          </el-date-picker>
39 36
         </el-form-item>
40 37
         <el-form-item label="到访人数:">
41
-          <el-input v-model="detail.department"></el-input>
42
-        </el-form-item>
43
-        <el-form-item label="客户描述:">
44
-            <el-input type="textarea" :rows="5"  v-model="detail.introduction"></el-input>
38
+          <el-input v-model="detail.visiteNum"></el-input>
45 39
         </el-form-item>
46 40
         <el-form-item label="物业类型:">
47
-          <el-input v-model="detail.department"></el-input>
41
+          <el-input v-model="detail.realtyManageType"></el-input>
48 42
         </el-form-item>
49 43
         <el-form-item label="需求类型:">
50
-          <el-input v-model="detail.department"></el-input>
44
+          <el-input v-model="detail.demandType"></el-input>
51 45
         </el-form-item>
52 46
         <el-form-item label="价格区间:">
53
-          <el-input v-model="detail.department"></el-input>
47
+          <el-input v-model="detail.priceRange"></el-input>
48
+        </el-form-item>
49
+        <el-form-item label="报备日期:">
50
+          <el-date-picker
51
+                  v-model="detail.reportDate"
52
+                  type="datetime"
53
+                  placeholder="选择日期时间">
54
+          </el-date-picker>
54 55
         </el-form-item>
55 56
         <el-form-item label="状态:">
56
-          <el-select v-model="detail.buildings" placeholder="请选择">
57
-            <el-option v-for="(build,i) in buildings.list || []" :key="i" :label="build.buildingName" :value="build.buildingId"></el-option>
57
+          <el-select v-model="detail.status" placeholder="请选择">
58
+            <el-option v-for="(item,i) in gridData || []" :key="i" :label="item.name" :value="item.value"></el-option>
58 59
           </el-select>
59 60
         </el-form-item>
61
+        <el-form-item label="客户描述:">
62
+          <el-input type="textarea" :rows="5"  v-model="detail.describe"></el-input>
63
+        </el-form-item>
60 64
         <el-form-item>
61 65
           <el-button type="primary" @click="submitForm">保存</el-button>
62
-          <el-button @click="$router.go(-1)">返回</el-button>
66
+          <el-button @click="$router.go(-1)">回</el-button>
63 67
         </el-form-item>
64 68
       </el-form>
65 69
     </div>
@@ -67,169 +71,225 @@
67 71
 </template>
68 72
 
69 73
 <script>
70
-import { createNamespacedHelpers } from "vuex";
71
-import apis from "../../config/api";
72
-import E from "wangeditor";
74
+  import { createNamespacedHelpers } from "vuex";
75
+  import apis from "../../config/api";
76
+  import E from "wangeditor";
73 77
 
74
-const { mapActions: mapPersonActions } = createNamespacedHelpers("persons");
75
-const {
76
-  mapState: mapBuildingState,
77
-  mapActions: mapBuildingActions
78
-} = createNamespacedHelpers("building");
79
-export default {
80
-  name: "consultantEdit",
81
-  data() {
82
-    return {
83
-      upFileUrl: apis.file.upload.url,
84
-      detail: {
85
-        name: undefined,
86
-        company: undefined,
87
-        department: undefined,
88
-        post: undefined,
89
-        tel: undefined,
90
-        photo: undefined,
91
-        status: 1,
92
-        buildings: []
93
-      },
94
-      imgList: [],
95
-      dialogVisible: false,
96
-      dialogImageUrl: "",
97
-      
98
-    };
99
-  },
100
-  created() {
101
-    this.init();
102
-  },
103
-  computed: {
104
-    ...mapBuildingState({
105
-      buildings: x => x.buildings
106
-    }),
107
-    uploadHeaders() {
108
-      const token = localStorage.getItem("x-token") || "";
78
+  const { mapActions: mapPersonActions } = createNamespacedHelpers("persons");
79
+  const {
80
+    mapState: mapBuildingState,
81
+    mapActions: mapBuildingActions
82
+  } = createNamespacedHelpers("building");
83
+  export default {
84
+    name: "consultantEdit",
85
+    data() {
109 86
       return {
110
-        Authorization: `Bearer ${token}`
87
+        upFileUrl: apis.file.upload.url,
88
+        detail: {
89
+          customerId: '',
90
+          consultantName: '',
91
+          name: undefined,
92
+          company: undefined,
93
+          department: undefined,
94
+          post: undefined,
95
+          tel: undefined,
96
+          photo: undefined,
97
+          status: '1',
98
+          buildings: [],
99
+        },
100
+        dialogForm: {
101
+          pageNumber: 1,
102
+          pageSize: 100
103
+        },
104
+        dialogTotal: 0,
105
+        consultantList: [],
106
+        imageUrl: '',
107
+        dialogVisible: false,
108
+        dialogImageUrl: "",
109
+        dialogTableVisible: false, //选择置业顾问弹框
110
+        consultant:"",
111
+        gridData: [
112
+          {
113
+            name: "报备",
114
+            value: '1'
115
+          },
116
+          {
117
+            name: "到访",
118
+            value: '2'
119
+          },
120
+          {
121
+            name: "认购",
122
+            value: '3'
123
+          },
124
+          {
125
+            name: "签约",
126
+            value: '4'
127
+          }
128
+        ]
111 129
       };
112
-    }
113
-  },
114
-  methods: {
115
-    ...mapBuildingActions(["getBuildings"]),
116
-    ...mapPersonActions(["getConsultant", "editConsultant"]),
117
-
118
-    init() {
119
-      if (this.$route.params.id) {
120
-        this.getConsultant({ id: this.$route.params.id }).then(data => {
121
-          this.detail = data;
122
-        });
123
-      }
124
-    },
125
-
126
-    beforeImgUpload(file) {
127
-      if (file.type !== "image/jpeg" && file.type !== "image/png") {
128
-        this.$message.error("上传图片只能是 JPG 或 PNG 格式!");
129
-        return false;
130
-      }
131
-      // if (file.size / 1024 > 300) {
132
-      //   this.$message.error('图片大小不允许超过300k!')
133
-      //   return false
134
-      // }
135
-      this.loading = this.$loading({
136
-        lock: true,
137
-        text: "上传中...",
138
-        spinner: "el-icon-loading",
139
-        background: "rgba(0, 0, 0, 0.7)"
140
-      });
141
-
142
-      return true;
143 130
     },
144
-    handleAvatarSuccess(res) {
145
-      this.imgList = [
146
-        ...this.imgList,
147
-        {
148
-          url: res.data
149
-        }
150
-      ];
151
-      this.hideLoadding();
131
+    created() {
132
+      this.init();
133
+      this.getConsultantsList()
152 134
     },
153
-    handleRemove(file, fileList) {
154
-      this.imgList = fileList;
135
+    computed: {
136
+      ...mapBuildingState({
137
+        buildings: x => x.buildings
138
+      }),
139
+      uploadHeaders() {
140
+        const token = localStorage.getItem("x-token") || "";
141
+        return {
142
+          Authorization: `Bearer ${token}`
143
+        };
144
+      }
155 145
     },
156
-    submitForm() {
157
-      this.showLoadding("保存中...");
158
-      this.editConsultant(this.detail)
159
-        .then(res => {
160
-          if (res.personId) {
161
-            this.detail = res;
162
-          }
146
+    methods: {
147
+      ...mapBuildingActions(["getBuildings"]),
148
+      ...mapPersonActions(["getConsultant", "editConsultant"]),
163 149
 
164
-          this.hideLoadding();
165
-          this.$notify.info("保存成功");
150
+      init() {
151
+        this.detail.customerId = this.$route.query.id
152
+        if (this.detail.customerId !== undefined) {
153
+          this.$store.dispatch('customer/getRecommendCustomersGetById',this.detail).then(data => {
154
+            this.detail = data;
155
+            this.dialogImageUrl = data.picture
156
+            this.imageUrl = data.picture
157
+          });
158
+        }
159
+      },
160
+      handleDel(row) {
161
+        this.$confirm("确定选择此置业顾问?", "提示", {
162
+          confirmButtonText: "确定",
163
+          cancelButtonText: "取消",
164
+          type: "warning"
166 165
         })
167
-        .catch(err => {
168
-          this.hideLoadding();
169
-          this.$notify.error(err.message);
166
+                .then(() => {
167
+                  this.$message({
168
+                    type: "success",
169
+                    message: "选择成功!"
170
+                  });
171
+                  this.detail.realtyConsultant = row.personId
172
+                  this.detail.consultantName = row.name
173
+                  this.dialogTableVisible = false;
174
+                })
175
+                .catch(() => {
176
+                  this.$message({
177
+                    type: "info",
178
+                    message: "已取消选择"
179
+                  });
180
+                });
181
+      },
182
+      beforeImgUpload(file) {
183
+        if (file.type !== "image/jpeg" && file.type !== "image/png") {
184
+          this.$message.error("上传图片只能是 JPG 或 PNG 格式!");
185
+          return false;
186
+        }
187
+        // if (file.size / 1024 > 300) {
188
+        //   this.$message.error('图片大小不允许超过300k!')
189
+        //   return false
190
+        // }
191
+        this.loading = this.$loading({
192
+          lock: true,
193
+          text: "上传中...",
194
+          spinner: "el-icon-loading",
195
+          background: "rgba(0, 0, 0, 0.7)"
170 196
         });
171
-    },
172 197
 
173
-    showLoadding(text) {
174
-      this.loading = this.$loading({
175
-        text,
176
-        lock: true,
177
-        spinner: "el-icon-loading",
178
-        background: "rgba(255, 255, 255, 0.7)"
179
-      });
180
-    },
198
+        return true;
199
+      },
200
+      handleAvatarSuccess(res) {
201
+        this.imageUrl = res.data
202
+        this.detail.picture = res.data
203
+        this.hideLoadding();
204
+      },
205
+      handleRemove(file, fileList) {
206
+        this.imgList = fileList;
207
+      },
208
+      submitForm() {
209
+        this.showLoadding("保存中...");
210
+        this.$store.dispatch('customer/getRecommendCustomersUpdate',this.detail)
211
+                .then(res => {
212
+                  if (res.personId) {
213
+                    this.detail = res;
214
+                  }
181 215
 
182
-    hideLoadding() {
183
-      if (this.loading) this.loading.close();
184
-    }
185
-  },
186
-  mounted() {
187
-    const _that = this;
216
+                  this.hideLoadding();
217
+                  this.$notify.success("保存成功");
218
+                  this.$router.go(-1)
219
+                })
220
+                .catch(err => {
221
+                  this.hideLoadding();
222
+                  this.$notify.error(err.message);
223
+                });
224
+      },
188 225
 
189
-    this.getBuildings({
190
-      pageNum: 1,
191
-      pageSize: 100
192
-    }).then(() => {
193
-      if ((this.$route.query.id || "") !== "") {
194
-        this.getDetail({ id: this.$route.query.id }).then(data => {});
226
+      showLoadding(text) {
227
+        this.loading = this.$loading({
228
+          text,
229
+          lock: true,
230
+          spinner: "el-icon-loading",
231
+          background: "rgba(255, 255, 255, 0.7)"
232
+        });
233
+      },
234
+
235
+      hideLoadding() {
236
+        if (this.loading) this.loading.close();
237
+      },
238
+      getConsultantsList() {
239
+        this.$store.dispatch('persons/getConsultants', this.dialogForm).then((res) => {
240
+          this.consultantList = res.records
241
+          this.dialogForm.pageNumber = res.current
242
+          this.dialogForm.pageSize = res.size
243
+          this.dialogTotal = res.total
244
+        }).catch(()=> {
245
+          console.log('persons/getConsultants err')
246
+        })
247
+      },
248
+      dialogHandleSizeChange(value) {
249
+        this.dialogForm.pageSize = value
250
+        this.getConsultantsList()
251
+      },
252
+      dialogHandleCurrentChange(value) {
253
+        this.dialogForm.pageNumber = 1
254
+        this.dialogForm.pageSize = value
255
+        this.getConsultantsList()
195 256
       }
196
-    });
197
-  }
198
-};
257
+    },
258
+  };
199 259
 </script>
200 260
 
201 261
 <style lang="scss" scoped>
202
-.form-wrapper {
203
-  width: 60%;
204
-}
262
+  .form-wrapper {
263
+    width: 60%;
264
+  }
205 265
 </style>
206 266
 
207 267
 <style lang="scss">
208
-.avatar-uploader .el-upload {
209
-  border: 1px dashed #d9d9d9;
210
-  border-radius: 6px;
211
-  cursor: pointer;
212
-  position: relative;
213
-  overflow: hidden;
214
-}
215
-.avatar-uploader .el-upload:hover {
216
-  border-color: #409eff;
217
-}
218
-.avatar-uploader-icon {
219
-  font-size: 28px;
220
-  color: #8c939d;
221
-  width: 178px;
222
-  height: 178px;
223
-  line-height: 178px;
224
-  text-align: center;
225
-}
226
-.avatar {
227
-  width: 178px;
228
-  height: 178px;
229
-  display: block;
230
-}
231
-.choose {
232
-  color: blue;
233
-  margin-left: 15px;
234
-}
268
+  .avatar-uploader .el-upload {
269
+    border: 1px dashed #d9d9d9;
270
+    border-radius: 6px;
271
+    cursor: pointer;
272
+    position: relative;
273
+    overflow: hidden;
274
+  }
275
+  .avatar-uploader .el-upload:hover {
276
+    border-color: #409eff;
277
+  }
278
+  .avatar-uploader-icon {
279
+    font-size: 28px;
280
+    color: #8c939d;
281
+    width: 178px;
282
+    height: 178px;
283
+    line-height: 178px;
284
+    text-align: center;
285
+  }
286
+  .avatar {
287
+    width: 178px;
288
+    height: 178px;
289
+    display: block;
290
+  }
291
+  .choose {
292
+    color: blue;
293
+    margin-left: 15px;
294
+  }
235 295
 </style>

+ 8
- 12
src/views/customer/editRecommend.vue Ver arquivo

@@ -57,7 +57,7 @@
57 57
           </el-date-picker>
58 58
         </el-form-item>
59 59
         <el-form-item label="状态:">
60
-          <el-select v-model="detail.status" placeholder="请选择">
60
+          <el-select v-model="detail.verifyStatus" placeholder="请选择">
61 61
             <el-option v-for="(item,i) in gridData || []" :key="i" :label="item.name" :value="item.value"></el-option>
62 62
           </el-select>
63 63
         </el-form-item>
@@ -118,7 +118,7 @@ export default {
118 118
         post: undefined,
119 119
         tel: undefined,
120 120
         photo: undefined,
121
-        status: '1',
121
+        verifyStatus: '0',
122 122
         buildings: [],
123 123
         realtyConsultant: ''
124 124
       },
@@ -135,20 +135,16 @@ export default {
135 135
       consultant:"",
136 136
       gridData: [
137 137
         {
138
-          name: "报备",
139
-          value: '1'
140
-        },
141
-        {
142
-          name: "到访",
143
-          value: '2'
138
+          name: "未通过",
139
+          value: '0'
144 140
         },
145 141
         {
146
-          name: "认购",
147
-          value: '3'
142
+          name: "已通过",
143
+          value: '1'
148 144
         },
149 145
         {
150
-          name: "签约",
151
-          value: '4'
146
+          name: "已驳回",
147
+          value: '2'
152 148
         }
153 149
       ]
154 150
     };

+ 63
- 28
src/views/customer/integralRecord.vue Ver arquivo

@@ -1,35 +1,41 @@
1 1
 <template>
2 2
   <div>
3
-    <h5>当前可用积分:200</h5>
3
+    <h5>当前可用积分:{{ totalPoints || 0 }}</h5>
4 4
     <el-table
5
-      :data="dynamics.list || []"
5
+       border
6
+      :data="list || []"
6 7
       >
7 8
       <el-table-column
9
+        label="序号"
10
+        width="50"
8 11
         type="index">
9
-        <template slot-scope="scope">
10
-          <span>{{ GetIndex(scope.$index) }}</span>
11
-        </template>
12 12
       </el-table-column>
13 13
       <el-table-column
14
-        prop="title"
14
+        prop="changeType"
15 15
         label="积分类型">
16
+        <template slot-scope="scope">{{ showChangeType(scope.row.changeType) }}</template>
16 17
       </el-table-column>
17 18
       <el-table-column
18
-        prop="title"
19
+        prop="pointsAmount"
19 20
         label="积分变化">
21
+        <template slot-scope="scope">
22
+          <span v-if="subPoints(scope.row.pointsAmount)" style="color: red;">{{ scope.row.pointsAmount }}</span>
23
+          <span v-else>{{ scope.row.pointsAmount }}</span>
24
+        </template>
20 25
       </el-table-column>
21 26
       <el-table-column
22 27
         prop="createDate"
23 28
         label="发生时间">
29
+        <template slot-scope="scope">{{ formateDate(scope.row.createDate) }}</template>
24 30
       </el-table-column>
25 31
     </el-table>
26 32
     <el-pagination
27 33
       small
28 34
       style="margin-top:10px;"
29 35
       layout="prev, pager, next"
30
-      :current-page.sync="currentPage"
31
-      :pageSize="pageSize"
32
-      :total="dynamics.total || 0"
36
+      :current-page.sync="form.pageNum"
37
+      :pageSize="form.pageSize"
38
+      :total="total || 0"
33 39
       @current-change="getList"
34 40
     >
35 41
     </el-pagination>
@@ -38,7 +44,7 @@
38 44
 
39 45
 <script>
40 46
 import { createNamespacedHelpers } from "vuex";
41
-
47
+import dayjs from 'dayjs'
42 48
 const {
43 49
   mapState: mapDynamicState,
44 50
   mapActions: mapDynamicActions
@@ -51,10 +57,14 @@ const {
51 57
 export default {
52 58
   data() {
53 59
     return {
54
-      pageSize: 20,
55
-      currentPage: 1,
56
-      name: "",
57
-      buildingId: "",
60
+      form: {
61
+        customerId: '',
62
+        pageSize: 20,
63
+        pageNum: 1,
64
+      },
65
+      totalPoints: '', // 当前可用积分
66
+      total: '',
67
+      list: []
58 68
     };
59 69
   },
60 70
   computed: {
@@ -85,12 +95,17 @@ export default {
85 95
       }
86 96
     },
87 97
     getList() {
88
-      this.getDynamics({
89
-        pageNum: this.currentPage,
90
-        pageSize: this.pageSize,
91
-        name: this.name,
92
-        buildingId: this.buildingId
93
-      });
98
+      this.$store.dispatch('customer/taPointsRecords', this.form).then((res) => {
99
+        console.log('customer/taPointsRecords: ', res)
100
+        this.total = res.result.total
101
+        this.form.pageNum = res.result.current
102
+        this.form.pageSize = res.result.size
103
+        this.list = res.result.records
104
+        this.totalPoints = res.totalPoints
105
+
106
+      }).catch(() => {
107
+        console.log('customer/taPointsRecords err')
108
+      })
94 109
     },
95 110
     getBuildingName(id) {
96 111
       return (
@@ -98,15 +113,35 @@ export default {
98 113
           .buildingName || ""
99 114
       );
100 115
     },
101
-  
116
+    formateDate(dt) {
117
+      return !dt ? '' : dayjs(dt).format('YYYY-MM-DD HH:mm')
118
+    },
119
+    showChangeType(str) { // 积分类型
120
+      switch (str) {
121
+        case 'goods':
122
+          return '兑换商品'
123
+        case 'checkin':
124
+          return '签到'
125
+        case 'share':
126
+          return '分享'
127
+        case 'authorize':
128
+          return '授权'
129
+        default:
130
+          return '未知类型'
131
+      }
132
+    },
133
+    subPoints(points) { // 判断是否是 - 开头
134
+      let subStr = points.toString().substring(0, 1)
135
+      if (subStr === '-') {
136
+        return true
137
+      }
138
+
139
+      return false
140
+    }
102 141
   },
103 142
   created() {
104
-    this.getBuildings({
105
-      pageNum: 1,
106
-      pageSize: 100
107
-    }).then(() => {
108
-      this.getList();
109
-    });
143
+    this.form.customerId = this.$route.query.id
144
+    this.getList()
110 145
   }
111 146
 };
112 147
 </script>

+ 341
- 244
src/views/customer/list.vue Ver arquivo

@@ -5,314 +5,411 @@
5 5
         <ul>
6 6
           <li>
7 7
             <span>姓名</span>
8
-            <el-input v-model="name" ></el-input>
8
+            <el-input v-model="form.name" ></el-input>
9 9
           </li>
10 10
           <li>
11 11
             <span>电话</span>
12
-            <el-input v-model="name" ></el-input>
12
+            <el-input v-model="form.tel" ></el-input>
13 13
           </li>
14 14
           <li>
15
-            <span>置业顾问</span>
16
-            <el-input v-model="name" ></el-input>
15
+            <span>推荐人</span>
16
+            <el-input v-model="form.consultName" ></el-input>
17 17
           </li>
18 18
           <li>
19
-            <span>置业顾问电话</span>
20
-            <el-input v-model="name" ></el-input>
19
+            <span>推荐人电话</span>
20
+            <el-input v-model="form.consultTel" ></el-input>
21 21
           </li>
22
+          <!--          <li>-->
23
+          <!--            <span>状态</span>-->
24
+          <!--            <el-select v-model="form.status" placeholder="请选择">-->
25
+          <!--              <el-option v-for="(item,i) in gridData || []" :key="i" :label="item.name" :value="item.value"></el-option>-->
26
+          <!--            </el-select>-->
27
+          <!--          </li>-->
22 28
         </ul>
23 29
         <el-button
24
-          size="mini"
25
-          type="primary" @click="search">查询</el-button>
30
+                size="mini"
31
+                type="primary" @click="search">查询</el-button>
26 32
       </div>
27 33
     </div>
28
-    <el-table :data="dynamics.list || []" style="width: 100%">
34
+    <el-table :data="list || []"
35
+              border
36
+              style="width: 100%">
29 37
       <el-table-column
30
-        type="index"
31
-        width="50">
32
-        <template slot-scope="scope">
33
-          <span>{{ GetIndex(scope.$index) }}</span>
34
-        </template>
38
+              type="index"
39
+              width="50">
35 40
       </el-table-column>
36 41
       <el-table-column
37
-        label="头像">
42
+              label="头像">
38 43
         <template slot-scope="scope">
39 44
           <div class="header">
40
-            <img :src="scope.row.imgUrl" alt="" />
45
+            <img :src="scope.row.picture" alt="" />
41 46
           </div>
42 47
         </template>
43 48
       </el-table-column>
44 49
       <el-table-column
45
-        prop="title"
46
-        label="姓名">
50
+              prop="name"
51
+              label="姓名">
47 52
       </el-table-column>
48 53
       <el-table-column
49
-        prop="phone"
50
-        label="电话">
54
+              prop="phone"
55
+              label="电话">
51 56
       </el-table-column>
52 57
       <el-table-column
53
-        prop="sex"
54
-        label="性别">
58
+              prop="sex"
59
+              label="性别">
60
+        <template slot-scope="scope">{{ scope.row.sex === 1 ? '男' : '女' }}</template>
55 61
       </el-table-column>
56
-      <el-table-column   label="置业顾问">
62
+      <el-table-column  label="置业顾问">
57 63
         <template slot-scope="scope">
58
-          <span>{{scope.row.desc}}</span>
59
-          <p>{{scope.row.tel}}</p>
64
+          <span>{{scope.row.name}}</span>
65
+          <p>{{scope.row.phone}}</p>
60 66
         </template>
61 67
       </el-table-column>
62
-      <el-table-column fixed="right" width="300" label="操作">
68
+      <el-table-column fixed="right"  width="200" label="操作">
63 69
         <template slot-scope="scope">
64
-          <el-button type="text" @click="toEditCustomer(scope.row)"   size="small">编辑</el-button>
65
-          <el-button type="text" @click="adjustment(scope.row)" size="small">调整归属</el-button>
66
-          <el-button type="text" @click="toIntegralRecord(scope.row)" size="small">积分记录</el-button>
67
-          <el-button type="text" @click="recommend(scope.row)" size="small">推荐客户</el-button>
68
-          <el-button type="text" size="small" @click="toDetail(scope.row)">查看详情</el-button>
70
+          <router-link :to="{ name:'editCustomer', query: { id: scope.row.customerId } }" v-if="scope.row.phone !== '' && scope.row.phone !== undefined && scope.row.phone !== null">编辑</router-link>
71
+          &nbsp;
72
+          <a href="javascript: void(0);" @click="showDialogConsultants(scope.row)" v-if="scope.row.phone !== '' && scope.row.phone !== undefined && scope.row.phone !== null">调整归属</a>
73
+          &nbsp;
74
+          <router-link :to="{ name:'integralRecord', query: { id: scope.row.customerId } }" v-if="scope.row.phone !== '' && scope.row.phone !== undefined && scope.row.phone !== null">积分记录</router-link>
75
+          &nbsp;
76
+          <a href="javascript: void(0);" @click="showRecommendCustomerList(scope.row)" v-if="scope.row.phone !== '' && scope.row.phone !== undefined && scope.row.phone !== null">推荐客户</a>
77
+          &nbsp;
78
+          <router-link :to="{ name:'editCustomer', query: { id: scope.row.customerId } }">查看详情</router-link>
69 79
         </template>
70 80
       </el-table-column>
71 81
     </el-table>
82
+    <el-pagination
83
+            small
84
+            style="margin-top:10px;"
85
+            layout="prev, pager, next"
86
+            :current-page.sync="form.pageNumber"
87
+            :pageSize="form.pageSize"
88
+            @current-change="getList"
89
+    >
90
+    </el-pagination>
91
+
92
+
72 93
     <el-dialog title="选择置业顾问" :visible.sync="dialogTableVisible">
73
-      <el-table :data="gridData">
74
-        <el-table-column property="date" label="姓名"></el-table-column>
75
-        <el-table-column property="name" label="电话"></el-table-column>
76
-        <el-table-column property="name" label="部门"></el-table-column>
77
-        <el-table-column property="name" label="岗位"></el-table-column>
94
+      <el-table :data="consultantList">
95
+        <el-table-column property="name" label="姓名"></el-table-column>
96
+        <el-table-column property="phone" label="电话"></el-table-column>
97
+        <el-table-column property="department" label="部门"></el-table-column>
98
+        <el-table-column property="post" label="岗位"></el-table-column>
78 99
         <el-table-column fixed="right" label="操作">
79 100
           <template slot-scope="scope">
80
-            <el-button type="text" @click="handleDel(scope.row)" size="small">选择</el-button>
101
+            <!--            <el-button type="text" @click="handleDel(scope.row)" size="small">选择</el-button>-->
102
+            <el-radio v-model="dialogConsultantForm.realtyConsultant" :label="scope.row.personId"></el-radio>
81 103
           </template>
82 104
         </el-table-column>
83 105
       </el-table>
106
+      <el-pagination
107
+              @size-change="dialogHandleSizeChange"
108
+              @current-change="dialogHandleCurrentChange"
109
+              :current-page.sync="dialogForm.pageNumber"
110
+              :page-size="dialogForm.pageSize"
111
+              layout="total, prev, pager, next"
112
+              :total="dialogTotal">
113
+      </el-pagination>
114
+      <el-button type="primary" @click="handleDel" size="small">确定</el-button>
84 115
     </el-dialog>
85
-    <el-dialog title="推荐客户" :visible.sync="dialogRecommendVisible">
86
-      <el-table :data="gridData">
87
-        <el-table-column property="date" label="姓名"></el-table-column>
88
-        <el-table-column property="name" label="电话"></el-table-column>
89
-        <el-table-column property="name" label="性别"></el-table-column>
90
-        <el-table-column property="name" label="意向项目"></el-table-column>
91
-        <el-table-column property="name" label="推荐时间"></el-table-column>
92
-        <el-table-column property="name" label="状态"></el-table-column>
116
+
117
+
118
+    <el-dialog title="推荐客户" :visible.sync="dialogRecommendedTableVisible">
119
+      <el-table :data="recommendedConsultantList">
120
+        <el-table-column property="name" label="姓名"></el-table-column>
121
+        <el-table-column property="phone" label="电话"></el-table-column>
122
+        <el-table-column property="sex" label="性别">
123
+          <template slot-scope="scope"> {{ scope.row.sex === 1 ? '男' : '女' }}</template>
124
+        </el-table-column>
125
+        <el-table-column property="intention" label="意向项目"></el-table-column>
126
+        <el-table-column property="post" label="推荐时间"></el-table-column>
127
+        <el-table-column fixed="right" label="状态">
128
+          <template slot-scope="scope">
129
+            {{ scope.row.status == 1 ? '报备': scope.row.status == 2 ? '到访' : scope.row.status == 3 ? '认购' : scope.row.status == 4 ? '签约' : '无效' }}
130
+          </template>
131
+        </el-table-column>
93 132
       </el-table>
94
-       <el-button type="primary" class="close-btn"  @click="dialogRecommendVisible=false" >关闭</el-button>
133
+      <el-pagination
134
+              @size-change="recommendedDialogHandleSizeChange"
135
+              @current-change="recommendedDialogHandleCurrentChange"
136
+              :current-page.sync="recommendedDialogConsultantForm.pageNumber"
137
+              :page-size="recommendedDialogConsultantForm.pageSize"
138
+              layout="total, prev, pager, next"
139
+              :total="recommendedDialogTotal">
140
+      </el-pagination>
95 141
     </el-dialog>
96
-    <el-pagination
97
-      small
98
-      style="margin-top:10px;"
99
-      layout="prev, pager, next"
100
-      :current-page.sync="currentPage"
101
-      :pageSize="pageSize"
102
-      @current-change="getList"
103
-    >
104
-    </el-pagination>
105 142
   </div>
106 143
 </template>
107 144
 <script>
108
-import { createNamespacedHelpers } from "vuex";
109
-const {
110
-  mapState: mapDynamicState,
111
-  mapActions: mapDynamicActions
112
-} = createNamespacedHelpers("dynamic");
113
-const {
114
-  mapState: mapCustomerState,
115
-  mapActions: mapCustomerActions
116
-} = createNamespacedHelpers("customer");
117
-export default {
118
-  data() {
119
-    return {
120
-      pageSize: 20,
121
-      currentPage: 1,
122
-      name: "",
123
-      sex: "",
124
-      phone: "",
125
-      picture: "",
126
-      describe: "",
127
-      appointmentTime: "",
128
-      visiteNum: "",
129
-      intention: "",
130
-      buildingId: "",
131
-      realtyManageType: "",
132
-      demandType: "",
133
-      priceRange: "",
134
-      reportDate: "",
135
-      status: "",
136
-      personId: "",
137
-      dialogTableVisible: false, //调整归属弹框
138
-      dialogRecommendVisible: false, //推荐客户弹框
139
-      gridData: [
140
-        {
141
-          date: "2016-05-02",
142
-          name: "王小虎"
145
+  import { createNamespacedHelpers } from "vuex";
146
+  import dayjs from 'dayjs'
147
+  const {
148
+    mapState: mapDynamicState,
149
+    mapActions: mapDynamicActions
150
+  } = createNamespacedHelpers("dynamic");
151
+  const {
152
+    mapState: mapCustomerState,
153
+    mapActions: mapCustomerActions
154
+  } = createNamespacedHelpers("customer");
155
+  export default {
156
+    data() {
157
+      return {
158
+        form: {
159
+          pageSize: 10,
160
+          pageNumber: 1,
161
+          name: "",
162
+          consultName: '',
163
+          consultTel: '',
164
+          verifyStatus: '1' // 0未通过 1已通过 2已驳
143 165
         },
144
-        {
145
-          date: "2016-05-04",
146
-          name: "王小虎"
166
+        list: [],
167
+        total: 0,
168
+        sex: "",
169
+        phone: "",
170
+        picture: "",
171
+        describe: "",
172
+        appointmentTime: "",
173
+        visiteNum: "",
174
+        intention: "",
175
+        buildingId: "",
176
+        realtyManageType: "",
177
+        demandType: "",
178
+        priceRange: "",
179
+        reportDate: "",
180
+        status: "",
181
+        personId: "",
182
+        gridData: [
183
+          {
184
+            name: "报备",
185
+            value: 1
186
+          },
187
+          {
188
+            name: "到访",
189
+            value: 2
190
+          },
191
+          {
192
+            name: "认购",
193
+            value: 3
194
+          },
195
+          {
196
+            name: "签约",
197
+            value: 4
198
+          }
199
+        ],
200
+        dialogTableVisible: false, //选择置业顾问弹框
201
+        consultantList: [],
202
+        dialogForm: {
203
+          pageNumber: 1,
204
+          pageSize: 10
147 205
         },
148
-        {
149
-          date: "2016-05-01",
150
-          name: "王小虎"
206
+        dialogTotal: 0,
207
+        dialogConsultantForm: {
208
+          customerId: '', // 客户Id
209
+          realtyConsultant: '' // 置业顾问
151 210
         },
152
-        {
153
-          date: "2016-05-03",
154
-          name: "王小虎"
155
-        }
156
-      ]
157
-    };
158
-  },
159
-  computed: {
160
-    ...mapCustomerState({
161
-      customers: x => x.customers
162
-    }),
163
-    ...mapDynamicState({
164
-      dynamics: x => x.dynamics
165
-    })
166
-  },
167
-  created() {
168
-    this.getList();
169
-  },
170
-  methods: {
171
-    ...mapCustomerActions(["getCustomers", "getDetail"]),
172
-    ...mapDynamicActions([
173
-      "getDynamics",
174
-      "setDetailNull",
175
-      "deleteDynamics",
176
-      "publicDynamic",
177
-      "cancelDynamic"
178
-    ]),
179
-    GetIndex(inx) {
180
-      return (this.currentPage - 1) * this.pageSize + inx + 1;
181
-    },
182
-    getList() {
183
-      this.getDynamics({
184
-        pageNum: this.currentPage,
185
-        pageSize: this.pageSize,
186
-        name: this.name,
187
-        buildingId: this.buildingId
188
-      });
189
-    },
190
-    // 进入编辑页
191
-    toEditCustomer(row) {
192
-      this.$router.push({
193
-        name: "editCustomer",
194
-        params: { id: row.personId }
195
-      });
196
-    },
197
-    // 进入积分记录页
198
-    toIntegralRecord(row) {
199
-      this.$router.push({
200
-        name: "integralRecord",
201
-        params: { id: row.personId }
202
-      });
203
-    },
204
-    // 调整归属
205
-    adjustment(row) {
206
-      this.dialogTableVisible = true;
207
-    },
208
-    // 推荐客户
209
-    recommend(row) {
210
-      this.dialogRecommendVisible = true;
211
+        // 推荐客户
212
+        dialogRecommendedTableVisible: false,
213
+        recommendedConsultantList: [],
214
+        recommendedDialogTotal: 0,
215
+        recommendedDialogConsultantForm: {
216
+          customerId: '', // 客户Id
217
+          pageNumber: 1,
218
+          pageSize: 10
219
+        },
220
+      };
211 221
     },
212
-    handleDel(row) {
213
-      this.$confirm("确定选择此置业顾问?", "提示", {
214
-        confirmButtonText: "确定",
215
-        cancelButtonText: "取消",
216
-        type: "warning"
222
+    computed: {
223
+      ...mapCustomerState({
224
+        customers: x => x.customers
225
+      }),
226
+      ...mapDynamicState({
227
+        dynamics: x => x.dynamics
217 228
       })
218
-        .then(() => {
219
-          this.$message({
220
-            type: "success",
221
-            message: "选择成功!"
222
-          });
223
-          this.dialogTableVisible = false;
224
-        })
225
-        .catch(() => {
226
-          this.$message({
227
-            type: "info",
228
-            message: "已取消选择"
229
-          });
230
-        });
231 229
     },
232
-    // getList() {
233
-    // this.getCustomers({
234
-    // pageNum: this.currentPage,
235
-    // pageSize: this.pageSize,
236
-    // name: this.name,
237
-    // sex: this.sex,
238
-    // phone: this.phone,
239
-    // picture: this.picture,
240
-    // describe: this.describe,
241
-    // appointmentTime: this.appointmentTime,
242
-    // visiteNum: this.visiteNum,
243
-    // intention: this.intention,
244
-    // buildingId: this.buildingId,
245
-    // realtyManageType: this.realtyManageType,
246
-    // demandType: this.demandType,
247
-    // priceRange: this.priceRange,
248
-    // reportDate: this.reportDate,
249
-    // status: this.status,
250
-    // personId: this.personId
251
-    // });
252
-    // },
253
-    search() {
254
-      this.currentPage = 1;
230
+    created() {
255 231
       this.getList();
256 232
     },
257
-    toDetail(row) {
258
-      this.$router.push({
259
-        name: "consultant.edit",
260
-        params: { id: row.personId }
261
-      });
233
+    methods: {
234
+      ...mapCustomerActions(["getCustomers", "getDetail", "getRecommendCustomers"]),
235
+      ...mapDynamicActions([
236
+        "getDynamics",
237
+        "setDetailNull",
238
+        "deleteDynamics",
239
+        "publicDynamic",
240
+        "cancelDynamic"
241
+      ]),
242
+      GetIndex(inx) {
243
+        return (this.currentPage - 1) * this.pageSize + inx + 1;
244
+      },
245
+      formateDate(dt) {
246
+        return !dt ? '' : dayjs(dt).format('YYYY-MM-DD HH:mm')
247
+      },
248
+      getList() {
249
+        this.getRecommendCustomers(this.form).then((res) => {
250
+          this.list = res.records
251
+          this.form.pageSize = res.size
252
+          this.form.pageNumber = res.current
253
+          this.total = res.total
254
+        }).catch(() => {
255
+          console.log('getRecommendCustomers err')
256
+        });
257
+      },
258
+
259
+      // 进入积分记录页
260
+      toEditRecommend(row) {
261
+        this.$router.push({
262
+          name: "editRecommend",
263
+          params: { id: row.personId }
264
+        });
265
+      },
266
+
267
+      // getList() {
268
+      // this.getCustomers({
269
+      // pageNum: this.currentPage,
270
+      // pageSize: this.pageSize,
271
+      // name: this.name,
272
+      // sex: this.sex,
273
+      // phone: this.phone,
274
+      // picture: this.picture,
275
+      // describe: this.describe,
276
+      // appointmentTime: this.appointmentTime,
277
+      // visiteNum: this.visiteNum,
278
+      // intention: this.intention,
279
+      // buildingId: this.buildingId,
280
+      // realtyManageType: this.realtyManageType,
281
+      // demandType: this.demandType,
282
+      // priceRange: this.priceRange,
283
+      // reportDate: this.reportDate,
284
+      // status: this.status,
285
+      // personId: this.personId
286
+      // });
287
+      // },
288
+      search() {
289
+        this.currentPage = 1;
290
+        this.getList();
291
+      },
292
+      handleDel() {
293
+        this.dialogSubmitForm(this.dialogConsultantForm.customerId, this.dialogConsultantForm.realtyConsultant)
294
+        this.dialogTableVisible = false
295
+      },
296
+      dialogHandleSizeChange(value) {
297
+        this.dialogForm.pageSize = value
298
+        this.getConsultantsList()
299
+      },
300
+      dialogHandleCurrentChange(value) {
301
+        this.dialogForm.pageNumber = 1
302
+        this.dialogForm.pageSize = value
303
+        this.getConsultantsList()
304
+      },
305
+      getConsultantsList() {
306
+        this.$store.dispatch('persons/getConsultants', this.dialogForm).then((res) => {
307
+          this.consultantList = res.records
308
+          this.dialogForm.pageNumber = res.current
309
+          this.dialogForm.pageSize = res.size
310
+          this.dialogTotal = res.total
311
+        }).catch(()=> {
312
+          console.log('persons/getConsultants err')
313
+        })
314
+      },
315
+      dialogSubmitForm(customerId, realtyConsultant) {
316
+        console.log('提交', this.dialogConsultantForm)
317
+        this.$store.dispatch('customer/getRecommendCustomersUpdate',{customerId:  customerId, realtyConsultant:  realtyConsultant})
318
+                .then(res => {
319
+                  if (res.personId) {
320
+                    this.detail = res;
321
+                  }
322
+
323
+                  this.$notify.info("保存成功");
324
+                })
325
+                .catch(err => {
326
+                  this.$notify.error(err.message);
327
+                });
328
+      },
329
+      showDialogConsultants(row) {
330
+        this.dialogTableVisible = true
331
+        this.dialogConsultantForm.customerId = row.customerId
332
+        this.dialogConsultantForm.realtyConsultant = row.realtyConsultant
333
+        this.getConsultantsList()
334
+      },
335
+      getRecommendCustomerList() {
336
+        this.$store.dispatch('customer/recommendCustomerList', this.recommendedDialogConsultantForm).then((res) => {
337
+          this.recommendedConsultantList = res.records
338
+          this.recommendedDialogConsultantForm.pageNumber = res.current
339
+          this.recommendedDialogConsultantForm.pageSize = res.size
340
+          this.recommendedDialogTotal = res.total
341
+        }).catch(()=> {
342
+          console.log('persons/getConsultants err')
343
+        })
344
+      },
345
+      showRecommendCustomerList(row) {
346
+        this.dialogRecommendedTableVisible = true
347
+        this.recommendedDialogConsultantForm.customerId = row.customerId
348
+        this.getRecommendCustomerList()
349
+      },
350
+      recommendedDialogHandleSizeChange(value) {
351
+        this.recommendedDialogConsultantForm.pageSize = value
352
+        this.getRecommendCustomerList()
353
+      },
354
+      recommendedDialogHandleCurrentChange(value) {
355
+        this.recommendedDialogConsultantForm.pageNumber = 1
356
+        this.recommendedDialogConsultantForm.pageSize = value
357
+        this.getConsultantsList()
358
+      },
262 359
     }
263
-  }
264
-};
360
+  };
265 361
 </script>
266 362
 <style lang="scss" scoped>
267
-.list {
268
-  .header {
269
-    width: 50px;
270
-    height: 50px;
271
-    img {
272
-      width: 100%;
273
-      height: 100%;
363
+  .list {
364
+    .header {
365
+      width: 50px;
366
+      height: 50px;
367
+      img {
368
+        width: 100%;
369
+        height: 100%;
370
+      }
274 371
     }
275 372
   }
276
-}
277 373
 
278
-.system-table-search {
279
-  width: calc(100% - 40px);
280
-  margin: 16px auto 0;
281
-}
374
+  .system-table-search {
375
+    width: calc(100% - 40px);
376
+    margin: 16px auto 0;
377
+  }
282 378
 
283
-.system-table-search ul > li {
284
-  margin-right: 20px;
285
-  display: flex;
286
-  float: left;
287
-  align-items: center;
288
-  span {
289
-    margin-right: 10px;
379
+  .system-table-search ul > li {
380
+    margin-right: 20px;
381
+    display: flex;
382
+    float: left;
383
+    align-items: center;
384
+    margin-bottom: 10px;
385
+    span {
386
+      margin-right: 10px;
387
+    }
290 388
   }
291
-}
292 389
 
293
-.system-table-search ul {
294
-  font-size: 15px;
295
-  white-space: nowrap;
296
-  padding: 0;
297
-}
390
+  .system-table-search ul {
391
+    font-size: 15px;
392
+    white-space: nowrap;
393
+    padding: 0;
394
+  }
298 395
 
299
-.flex-h {
300
-  display: flex;
301
-  align-items: center;
302
-}
303
-.el-dialog__body{
304
-  text-align: center;
305
-  .close-btn{
306
-  margin:  20px auto 0 auto;
307
-}
308
-}
396
+  .flex-h {
397
+    display: flex;
398
+    align-items: center;
399
+  }
400
+  .el-dialog__body {
401
+    text-align: center;
402
+    .close-btn {
403
+      margin: 20px auto 0 auto;
404
+    }
405
+  }
309 406
 
310
-.flex-item {
311
-  flex: 1;
312
-  -webkit-flex: 1;
313
-  position: relative;
314
-  overflow: hidden;
315
-}
407
+  .flex-item {
408
+    flex: 1;
409
+    -webkit-flex: 1;
410
+    position: relative;
411
+    overflow: hidden;
412
+  }
316 413
 </style>
317 414
 
318 415
 

+ 16
- 27
src/views/customer/recommendCustomer.vue Ver arquivo

@@ -19,12 +19,12 @@
19 19
             <span>推荐人电话</span>
20 20
             <el-input v-model="form.consultTel" ></el-input>
21 21
           </li>
22
-<!--          <li>-->
23
-<!--            <span>状态</span>-->
24
-<!--            <el-select v-model="form.status" placeholder="请选择">-->
25
-<!--              <el-option v-for="(item,i) in gridData || []" :key="i" :label="item.name" :value="item.value"></el-option>-->
26
-<!--            </el-select>-->
27
-<!--          </li>-->
22
+          <li>
23
+            <span>状态</span>
24
+            <el-select v-model="form.verifyStatus" placeholder="请选择">
25
+              <el-option v-for="(item,i) in gridData || []" :key="i" :label="item.name" :value="item.value"></el-option>
26
+            </el-select>
27
+          </li>
28 28
         </ul>
29 29
         <el-button
30 30
           size="mini"
@@ -77,20 +77,12 @@
77 77
       </el-table-column>
78 78
       <el-table-column  label="状态">
79 79
         <template slot-scope="scope">
80
-          <span>{{scope.row.status == 1 ? '报备': scope.row.status == 2 ? '到访' : scope.row.status == 3 ? '认购' : '签约' }}</span>
80
+          <span>{{scope.row.verifyStatus == '0' ? '未通过': scope.row.verifyStatus == '1' ? '已通过' : scope.row.verifyStatus == '2' ? '已驳回' : '' }}</span>
81 81
         </template>
82 82
       </el-table-column>
83 83
       <el-table-column fixed="right" width="200" label="操作">
84 84
         <template slot-scope="scope">
85
-          <router-link :to="{ name:'editRecommend', query: { id: scope.row.customerId } }">编辑</router-link>
86
-          &nbsp;
87
-          <a href="javascript: void(0);" @click="showDialogConsultants(scope.row)">调整归属</a>
88
-          &nbsp;
89
-          <router-link :to="{ name:'editRecommend', query: { id: scope.row.customerId } }">积分记录</router-link>
90
-          &nbsp;
91
-          <a href="javascript: void(0);" @click="showRecommendCustomerList(scope.row)">推荐客户</a>
92
-          &nbsp;
93
-          <router-link :to="{ name:'editRecommend', query: { id: scope.row.customerId } }">查看详情</router-link>
85
+          <router-link :to="{ name:'editRecommend', query: { id: scope.row.customerId } }">审核</router-link>
94 86
         </template>
95 87
       </el-table-column>
96 88
     </el-table>
@@ -176,7 +168,8 @@ export default {
176 168
         name: "",
177 169
         consultName: '',
178 170
         consultTel: '',
179
-        status: ''
171
+        verifyStatus: '', // 0未通过 1已通过 2已驳
172
+        entryType: 'input'
180 173
       },
181 174
       list: [],
182 175
       total: 0,
@@ -196,20 +189,16 @@ export default {
196 189
       personId: "",
197 190
       gridData: [
198 191
         {
199
-          name: "报备",
200
-          value: 1
201
-        },
202
-        {
203
-          name: "到访",
204
-          value: 2
192
+          name: "未通过",
193
+          value: '0'
205 194
         },
206 195
         {
207
-          name: "认购",
208
-          value: 3
196
+          name: "已通过",
197
+          value: '1'
209 198
         },
210 199
         {
211
-          name: "签约",
212
-          value: 4
200
+          name: "已驳回",
201
+          value: '2'
213 202
         }
214 203
       ],
215 204
       dialogTableVisible: false, //选择置业顾问弹框

+ 81
- 12
src/views/exchange/verify.vue Ver arquivo

@@ -1,13 +1,58 @@
1 1
 <template>
2
-<el-tabs type="border-card">
3
-  <el-tab-pane label="扫码核销">用户管理</el-tab-pane>
2
+<el-tabs type="border-card" class="border-card">
3
+  <el-tab-pane label="扫码核销">
4
+    <el-row>
5
+      <el-col :span="8">
6
+        <div class="grid-content">
7
+          <i class="iconfont icon-erweima"></i>
8
+          <p>1</p>
9
+          <p>请用户出示核销的二维码</p>
10
+          <p>请将网页输入法切换成英文</p>
11
+          
12
+        </div>
13
+      </el-col>
14
+      <el-col :span="8">
15
+        <div class="grid-content ">
16
+          <i class="iconfont icon-iconfontscan"></i>
17
+          <p>2</p>
18
+          <p>点击“立即核销”按钮</p>
19
+          <p>使用扫码枪扫描客户二维码</p>
20
+        </div>
21
+      </el-col>
22
+      <el-col :span="8">
23
+        <div class="grid-content">
24
+          <i class="iconfont icon-iconfontzhizuobiaozhun0261"></i>
25
+          <p>3</p>
26
+          <p>根据提示进行核销操作</p>
27
+        </div>
28
+      </el-col>
29
+    </el-row>
30
+    <el-button type="danger" style="margin:20px auto 0 auto;display:block" round>立即核销</el-button>
31
+    
32
+  </el-tab-pane>
4 33
   <el-tab-pane label="手机号核销">
5
-   <el-form :inline="true">
34
+    <el-row>
35
+      <el-col :span="12">
36
+        <div class="grid-content">
37
+          <i class="iconfont icon-erweima"></i>
38
+          <p>1</p>
39
+          <p>请输入用户的手机号</p>
40
+          </div>
41
+      </el-col>
42
+      <el-col :span="12">
43
+        <div class="grid-content">
44
+          <i class="iconfont icon-iconfontzhizuobiaozhun0261"></i>
45
+          <p>2</p>
46
+          <p>点击“立即核销”按钮</p>
47
+        </div>
48
+      </el-col>
49
+    </el-row>
50
+    <el-form :inline="true" style="text-align: center;">
6 51
       <el-form-item label="">
7 52
         <el-input v-model="verifyPhone" placeholder="请输入手机号"></el-input>
8 53
       </el-form-item>
9 54
       <el-form-item>
10
-        <el-button type="primary" @click="verifyTel">立即核销</el-button>
55
+        <el-button type="danger" @click="verifyTel">立即核销</el-button>
11 56
       </el-form-item>
12 57
     </el-form>
13 58
   </el-tab-pane>
@@ -16,7 +61,7 @@
16 61
 
17 62
 <script>
18 63
 import { createNamespacedHelpers } from "vuex";
19
-import dayjs from 'dayjs'
64
+import dayjs from "dayjs";
20 65
 
21 66
 const { mapActions: mapExchangeActions } = createNamespacedHelpers("exchange");
22 67
 
@@ -33,7 +78,7 @@ export default {
33 78
         endCreateDate: "",
34 79
         startVerifyDate: "",
35 80
         endVerifyDate: "",
36
-        status: "",
81
+        status: ""
37 82
       },
38 83
       verifyPhone: "",
39 84
       list: [],
@@ -70,7 +115,10 @@ export default {
70 115
       this.$router.push({ name: "goods.edit" });
71 116
     },
72 117
     verifyTel() {
73
-      this.$router.push({ name: "verify.list" , params: { tel: this.verifyPhone } });
118
+      this.$router.push({
119
+        name: "verify.list",
120
+        params: { tel: this.verifyPhone }
121
+      });
74 122
     },
75 123
     toDetail(row) {
76 124
       this.$router.push({
@@ -110,8 +158,8 @@ export default {
110 158
       this.$router.replace({ name: "goods.list", query: { page } });
111 159
     },
112 160
     formateDate(dt) {
113
-      return !dt ? '' : dayjs(dt).format('YYYY-MM-DD HH:mm')
114
-    },
161
+      return !dt ? "" : dayjs(dt).format("YYYY-MM-DD HH:mm");
162
+    }
115 163
   },
116 164
   created() {
117 165
     this.pageNavi.current = this.$route.query.page || 1;
@@ -129,9 +177,9 @@ export default {
129 177
     border-radius: 50%;
130 178
   }
131 179
   img {
132
-      width: 100%;
133
-      height: 100%;
134
-    }
180
+    width: 100%;
181
+    height: 100%;
182
+  }
135 183
 }
136 184
 .system-table-search {
137 185
   width: calc(100% - 40px);
@@ -162,4 +210,25 @@ export default {
162 210
   position: relative;
163 211
   overflow: hidden;
164 212
 }
213
+.border-card {
214
+  .el-row {
215
+    margin: 60px auto;
216
+  }
217
+  .grid-content {
218
+    text-align: center;
219
+
220
+    .iconfont {
221
+      color: #77a5f0;
222
+      font-size: 24px;
223
+      margin-bottom: 8px;
224
+      display: inline-block;
225
+    }
226
+    p {
227
+      font-size: 13px;
228
+      margin: 0;
229
+      line-height: 1.4;
230
+      color: #666;
231
+    }
232
+  }
233
+}
165 234
 </style>

+ 4
- 4
src/views/index.js Ver arquivo

@@ -33,7 +33,7 @@ const pages = [
33 33
         name: 'consultant.edit',
34 34
         component: () => import('./consultant/edit.vue'),
35 35
         meta: {
36
-          menuShow: true,
36
+          menuShow: false,
37 37
           title: '置业管理',
38 38
         },
39 39
       },
@@ -173,7 +173,7 @@ const pages = [
173 173
       {
174 174
         path: 'customerlist',
175 175
         name: 'customerlist',
176
-        component: () => import('./customer/recommendCustomer.vue'),
176
+        component: () => import('./customer/list.vue'),
177 177
         meta: {
178 178
           menuShow: true,
179 179
           title: '客户列表',
@@ -194,7 +194,7 @@ const pages = [
194 194
         component: () => import('./customer/editRecommend.vue'),
195 195
         meta: {
196 196
           menuShow: false,
197
-          title: '编辑',
197
+          title: '审核',
198 198
         },
199 199
       },
200 200
       {
@@ -212,7 +212,7 @@ const pages = [
212 212
         component: () => import('./customer/editCustomer.vue'),
213 213
         meta: {
214 214
           menuShow: false,
215
-          title: '编辑',
215
+          title: '编辑客户',
216 216
         },
217 217
       },
218 218
     ]

+ 3
- 3
src/views/news/type/index.vue Ver arquivo

@@ -90,13 +90,13 @@
90 90
             },
91 91
             handleSizeChange(val) {
92 92
                 console.log(`每页 ${val} 条`);
93
-                this.form.pageSize = val
94
-                this.form.pageNum = 1
93
+                this.pageSize = val
94
+                this.pageNum = 1
95 95
                 this.getList()
96 96
             },
97 97
             handleCurrentChange(val) {
98 98
                 console.log(`当前页: ${val}`);
99
-                this.form.pageNum = val
99
+                this.pageNum = val
100 100
                 this.getList()
101 101
             },
102 102
             getList() {

+ 3
- 2
vue.config.js Ver arquivo

@@ -1,10 +1,11 @@
1 1
 module.exports = {
2 2
   publicPath: './',
3 3
   devServer: {
4
-    port: 9000,
4
+    port: 8080,
5 5
     proxy: {
6 6
       '/api': {
7
-        target: 'http://127.0.0.1:8080',
7
+        // target: 'http://192.168.0.11:8080',
8
+        target: 'http://192.168.0.131:8080',
8 9
         changeOrigin: true,
9 10
         // pathRewrite: {
10 11
         //   '^/api': '/'