Explorar el Código

新增线下支付方式

Yannay hace 2 meses
padre
commit
bd33134584
Se han modificado 1 ficheros con 54 adiciones y 3 borrados
  1. 54 3
      pages/orderDetailNew/components/pageThree.vue

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

@@ -30,6 +30,26 @@
30 30
                     <u-input v-model="paymentInfo.idNumber" placeholder="请输入身份证号" class="info-input" />
31 31
                 </u-col>
32 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 53
         </view>
34 54
 
35 55
         <view class="card_wrap">
@@ -129,6 +149,10 @@
129 149
                         <text class="info-label">银行卡号:</text>
130 150
                         <text class="info-value">{{ paymentInfo.bankAccount || '未填写' }}</text>
131 151
                     </view>
152
+                    <view class="info-item">
153
+                        <text class="info-label">支付方式:</text>
154
+                        <text class="info-value">{{ paymentMethod || '未填写' }}</text>
155
+                    </view>
132 156
                 </view>
133 157
 
134 158
                 <!-- 确认转账按钮 -->
@@ -166,11 +190,14 @@ export default {
166 190
         orderDetail: {
167 191
             handler(newVal) {
168 192
                 if (newVal) {
193
+                    // console.log('这里是page3的orderDetail', newVal)
169 194
                     this.paymentInfo.customName = newVal.customName || ''
170 195
                     this.paymentInfo.bankName = newVal.bankName || ''
171 196
                     this.paymentInfo.bankAccount = newVal.bankCardNumber || ''
172 197
                     this.paymentInfo.idNumber = newVal.idCard || ''
173 198
                     // this.paymentAmount = newVal.tableFee || '0.00'
199
+                    //支付方式初始化
200
+                    this.initPaymentMethod(newVal.paymentMethod)
174 201
                 }
175 202
             },
176 203
             deep: true,
@@ -178,7 +205,7 @@ export default {
178 205
         currentReceipt: {
179 206
             handler(newVal) {
180 207
                 if (newVal) {
181
-                    console.log('这里是page3的', newVal.tableFee)
208
+                    // console.log('这里是page3的currentReceipt', newVal)
182 209
                     this.paymentAmount = newVal.tableFee || '0.00'
183 210
                     setTimeout(() => {
184 211
                         this.getList('2', '3', newVal.id, this.orderDetail.itemBrand);
@@ -224,7 +251,10 @@ export default {
224 251
 
225 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 412
                 bankName: this.paymentInfo.bankName || '',
383 413
                 bankCardNumber: this.paymentInfo.bankAccount || '',
384 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 420
                 uni.$u.toast('请填写完整的支付信息');
390 421
                 return;
391 422
             }
@@ -494,6 +525,26 @@ export default {
494 525
                 urls: urlList,
495 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
 }