Explorar o código

refactor: streamline input components and enhance layout in PageFour and PageOne

Yannay hai 2 meses
pai
achega
a12098eb21

+ 74 - 233
pages/orderDetailRefactored/components/PageFour.vue

@@ -7,44 +7,26 @@
7 7
           <u-icon name="car-fill" size="36rpx" color="#108cff" class="location-icon" />
8 8
           <text class="address-title">入库信息</text>
9 9
         </view>
10
-        
10
+
11 11
         <!-- 编码、快递单号、物流图片 -->
12 12
         <u-row class="info-row" justify="space-between">
13 13
           <u-col span="4.5">
14 14
             <u-form-item label="编码" prop="codeStorage">
15
-              <u--input 
16
-                v-model="warehouseInfo.codeStorage" 
17
-                placeholder="请输入编码" 
18
-                class="info-input"
19
-                :disabled="warehouseInfo.needCheckCode === '2'"
20
-              />
15
+              <u--input v-model="warehouseInfo.codeStorage" placeholder="请输入编码" class="info-input"
16
+                :disabled="warehouseInfo.needCheckCode === '2'" />
21 17
             </u-form-item>
22 18
           </u-col>
23 19
           <u-col span="4.5">
24 20
             <u-form-item label="快递单号" prop="expressOrderNo">
25
-              <u--input 
26
-                v-model="warehouseInfo.expressOrderNo" 
27
-                placeholder="请输入快递单号" 
28
-                class="info-input" 
29
-              />
21
+              <u--input v-model="warehouseInfo.expressOrderNo" placeholder="请输入快递单号" class="info-input" />
30 22
             </u-form-item>
31 23
           </u-col>
32 24
           <u-col span="2">
33 25
             <u-form-item label="物流图片" prop="uploadedImage">
34 26
               <view class="image-uploader" @click="selectImage">
35
-                <u-icon 
36
-                  v-if="!warehouseInfo.uploadedImage" 
37
-                  name="camera-fill" 
38
-                  size="48rpx"
39
-                  color="#909399" 
40
-                  class="camera-icon"
41
-                />
42
-                <image 
43
-                  v-else 
44
-                  :src="warehouseInfo.uploadedImage" 
45
-                  mode="aspectFill"
46
-                  class="image-preview"
47
-                />
27
+                <u-icon v-if="!warehouseInfo.uploadedImage" name="camera-fill" size="48rpx" color="#909399"
28
+                  class="camera-icon" />
29
+                <image v-else :src="warehouseInfo.uploadedImage" mode="aspectFill" class="image-preview" />
48 30
               </view>
49 31
             </u-form-item>
50 32
           </u-col>
@@ -54,35 +36,18 @@
54 36
         <u-row class="info-row" justify="space-between">
55 37
           <u-col span="5.8">
56 38
             <u-form-item label="收单物品" prop="item">
57
-              <u--input 
58
-                v-model="warehouseInfo.item" 
59
-                placeholder="请输入收单物品" 
60
-                class="info-input" 
61
-              />
39
+              <u--input v-model="warehouseInfo.item" placeholder="请输入收单物品" class="info-input" />
62 40
             </u-form-item>
63 41
           </u-col>
64 42
           <u-col span="5.8">
65
-            <u-form-item 
66
-              label="收单类型" 
67
-              prop="customerServiceNameLabel"
68
-            >
43
+            <u-form-item label="收单类型" prop="customerServiceNameLabel">
69 44
               <view class="click-wrapper" @tap="selectCustomerServiceName">
70
-                <u--input 
71
-                  v-model="warehouseInfo.customerServiceNameLabel" 
72
-                  placeholder="点击选择收单类型"
73
-                  class="info-input" 
74
-                  disabled 
75
-                />
45
+                <u--input v-model="warehouseInfo.customerServiceNameLabel" placeholder="点击选择收单类型" class="info-input"
46
+                  disabled />
76 47
               </view>
77 48
             </u-form-item>
78
-            <u-picker 
79
-              :show="showCustomerServicePicker" 
80
-              :columns="customerServiceColumns" 
81
-              confirm
82
-              keyName="label" 
83
-              @confirm="handleConfirmCustomerService"
84
-              @cancel="showCustomerServicePicker = false"
85
-            />
49
+            <u-picker :show="showCustomerServicePicker" :columns="customerServiceColumns" confirm keyName="label"
50
+              @confirm="handleConfirmCustomerService" @cancel="showCustomerServicePicker = false" />
86 51
           </u-col>
87 52
         </u-row>
88 53
 
@@ -91,45 +56,21 @@
91 56
           <u-col span="5.8">
92 57
             <u-form-item label="类别" prop="category">
93 58
               <view class="click-wrapper" @tap="selectCategory">
94
-                <u--input 
95
-                  v-model="warehouseInfo.categoryLabel" 
96
-                  placeholder="点击选择类别" 
97
-                  class="info-input"
98
-                  disabled 
99
-                />
59
+                <u--input v-model="warehouseInfo.categoryLabel" placeholder="点击选择类别" class="info-input" disabled />
100 60
               </view>
101 61
             </u-form-item>
102
-            <u-picker 
103
-              :show="showCategoryPicker" 
104
-              :columns="categoryColumns" 
105
-              confirm 
106
-              keyName="label"
107
-              @confirm="handleConfirmCategory" 
108
-              @cancel="showCategoryPicker = false"
109
-            />
62
+            <u-picker :show="showCategoryPicker" :columns="categoryColumns" confirm keyName="label"
63
+              @confirm="handleConfirmCategory" @cancel="showCategoryPicker = false" />
110 64
           </u-col>
111 65
           <u-col span="5.8">
112
-            <u-form-item 
113
-              label="是否需要查码" 
114
-              prop="needCheckCode"
115
-            >
66
+            <u-form-item label="是否需要查码" prop="needCheckCode">
116 67
               <view class="click-wrapper" @tap="selectNeedCheckCode">
117
-                <u--input 
118
-                  v-model="warehouseInfo.needCheckCodeLabel" 
119
-                  placeholder="点击选择是否需要查码"
120
-                  class="info-input" 
121
-                  disabled 
122
-                />
68
+                <u--input v-model="warehouseInfo.needCheckCodeLabel" placeholder="点击选择是否需要查码" class="info-input"
69
+                  disabled />
123 70
               </view>
124 71
             </u-form-item>
125
-            <u-picker 
126
-              :show="showNeedCheckCodePicker" 
127
-              :columns="needCheckCodeColumns" 
128
-              confirm
129
-              keyName="label" 
130
-              @confirm="handleConfirmNeedCheckCode"
131
-              @cancel="showNeedCheckCodePicker = false"
132
-            />
72
+            <u-picker :show="showNeedCheckCodePicker" :columns="needCheckCodeColumns" confirm keyName="label"
73
+              @confirm="handleConfirmNeedCheckCode" @cancel="showNeedCheckCodePicker = false" />
133 74
           </u-col>
134 75
         </u-row>
135 76
 
@@ -137,23 +78,13 @@
137 78
         <u-row class="info-row" justify="space-between">
138 79
           <u-col span="5.8">
139 80
             <u-form-item label="表款">
140
-              <u--input 
141
-                v-model="warehouseInfo.watchPrice" 
142
-                placeholder="请输入表款" 
143
-                class="info-input"
144
-                type="number" 
145
-              />
81
+              <u--input v-model="warehouseInfo.watchPrice" placeholder="请输入表款" class="info-input" type="number" />
146 82
             </u-form-item>
147 83
           </u-col>
148 84
           <u-col span="5.8">
149 85
             <u-form-item label="查码费">
150
-              <u--input 
151
-                v-model="warehouseInfo.checkCodeFee" 
152
-                placeholder="请输入查码费" 
153
-                class="info-input"
154
-                type="number" 
155
-                :disabled="warehouseInfo.needCheckCode === '2'" 
156
-              />
86
+              <u--input v-model="warehouseInfo.checkCodeFee" placeholder="请输入查码费" class="info-input" type="number"
87
+                :disabled="warehouseInfo.needCheckCode === '2'" />
157 88
             </u-form-item>
158 89
           </u-col>
159 90
         </u-row>
@@ -162,22 +93,12 @@
162 93
         <u-row class="info-row" justify="space-between">
163 94
           <u-col span="5.8">
164 95
             <u-form-item label="好处费">
165
-              <u--input 
166
-                v-model="warehouseInfo.benefitFee" 
167
-                placeholder="请输入好处费" 
168
-                class="info-input"
169
-                type="number" 
170
-              />
96
+              <u--input v-model="warehouseInfo.benefitFee" placeholder="请输入好处费" class="info-input" type="number" />
171 97
             </u-form-item>
172 98
           </u-col>
173 99
           <u-col span="5.8">
174 100
             <u-form-item label="运费">
175
-              <u--input 
176
-                v-model="warehouseInfo.freight" 
177
-                placeholder="请输入运费" 
178
-                class="info-input"
179
-                type="number" 
180
-              />
101
+              <u--input v-model="warehouseInfo.freight" placeholder="请输入运费" class="info-input" type="number" />
181 102
             </u-form-item>
182 103
           </u-col>
183 104
         </u-row>
@@ -186,22 +107,13 @@
186 107
         <u-row class="info-row" justify="space-between">
187 108
           <u-col span="5.8">
188 109
             <u-form-item label="维修金额">
189
-              <u--input 
190
-                v-model="warehouseInfo.repairAmount" 
191
-                placeholder="请输入维修金额" 
192
-                class="info-input"
193
-                type="number" 
194
-              />
110
+              <u--input v-model="warehouseInfo.repairAmount" placeholder="请输入维修金额" class="info-input" type="number" />
195 111
             </u-form-item>
196 112
           </u-col>
197 113
           <u-col span="5.8">
198 114
             <u-form-item label="分单比例(0~100)">
199
-              <u--input 
200
-                v-model="warehouseInfo.splitRatio" 
201
-                placeholder="请输入分单比例(0~100)" 
202
-                class="info-input"
203
-                type="number" 
204
-              />
115
+              <u--input v-model="warehouseInfo.splitRatio" placeholder="请输入分单比例(0~100)" class="info-input"
116
+                type="number" />
205 117
             </u-form-item>
206 118
           </u-col>
207 119
         </u-row>
@@ -210,35 +122,20 @@
210 122
         <u-row class="info-row" justify="space-between">
211 123
           <u-col span="3.8">
212 124
             <u-form-item label="成本合计">
213
-              <u--input 
214
-                :disabled="true" 
215
-                :value="computedTotalCost" 
216
-                placeholder="成本合计自动计算"
217
-                class="info-input" 
218
-                type="number" 
219
-              />
125
+              <u--input :disabled="true" :value="computedTotalCost" placeholder="成本合计自动计算" class="info-input"
126
+                type="number" />
220 127
             </u-form-item>
221 128
           </u-col>
222 129
           <u-col span="3.8">
223 130
             <u-form-item label="业绩">
224
-              <u--input 
225
-                :disabled="true" 
226
-                :value="computedPerformance" 
227
-                placeholder="业绩自动计算"
228
-                class="info-input" 
229
-                type="number" 
230
-              />
131
+              <u--input :disabled="true" :value="computedPerformance" placeholder="业绩自动计算" class="info-input"
132
+                type="number" />
231 133
             </u-form-item>
232 134
           </u-col>
233 135
           <u-col span="3.8">
234 136
             <u-form-item label="毛业绩">
235
-              <u--input 
236
-                :disabled="true" 
237
-                :value="computedGrossPerformance" 
238
-                placeholder="毛业绩自动计算"
239
-                class="info-input" 
240
-                type="number" 
241
-              />
137
+              <u--input :disabled="true" :value="computedGrossPerformance" placeholder="毛业绩自动计算" class="info-input"
138
+                type="number" />
242 139
             </u-form-item>
243 140
           </u-col>
244 141
         </u-row>
@@ -247,13 +144,8 @@
247 144
         <u-row class="info-row">
248 145
           <u-col span="12">
249 146
             <u-form-item label="收单备注">
250
-              <u--textarea 
251
-                v-model="warehouseInfo.remarks" 
252
-                placeholder="请输入收单备注" 
253
-                class="info-input"
254
-                confirmType="done" 
255
-                rows="4" 
256
-              />
147
+              <u--textarea v-model="warehouseInfo.remarks" placeholder="请输入收单备注" class="info-input" confirmType="done"
148
+                rows="4" />
257 149
             </u-form-item>
258 150
           </u-col>
259 151
         </u-row>
@@ -263,22 +155,15 @@
263 155
     <!-- 分成信息卡片 -->
264 156
     <view class="card-wrap">
265 157
       <view class="address-section">
266
-        <view class="address-header">
267
-          <u-icon name="list" size="36rpx" color="#108cff" class="location-icon" />
268
-          <text class="address-title">分成信息</text>
269
-          <u-button 
270
-            type="primary" 
271
-            plain 
272
-            shape="circle" 
273
-            size="mini" 
274
-            class="add-button" 
275
-            @click="addSplit"
276
-          >
158
+        <view class="address-header add-button-container">
159
+            <text class="address-title">分成信息</text>
160
+
161
+          <view class="add-button" @click="addSplit">
277 162
             <u-icon name="plus" size="24rpx" color="#108cff" />
278 163
             <text>添加</text>
279
-          </u-button>
164
+          </view>
280 165
         </view>
281
-        
166
+
282 167
         <!-- 分成信息表格 -->
283 168
         <view class="split-table">
284 169
           <u-row class="split-table-header">
@@ -289,48 +174,27 @@
289 174
             <u-col span="1"><text class="header-text">公司</text></u-col>
290 175
             <u-col span="2" class="action-column"><text class="header-text">操作</text></u-col>
291 176
           </u-row>
292
-          <u-row 
293
-            v-for="(item, index) in profitSharingList" 
294
-            :key="item.uuid" 
295
-            class="split-table-row"
296
-          >
177
+          <u-row v-for="(item, index) in profitSharingList" :key="item.uuid" class="split-table-row">
297 178
             <u-col span="4">
298 179
               <view class="table-cell">
299
-                <u-button 
300
-                  @click="handleSelectOrg(item)" 
301
-                  :text="item.orgName || '选择组织'" 
302
-                  plain
303
-                />
180
+                <u-button @click="handleSelectOrg(item)" :text="item.orgName || '选择组织'" plain />
304 181
               </view>
305 182
             </u-col>
306 183
             <u-col span="2">
307 184
               <view class="table-cell">
308
-                <u-button 
309
-                  @click="handleSelectPerson(item)" 
310
-                  :text="item.userName || '选择人员'" 
311
-                  plain
312
-                />
185
+                <u-button @click="handleSelectPerson(item)" :text="item.userName || '选择人员'" plain />
313 186
               </view>
314 187
             </u-col>
315 188
             <u-col span="2">
316 189
               <view class="table-cell">
317
-                <u--input 
318
-                  v-model="item.commissionRate" 
319
-                  type="number" 
320
-                  class="percentage-input"
321
-                  @input="handlePercentageInput(item)" 
322
-                  min="0" 
323
-                  max="100" 
324
-                  precision="0" 
325
-                />
190
+                <u--input v-model="item.commissionRate" type="number" class="percentage-input"
191
+                  @input="handlePercentageInput(item)" min="0" max="100" precision="0" />
326 192
               </view>
327 193
             </u-col>
328 194
             <u-col span="1">
329 195
               <view class="table-cell">
330
-                <view 
331
-                  :class="['account-type', item.accountType == '1' ? 'frontend' : 'backend']"
332
-                  @click="toggleAccountType(item)"
333
-                >
196
+                <view :class="['account-type', item.accountType == '1' ? 'frontend' : 'backend']"
197
+                  @click="toggleAccountType(item)">
334 198
                   {{ item.accountType == '1' ? '前' : '后' }}
335 199
                 </view>
336 200
               </view>
@@ -339,26 +203,15 @@
339 203
               <view class="table-cell">
340 204
                 <view class="radio-wrapper" @click="toggleBelongToCompany(item)">
341 205
                   <view :class="['radio-circle', item.isCompanyPerformance == '1' ? 'active' : '']">
342
-                    <u-icon 
343
-                      v-if="item.isCompanyPerformance == '1'" 
344
-                      name="checkmark" 
345
-                      size="20rpx"
346
-                      color="#fff"
347
-                    />
206
+                    <u-icon v-if="item.isCompanyPerformance == '1'" name="checkmark" size="20rpx" color="#fff" />
348 207
                   </view>
349 208
                 </view>
350 209
               </view>
351 210
             </u-col>
352 211
             <u-col span="2" class="action-column">
353 212
               <view class="table-cell">
354
-                <u-button 
355
-                  type="error" 
356
-                  plain 
357
-                  shape="circle" 
358
-                  size="mini"
359
-                  @click="deleteRow(item.id, item.uuid)" 
360
-                  class="delete-btn"
361
-                >
213
+                <u-button type="error" plain shape="circle" size="mini" @click="deleteRow(item.id, item.uuid)"
214
+                  class="delete-btn">
362 215
                   <u-icon name="trash" size="20rpx" color="#ff6b6b" />
363 216
                 </u-button>
364 217
               </view>
@@ -370,35 +223,19 @@
370 223
 
371 224
     <!-- 确认入库按钮 -->
372 225
     <view class="confirm-button-container">
373
-      <u-button 
374
-        class="next-btn" 
375
-        type="success" 
376
-        @click="confirmWarehouseEntry"
377
-      >
226
+      <u-button class="next-btn" type="success" @click="confirmWarehouseEntry">
378 227
         <u-icon name="checkmark-circle-fill" size="28rpx" color="#fff" />
379 228
         <text style="margin-left: 8rpx;">确认入库</text>
380 229
       </u-button>
381 230
     </view>
382 231
 
383 232
     <!-- 组织选择器 -->
384
-    <u-picker 
385
-      :show="showOrgPicker" 
386
-      title="请选择组织" 
387
-      :columns="columnsOrgList" 
388
-      keyName="label"
389
-      @confirm="handleOrgConfirm" 
390
-      @cancel="showOrgPicker = false"
391
-    />
233
+    <u-picker :show="showOrgPicker" title="请选择组织" :columns="columnsOrgList" keyName="label" @confirm="handleOrgConfirm"
234
+      @cancel="showOrgPicker = false" />
392 235
 
393 236
     <!-- 人员选择器 -->
394
-    <u-picker 
395
-      :show="showPersonPicker" 
396
-      title="请选择分成人" 
397
-      :columns="columnsPersonList" 
398
-      keyName="label"
399
-      @confirm="handleConfirmPerson" 
400
-      @cancel="handleCancelPerson"
401
-    />
237
+    <u-picker :show="showPersonPicker" title="请选择分成人" :columns="columnsPersonList" keyName="label"
238
+      @confirm="handleConfirmPerson" @cancel="handleCancelPerson" />
402 239
 
403 240
     <u-toast ref="uToast" />
404 241
   </view>
@@ -509,12 +346,12 @@ export default {
509 346
     initWarehouseInfo(data) {
510 347
       const receiptRemark = data.receiptRemark || ''
511 348
       const remarkParts = receiptRemark.split(';')
512
-      
349
+
513 350
       // 设置默认值:收单类型默认为"收单类",类别默认为"腕表",是否需要查码默认为"是"
514 351
       const defaultCustomerServiceName = data.customerServiceName || '1'
515 352
       const defaultCategory = data.category || '1'
516 353
       const defaultNeedCheckCode = data.needCheckCode || '1'
517
-      
354
+
518 355
       this.warehouseInfo = {
519 356
         codeStorage: data.code || '',
520 357
         expressOrderNo: data.expressOrderNo || '',
@@ -531,17 +368,17 @@ export default {
531 368
         remarks: remarkParts[0] || '',
532 369
         customerServiceName: defaultCustomerServiceName,
533 370
         customerServiceNameLabel: this.getLabelByValue(
534
-          this.customerServiceColumns[0], 
371
+          this.customerServiceColumns[0],
535 372
           defaultCustomerServiceName
536 373
         ),
537 374
         category: defaultCategory,
538 375
         categoryLabel: this.getLabelByValue(
539
-          this.categoryColumns[0], 
376
+          this.categoryColumns[0],
540 377
           defaultCategory
541 378
         ),
542 379
         needCheckCode: defaultNeedCheckCode,
543 380
         needCheckCodeLabel: this.getLabelByValue(
544
-          this.needCheckCodeColumns[0], 
381
+          this.needCheckCodeColumns[0],
545 382
           defaultNeedCheckCode
546 383
         )
547 384
       }
@@ -592,13 +429,13 @@ export default {
592 429
      */
593 430
     async loadShareList() {
594 431
       if (!this.currentReceipt.sendFormId) return
595
-      
432
+
596 433
       try {
597 434
         const { rows } = await uni.$u.api.selectCommissionList({
598 435
           pageSize: 9999,
599 436
           pageNum: 1
600 437
         }, { sendFormId: this.currentReceipt.sendFormId })
601
-        
438
+
602 439
         const newRows = rows
603 440
           .filter(item => item.receiptFormId == this.currentReceipt.id)
604 441
           .map(item => ({
@@ -637,7 +474,7 @@ export default {
637 474
       const backItems = this.profitSharingList.filter(item => item.accountType == '2')
638 475
       const totalFrontItems = frontItems.length || 1
639 476
       const totalBackItems = backItems.length || 1
640
-      
477
+
641 478
       this.profitSharingList.forEach(item => {
642 479
         if (item.accountType == '1') {
643 480
           item.commissionRate = Math.floor(100 / totalFrontItems)
@@ -933,7 +770,7 @@ export default {
933 770
 
934 771
 .address-section {
935 772
   padding: 20rpx;
936
-  
773
+
937 774
   // 防止 label 换行
938 775
   ::v-deep .u-form-item__body__left__content__label {
939 776
     white-space: nowrap !important;
@@ -1022,11 +859,11 @@ export default {
1022 859
   color: #fff;
1023 860
   text-align: center;
1024 861
   cursor: pointer;
1025
-  
862
+
1026 863
   &.frontend {
1027 864
     background-color: #409eff;
1028 865
   }
1029
-  
866
+
1030 867
   &.backend {
1031 868
     background-color: #909399;
1032 869
   }
@@ -1048,7 +885,7 @@ export default {
1048 885
   align-items: center;
1049 886
   justify-content: center;
1050 887
   transition: all 0.3s ease;
1051
-  
888
+
1052 889
   &.active {
1053 890
     border-color: #67c23a;
1054 891
     background-color: #67c23a;
@@ -1070,4 +907,8 @@ export default {
1070 907
   text-align: center;
1071 908
   border-radius: 11px;
1072 909
 }
910
+
911
+.add-button-container{
912
+  justify-content: space-between;
913
+}
1073 914
 </style>

+ 63 - 74
pages/orderDetailRefactored/components/PageOne.vue

@@ -2,52 +2,42 @@
2 2
   <view class="page-one-container">
3 3
     <!-- 图片资料标题 -->
4 4
     <view class="page-header">
5
-      <text class="page-title">图片资料</text>
5
+      <!-- <text class="page-title">图片资料</text>
6 6
       <u-button 
7 7
         size="small" 
8 8
         @click="handleSaveAllImages"
9 9
         class="save-all-btn"
10 10
       >
11 11
         保存实物图
12
-      </u-button>
12
+      </u-button> -->
13
+      <view class="detail-image-header">
14
+        <text class="detail-image-title">图片资料</text>
15
+        <view class="copy-btn" @click="handleSaveAllImages">
16
+          <text>一键复制</text>
17
+        </view>
18
+      </view>
13 19
     </view>
14 20
 
15 21
     <!-- 聊天记录/通话记录卡片 -->
16 22
     <view class="card-wrap">
17 23
       <view class="card-title">
18
-        <text 
19
-          :class="{ 'active': recordType === 'chat' }"
20
-          @click="recordType = 'chat'"
21
-        >
24
+        <text :class="{ 'active': recordType === 'chat' }" @click="recordType = 'chat'">
22 25
           聊天记录
23 26
         </text>
24 27
         <text class="divider">|</text>
25
-        <text 
26
-          :class="{ 'active': recordType === 'call' }"
27
-          @click="recordType = 'call'"
28
-        >
28
+        <text :class="{ 'active': recordType === 'call' }" @click="recordType = 'call'">
29 29
           通话记录
30 30
         </text>
31 31
       </view>
32
-      
32
+
33 33
       <!-- 聊天记录 -->
34 34
       <view v-if="recordType === 'chat'" class="image-upload-container">
35 35
         <view class="image-list">
36
-          <view 
37
-            v-for="(item, index) in chatRecordsList" 
38
-            :key="`chat-${index}`"
39
-            class="image-item"
40
-          >
41
-            <PicComp 
42
-              :src="item.fileUrl" 
43
-              @needPreviewPic="previewImage"
44
-            />
36
+          <view v-for="(item, index) in chatRecordsList" :key="`chat-${index}`" class="image-item">
37
+            <PicComp :src="item.fileUrl" @needPreviewPic="previewImage" />
45 38
             <view class="delete-btn" @click="handleDeleteImage(item)">×</view>
46 39
           </view>
47
-          <view 
48
-            class="upload-btn" 
49
-            @click="handleUploadImage('chatRecords')"
50
-          >
40
+          <view class="upload-btn" @click="handleUploadImage('chatRecords')">
51 41
             <u-icon name="plus" size="40" color="#999" />
52 42
           </view>
53 43
         </view>
@@ -55,12 +45,8 @@
55 45
 
56 46
       <!-- 通话录音 -->
57 47
       <view v-if="recordType === 'call'" class="call-records-container">
58
-        <sound-recorder 
59
-          v-for="item in soundRecordList" 
60
-          :key="item.fileName"
61
-          :data="item"
62
-          @handleDelectThisSoundRecord="handleDeleteSoundRecord"
63
-        />
48
+        <sound-recorder v-for="item in soundRecordList" :key="item.fileName" :data="item"
49
+          @handleDelectThisSoundRecord="handleDeleteSoundRecord" />
64 50
       </view>
65 51
     </view>
66 52
 
@@ -69,21 +55,11 @@
69 55
       <view class="card-title">实物图</view>
70 56
       <view class="image-upload-container">
71 57
         <view class="image-list">
72
-          <view 
73
-            v-for="(item, index) in truePicList" 
74
-            :key="`truePic-${index}`"
75
-            class="image-item"
76
-          >
77
-            <PicComp 
78
-              :src="item.fileUrl" 
79
-              @needPreviewPic="previewTrueImage"
80
-            />
58
+          <view v-for="(item, index) in truePicList" :key="`truePic-${index}`" class="image-item">
59
+            <PicComp :src="item.fileUrl" @needPreviewPic="previewTrueImage" />
81 60
             <view class="delete-btn" @click="handleDeleteImage(item)">×</view>
82 61
           </view>
83
-          <view 
84
-            class="upload-btn" 
85
-            @click="handleUploadImage('truePic')"
86
-          >
62
+          <view class="upload-btn" @click="handleUploadImage('truePic')">
87 63
             <u-icon name="plus" size="40" color="#999" />
88 64
           </view>
89 65
         </view>
@@ -117,18 +93,12 @@
117 93
 
118 94
     <!-- 联系方式卡片 -->
119 95
     <view class="contact-card">
120
-      <view 
121
-        class="contact-item phone-card" 
122
-        @click="handlePhoneClick"
123
-      >
96
+      <view class="contact-item phone-card" @click="handlePhoneClick">
124 97
         <u-icon name="phone" size="40" color="#07C160" />
125 98
         <view class="contact-title">电话</view>
126 99
         <view v-if="orderDetail.phone" class="red-dot"></view>
127 100
       </view>
128
-      <view 
129
-        class="contact-item wechat-card" 
130
-        @click="handleWechatClick"
131
-      >
101
+      <view class="contact-item wechat-card" @click="handleWechatClick">
132 102
         <u-icon name="chat" size="40" color="#07C160" />
133 103
         <view class="contact-title">微信</view>
134 104
         <view v-if="orderDetail.wechat" class="red-dot"></view>
@@ -137,12 +107,7 @@
137 107
 
138 108
     <!-- 下一步按钮 -->
139 109
     <view class="space-block"></view>
140
-    <u-button 
141
-      class="next-btn" 
142
-      @click="handleNext" 
143
-      type="primary" 
144
-      size="middle"
145
-    >
110
+    <u-button class="next-btn" @click="handleNext" type="primary" size="middle">
146 111
       下一步
147 112
     </u-button>
148 113
   </view>
@@ -199,23 +164,23 @@ export default {
199 164
      */
200 165
     async loadImageList() {
201 166
       if (!this.currentReceipt.id || !this.orderDetail.itemBrand) return
202
-      
167
+
203 168
       try {
204 169
         // 加载聊天记录
205 170
         const chatList = await imageUpload.getFileList(
206
-          '2', 
207
-          '1', 
208
-          this.currentReceipt.id, 
171
+          '2',
172
+          '1',
173
+          this.currentReceipt.id,
209 174
           this.orderDetail.itemBrand,
210 175
           this.currentReceipt.clueId
211 176
         )
212 177
         this.chatRecordsList = chatList || []
213
-        
178
+
214 179
         // 加载实物图
215 180
         const truePicList = await imageUpload.getFileList(
216
-          '2', 
217
-          '2', 
218
-          this.currentReceipt.id, 
181
+          '2',
182
+          '2',
183
+          this.currentReceipt.id,
219 184
           this.orderDetail.itemBrand,
220 185
           this.currentReceipt.clueId
221 186
         )
@@ -230,7 +195,7 @@ export default {
230 195
      */
231 196
     async loadCallRecords() {
232 197
       if (!this.currentReceipt.clueId) return
233
-      
198
+
234 199
       try {
235 200
         const { data } = await uni.$u.api.getCallClueFileByClueId({
236 201
           clueId: this.currentReceipt.clueId
@@ -248,7 +213,7 @@ export default {
248 213
       try {
249 214
         const filePaths = await imageUpload.chooseImage(9)
250 215
         const uploadResults = await imageUpload.uploadFiles(filePaths)
251
-        
216
+
252 217
         // 绑定订单文件
253 218
         const orderFileType = type === 'truePic' ? '2' : '1'
254 219
         await imageUpload.bindOrderFile(
@@ -257,7 +222,7 @@ export default {
257 222
           orderFileType,
258 223
           uploadResults
259 224
         )
260
-        
225
+
261 226
         // 刷新列表
262 227
         this.loadImageList()
263 228
       } catch (error) {
@@ -346,7 +311,7 @@ export default {
346 311
         })
347 312
         return
348 313
       }
349
-      
314
+
350 315
       uni.showModal({
351 316
         title: '保存图片',
352 317
         content: `是否将 ${allUrls.length} 张图片保存到本地相册?`,
@@ -370,7 +335,7 @@ export default {
370 335
         })
371 336
         return
372 337
       }
373
-      
338
+
374 339
       uni.makePhoneCall({
375 340
         phoneNumber: this.orderDetail.phone,
376 341
         success: () => {
@@ -394,7 +359,7 @@ export default {
394 359
         })
395 360
         return
396 361
       }
397
-      
362
+
398 363
       uni.setClipboardData({
399 364
         data: this.orderDetail.wechat,
400 365
         success: () => {
@@ -454,17 +419,17 @@ export default {
454 419
   border-bottom: 1rpx solid map-get($colors, border);
455 420
   display: flex;
456 421
   align-items: center;
457
-  
422
+
458 423
   text {
459 424
     padding: 0 10rpx;
460 425
     cursor: pointer;
461
-    
426
+
462 427
     &.active {
463 428
       color: map-get($colors, primary);
464 429
       font-weight: bold;
465 430
     }
466 431
   }
467
-  
432
+
468 433
   .divider {
469 434
     margin: 0 10rpx;
470 435
     color: #ddd;
@@ -598,4 +563,28 @@ export default {
598 563
   text-align: center;
599 564
   border-radius: 20rpx;
600 565
 }
566
+
567
+
568
+.detail-image-header {
569
+  display: flex;
570
+  justify-content: space-between;
571
+  align-items: center;
572
+  width: 100%;
573
+  border-bottom: 1rpx solid map-get($colors, border);
574
+}
575
+
576
+.detail-image-title {
577
+  @include font-styles($size: content, $weight: bold, $color: primary);
578
+}
579
+
580
+.copy-btn {
581
+  border-radius: 20rpx;
582
+  border: 1rpx solid #007AFF;
583
+  background-color: transparent;
584
+  color: #007AFF;
585
+  padding: 0 24rpx;
586
+  height: 64rpx;
587
+  line-height: 64rpx;
588
+  cursor: pointer;
589
+}
601 590
 </style>

+ 17 - 0
pages/orderDetailRefactored/styles/common.scss

@@ -149,4 +149,21 @@ $text-colors: (
149 149
     margin-left: 16rpx;
150 150
     @include font-styles($size: title, $weight: bold, $color: primary);
151 151
   }
152
+
153
+  .add-button {
154
+    display: flex;
155
+    align-items: center;
156
+    justify-content: center;
157
+    padding: 8rpx 24rpx;
158
+    border: 1rpx solid #108cff;
159
+    border-radius: 40rpx;
160
+    background-color: transparent;
161
+    color: #108cff;
162
+    font-size: 24rpx;
163
+    cursor: pointer;
164
+    
165
+    text {
166
+      margin-left: 8rpx;
167
+    }
168
+  }
152 169
 }