diff --git a/src/api/system/jdorder.js b/src/api/system/jdorder.js
index e4ca9c3..73e2d1a 100644
--- a/src/api/system/jdorder.js
+++ b/src/api/system/jdorder.js
@@ -27,6 +27,14 @@ export function listQuickRecordShopOptions() {
})
}
+/** 一键迁移:拆分 model_number 末尾店铺前缀到 model_shop */
+export function migrateModelShopSplit() {
+ return request({
+ url: '/system/jdorder/migrateModelShop',
+ method: 'post'
+ })
+}
+
// JD订单详情
export function getJDOrder(id) {
return request({
diff --git a/src/views/system/jd-instruction/fadan-quick-record.vue b/src/views/system/jd-instruction/fadan-quick-record.vue
index a0fd9ac..053b0a9 100644
--- a/src/views/system/jd-instruction/fadan-quick-record.vue
+++ b/src/views/system/jd-instruction/fadan-quick-record.vue
@@ -356,25 +356,33 @@ export default {
if (!base) return ''
return prefix ? base + prefix : base
},
+ fullModelFromOption(o) {
+ if (!o) return ''
+ const base = String(o.modelNumber || '').trim()
+ const shop = String(o.modelShop || '').trim()
+ if (!base) return shop
+ if (!shop) return base
+ if (base.endsWith(shop)) return base
+ return base + shop
+ },
queryModels(queryString, cb) {
const q = (queryString || '').trim().toLowerCase()
const rows = this.modelOptions
.filter(o => {
- const m = String(o.modelNumber || '').trim()
- if (!m) return false
+ const full = this.fullModelFromOption(o)
+ if (!full) return false
if (!q) return true
- const parsed = this.parseModelWithShop(m)
- return m.toLowerCase().includes(q) || parsed.base.toLowerCase().includes(q)
+ const parsed = this.parseModelWithShop(full)
+ return full.toLowerCase().includes(q) || parsed.base.toLowerCase().includes(q)
})
.slice(0, 100)
cb(
rows.map(o => {
- const full = String(o.modelNumber).trim()
+ const full = this.fullModelFromOption(o)
const parsed = this.parseModelWithShop(full)
- const displayBase = parsed.base || full
return {
value: full,
- label: this.modelOptionLabel({ ...o, modelNumber: displayBase })
+ label: this.modelOptionLabel({ ...o, modelNumber: parsed.base || full })
}
})
)
@@ -383,8 +391,13 @@ export default {
onModelSuggestionSelect(item) {
if (!item || !item.value) return
const key = String(item.value).trim()
- this.applyModelWithShop(key)
- const hit = this.modelOptions.find(o => o && String(o.modelNumber || '').trim() === key)
+ const hit = this.modelOptions.find(o => this.fullModelFromOption(o) === key)
+ if (hit && hit.modelShop) {
+ this.form.model = String(hit.modelNumber || '').trim()
+ this.form.shopPrefix = String(hit.modelShop || '').trim()
+ } else {
+ this.applyModelWithShop(key)
+ }
if (!hit) return
const payRaw = hit.lastPaymentAmount
const rebateRaw = hit.lastRebateAmount
diff --git a/src/views/system/jdorder/orderList.vue b/src/views/system/jdorder/orderList.vue
index a6f30e4..85427b4 100644
--- a/src/views/system/jdorder/orderList.vue
+++ b/src/views/system/jdorder/orderList.vue
@@ -64,7 +64,12 @@
-
+
+
+
+
+
+
@@ -191,6 +196,7 @@
腾峰文档配置
推送监控
接收人配置
+ 拆分型号店铺
批量标记后返到账
导入后返表
后返上传记录
@@ -353,7 +359,7 @@
>{{ row.distributionMark }}
·
- {{ row.modelNumber || '—' }} · 付{{ toYuan(row.paymentAmount) }} · 返{{ toYuan(row.rebateAmount) }}
+ {{ fullModelNumber(row) || '—' }} · 付{{ toYuan(row.paymentAmount) }} · 返{{ toYuan(row.rebateAmount) }}
@@ -396,15 +402,26 @@
型号
-
@@ -650,18 +667,29 @@
-
+
-
+
+
+
+
@@ -1314,7 +1342,7 @@