Explorar o código

Merge branch 'master' of http://106.52.242.177:3000/askqvn/crm-app into permission

zhangxin hai 2 meses
pai
achega
42805074c4

+ 1 - 1
manifest.json

@@ -124,7 +124,7 @@
124 124
         },
125 125
         "nativePlugins" : {
126 126
             "lemonjk-FileSelect" : {
127
-                "appid_android" : "uni.UNI0C0EF72",
127
+                "appid_android" : "uni.UNIDDAE2E0",
128 128
                 "__plugin_info__" : {
129 129
                     "name" : "FileSelect",
130 130
                     "description" : "文件选取插件",

+ 40 - 24
pages/orderDetailNew/components/orderDetailNewView.vue

@@ -2,25 +2,25 @@
2 2
     <view class="orderDetailNewView">
3 3
 
4 4
         <view class="page-item" v-show="activeIndex === 0">
5
-            <pageOne @handleNextClick="handleNextClick" :orderDetail="detail" :orderId="orderId" />
5
+            <pageOne @handleNextClick="handleNextClick" :orderDetail="detail" :orderId="orderId"
6
+                :currentReceipt="currentReceiptInner" />
6 7
         </view>
7 8
         <view class="page-item" v-show="activeIndex === 1">
8 9
             <pageTwo @handleNextClick="handleNextClick" :orderDetail="detail" :orderId="orderId"
9
-                :followUpList="followUpList" />
10
+                :currentReceipt="currentReceiptInner" :followUpList="followUpList" />
10 11
         </view>
11 12
         <view class="page-item" v-show="activeIndex === 2">
12 13
             <pageThree @handleNextClick="handleNextClick" :orderDetail="detail" @handleNeedSave="handleNeedSave"
13
-                :receiptList="receiptList" @handleConfirmPay="handleConfirmPay" ref="pageThreeComp"
14
+                :currentReceipt="currentReceiptInner" @handleConfirmPay="handleConfirmPay" ref="pageThreeComp"
14 15
                 :orderId="orderId" />
15 16
         </view>
16 17
         <view class="page-item" v-show="activeIndex === 3">
17 18
             <pageFour @confirmInterStore="confirmInterStore" @handleNextClick="handleNextClick" :orderDetail="detail"
18
-                :receiptList="receiptList" />
19
+                :currentReceipt="currentReceiptInner" />
19 20
         </view>
20 21
 
21 22
         <ul class="page">
22
-            <li v-for="(tab, index) in tabs" :key="index" :class="{ 'active': activeIndex === index }"
23
-                @click="activeIndex = index">{{ tab }}</li>
23
+            <li v-for="(tab, index) in tabs" :key="index" :class="{ 'active': activeIndex === index }">{{ tab }}</li>
24 24
         </ul>
25 25
     </view>
26 26
 </template>
@@ -43,7 +43,11 @@ export default {
43 43
         orderId: {
44 44
             type: String,
45 45
             default: ''
46
-        }
46
+        },
47
+        currentReceipt: {
48
+            type: Object,
49
+            default: () => { },
50
+        },
47 51
     },
48 52
     components: {
49 53
         pageOne,
@@ -63,12 +67,15 @@ export default {
63 67
             },
64 68
             pageThreeForm: {},
65 69
             fileIds: '',
66
-            //收件信息page4
70
+            //收件信息page4,page3
67 71
             receiptList: [],
68 72
             //订单细节
69 73
             orderDetail: {},
70 74
             // 跟进记录
71 75
             followUpList: [],
76
+
77
+            //当前选中的收单订单
78
+            currentReceiptInner: {},
72 79
         }
73 80
     },
74 81
     name: 'OrderDetailNewView',
@@ -76,7 +83,7 @@ export default {
76 83
         orderId: {
77 84
             handler(newVal) {
78 85
                 if (newVal) {
79
-                    this.fetchReceiptList();
86
+                    // this.fetchReceiptList();
80 87
                 }
81 88
             }, immediate: true
82 89
         },
@@ -88,6 +95,14 @@ export default {
88 95
                 }
89 96
             },
90 97
             deep: true,
98
+        },
99
+        currentReceipt: {
100
+            handler(newVal) {
101
+                if (newVal) {
102
+                    this.currentReceiptInner = newVal;
103
+                    console.log('当前选中的收单订单里面', this.currentReceiptInner)
104
+                }
105
+            }
91 106
         }
92 107
 
93 108
     },
@@ -98,7 +113,8 @@ export default {
98 113
             console.log("all page data:", this.allFroms[nowPage])
99 114
             // 当点击到第三页时,更新第三页的图片列表
100 115
             if (nowPage === 'formTwo') {
101
-                this.$refs.pageThreeComp.getList('2', '3');
116
+                console.log('品牌', this.detail.brand)
117
+                this.$refs.pageThreeComp.getList('2', '3', this.currentReceiptInner.id, this.detail.itemBrand);
102 118
             }
103 119
         },
104 120
         // 没有recepitid就新增
@@ -122,7 +138,7 @@ export default {
122 138
                 "updateTime": this.detail.updateTime,
123 139
                 // "remark": ,    //发单备注,先不传
124 140
                 "params": this.detail.params,     //看接口文档
125
-                "id": this.detail.receiptId,
141
+                "id": this.currentReceiptInner.id,
126 142
                 "sendFormId": this.orderId, //接单中心的id,就是接单中心列表的id(发单id)
127 143
                 "clueId": this.detail.clueId,
128 144
                 "item": this.detail.item,
@@ -136,7 +152,7 @@ export default {
136 152
                 // "freight": 30,         //运费page4加上
137 153
                 // "checkCodeFee": null,  //查码费
138 154
                 // "totalCost": "60230.00",   // 成本合计 =   运费 + 好处费 + 查码费 + 表款(支付总额) + 维修费。
139
-                "sellingPrice": this.topInfo.price.replace(/,/g, ''),   //实际价格(售价)顶上tab里面的第三栏
155
+                "sellingPrice": this.topInfo.price,   //实际价格(售价)顶上tab里面的第三栏
140 156
                 // "performance": "29772.00",  //sellingPrice - totalCost
141 157
                 // "receiptRemark":     //"收单之后还需再跟进", 先不传
142 158
                 // "repairAmount": null, //维修总金额 ,先不传
@@ -193,7 +209,7 @@ export default {
193 209
                 "updateTime": this.detail.updateTime,
194 210
                 // "remark": ,    //发单备注,先不传
195 211
                 "params": this.detail.params,     //看接口文档
196
-                "id": this.detail.receiptId,
212
+                "id": this.currentReceiptInner.id,
197 213
                 "sendFormId": this.orderId, //接单中心的id,就是接单中心列表的id(发单id)
198 214
                 "clueId": this.detail.clueId,
199 215
                 "item": warehouseInfo.item || '',
@@ -207,7 +223,7 @@ export default {
207 223
                 "freight": warehouseInfo.freight || '',         //运费page4加上
208 224
                 "checkCodeFee": warehouseInfo.checkCodeFee || '',  //查码费
209 225
                 // "totalCost": "60230.00",   // 成本合计 =   运费 + 好处费 + 查码费 + 表款(支付总额) + 维修费。
210
-                "sellingPrice": this.topInfo.price.replace(/,/g, ''),   //实际价格(售价)顶上tab里面的第三栏
226
+                "sellingPrice": this.topInfo.price,   //实际价格(售价)顶上tab里面的第三栏
211 227
                 // "performance": "29772.00",  //sellingPrice - totalCost
212 228
                 "receiptRemark": warehouseInfo.remarks + ';' + warehouseInfo.uploadedImage || '',//"收单之后还需再跟进", 先不传
213 229
                 "repairAmount": warehouseInfo.repairAmount || '', //维修总金额 ,先不传
@@ -238,16 +254,16 @@ export default {
238 254
 
239 255
         },
240 256
         // 获取收单列表
241
-        async fetchReceiptList() {
242
-            try {
243
-                const res = await uni.$u.api.clueReceiptFormListByOrderId(this.orderId);
244
-                console.log('这里是收件列表', res)
245
-                this.receiptList = res.data || [];
246
-            } catch (error) {
247
-                console.error("获取收单列表失败:", error);
248
-                uni.$u.toast("获取收单列表失败");
249
-            }
250
-        },
257
+        // async fetchReceiptList() {
258
+        //     try {
259
+        //         const res = await uni.$u.api.clueReceiptFormListByOrderId(this.orderId);
260
+        //         console.log('这里是收件列表', res.data)
261
+        //         this.receiptList = res.data || [];
262
+        //     } catch (error) {
263
+        //         console.error("获取收单列表失败:", error);
264
+        //         uni.$u.toast("获取收单列表失败");
265
+        //     }
266
+        // },
251 267
 
252 268
         //获取跟进记录
253 269
         async getFollowUpList() {

+ 71 - 45
pages/orderDetailNew/components/pageFour.vue

@@ -134,7 +134,7 @@
134 134
                             <text class="header-text">操作</text>
135 135
                         </u-col>
136 136
                     </u-row>
137
-                    <u-row v-for="(item, index) in profitSharingList" :key="item.id" class="split-table-row">
137
+                    <u-row v-for="(item, index) in profitSharingList" :key="item.uuid" class="split-table-row">
138 138
                         <u-col span="4">
139 139
                             <view class="table-cell">
140 140
                                 <!-- <select v-model="item.deptId" class="custom-select">
@@ -185,8 +185,8 @@
185 185
                         </u-col>
186 186
                         <u-col span="2" class="action-column">
187 187
                             <view class="table-cell">
188
-                                <u-button type="error" plain shape="circle" size="mini" @click="deleteRow(item.id)"
189
-                                    class='delectBtn'>
188
+                                <u-button type="error" plain shape="circle" size="mini"
189
+                                    @click="deleteRow(item.id, item.uuid)" class='delectBtn'>
190 190
                                     <u-icon name="trash" size="20rpx" color="#ff6b6b"></u-icon>
191 191
                                 </u-button>
192 192
                             </view>
@@ -226,16 +226,17 @@ export default {
226 226
             type: Object,
227 227
             default: () => { },
228 228
         },
229
-        receiptList: {
230
-            type: Array,
229
+        currentReceipt: {
230
+            type: Object,
231 231
             default: () => { },
232 232
         },
233 233
     },
234 234
 
235 235
     watch: {
236
-        receiptList: {
236
+        currentReceipt: {
237 237
             handler(newVal) {
238 238
                 if (newVal) {
239
+                    console.log('这里是page4', newVal)
239 240
                     // "searchValue": null,
240 241
                     // "createBy": "12234",
241 242
                     // "createTime": "2025-12-25 13:39:25",
@@ -275,11 +276,11 @@ export default {
275 276
                     // "bankCardNumber": "333",
276 277
                     // "bankName": "222",
277 278
                     // "customName": "111"
278
-                    const data = newVal[0]
279
+                    const data = newVal
279 280
                     this.warehouseInfo = {
280 281
                         codeStorage: data.code,//编码
281 282
                         expressOrderNo: data.expressOrderNo || '',//快递单号
282
-                        uploadedImage: data.receiptRemark.split(';')[1] || '',//物流图片 截取备注第二部分
283
+                        uploadedImage: data.receiptRemark?.split(';')[1] || '',//物流图片 截取备注第二部分
283 284
                         item: data.item || '',//收单物品
284 285
                         checkCodeFee: data.checkCodeFee || '',//查码费
285 286
                         watchPrice: data.tableFee || '',//表款
@@ -287,10 +288,10 @@ export default {
287 288
                         freight: data.freight || '',//运费
288 289
                         repairAmount: data.repairAmount || '',//维修金额
289 290
                         grossPerformance: data.grossPerformance || '',//毛业绩
290
-                        remarks: data.receiptRemark.split(';')[0] || '',//收单备注  截取备注第一部分
291
+                        remarks: data.receiptRemark?.split(';')[0] || '',//收单备注  截取备注第一部分
291 292
                     }
292 293
                     this.$nextTick(() => {
293
-                        this.getList()
294
+                        this.getShareList()
294 295
                     })
295 296
                 }
296 297
             },
@@ -366,6 +367,7 @@ export default {
366 367
                 orgName: '',
367 368
                 userName: '',
368 369
                 id: '',
370
+                uuid: Math.random()//唯一标识,仅vfor使用
369 371
             });
370 372
             // 重新计算所有行的比例
371 373
         },
@@ -399,31 +401,45 @@ export default {
399 401
         },
400 402
 
401 403
         // 确认入库方法
402
-        async confirmWarehouseEntry() {
404
+        confirmWarehouseEntry() {
403 405
 
406
+            console.log('确认入库', this.orderDetail.id)
404 407
 
405
-            //上传物流表单数据
406
-            this.$emit('confirmInterStore', {
407
-                warehouseInfo: this.warehouseInfo,
408
+            uni.showModal({
409
+                title: '确认入库',
410
+                content: `是否确认入库改订单:${this.orderDetail.item}?`,
411
+                success: async (res) => {
412
+                    if (res.confirm) {
413
+                        await uni.$u.api.oderForm({
414
+                            status: "3",
415
+                            id: this.orderDetail.id,
416
+                        });
417
+
418
+                        //上传物流表单数据
419
+                        this.$emit('confirmInterStore', {
420
+                            warehouseInfo: this.warehouseInfo,
421
+                        })
422
+
423
+                        //上传分成数据
424
+                        await this.addShare()
425
+
426
+                        this.$refs.uToast.show({
427
+                            type: "success",
428
+                            message: "入库成功",
429
+                            iconUrl: "https://uviewui.com/demo/toast/success.png",
430
+                            complete() {
431
+                                uni.navigateTo({
432
+                                    url: '/pages/pagereceivecenter/pagereceivecenter',
433
+                                })
434
+                            },
435
+                        });
436
+
437
+                    } else if (res.cancel) {
438
+                        // 用户点击了取消,不执行任何操作
439
+                        uni.$u.toast('已取消入库');
440
+                    }
441
+                }
408 442
             })
409
-
410
-            //上传分成数据
411
-            await this.addShare()
412
-
413
-            this.$refs.uToast.show({
414
-                type: "success",
415
-                message: "入库成功",
416
-                iconUrl: "https://uviewui.com/demo/toast/success.png",
417
-                complete() {
418
-                    uni.navigateTo({
419
-                        url: '/pages/pagereceivecenter/pagereceivecenter',
420
-                    })
421
-                },
422
-            });
423
-
424
-            //跳转接单
425
-
426
-
427 443
         },
428 444
 
429 445
         // 获取分成人名单
@@ -435,12 +451,15 @@ export default {
435 451
         },
436 452
 
437 453
         //初始化分成比例
438
-        async getList() {
454
+        async getShareList() {
439 455
             const { rows, total } = await uni.$u.api.selectCommissionList({
440 456
                 pageSize: 9999,
441 457
                 pageNum: 1,
442
-            }, { sendFormId: this.receiptList[0].sendFormId, });
458
+            }, { sendFormId: this.currentReceipt.sendFormId, });
443 459
             console.log('分成比例表格数据', rows)
460
+            rows.map(item => {
461
+                item.uuid = Math.random()//唯一标识
462
+            })
444 463
             this.profitSharingList = rows
445 464
         },
446 465
 
@@ -450,15 +469,16 @@ export default {
450 469
 
451 470
 
452 471
 
472
+        //上传分成
453 473
         addShare() {
454 474
             this.profitSharingList.forEach(async item => {
455 475
                 const data = {
456 476
                     id: item.id || '',
457 477
                     accountType: item.accountType == '1' ? 1 : 2,
458
-                    clueId: this.receiptList[0].clueId,
478
+                    clueId: this.currentReceipt.clueId,
459 479
                     commissionRate: item.commissionRate,
460 480
                     isCompanyPerformance: item.isCompanyPerformance == '1' ? 1 : 2,
461
-                    sendFormId: this.receiptList[0].sendFormId,
481
+                    sendFormId: this.currentReceipt.sendFormId,
462 482
                     userId: item.userId,
463 483
                     userName: item.userName,
464 484
                 }
@@ -472,13 +492,19 @@ export default {
472 492
             });
473 493
         },
474 494
 
475
-        //删除分成ok
476
-        async deleteRow(id) {
477
-            console.log(id, 'id')
495
+        //删除分成
496
+        async deleteRow(id, uuid) {
497
+            console.log(id, 'id', uuid, 'uuid')
498
+            //如果没有id说明是新增的,直接删除数组中的项
499
+            if (!id) {
500
+                this.profitSharingList = this.profitSharingList.filter(item => item.uuid != uuid)
501
+                uni.$u.toast('删除成功')
502
+                return
503
+            }
478 504
             try {
479 505
                 await uni.$u.api.deleteClueCommissionForm(id)
480 506
                 uni.$u.toast('删除成功')
481
-                this.getList()
507
+                this.getShareList()
482 508
             } catch (error) {
483 509
                 uni.$u.toast('删除失败,请稍后重试')
484 510
             }
@@ -486,14 +512,14 @@ export default {
486 512
 
487 513
         //打开选择框
488 514
         handleSelectOrg(item) {
489
-            console.log(item.id, '当前选择的行的id')
490
-            this.currentEditItem = item.id
515
+            console.log(item.uuid, '当前选择的行的uuid')
516
+            this.currentEditItem = item.uuid
491 517
             this.showOrgPicker = true
492 518
         },
493 519
         //选择当前的分成人
494 520
         handleSelectPerson(item) {
495 521
             console.log(item, '当前选择的行')
496
-            this.currentEditItem = item.id
522
+            this.currentEditItem = item.uuid
497 523
             //获取当前选择组织的分成人名单
498 524
             // 获取当前行的关联id
499 525
             const deptId = item.deptId
@@ -512,7 +538,7 @@ export default {
512 538
             console.log(value, '选择的组织')
513 539
             //把值赋值给当前行
514 540
             this.profitSharingList.forEach(item => {
515
-                if (item.id == this.currentEditItem) {
541
+                if (item.uuid == this.currentEditItem) {
516 542
                     item.orgName = value[0].label
517 543
                     item.deptId = value[0].id
518 544
                     // item.personOptions = value[0].children
@@ -531,7 +557,7 @@ export default {
531 557
             console.log(value, '选择的人')
532 558
             //把值赋值给当前行
533 559
             this.profitSharingList.forEach(item => {
534
-                if (item.id == this.currentEditItem) {
560
+                if (item.uuid == this.currentEditItem) {
535 561
                     item.userName = value[0].label
536 562
                     item.userId = value[0].id
537 563
                 }

+ 53 - 30
pages/orderDetailNew/components/pageOne.vue

@@ -19,7 +19,7 @@
19 19
                         <pic-comp :src="item.fileUrl"></pic-comp>
20 20
                         <view class="delete-btn" @click="deleteImage(item)">×</view>
21 21
                     </view>
22
-                    <view class="upload-btn" @click="uploadImage('truePic')">
22
+                    <view class="upload-btn" @click="uploadImage('truePic', currentReceipt.id)">
23 23
                         <u-icon name="plus" size="40" color="#999"></u-icon>
24 24
                     </view>
25 25
                 </view>
@@ -36,7 +36,7 @@
36 36
                         <pic-comp :src="item.fileUrl"></pic-comp>
37 37
                         <view class="delete-btn" @click="deleteImage(item)">×</view>
38 38
                     </view>
39
-                    <view class="upload-btn" @click="uploadImage('chatRecords')">
39
+                    <view class="upload-btn" @click="uploadImage('chatRecords', currentReceipt.id)">
40 40
                         <u-icon name="plus" size="40" color="#999"></u-icon>
41 41
                     </view>
42 42
                 </view>
@@ -101,7 +101,11 @@ export default {
101 101
         orderId: {
102 102
             type: String,
103 103
             default: '',
104
-        }
104
+        },
105
+        currentReceipt: {
106
+            type: Object,
107
+            default: () => { },
108
+        },
105 109
     },
106 110
     components: {
107 111
         picComp
@@ -119,12 +123,21 @@ export default {
119 123
         // 监听 props 变化,触发请求
120 124
         orderDetail: {
121 125
             handler(newVal) {
122
-                if (newVal) { // 确保 props 有值再执行
123
-                    this.getList('2', '1');
124
-                    this.getList('2', '2');
126
+                if (newVal) {
127
+                    console.log('orderDetail 变化了', newVal);
125 128
                 }
126 129
             }
127
-        }
130
+        },
131
+        currentReceipt: {
132
+            handler(newVal) {
133
+                console.log('currentReceipt 变化了', newVal);
134
+                if (newVal) {
135
+                    //刷新图片列表
136
+                    this.getList('2', '1', newVal.id, this.orderDetail.itemBrand);
137
+                    this.getList('2', '2', newVal.id, this.orderDetail.itemBrand);
138
+                }
139
+            }
140
+        },
128 141
     },
129 142
     methods: {
130 143
 
@@ -139,16 +152,26 @@ export default {
139 152
             console.log('电话卡片被点击', '电话号码:', this.orderDetail.phone)
140 153
             if (this.orderDetail.phone) {
141 154
                 //拨打电话
142
-                uni.makePhoneCall({
143
-                    phoneNumber: this.orderDetail.phone,
155
+                // uni.makePhoneCall({
156
+                //     phoneNumber: this.orderDetail.phone,
157
+                //     success: () => {
158
+                //         this.$store.commit("call/SET_FORM", {
159
+                //             clueId: this.orderDetail.clueId,
160
+                //             type: "3",
161
+                //             callee: this.orderDetail.phone,
162
+                //         });
163
+                //     },
164
+                // });
165
+                //先暂时复制电话号码
166
+                uni.setClipboardData({
167
+                    data: this.orderDetail.phone,
144 168
                     success: () => {
145
-                        this.$store.commit("call/SET_FORM", {
146
-                            clueId: this.orderDetail.clueId,
147
-                            type: "3",
148
-                            callee: this.orderDetail.phone,
149
-                        });
150
-                    },
151
-                });
169
+                        uni.showToast({
170
+                            title: '电话号码已复制',
171
+                            icon: 'none'
172
+                        })
173
+                    }
174
+                })
152 175
             } else {
153 176
                 uni.showToast({
154 177
                     title: '该订单暂时没有电话号码',
@@ -180,20 +203,20 @@ export default {
180 203
         // 下一步
181 204
         handleNextClick() {
182 205
             // 校验表单
183
-            if (!this.form.truePic.length) {
184
-                uni.showToast({
185
-                    title: '请上传实物图',
186
-                    icon: 'none'
187
-                })
188
-                return
189
-            }
190
-            if (!this.form.chatRecords.length) {
191
-                uni.showToast({
192
-                    title: '请上传聊天记录',
193
-                    icon: 'none'
194
-                })
195
-                return
196
-            }
206
+            // if (!this.form.truePic.length) {
207
+            //     uni.showToast({
208
+            //         title: '请上传实物图',
209
+            //         icon: 'none'
210
+            //     })
211
+            //     return
212
+            // }
213
+            // if (!this.form.chatRecords.length) {
214
+            //     uni.showToast({
215
+            //         title: '请上传聊天记录',
216
+            //         icon: 'none'
217
+            //     })
218
+            //     return
219
+            // }
197 220
             this.$emit('handleNextClick', {
198 221
                 nowPage: 'formOne',
199 222
                 form: this.form,

+ 42 - 19
pages/orderDetailNew/components/pageThree.vue

@@ -56,7 +56,7 @@
56 56
                         </view>
57 57
 
58 58
                         <!-- 上传按钮 -->
59
-                        <view class="detail-upload-btn" @click="uploadImage('detailImages')">
59
+                        <view class="detail-upload-btn" @click="uploadImage('detailImages', currentReceipt.id)">
60 60
                             <u-icon name="plus" size="40rpx" color="#999"></u-icon>
61 61
                         </view>
62 62
                     </view>
@@ -150,8 +150,8 @@ export default {
150 150
             type: String,
151 151
             default: '',
152 152
         },
153
-        receiptList: {
154
-            type: Array,
153
+        currentReceipt: {
154
+            type: Object,
155 155
             default: () => { },
156 156
         },
157 157
     },
@@ -164,16 +164,16 @@ export default {
164 164
                     this.paymentInfo.bankAccount = newVal.bankCardNumber || ''
165 165
                     this.paymentInfo.idNumber = newVal.idCard || ''
166 166
                     this.paymentAmount = newVal.tableFee || '0.00'
167
-                    this.getList('2', '3');
168 167
                 }
169 168
             },
170 169
             deep: true,
171 170
         },
172
-        receiptList: {
171
+        currentReceipt: {
173 172
             handler(newVal) {
174 173
                 if (newVal) {
175
-                    console.log('这里是page3的', newVal[0].tableFee)
176
-                    this.paymentAmount = newVal[0].tableFee || '0.00'
174
+                    console.log('这里是page3的', newVal.tableFee)
175
+                    this.paymentAmount = newVal.tableFee || '0.00'
176
+                    this.getList('2', '3', newVal.id, this.orderDetail.itemBrand);
177 177
                 }
178 178
             },
179 179
             deep: true,
@@ -364,19 +364,7 @@ export default {
364 364
             });
365 365
         },
366 366
 
367
-        // 确认未收按钮点击事件
368
-        confirmUnpaid() {
369
-            console.log('确认未收,评分:', this.unpaidRating);
370
-            this.unpaidModelShow = false;
371
-            // 可以在这里添加提交评分的逻辑
372
-        },
373 367
 
374
-        // 确认跟进细节按钮点击事件
375
-        confirmFollowUp() {
376
-            console.log('确认跟进细节:', this.followUpNotes);
377
-            this.followUpModelShow = false;
378
-            // 可以在这里添加提交跟进细节的逻辑
379
-        },
380 368
 
381 369
         // 确认转账按钮点击事件
382 370
         confirmTransfer() {
@@ -396,6 +384,41 @@ export default {
396 384
                 }
397 385
             });
398 386
         },
387
+
388
+        // 确认未收按钮点击事件
389
+        async confirmUnpaid() {
390
+            console.log('确认未收,评分:', this.unpaidRating);
391
+            this.unpaidModelShow = false;
392
+            // 可以在这里添加提交评分的逻辑
393
+            // 未收的时候,提交一个跟进记录     未收评分_数字
394
+            const res = await uni.$u.api.addOrderFollow({
395
+                orderId: this.orderId,
396
+                content: `未收评分_${this.unpaidRating}`,
397
+            })
398
+            await uni.$u.api.oderForm({
399
+                status: "4",
400
+                id: this.orderId,
401
+            });
402
+
403
+            if (res.code == 200) {
404
+                uni.$u.toast('提交未收评级成功');
405
+            }
406
+        },
407
+
408
+        // 确认跟进细节按钮点击事件
409
+        async confirmFollowUp() {
410
+            console.log('确认跟进细节:', this.followUpNotes);
411
+            this.followUpModelShow = false;
412
+            // 可以在这里添加提交跟进细节的逻辑
413
+            // 未收的时候,提交一个跟进记录     待跟进_内容
414
+            const res = await uni.$u.api.addOrderFollow({
415
+                orderId: this.orderId,
416
+                content: `待跟进_${this.followUpNotes}`,
417
+            })
418
+            if (res.code == 200) {
419
+                uni.$u.toast('提交待跟进记录成功');
420
+            }
421
+        },
399 422
     }
400 423
 }
401 424
 </script>

+ 14 - 5
pages/orderDetailNew/components/pageTwo.vue

@@ -114,7 +114,7 @@
114 114
                             <pic-comp :src="item.fileUrl"></pic-comp>
115 115
                             <view class="detail-delete-btn" @click="deleteImage(item)">×</view>
116 116
                         </view>
117
-                        <view class="detail-upload-btn" @click="uploadImage('detailImages')">
117
+                        <view class="detail-upload-btn" @click="uploadImage('detailImages', currentReceipt.id)">
118 118
                             <u-icon name="plus" size="40rpx" color="#999"></u-icon>
119 119
                         </view>
120 120
                     </view>
@@ -144,14 +144,16 @@ export default {
144 144
             type: Array,
145 145
             default: () => [],
146 146
         },
147
+        currentReceipt: {
148
+            type: Object,
149
+            default: () => { },
150
+        },
147 151
 
148 152
     },
149 153
     watch: {
150 154
         orderDetail: {
151 155
             handler(newVal) {
152 156
                 if (newVal) {
153
-                    this.approvedPrice = Number(newVal.itemPrice) || 0;
154
-                    this.getList('2', '3');
155 157
                 }
156 158
             },
157 159
             deep: true,
@@ -167,6 +169,15 @@ export default {
167 169
             },
168 170
             deep: true,
169 171
         },
172
+        currentReceipt: {
173
+            handler(newVal) {
174
+                if (newVal) {
175
+                    this.approvedPrice = Number(newVal.sellingPrice) || 0;
176
+                    this.getList('2', '3', newVal.id, this.orderDetail.itemBrand);
177
+                }
178
+            },
179
+            deep: true,
180
+        },
170 181
     },
171 182
     components: {
172 183
         picComp
@@ -278,7 +289,6 @@ export default {
278 289
                 const data = `师傅拍图技巧;${photoTips};${urls}`;
279 290
                 console.log('urls9999999', data)
280 291
 
281
-                // 调用接口上传
282 292
                 await uni.$u.api.addOrderFollow({
283 293
                     orderId: this.orderId,
284 294
                     content: data,
@@ -291,7 +301,6 @@ export default {
291 301
 
292 302
 
293 303
                 const data = `到达客户面对面;${face2faceNotes};${urls}`;
294
-                // 调用接口上传
295 304
 
296 305
                 await uni.$u.api.addOrderFollow({
297 306
                     orderId: this.orderId,

+ 167 - 27
pages/orderDetailNew/index.vue

@@ -19,9 +19,33 @@
19 19
             </template>
20 20
         </u-navbar>
21 21
 
22
-        <orderDetailNewView :detail="receiptDetail" :topInfo="topInfo" :orderId="orderId" />
23 22
 
24
-        <!-- 通用模态窗 -->
23
+        <u-tabs keyName="brand" :list="receiptList" @click="clickReceipt"></u-tabs>
24
+
25
+
26
+        <orderDetailNewView :detail="receiptDetail" :topInfo="topInfo" :orderId="orderId"
27
+            :currentReceipt="currentReceipt" />
28
+
29
+
30
+
31
+        <!-- 加一单选择模态窗 -->
32
+        <u-modal :show="addOneModelShow" :title="'加一单'" showCancelButton @cancel="addOneModelShow = false"
33
+            @confirm="handleAddOneConfirm">
34
+            <u-button type="primary" plain @click="showBrandSelector = true;"
35
+                :text="currentAddBrand.dictLabel || '点击请选择品牌'"></u-button>
36
+        </u-modal>
37
+        <!-- 加一单品牌选择器 -->
38
+        <u-picker :show="showBrandSelector" @confirm="handleBrandConfirm" :columns="brandColumns"
39
+            @cancel='showBrandSelector = false' keyName="dictLabel"></u-picker>
40
+
41
+
42
+
43
+        <!-- 修改当前品牌选择器 -->
44
+        <u-picker :show="editBrandSelector" @confirm="handleEditBrandConfirm" :columns="brandColumns"
45
+            @cancel='editBrandSelector = false' keyName="dictLabel"></u-picker>
46
+
47
+
48
+        <!-- 修改当前型号、价格弹窗 -->
25 49
         <custom-modal :visible="modalVisible" :title="modalConfig.title" :value="modalConfig.value"
26 50
             :placeholder="modalConfig.placeholder" @cancel="handleModalCancel" @confirm="handleModalConfirm" />
27 51
     </view>
@@ -39,11 +63,10 @@ export default {
39 63
     data() {
40 64
         return {
41 65
             topInfo: {
42
-                brand: 'Hermes',
43
-                model: 'Birkin 30',
44
-                price: '125,000'
66
+                brand: '',
67
+                model: '',
68
+                price: ''
45 69
             },
46
-            modalVisible: false,
47 70
             currentEditField: '',
48 71
             modalConfig: {
49 72
                 title: '',
@@ -56,6 +79,25 @@ export default {
56 79
             clueId: '',
57 80
             // 订单详情
58 81
             receiptDetail: {},
82
+
83
+            //接单单个订单的receiptList
84
+            receiptList: [],
85
+            //当前选中的收单订单
86
+            currentReceipt: {},
87
+            // 新加一件的信息
88
+            addOneModelShow: false,
89
+            showBrandSelector: false,
90
+            checkModel: {
91
+                brand: '',
92
+            },
93
+            brandColumns: [
94
+                []
95
+            ],
96
+            //当前选择的品牌
97
+            currentAddBrand: {},
98
+            //修改当前品牌选择器
99
+            editBrandSelector: false,
100
+            modalVisible: false,
59 101
         }
60 102
     },
61 103
     onLoad(option) {
@@ -69,43 +111,109 @@ export default {
69 111
 
70 112
         //查询订单详情
71 113
         this.getOrderDetail();
114
+        //获取收单列表
115
+        this.getReceiptList();
116
+
117
+
72 118
     },
73 119
     methods: {
74 120
         handleBrandClick() {
75
-            this.openModal('brand', '请输入品牌', this.topInfo.brand, '请输入品牌')
121
+            //修改当前选中订单的品牌brand
122
+            //打开品牌选择器
123
+            this.editBrandSelector = true
124
+
125
+            //获取品牌列表
126
+            this.$getDicts('crm_form_brand').then(res => {
127
+                this.brandColumns = [res]
128
+            })
76 129
         },
77 130
         handleModelClick() {
78
-            this.openModal('model', '请输入型号', this.topInfo.model, '请输入型号')
131
+            //修改当前选中订单的型号model
132
+            //打开型号修改弹窗
133
+            this.modalConfig = {
134
+                title: '修改型号',
135
+                value: this.currentReceipt.model,
136
+                placeholder: '请输入型号'
137
+            }
138
+            this.currentEditField = 'model'
139
+            this.modalVisible = true
140
+
79 141
         },
80 142
         handlePriceClick() {
81
-            this.openModal('price', '请输入价格', this.topInfo.price, '请输入价格')
82
-        },
83
-        openModal(field, title, value, placeholder) {
84
-            this.currentEditField = field
143
+            //修改当前选中订单的价格sellingPrice
144
+            //打开价格修改弹窗
85 145
             this.modalConfig = {
86
-                title,
87
-                value,
88
-                placeholder
146
+                title: '修改价格',
147
+                value: this.currentReceipt.sellingPrice?.toString(),
148
+                placeholder: '请输入价格'
89 149
             }
150
+            this.currentEditField = 'price'
90 151
             this.modalVisible = true
91 152
         },
92
-        handleModalInput(value) {
93
-            this.modalConfig.value = value
153
+
154
+        async handleModalConfirm(value) {
155
+            console.log('修改的当前的', this.currentEditField, '是', value)
156
+            if (this.currentEditField === 'model') {
157
+                //修改当前选中receiptDetail的型号
158
+                const res = await uni.$u.api.updateReceiptForm({
159
+                    model: value,
160
+                    id: this.currentReceipt.id
161
+                });
162
+                if (res.code == 200) {
163
+                    uni.$u.toast('修改成功')
164
+                }
165
+            } else if (this.currentEditField === 'price') {
166
+                //修改当前选中receiptDetail的价格
167
+                const res = await uni.$u.api.updateReceiptForm({
168
+                    sellingPrice: value,
169
+                    id: this.currentReceipt.id
170
+                });
171
+                if (res.code == 200) {
172
+                    uni.$u.toast('修改成功')
173
+                }
174
+            }
175
+            this.getReceiptList();
176
+            this.modalVisible = false
94 177
         },
95 178
         handleModalCancel() {
96 179
             this.modalVisible = false
97
-            this.currentEditField = ''
98 180
         },
99
-        handleModalConfirm(newValue) {
100
-            if (this.currentEditField) {
101
-                this.topInfo[this.currentEditField] = newValue
102
-            }
103 181
 
104
-            this.modalVisible = false
105
-            this.currentEditField = ''
106
-        },
107
-        handleAddClick() {
182
+
183
+        async handleAddClick() {
184
+
108 185
             console.log('加一单')
186
+            //判断如果当前有收单的id是‘’的话,说明是新增的收单订单
187
+            //打开模态窗
188
+            //选择品牌,型号。价格
189
+            this.addOneModelShow = true
190
+
191
+            this.$getDicts('crm_form_brand').then(res => {
192
+                console.log('品牌', res)
193
+                this.brandColumns = [res]
194
+            })
195
+        },
196
+        async handleEditBrandConfirm(data) {
197
+            console.log('修改的当前的品牌是', data.value[0])
198
+            console.log('修改的当前的品牌的value是', data.value[0].dictValue)
199
+
200
+            //修改当前选中receiptDetail的品牌
201
+            const res = await uni.$u.api.updateReceiptForm({
202
+                brand: data.value[0].dictValue,
203
+                id: this.currentReceipt.id
204
+            });
205
+            if (res.code === 200) {
206
+                uni.$u.toast('修改成功')
207
+            }
208
+            this.getReceiptList();
209
+            this.editBrandSelector = false
210
+        },
211
+        handleBrandConfirm(data) {
212
+            console.log('选择的品牌', data.value[0])
213
+            this.currentAddBrand = data.value[0]
214
+            this.checkModel.brand = this.currentAddBrand.dictLabel
215
+            //关闭品牌选择器
216
+            this.showBrandSelector = false
109 217
         },
110 218
 
111 219
         //查询订单详情
@@ -114,10 +222,42 @@ export default {
114 222
                 .getClueSendFormVoByOrderId({
115 223
                     id: this.orderId,
116 224
                 })
117
-            console.log('订单详情', res);
225
+            console.log('订单详情', res.data);
118 226
             if (res.code === 200) {
119 227
                 this.receiptDetail = res.data;
120 228
             }
229
+        },
230
+        //获取收单列表
231
+        async getReceiptList() {
232
+            const res = await uni.$u.api.clueReceiptFormListByOrderId(this.orderId);
233
+            console.log('这里是收件列表page', res)
234
+            if (res.code === 200) {
235
+                this.receiptList = res.data || [];
236
+            }
237
+
238
+            // this.currentReceipt = this.receiptList[0] || {};
239
+            this.clickReceipt(this.receiptList[0])
240
+        },
241
+        clickReceipt(item) {
242
+            // console.log('点击了', item);
243
+            this.currentReceipt = item;
244
+            console.log(item)
245
+            this.topInfo.brand = item.brand || '暂无';
246
+            this.topInfo.model = item.model || '暂无';
247
+            this.topInfo.price = item.sellingPrice || '暂无';
248
+        },
249
+        async handleAddOneConfirm() {
250
+            console.log('确认添加', this.currentAddBrand)
251
+
252
+            //调新加一单的接口
253
+            await uni.$u.api.addReceiptForm({
254
+                brand: this.currentAddBrand.dictValue,
255
+                sendFormId: this.orderId,
256
+            })
257
+            //刷新收单列表
258
+            this.getReceiptList();
259
+            //关闭模态窗
260
+            this.addOneModelShow = false
121 261
         }
122 262
     }
123 263
 }

+ 38 - 20
pages/orderDetailNew/mixin/imgUploadAndDownLoad.js

@@ -25,21 +25,22 @@ export default {
25 25
                             })
26 26
                         }
27 27
                         // 删除成功后刷新列表
28
-                        this.getList('2', '1');
29
-                        this.getList('2', '2');
30
-                        this.getList('2', '3');
28
+                        this.getList('2', '1', this.currentReceipt.id, this.orderDetail.itemBrand);
29
+                        this.getList('2', '2', this.currentReceipt.id, this.orderDetail.itemBrand);
30
+                        this.getList('2', '3', this.currentReceipt.id, this.orderDetail.itemBrand);
31 31
                     }
32 32
                 }
33 33
             })
34 34
         },
35 35
         //获取文件列表
36
-        async getList(type, orderFileType) {
37
-            console.log('获取文件列表', type, orderFileType)
38
-
36
+        async getList(type, orderFileType, receiptID, itemBrand) {
37
+            console.log('获取文件列表', type, receiptID)
38
+            // console.log('当前的订单id', this.orderDetail.id)
39
+            // console.log('当前的收单id', this.currentReceipt.id)
39 40
             try {
40 41
                 const params = {
41 42
                     clueId: this.orderDetail.clueId,
42
-                    sourceId: this.orderId,
43
+                    sourceId: this.currentReceipt.id,//默认先用receiptID查,如果没有返回情况下用orderID查
43 44
                     type,
44 45
                     orderFileType,
45 46
                     isDuplicate: '1',//先传1
@@ -48,20 +49,35 @@ export default {
48 49
                 }
49 50
                 const response = await uni.$u.api.selectClueFileByDto(params)
50 51
                 if (orderFileType == '1') {
51
-                    this.trueUploadList = response.rows || []
52
+                    //如果itemBrand里面有逗号的话说明是多个品牌
53
+
54
+                    if (itemBrand.indexOf(',') != -1) {
55
+                        this.trueUploadList = response.rows.filter(item => item.sourceId == receiptID) || []
56
+                    } else {
57
+                        this.trueUploadList = response.rows
58
+                    }
52 59
                 } else if (orderFileType == '2') {
53
-                    this.chatRecordsUploadList = response.rows || []
60
+                    if (itemBrand.indexOf(',') != -1) {
61
+                        this.chatRecordsUploadList = response.rows.filter(item => item.sourceId == receiptID) || []
62
+                    } else {
63
+                        this.chatRecordsUploadList = response.rows
64
+                    }
54 65
                 } else if (orderFileType == '3') {
55
-                    this.detailImages = response.rows || []
66
+                    if (itemBrand.indexOf(',') != -1) {
67
+                        this.detailImages = response.rows.filter(item => item.sourceId == receiptID) || []
68
+                    } else {
69
+                        this.detailImages = response.rows
70
+                    }
56 71
                 }
57 72
             } catch (error) {
58
-                uni.$u.toast(`获取列表失败:${error.message}`)
73
+                uni.$u.toast(`获取列表失败:${error}`)
59 74
                 this.trueUploadList = []
60 75
                 this.chatRecordsUploadList = []
61 76
             }
62 77
         },
63 78
         // 选择图片
64
-        uploadImage(type) {
79
+        uploadImage(type, receiptID) {
80
+            console.log('当前上传的receiptID是', receiptID)
65 81
             uni.chooseImage({
66 82
                 count: 9, // 最多选择9张
67 83
                 sizeType: ['compressed'], // 压缩图片
@@ -69,7 +85,7 @@ export default {
69 85
                 success: (res) => {
70 86
                     const tempFilePaths = res.tempFilePaths
71 87
                     console.log('上传的图片路径:11', tempFilePaths)
72
-                    this.uploadToServer(tempFilePaths, type)
88
+                    this.uploadToServer(tempFilePaths, type, receiptID)
73 89
                 },
74 90
                 fail: (err) => {
75 91
                     console.error('选择图片失败:', err)
@@ -77,7 +93,7 @@ export default {
77 93
             })
78 94
         },
79 95
         // 上传到服务器
80
-        async uploadToServer(filePaths, type) {
96
+        async uploadToServer(filePaths, type, receiptID) {
81 97
             // 实际的上传逻辑
82 98
             try {
83 99
                 //实物图的话就是1,聊天记录的话就是2,高清细节图的话就是3
@@ -85,11 +101,11 @@ export default {
85 101
                 console.log('当前上传的图片类型是', p)
86 102
                 const res = await Promise.all(filePaths.map(filePath => this.uploadFile(filePath, p)));
87 103
 
88
-                this.bindOrder(p);
104
+                this.bindOrder(p, receiptID);
89 105
 
90
-                this.getList('2', '1');
91
-                this.getList('2', '2');
92
-                this.getList('2', '3');
106
+                this.getList('2', '1', this.currentReceipt.id, this.orderDetail.itemBrand);
107
+                this.getList('2', '2', this.currentReceipt.id, this.orderDetail.itemBrand);
108
+                this.getList('2', '3', this.currentReceipt.id, this.orderDetail.itemBrand);
93 109
 
94 110
 
95 111
             } catch (error) {
@@ -124,11 +140,13 @@ export default {
124 140
             }
125 141
         },
126 142
         //绑定订单
127
-        async bindOrder(orderFileType) {
143
+        async bindOrder(orderFileType, receiptID) {
144
+            console.log('当前的收单id', receiptID)
128 145
             const res = await uni.$u.api.saveClueFile({
129 146
                 clueId: this.orderDetail.clueId,//线索id
130 147
                 list: this.bindList,
131
-                sourceId: this.orderId,//订单id,sendformid
148
+                // sourceId: this.orderId,//订单id,sendformid,之前是绑定在orderId上面,现在要修改绑定到receiptID上面
149
+                sourceId: receiptID,//receiptId,绑定的收单id
132 150
                 type: '2',
133 151
                 orderFileType: orderFileType
134 152
             });

+ 107 - 10
pages/pagereceivecenter/pagereceivecenter.vue

@@ -13,6 +13,12 @@ export default {
13 13
                 pageNum: 1,
14 14
                 total: 0
15 15
             },
16
+            tagModalVisible: false,
17
+            tagList: [],
18
+            currentTags: [],
19
+            currentOrder: {},
20
+            followUpModelShow: false,
21
+            followUpNotes: '',
16 22
         }
17 23
     },
18 24
     onLoad() {
@@ -55,9 +61,24 @@ export default {
55 61
                 //去接单
56 62
                 console.log('去接单', order)
57 63
 
58
-                //跳转接单form
59
-                uni.navigateTo({
60
-                    url: `/pages/orderDetailNew/index?orderId=${order.id}&item=${order.item}&type=${this.type}&clueId=${order.clueId}`,
64
+                //打开模态窗二次确认,确认后跳转接单form
65
+                uni.showModal({
66
+                    title: '确认接单',
67
+                    content: `是否确认接单订单:${order.item}?`,
68
+                    success: async (res) => {
69
+                        if (res.confirm) {
70
+                            await uni.$u.api.oderForm({
71
+                                status: "2",
72
+                                id: order.id,
73
+                            });
74
+                            uni.navigateTo({
75
+                                url: `/pages/orderDetailNew/index?orderId=${order.id}&item=${order.item}&type=${this.type}&clueId=${order.clueId}`,
76
+                            })
77
+                        } else if (res.cancel) {
78
+                            // 用户点击了取消,不执行任何操作
79
+                            uni.$u.toast('已取消接单');
80
+                        }
81
+                    }
61 82
                 })
62 83
             } else if (btnType == 'isBusy') {
63 84
                 //在忙
@@ -71,24 +92,42 @@ export default {
71 92
             } else if (btnType == 'willFollow') {
72 93
                 //待跟进
73 94
                 console.log('待跟进', order)
95
+                //打开模态窗
96
+                this.followUpModelShow = true;
97
+                this.currentOrder = order
74 98
             } else if (btnType == 'tag') {
75 99
                 //打标签
76 100
                 console.log('打标签', order)
101
+                //打开模态窗
102
+                this.tagModalVisible = true;
103
+                this.getAllTags();
104
+                this.currentTags = order.tags.map(tag => tag.id);
105
+                this.currentOrder = order
77 106
             } else if (btnType == 'share') {
78 107
                 //一键分享
79 108
                 console.log('一键分享', order)
80 109
             } else if (btnType == 'oneFollow') {
81 110
                 //待跟进
82 111
                 console.log('待跟进', order)
112
+                this.followUpModelShow = true;
113
+                this.currentOrder = order
83 114
             }
84 115
         },
85 116
         // 跳转订单详情
86 117
         toOrderDetail(order) {
118
+            //点卡片看详情
119
+            // if (order.status == '1' || order.status == '2') {
87 120
             uni.navigateTo({
88 121
                 url: `/pages/orderDetailNew/index?orderId=${order.id}&item=${order.item}&type=${this.type}&clueId=${order.clueId}`,
89 122
             })
123
+            // } else {
124
+            //     uni.$u.toast('当前订单无法查看详情');
125
+            //     return;
126
+            // }
127
+
128
+
90 129
         },
91
-        
130
+
92 131
         //滑动加载
93 132
         scrolltolower() {
94 133
             console.log('到底了');
@@ -99,6 +138,44 @@ export default {
99 138
             this.getOrderList();
100 139
         },
101 140
 
141
+        //获取全部标签
142
+        async getAllTags() {
143
+            const res = await uni.$u.api.getClueTagGroupVoList({ tagGroupApplication: '2' })
144
+            console.log('全部标签', res.data[0].clueTagDataList)
145
+            this.tagList = res.data[0].clueTagDataList;
146
+        },
147
+        cancelTag() {
148
+            this.tagModalVisible = false;
149
+        },
150
+        async confirmTag() {
151
+            console.log('确认打标签', this.currentTags)
152
+            // 这里可以添加打标签的逻辑
153
+            const allTags = this.currentTags.map(tag => tag).join(',');
154
+            console.log('allTags', allTags)
155
+            await uni.$u.api.updateTags({
156
+                id: this.currentOrder.id,
157
+                allTags: allTags,
158
+            })
159
+            this.tagModalVisible = false;
160
+            uni.$u.toast('标签更新成功');
161
+            //更新当前订单的标签
162
+            this.currentOrder.tags = this.tagList.filter(tag => this.currentTags.includes(tag.id));
163
+        },
164
+
165
+        // 确认跟进细节按钮点击事件
166
+        async confirmFollowUp() {
167
+            console.log('确认跟进细节:', this.followUpNotes);
168
+            this.followUpModelShow = false;
169
+            // 可以在这里添加提交跟进细节的逻辑
170
+            // 未收的时候,提交一个跟进记录     待跟进_内容
171
+            const res = await uni.$u.api.addOrderFollow({
172
+                orderId: this.currentOrder.id,
173
+                content: `待跟进_${this.followUpNotes}`,
174
+            })
175
+            if (res.code == 200) {
176
+                uni.$u.toast('提交待跟进记录成功');
177
+            }
178
+        },
102 179
     }
103 180
 }
104 181
 </script>
@@ -113,16 +190,17 @@ export default {
113 190
                     <!-- <orderCard v-for="item in orderList" :key="item.receiptId + item.id" :order="item"
114 191
                         @handleBtnClick="handleBtnClick">
115 192
                     </orderCard> -->
116
-                    <view class="orderCard" v-for="item in orderList"  :key="item.receiptId + item.id" @click.stop="toOrderDetail(item)">
193
+                    <view class="orderCard" v-for="item in orderList" :key="item.receiptId + item.id"
194
+                        @click.stop="toOrderDetail(item)">
117 195
                         <view class="bandAndPrice">
118 196
                             <view class="bandName">{{ item.itemBrand || '暂无品牌' }}</view>
119
-                            <view class="price">¥{{ item.priceRange }}</view>
197
+                            <view class="price">¥{{ item.priceRange || '?' }}</view>
120 198
                         </view>
121 199
 
122 200
                         <view class="mainLind">
123
-                            <view class="mainLindImg">
124
-                                <image :src="'/static/acceptOrder/orderCardPic.jpg'" alt="" />
125
-                            </view>
201
+                            <!-- <view class="mainLindImg">
202
+                                <image :src="'/static/acceptOrder/orderCardPic.jpg'" v-if="item.src" />
203
+                            </view> -->
126 204
                             <view class="mainLindInfo">
127 205
                                 <view class="itemName">{{ item.item || '暂无项目' }}</view>
128 206
                                 <view>发单人:{{ item.createNickName || '未知' }}</view>
@@ -147,7 +225,8 @@ export default {
147 225
 
148 226
                             <view class="btnGroup"
149 227
                                 v-if="item && (item.status == '2' || item.status == null || item.status === undefined)">
150
-                                <view class="card-button willFollow" @click.stop="handleBtnClick('willFollow', item)">待跟进
228
+                                <view class="card-button willFollow" @click.stop="handleBtnClick('willFollow', item)">
229
+                                    待跟进
151 230
                                 </view>
152 231
                                 <view class="card-button isBusy" @click.stop="handleBtnClick('tag', item)">打标签</view>
153 232
                             </view>
@@ -175,7 +254,25 @@ export default {
175 254
 
176 255
 
177 256
 
257
+        <!-- 打标签模态窗 -->
258
+        <u-modal :show="tagModalVisible" title="选择标签" @confirm="confirmTag" @cancel="cancelTag">
259
+            <view class="slot-content">
260
+                <u-checkbox-group v-model="currentTags" placement="column">
261
+                    <u-checkbox :customStyle="{ marginBottom: '8px' }" v-for="(item, index) in tagList" :key="item.id"
262
+                        :label="item.name" :name="item.id">
263
+                    </u-checkbox>
264
+                </u-checkbox-group>
265
+            </view>
266
+        </u-modal>
267
+
268
+        <u-modal :show="followUpModelShow" :title="'填写跟进细节'" :showConfirmButton="false">
269
+            <view class="modal-content">
270
+                <u--textarea v-model="followUpNotes" placeholder="请输入情况" confirm-type="done"
271
+                    style="width: 400rpx; margin-bottom: 30rpx;"></u--textarea>
178 272
 
273
+                <u-button type="primary" size="large" @click="confirmFollowUp">确认</u-button>
274
+            </view>
275
+        </u-modal>
179 276
     </view>
180 277
 </template>
181 278
 

+ 2 - 2
store/modules/user.js

@@ -28,8 +28,8 @@ export default {
28 28
 		netConfig: {
29 29
 			// http://59.42.9.166:9520/proxy
30 30
 			// http://10.0.7.100:9500
31
-			ip: "https://crm.nanjingshiyu.com/prod-api", // ip
32
-			// ip: "https://crmtest.nanjingshiyu.com/prod-api", // 测试环境ip
31
+			// ip: "https://crm.nanjingshiyu.com/prod-api", // ip
32
+			ip: "https://crmtest.nanjingshiyu.com/prod-api", // 测试环境ip
33 33
 			// ip : "/api", // 测试环境ip
34 34
 			// ip : "http://47.113.184.101", // 测试环境ip
35 35
 			// ip: "http://172.16.7.200", // ip