Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 1620ae95
authored
May 03, 2026
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat 功能联调
1 parent
b5cccf56
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
85 additions
and
22 deletions
src/views/salesManagement/availableInStores/tigaListingAndSalesContract/components/StepTwo/components/TrafficProviderInformation.vue
src/views/systemConfig/merchant/merchantGroundingEdit/MerchantGroundingEdit.vue
src/views/systemConfig/merchant/merchantGroundingEdit/merchantDetailMap.js
src/views/systemConfig/merchant/merchantManage.vue
src/views/systemConfig/merchant/merchantStep/merchantCheckDetail.vue
src/views/systemConfig/merchant/merchantStep/merchantCheckRecord.vue
src/views/salesManagement/availableInStores/tigaListingAndSalesContract/components/StepTwo/components/TrafficProviderInformation.vue
View file @
1620ae9
...
...
@@ -272,6 +272,16 @@ export default {
return
option
?.
label
||
(
i
.
viewKey
&&
this
.
componentData
[
i
.
viewKey
])
||
value
||
'-'
},
getMultipleSelectText
(
i
)
{
const
nameByListKey
=
{
areaOpIdList
:
'areaOpName'
,
onlineOpIdList
:
'onlineOpName'
,
regionSupervisorIdList
:
'regionSupervisorName'
,
}
const
nameKey
=
nameByListKey
[
i
.
key
]
if
(
this
.
isViewMode
&&
nameKey
)
{
const
raw
=
this
.
componentData
[
nameKey
]
if
(
raw
!=
null
&&
String
(
raw
).
trim
()
!==
''
)
return
String
(
raw
).
trim
()
}
const
values
=
this
.
componentData
[
i
.
key
]
if
(
!
values
||
!
Array
.
isArray
(
values
)
||
values
.
length
===
0
||
!
i
?.
options
?.
length
)
return
'-'
...
...
src/views/systemConfig/merchant/merchantGroundingEdit/MerchantGroundingEdit.vue
View file @
1620ae9
...
...
@@ -75,7 +75,7 @@ import SalesCategory
from
"@/views/salesManagement/availableInStores/tigaListingAndSalesContract/components/StepTwo/components/SalesCategory.vue"
;
import
{
SALES_CATEGORY_RULES
}
from
"@/views/salesManagement/availableInStores/tigaListingAndSalesContract/components/StepTwo/components/constant"
;
import
MgBusinessSection
from
"./MgBusinessSection.vue"
;
import
{
buildTrafficProviderData
,
buildBusinessForm
}
from
"./merchantDetailMap"
;
import
{
buildTrafficProviderData
,
buildBusinessForm
,
normalizeBaseSceneListResponse
}
from
"./merchantDetailMap"
;
import
{
buildMerchantOnShelfOpenPayload
}
from
"./merchantOnShelfOpenPayload"
;
export
default
{
...
...
@@ -164,7 +164,7 @@ export default {
this
.
loading
=
true
;
try
{
const
scenes
=
await
getBaseSceneCodeList
({});
this
.
baseSceneList
=
Array
.
isArray
(
scenes
)
?
scenes
:
[]
;
this
.
baseSceneList
=
normalizeBaseSceneListResponse
(
scenes
)
;
const
res
=
await
queryMerchantDetail
({
merchantId
:
this
.
detailQueryMerchantId
,
baseSceneCode
:
this
.
detailQueryBaseSceneCode
,
...
...
src/views/systemConfig/merchant/merchantGroundingEdit/merchantDetailMap.js
View file @
1620ae9
...
...
@@ -8,12 +8,47 @@ export function joinIds(mi, listKey, strKey) {
return
""
;
}
/** 场景列表接口可能返回 { list } 或裸数组,统一成数组 */
export
function
normalizeBaseSceneListResponse
(
res
)
{
if
(
Array
.
isArray
(
res
))
return
res
;
if
(
res
&&
typeof
res
===
"object"
)
{
const
inner
=
res
.
list
??
res
.
records
??
res
.
data
??
res
.
rows
??
res
.
scenes
;
if
(
Array
.
isArray
(
inner
))
return
inner
;
}
return
[];
}
function
sceneRowMatchCodes
(
row
)
{
if
(
!
row
||
typeof
row
!==
"object"
)
return
[];
const
keys
=
[
"baseSceneCode"
,
"sceneCode"
,
"bizSceneCode"
,
"code"
,
"id"
,
"sceneId"
];
const
out
=
[];
for
(
const
k
of
keys
)
{
const
v
=
row
[
k
];
if
(
v
!=
null
&&
v
!==
""
)
out
.
push
(
String
(
v
).
trim
());
}
return
out
;
}
/** 历史/详情里可能出现的场景编码字段(仅用于名称反查,不含 scene 大类枚举) */
export
function
pickSceneLookupCode
(
mi
)
{
if
(
!
mi
||
typeof
mi
!==
"object"
)
return
""
;
const
keys
=
[
"baseSceneCode"
,
"bizBaseSceneCode"
,
"bizSceneCode"
,
"sceneBizCode"
,
"businessSceneCode"
];
for
(
const
k
of
keys
)
{
const
v
=
mi
[
k
];
if
(
v
!=
null
&&
v
!==
""
)
return
v
;
}
return
""
;
}
export
function
resolveSceneName
(
code
,
baseSceneList
=
[])
{
if
(
code
==
null
||
code
===
""
)
return
""
;
const
hit
=
baseSceneList
.
find
(
x
=>
String
(
x
.
baseSceneCode
)
===
String
(
code
),
);
return
hit
?.
name
||
String
(
code
);
const
codeStr
=
String
(
code
).
trim
();
if
(
!
codeStr
)
return
""
;
const
hit
=
baseSceneList
.
find
(
row
=>
sceneRowMatchCodes
(
row
).
includes
(
codeStr
));
if
(
hit
)
{
return
hit
.
name
??
hit
.
sceneName
??
hit
.
label
??
hit
.
confLabel
??
codeStr
;
}
return
codeStr
;
}
export
function
storeProfitPerCar
(
mi
)
{
...
...
@@ -27,7 +62,7 @@ export function buildTrafficProviderData(mi, baseSceneList = []) {
return
{
trafficPartyName
:
mi
.
trafficPartyName
||
""
,
parentName
:
mi
.
parentName
||
mi
.
parentMerchantName
||
""
,
sceneTypeName
:
mi
.
sceneTypeName
||
mi
.
baseSceneName
||
resolveSceneName
(
mi
.
baseSceneCode
,
baseSceneList
)
||
""
,
sceneTypeName
:
mi
.
sceneTypeName
||
mi
.
baseSceneName
||
resolveSceneName
(
pickSceneLookupCode
(
mi
)
,
baseSceneList
)
||
""
,
signingEntityId
:
mi
.
signingEntityId
!=
null
?
Number
(
mi
.
signingEntityId
)
:
null
,
signingEntity
:
mi
.
signingEntity
||
mi
.
signingEntityName
||
""
,
businessMode
:
mi
.
businessMode
!=
null
?
Number
(
mi
.
businessMode
)
:
null
,
...
...
src/views/systemConfig/merchant/merchantManage.vue
View file @
1620ae9
...
...
@@ -47,8 +47,8 @@
<!-- 禁用 -->
<auth-button
v-if=
"isRelationEnabled(scope.scope)"
slot=
"auth-button"
:data=
"scope.scope"
:show-btn-ids=
"['9060305']"
/>
<!-- 启用 -->
<auth-button
v-if=
"
isRelationDis
abled(scope.scope)"
slot=
"auth-button"
:data=
"scope.scope"
<!-- 启用
:与状态列一致,凡非「判定为启用」即展示(避免仅认 0/'0' 漏掉 false 等)
-->
<auth-button
v-if=
"
!isRelationEn
abled(scope.scope)"
slot=
"auth-button"
:data=
"scope.scope"
:show-btn-ids=
"['90603019']"
/>
</div>
</template>
...
...
@@ -431,6 +431,7 @@ export default {
}
,
{
label
:
"关联服务商名称"
,
width
:
"170px"
,
// prop: "partnerMerchants",
prop
:
"serviceList"
,
html
:
true
,
...
...
@@ -707,13 +708,13 @@ export default {
return
!
this
.
filterEmpty
(
row
.
scene
)
||
(
row
.
baseSceneCode
!=
null
&&
row
.
baseSceneCode
!==
""
);
}
,
isRelationEnabled
(
row
)
{
const
s
=
row
.
status
;
return
s
===
undefined
||
s
===
null
||
s
===
1
||
s
===
"1
"
;
/** 接口是否返回了有效的关联启用状态(0/1);null/undefined/空串视为未返回,勿覆盖父级 0 */
relationStatusIsExplicit
(
v
)
{
return
v
!==
undefined
&&
v
!==
null
&&
v
!==
"
"
;
}
,
isRelation
Dis
abled
(
row
)
{
const
s
=
row
.
status
;
return
s
===
0
||
s
===
"0"
;
isRelation
En
abled
(
row
)
{
const
s
=
row
?
.
status
;
return
s
===
undefined
||
s
===
null
||
s
===
1
||
s
===
"1"
||
s
===
true
;
}
,
formatBusinessSceneName
(
row
)
{
if
(
row
.
baseSceneName
)
{
...
...
@@ -1225,6 +1226,10 @@ export default {
if
(
rest
.
channelType
!==
undefined
)
{
row
.
channelType
=
rest
.
channelType
;
}
// newMerchantScene.status 为 null 时不应覆盖外层 status:0,否则会误显为「启用」
if
(
!
this
.
relationStatusIsExplicit
(
nms
.
status
)
&&
this
.
relationStatusIsExplicit
(
rest
.
status
))
{
row
.
status
=
rest
.
status
;
}
}
else
{
row
=
{
...
item
}
;
}
...
...
@@ -1267,6 +1272,10 @@ export default {
if
(
merged
.
baseSceneName
==
null
||
merged
.
baseSceneName
===
""
)
{
merged
.
baseSceneName
=
base
.
baseSceneName
;
}
// sceneList 子项 status 为 null 时保留父行 0/1,避免 isRelationEnabled(null) 误判为启用
if
(
!
this
.
relationStatusIsExplicit
(
s
.
status
)
&&
this
.
relationStatusIsExplicit
(
base
.
status
))
{
merged
.
status
=
base
.
status
;
}
prev
.
push
(
merged
);
}
);
}
else
{
...
...
src/views/systemConfig/merchant/merchantStep/merchantCheckDetail.vue
View file @
1620ae9
...
...
@@ -45,7 +45,7 @@
import
ledgerAccount
from
'./components/ledgerAccount.vue'
import
reconciliation
from
'./components/reconciliation.vue'
import
MerchantRelationGroundingReadonly
from
'../merchantGroundingEdit/MerchantRelationGroundingReadonly.vue'
import
{
buildTrafficProviderData
,
buildBusinessForm
}
from
'../merchantGroundingEdit/merchantDetailMap'
import
{
buildTrafficProviderData
,
buildBusinessForm
,
normalizeBaseSceneListResponse
}
from
'../merchantGroundingEdit/merchantDetailMap'
import
{
getDistributeRuleApi
,
getEffectRuleApi
,
...
...
@@ -136,7 +136,7 @@ export default {
this
.
relationLoading
=
true
try
{
const
scenes
=
await
getBaseSceneCodeList
({})
this
.
relationBaseSceneList
=
Array
.
isArray
(
scenes
)
?
scenes
:
[]
this
.
relationBaseSceneList
=
normalizeBaseSceneListResponse
(
scenes
)
const
res
=
await
queryMerchantDetail
({
merchantId
:
merchantIdNum
,
baseSceneCode
:
String
(
baseSceneCode
)
...
...
src/views/systemConfig/merchant/merchantStep/merchantCheckRecord.vue
View file @
1620ae9
...
...
@@ -96,7 +96,7 @@ import { getHistoryRecord } from "@api/publicAccount"
import
ledgerAccount
from
"./components/ledgerAccount.vue"
import
reconciliation
from
"./components/reconciliation.vue"
import
MerchantRelationGroundingReadonly
from
'../merchantGroundingEdit/MerchantRelationGroundingReadonly.vue'
import
{
buildTrafficProviderData
,
buildBusinessForm
}
from
'../merchantGroundingEdit/merchantDetailMap'
import
{
buildTrafficProviderData
,
buildBusinessForm
,
normalizeBaseSceneListResponse
,
pickSceneLookupCode
}
from
'../merchantGroundingEdit/merchantDetailMap'
import
{
getLedgerHistoryRecordApi
,
getReconciliationHistoryRecordApi
,
...
...
@@ -313,13 +313,22 @@ export default {
productDetails
:
[],
}
}
const
storeInfo
=
const
nestedRaw
=
formItem
.
merchantStoreInfoHistory
!=
null
?
formItem
.
merchantStoreInfoHistory
:
formItem
.
merchantInfo
!=
null
?
formItem
.
merchantInfo
:
formItem
const
mi
=
storeInfo
&&
typeof
storeInfo
===
"object"
?
storeInfo
:
{}
:
null
/** 顶层与嵌套合并:history 明细里可能没有 baseSceneCode,保留 formItem 上字段 */
const
mergedRow
=
nestedRaw
!=
null
&&
typeof
nestedRaw
===
"object"
?
{
...
formItem
,
...
nestedRaw
}
:
{
...
formItem
}
let
mi
=
mergedRow
&&
typeof
mergedRow
===
"object"
?
mergedRow
:
{}
const
routeBsc
=
this
.
resolveRowBaseSceneCode
(
this
.
merchantRow
)
if
(
pickSceneLookupCode
(
mi
)
===
""
&&
routeBsc
!==
""
)
{
mi
=
{
...
mi
,
baseSceneCode
:
routeBsc
}
}
let
pd
=
[]
if
(
Array
.
isArray
(
formItem
.
merchantStoreProductDetailHistoryList
))
{
pd
=
formItem
.
merchantStoreProductDetailHistoryList
...
...
@@ -342,7 +351,7 @@ export default {
})
try
{
const
scenes
=
await
getBaseSceneCodeList
({})
this
.
relationSceneList
=
Array
.
isArray
(
scenes
)
?
scenes
:
[]
this
.
relationSceneList
=
normalizeBaseSceneListResponse
(
scenes
)
}
catch
(
e
)
{
console
.
warn
(
e
)
this
.
relationSceneList
=
[]
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment