Преглед изворни кода

在接单表单增加字段

Yannay пре 2 месеци
родитељ
комит
8f6fbd11e9
1 измењених фајлова са 153 додато и 6 уклоњено
  1. 153 6
      pages/orderDetailNew/components/pageFour.vue

+ 153 - 6
pages/orderDetailNew/components/pageFour.vue

@@ -33,14 +33,60 @@
33 33
                 </u-row>
34 34
 
35 35
                 <!-- 单独一行的收单物品 -->
36
-                <u-row class="info-row">
37
-                    <u-col span="12">
36
+                <u-row class="info-row" justify="space-between">
37
+                    <u-col span="5.8">
38 38
                         <u-form-item label="收单物品" prop="item">
39 39
                             <u--input v-model="warehouseInfo.item" placeholder="请输入收单物品" class="info-input" />
40 40
                         </u-form-item>
41 41
                     </u-col>
42
+                    <!-- 收单类型 -->
43
+                    <u-col span="5.8">
44
+                        <u-form-item label="收单类型" prop="customerServiceNameLabel" @tap="selectCustomerServiceName">
45
+                            <view class="click-wrapper">
46
+                                <u--input v-model="warehouseInfo.customerServiceNameLabel" placeholder="点击选择收单类型"
47
+                                    class="info-input" disabled />
48
+                            </view>
49
+                        </u-form-item>
50
+                        <!-- 收单类型选择 -->
51
+                        <u-picker :show="showCustomerServicePicker" :columns="customerServiceColumns" confirm
52
+                            keyName="label" @confirm="handleConfirmCustomerService"
53
+                            @cancel="showCustomerServicePicker = false"></u-picker>
54
+                    </u-col>
55
+                </u-row>
56
+
57
+                <u-row class="info-row" justify="space-between">
58
+                    <!-- 收单类别 -->
59
+                    <u-col span="5.8">
60
+                        <u-form-item label="类别" prop="category" @tap="selectCategory">
61
+                            <view class="click-wrapper">
62
+                                <u--input v-model="warehouseInfo.categoryLabel" placeholder="点击选择类别" class="info-input"
63
+                                    disabled />
64
+                            </view>
65
+                        </u-form-item>
66
+                        <!-- 收单类型选择 -->
67
+                        <u-picker :show="showCategoryPicker" :columns="categoryColumns" confirm keyName="label"
68
+                            @confirm="handleConfirmCategory" @cancel="showCategoryPicker = false"></u-picker>
69
+                    </u-col>
70
+
71
+
72
+                    <!-- 是否需要查码 -->
73
+                    <u-col span="5.8">
74
+                        <u-form-item label="是否需要查码" prop="needCheckCode" @tap="selectNeedCheckCode">
75
+                            <view class="click-wrapper">
76
+                                <u--input v-model="warehouseInfo.needCheckCodeLabel" placeholder="点击选择是否需要查码"
77
+                                    class="info-input" disabled />
78
+                            </view>
79
+                        </u-form-item>
80
+                        <!-- 是否需要查码选择 -->
81
+                        <u-picker :show="showNeedCheckCodePicker" :columns="needCheckCodeColumns" confirm
82
+                            keyName="label" @confirm="handleConfirmNeedCheckCode"
83
+                            @cancel="showNeedCheckCodePicker = false"></u-picker>
84
+                    </u-col>
85
+
42 86
                 </u-row>
43 87
 
88
+
89
+
44 90
                 <!-- 查码费和表款同一行 -->
45 91
                 <u-row class="info-row" justify="space-between">
46 92
                     <u-col span="5.8">
@@ -52,7 +98,7 @@
52 98
                     <u-col span="5.8">
53 99
                         <u-form-item label="查码费">
54 100
                             <u--input v-model="warehouseInfo.checkCodeFee" placeholder="请输入查码费" class="info-input"
55
-                                type="number" />
101
+                                type="number" :disabled="warehouseInfo.needCheckCode == '2'" />
56 102
                         </u-form-item>
57 103
                     </u-col>
58 104
                 </u-row>
@@ -89,13 +135,19 @@
89 135
                 </u-row>
90 136
                 <!-- 业绩 -->
91 137
                 <u-row class="info-row" justify="space-between">
92
-                    <u-col span="5.8">
138
+                    <u-col span="3.8">
139
+                        <u-form-item label="成本合计">
140
+                            <u--input :disabled="true" :value="computedTotalCost" placeholder="成本合计自动计算"
141
+                                class="info-input" type="number" />
142
+                        </u-form-item>
143
+                    </u-col>
144
+                    <u-col span="3.8">
93 145
                         <u-form-item label="业绩">
94 146
                             <u--input :disabled="true" :value="computedPerformance" placeholder="业绩自动计算"
95 147
                                 class="info-input" type="number" />
96 148
                         </u-form-item>
97 149
                     </u-col>
98
-                    <u-col span="5.8">
150
+                    <u-col span="3.8">
99 151
                         <u-form-item label="毛业绩">
100 152
                             <u--input :disabled="true" :value="computedGrossPerformance" placeholder="毛业绩自动计算"
101 153
                                 class="info-input" type="number" />
@@ -230,6 +282,9 @@
230 282
 
231 283
         <u-toast ref="uToast"></u-toast>
232 284
 
285
+
286
+
287
+
233 288
     </view>
234 289
 </template>
235 290
 
@@ -306,6 +361,12 @@ export default {
306 361
                         performance: data.performance || '',//业绩
307 362
                         remarks: data.receiptRemark?.split(';')[0] || '',//收单备注  截取备注第一部分
308 363
                         splitRatio: data.splitRatio || '',//分单比例
364
+                        customerServiceName: data.customerServiceName || '',//收单类型,1收单类,2维修类,3销售类
365
+                        customerServiceNameLabel: this.customerServiceColumns[0].filter(item => item.value == data.customerServiceName)[0].label || '',//收单类型,1收单类,2维修类,3销售类
366
+                        category: data.category || '',//类别
367
+                        categoryLabel: this.categoryColumns[0].filter(item => item.value == data.category)[0].label || '',//类别
368
+                        needCheckCode: data.needCheckCode || '',//是否需要查码
369
+                        needCheckCodeLabel: this.needCheckCodeColumns[0].filter(item => item.value == data.needCheckCode)[0].label || '',//是否需要查码
309 370
                     }
310 371
                     this.getShareList()
311 372
                 }
@@ -313,6 +374,16 @@ export default {
313 374
         }
314 375
     },
315 376
     computed: {
377
+
378
+        computedTotalCost() {
379
+            //成本  合计 = 运费 + 好处费+ 查码费 + 表款(支付总额)+ 维修费。
380
+            const freight = this.warehouseInfo.freight || 0
381
+            const benefitFee = this.warehouseInfo.benefitFee || 0
382
+            const checkCodeFee = this.warehouseInfo.checkCodeFee || 0
383
+            const watchPrice = this.warehouseInfo.watchPrice || 0
384
+            const repairAmount = this.warehouseInfo.repairAmount || 0
385
+            return Number(freight) + Number(benefitFee) + Number(checkCodeFee) + Number(watchPrice) + Number(repairAmount)
386
+        },
316 387
         computedPerformance() {
317 388
             //业绩   //sellingPrice - (totalCost// 成本合计 =   运费1 + 好处费1 + 查码费1 + 表款(支付总额)1+ 维修费1。)
318 389
             const sellingPrice = this.currentReceipt.sellingPrice || 0
@@ -347,6 +418,9 @@ export default {
347 418
                 performance: '',//业绩
348 419
                 splitRatio: '',//分单比例
349 420
                 remarks: '',//收单备注
421
+                customerServiceNameLabel: '',//收单类型,1收单类,2维修类,3销售类
422
+                customerServiceName: '',//收单类型,1收单类,2维修类,3销售类
423
+
350 424
             },
351 425
             // 分成信息相关的数据
352 426
             profitSharingList: [
@@ -363,6 +437,24 @@ export default {
363 437
             columnsOrgList: [],
364 438
             //传入的分成人名单
365 439
             columnsPersonList: [],
440
+            showCustomerServicePicker: false,//显示选择收单类型的弹窗
441
+            customerServiceColumns: [[
442
+                { label: '收单类', value: '1' },
443
+                { label: '维修类', value: '2' },
444
+                { label: '销售类', value: '3' }
445
+            ]],
446
+            showCategoryPicker: false,//显示选择类别弹窗
447
+            categoryColumns: [[
448
+                { label: '腕表', value: '1' },
449
+                { label: '包包', value: '2' },
450
+                { label: '首饰', value: '4' },
451
+                { label: '其他', value: '3' }
452
+            ]],
453
+            showNeedCheckCodePicker: false,//显示选择是否需要查码弹窗
454
+            needCheckCodeColumns: [[
455
+                { label: '是', value: '1' },
456
+                { label: '否', value: '2' }
457
+            ]],
366 458
 
367 459
         };
368 460
     },
@@ -487,13 +579,20 @@ export default {
487 579
                             performance: this.computedPerformance || '',//毛业绩
488 580
                             splitRatio: this.warehouseInfo.splitRatio || '',//分单比例
489 581
                             receiptRemark: this.warehouseInfo.remarks + ';' + this.warehouseInfo.uploadedImage || '',//收单备注
582
+                            customerServiceName: this.warehouseInfo.customerServiceName || '',//收单类型,1收单类,2维修类,3销售类
583
+                            category: this.warehouseInfo.category || '',//类别
584
+                            needCheckCode: this.warehouseInfo.needCheckCode || '',//是否需要查码
585
+                            totalCost: this.computedTotalCost || '',//成本合计
490 586
                         });
491 587
 
588
+                        //废弃
492 589
                         //上传物流表单数据
493 590
                         // this.$emit('confirmInterStore', {
494 591
                         //     warehouseInfo: this.warehouseInfo,
495 592
                         // })
496 593
                         //保存入库信息
594
+                        //废弃
595
+
497 596
 
498 597
 
499 598
                         //上传分成数据
@@ -706,8 +805,56 @@ export default {
706 805
         handleCancelPerson() {
707 806
             this.columnsPersonList = []
708 807
             this.showPersonPicker = false
709
-        }
808
+        },
809
+        //点击选择收单类型
810
+        selectCustomerServiceName() {
811
+            console.log('点击了选择收单类型')
710 812
 
813
+            //打开选择收单类型的弹窗
814
+            this.showCustomerServicePicker = true
815
+        },
816
+        handleConfirmCustomerService({ value }) {
817
+            //选择了收单类型
818
+            console.log(value[0].label, '选择的收单类型')
819
+            console.log(value[0].value, '选择的收单类型')
820
+            //把值赋值给当前行
821
+            this.warehouseInfo.customerServiceNameLabel = value[0].label
822
+            this.warehouseInfo.customerServiceName = value[0].value
823
+            //关闭弹窗
824
+            this.showCustomerServicePicker = false
825
+        },
826
+        //点击选择类别
827
+        selectCategory() {
828
+            console.log('点击了选择类别')
829
+            //打开选择类别弹窗
830
+            this.showCategoryPicker = true
831
+        },
832
+        handleConfirmCategory({ value }) {
833
+            //选择了类别
834
+            console.log(value[0].label, '选择的类别')
835
+            console.log(value[0].value, '选择的类别')
836
+            //把值赋值给当前行
837
+            this.warehouseInfo.categoryLabel = value[0].label
838
+            this.warehouseInfo.category = value[0].value
839
+            //关闭弹窗
840
+            this.showCategoryPicker = false
841
+        },
842
+        //点击选择是否需要查码
843
+        selectNeedCheckCode() {
844
+            console.log('点击了选择是否需要查码')
845
+            //打开选择是否需要查码弹窗
846
+            this.showNeedCheckCodePicker = true
847
+        },
848
+        handleConfirmNeedCheckCode({ value }) {
849
+            //选择了是否需要查码
850
+            console.log(value[0].label, '选择的是否需要查码')
851
+            console.log(value[0].value, '选择的是否需要查码')
852
+            //把值赋值给当前行
853
+            this.warehouseInfo.needCheckCodeLabel = value[0].label
854
+            this.warehouseInfo.needCheckCode = value[0].value
855
+            //关闭弹窗
856
+            this.showNeedCheckCodePicker = false
857
+        },
711 858
     }
712 859
 };
713 860
 </script>