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 f834c531
authored
May 11, 2026
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix bug
1 parent
747be494
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
207 additions
and
101 deletions
src/api/grounding.js
src/api/merchant.js
src/components/SelectBrand/index.vue
src/components/merchantVerify/InfoVerifyMerchantDialog.vue
src/components/merchantVerify/merchantVerifyFormMixin.js
src/components/province-city/index.vue
src/plugin/axios/index_code.js
src/views/systemConfig/merchant/financialRules/index.vue
src/views/systemConfig/merchant/merchantStep/components/classificationCpt.vue
src/views/systemConfig/merchant/merchantStep/merchantCheck.vue
src/views/systemConfig/merchant/merchantStep/utils/validateReconciliationRulePayload.js
src/api/grounding.js
View file @
f834c53
...
@@ -57,7 +57,7 @@ export function getAllGoodsList(data) {
...
@@ -57,7 +57,7 @@ export function getAllGoodsList(data) {
}
}
export
function
getAllGoodsListPage
(
data
)
{
export
function
getAllGoodsListPage
(
data
)
{
data
.
method
=
`
${
path
}
merchantGoodsInfo.rule.selectList`
;
data
.
method
=
`
${
path
}
merchantGoodsInfo.rule.selectList`
;
return
request
(
data
,
"post"
);
return
request
(
data
,
"post"
,
[],
{
skipGlobalLoading
:
true
}
);
}
}
// 批量下架
// 批量下架
...
@@ -82,7 +82,7 @@ export function checkGroundingLog(data) {
...
@@ -82,7 +82,7 @@ export function checkGroundingLog(data) {
// 分页查询套餐管理记录
// 分页查询套餐管理记录
export
function
merchantPackageGoodsInfoPage
(
data
)
{
export
function
merchantPackageGoodsInfoPage
(
data
)
{
data
.
method
=
`
${
path
}
merchantPackageGoodsInfo.page`
;
data
.
method
=
`
${
path
}
merchantPackageGoodsInfo.page`
;
return
request
(
data
,
"post"
);
return
request
(
data
,
"post"
,
[],
{
skipGlobalLoading
:
true
}
);
}
}
// return request(data, 'post')
// return request(data, 'post')
// }
// }
...
...
src/api/merchant.js
View file @
f834c53
...
@@ -273,7 +273,7 @@ export function merchantSettleDistributeRuleTestRule(data) {
...
@@ -273,7 +273,7 @@ export function merchantSettleDistributeRuleTestRule(data) {
// 根据4s店获取服务商列表
// 根据4s店获取服务商列表
export
function
scenemerchantrefQueryServiceRefByShop
(
data
)
{
export
function
scenemerchantrefQueryServiceRefByShop
(
data
)
{
data
.
method
=
`
${
path
}
scenemerchantref.queryServiceRefByShop`
;
data
.
method
=
`
${
path
}
scenemerchantref.queryServiceRefByShop
.new
`
;
return
request
(
data
,
RequestMethods
.
POST
);
return
request
(
data
,
RequestMethods
.
POST
);
}
}
...
@@ -429,18 +429,16 @@ export function paymentChannelList(data = {}) {
...
@@ -429,18 +429,16 @@ export function paymentChannelList(data = {}) {
* 获取对账配置所有品类列表
* 获取对账配置所有品类列表
*/
*/
export
function
getReconciliationGoodsTypeListApi
(
data
=
{})
{
export
function
getReconciliationGoodsTypeListApi
(
data
=
{})
{
data
.
method
=
"dj.api.create.business.approve.listReconciliationGoodsTypeGroup"
;
data
.
method
=
"dj.api.create.business.approve.listReconciliationGoodsTypeGroup"
;
return
request
(
data
,
RequestMethods
.
POST
);
return
request
(
data
,
RequestMethods
.
POST
);
}
}
/**
/**
* 获取轻改门店列表数据
* 获取轻改门店列表数据
*/
*/
export
function
getMerchantList
(
data
)
{
export
function
getMerchantList
(
data
)
{
data
.
method
=
"dj.api.servicemerchantref.pageServiceMerchantRef"
;
data
.
method
=
"dj.api.servicemerchantref.pageServiceMerchantRef"
;
return
request
(
data
,
RequestMethods
.
POST
);
return
request
(
data
,
RequestMethods
.
POST
);
}
}
src/components/SelectBrand/index.vue
View file @
f834c53
...
@@ -33,7 +33,8 @@
...
@@ -33,7 +33,8 @@
</div>
</div>
</div>
</div>
<div
class=
"tree-box"
v-show=
"brandTree"
>
<div
class=
"tree-box"
v-show=
"brandTree"
>
<el-input
class=
"tree-input"
prefix-icon=
"el-icon-search"
placeholder=
"输入关键字进行过滤"
v-model=
"filterText"
></el-input>
<el-input
class=
"tree-input"
prefix-icon=
"el-icon-search"
placeholder=
"输入关键字进行过滤"
v-model=
"filterText"
:validate-event=
"false"
></el-input>
<el-tree
class=
"filter-tree"
@
check=
"handleCheck"
:data=
"brandListTree"
:props=
"defaultProps"
node-key=
"id"
show-checkbox
:filter-node-method=
"filterNode"
ref=
"tree"
></el-tree>
<el-tree
class=
"filter-tree"
@
check=
"handleCheck"
:data=
"brandListTree"
:props=
"defaultProps"
node-key=
"id"
show-checkbox
:filter-node-method=
"filterNode"
ref=
"tree"
></el-tree>
<div
class=
"tree-footer"
>
<div
class=
"tree-footer"
>
<div
class=
"tree-footer-checkbox"
>
<div
class=
"tree-footer-checkbox"
>
...
...
src/components/merchantVerify/InfoVerifyMerchantDialog.vue
View file @
f834c53
...
@@ -148,9 +148,12 @@ export default {
...
@@ -148,9 +148,12 @@ export default {
created
()
{
created
()
{
this
.
debouncedOnBrandFieldChange
=
util
.
debounce
(()
=>
{
this
.
debouncedOnBrandFieldChange
=
util
.
debounce
(()
=>
{
this
.
syncMerchantBrandSlotPlaceholder
();
this
.
syncMerchantBrandSlotPlaceholder
();
// 避免 getCheckList 初始化等在未展开品牌区时就标红;展开后 isFirstBrand 为 true 再即时校验
if
(
this
.
isFirstBrand
)
{
this
.
$refs
.
editFormRef
?.
$refs
[
this
.
editChildRef
]?.
validateField
(
this
.
$refs
.
editFormRef
?.
$refs
[
this
.
editChildRef
]?.
validateField
(
"merchantBrandSlot"
"merchantBrandSlot"
);
);
}
},
120
);
},
120
);
},
},
beforeDestroy
()
{
beforeDestroy
()
{
...
...
src/components/merchantVerify/merchantVerifyFormMixin.js
View file @
f834c53
...
@@ -247,7 +247,7 @@ function buildEditFormData(vm) {
...
@@ -247,7 +247,7 @@ function buildEditFormData(vm) {
{
{
label
:
"主营品牌"
,
label
:
"主营品牌"
,
name
:
"merchantBrandSlot"
,
name
:
"merchantBrandSlot"
,
labelRequired
:
tru
e
,
labelRequired
:
fals
e
,
addHtml
:
"selectBrand"
,
addHtml
:
"selectBrand"
,
style
:
DIALOG_FULL
,
style
:
DIALOG_FULL
,
},
},
...
@@ -258,6 +258,11 @@ function buildEditFormData(vm) {
...
@@ -258,6 +258,11 @@ function buildEditFormData(vm) {
maxlength
:
15
,
maxlength
:
15
,
placeholder
:
"请输入"
,
placeholder
:
"请输入"
,
style
:
DIALOG_HALF
,
style
:
DIALOG_HALF
,
/** 降低浏览器/密码管理器把本弹窗当成站点登录表单而自动填充的概率 */
attrs
:
{
autocomplete
:
"merchant-verify-login"
,
"data-lpignore"
:
"true"
,
},
},
},
{
{
label
:
"登录密码"
,
label
:
"登录密码"
,
...
@@ -267,6 +272,10 @@ function buildEditFormData(vm) {
...
@@ -267,6 +272,10 @@ function buildEditFormData(vm) {
showPass
:
true
,
showPass
:
true
,
placeholder
:
"请输入"
,
placeholder
:
"请输入"
,
style
:
DIALOG_HALF
,
style
:
DIALOG_HALF
,
attrs
:
{
autocomplete
:
"new-password"
,
"data-lpignore"
:
"true"
,
},
},
},
];
];
}
}
...
@@ -345,8 +354,12 @@ export default {
...
@@ -345,8 +354,12 @@ export default {
{
required
:
true
,
message
:
"请输入联系电话"
},
{
required
:
true
,
message
:
"请输入联系电话"
},
{
{
validator
(
rule
,
value
,
callback
)
{
validator
(
rule
,
value
,
callback
)
{
if
(
!
/^
\d{11}
$/
.
test
(
value
||
""
))
{
if
(
!
/^1
[
3-9
]\d{9}
$/
.
test
(
value
||
""
))
{
callback
(
new
Error
(
"联系电话须为11位数字"
));
callback
(
new
Error
(
"请输入11位有效手机号(号段须为13-19开头)"
)
);
return
;
return
;
}
}
callback
();
callback
();
...
@@ -382,6 +395,11 @@ export default {
...
@@ -382,6 +395,11 @@ export default {
const
latOk
=
coordOk
(
d
.
lat
)
||
coordOk
(
d
.
latitude
);
const
latOk
=
coordOk
(
d
.
lat
)
||
coordOk
(
d
.
latitude
);
const
lngOk
=
const
lngOk
=
coordOk
(
d
.
lng
)
||
coordOk
(
d
.
longitude
);
coordOk
(
d
.
lng
)
||
coordOk
(
d
.
longitude
);
// 已通过地图选址(有详细文案与经纬度)时,不要求与省市区下拉逐项一致
if
(
latOk
&&
lngOk
&&
hasText
)
{
callback
();
return
;
}
if
(
if
(
!
hasProvince
||
!
hasProvince
||
!
hasCity
||
!
hasCity
||
...
@@ -406,6 +424,11 @@ export default {
...
@@ -406,6 +424,11 @@ export default {
],
],
merchantBrandSlot
:
[
merchantBrandSlot
:
[
{
{
required
:
true
,
message
:
"请选择主营品牌(需选择至子品牌)"
,
trigger
:
"change"
,
},
{
validator
(
_
,
__
,
callback
)
{
validator
(
_
,
__
,
callback
)
{
vm
.
$nextTick
(()
=>
{
vm
.
$nextTick
(()
=>
{
const
brand
=
vm
.
$refs
.
brandListTree
;
const
brand
=
vm
.
$refs
.
brandListTree
;
...
@@ -902,11 +925,9 @@ export default {
...
@@ -902,11 +925,9 @@ export default {
if
(
!
this
.
isFirstBrand
)
{
if
(
!
this
.
isFirstBrand
)
{
this
.
isFirstBrand
=
true
;
this
.
isFirstBrand
=
true
;
}
}
// 仅展开/收起主营品牌面板,勿在此触发 validateField,否则一打开就标红
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
syncMerchantBrandSlotPlaceholder
();
this
.
syncMerchantBrandSlotPlaceholder
();
this
.
$refs
.
editFormRef
?.
$refs
[
this
.
editChildRef
]?.
validateField
(
"merchantBrandSlot"
);
});
});
},
},
initProvinceCity
(
provinceData
)
{
initProvinceCity
(
provinceData
)
{
...
...
src/components/province-city/index.vue
View file @
f834c53
...
@@ -312,85 +312,146 @@ export default {
...
@@ -312,85 +312,146 @@ export default {
})
})
},
},
/**
* 地图逆地理得到的省、市、区名称,同步到表单并刷新省市区下拉数据源(与下拉是否已选无关)。
*/
syncProvinceCityTownFromMapGeocoder
(
provincename
,
cityname
,
townName
,
mapData
)
{
const
adStr
=
mapData
.
adcode
!=
null
&&
mapData
.
adcode
!==
''
?
String
(
mapData
.
adcode
)
:
''
const
setCodesFromAdcode
=
()
=>
{
if
(
adStr
.
length
>=
3
)
{
this
.
provinceForm
.
provinceCode
=
String
(
parseInt
(
adStr
.
slice
(
0
,
3
)
+
'000'
,
10
)
)
}
else
{
this
.
provinceForm
.
provinceCode
=
''
}
this
.
provinceForm
.
cityCode
=
adStr
const
tcRaw
=
mapData
.
town_code
!=
null
&&
mapData
.
town_code
!==
''
?
String
(
mapData
.
town_code
)
:
adStr
this
.
provinceForm
.
townCode
=
tcRaw
||
''
}
if
(
!
this
.
AllData
||
!
this
.
AllData
.
length
)
{
this
.
provinceForm
.
provinceName
=
provincename
this
.
provinceForm
.
cityName
=
cityname
this
.
provinceForm
.
townName
=
this
.
subdistrict
===
3
?
townName
:
''
setCodesFromAdcode
()
this
.
cityList
=
[]
this
.
townList
=
[]
return
}
let
foundP
=
null
for
(
let
i
=
0
;
i
<
this
.
AllData
.
length
;
i
++
)
{
const
item
=
this
.
AllData
[
i
]
if
(
item
.
name
.
indexOf
(
provincename
)
!==
-
1
)
{
foundP
=
item
break
}
}
if
(
!
foundP
)
{
this
.
provinceForm
.
provinceName
=
provincename
this
.
provinceForm
.
cityName
=
cityname
this
.
provinceForm
.
townName
=
this
.
subdistrict
===
3
?
townName
:
''
setCodesFromAdcode
()
this
.
cityList
=
[]
this
.
townList
=
[]
return
}
this
.
provinceForm
.
provinceName
=
foundP
.
name
this
.
cityList
=
foundP
.
districts
||
[]
this
.
provinceForm
.
provinceCode
=
foundP
.
adcode
!=
null
&&
foundP
.
adcode
!==
''
?
String
(
foundP
.
adcode
)
:
''
let
foundC
=
null
for
(
let
j
=
0
;
j
<
this
.
cityList
.
length
;
j
++
)
{
const
itm
=
this
.
cityList
[
j
]
if
(
itm
.
name
.
indexOf
(
cityname
)
!==
-
1
)
{
foundC
=
itm
break
}
}
if
(
!
foundC
)
{
this
.
provinceForm
.
cityName
=
cityname
this
.
provinceForm
.
townName
=
this
.
subdistrict
===
3
?
townName
:
''
this
.
provinceForm
.
cityCode
=
adStr
const
tc
=
mapData
.
town_code
!=
null
&&
mapData
.
town_code
!==
''
?
String
(
mapData
.
town_code
)
:
adStr
this
.
provinceForm
.
townCode
=
tc
||
''
this
.
townList
=
[]
return
}
this
.
provinceForm
.
cityName
=
foundC
.
name
this
.
provinceForm
.
cityCode
=
foundC
.
adcode
!=
null
&&
foundC
.
adcode
!==
''
?
String
(
foundC
.
adcode
)
:
adStr
this
.
townList
=
foundC
.
districts
||
[]
if
(
this
.
subdistrict
!==
3
)
{
this
.
provinceForm
.
townName
=
''
this
.
provinceForm
.
townCode
=
''
return
}
let
foundT
=
null
for
(
let
k
=
0
;
k
<
this
.
townList
.
length
;
k
++
)
{
const
itmx
=
this
.
townList
[
k
]
if
(
itmx
.
name
.
indexOf
(
townName
)
!==
-
1
)
{
foundT
=
itmx
break
}
}
if
(
foundT
)
{
this
.
provinceForm
.
townName
=
foundT
.
name
this
.
provinceForm
.
townCode
=
foundT
.
adcode
!=
null
&&
foundT
.
adcode
!==
''
?
String
(
foundT
.
adcode
)
:
''
}
else
{
this
.
provinceForm
.
townName
=
townName
const
tc
=
mapData
.
town_code
!=
null
&&
mapData
.
town_code
!==
''
?
String
(
mapData
.
town_code
)
:
adStr
this
.
provinceForm
.
townCode
=
tc
||
''
}
},
// 选择地图地址
// 选择地图地址
getAddress
()
{
getAddress
()
{
if
(
!
this
.
$refs
.
mapForm
.
address
)
{
if
(
!
this
.
$refs
.
mapForm
.
address
)
{
this
.
$message
.
success
(
'请选择地址'
)
this
.
$message
.
success
(
'请选择地址'
)
return
return
}
}
// this.provinceForm.fullAddress = this.$refs.mapForm.address
// 获取选择经纬度
let
lnglat
=
this
.
$refs
.
mapForm
.
lnglat
let
lnglat
=
this
.
$refs
.
mapForm
.
lnglat
this
.
provinceForm
.
lat
=
lnglat
.
lat
.
toFixed
(
4
)
this
.
provinceForm
.
lat
=
lnglat
.
lat
.
toFixed
(
4
)
this
.
provinceForm
.
lng
=
lnglat
.
lng
.
toFixed
(
4
)
this
.
provinceForm
.
lng
=
lnglat
.
lng
.
toFixed
(
4
)
var
mapData
=
this
.
$refs
.
mapForm
.
geocoderAddress
var
mapData
=
this
.
$refs
.
mapForm
.
geocoderAddress
||
{}
// 赋值省市区名称和code
console
.
log
(
mapData
,
'\\\\\\'
)
var
provincename
=
mapData
.
province
||
''
const
{
city
,
adcode
,
province
,
district
,
town_code
}
=
mapData
var
cityname
=
mapData
.
city
?
mapData
.
city
:
mapData
.
district
console
.
log
(
adcode
,
'adcode'
)
var
town
=
mapData
.
district
||
''
if
(
!
this
.
provinceForm
.
provinceName
)
{
this
.
provinceForm
.
provinceName
=
province
this
.
provinceForm
.
cityName
=
city
this
.
provinceForm
.
townName
=
district
this
.
provinceForm
.
provinceCode
=
+
((
adcode
+
''
).
slice
(
0
,
3
)
+
'000'
)
this
.
provinceForm
.
cityCode
=
adcode
const
tcFallback
=
town_code
!=
null
&&
town_code
!==
''
?
town_code
:
adcode
!=
null
&&
adcode
!==
''
?
adcode
:
''
this
.
provinceForm
.
townCode
=
tcFallback
!==
''
?
String
(
tcFallback
)
:
''
}
var
fullAddress
=
''
var
provincecode
=
''
// 为防止打开地图弹框不选择地址点确定按钮无法正确判断地址选择是否正确产生的报错,设置this.addressData.fullAddress来保存上次选择的地址
// if (mapData.addressComponent) {
// fullAddress = mapData.addressComponent
// provincecode = mapData.adcode
// this.addressData.fullAddress = fullAddress
// this.addressData.provincecode = provincecode
// } else {
// fullAddress = this.addressData.fullAddress
// provincecode = this.addressData.provincecode
// }
// 获取省市
var
provincename
=
''
var
cityname
=
''
var
town
=
''
provincename
=
mapData
.
province
cityname
=
mapData
.
city
?
mapData
.
city
:
mapData
.
district
town
=
mapData
.
district
// 直辖市需额外判断
const
municipalities
=
[
'北京市'
,
'天津市'
,
'上海市'
,
'重庆市'
]
const
municipalities
=
[
'北京市'
,
'天津市'
,
'上海市'
,
'重庆市'
]
var
municipality
=
municipalities
.
find
(
item
=>
item
==
provincename
)
var
municipality
=
municipalities
.
find
(
item
=>
item
==
provincename
)
if
(
municipality
)
{
if
(
municipality
&&
cityname
)
{
cityname
=
cityname
.
slice
(
0
,
2
)
+
'市'
cityname
=
cityname
.
slice
(
0
,
2
)
+
'市'
// if (municipality === '重庆市') {
// provincecode = provincecode.slice(0, 4)
// provincecode == 5001 ? (cityname = cityname.slice(0, 2) + '城区') : (cityname = cityname.slice(0, 2) + '郊县')
// // 重新赋值城市名
// this.provinceForm.cityName = cityname
// }
}
// 判断省市是否匹配
// 如果只展示省市
if
(
this
.
provinceForm
.
provinceName
&&
!
this
.
provinceForm
.
townName
)
{
if
(
this
.
provinceForm
.
provinceName
!==
provincename
||
this
.
provinceForm
.
cityName
!==
cityname
)
{
this
.
$message
.
error
(
'您选择的地址错误,请重新选择'
)
return
}
}
}
// 如果展示省市区
this
.
syncProvinceCityTownFromMapGeocoder
(
provincename
,
cityname
,
town
,
mapData
)
if
(
this
.
provinceForm
.
provinceName
&&
this
.
provinceForm
.
townName
)
{
if
(
this
.
provinceForm
.
provinceName
!==
provincename
||
this
.
provinceForm
.
cityName
!==
cityname
||
this
.
provinceForm
.
townName
!==
town
)
{
const
md
=
mapData
this
.
$message
.
error
(
'您选择的地址错误,请重新选择'
)
return
}
}
// 地图确认后同步区级编码:逆地理常不带 town_code,用区级 adcode 兜底,避免外层表单校验缺少 districtCode 仍飘红
const
md
=
mapData
||
{}
const
tcMerged
=
const
tcMerged
=
md
.
town_code
!=
null
&&
md
.
town_code
!==
''
md
.
town_code
!=
null
&&
md
.
town_code
!==
''
?
String
(
md
.
town_code
)
?
String
(
md
.
town_code
)
...
@@ -405,9 +466,6 @@ export default {
...
@@ -405,9 +466,6 @@ export default {
}
}
this
.
provinceForm
.
fullAddress
=
this
.
$refs
.
mapForm
.
address
this
.
provinceForm
.
fullAddress
=
this
.
$refs
.
mapForm
.
address
this
.
dialogMapVisible
=
false
this
.
dialogMapVisible
=
false
// this.subdistrict == 2 ? this.init(province, city) : this.init(province, city, town)
console
.
log
(
this
.
provinceForm
,
'provinceForm'
)
// 通过地图选择省市区
this
.
$emit
(
'selectAddressByMap'
,
this
.
provinceForm
)
this
.
$emit
(
'selectAddressByMap'
,
this
.
provinceForm
)
}
}
}
}
...
...
src/plugin/axios/index_code.js
View file @
f834c53
...
@@ -53,7 +53,9 @@ const service = axios.create({
...
@@ -53,7 +53,9 @@ const service = axios.create({
service
.
interceptors
.
request
.
use
(
service
.
interceptors
.
request
.
use
(
(
config
)
=>
{
(
config
)
=>
{
return
new
Promise
(
async
(
resolve
)
=>
{
return
new
Promise
(
async
(
resolve
)
=>
{
if
(
!
config
.
skipGlobalLoading
)
{
await
store
.
commit
(
"d2admin/loading/set"
,
true
);
await
store
.
commit
(
"d2admin/loading/set"
,
true
);
}
// const uuid = util.cookies.get('uuid')
// const uuid = util.cookies.get('uuid')
// 如果请求链接不在排除列表 (排除列表: 登录 基础数据) 并且cookie 过期(判断是否长时间未操作)
// 如果请求链接不在排除列表 (排除列表: 登录 基础数据) 并且cookie 过期(判断是否长时间未操作)
// if (!LogExternals.some(u => u === url || (params && u === params.method)) && !uuid) {
// if (!LogExternals.some(u => u === url || (params && u === params.method)) && !uuid) {
...
@@ -100,7 +102,9 @@ service.interceptors.request.use(
...
@@ -100,7 +102,9 @@ service.interceptors.request.use(
});
});
},
},
(
error
)
=>
{
(
error
)
=>
{
if
(
!
error
.
config
?.
skipGlobalLoading
)
{
store
.
commit
(
"d2admin/loading/set"
,
false
);
store
.
commit
(
"d2admin/loading/set"
,
false
);
}
// 发送失败
// 发送失败
console
.
log
(
error
);
console
.
log
(
error
);
Promise
.
reject
(
error
);
Promise
.
reject
(
error
);
...
@@ -110,7 +114,9 @@ service.interceptors.request.use(
...
@@ -110,7 +114,9 @@ service.interceptors.request.use(
service
.
interceptors
.
response
.
use
(
service
.
interceptors
.
response
.
use
(
(
response
)
=>
{
(
response
)
=>
{
// console.log(response)
// console.log(response)
if
(
!
response
.
config
.
skipGlobalLoading
)
{
store
.
commit
(
"d2admin/loading/set"
,
false
);
store
.
commit
(
"d2admin/loading/set"
,
false
);
}
// dataAxios 是 axios 返回数据中的 data
// dataAxios 是 axios 返回数据中的 data
// const dataAxios = {
// const dataAxios = {
// code: "20",
// code: "20",
...
@@ -215,7 +221,9 @@ service.interceptors.response.use(
...
@@ -215,7 +221,9 @@ service.interceptors.response.use(
// console.log('超时')
// console.log('超时')
// console.log(error)
// console.log(error)
}
}
if
(
!
error
.
config
?.
skipGlobalLoading
)
{
store
.
commit
(
"d2admin/loading/set"
,
false
);
store
.
commit
(
"d2admin/loading/set"
,
false
);
}
if
(
!
error
.
__CANCEL__
)
if
(
!
error
.
__CANCEL__
)
errorLog
(
error
);
// 取消请求 不做错误提示
errorLog
(
error
);
// 取消请求 不做错误提示
return
Promise
.
reject
(
error
);
return
Promise
.
reject
(
error
);
...
...
src/views/systemConfig/merchant/financialRules/index.vue
View file @
f834c53
...
@@ -942,7 +942,14 @@ export default {
...
@@ -942,7 +942,14 @@ export default {
init4sServiceList
()
{
init4sServiceList
()
{
return
new
Promise
((
resolve
)
=>
{
return
new
Promise
((
resolve
)
=>
{
const
{
scene
,
merchantId
}
=
this
.
routerInfo
const
{
scene
,
merchantId
}
=
this
.
routerInfo
scenemerchantrefQueryServiceRefByShop
({
scene
,
merchantId
})
const
baseSceneCode
=
String
(
resolveBaseSceneCodeFromRouter
(
this
.
routerInfo
)
)
scenemerchantrefQueryServiceRefByShop
({
scene
,
merchantId
,
baseSceneCode
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
// console.log(res)
// console.log(res)
this
.
serviceMerchantList
=
res
this
.
serviceMerchantList
=
res
...
...
src/views/systemConfig/merchant/merchantStep/components/classificationCpt.vue
View file @
f834c53
This diff is collapsed.
Click to expand it.
src/views/systemConfig/merchant/merchantStep/merchantCheck.vue
View file @
f834c53
<!-- 对账编辑 -->
<!-- 对账编辑 -->
<
template
>
<
template
>
<d2-Container
v-loading=
"
$store.state.d2admin.loading.value
"
>
<d2-Container
v-loading=
"
pageOverlayLoading
"
>
<div
class=
"merchant-check"
>
<div
class=
"merchant-check"
>
<div
class=
"headerCon"
>
<div
class=
"headerCon"
>
<div
class=
"check-title"
>
<div
class=
"check-title"
>
...
@@ -60,13 +60,13 @@
...
@@ -60,13 +60,13 @@
*
*
* 数据获取
* 数据获取
* - created:getRowItem(路由 params)+ 并行 getQueryFeeCategoryByType(三路费用类别,不 await)
* - created:getRowItem(路由 params)+ 并行 getQueryFeeCategoryByType(三路费用类别,不 await)
* - mounted:
Promise.allSettled(fetchGoodsCategoryConfiguration → productType,getEffectRule → rules/tabs/formObj/baseline) + ruleAuditSituation(effectStartDate)
* - mounted:
pageOverlayLoading 包住 Promise.allSettled(分类 + getEffectRule)+ ruleAuditSituation;整页 v-loading 不绑定 d2admin 全局,避免子组件远程商品请求整页转圈
* - watch productType → initBaseData;仅当前 Tab 挂载 classificationCpt(ref classificationActive)
* - watch productType → initBaseData;仅当前 Tab 挂载 classificationCpt(ref classificationActive)
*
*
* 校验(保存)
* 校验(保存)
* - showsmCode → verifyFormData → getReconciliationGoodsTypeGroupRules:persist 后按 diff +(有基线槽位时 touched/sessionAdded)定待校验 Tab;
* - showsmCode → verifyFormData → getReconciliationGoodsTypeGroupRules:persist 后按 diff +(有基线槽位时 touched/sessionAdded)定待校验 Tab;
* 先首遍仅缓存的 getReconciliationRuleValidationResult(无 merge/getEffectRule)首错即停,通过后再第二遍
* 先首遍仅缓存的 getReconciliationRuleValidationResult(无 merge/getEffectRule)首错即停,通过后再第二遍
* resolveReconciliationRulePayloadForTabValidation + getReconciliationRuleValidationResult;失败时 Toast +
单字段或首错 el-form
标红
* resolveReconciliationRulePayloadForTabValidation + getReconciliationRuleValidationResult;失败时 Toast +
当前 Tab classificationCpt.validateFormOnly 整表
标红
* - checkParamsType 通过后打开验证码弹窗;失败 focusTabByErrorIndex
* - checkParamsType 通过后打开验证码弹窗;失败 focusTabByErrorIndex
*
*
* 提交
* 提交
...
@@ -114,6 +114,7 @@ import {
...
@@ -114,6 +114,7 @@ import {
pickSceneLookupCode
,
pickSceneLookupCode
,
getSceneDisplayNameFromList
getSceneDisplayNameFromList
}
from
"../merchantGroundingEdit/merchantDetailMap"
}
from
"../merchantGroundingEdit/merchantDetailMap"
// 具体商品/套餐分页列表:grounding 内 getAllGoodsListPage、merchantPackageGoodsInfoPage 已 skipGlobalLoading,避免整屏转圈
import
{
import
{
getAllGoodsListPage
as
getAllGoodsList
,
getAllGoodsListPage
as
getAllGoodsList
,
merchantPackageGoodsInfoPage
merchantPackageGoodsInfoPage
...
@@ -171,6 +172,8 @@ export default {
...
@@ -171,6 +172,8 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
/** 本页专用全屏遮罩:不绑定 d2admin 全局 loading,避免「具体商品」远程下拉等请求整页转圈 */
pageOverlayLoading
:
false
,
effectStartDateDate
:
""
,
effectStartDateDate
:
""
,
effectStartDate
:
false
,
// 规则时间 true 表示可以立即生效 是否立即生效
effectStartDate
:
false
,
// 规则时间 true 表示可以立即生效 是否立即生效
/** 业务场景展示:按 baseSceneCode + getBaseSceneCodeList */
/** 业务场景展示:按 baseSceneCode + getBaseSceneCodeList */
...
@@ -316,6 +319,8 @@ export default {
...
@@ -316,6 +319,8 @@ export default {
void
this
.
getQueryFeeCategoryByType
()
void
this
.
getQueryFeeCategoryByType
()
},
},
async
mounted
()
{
async
mounted
()
{
this
.
pageOverlayLoading
=
true
try
{
this
.
fetchReconciliationRuleAuditSituation
()
this
.
fetchReconciliationRuleAuditSituation
()
/**
/**
* A3 策略:分类与对账规则并行加载;互不拖死。
* A3 策略:分类与对账规则并行加载;互不拖死。
...
@@ -336,6 +341,9 @@ export default {
...
@@ -336,6 +341,9 @@ export default {
this
.
getSelectingList
()
this
.
getSelectingList
()
this
.
getSelectingListPackage
()
this
.
getSelectingListPackage
()
}
}
}
finally
{
this
.
pageOverlayLoading
=
false
}
},
},
watch
:
{
watch
:
{
routerInfo
:
{
routerInfo
:
{
...
@@ -739,7 +747,7 @@ export default {
...
@@ -739,7 +747,7 @@ export default {
return
rows
return
rows
},
},
/**
/**
* 对账数据校验未通过:切 Tab、
提示、单字段或首错 el-form 标红(不整表 form.validate)
。
* 对账数据校验未通过:切 Tab、
标红;不单独 Toast vr.message,避免与上层「请完善对账规则」叠两条提示
。
*/
*/
async
applyReconciliationDataValidationFailure
(
pane
,
tabindex
,
tab
,
vr
)
{
async
applyReconciliationDataValidationFailure
(
pane
,
tabindex
,
tab
,
vr
)
{
this
.
errorIndex
=
tabindex
this
.
errorIndex
=
tabindex
...
@@ -747,19 +755,11 @@ export default {
...
@@ -747,19 +755,11 @@ export default {
this
.
editableTabsValue
=
pane
.
name
this
.
editableTabsValue
=
pane
.
name
await
this
.
$nextTick
()
await
this
.
$nextTick
()
await
this
.
$nextTick
()
await
this
.
$nextTick
()
this
.
$message
.
warning
(
vr
.
message
)
const
nodeMounted
=
this
.
getClassificationRef
(
pane
.
name
)
const
nodeMounted
=
this
.
getClassificationRef
(
pane
.
name
)
if
(
!
nodeMounted
)
return
if
(
!
nodeMounted
)
return
await
this
.
$nextTick
()
await
this
.
$nextTick
()
if
(
if
(
typeof
nodeMounted
.
validateFormOnly
===
"function"
)
{
vr
.
fieldProp
await
nodeMounted
.
validateFormOnly
()
&&
typeof
nodeMounted
.
validateReconciliationFormField
===
"function"
)
{
await
nodeMounted
.
validateReconciliationFormField
(
vr
.
fieldProp
)
}
else
if
(
typeof
nodeMounted
.
validateReconciliationFormFirstErrorOnly
===
"function"
)
{
await
nodeMounted
.
validateReconciliationFormFirstErrorOnly
()
}
}
},
},
/**
/**
...
@@ -767,7 +767,7 @@ export default {
...
@@ -767,7 +767,7 @@ export default {
* indicesToProcess 逻辑不变,仍由 diff + shouldIncludeReconciliationTabForProcess 门控,filterIndicesToSubmitIncremental
* indicesToProcess 逻辑不变,仍由 diff + shouldIncludeReconciliationTabForProcess 门控,filterIndicesToSubmitIncremental
* 与基线比对组包。
* 与基线比对组包。
* 首遍仅 buildRuleFromCacheForTabIndex + getReconciliationRuleValidationResult;
* 首遍仅 buildRuleFromCacheForTabIndex + getReconciliationRuleValidationResult;
* 全过后第二遍 resolveReconciliationRulePayloadForTabValidation + 校验并组快照。失败时切 Tab +
轻量 el-form
标红。
* 全过后第二遍 resolveReconciliationRulePayloadForTabValidation + 校验并组快照。失败时切 Tab +
子组件 validateFormOnly 整表
标红。
*
*
* @returns {Promise<{ ok: boolean, incrementalRules: Array, fullMergedRules: Array|null, firstErrorTabIndex?: number }>}
* @returns {Promise<{ ok: boolean, incrementalRules: Array, fullMergedRules: Array|null, firstErrorTabIndex?: number }>}
*/
*/
...
@@ -1476,6 +1476,8 @@ export default {
...
@@ -1476,6 +1476,8 @@ export default {
},
},
// 显示smcode弹框
// 显示smcode弹框
async
showsmCode
()
{
async
showsmCode
()
{
this
.
pageOverlayLoading
=
true
try
{
const
res
=
await
this
.
verifyFormData
()
const
res
=
await
this
.
verifyFormData
()
if
(
!
this
.
checkParamsType
(
res
))
{
if
(
!
this
.
checkParamsType
(
res
))
{
this
.
focusTabByErrorIndex
()
this
.
focusTabByErrorIndex
()
...
@@ -1484,6 +1486,9 @@ export default {
...
@@ -1484,6 +1486,9 @@ export default {
this
.
errorIndex
=
-
1
this
.
errorIndex
=
-
1
this
.
reconciliationSmsVerifyEpoch
=
this
.
reconciliationInteractionEpoch
this
.
reconciliationSmsVerifyEpoch
=
this
.
reconciliationInteractionEpoch
this
.
verificationCodeVisible
=
true
this
.
verificationCodeVisible
=
true
}
finally
{
this
.
pageOverlayLoading
=
false
}
},
},
// 获取弹框中的验证码
// 获取弹框中的验证码
codeHandleConfirm
({
smsCode
,
effectStartDate
})
{
codeHandleConfirm
({
smsCode
,
effectStartDate
})
{
...
@@ -1498,6 +1503,8 @@ export default {
...
@@ -1498,6 +1503,8 @@ export default {
* 无变更且无待删 id 时为 []。
* 无变更且无待删 id 时为 []。
*/
*/
async
submitFormData
(
skipReverifyAfterSms
=
false
)
{
async
submitFormData
(
skipReverifyAfterSms
=
false
)
{
this
.
pageOverlayLoading
=
true
try
{
const
canSkipReverify
=
const
canSkipReverify
=
skipReverifyAfterSms
skipReverifyAfterSms
&&
this
.
reconciliationLastVerifyResult
?.
ok
===
true
&&
this
.
reconciliationLastVerifyResult
?.
ok
===
true
...
@@ -1556,6 +1563,9 @@ export default {
...
@@ -1556,6 +1563,9 @@ export default {
})
})
this
.
$router
.
push
({
name
:
"merchantManage"
})
this
.
$router
.
push
({
name
:
"merchantManage"
})
}
}
}
finally
{
this
.
pageOverlayLoading
=
false
}
},
},
// 校验所有form数据(persist 仅在 getReconciliationGoodsTypeGroupRules 内、有待校验 Tab 时执行,避免无操作保存前污染缓存)
// 校验所有form数据(persist 仅在 getReconciliationGoodsTypeGroupRules 内、有待校验 Tab 时执行,避免无操作保存前污染缓存)
async
verifyFormData
()
{
async
verifyFormData
()
{
...
...
src/views/systemConfig/merchant/merchantStep/utils/validateReconciliationRulePayload.js
View file @
f834c53
...
@@ -43,7 +43,7 @@ function validateExpenseCategoryRulesArray(rules) {
...
@@ -43,7 +43,7 @@ function validateExpenseCategoryRulesArray(rules) {
}
}
/**
/**
* 首条不通过项的中文人读提示与可选 el-form prop(
供 validateField 单字段
标红)。
* 首条不通过项的中文人读提示与可选 el-form prop(
fieldProp 可为 null;父页失败时对当前 Tab 走整表 validateFormOnly
标红)。
* @typedef {{ ok: true, message: string, fieldProp: null }} ReconciliationRuleValidationOk
* @typedef {{ ok: true, message: string, fieldProp: null }} ReconciliationRuleValidationOk
* @typedef {{ ok: false, message: string, fieldProp: (string|null) }} ReconciliationRuleValidationErr
* @typedef {{ ok: false, message: string, fieldProp: (string|null) }} ReconciliationRuleValidationErr
* @param {object} rawRule
* @param {object} rawRule
...
...
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