Просмотр исходного кода

增加page2师傅拍图技巧练习师傅等和page4的物流图片上传和回写

Yannay месяцев назад: 2
Родитель
Сommit
691ae4f30e

+ 6 - 5
pages/orderDetailNew/components/orderDetailNewView.vue

@@ -5,7 +5,8 @@
5
             <pageOne @handleNextClick="handleNextClick" :orderDetail="detail" :orderId="orderId" />
5
             <pageOne @handleNextClick="handleNextClick" :orderDetail="detail" :orderId="orderId" />
6
         </view>
6
         </view>
7
         <view class="page-item" v-show="activeIndex === 1">
7
         <view class="page-item" v-show="activeIndex === 1">
8
-            <pageTwo @handleNextClick="handleNextClick" :orderDetail="detail" :orderId="orderId" :followUpList="followUpList" />
8
+            <pageTwo @handleNextClick="handleNextClick" :orderDetail="detail" :orderId="orderId"
9
+                :followUpList="followUpList" />
9
         </view>
10
         </view>
10
         <view class="page-item" v-show="activeIndex === 2">
11
         <view class="page-item" v-show="activeIndex === 2">
11
             <pageThree @handleNextClick="handleNextClick" :orderDetail="detail" @handleNeedSave="handleNeedSave"
12
             <pageThree @handleNextClick="handleNextClick" :orderDetail="detail" @handleNeedSave="handleNeedSave"
@@ -182,8 +183,8 @@ export default {
182
             }
183
             }
183
         },
184
         },
184
         //确认入库
185
         //确认入库
185
-        confirmInterStore({ warehouseInfo, profitSharingList }) {
186
-            console.log(warehouseInfo, profitSharingList)
186
+        confirmInterStore({ warehouseInfo }) {
187
+            console.log(warehouseInfo)
187
             const paramsInterStore = {
188
             const paramsInterStore = {
188
                 "searchValue": this.detail.searchValue,
189
                 "searchValue": this.detail.searchValue,
189
                 "createBy": this.detail.createBy,
190
                 "createBy": this.detail.createBy,
@@ -208,10 +209,10 @@ export default {
208
                 // "totalCost": "60230.00",   // 成本合计 =   运费 + 好处费 + 查码费 + 表款(支付总额) + 维修费。
209
                 // "totalCost": "60230.00",   // 成本合计 =   运费 + 好处费 + 查码费 + 表款(支付总额) + 维修费。
209
                 "sellingPrice": this.topInfo.price.replace(/,/g, ''),   //实际价格(售价)顶上tab里面的第三栏
210
                 "sellingPrice": this.topInfo.price.replace(/,/g, ''),   //实际价格(售价)顶上tab里面的第三栏
210
                 // "performance": "29772.00",  //sellingPrice - totalCost
211
                 // "performance": "29772.00",  //sellingPrice - totalCost
211
-                "receiptRemark": warehouseInfo.remarks,//"收单之后还需再跟进", 先不传
212
+                "receiptRemark": warehouseInfo.remarks + ';' + warehouseInfo.uploadedImage || '',//"收单之后还需再跟进", 先不传
212
                 "repairAmount": warehouseInfo.repairAmount || '', //维修总金额 ,先不传
213
                 "repairAmount": warehouseInfo.repairAmount || '', //维修总金额 ,先不传
213
                 "grossPerformance": warehouseInfo.grossPerformance || '',   //毛利 performance*splitRatio
214
                 "grossPerformance": warehouseInfo.grossPerformance || '',   //毛利 performance*splitRatio
214
-                "expressOrderNo": warehouseInfo.expressOrderNo || '',   //快递单号+后续加上一个键加上图url
215
+                "expressOrderNo": warehouseInfo.expressOrderNo,   //快递单号+后续加上一个键加上图url
215
                 "fileIds": this.fileIds,  //传第三部里面排序完成之后的id的数组,参考编辑收单里面的附件传的方法
216
                 "fileIds": this.fileIds,  //传第三部里面排序完成之后的id的数组,参考编辑收单里面的附件传的方法
216
                 "model": this.detail.model,
217
                 "model": this.detail.model,
217
                 // "splitRatio": "25",   //分成比例,先不传
218
                 // "splitRatio": "25",   //分成比例,先不传

+ 14 - 7
pages/orderDetailNew/components/pageFour.vue

@@ -260,7 +260,7 @@ export default {
260
                     this.warehouseInfo = {
260
                     this.warehouseInfo = {
261
                         codeStorage: data.code,//编码
261
                         codeStorage: data.code,//编码
262
                         expressOrderNo: data.expressOrderNo || '',//快递单号
262
                         expressOrderNo: data.expressOrderNo || '',//快递单号
263
-                        // uploadedImage: '',//物流图片
263
+                        uploadedImage: data.receiptRemark.split(';')[1] || '',//物流图片 截取备注第二部分
264
                         item: data.item || '',//收单物品
264
                         item: data.item || '',//收单物品
265
                         checkCodeFee: data.checkCodeFee || '',//查码费
265
                         checkCodeFee: data.checkCodeFee || '',//查码费
266
                         watchPrice: data.tableFee || '',//表款
266
                         watchPrice: data.tableFee || '',//表款
@@ -268,7 +268,7 @@ export default {
268
                         freight: data.freight || '',//运费
268
                         freight: data.freight || '',//运费
269
                         repairAmount: data.repairAmount || '',//维修金额
269
                         repairAmount: data.repairAmount || '',//维修金额
270
                         grossPerformance: data.grossPerformance || '',//毛业绩
270
                         grossPerformance: data.grossPerformance || '',//毛业绩
271
-                        remarks: data.receiptRemark || '',//收单备注
271
+                        remarks: data.receiptRemark.split(';')[0] || '',//收单备注  截取备注第一部分
272
                     }
272
                     }
273
                     this.getList()
273
                     this.getList()
274
                 }
274
                 }
@@ -309,15 +309,20 @@ export default {
309
     },
309
     },
310
 
310
 
311
     methods: {
311
     methods: {
312
-        // 选择图片
312
+        // 选择物流图片
313
         selectImage() {
313
         selectImage() {
314
             uni.chooseImage({
314
             uni.chooseImage({
315
                 count: 1,
315
                 count: 1,
316
-                sizeType: ['original', 'compressed'],
316
+                sizeType: ['compressed'],
317
                 sourceType: ['album', 'camera'],
317
                 sourceType: ['album', 'camera'],
318
-                success: (res) => {
318
+                success: async (res) => {
319
                     const tempFilePath = res.tempFilePaths[0];
319
                     const tempFilePath = res.tempFilePaths[0];
320
-                    this.warehouseInfo.uploadedImage = tempFilePath;
320
+                    //把选择的图片上传给服务器,然后获取返回路径
321
+                    const rep = await uni.$u.api.uploadFile(tempFilePath)
322
+                    if (rep.code == 200) {
323
+                        console.log('上传成功=====>', rep.data.url)
324
+                        this.warehouseInfo.uploadedImage = rep.data.url
325
+                    }
321
                 }
326
                 }
322
             });
327
             });
323
         },
328
         },
@@ -402,11 +407,13 @@ export default {
402
 
407
 
403
             if (this.validateProfitSharing()) {
408
             if (this.validateProfitSharing()) {
404
 
409
 
410
+                //上传表单数据
405
                 this.$emit('confirmInterStore', {
411
                 this.$emit('confirmInterStore', {
406
                     warehouseInfo: this.warehouseInfo,
412
                     warehouseInfo: this.warehouseInfo,
407
                 })
413
                 })
408
 
414
 
409
-                this.addShare()
415
+                //上传分成数据
416
+                // this.addShare()
410
 
417
 
411
             }
418
             }
412
 
419
 

+ 2 - 0
pages/orderDetailNew/components/pageThree.vue

@@ -637,6 +637,8 @@ export default {
637
     font-family: Consolas, 'Courier New', monospace, -apple-system, BlinkMacSystemFont;
637
     font-family: Consolas, 'Courier New', monospace, -apple-system, BlinkMacSystemFont;
638
     width: auto;
638
     width: auto;
639
     min-width: 150rpx;
639
     min-width: 150rpx;
640
+    border: none;
641
+    text-align: right !important;
640
 }
642
 }
641
 
643
 
642
 .payment-amount .u-input__input {
644
 .payment-amount .u-input__input {

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

@@ -40,8 +40,7 @@
40
                         <!-- 图片显示区域 -->
40
                         <!-- 图片显示区域 -->
41
                         <view v-if="selectedCheckbox.includes('photo技巧') && photoTipsImages.length > 0"
41
                         <view v-if="selectedCheckbox.includes('photo技巧') && photoTipsImages.length > 0"
42
                             class="image-list">
42
                             class="image-list">
43
-                            <view v-for="(image, index) in photoTipsImages" :key="index" class="image-item"
44
-                                @click="previewImageHandler(image, 'photoTips')">
43
+                            <view v-for="(image, index) in photoTipsImages" :key="index" class="image-item">
45
                                 <image :src="image" mode="aspectFill" class="image-thumb"></image>
44
                                 <image :src="image" mode="aspectFill" class="image-thumb"></image>
46
                             </view>
45
                             </view>
47
                         </view>
46
                         </view>
@@ -63,8 +62,7 @@
63
                         <!-- 图片显示区域 -->
62
                         <!-- 图片显示区域 -->
64
                         <view v-if="selectedCheckbox.includes('face2face') && face2faceImages.length > 0"
63
                         <view v-if="selectedCheckbox.includes('face2face') && face2faceImages.length > 0"
65
                             class="image-list">
64
                             class="image-list">
66
-                            <view v-for="(image, index) in face2faceImages" :key="index" class="image-item"
67
-                                @click="previewImageHandler(image, 'face2face')">
65
+                            <view v-for="(image, index) in face2faceImages" :key="index" class="image-item">
68
                                 <image :src="image" mode="aspectFill" class="image-thumb"></image>
66
                                 <image :src="image" mode="aspectFill" class="image-thumb"></image>
69
                             </view>
67
                             </view>
70
                         </view>
68
                         </view>
@@ -224,7 +222,7 @@ export default {
224
         },
222
         },
225
 
223
 
226
         // 下一步按钮点击事件
224
         // 下一步按钮点击事件
227
-        handleNextClick() {
225
+        async handleNextClick() {
228
             // 创建一个只包含被勾选checkbox对应数据的对象
226
             // 创建一个只包含被勾选checkbox对应数据的对象
229
             const result = {};
227
             const result = {};
230
 
228
 
@@ -257,6 +255,49 @@ export default {
257
                 nowPage: 'formTwo',
255
                 nowPage: 'formTwo',
258
                 form: result,
256
                 form: result,
259
             })
257
             })
258
+
259
+            // 下一步的时候要通过判断是否有联系师傅,师傅拍图技巧,到达客户面对面,如果有的话调uni.$u.api.addOrderFollow(orderFormData);接口按照    联系师傅;内容;url1,url2,url3,的格式上传
260
+            //先判断有没有联系师傅
261
+            if (this.selectedCheckbox.includes('contact师傅')) {
262
+                console.log('触发联系师傅')
263
+                // 联系师傅的手机号,已:为分割,取后面的内容
264
+                const phone = this.formData.contactPhone || '';
265
+                const data = `联系师傅;${phone}`;
266
+                // 调用接口上传
267
+                await uni.$u.api.addOrderFollow({
268
+                    orderId: this.orderId,
269
+                    content: data,
270
+                })
271
+            }
272
+            if (this.selectedCheckbox.includes('photo技巧')) {
273
+                console.log('触发师傅拍图技巧')
274
+                // 师傅拍图技巧的内容,已:为分割,取后面的内容
275
+                const photoTips = this.formData.photoTips || '';
276
+                const urls = this.photoTipsImages.join(',');
277
+
278
+                const data = `师傅拍图技巧;${photoTips};${urls}`;
279
+                console.log('urls9999999', data)
280
+
281
+                // 调用接口上传
282
+                await uni.$u.api.addOrderFollow({
283
+                    orderId: this.orderId,
284
+                    content: data,
285
+                })
286
+            }
287
+            if (this.selectedCheckbox.includes('face2face')) {
288
+                // 到达客户面对面的内容,已:为分割,取后面的内容
289
+                const face2faceNotes = this.formData.face2faceNotes || '';
290
+                const urls = this.face2faceImages.join(',');
291
+
292
+
293
+                const data = `到达客户面对面;${face2faceNotes};${urls}`;
294
+                // 调用接口上传
295
+
296
+                await uni.$u.api.addOrderFollow({
297
+                    orderId: this.orderId,
298
+                    content: data,
299
+                })
300
+            }
260
         },
301
         },
261
         checkFollowUpContent() {
302
         checkFollowUpContent() {
262
             // 检查跟进记录是否包含上面的三个选择
303
             // 检查跟进记录是否包含上面的三个选择
@@ -266,20 +307,30 @@ export default {
266
                 if (item.includes('联系师傅')) {
307
                 if (item.includes('联系师傅')) {
267
                     this.selectedCheckbox.push('contact师傅');
308
                     this.selectedCheckbox.push('contact师傅');
268
                     // 联系师傅的手机号,已:为分割,取后面的内容
309
                     // 联系师傅的手机号,已:为分割,取后面的内容
269
-                    const phone = item.split('联系师傅:')[1] || '';
310
+                    const phone = item.split(';')[1] || '';
311
+                    console.log('联系师傅的手机号111111', phone)
270
                     this.formData.contactPhone = phone;
312
                     this.formData.contactPhone = phone;
271
                 }
313
                 }
272
                 if (item.includes('师傅拍图技巧')) {
314
                 if (item.includes('师傅拍图技巧')) {
273
                     this.selectedCheckbox.push('photo技巧');
315
                     this.selectedCheckbox.push('photo技巧');
274
                     // 师傅拍图技巧的内容,已:为分割,取后面的内容
316
                     // 师傅拍图技巧的内容,已:为分割,取后面的内容
275
-                    const photoTips = item.split('师傅拍图技巧:')[1] || '';
317
+                    const photoTips = item.split(';')[1] || '';
276
                     this.formData.photoTips = photoTips;
318
                     this.formData.photoTips = photoTips;
319
+                    const urls = item.split(';')[2] || ''
320
+                    //把url转为数组
321
+                    const urlArray = urls.split(',').map(url => url.trim());
322
+                    this.photoTipsImages = [...this.photoTipsImages, ...urlArray];
323
+
277
                 }
324
                 }
278
                 if (item.includes('到达客户面对面')) {
325
                 if (item.includes('到达客户面对面')) {
279
                     this.selectedCheckbox.push('face2face');
326
                     this.selectedCheckbox.push('face2face');
280
                     // 到达客户面对面的内容,已:为分割,取后面的内容
327
                     // 到达客户面对面的内容,已:为分割,取后面的内容
281
-                    const face2faceNotes = item.split('到达客户面对面:')[1] || '';
328
+                    const face2faceNotes = item.split(';')[1] || '';
282
                     this.formData.face2faceNotes = face2faceNotes;
329
                     this.formData.face2faceNotes = face2faceNotes;
330
+                    const urls = item.split(';')[2] || ''
331
+                    //把url转为数组
332
+                    const urlArray = urls.split(',').map(url => url.trim());
333
+                    this.face2faceImages = [...this.face2faceImages, ...urlArray];
283
                 }
334
                 }
284
             })
335
             })
285
         },
336
         },
@@ -296,13 +347,14 @@ export default {
296
                     // 把blob数组上传到服务器,然后返回路径
347
                     // 把blob数组上传到服务器,然后返回路径
297
                     try {
348
                     try {
298
                         const res = await Promise.all(tempFilePath.map(filePath => uni.$u.api.uploadFile(filePath)));
349
                         const res = await Promise.all(tempFilePath.map(filePath => uni.$u.api.uploadFile(filePath)));
299
-                        console.log('上传的图片路径数组是:', res.map(item => item.data.fileUrl))
350
+                        console.log('上传的图片路径数组是:', res.forEach(item => console.log(item.data.url)))
300
                         // 把返回的路径赋值给对应的数组
351
                         // 把返回的路径赋值给对应的数组
301
                         if (field == 'photoTips') {
352
                         if (field == 'photoTips') {
302
-                            this.photoTipsImages = [...this.photoTipsImages, ...res.map(item => item.data.fileUrl)];
303
-                        } else if (field == 'face2face') {
304
-                            this.face2faceImages = [...this.face2faceImages, ...res.map(item => item.data.fileUrl)];
305
-                        } 
353
+                            this.photoTipsImages = [...this.photoTipsImages, ...res.map(item => item.data.url)];
354
+                        } else if (field == 'face2faceNotes') {
355
+                            console.log('1111')
356
+                            this.face2faceImages = [...this.face2faceImages, ...res.map(item => item.data.url)];
357
+                        }
306
                     } catch (error) {
358
                     } catch (error) {
307
                         console.error('上传失败:', error);
359
                         console.error('上传失败:', error);
308
                         uni.$u.toast('上传失败');
360
                         uni.$u.toast('上传失败');
@@ -720,7 +772,7 @@ u-checkbox {
720
     flex: 1;
772
     flex: 1;
721
     border-radius: 12rpx;
773
     border-radius: 12rpx;
722
     font-size: 36rpx;
774
     font-size: 36rpx;
723
-    padding: 32rpx 0;
775
+    padding: 20rpx 0;
724
     min-width: 0;
776
     min-width: 0;
725
     text-align: center;
777
     text-align: center;
726
     color: #ffffff;
778
     color: #ffffff;

+ 13 - 8
pages/pagereceivecenter/pagereceivecenter.vue

@@ -82,7 +82,12 @@ export default {
82
                 console.log('待跟进', order)
82
                 console.log('待跟进', order)
83
             }
83
             }
84
         },
84
         },
85
-
85
+        // 跳转订单详情
86
+        toOrderDetail(order) {
87
+            uni.navigateTo({
88
+                url: `/pages/orderDetailNew/index?orderId=${order.id}&item=${order.item}&type=${this.type}&clueId=${order.clueId}`,
89
+            })
90
+        },
86
         
91
         
87
         //滑动加载
92
         //滑动加载
88
         scrolltolower() {
93
         scrolltolower() {
@@ -108,7 +113,7 @@ export default {
108
                     <!-- <orderCard v-for="item in orderList" :key="item.receiptId + item.id" :order="item"
113
                     <!-- <orderCard v-for="item in orderList" :key="item.receiptId + item.id" :order="item"
109
                         @handleBtnClick="handleBtnClick">
114
                         @handleBtnClick="handleBtnClick">
110
                     </orderCard> -->
115
                     </orderCard> -->
111
-                    <view class="orderCard" v-for="item in orderList"  :key="item.receiptId + item.id">
116
+                    <view class="orderCard" v-for="item in orderList"  :key="item.receiptId + item.id" @click.stop="toOrderDetail(item)">
112
                         <view class="bandAndPrice">
117
                         <view class="bandAndPrice">
113
                             <view class="bandName">{{ item.itemBrand || '暂无品牌' }}</view>
118
                             <view class="bandName">{{ item.itemBrand || '暂无品牌' }}</view>
114
                             <view class="price">¥{{ item.priceRange }}</view>
119
                             <view class="price">¥{{ item.priceRange }}</view>
@@ -136,25 +141,25 @@ export default {
136
 
141
 
137
                             <view class="btnGroup"
142
                             <view class="btnGroup"
138
                                 v-if="item && (item.status == '1' || item.status == null || item.status === undefined)">
143
                                 v-if="item && (item.status == '1' || item.status == null || item.status === undefined)">
139
-                                <view class="card-button" @click="handleBtnClick('acceptOrder', item)">立即接单</view>
140
-                                <view class=" card-button isBusy" @click="handleBtnClick('isBusy', item)">在忙</view>
144
+                                <view class="card-button" @click.stop="handleBtnClick('acceptOrder', item)">立即接单</view>
145
+                                <view class=" card-button isBusy" @click.stop="handleBtnClick('isBusy', item)">在忙</view>
141
                             </view>
146
                             </view>
142
 
147
 
143
                             <view class="btnGroup"
148
                             <view class="btnGroup"
144
                                 v-if="item && (item.status == '2' || item.status == null || item.status === undefined)">
149
                                 v-if="item && (item.status == '2' || item.status == null || item.status === undefined)">
145
-                                <view class="card-button willFollow" @click="handleBtnClick('willFollow', item)">待跟进
150
+                                <view class="card-button willFollow" @click.stop="handleBtnClick('willFollow', item)">待跟进
146
                                 </view>
151
                                 </view>
147
-                                <view class="card-button isBusy" @click="handleBtnClick('tag', item)">打标签</view>
152
+                                <view class="card-button isBusy" @click.stop="handleBtnClick('tag', item)">打标签</view>
148
                             </view>
153
                             </view>
149
 
154
 
150
                             <view class="btnGroup"
155
                             <view class="btnGroup"
151
                                 v-if="item && (item.status == '3' || item.status == null || item.status === undefined)">
156
                                 v-if="item && (item.status == '3' || item.status == null || item.status === undefined)">
152
-                                <view class="card-button share" @click="handleBtnClick('share', item)">一键分享</view>
157
+                                <view class="card-button share" @click.stop="handleBtnClick('share', item)">一键分享</view>
153
                             </view>
158
                             </view>
154
 
159
 
155
                             <view class="btnGroup"
160
                             <view class="btnGroup"
156
                                 v-if="item && (item.status == '4' || item.status == null || item.status === undefined)">
161
                                 v-if="item && (item.status == '4' || item.status == null || item.status === undefined)">
157
-                                <view class="card-button oneFollow" @click="handleBtnClick('oneFollow', item)">待跟进
162
+                                <view class="card-button oneFollow" @click.stop="handleBtnClick('oneFollow', item)">待跟进
158
                                 </view>
163
                                 </view>
159
                             </view>
164
                             </view>
160
 
165