Explorar el Código

新增接单中心顶部修改信息功能

Yannay hace 2 meses
padre
commit
3b7226fc76

+ 122 - 0
pages/orderDetailNew/components/CustomModal.vue

@@ -0,0 +1,122 @@
1
+<template>
2
+    <u-modal :show="visible" :show-cancel-button="false" :show-confirm-button="false">
3
+        <view class="modal-content">
4
+            <view class="modal-header">
5
+                <text class="modal-title">{{ title }}</text>
6
+            </view>
7
+            <view class="modal-body">
8
+                <u-input v-model="localValue" :placeholder="placeholder" class="modal-input"></u-input>
9
+            </view>
10
+            <view class="modal-footer">
11
+                <text @click="handleCancel" class="btn cancel-btn">取消</text>
12
+                <text @click="handleConfirm" class="btn confirm-btn">确定</text>
13
+            </view>
14
+        </view>
15
+    </u-modal>
16
+</template>
17
+
18
+<script>
19
+export default {
20
+    name: 'CustomModal',
21
+    props: {
22
+        visible: {
23
+            type: Boolean,
24
+            default: false
25
+        },
26
+        title: {
27
+            type: String,
28
+            default: ''
29
+        },
30
+        value: {
31
+            type: String,
32
+            default: ''
33
+        },
34
+        placeholder: {
35
+            type: String,
36
+            default: ''
37
+        }
38
+    },
39
+    data() {
40
+        return {
41
+            localValue: this.value
42
+        }
43
+    },
44
+    watch: {
45
+        value(newVal) {
46
+            this.localValue = newVal
47
+        },
48
+        visible(newVal) {
49
+            if (newVal) {
50
+                this.localValue = this.value
51
+            }
52
+        }
53
+    },
54
+    methods: {
55
+
56
+        handleCancel() {
57
+            this.$emit('cancel')
58
+        },
59
+        handleConfirm() {
60
+            this.$emit('confirm', this.localValue)
61
+        }
62
+    }
63
+}
64
+</script>
65
+
66
+<style scoped>
67
+.modal-content {
68
+    display: flex;
69
+    flex-direction: column;
70
+    gap: 30rpx;
71
+    padding: 20rpx;
72
+}
73
+
74
+.modal-header {
75
+    display: flex;
76
+    justify-content: center;
77
+    padding: 10rpx 0;
78
+}
79
+
80
+.modal-title {
81
+    font-size: 32rpx;
82
+    font-weight: bold;
83
+    color: #333;
84
+}
85
+
86
+.modal-body {
87
+    padding: 10rpx 0;
88
+}
89
+
90
+.modal-input {
91
+    border: 2rpx solid #e0e0e0;
92
+    border-radius: 10rpx;
93
+    padding: 20rpx;
94
+    font-size: 28rpx;
95
+}
96
+
97
+.modal-footer {
98
+    display: flex;
99
+    justify-content: space-between;
100
+    gap: 20rpx;
101
+    padding: 10rpx 0;
102
+}
103
+
104
+.btn {
105
+    flex: 1;
106
+    text-align: center;
107
+    padding: 20rpx;
108
+    border-radius: 10rpx;
109
+    font-size: 28rpx;
110
+    font-weight: 500;
111
+}
112
+
113
+.cancel-btn {
114
+    background-color: #f5f5f5;
115
+    color: #666;
116
+}
117
+
118
+.confirm-btn {
119
+    background-color: blueviolet;
120
+    color: white;
121
+}
122
+</style>

+ 217 - 109
pages/orderDetailNew/components/pageFour.vue

@@ -2,7 +2,7 @@
2 2
     <view class="page-container">
3 3
         <!-- 入库信息卡片 -->
4 4
         <view class="card_wrap">
5
-            <view class="address-section">
5
+            <u--form labelPosition="top" :model="warehouseInfo" :rules="rules" ref="form" class="address-section">
6 6
                 <view class="address-header">
7 7
                     <u-icon name="car-fill" size="36rpx" color="#108cff" class="location-icon"></u-icon>
8 8
                     <text class="address-title">入库信息</text>
@@ -10,70 +10,79 @@
10 10
                 <!-- 编码和快递单号同一行 -->
11 11
                 <u-row class="info-row" justify="space-between">
12 12
                     <u-col span="4.5">
13
-                        <view class="info-label">编码</view>
14
-                        <u--input v-model="warehouseInfo.accountHolder" placeholder="请输入编码" class="info-input" />
13
+                        <u-form-item label="编码" prop="accountHolder">
14
+                            <u--input v-model="warehouseInfo.accountHolder" placeholder="请输入编码" class="info-input" />
15
+                        </u-form-item>
15 16
                     </u-col>
16 17
                     <u-col span="4.5">
17
-                        <view class="info-label">快递单号</view>
18
-                        <u--input v-model="warehouseInfo.bankName" placeholder="请输入快递单号" class="info-input" />
18
+                        <u-form-item label="快递单号" prop="bankName">
19
+                            <u--input v-model="warehouseInfo.bankName" placeholder="请输入快递单号" class="info-input" />
20
+                        </u-form-item>
19 21
                     </u-col>
20 22
                     <u-col span="2">
21
-                        <view class="info-label">物流图片</view>
22
-                        <view class="image-uploader" @click="selectImage">
23
-                            <u-icon v-if="!warehouseInfo.uploadedImage" name="camera-fill" size="48rpx" color="#909399"
24
-                                class="camera-icon"></u-icon>
25
-                            <image v-else :src="warehouseInfo.uploadedImage" mode="aspectFill" class="image-preview">
26
-                            </image>
27
-                        </view>
23
+                        <u-form-item label="物流图片" prop="uploadedImage">
24
+                            <view class="image-uploader" @click="selectImage">
25
+                                <u-icon v-if="!warehouseInfo.uploadedImage" name="camera-fill" size="48rpx"
26
+                                    color="#909399" class="camera-icon"></u-icon>
27
+                                <image v-else :src="warehouseInfo.uploadedImage" mode="aspectFill"
28
+                                    class="image-preview">
29
+                                </image>
30
+                            </view>
31
+                        </u-form-item>
28 32
                     </u-col>
29 33
                 </u-row>
30 34
 
31 35
                 <!-- 单独一行的收单物品 -->
32 36
                 <u-row class="info-row">
33 37
                     <u-col span="12">
34
-                        <view class="info-label">收单物品</view>
35
-                        <u--input v-model="warehouseInfo.item" placeholder="请输入收单物品" class="info-input" />
38
+                        <u-form-item label="收单物品" prop="item">
39
+                            <u--input v-model="warehouseInfo.item" placeholder="请输入收单物品" class="info-input" />
40
+                        </u-form-item>
36 41
                     </u-col>
37 42
                 </u-row>
38 43
 
39 44
                 <!-- 查码费和表款同一行 -->
40 45
                 <u-row class="info-row" justify="space-between">
41 46
                     <u-col span="5.8">
42
-                        <view class="info-label">查码费</view>
43
-                        <u--input v-model="warehouseInfo.checkCodeFee" placeholder="请输入查码费" class="info-input"
44
-                            type="number" />
47
+                        <u-form-item label="查码费">
48
+                            <u--input v-model="warehouseInfo.checkCodeFee" placeholder="请输入查码费" class="info-input"
49
+                                type="number" />
50
+                        </u-form-item>
45 51
                     </u-col>
46 52
                     <u-col span="5.8">
47
-                        <view class="info-label">表款</view>
48
-                        <u--input v-model="warehouseInfo.tableFee" placeholder="请输入表款" class="info-input"
49
-                            type="number" />
53
+                        <u-form-item label="表款">
54
+                            <u--input v-model="warehouseInfo.tableFee" placeholder="请输入表款" class="info-input"
55
+                                type="number" />
56
+                        </u-form-item>
50 57
                     </u-col>
51 58
                 </u-row>
52 59
 
53 60
                 <!-- 维修金额和毛业绩同一行 -->
54 61
                 <u-row class="info-row" justify="space-between">
55 62
                     <u-col span="5.8">
56
-                        <view class="info-label">维修金额</view>
57
-                        <u--input v-model="warehouseInfo.repairAmount" placeholder="请输入维修金额" class="info-input"
58
-                            type="number" />
63
+                        <u-form-item label="维修金额">
64
+                            <u--input v-model="warehouseInfo.repairAmount" placeholder="请输入维修金额" class="info-input"
65
+                                type="number" />
66
+                        </u-form-item>
59 67
                     </u-col>
60 68
                     <u-col span="5.8">
61
-                        <view class="info-label">毛业绩</view>
62
-                        <u--input v-model="warehouseInfo.grossPerformance" placeholder="请输入毛业绩" class="info-input"
63
-                            type="number" />
69
+                        <u-form-item label="毛业绩">
70
+                            <u--input v-model="warehouseInfo.grossPerformance" placeholder="请输入毛业绩" class="info-input"
71
+                                type="number" />
72
+                        </u-form-item>
64 73
                     </u-col>
65 74
                 </u-row>
66 75
 
67 76
                 <!-- 收单备注 -->
68 77
                 <u-row class="info-row">
69 78
                     <u-col span="12">
70
-                        <view class="info-label">收单备注</view>
71
-                        <u--textarea v-model="warehouseInfo.remarks" placeholder="请输入收单备注" class="info-input"
72
-                            confirmType="done" rows="4" />
73
-
79
+                        <u-form-item label="收单备注">
80
+                            <u--textarea v-model="warehouseInfo.remarks" placeholder="请输入收单备注" class="info-input"
81
+                                confirmType="done" rows="4" />
82
+                        </u-form-item>
74 83
                     </u-col>
75 84
                 </u-row>
76
-            </view>
85
+            </u--form>
77 86
         </view>
78 87
 
79 88
         <!-- 新添加的卡片 -->
@@ -87,85 +96,94 @@
87 96
                         <text>添加</text>
88 97
                     </u-button>
89 98
                 </view>
90
-            </view>
91
-            <!-- 分成信息表格 -->
92
-            <view class="split-table">
93
-                <u-row class="split-table-header">
94
-                    <u-col span="2">
95
-                        <text class="header-text">关联</text>
96
-                    </u-col>
97
-                    <u-col span="2">
98
-                        <text class="header-text">账户类型</text>
99
-                    </u-col>
100
-                    <u-col span="2">
101
-                        <text class="header-text">分成人</text>
102
-                    </u-col>
103
-                    <u-col span="2">
104
-                        <text class="header-text">比例(%)</text>
105
-                    </u-col>
106
-                    <u-col span="2">
107
-                        <text class="header-text">归属公司</text>
108
-                    </u-col>
109
-                    <u-col span="2" class="action-column">
110
-                        <text class="header-text">操作</text>
111
-                    </u-col>
112
-                </u-row>
113
-                <u-row v-for="(item, index) in profitSharingList" :key="item.id" class="split-table-row">
114
-                    <u-col span="2">
115
-                        <view class="table-cell">
116
-                            <select v-model="item.association" class="custom-select">
117
-                                <option value="">无</option>
118
-                                <option v-for="option in associationOptions" :key="option" :value="option">
119
-                                    {{ option }}
120
-                                </option>
121
-                            </select>
122
-                        </view>
123
-                    </u-col>
124
-                    <u-col span="2">
125
-                        <view class="table-cell">
126
-                            <view :class="['account-type', item.accountType === 'frontend' ? 'frontend' : 'backend']"
127
-                                @click="toggleAccountType(item)" style="cursor: pointer;">
128
-                                {{ item.accountType === 'frontend' ? '前' : '后' }}
99
+                <!-- 分成信息表格 -->
100
+                <view class="split-table">
101
+                    <u-row class="split-table-header">
102
+                        <u-col span="2">
103
+                            <text class="header-text">关联</text>
104
+                        </u-col>
105
+                        <u-col span="2">
106
+                            <text class="header-text">账户类型</text>
107
+                        </u-col>
108
+                        <u-col span="2">
109
+                            <text class="header-text">分成人</text>
110
+                        </u-col>
111
+                        <u-col span="2">
112
+                            <text class="header-text">比例(%)</text>
113
+                        </u-col>
114
+                        <u-col span="2">
115
+                            <text class="header-text">归属公司</text>
116
+                        </u-col>
117
+                        <u-col span="2" class="action-column">
118
+                            <text class="header-text">操作</text>
119
+                        </u-col>
120
+                    </u-row>
121
+                    <u-row v-for="(item, index) in profitSharingList" :key="item.id" class="split-table-row">
122
+                        <u-col span="2">
123
+                            <view class="table-cell">
124
+                                <select v-model="item.association" class="custom-select">
125
+                                    <option value="">无</option>
126
+                                    <option v-for="option in associationOptions" :key="option" :value="option">
127
+                                        {{ option }}
128
+                                    </option>
129
+                                </select>
129 130
                             </view>
130
-                        </view>
131
-                    </u-col>
132
-                    <u-col span="2">
133
-                        <view class="table-cell">
134
-                            <select v-model="item.person" class="custom-select">
135
-                                <option value="">无</option>
136
-                                <option v-for="person in personOptions" :key="person" :value="person">
137
-                                    {{ person }}
138
-                                </option>
139
-                            </select>
140
-                        </view>
141
-                    </u-col>
142
-                    <u-col span="2">
143
-                        <view class="table-cell">
144
-                            <u--input v-model="item.percentage" type="number" class="percentage-input"
145
-                                @input="handlePercentageInput(item)" min="0" max="100" precision="0" />
146
-                        </view>
147
-                    </u-col>
148
-                    <u-col span="2">
149
-                        <view class="table-cell">
150
-                            <view class="radio-wrapper" @click="toggleBelongToCompany(item)">
151
-                                <view :class="['radio-circle', item.belongToCompany ? 'active' : '']">
152
-                                    <u-icon v-if="item.belongToCompany" name="checkmark" size="20rpx"
153
-                                        color="#fff"></u-icon>
131
+                        </u-col>
132
+                        <u-col span="2">
133
+                            <view class="table-cell">
134
+                                <view
135
+                                    :class="['account-type', item.accountType === 'frontend' ? 'frontend' : 'backend']"
136
+                                    @click="toggleAccountType(item)" style="cursor: pointer;">
137
+                                    {{ item.accountType === 'frontend' ? '前' : '后' }}
154 138
                                 </view>
155 139
                             </view>
156
-                        </view>
157
-                    </u-col>
158
-                    <u-col span="2" class="action-column">
159
-                        <view class="table-cell">
160
-                            <u-button type="error" plain shape="circle" size="mini" @click="deleteSplit(index)"
161
-                                :disabled="profitSharingList.length <= 1">
162
-                                <u-icon name="trash" size="20rpx" color="#ff6b6b"></u-icon>
163
-                            </u-button>
164
-                        </view>
165
-                    </u-col>
166
-                </u-row>
140
+                        </u-col>
141
+                        <u-col span="2">
142
+                            <view class="table-cell">
143
+                                <select v-model="item.person" class="custom-select">
144
+                                    <option value="">无</option>
145
+                                    <option v-for="person in personOptions" :key="person" :value="person">
146
+                                        {{ person }}
147
+                                    </option>
148
+                                </select>
149
+                            </view>
150
+                        </u-col>
151
+                        <u-col span="2">
152
+                            <view class="table-cell">
153
+                                <u--input v-model="item.percentage" type="number" class="percentage-input"
154
+                                    @input="handlePercentageInput(item)" min="0" max="100" precision="0" />
155
+                            </view>
156
+                        </u-col>
157
+                        <u-col span="2">
158
+                            <view class="table-cell">
159
+                                <view class="radio-wrapper" @click="toggleBelongToCompany(item)">
160
+                                    <view :class="['radio-circle', item.belongToCompany ? 'active' : '']">
161
+                                        <u-icon v-if="item.belongToCompany" name="checkmark" size="20rpx"
162
+                                            color="#fff"></u-icon>
163
+                                    </view>
164
+                                </view>
165
+                            </view>
166
+                        </u-col>
167
+                        <u-col span="2" class="action-column">
168
+                            <view class="table-cell">
169
+                                <u-button type="error" plain shape="circle" size="mini" @click="deleteSplit(index)"
170
+                                    :disabled="profitSharingList.length <= 1">
171
+                                    <u-icon name="trash" size="20rpx" color="#ff6b6b"></u-icon>
172
+                                </u-button>
173
+                            </view>
174
+                        </u-col>
175
+                    </u-row>
176
+                </view>
167 177
             </view>
168 178
         </view>
179
+
180
+        <!-- 确认入库按钮 -->
181
+        <div class="confirm-button-container">
182
+            <u-button type="success" @click="confirmWarehouseEntry" style="border-radius: 11px;">
183
+                <u-icon name="checkmark-circle-fill" size="28rpx" color="#fff"></u-icon>
184
+                <text style="margin-left: 8rpx;">确认入库</text>
185
+            </u-button>
186
+        </div>
169 187
     </view>
170 188
 </template>
171 189
 
@@ -199,7 +217,34 @@ export default {
199 217
             // 关联选项列表
200 218
             associationOptions: ['选项1', '选项2', '选项3'],
201 219
             // 分成人选项列表
202
-            personOptions: ['人员A', '人员B', '人员C']
220
+            personOptions: ['人员A', '人员B', '人员C'],
221
+            // 表单验证规则
222
+            rules: {
223
+                accountHolder: {
224
+                    type: 'string',
225
+                    required: true,
226
+                    message: '请输入编码',
227
+                    trigger: []
228
+                },
229
+                bankName: {
230
+                    type: 'string',
231
+                    required: true,
232
+                    message: '请输入快递单号',
233
+                    trigger: []
234
+                },
235
+                item: {
236
+                    type: 'string',
237
+                    required: true,
238
+                    message: '请输入收单物品',
239
+                    trigger: []
240
+                },
241
+                uploadedImage: {
242
+                    type: 'string',
243
+                    required: true,
244
+                    message: '请上传物流图片',
245
+                    trigger: []
246
+                }
247
+            }
203 248
         };
204 249
     },
205 250
     methods: {
@@ -277,9 +322,55 @@ export default {
277 322
         // 切换归属公司状态
278 323
         toggleBelongToCompany(item) {
279 324
             item.belongToCompany = !item.belongToCompany;
325
+        },
326
+        // 确认入库方法
327
+        confirmWarehouseEntry() {
328
+            // 表单校验
329
+            this.$refs.form.validate().then(() => {
330
+                // 表单验证通过后,进行分成信息的自定义验证
331
+                if (this.validateProfitSharing()) {
332
+                    console.log(this.warehouseInfo, this.profitSharingList);
333
+                }
334
+            }).catch(() => {
335
+                // 表单验证失败,不执行后续操作
336
+            });
337
+        },
338
+        // 分成信息校验方法
339
+        validateProfitSharing() {
340
+            // 校验分成信息
341
+            for (let i = 0; i < this.profitSharingList.length; i++) {
342
+                const item = this.profitSharingList[i];
343
+                if (!item.person.trim()) {
344
+                    uni.showToast({
345
+                        title: `第${i + 1}行请选择分成人`,
346
+                        icon: 'none'
347
+                    });
348
+                    return false;
349
+                }
350
+
351
+                if (item.percentage <= 0 || item.percentage > 100) {
352
+                    uni.showToast({
353
+                        title: `第${i + 1}行分成比例必须在1-100之间`,
354
+                        icon: 'none'
355
+                    });
356
+                    return false;
357
+                }
358
+            }
359
+
360
+            // 校验分成比例总和,总和必须是100%
361
+            // const totalPercentage = this.profitSharingList.reduce((sum, item) => sum + Number(item.percentage), 0);
362
+            // if (totalPercentage !== 100) {
363
+            //     uni.showToast({
364
+            //         title: '分成比例总和必须为100%',
365
+            //         icon: 'none'
366
+            //     });
367
+            //     return false;
368
+            // }
369
+
370
+            return true;
280 371
         }
281 372
     }
282
-}
373
+};
283 374
 </script>
284 375
 
285 376
 <style lang="scss" scoped>
@@ -346,6 +437,13 @@ export default {
346 437
     }
347 438
 }
348 439
 
440
+// 防止表单label换行
441
+::v-deep .u-form-item__body__left__content__label {
442
+    white-space: nowrap;
443
+}
444
+
445
+
446
+
349 447
 // 图片上传样式
350 448
 .image-uploader {
351 449
     width: 100%;
@@ -495,7 +593,7 @@ export default {
495 593
     height: 50rpx;
496 594
     border-radius: 0;
497 595
     border: 1rpx solid #e5e7eb;
498
-    padding: 0 25rpx 0 12rpx;
596
+    text-align: center;
499 597
     /* 增加右侧内边距,为自定义箭头留出空间 */
500 598
     @include font-styles($size: tiny, $weight: regular, $color: secondary);
501 599
     background-color: #fff;
@@ -506,7 +604,6 @@ export default {
506 604
     -o-appearance: none !important;
507 605
     cursor: pointer;
508 606
     /* 使用自定义SVG箭头 */
509
-    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23909399' d='M6 8l-4-4h8z'/%3E%3C/svg%3E");
510 607
     background-repeat: no-repeat;
511 608
     background-position: right 8rpx center;
512 609
     background-size: 12rpx 12rpx;
@@ -552,6 +649,8 @@ export default {
552 649
     text-align: center;
553 650
     background-color: #f9f9f9;
554 651
     color: #606266;
652
+    text-align: center;
653
+    padding: 0rpx !important;
555 654
 }
556 655
 
557 656
 /* 账户类型标签样式 */
@@ -618,6 +717,15 @@ export default {
618 717
     background-color: #67c23a;
619 718
 }
620 719
 
720
+/* 确认入库按钮样式 */
721
+.confirm-button-container {
722
+    display: flex;
723
+    justify-content: center;
724
+    align-items: center;
725
+    padding: 40rpx 0;
726
+    margin-top: 20rpx;
727
+}
728
+
621 729
 /* 响应式布局调整 */
622 730
 @media screen and (max-width: 750rpx) {
623 731
     .split-table {

+ 52 - 7
pages/orderDetailNew/index.vue

@@ -4,11 +4,11 @@
4 4
         <u-navbar :autoBack="true" :placeholder="true" v-hideNav>
5 5
             <template v-slot:center>
6 6
                 <view class="slot-wrap">
7
-                    <text @click="handleBrandClick" class="brand">Hermes</text>
7
+                    <text @click="handleBrandClick" class="brand">{{ topInfo.brand }}</text>
8 8
                     <text class="divider">|</text>
9
-                    <text @click="handleModelClick" class="model">Birkin 30</text>
9
+                    <text @click="handleModelClick" class="model">{{ topInfo.model }}</text>
10 10
                     <text class="divider">|</text>
11
-                    <text @click="handlePriceClick" class="price">¥125,000</text>
11
+                    <text @click="handlePriceClick" class="price">¥{{ topInfo.price }}</text>
12 12
                 </view>
13 13
             </template>
14 14
             <template v-slot:right>
@@ -21,25 +21,70 @@
21 21
 
22 22
         <orderDetailNewView />
23 23
 
24
+        <!-- 通用模态窗 -->
25
+        <custom-modal :visible="modalVisible" :title="modalConfig.title" :value="modalConfig.value"
26
+            :placeholder="modalConfig.placeholder" @cancel="handleModalCancel" @confirm="handleModalConfirm" />
24 27
     </view>
25 28
 </template>
26 29
 
27 30
 <script>
28 31
 import orderDetailNewView from './components/orderDetailNewView.vue'
32
+import CustomModal from './components/CustomModal.vue'
29 33
 export default {
30 34
     name: 'CustomNavbar',
31 35
     components: {
32
-        orderDetailNewView
36
+        orderDetailNewView,
37
+        CustomModal
38
+    },
39
+    data() {
40
+        return {
41
+            topInfo: {
42
+                brand: 'Hermes',
43
+                model: 'Birkin 30',
44
+                price: '125,000'
45
+            },
46
+            modalVisible: false,
47
+            currentEditField: '',
48
+            modalConfig: {
49
+                title: '',
50
+                value: '',
51
+                placeholder: ''
52
+            }
53
+        }
33 54
     },
34 55
     methods: {
35 56
         handleBrandClick() {
36
-            console.log('点击了品牌')
57
+            this.openModal('brand', '请输入品牌', this.topInfo.brand, '请输入品牌')
37 58
         },
38 59
         handleModelClick() {
39
-            console.log('点击了型号')
60
+            this.openModal('model', '请输入型号', this.topInfo.model, '请输入型号')
40 61
         },
41 62
         handlePriceClick() {
42
-            console.log('点击了价格')
63
+            this.openModal('price', '请输入价格', this.topInfo.price, '请输入价格')
64
+        },
65
+        openModal(field, title, value, placeholder) {
66
+            this.currentEditField = field
67
+            this.modalConfig = {
68
+                title,
69
+                value,
70
+                placeholder
71
+            }
72
+            this.modalVisible = true
73
+        },
74
+        handleModalInput(value) {
75
+            this.modalConfig.value = value
76
+        },
77
+        handleModalCancel() {
78
+            this.modalVisible = false
79
+            this.currentEditField = ''
80
+        },
81
+        handleModalConfirm(newValue) {
82
+            if (this.currentEditField) {
83
+                this.topInfo[this.currentEditField] = newValue
84
+            }
85
+
86
+            this.modalVisible = false
87
+            this.currentEditField = ''
43 88
         }
44 89
     }
45 90
 }