Explorar o código

新增线下支付方式

Yannay hai 2 meses
pai
achega
bd33134584
Modificáronse 1 ficheiros con 54 adicións e 3 borrados
  1. 54 3
      pages/orderDetailNew/components/pageThree.vue

+ 54 - 3
pages/orderDetailNew/components/pageThree.vue

@@ -30,6 +30,26 @@
30
                     <u-input v-model="paymentInfo.idNumber" placeholder="请输入身份证号" class="info-input" />
30
                     <u-input v-model="paymentInfo.idNumber" placeholder="请输入身份证号" class="info-input" />
31
                 </u-col>
31
                 </u-col>
32
             </u-row>
32
             </u-row>
33
+            <!-- 支付方式 -->
34
+            <u-row class="info-row">
35
+                <u-col span="12">
36
+                    <view class="info-label">支付方式选择</view>
37
+                    <u-radio-group iconPlacement="left" v-model="paymentMethodRadio" placement="row"
38
+                        @change='handlePaymentMethodRadioChange'>
39
+                        <u-radio shape="circle" label="小葫芦线上支付" name="online"></u-radio>
40
+                        <u-radio shape="circle" label="线下支付" name="offline"></u-radio>
41
+                    </u-radio-group>
42
+                </u-col>
43
+            </u-row>
44
+
45
+            <u-row class="info-row">
46
+                <u-col span="12">
47
+                    <view class="info-label">支付方式</view>
48
+                    <u-input :disabled="paymentMethodRadio == 'online'" v-model="paymentMethod" placeholder="请输入支付方式"
49
+                        class="info-input" />
50
+                </u-col>
51
+            </u-row>
52
+
33
         </view>
53
         </view>
34
 
54
 
35
         <view class="card_wrap">
55
         <view class="card_wrap">
@@ -129,6 +149,10 @@
129
                         <text class="info-label">银行卡号:</text>
149
                         <text class="info-label">银行卡号:</text>
130
                         <text class="info-value">{{ paymentInfo.bankAccount || '未填写' }}</text>
150
                         <text class="info-value">{{ paymentInfo.bankAccount || '未填写' }}</text>
131
                     </view>
151
                     </view>
152
+                    <view class="info-item">
153
+                        <text class="info-label">支付方式:</text>
154
+                        <text class="info-value">{{ paymentMethod || '未填写' }}</text>
155
+                    </view>
132
                 </view>
156
                 </view>
133
 
157
 
134
                 <!-- 确认转账按钮 -->
158
                 <!-- 确认转账按钮 -->
@@ -166,11 +190,14 @@ export default {
166
         orderDetail: {
190
         orderDetail: {
167
             handler(newVal) {
191
             handler(newVal) {
168
                 if (newVal) {
192
                 if (newVal) {
193
+                    // console.log('这里是page3的orderDetail', newVal)
169
                     this.paymentInfo.customName = newVal.customName || ''
194
                     this.paymentInfo.customName = newVal.customName || ''
170
                     this.paymentInfo.bankName = newVal.bankName || ''
195
                     this.paymentInfo.bankName = newVal.bankName || ''
171
                     this.paymentInfo.bankAccount = newVal.bankCardNumber || ''
196
                     this.paymentInfo.bankAccount = newVal.bankCardNumber || ''
172
                     this.paymentInfo.idNumber = newVal.idCard || ''
197
                     this.paymentInfo.idNumber = newVal.idCard || ''
173
                     // this.paymentAmount = newVal.tableFee || '0.00'
198
                     // this.paymentAmount = newVal.tableFee || '0.00'
199
+                    //支付方式初始化
200
+                    this.initPaymentMethod(newVal.paymentMethod)
174
                 }
201
                 }
175
             },
202
             },
176
             deep: true,
203
             deep: true,
@@ -178,7 +205,7 @@ export default {
178
         currentReceipt: {
205
         currentReceipt: {
179
             handler(newVal) {
206
             handler(newVal) {
180
                 if (newVal) {
207
                 if (newVal) {
181
-                    console.log('这里是page3的', newVal.tableFee)
208
+                    // console.log('这里是page3的currentReceipt', newVal)
182
                     this.paymentAmount = newVal.tableFee || '0.00'
209
                     this.paymentAmount = newVal.tableFee || '0.00'
183
                     setTimeout(() => {
210
                     setTimeout(() => {
184
                         this.getList('2', '3', newVal.id, this.orderDetail.itemBrand);
211
                         this.getList('2', '3', newVal.id, this.orderDetail.itemBrand);
@@ -224,7 +251,10 @@ export default {
224
 
251
 
225
             detailImages: [],// 高清细节图数组
252
             detailImages: [],// 高清细节图数组
226
             // 绑定订单相关
253
             // 绑定订单相关
227
-            bindList: [] // 待绑定的图片列表
254
+            bindList: [], // 待绑定的图片列表
255
+
256
+            paymentMethodRadio: 'offline', // 支付方式
257
+            paymentMethod: '',//支付方式输入框
228
         };
258
         };
229
     },
259
     },
230
 
260
 
@@ -382,10 +412,11 @@ export default {
382
                 bankName: this.paymentInfo.bankName || '',
412
                 bankName: this.paymentInfo.bankName || '',
383
                 bankCardNumber: this.paymentInfo.bankAccount || '',
413
                 bankCardNumber: this.paymentInfo.bankAccount || '',
384
                 idCard: this.paymentInfo.idNumber || '',
414
                 idCard: this.paymentInfo.idNumber || '',
415
+                paymentMethod: this.paymentMethod || '',
385
             });
416
             });
386
 
417
 
387
             // 判断是否填写了支付信息
418
             // 判断是否填写了支付信息
388
-            if (!this.paymentInfo.customName || !this.paymentInfo.bankName || !this.paymentInfo.bankAccount || !this.paymentInfo.idNumber) {
419
+            if (!this.paymentInfo.customName || !this.paymentInfo.bankName || !this.paymentInfo.bankAccount || !this.paymentInfo.idNumber || !this.paymentMethod) {
389
                 uni.$u.toast('请填写完整的支付信息');
420
                 uni.$u.toast('请填写完整的支付信息');
390
                 return;
421
                 return;
391
             }
422
             }
@@ -494,6 +525,26 @@ export default {
494
                 urls: urlList,
525
                 urls: urlList,
495
                 current: src
526
                 current: src
496
             })
527
             })
528
+        },
529
+        //页面开始初始化支付方式
530
+        initPaymentMethod(newvalue) {
531
+            console.log('这里是初始化的支付方式', newvalue)
532
+            if (newvalue == '小葫芦线上支付') {
533
+                this.paymentMethod = '小葫芦线上支付'
534
+                this.paymentMethodRadio = 'online'
535
+            } else {
536
+                this.paymentMethod = newvalue
537
+                this.paymentMethodRadio = 'offline'
538
+            }
539
+        },
540
+        //支付方式选择改变触发回调
541
+        handlePaymentMethodRadioChange(value) {
542
+            console.log('支付方式选择改变:', value)
543
+            if (value == 'online') {
544
+                this.paymentMethod = '小葫芦线上支付'
545
+            } else {
546
+                this.paymentMethod = ''
547
+            }
497
         }
548
         }
498
     }
549
     }
499
 }
550
 }