xiuli.gao 2 years ago
parent
commit
ba96c7e845

+ 6 - 0
project/src/assets/config/interface_api.js

@@ -42,6 +42,12 @@ var api = {
42 42
   authorize_corpList: "/api/authorize/corpList",
43 43
   getCorCustomerList: "/api/corp/getCorCustomerList",
44 44
   authCode: "/api/authCode",
45
+  customerDetail: "/api/customer/customerDetail",
46
+  customerInfoUpdate: "/api/customer/customerInfoUpdate",
47
+  customerDynamicList: "/api/customer/customerDynamicList",
48
+  customerOrderList: "/api/customer/customerOrderList",
49
+  tag_detial_list: "/api/customer/customerDetailTagList",
50
+  tag_detial_edit: "/api/customer/customerDetailTagUpdate",
45 51
 };
46 52
 
47 53
 export { api };

+ 19 - 9
project/src/components/customManage/manage.vue

@@ -112,7 +112,7 @@
112 112
           <div class="flex">
113 113
             <div class="c-00B38A pointer" @click="shieldingEvent(scope.row)">加入黑名单</div>
114 114
             <div class="c-00B38A pointer">聊天记录</div>
115
-            <div class="c-00B38A pointer" @click="showDetial">详情</div>
115
+            <div class="c-00B38A pointer" @click="showDetial(scope.row)">详情</div>
116 116
           </div>
117 117
         </template>
118 118
       </el-table-column>
@@ -130,7 +130,10 @@
130 130
       :size="drawerSize"
131 131
       :visible.sync="detialDrawer"
132 132
       :with-header="false">
133
-      <detial @changeDrawerSize="changeDrawerSize" @closeDrawer="closeDrawer"></detial>
133
+      <detial @changeDrawerSize="changeDrawerSize" @closeDrawer="closeDrawer" :rowProp="{
134
+        customer_id:rowPro.customer_id,
135
+        user_id:rowPro.user_id
136
+      }" ref="detial"></detial>
134 137
     </el-drawer>
135 138
   </div>
136 139
 </template>
@@ -177,18 +180,13 @@ export default {
177 180
       resetFlag: false,//重置
178 181
       otherData: {},
179 182
       shieldingData: {},//拉黑的数据
183
+      rowPro: {},//去详情的此条对象
180 184
     }
181 185
   },
182 186
   created () {
183 187
     this.init(1)
184 188
   },
185 189
   methods: {
186
-        changeDrawerSize(){
187
-    this.drawerSize = this.drawerSize == '100%' ? '60%' : '100%'
188
-  },
189
-  closeDrawer(){
190
-    this.detialDrawer = false
191
-  },
192 190
     resetEvent () {//重置
193 191
       this.resetFlag = !this.resetFlag
194 192
       this.input_keyword = '';
@@ -303,9 +301,21 @@ export default {
303 301
     handleSelectionChange () {
304 302
 
305 303
     },
306
-    showDetial () {
304
+
305
+    changeDrawerSize(){
306
+      this.drawerSize = this.drawerSize == '100%' ? '60%' : '100%'
307
+    },
308
+    closeDrawer(){
309
+      this.detialDrawer = false
310
+    },
311
+    showDetial (row) {
312
+      this.rowPro = row
307 313
       this.drawerSize = '60%'
308 314
       this.detialDrawer = true
315
+      this.$nextTick(()=>{
316
+        this.$refs.detial.acIdx = 0
317
+        this.$refs.detial.init()
318
+      })
309 319
     }
310 320
   }
311 321
 }

+ 78 - 25
project/src/components/detials/customerProfile.vue

@@ -19,27 +19,33 @@
19 19
             <el-table-column
20 20
               label="所属员工"
21 21
               class-name="self-column">
22
-              <template >
22
+              <template slot-scope="scope">
23 23
                 <div class="flex-align-center">
24
-                  <img src="@/assets/img/userDefault.png" alt="" width="40px">
25
-                  <span class="lMar8">莲雾</span>
24
+                  <img :src="scope.row.avatar" alt="" width="40px">
25
+                  <span class="lMar8">{{scope.row.user_name}}</span>
26 26
                 </div>
27 27
               </template>
28 28
             </el-table-column>
29 29
             <el-table-column
30 30
               class-name="self-column"
31
-              prop="name"
32 31
               label="其他客户来源">
32
+              <template slot-scope="scope">
33
+                {{scope.row.add_way}}
34
+              </template>
33 35
             </el-table-column>
34 36
             <el-table-column
35 37
               class-name="self-column"
36
-              prop="address"
37 38
               label="添加时间">
39
+              <template slot-scope="scope">
40
+                {{scope.row.createtime}}
41
+              </template>
38 42
             </el-table-column>
39 43
             <el-table-column
40 44
               class-name="self-column"
41
-              prop="address"
42 45
               label="最近沟通">
46
+              <template slot-scope="scope">
47
+                {{scope.row.remark}}
48
+              </template>
43 49
             </el-table-column>
44 50
           </el-table>
45 51
         </template>
@@ -61,7 +67,7 @@
61 67
                :style="[{borderBottom:(b.name == '企业' || b.name == '微博') ? 'none' : '' },{borderRight:bidx%2!==0 ? 'none' : ''}]">
62 68
             <div class="name">{{b.name}}</div>
63 69
             <div class="value">
64
-              <template v-if="b.name == '生日'">
70
+              <template v-if="b.key == 'e_birthday'">
65 71
                 <el-date-picker class="ipt"
66 72
                                 v-focus
67 73
                                 v-if="b.itpShow"
@@ -73,6 +79,9 @@
73 79
                 </el-date-picker>
74 80
                 <span @click="b.itpShow = true" class="text" v-else>{{b.value?b.value:'-'}}</span>
75 81
               </template>
82
+              <template v-else-if="b.key == 'sex'">
83
+                <span>{{b.value == 1 ? '男' : (b.value == 2 ? '女' : '未知')}}</span>
84
+              </template>
76 85
               <template v-else>
77 86
                 <el-input class="ipt" v-focus v-model="b.value" :placeholder="'请输入'+b.name" v-if="b.itpShow" @blur="iptBlur(bidx)"></el-input>
78 87
                 <span @click="b.itpShow = true" class="text" v-else>{{b.value?b.value:'-'}}</span>
@@ -89,16 +98,12 @@
89 98
 <script>
90 99
 export default {
91 100
   name: "customerProfile",
101
+  props:['rowProp'],
92 102
   data(){
93 103
     return{
94 104
       loading:false,
95
-      tableData: [{
96
-        date: '2016-05-02',
97
-        name: '王小虎',
98
-        address: '上海市普陀区金沙江路 1518 弄'
99
-      }],
100 105
       basicInfo:[
101
-        {
106
+        { //性别的位置不要换,换的话在initProfile里调整获取的索引
102 107
           name:'性别',
103 108
           key:'sex',
104 109
           value:'',
@@ -106,71 +111,73 @@ export default {
106 111
         },
107 112
         {
108 113
           name:'地址',
109
-          key:'sex',
114
+          key:'e_address',
110 115
           value:'',
111 116
           itpShow:false
112 117
         },
113 118
         {
114 119
           name:'年龄',
115
-          key:'sex',
120
+          key:'e_age',
116 121
           value:'',
117 122
           itpShow:false
118 123
         },
119 124
         {
120 125
           name:'生日',
121
-          key:'sex',
126
+          key:'e_birthday',
122 127
           value:'',
123 128
           itpShow:false
124 129
         },
125 130
         {
126 131
           name:'描述',
127
-          key:'sex',
132
+          key:'e_desc',
128 133
           value:'',
129 134
           itpShow:false
130 135
         },
131 136
         {
132 137
           name:'邮箱',
133
-          key:'sex',
138
+          key:'e_email',
134 139
           value:'',
135 140
           itpShow:false
136 141
         },
137 142
         {
138 143
           name:'电话',
139
-          key:'sex',
144
+          key:'e_phone',
140 145
           value:'',
141 146
           itpShow:false
142 147
         },
143 148
         {
144 149
           name:'职位',
145
-          key:'sex',
150
+          key:'e_position',
146 151
           value:'',
147 152
           itpShow:false
148 153
         },
149 154
         {
150 155
           name:'QQ',
151
-          key:'sex',
156
+          key:'e_qq',
152 157
           value:'',
153 158
           itpShow:false
154 159
         },
155 160
         {
156 161
           name:'来源',
157
-          key:'sex',
162
+          key:'e_source',
158 163
           value:'',
159 164
           itpShow:false
160 165
         },
161 166
         {
162 167
           name:'企业',
163
-          key:'sex',
168
+          key:'e_company',
164 169
           value:'',
165 170
           itpShow:false
166 171
         },
167 172
         {
168 173
           name:'微博',
169
-          key:'sex',
174
+          key:'e_weibo',
170 175
           value:'',
171 176
           itpShow:false
172 177
         }
173
-      ]
178
+      ],
179
+      resInfo:{},
180
+      tableData: [],
174 181
     }
175 182
   },
176 183
   directives:{
@@ -180,12 +187,58 @@ export default {
180 187
       }
181 188
     }
182 189
   },
190
+  created() {
191
+    this.init()
192
+  },
183 193
   methods:{
194
+    init(){
195
+      this.loading = true
196
+      this.$axios.get(this.URL.BASEURL + this.URL.customerDetail,{
197
+        params:{
198
+          customer_id:this.rowProp.customer_id,
199
+          user_id:this.rowProp.user_id
200
+        }
201
+      }).then((res)=>{
202
+        this.loading = false
203
+        res=res.data
204
+        this.resInfo = res.rst
205
+        this.tableData = []
206
+        this.tableData.push({
207
+          add_way:res.rst.follow_list.add_way,
208
+          createtime:res.rst.follow_list.createtime,
209
+          remark:res.rst.follow_list.remark,
210
+          avatar:res.rst.follow_list.avatar,
211
+          user_name:res.rst.follow_list.user_name
212
+        })
213
+        this.basicInfo[0].value = res.rst.gender
214
+        this.basicInfo.forEach(item=>{
215
+          item.value = res.rst[item.key]
216
+        })
217
+      }).catch(err=>{
218
+        this.loading = false
219
+      })
220
+    },
221
+    editProfile(){
222
+      let data={
223
+        customer_id:this.rowProp.customer_id,
224
+      }
225
+      this.basicInfo.forEach(item=>{
226
+        data[item.key] = item.value
227
+      })
228
+      this.$axios.post(this.URL.BASEURL + this.URL.customerInfoUpdate,data).then((res)=>{
229
+        res=res.data
230
+        this.$message({
231
+          message: res.err,
232
+          type: "info"
233
+        })
234
+      })
235
+    },
184 236
     headerClassName(){
185 237
       return 'headerClass'
186 238
     },
187 239
     iptBlur(index){
188 240
       this.basicInfo[index].itpShow = false
241
+      this.editProfile()
189 242
     }
190 243
   }
191 244
 }

+ 62 - 65
project/src/components/detials/customerStatus.vue

@@ -1,83 +1,80 @@
1 1
 <template>
2 2
   <div v-loading="loading" class="con">
3
-    <div v-for="(l,idx) in list" :key="idx">
4
-      <div class="dayDate">{{l.date}}{{l.week}}</div>
5
-      <div v-for="(s,sIdx) in l.sub" :key="sIdx" class="subBox" :class="sIdx==0 ? 'tMar17' : ''">
6
-        <div class="subBox_line">
7
-          <i class="el-icon-price-tag f16"></i>
8
-          <div class="splitLine"></div>
9
-        </div>
10
-        <div class="lMar8">
11
-          <div class="dayTime">{{s.time}}</div>
12
-          <div class="behavior_box">
13
-            <div class="behavior">{{s.opa}}</div>
14
-            <div class="behavior_detial"><span class="fWeight600">{{s.name1}}</span> 添加了 <span class="fWeight600">{{s.name2}}</span> 为好友</div>
3
+    <template v-if="list&&list.length>0">
4
+      <div v-for="(l,idx) in list" :key="idx">
5
+        <div class="dayDate">{{l.create_time&&l.create_time.split(' ')[0]}}{{l.week}}</div>
6
+        <!--       v-for="(s,sIdx) in l.sub" :key="sIdx"-->
7
+        <div class="subBox" :class="idx==0 ? 'tMar17' : ''">
8
+          <div class="subBox_line">
9
+            <i class="el-icon-price-tag f16"></i>
10
+            <div class="splitLine"></div>
11
+          </div>
12
+          <div class="lMar8">
13
+            <div class="dayTime">{{l.create_time&&l.create_time.split(' ')[1]}}</div>
14
+            <div class="behavior_box">
15
+              <div class="behavior">
16
+                <span v-if="l.type == 1">添加好友</span>
17
+                <span v-else-if="l.type == 2">被员工删除</span>
18
+                <span v-else-if="l.type == 3">删除跟进客户</span>
19
+                <span v-else-if="l.type == 4">客户转移</span>
20
+                <span v-else-if="l.type == 5">客户下单</span>
21
+                <span v-else-if="l.type == 6">加入黑名单</span>
22
+                <span v-else-if="l.type == 7">移出黑名单</span>
23
+                <span v-else-if="l.type == 8">聊天</span>
24
+                <span v-else>未知</span>
25
+              </div>
26
+              <div class="behavior_detial">{{l.content}}</div>
27
+            </div>
15 28
           </div>
16 29
         </div>
17 30
       </div>
18
-    </div>
19
-
31
+    </template>
32
+    <template v-else>
33
+      <noData></noData>
34
+    </template>
20 35
   </div>
21
-
22 36
 </template>
23 37
 
24 38
 <script>
39
+import noData from "../assembly/noData";
25 40
 export default {
26 41
   name: "customerStatus",
42
+  props:['rowProp'],
43
+  components:{
44
+    noData
45
+  },
27 46
   data(){
28 47
     return{
29 48
       loading:false,
30
-      list:[
31
-        {
32
-          date:'2022-03-18',
33
-          week:'星期三',
34
-          sub:[
35
-            {
36
-              time:'10.45',
37
-              opa:'添加好友',
38
-              name1:'黄金菊',
39
-              name2:'蛋卷',
40
-            }
41
-          ]
42
-        },
43
-        {
44
-          date:'2022-03-18',
45
-          week:'星期三',
46
-          sub:[
47
-            {
48
-              time:'10.45',
49
-              opa:'添加好友',
50
-              name1:'黄金菊',
51
-              name2:'蛋卷',
52
-            },
53
-            {
54
-              time:'10.45',
55
-              opa:'添加好友',
56
-              name1:'黄金菊',
57
-              name2:'蛋卷',
58
-            },
59
-            {
60
-              time:'10.45',
61
-              opa:'添加好友',
62
-              name1:'黄金菊',
63
-              name2:'蛋卷',
64
-            }
65
-          ]
66
-        },
67
-        {
68
-          date:'2022-03-18',
69
-          week:'星期三',
70
-          sub:[
71
-            {
72
-              time:'10.45',
73
-              opa:'添加好友',
74
-              name1:'黄金菊',
75
-              name2:'蛋卷',
76
-            }
77
-          ]
78
-        }
79
-      ]
49
+      list:[]
80 50
     }
51
+  },
52
+  created() {
53
+    this.init()
54
+  },
55
+  methods:{
56
+    init(){
57
+      this.loading = true
58
+      let data={
59
+        params:{
60
+          customer_id:this.rowProp.customer_id,
61
+        }
62
+      }
63
+      this.$axios.get(this.URL.BASEURL + this.URL.customerDynamicList,data).then((res)=>{
64
+        this.loading = false
65
+        res=res.data
66
+        if(res&&res.errno==0){
67
+          this.list = res.rst
68
+        }else{
69
+          this.$message({
70
+            message: res.err,
71
+            type: "info"
72
+          })
73
+        }
74
+      }).catch(err=>{
75
+        this.loading = false
76
+      })
77
+    },
81 78
   }
82 79
 }
83 80
 </script>

+ 150 - 76
project/src/components/detials/index.vue

@@ -34,21 +34,23 @@
34 34
         </template>
35 35
         <template>
36 36
           <div class="infoBox">
37
-            <div><img src="@/assets/img/userDefault.png"  alt="" ></div>
37
+            <div><img :src="resInfo.avatar"  alt="" ></div>
38 38
             <div>
39 39
               <div class="name">
40
-                <span>我回去了</span>
41
-                <span class="bright">@微信</span>
40
+                <span>{{resInfo&&resInfo.name}}</span>
41
+                <span class="bright" v-if="resInfo.type==1">@微信</span>
42 42
               </div>
43 43
               <div class="lable">
44 44
                 <span>企业标签:</span>
45
-                <span class="lable_con">开发</span>
46
-                <span class="bright" @click="comLableShow = true"><i class="el-icon-edit"></i> 编辑</span>
45
+                <span class="lable_con" v-for="(t,tidx) in resInfo.tag_list" :key="tidx">{{t}}</span>
46
+                <span class="bright" @click="init_tag"><i class="el-icon-edit"></i> 编辑</span>
47 47
               </div>
48
-              <div class="lable">
48
+<!--
49
+ <div class="lable">
49 50
                 <span>个人标签:</span>
50 51
                 <span class="bright" @click="selfLableShow = true"><i class="el-icon-edit"></i> 编辑</span>
51 52
               </div>
53
+-->
52 54
             </div>
53 55
           </div>
54 56
         </template>
@@ -62,11 +64,11 @@
62 64
           <div :class="acIdx == t.id ? 'bor_line_ac' : 'bor_line'"></div>
63 65
         </div>
64 66
       </div>
65
-      <customerProfile v-if="acIdx == 0"></customerProfile>
66
-      <customerStatus v-if="acIdx == 1"></customerStatus>
67
+      <customerProfile v-if="acIdx == 0" :rowProp="rowProp" ref="profile"></customerProfile>
68
+      <customerStatus v-if="acIdx == 1" :rowProp="rowProp"></customerStatus>
67 69
 <!--      <chatRecord v-if="acIdx == 2"></chatRecord>-->
68 70
 <!--      <chatGroup v-if="acIdx == 3"></chatGroup>-->
69
-      <order v-if="acIdx == 4"></order>
71
+      <order v-if="acIdx == 4" :rowProp="rowProp"></order>
70 72
     </div>
71 73
 
72 74
     <el-dialog
@@ -76,17 +78,32 @@
76 78
       class="addLable_dialog"
77 79
       width="30%">
78 80
       <div class="addLableBox">
79
-        <div class="add" @click="iptshow = true,addLableVal = ''">+ 添加</div>
80
-        <el-input v-if="iptshow" v-focus class="ipt" v-model="addLableVal" placeholder="请输入标签" @blur="iptBlur"></el-input>
81
-        <div class="lableItem" v-for="(l,lidx) in lableArr" :key="l.id" :class="lableArr_checked.indexOf(l.id) == -1 ? '' : 'lableItemAc'" @click="switchLable(l.id)">{{l.name}}</div>
81
+        <!--后台说先不做-->
82
+        <template v-if="false">
83
+          <div class="add" @click="iptshow = true,addLableVal = ''">+ 添加</div>
84
+          <el-input v-if="iptshow" v-focus class="ipt" v-model="addLableVal" placeholder="请输入标签" @blur="iptBlur"></el-input>
85
+        </template>
86
+        <div class="tMar10" v-for="l in lableArr" :key="l.group_id">
87
+          <div>
88
+            {{l.group_name}}
89
+          </div>
90
+          <div class="lableItem_dad">
91
+            <div class="lableItem" v-for="t in l.tag_list" :key="t.tag_id" :class="lableArr_checked.indexOf(t.tag_id) == -1 ? '' : 'lableItemAc'" @click="switchLable(t.tag_id)">
92
+              {{t.tag_name}}
93
+            </div>
94
+          </div>
95
+
96
+        </div>
97
+
82 98
       </div>
83 99
       <div slot="footer" class="dialog-footer">
84
-        <div class="addLableGroup" @click="lableGroup = true">
100
+        <!--后台说先不做-->
101
+        <div class="addLableGroup" @click="lableGroup = true" v-if="false">
85 102
           +新建标签组
86 103
         </div>
87 104
         <div>
88 105
           <el-button size="mini" @click="comLableShow = false">取 消</el-button>
89
-          <el-button size="mini" type="primary" @click="comLableShow = false">确 定</el-button>
106
+          <el-button size="mini" type="primary" @click="edit_tag">确 定</el-button>
90 107
         </div>
91 108
       </div>
92 109
     </el-dialog>
@@ -140,7 +157,8 @@
140 157
       </div>
141 158
     </el-dialog>
142 159
 
143
-    <el-dialog
160
+<!--
161
+  <el-dialog
144 162
       title="个人标签"
145 163
       :visible.sync="selfLableShow"
146 164
       :append-to-body="true"
@@ -151,31 +169,33 @@
151 169
         <div class="group_item">
152 170
           <div class="lable">性别:</div>
153 171
           <div class="opaArea">
154
-<!--            <el-select v-model="value" placeholder="请选择">-->
155
-<!--              <el-option-->
156
-<!--                v-for="item in sexList"-->
157
-<!--                :key="item.value"-->
158
-<!--                :label="item.label"-->
159
-<!--                :value="item.value">-->
160
-<!--              </el-option>-->
161
-<!--            </el-select>-->
162
-          </div>
163
-        </div>
164
-        <div class="group_item">
165
-          <div class="lable">可见范围:</div>
166
-          <div class="opaArea">
167
-            <el-radio-group v-model="scopeVal">
168
-              <el-radio :label="0">全部员工</el-radio>
169
-              <el-radio :label="1">部门可用</el-radio>
170
-            </el-radio-group>
171
-          </div>
172
-        </div>
173
-      </div>
174
-      <div slot="footer">
175
-        <el-button size="mini" @click="selfLableShow = false">取 消</el-button>
176
-        <el-button size="mini" type="primary" @click="selfLableShow = false">确 定</el-button>
177
-      </div>
178
-    </el-dialog>
172
+            <el-select v-model="value" placeholder="请选择">
173
+                  <el-option
174
+                    v-for="item in sexList"
175
+                    :key="item.value"
176
+                    :label="item.label"
177
+                    :value="item.value">
178
+                  </el-option>
179
+                </el-select>
180
+  </div>
181
+  </div>
182
+  <div class="group_item">
183
+    <div class="lable">可见范围:</div>
184
+    <div class="opaArea">
185
+      <el-radio-group v-model="scopeVal">
186
+        <el-radio :label="0">全部员工</el-radio>
187
+        <el-radio :label="1">部门可用</el-radio>
188
+      </el-radio-group>
189
+    </div>
190
+  </div>
191
+  </div>
192
+  <div slot="footer">
193
+    <el-button size="mini" @click="selfLableShow = false">取 消</el-button>
194
+    <el-button size="mini" type="primary" @click="selfLableShow = false">确 定</el-button>
195
+  </div>
196
+  </el-dialog>
197
+-->
198
+
179 199
   </div>
180 200
 </template>
181 201
 
@@ -187,20 +207,15 @@ import chatRecord from "./chatRecord";
187 207
 import order from "./order";
188 208
 export default {
189 209
   name: "detialIndex",
210
+  props:['rowProp'],
190 211
   data(){
191 212
     return{
192 213
       addLableVal:'',
193
-      lableArr:[
194
-        {id:0,name:'123'},
195
-        {id:1,name:'123567'},
196
-        {id:2,name:'123433'},
197
-        {id:3,name:'123778'},
198
-        {id:4,name:'12993'}
199
-      ],
200
-      lableArr_checked:[1,3],
214
+      lableArr:[],
215
+      lableArr_checked:[],
201 216
       comLableShow:false,
202 217
       lableGroup:false,
203
-      selfLableShow:false,
218
+      // selfLableShow:false,
204 219
       acIdx:0,
205 220
       loading:false,
206 221
       iptshow:false,
@@ -230,7 +245,8 @@ export default {
230 245
       groupName:'',
231 246
       moreLable:[
232 247
         {id:0,name:''}
233
-      ]
248
+      ],
249
+      resInfo:{}
234 250
     }
235 251
   },
236 252
   directives:{
@@ -248,27 +264,67 @@ export default {
248 264
     order,
249 265
   },
250 266
   methods:{
267
+    edit_tag(){
268
+      this.comLableShow = true
269
+      this.$axios.post(this.URL.BASEURL + this.URL.tag_detial_edit,{
270
+        external_userid:this.resInfo.external_userid,
271
+        customer_id:this.rowProp.customer_id,
272
+        user_id:this.rowProp.user_id,
273
+        selected_tag_id_list:this.lableArr_checked
274
+      }).then((res)=>{
275
+        res=res.data
276
+        this.$message({
277
+          message: res.err,
278
+          type: "info"
279
+        })
280
+        if(res&&res.errno == 0){
281
+          this.comLableShow = false
282
+          this.init()
283
+        }
284
+
285
+      })
286
+    },
287
+    init_tag(){
288
+      this.comLableShow = true
289
+      this.$axios.get(this.URL.BASEURL + this.URL.tag_detial_list,{
290
+        params:{
291
+          customer_id:this.rowProp.customer_id,
292
+          user_id:this.rowProp.user_id
293
+        }
294
+      }).then((res)=>{
295
+        res=res.data
296
+        this.lableArr = res.rst
297
+
298
+        this.lableArr_checked=[]
299
+        res.rst.forEach(l=>{
300
+          l.tag_list.forEach(t=>{
301
+            if(t.selected == 1){
302
+              this.lableArr_checked.push(t.tag_id)
303
+            }
304
+          })
305
+        })
306
+        console.log(this.lableArr_checked,' this.lableArr_checked');
307
+
308
+      })
309
+    },
310
+    init(){
311
+      this.$axios.get(this.URL.BASEURL + this.URL.customerDetail,{
312
+        params:{
313
+          customer_id:this.rowProp.customer_id,
314
+          user_id:this.rowProp.user_id
315
+        }
316
+      }).then((res)=>{
317
+        res=res.data
318
+        this.resInfo = res.rst
319
+        this.$refs.profile.init()
320
+      })
321
+    },
251 322
     changeWidth(){
252 323
       this.$emit('changeDrawerSize')
253 324
     },
254 325
     close(){
255 326
       this.$emit('closeDrawer')
256 327
     },
257
-    // 上移
258
-    upClick(index) {
259
-      if(index == 0){return false}
260
-      this.moreLable = this.swapItems(this.moreLable, index, index - 1)
261
-    },
262
-    // 下移
263
-    downClick(index) {
264
-      if(index == this.moreLable.length-1){return false}
265
-      this.moreLable = this.swapItems(this.moreLable, index, index + 1)
266
-    },
267
-    swapItems(arr, index1, index2) {
268
-      arr[index1] = arr.splice(index2, 1, arr[index1])[0];
269
-      return arr;
270
-    },
271
-
272 328
     iptBlur(){
273 329
       this.iptshow = false
274 330
       if(this.addLableVal){
@@ -276,6 +332,7 @@ export default {
276 332
       }
277 333
     },
278 334
     switchLable(id){
335
+      console.log(this.lableArr_checked,'switchLable');
279 336
       if(this.lableArr_checked.indexOf(id) == -1){
280 337
         this.lableArr_checked.push(id)
281 338
       }else{
@@ -285,17 +342,29 @@ export default {
285 342
           }
286 343
         })
287 344
       }
345
+    },
288 346
 
289
-    }
347
+    // 上移
348
+    upClick(index) {
349
+      if(index == 0){return false}
350
+      this.moreLable = this.swapItems(this.moreLable, index, index - 1)
351
+    },
352
+    // 下移
353
+    downClick(index) {
354
+      if(index == this.moreLable.length-1){return false}
355
+      this.moreLable = this.swapItems(this.moreLable, index, index + 1)
356
+    },
357
+    swapItems(arr, index1, index2) {
358
+      arr[index1] = arr.splice(index2, 1, arr[index1])[0];
359
+      return arr;
360
+    },
290 361
   }
291 362
 }
292 363
 </script>
293 364
 <style lang="scss">
294 365
 .addLable_dialog{
295 366
   .addLableBox{
296
-    display: flex;
297
-    align-items: center;
298
-    flex-wrap: wrap;
367
+
299 368
     .add{
300 369
       padding: 4px 10px;
301 370
       line-height: 20px;
@@ -305,6 +374,11 @@ export default {
305 374
       margin-right: 8px;
306 375
       margin-top: 10px;
307 376
     }
377
+    .lableItem_dad{
378
+      display: flex;
379
+      align-items: center;
380
+      flex-wrap: wrap;
381
+    }
308 382
     .lableItem{
309 383
       line-height: 20px;
310 384
       text-align: center;
@@ -335,9 +409,9 @@ export default {
335 409
     }
336 410
   }
337 411
   .dialog-footer{
338
-    display: flex;
339
-    align-items: center;
340
-    justify-content: space-between;
412
+    //display: flex;
413
+    //align-items: center;
414
+    //justify-content: space-between;
341 415
     .addLableGroup{
342 416
       font-size: 14px;
343 417
       color: #00B38A;
@@ -350,12 +424,12 @@ export default {
350 424
       align-items: center;
351 425
       margin-top: 20px;
352 426
       .lable{
353
-        width: 30%;
427
+        width: 24%;
354 428
         text-align: right;
355 429
       }
356 430
       .opaArea{
357 431
         margin-left: 20px;
358
-        width: 50%;
432
+        width: 68%;
359 433
         .addIptGroup{
360 434
           font-size: 12px;color: #00B38A;cursor: pointer;margin-top: 10px
361 435
         }
@@ -424,8 +498,8 @@ export default {
424 498
     display: flex;
425 499
     align-items: center;
426 500
     img{
427
-      width: 100px;
428
-      height: 100px;
501
+      width: 80px;
502
+      height: 80px;
429 503
       margin-right: 10px;
430 504
     }
431 505
     .name{

+ 60 - 153
project/src/components/detials/order.vue

@@ -3,20 +3,32 @@
3 3
     <div class="thead">
4 4
       <div class="thead_item" v-for="(t_h,thidx) in theadList" :key="thidx">{{t_h.name}}</div>
5 5
     </div>
6
-    <div class="tbody">
7
-      <div class="tbody_item" v-for="(l,lidx) in list" :key="lidx">
8
-        <div>{{l.id}}</div>
9
-        <div>{{l.date}}</div>
10
-        <div>{{l.status == 1 ? '已付款' : '未付款'}}</div>
11
-        <div class="c-00B38A fWeight600">¥{{l.amount}}</div>
6
+    <template v-if="list&&list.length>0">
7
+      <div class="tbody">
8
+        <div class="tbody_item" v-for="l in list" :key="l.order_id">
9
+          <div>{{l.order_id}}</div>
10
+          <div>{{l.created_ts}}</div>
11
+          <div>{{l.pay_status == 1 ? '已付款' : '未付款'}}</div>
12
+          <div class="c-00B38A fWeight600">¥{{l.pay_money?$formatNum(l.pay_money):'-'}}</div>
13
+        </div>
14
+        <div class="pagination" v-show="total>0">
15
+          <el-pagination background :current-page="page" @current-change="handleCurrentChange" layout="prev, pager, next" :page-count='Number(pages)'>
16
+          </el-pagination>
17
+        </div>
12 18
       </div>
13
-    </div>
19
+    </template>
20
+    <noData v-else></noData>
14 21
   </div>
15 22
 </template>
16 23
 
17 24
 <script>
25
+import noData from "../assembly/noData";
18 26
 export default {
19 27
   name: "order",
28
+  props:['rowProp'],
29
+  components:{
30
+    noData
31
+  },
20 32
   data(){
21 33
     return{
22 34
       loading:false,
@@ -26,154 +38,49 @@ export default {
26 38
         {name:'付款状态'},
27 39
         {name:'订单金额'},
28 40
       ],
29
-      list:[
30
-        {
31
-          id:'12888888888888899',
32
-          date:'2022-03-18',
33
-          status:1,
34
-          amount:'34'
35
-        },
36
-       {
37
-         id:'12888888888888899',
38
-           date:'2022-03-18',
39
-         status:1,
40
-         amount:'34'
41
-       },
42
-        {
43
-          id:'12888888888888899',
44
-          date:'2022-03-18',
45
-          status:1,
46
-          amount:'34'
47
-        },
48
-        {
49
-          id:'12888888888888899',
50
-          date:'2022-03-18',
51
-          status:1,
52
-          amount:'34'
53
-        },
54
-        {
55
-          id:'12888888888888899',
56
-          date:'2022-03-18',
57
-          status:1,
58
-          amount:'34'
59
-        },
60
-        {
61
-          id:'12888888888888899',
62
-          date:'2022-03-18',
63
-          status:1,
64
-          amount:'34'
65
-        },
66
-        {
67
-          id:'12888888888888899',
68
-          date:'2022-03-18',
69
-          status:1,
70
-          amount:'34'
71
-        },
72
-        {
73
-          id:'12888888888888899',
74
-          date:'2022-03-18',
75
-          status:1,
76
-          amount:'34'
77
-        },
78
-        {
79
-          id:'12888888888888899',
80
-          date:'2022-03-18',
81
-          status:1,
82
-          amount:'34'
83
-        },
84
-        {
85
-          id:'12888888888888899',
86
-          date:'2022-03-18',
87
-          status:1,
88
-          amount:'34'
89
-        },
90
-        {
91
-          id:'12888888888888899',
92
-          date:'2022-03-18',
93
-          status:1,
94
-          amount:'34'
95
-        },
96
-        {
97
-          id:'12888888888888899',
98
-          date:'2022-03-18',
99
-          status:1,
100
-          amount:'34'
101
-        },
102
-        {
103
-          id:'12888888888888899',
104
-          date:'2022-03-18',
105
-          status:1,
106
-          amount:'34'
107
-        },
108
-        {
109
-          id:'12888888888888899',
110
-          date:'2022-03-18',
111
-          status:1,
112
-          amount:'34'
113
-        },
114
-        {
115
-          id:'12888888888888899',
116
-          date:'2022-03-18',
117
-          status:1,
118
-          amount:'34'
119
-        },
120
-        {
121
-          id:'12888888888888899',
122
-          date:'2022-03-18',
123
-          status:1,
124
-          amount:'34'
125
-        },
126
-        {
127
-          id:'12888888888888899',
128
-          date:'2022-03-18',
129
-          status:1,
130
-          amount:'34'
131
-        },
132
-        {
133
-          id:'12888888888888899',
134
-          date:'2022-03-18',
135
-          status:1,
136
-          amount:'34'
137
-        },
138
-        {
139
-          id:'12888888888888899',
140
-          date:'2022-03-18',
141
-          status:1,
142
-          amount:'34'
143
-        },
144
-        {
145
-          id:'12888888888888899',
146
-          date:'2022-03-18',
147
-          status:1,
148
-          amount:'34'
149
-        },     {
150
-          id:'12888888888888899',
151
-          date:'2022-03-18',
152
-          status:1,
153
-          amount:'34'
154
-        },
155
-        {
156
-          id:'12888888888888899',
157
-          date:'2022-03-18',
158
-          status:1,
159
-          amount:'34'
160
-        },
161
-        {
162
-          id:'12888888888888899',
163
-          date:'2022-03-18',
164
-          status:1,
165
-          amount:'34'
166
-        },
167
-        {
168
-          id:'12888888888888899',
169
-          date:'2022-03-18',
170
-          status:1,
171
-          amount:'34'
172
-        }
173
-
174
-      ]
41
+      page:1,
42
+      pages:0,
43
+      page_size:20,
44
+      total:0,
45
+      list:[]
175 46
     }
176 47
 
48
+  },
49
+  created() {
50
+    this.init()
51
+  },
52
+  methods:{
53
+    init(){
54
+      this.loading = true
55
+      let data={
56
+        params:{
57
+          customer_id:this.rowProp.customer_id,
58
+          page:this.page,
59
+          page_size:this.page_size
60
+        }
61
+      }
62
+      this.$axios.get(this.URL.BASEURL + this.URL.customerOrderList,data).then((res)=>{
63
+        this.loading = false
64
+        res=res.data
65
+        if(res&&res.errno==0){
66
+          this.list = res.rst.data
67
+          this.page = res.rst.pageInfo.page
68
+          this.pages = res.rst.pageInfo.pages
69
+          this.page_size = res.rst.pageInfo.size
70
+          this.total = res.rst.pageInfo.total
71
+        }else{
72
+          this.$message({
73
+            message: res.err,
74
+            type: "info"
75
+          })
76
+        }
77
+      }).catch(err=>{
78
+        this.loading = false
79
+      })
80
+    },
81
+    handleCurrentChange (val) {
82
+      this.init(val)
83
+    },
177 84
   }
178 85
 }
179 86
 </script>