1
This commit is contained in:
@@ -243,7 +243,14 @@
|
||||
aria-hidden="true"
|
||||
/>
|
||||
<div class="header-title-block">
|
||||
<div class="order-id">{{ row.orderId }}</div>
|
||||
<div class="order-id">
|
||||
<span>{{ row.orderId }}</span>
|
||||
<i
|
||||
class="el-icon-edit-outline jd-order-id-edit-ico"
|
||||
title="修改京东单号(需确认码)"
|
||||
@click.stop="openOrderIdEditDialog(row)"
|
||||
/>
|
||||
</div>
|
||||
<el-tag
|
||||
v-if="row.orderStatus != null"
|
||||
:type="getOrderStatusType(row.orderStatus)"
|
||||
@@ -371,9 +378,16 @@
|
||||
|
||||
<!-- 不使用 el-collapse-transition:避免展开后部分 WebView 上 height/overflow 异常导致无法聚焦输入框 -->
|
||||
<div v-show="mobileExpandedOrderId === row.id" class="card-content">
|
||||
<div class="field-row">
|
||||
<div class="field-row" @click.stop>
|
||||
<span class="field-label">订单号</span>
|
||||
<span class="field-value">{{ row.orderId }}</span>
|
||||
<div
|
||||
class="field-value jd-order-id-mobile-tap"
|
||||
title="点击修改京东单号(需确认码)"
|
||||
@click.stop="openOrderIdEditDialog(row)"
|
||||
>
|
||||
<span>{{ row.orderId || '点击编辑' }}</span>
|
||||
<i class="el-icon-edit-outline jd-dist-mark-edit-ico" aria-hidden="true" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="field-row field-row--third-party">
|
||||
<span class="field-label">第三方单号</span>
|
||||
@@ -654,7 +668,21 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 核心信息列 -->
|
||||
<el-table-column label="订单号" prop="orderId" width="160" :fixed="isMobile ? false : 'left'"/>
|
||||
<el-table-column label="订单号" prop="orderId" width="188" :fixed="isMobile ? false : 'left'">
|
||||
<template slot-scope="scope">
|
||||
<div
|
||||
class="jd-order-id-cell"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
title="点击修改京东单号(需确认码)"
|
||||
@click.stop="openOrderIdEditDialog(scope.row)"
|
||||
@keydown.enter.prevent.stop="openOrderIdEditDialog(scope.row)"
|
||||
>
|
||||
<span class="jd-order-id-text">{{ scope.row.orderId || '点击编辑' }}</span>
|
||||
<i class="el-icon-edit-outline jd-order-id-edit-ico" aria-hidden="true" />
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="第三方单号" prop="thirdPartyOrderNo" min-width="188">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.thirdPartyOrderNo">
|
||||
@@ -1231,6 +1259,38 @@
|
||||
<!-- 分销标识接收人配置 -->
|
||||
<distribution-mark-touser-config v-model="showTouserConfig" @config-updated="handleTouserConfigUpdated" />
|
||||
|
||||
<!-- 京东单号:点击后编辑,保存前需输入确认码(与删除一致) -->
|
||||
<el-dialog
|
||||
title="修改京东单号"
|
||||
:visible.sync="orderIdEditDialogVisible"
|
||||
:width="isMobile ? '92%' : '440px'"
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
@closed="onOrderIdEditDialogClosed"
|
||||
>
|
||||
<p class="jd-order-id-edit-hint">当前单号:{{ orderIdEditOriginal || '—' }}</p>
|
||||
<el-input
|
||||
v-model="orderIdEditDraft"
|
||||
placeholder="新的京东单号"
|
||||
clearable
|
||||
@keyup.enter.native="confirmOrderIdEdit"
|
||||
/>
|
||||
<div class="jd-order-id-verify">
|
||||
<div class="jd-order-id-verify-label">请输入确认码后保存</div>
|
||||
<div class="jd-order-id-verify-code">{{ orderIdEditCode }}</div>
|
||||
<el-input
|
||||
v-model="orderIdEditVerifyInput"
|
||||
placeholder="请输入上方确认码"
|
||||
maxlength="6"
|
||||
@keyup.enter.native="confirmOrderIdEdit"
|
||||
/>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="orderIdEditDialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" :loading="orderIdEditSaving" @click="confirmOrderIdEdit">保存</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 分销标识:点击列表单元格后编辑(非行内快捷编辑) -->
|
||||
<el-dialog
|
||||
title="编辑分销标识"
|
||||
@@ -1487,7 +1547,14 @@ export default {
|
||||
/** 分销标识弹窗编辑 */
|
||||
distributionMarkEditDialogVisible: false,
|
||||
distributionMarkEditRow: null,
|
||||
distributionMarkEditDraft: ''
|
||||
distributionMarkEditDraft: '',
|
||||
orderIdEditDialogVisible: false,
|
||||
orderIdEditRow: null,
|
||||
orderIdEditOriginal: '',
|
||||
orderIdEditDraft: '',
|
||||
orderIdEditCode: '',
|
||||
orderIdEditVerifyInput: '',
|
||||
orderIdEditSaving: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -1702,6 +1769,57 @@ export default {
|
||||
this.distributionMarkEditRow = null
|
||||
this.distributionMarkEditDraft = ''
|
||||
},
|
||||
openOrderIdEditDialog(row) {
|
||||
if (!row || row.id == null) return
|
||||
this.orderIdEditRow = row
|
||||
this.orderIdEditOriginal = row.orderId == null ? '' : String(row.orderId)
|
||||
this.orderIdEditDraft = this.orderIdEditOriginal
|
||||
this.orderIdEditCode = String(Math.floor(100000 + Math.random() * 900000))
|
||||
this.orderIdEditVerifyInput = ''
|
||||
this.orderIdEditSaving = false
|
||||
this.orderIdEditDialogVisible = true
|
||||
},
|
||||
async confirmOrderIdEdit() {
|
||||
const row = this.orderIdEditRow
|
||||
if (!row || this.orderIdEditSaving) return
|
||||
const next = (this.orderIdEditDraft || '').trim()
|
||||
if (!next) {
|
||||
this.$message.error('请输入京东单号')
|
||||
return
|
||||
}
|
||||
if (this.orderIdEditVerifyInput !== this.orderIdEditCode) {
|
||||
this.$message.error('确认码不匹配,请重新输入')
|
||||
return
|
||||
}
|
||||
if (next === this.orderIdEditOriginal) {
|
||||
this.orderIdEditDialogVisible = false
|
||||
return
|
||||
}
|
||||
const prev = row.orderId
|
||||
row.orderId = next
|
||||
this.orderIdEditSaving = true
|
||||
try {
|
||||
const pack = await this.performJDOrderUpdate(row)
|
||||
if (!pack.skipped) {
|
||||
this.$message.success('京东单号已更新')
|
||||
this.schedulePatchOrderRowFromServer(row.id)
|
||||
}
|
||||
this.orderIdEditDialogVisible = false
|
||||
} catch (e) {
|
||||
row.orderId = prev
|
||||
this.$message.error('保存失败,请稍后重试')
|
||||
} finally {
|
||||
this.orderIdEditSaving = false
|
||||
}
|
||||
},
|
||||
onOrderIdEditDialogClosed() {
|
||||
this.orderIdEditRow = null
|
||||
this.orderIdEditOriginal = ''
|
||||
this.orderIdEditDraft = ''
|
||||
this.orderIdEditCode = ''
|
||||
this.orderIdEditVerifyInput = ''
|
||||
this.orderIdEditSaving = false
|
||||
},
|
||||
/** 空标识:仅用灰色底 class */
|
||||
distributionMarkDisplayClass(mark) {
|
||||
return this.normalizeDistributionMarkInput(mark) ? '' : 'jd-dist-tone-empty'
|
||||
@@ -4436,11 +4554,71 @@ export default {
|
||||
}
|
||||
|
||||
.mobile-order-card .order-id {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
max-width: 100%;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
.jd-order-id-edit-ico {
|
||||
flex-shrink: 0;
|
||||
color: #909399;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.jd-order-id-cell {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
min-width: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.jd-order-id-text {
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.mobile-order-card .jd-order-id-mobile-tap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
gap: 6px;
|
||||
cursor: pointer;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
.jd-order-id-edit-hint {
|
||||
margin: 0 0 12px;
|
||||
color: #909399;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.jd-order-id-verify {
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.jd-order-id-verify-label {
|
||||
margin-bottom: 8px;
|
||||
color: #606266;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.jd-order-id-verify-code {
|
||||
margin-bottom: 8px;
|
||||
font-size: 28px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 6px;
|
||||
color: #e6a23c;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.mobile-order-card .header-right {
|
||||
flex-shrink: 0;
|
||||
margin-left: 12px;
|
||||
|
||||
Reference in New Issue
Block a user