|
|
@@ -25,8 +25,8 @@
|
|
25
|
25
|
<u-row class="info-row">
|
|
26
|
26
|
<u-col span="12">
|
|
27
|
27
|
<view class="info-label">身份证号</view>
|
|
28
|
|
- <u-input v-model="paymentInfo.idNumber" placeholder="请输入身份证号" class="info-input" type="number"
|
|
29
|
|
- @input="handleIdNumberInput" />
|
|
|
28
|
+ <u-input v-model="paymentInfo.idNumber" placeholder="请输入身份证号" class="info-input"
|
|
|
29
|
+ @blur="handleIdNumberInput" />
|
|
30
|
30
|
</u-col>
|
|
31
|
31
|
</u-row>
|
|
32
|
32
|
<u-row class="info-row">
|
|
|
@@ -266,14 +266,14 @@ export default {
|
|
266
|
266
|
this.orderDetail.itemBrand,
|
|
267
|
267
|
this.currentReceipt.clueId
|
|
268
|
268
|
)
|
|
269
|
|
-
|
|
|
269
|
+
|
|
270
|
270
|
// 按照 fileIds 排序
|
|
271
|
271
|
if (this.currentReceipt.fileIds && list && list.length > 0) {
|
|
272
|
272
|
const sortedIds = this.currentReceipt.fileIds.split(',')
|
|
273
|
273
|
list.sort((a, b) => {
|
|
274
|
274
|
const indexA = sortedIds.indexOf(a.id)
|
|
275
|
275
|
const indexB = sortedIds.indexOf(b.id)
|
|
276
|
|
-
|
|
|
276
|
+
|
|
277
|
277
|
// 如果都不在列表中,保持原顺序
|
|
278
|
278
|
if (indexA === -1 && indexB === -1) return 0
|
|
279
|
279
|
// 如果 a 不在列表中,放到后面
|
|
|
@@ -284,7 +284,7 @@ export default {
|
|
284
|
284
|
return indexA - indexB
|
|
285
|
285
|
})
|
|
286
|
286
|
}
|
|
287
|
|
-
|
|
|
287
|
+
|
|
288
|
288
|
this.detailImages = list || []
|
|
289
|
289
|
} catch (error) {
|
|
290
|
290
|
console.error('加载细节图失败:', error)
|
|
|
@@ -343,12 +343,12 @@ export default {
|
|
343
|
343
|
},
|
|
344
|
344
|
|
|
345
|
345
|
/**
|
|
346
|
|
- * 身份证号输入处理 - 只允许数字
|
|
|
346
|
+ * 身份证号输入处理 - 允许数字和X
|
|
347
|
347
|
*/
|
|
348
|
348
|
handleIdNumberInput(value) {
|
|
349
|
|
- // 只保留数字
|
|
350
|
|
- const numberReg = /[^\d]/g
|
|
351
|
|
- this.paymentInfo.idNumber = String(value || '').replace(numberReg, '')
|
|
|
349
|
+ // 只保留数字和X
|
|
|
350
|
+ const reg = /[^\dxX]/g
|
|
|
351
|
+ this.paymentInfo.idNumber = String(value || '').replace(reg, '')
|
|
352
|
352
|
},
|
|
353
|
353
|
|
|
354
|
354
|
/**
|
|
|
@@ -476,7 +476,7 @@ export default {
|
|
476
|
476
|
const itemIndex = this.detailImages.findIndex(img => img.id === item.id || img.fileUrl === item.fileUrl)
|
|
477
|
477
|
if (itemIndex !== -1) {
|
|
478
|
478
|
this.detailImages.splice(itemIndex, 1)
|
|
479
|
|
-
|
|
|
479
|
+
|
|
480
|
480
|
// 更新 fileIds
|
|
481
|
481
|
const fileIds = this.detailImages.map(item => item.id).join(',')
|
|
482
|
482
|
try {
|