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

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

Yannay пре 2 месеци
родитељ
комит
a12098eb21

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

@@ -7,44 +7,26 @@
7
           <u-icon name="car-fill" size="36rpx" color="#108cff" class="location-icon" />
7
           <u-icon name="car-fill" size="36rpx" color="#108cff" class="location-icon" />
8
           <text class="address-title">入库信息</text>
8
           <text class="address-title">入库信息</text>
9
         </view>
9
         </view>
10
-        
10
+
11
         <!-- 编码、快递单号、物流图片 -->
11
         <!-- 编码、快递单号、物流图片 -->
12
         <u-row class="info-row" justify="space-between">
12
         <u-row class="info-row" justify="space-between">
13
           <u-col span="4.5">
13
           <u-col span="4.5">
14
             <u-form-item label="编码" prop="codeStorage">
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
             </u-form-item>
17
             </u-form-item>
22
           </u-col>
18
           </u-col>
23
           <u-col span="4.5">
19
           <u-col span="4.5">
24
             <u-form-item label="快递单号" prop="expressOrderNo">
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
             </u-form-item>
22
             </u-form-item>
31
           </u-col>
23
           </u-col>
32
           <u-col span="2">
24
           <u-col span="2">
33
             <u-form-item label="物流图片" prop="uploadedImage">
25
             <u-form-item label="物流图片" prop="uploadedImage">
34
               <view class="image-uploader" @click="selectImage">
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
               </view>
30
               </view>
49
             </u-form-item>
31
             </u-form-item>
50
           </u-col>
32
           </u-col>
@@ -54,35 +36,18 @@
54
         <u-row class="info-row" justify="space-between">
36
         <u-row class="info-row" justify="space-between">
55
           <u-col span="5.8">
37
           <u-col span="5.8">
56
             <u-form-item label="收单物品" prop="item">
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
             </u-form-item>
40
             </u-form-item>
63
           </u-col>
41
           </u-col>
64
           <u-col span="5.8">
42
           <u-col span="5.8">
65
-            <u-form-item 
66
-              label="收单类型" 
67
-              prop="customerServiceNameLabel"
68
-            >
43
+            <u-form-item label="收单类型" prop="customerServiceNameLabel">
69
               <view class="click-wrapper" @tap="selectCustomerServiceName">
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
               </view>
47
               </view>
77
             </u-form-item>
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
           </u-col>
51
           </u-col>
87
         </u-row>
52
         </u-row>
88
 
53
 
@@ -91,45 +56,21 @@
91
           <u-col span="5.8">
56
           <u-col span="5.8">
92
             <u-form-item label="类别" prop="category">
57
             <u-form-item label="类别" prop="category">
93
               <view class="click-wrapper" @tap="selectCategory">
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
               </view>
60
               </view>
101
             </u-form-item>
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
           </u-col>
64
           </u-col>
111
           <u-col span="5.8">
65
           <u-col span="5.8">
112
-            <u-form-item 
113
-              label="是否需要查码" 
114
-              prop="needCheckCode"
115
-            >
66
+            <u-form-item label="是否需要查码" prop="needCheckCode">
116
               <view class="click-wrapper" @tap="selectNeedCheckCode">
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
               </view>
70
               </view>
124
             </u-form-item>
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
           </u-col>
74
           </u-col>
134
         </u-row>
75
         </u-row>
135
 
76
 
@@ -137,23 +78,13 @@
137
         <u-row class="info-row" justify="space-between">
78
         <u-row class="info-row" justify="space-between">
138
           <u-col span="5.8">
79
           <u-col span="5.8">
139
             <u-form-item label="表款">
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
             </u-form-item>
82
             </u-form-item>
147
           </u-col>
83
           </u-col>
148
           <u-col span="5.8">
84
           <u-col span="5.8">
149
             <u-form-item label="查码费">
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
             </u-form-item>
88
             </u-form-item>
158
           </u-col>
89
           </u-col>
159
         </u-row>
90
         </u-row>
@@ -162,22 +93,12 @@
162
         <u-row class="info-row" justify="space-between">
93
         <u-row class="info-row" justify="space-between">
163
           <u-col span="5.8">
94
           <u-col span="5.8">
164
             <u-form-item label="好处费">
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
             </u-form-item>
97
             </u-form-item>
172
           </u-col>
98
           </u-col>
173
           <u-col span="5.8">
99
           <u-col span="5.8">
174
             <u-form-item label="运费">
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
             </u-form-item>
102
             </u-form-item>
182
           </u-col>
103
           </u-col>
183
         </u-row>
104
         </u-row>
@@ -186,22 +107,13 @@
186
         <u-row class="info-row" justify="space-between">
107
         <u-row class="info-row" justify="space-between">
187
           <u-col span="5.8">
108
           <u-col span="5.8">
188
             <u-form-item label="维修金额">
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
             </u-form-item>
111
             </u-form-item>
196
           </u-col>
112
           </u-col>
197
           <u-col span="5.8">
113
           <u-col span="5.8">
198
             <u-form-item label="分单比例(0~100)">
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
             </u-form-item>
117
             </u-form-item>
206
           </u-col>
118
           </u-col>
207
         </u-row>
119
         </u-row>
@@ -210,35 +122,20 @@
210
         <u-row class="info-row" justify="space-between">
122
         <u-row class="info-row" justify="space-between">
211
           <u-col span="3.8">
123
           <u-col span="3.8">
212
             <u-form-item label="成本合计">
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
             </u-form-item>
127
             </u-form-item>
221
           </u-col>
128
           </u-col>
222
           <u-col span="3.8">
129
           <u-col span="3.8">
223
             <u-form-item label="业绩">
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
             </u-form-item>
133
             </u-form-item>
232
           </u-col>
134
           </u-col>
233
           <u-col span="3.8">
135
           <u-col span="3.8">
234
             <u-form-item label="毛业绩">
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
             </u-form-item>
139
             </u-form-item>
243
           </u-col>
140
           </u-col>
244
         </u-row>
141
         </u-row>
@@ -247,13 +144,8 @@
247
         <u-row class="info-row">
144
         <u-row class="info-row">
248
           <u-col span="12">
145
           <u-col span="12">
249
             <u-form-item label="收单备注">
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
             </u-form-item>
149
             </u-form-item>
258
           </u-col>
150
           </u-col>
259
         </u-row>
151
         </u-row>
@@ -263,22 +155,15 @@
263
     <!-- 分成信息卡片 -->
155
     <!-- 分成信息卡片 -->
264
     <view class="card-wrap">
156
     <view class="card-wrap">
265
       <view class="address-section">
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
             <u-icon name="plus" size="24rpx" color="#108cff" />
162
             <u-icon name="plus" size="24rpx" color="#108cff" />
278
             <text>添加</text>
163
             <text>添加</text>
279
-          </u-button>
164
+          </view>
280
         </view>
165
         </view>
281
-        
166
+
282
         <!-- 分成信息表格 -->
167
         <!-- 分成信息表格 -->
283
         <view class="split-table">
168
         <view class="split-table">
284
           <u-row class="split-table-header">
169
           <u-row class="split-table-header">
@@ -289,48 +174,27 @@
289
             <u-col span="1"><text class="header-text">公司</text></u-col>
174
             <u-col span="1"><text class="header-text">公司</text></u-col>
290
             <u-col span="2" class="action-column"><text class="header-text">操作</text></u-col>
175
             <u-col span="2" class="action-column"><text class="header-text">操作</text></u-col>
291
           </u-row>
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
             <u-col span="4">
178
             <u-col span="4">
298
               <view class="table-cell">
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
               </view>
181
               </view>
305
             </u-col>
182
             </u-col>
306
             <u-col span="2">
183
             <u-col span="2">
307
               <view class="table-cell">
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
               </view>
186
               </view>
314
             </u-col>
187
             </u-col>
315
             <u-col span="2">
188
             <u-col span="2">
316
               <view class="table-cell">
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
               </view>
192
               </view>
327
             </u-col>
193
             </u-col>
328
             <u-col span="1">
194
             <u-col span="1">
329
               <view class="table-cell">
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
                   {{ item.accountType == '1' ? '前' : '后' }}
198
                   {{ item.accountType == '1' ? '前' : '后' }}
335
                 </view>
199
                 </view>
336
               </view>
200
               </view>
@@ -339,26 +203,15 @@
339
               <view class="table-cell">
203
               <view class="table-cell">
340
                 <view class="radio-wrapper" @click="toggleBelongToCompany(item)">
204
                 <view class="radio-wrapper" @click="toggleBelongToCompany(item)">
341
                   <view :class="['radio-circle', item.isCompanyPerformance == '1' ? 'active' : '']">
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
                   </view>
207
                   </view>
349
                 </view>
208
                 </view>
350
               </view>
209
               </view>
351
             </u-col>
210
             </u-col>
352
             <u-col span="2" class="action-column">
211
             <u-col span="2" class="action-column">
353
               <view class="table-cell">
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
                   <u-icon name="trash" size="20rpx" color="#ff6b6b" />
215
                   <u-icon name="trash" size="20rpx" color="#ff6b6b" />
363
                 </u-button>
216
                 </u-button>
364
               </view>
217
               </view>
@@ -370,35 +223,19 @@
370
 
223
 
371
     <!-- 确认入库按钮 -->
224
     <!-- 确认入库按钮 -->
372
     <view class="confirm-button-container">
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
         <u-icon name="checkmark-circle-fill" size="28rpx" color="#fff" />
227
         <u-icon name="checkmark-circle-fill" size="28rpx" color="#fff" />
379
         <text style="margin-left: 8rpx;">确认入库</text>
228
         <text style="margin-left: 8rpx;">确认入库</text>
380
       </u-button>
229
       </u-button>
381
     </view>
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
     <u-toast ref="uToast" />
240
     <u-toast ref="uToast" />
404
   </view>
241
   </view>
@@ -509,12 +346,12 @@ export default {
509
     initWarehouseInfo(data) {
346
     initWarehouseInfo(data) {
510
       const receiptRemark = data.receiptRemark || ''
347
       const receiptRemark = data.receiptRemark || ''
511
       const remarkParts = receiptRemark.split(';')
348
       const remarkParts = receiptRemark.split(';')
512
-      
349
+
513
       // 设置默认值:收单类型默认为"收单类",类别默认为"腕表",是否需要查码默认为"是"
350
       // 设置默认值:收单类型默认为"收单类",类别默认为"腕表",是否需要查码默认为"是"
514
       const defaultCustomerServiceName = data.customerServiceName || '1'
351
       const defaultCustomerServiceName = data.customerServiceName || '1'
515
       const defaultCategory = data.category || '1'
352
       const defaultCategory = data.category || '1'
516
       const defaultNeedCheckCode = data.needCheckCode || '1'
353
       const defaultNeedCheckCode = data.needCheckCode || '1'
517
-      
354
+
518
       this.warehouseInfo = {
355
       this.warehouseInfo = {
519
         codeStorage: data.code || '',
356
         codeStorage: data.code || '',
520
         expressOrderNo: data.expressOrderNo || '',
357
         expressOrderNo: data.expressOrderNo || '',
@@ -531,17 +368,17 @@ export default {
531
         remarks: remarkParts[0] || '',
368
         remarks: remarkParts[0] || '',
532
         customerServiceName: defaultCustomerServiceName,
369
         customerServiceName: defaultCustomerServiceName,
533
         customerServiceNameLabel: this.getLabelByValue(
370
         customerServiceNameLabel: this.getLabelByValue(
534
-          this.customerServiceColumns[0], 
371
+          this.customerServiceColumns[0],
535
           defaultCustomerServiceName
372
           defaultCustomerServiceName
536
         ),
373
         ),
537
         category: defaultCategory,
374
         category: defaultCategory,
538
         categoryLabel: this.getLabelByValue(
375
         categoryLabel: this.getLabelByValue(
539
-          this.categoryColumns[0], 
376
+          this.categoryColumns[0],
540
           defaultCategory
377
           defaultCategory
541
         ),
378
         ),
542
         needCheckCode: defaultNeedCheckCode,
379
         needCheckCode: defaultNeedCheckCode,
543
         needCheckCodeLabel: this.getLabelByValue(
380
         needCheckCodeLabel: this.getLabelByValue(
544
-          this.needCheckCodeColumns[0], 
381
+          this.needCheckCodeColumns[0],
545
           defaultNeedCheckCode
382
           defaultNeedCheckCode
546
         )
383
         )
547
       }
384
       }
@@ -592,13 +429,13 @@ export default {
592
      */
429
      */
593
     async loadShareList() {
430
     async loadShareList() {
594
       if (!this.currentReceipt.sendFormId) return
431
       if (!this.currentReceipt.sendFormId) return
595
-      
432
+
596
       try {
433
       try {
597
         const { rows } = await uni.$u.api.selectCommissionList({
434
         const { rows } = await uni.$u.api.selectCommissionList({
598
           pageSize: 9999,
435
           pageSize: 9999,
599
           pageNum: 1
436
           pageNum: 1
600
         }, { sendFormId: this.currentReceipt.sendFormId })
437
         }, { sendFormId: this.currentReceipt.sendFormId })
601
-        
438
+
602
         const newRows = rows
439
         const newRows = rows
603
           .filter(item => item.receiptFormId == this.currentReceipt.id)
440
           .filter(item => item.receiptFormId == this.currentReceipt.id)
604
           .map(item => ({
441
           .map(item => ({
@@ -637,7 +474,7 @@ export default {
637
       const backItems = this.profitSharingList.filter(item => item.accountType == '2')
474
       const backItems = this.profitSharingList.filter(item => item.accountType == '2')
638
       const totalFrontItems = frontItems.length || 1
475
       const totalFrontItems = frontItems.length || 1
639
       const totalBackItems = backItems.length || 1
476
       const totalBackItems = backItems.length || 1
640
-      
477
+
641
       this.profitSharingList.forEach(item => {
478
       this.profitSharingList.forEach(item => {
642
         if (item.accountType == '1') {
479
         if (item.accountType == '1') {
643
           item.commissionRate = Math.floor(100 / totalFrontItems)
480
           item.commissionRate = Math.floor(100 / totalFrontItems)
@@ -933,7 +770,7 @@ export default {
933
 
770
 
934
 .address-section {
771
 .address-section {
935
   padding: 20rpx;
772
   padding: 20rpx;
936
-  
773
+
937
   // 防止 label 换行
774
   // 防止 label 换行
938
   ::v-deep .u-form-item__body__left__content__label {
775
   ::v-deep .u-form-item__body__left__content__label {
939
     white-space: nowrap !important;
776
     white-space: nowrap !important;
@@ -1022,11 +859,11 @@ export default {
1022
   color: #fff;
859
   color: #fff;
1023
   text-align: center;
860
   text-align: center;
1024
   cursor: pointer;
861
   cursor: pointer;
1025
-  
862
+
1026
   &.frontend {
863
   &.frontend {
1027
     background-color: #409eff;
864
     background-color: #409eff;
1028
   }
865
   }
1029
-  
866
+
1030
   &.backend {
867
   &.backend {
1031
     background-color: #909399;
868
     background-color: #909399;
1032
   }
869
   }
@@ -1048,7 +885,7 @@ export default {
1048
   align-items: center;
885
   align-items: center;
1049
   justify-content: center;
886
   justify-content: center;
1050
   transition: all 0.3s ease;
887
   transition: all 0.3s ease;
1051
-  
888
+
1052
   &.active {
889
   &.active {
1053
     border-color: #67c23a;
890
     border-color: #67c23a;
1054
     background-color: #67c23a;
891
     background-color: #67c23a;
@@ -1070,4 +907,8 @@ export default {
1070
   text-align: center;
907
   text-align: center;
1071
   border-radius: 11px;
908
   border-radius: 11px;
1072
 }
909
 }
910
+
911
+.add-button-container{
912
+  justify-content: space-between;
913
+}
1073
 </style>
914
 </style>

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

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

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

@@ -149,4 +149,21 @@ $text-colors: (
149
     margin-left: 16rpx;
149
     margin-left: 16rpx;
150
     @include font-styles($size: title, $weight: bold, $color: primary);
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
 }